@pfm-platform/partners-ui-mui 0.1.1
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.cjs +52 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +50 -0
- package/dist/index.js.map +1 -0
- package/package.json +66 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var material = require('@mui/material');
|
|
4
|
+
var partnersFeature = require('@pfm-platform/partners-feature');
|
|
5
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
|
|
7
|
+
// src/components/PartnerInfo.tsx
|
|
8
|
+
function PartnerInfo({
|
|
9
|
+
title = "Partner Information",
|
|
10
|
+
showFeatures = true
|
|
11
|
+
}) {
|
|
12
|
+
const config = partnersFeature.usePartnerConfig();
|
|
13
|
+
const features = partnersFeature.usePartnerFeatures();
|
|
14
|
+
if (!config) {
|
|
15
|
+
return /* @__PURE__ */ jsxRuntime.jsx(material.Card, { children: /* @__PURE__ */ jsxRuntime.jsx(material.CardContent, { children: /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { color: "text.secondary", children: "Loading partner information..." }) }) });
|
|
16
|
+
}
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsx(material.Card, { children: /* @__PURE__ */ jsxRuntime.jsxs(material.CardContent, { children: [
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "h6", gutterBottom: true, children: title }),
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { mb: 2 }, children: [
|
|
20
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: "Product Name" }),
|
|
21
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", fontWeight: "medium", children: config.productName })
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { mb: 2 }, children: [
|
|
24
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: "Domain" }),
|
|
25
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body1", children: config.domain })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { mb: showFeatures && features ? 2 : 0 }, children: [
|
|
28
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", gutterBottom: true, children: "Environment" }),
|
|
29
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
+
material.Chip,
|
|
31
|
+
{
|
|
32
|
+
label: config.isDemo ? "Demo" : "Production",
|
|
33
|
+
color: config.isDemo ? "warning" : "success",
|
|
34
|
+
size: "small"
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
] }),
|
|
38
|
+
showFeatures && features && /* @__PURE__ */ jsxRuntime.jsxs(material.Box, { children: [
|
|
39
|
+
/* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", gutterBottom: true, children: "Available Features" }),
|
|
40
|
+
/* @__PURE__ */ jsxRuntime.jsxs(material.Box, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: [
|
|
41
|
+
features.alertsEnabled && /* @__PURE__ */ jsxRuntime.jsx(material.Chip, { label: "Alerts", size: "small", variant: "outlined" }),
|
|
42
|
+
features.hasAggregation && /* @__PURE__ */ jsxRuntime.jsx(material.Chip, { label: "Aggregation", size: "small", variant: "outlined" }),
|
|
43
|
+
features.hasMobile && /* @__PURE__ */ jsxRuntime.jsx(material.Chip, { label: "Mobile", size: "small", variant: "outlined" }),
|
|
44
|
+
!features.alertsEnabled && !features.hasAggregation && !features.hasMobile && /* @__PURE__ */ jsxRuntime.jsx(material.Typography, { variant: "body2", color: "text.secondary", children: "No optional features enabled" })
|
|
45
|
+
] })
|
|
46
|
+
] })
|
|
47
|
+
] }) });
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
exports.PartnerInfo = PartnerInfo;
|
|
51
|
+
//# sourceMappingURL=index.cjs.map
|
|
52
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/PartnerInfo.tsx"],"names":["usePartnerConfig","usePartnerFeatures","jsx","Card","CardContent","Typography","jsxs","Box","Chip"],"mappings":";;;;;;;AA2BO,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA,GAAQ,qBAAA;AAAA,EACR,YAAA,GAAe;AACjB,CAAA,EAAqB;AACnB,EAAA,MAAM,SAASA,gCAAA,EAAiB;AAChC,EAAA,MAAM,WAAWC,kCAAA,EAAmB;AAEpC,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,uBACEC,cAAA,CAACC,aAAA,EAAA,EACC,QAAA,kBAAAD,cAAA,CAACE,oBAAA,EAAA,EACC,QAAA,kBAAAF,cAAA,CAACG,uBAAW,KAAA,EAAM,gBAAA,EAAiB,QAAA,EAAA,gCAAA,EAEnC,CAAA,EACF,CAAA,EACF,CAAA;AAAA,EAEJ;AAEA,EAAA,uBACEH,cAAA,CAACC,aAAA,EAAA,EACC,QAAA,kBAAAG,eAAA,CAACF,oBAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAAF,cAAA,CAACG,mBAAA,EAAA,EAAW,OAAA,EAAQ,IAAA,EAAK,YAAA,EAAY,MAClC,QAAA,EAAA,KAAA,EACH,CAAA;AAAA,oCAECE,YAAA,EAAA,EAAI,EAAA,EAAI,EAAE,EAAA,EAAI,GAAE,EACf,QAAA,EAAA;AAAA,sBAAAL,cAAA,CAACG,mBAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ,KAAA,EAAM,kBAAiB,QAAA,EAAA,cAAA,EAEnD,CAAA;AAAA,qCACCA,mBA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AA,EAAU,MAAA,EAAO,EAClD,QAAA,EAAA;AAAA,QAAA,QAAA,CAAS,aAAA,mCACPC,aAAA,EAAA,EAAK,KAAA,EAAM,UAAS,IAAA,EAAK,OAAA,EAAQ,SAAQ,UAAA,EAAW,CAAA;AAAA,QAEtD,QAAA,CAAS,kCACRN,cAAA,CAACM,aAAA,EAAA,EAAK,OAAM,aAAA,EAAc,IAAA,EAAK,OAAA,EAAQ,OAAA,EAAQ,UAAA,EAAW,CAAA;AAAA,QAE3D,QAAA,CAAS,6BACRN,cAAA,CAACM,aAAA,EAAA,EAAK,OAAM,QAAA,EAAS,IAAA,EAAK,OAAA,EAAQ,OAAA,EAAQ,UAAA,EAAW,CAAA;AAAA,QAEtD,CAAC,QAAA,CAAS,aAAA,IAAiB,CAAC,SAAS,cAAA,IAAkB,CAAC,QAAA,CAAS,SAAA,mCAC/DH,mBAAA,EAAA,EAAW,OAAA,EAAQ,OAAA,EAAQ,KAAA,EAAM,kBAAiB,QAAA,EAAA,8BAAA,EAEnD;AAAA,OAAA,EAEJ;AAAA,KAAA,EACF;AAAA,GAAA,EAEJ,CAAA,EACF,CAAA;AAEJ","file":"index.cjs","sourcesContent":["import { Box, Card, CardContent, Chip, Typography } from '@mui/material';\nimport { usePartnerConfig, usePartnerFeatures } from '@pfm-platform/partners-feature';\n\nexport interface PartnerInfoProps {\n /**\n * Optional title for the card\n * @default \"Partner Information\"\n */\n title?: string;\n\n /**\n * Show feature flags section\n * @default true\n */\n showFeatures?: boolean;\n}\n\n/**\n * Display partner configuration and feature information\n *\n * Shows:\n * - Product name and domain\n * - Demo environment indicator\n * - Available features (alerts, aggregation, mobile)\n *\n * Uses feature hooks for business logic\n */\nexport function PartnerInfo({\n title = 'Partner Information',\n showFeatures = true\n}: PartnerInfoProps) {\n const config = usePartnerConfig();\n const features = usePartnerFeatures();\n\n if (!config) {\n return (\n <Card>\n <CardContent>\n <Typography color=\"text.secondary\">\n Loading partner information...\n </Typography>\n </CardContent>\n </Card>\n );\n }\n\n return (\n <Card>\n <CardContent>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n\n <Box sx={{ mb: 2 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Product Name\n </Typography>\n <Typography variant=\"body1\" fontWeight=\"medium\">\n {config.productName}\n </Typography>\n </Box>\n\n <Box sx={{ mb: 2 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Domain\n </Typography>\n <Typography variant=\"body1\">\n {config.domain}\n </Typography>\n </Box>\n\n <Box sx={{ mb: showFeatures && features ? 2 : 0 }}>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Environment\n </Typography>\n <Chip\n label={config.isDemo ? 'Demo' : 'Production'}\n color={config.isDemo ? 'warning' : 'success'}\n size=\"small\"\n />\n </Box>\n\n {showFeatures && features && (\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Available Features\n </Typography>\n <Box sx={{ display: 'flex', gap: 1, flexWrap: 'wrap' }}>\n {features.alertsEnabled && (\n <Chip label=\"Alerts\" size=\"small\" variant=\"outlined\" />\n )}\n {features.hasAggregation && (\n <Chip label=\"Aggregation\" size=\"small\" variant=\"outlined\" />\n )}\n {features.hasMobile && (\n <Chip label=\"Mobile\" size=\"small\" variant=\"outlined\" />\n )}\n {!features.alertsEnabled && !features.hasAggregation && !features.hasMobile && (\n <Typography variant=\"body2\" color=\"text.secondary\">\n No optional features enabled\n </Typography>\n )}\n </Box>\n </Box>\n )}\n </CardContent>\n </Card>\n );\n}\n"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface PartnerInfoProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optional title for the card
|
|
6
|
+
* @default "Partner Information"
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Show feature flags section
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
showFeatures?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Display partner configuration and feature information
|
|
17
|
+
*
|
|
18
|
+
* Shows:
|
|
19
|
+
* - Product name and domain
|
|
20
|
+
* - Demo environment indicator
|
|
21
|
+
* - Available features (alerts, aggregation, mobile)
|
|
22
|
+
*
|
|
23
|
+
* Uses feature hooks for business logic
|
|
24
|
+
*/
|
|
25
|
+
declare function PartnerInfo({ title, showFeatures }: PartnerInfoProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { PartnerInfo, type PartnerInfoProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface PartnerInfoProps {
|
|
4
|
+
/**
|
|
5
|
+
* Optional title for the card
|
|
6
|
+
* @default "Partner Information"
|
|
7
|
+
*/
|
|
8
|
+
title?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Show feature flags section
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
showFeatures?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Display partner configuration and feature information
|
|
17
|
+
*
|
|
18
|
+
* Shows:
|
|
19
|
+
* - Product name and domain
|
|
20
|
+
* - Demo environment indicator
|
|
21
|
+
* - Available features (alerts, aggregation, mobile)
|
|
22
|
+
*
|
|
23
|
+
* Uses feature hooks for business logic
|
|
24
|
+
*/
|
|
25
|
+
declare function PartnerInfo({ title, showFeatures }: PartnerInfoProps): react_jsx_runtime.JSX.Element;
|
|
26
|
+
|
|
27
|
+
export { PartnerInfo, type PartnerInfoProps };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Card, CardContent, Typography, Box, Chip } from '@mui/material';
|
|
2
|
+
import { usePartnerConfig, usePartnerFeatures } from '@pfm-platform/partners-feature';
|
|
3
|
+
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
// src/components/PartnerInfo.tsx
|
|
6
|
+
function PartnerInfo({
|
|
7
|
+
title = "Partner Information",
|
|
8
|
+
showFeatures = true
|
|
9
|
+
}) {
|
|
10
|
+
const config = usePartnerConfig();
|
|
11
|
+
const features = usePartnerFeatures();
|
|
12
|
+
if (!config) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { children: /* @__PURE__ */ jsx(Typography, { color: "text.secondary", children: "Loading partner information..." }) }) });
|
|
14
|
+
}
|
|
15
|
+
return /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx(Typography, { variant: "h6", gutterBottom: true, children: title }),
|
|
17
|
+
/* @__PURE__ */ jsxs(Box, { sx: { mb: 2 }, children: [
|
|
18
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: "Product Name" }),
|
|
19
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", fontWeight: "medium", children: config.productName })
|
|
20
|
+
] }),
|
|
21
|
+
/* @__PURE__ */ jsxs(Box, { sx: { mb: 2 }, children: [
|
|
22
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: "Domain" }),
|
|
23
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body1", children: config.domain })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ jsxs(Box, { sx: { mb: showFeatures && features ? 2 : 0 }, children: [
|
|
26
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", gutterBottom: true, children: "Environment" }),
|
|
27
|
+
/* @__PURE__ */ jsx(
|
|
28
|
+
Chip,
|
|
29
|
+
{
|
|
30
|
+
label: config.isDemo ? "Demo" : "Production",
|
|
31
|
+
color: config.isDemo ? "warning" : "success",
|
|
32
|
+
size: "small"
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] }),
|
|
36
|
+
showFeatures && features && /* @__PURE__ */ jsxs(Box, { children: [
|
|
37
|
+
/* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", gutterBottom: true, children: "Available Features" }),
|
|
38
|
+
/* @__PURE__ */ jsxs(Box, { sx: { display: "flex", gap: 1, flexWrap: "wrap" }, children: [
|
|
39
|
+
features.alertsEnabled && /* @__PURE__ */ jsx(Chip, { label: "Alerts", size: "small", variant: "outlined" }),
|
|
40
|
+
features.hasAggregation && /* @__PURE__ */ jsx(Chip, { label: "Aggregation", size: "small", variant: "outlined" }),
|
|
41
|
+
features.hasMobile && /* @__PURE__ */ jsx(Chip, { label: "Mobile", size: "small", variant: "outlined" }),
|
|
42
|
+
!features.alertsEnabled && !features.hasAggregation && !features.hasMobile && /* @__PURE__ */ jsx(Typography, { variant: "body2", color: "text.secondary", children: "No optional features enabled" })
|
|
43
|
+
] })
|
|
44
|
+
] })
|
|
45
|
+
] }) });
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { PartnerInfo };
|
|
49
|
+
//# sourceMappingURL=index.js.map
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/PartnerInfo.tsx"],"names":[],"mappings":";;;;;AA2BO,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA,GAAQ,qBAAA;AAAA,EACR,YAAA,GAAe;AACjB,CAAA,EAAqB;AACnB,EAAA,MAAM,SAAS,gBAAA,EAAiB;AAChC,EAAA,MAAM,WAAW,kBAAA,EAAmB;AAEpC,EAAA,IAAI,CAAC,MAAA,EAAQ;AACX,IAAA,uBACE,GAAA,CAAC,IAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,WAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,cAAW,KAAA,EAAM,gBAAA,EAAiB,QAAA,EAAA,gCAAA,EAEnC,CAA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fig, usePartnerFeatures } from '@pfm-platform/partners-feature';\n\nexport interface PartnerInfoProps {\n /**\n * Optional title for the card\n * @default \"Partner Information\"\n */\n title?: string;\n\n /**\n * Show feature flags section\n * @default true\n */\n showFeatures?: boolean;\n}\n\n/**\n * Display partner configuration and feature information\n *\n * Shows:\n * - Product name and domain\n * - Demo environment indicator\n * - Available features (alerts, aggregation, mobile)\n *\n * Uses feature hooks for business logic\n */\nexport function PartnerInfo({\n title = 'Partner Information',\n showFeatures = true\n}: PartnerInfoProps) {\n const config = usePartnerConfig();\n const features = usePartnerFeatures();\n\n if (!config) {\n return (\n <Card>\n <CardContent>\n <Typography color=\"text.secondary\">\n Loading partner information...\n </Typography>\n </CardContent>\n </Card>\n );\n }\n\n return (\n <Card>\n <CardContent>\n <Typography variant=\"h6\" gutterBottom>\n {title}\n </Typography>\n\n <Box sx={{ mb: 2 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Product Name\n </Typography>\n <Typography variant=\"body1\" fontWeight=\"medium\">\n {config.productName}\n </Typography>\n </Box>\n\n <Box sx={{ mb: 2 }}>\n <Typography variant=\"body2\" color=\"text.secondary\">\n Domain\n </Typography>\n <Typography variant=\"body1\">\n {config.domain}\n </Typography>\n </Box>\n\n <Box sx={{ mb: showFeatures && features ? 2 : 0 }}>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Environment\n </Typography>\n <Chip\n label={config.isDemo ? 'Demo' : 'Production'}\n color={config.isDemo ? 'warning' : 'success'}\n size=\"small\"\n />\n </Box>\n\n {showFeatures && features && (\n <Box>\n <Typography variant=\"body2\" color=\"text.secondary\" gutterBottom>\n Available Features\n </Typography>\n <Box sx={{ display: 'flex', gap: 1, flexWrap: 'wrap' }}>\n {features.alertsEnabled && (\n <Chip label=\"Alerts\" size=\"small\" variant=\"outlined\" />\n )}\n {features.hasAggregation && (\n <Chip label=\"Aggregation\" size=\"small\" variant=\"outlined\" />\n )}\n {features.hasMobile && (\n <Chip label=\"Mobile\" size=\"small\" variant=\"outlined\" />\n )}\n {!features.alertsEnabled && !features.hasAggregation && !features.hasMobile && (\n <Typography variant=\"body2\" color=\"text.secondary\">\n No optional features enabled\n </Typography>\n )}\n </Box>\n </Box>\n )}\n </CardContent>\n </Card>\n );\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@pfm-platform/partners-ui-mui",
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"@emotion/react": "^11.14.0",
|
|
8
|
+
"@emotion/styled": "^11.14.1",
|
|
9
|
+
"@mui/x-charts": "8.18.0",
|
|
10
|
+
"@pfm-platform/partners-data-access": "0.1.1",
|
|
11
|
+
"@pfm-platform/partners-feature": "0.1.1",
|
|
12
|
+
"@pfm-platform/shared": "0.0.1"
|
|
13
|
+
},
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
16
|
+
"@testing-library/react": "^16.3.0",
|
|
17
|
+
"@testing-library/user-event": "^14.6.1",
|
|
18
|
+
"@types/react": "19.2.5",
|
|
19
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
20
|
+
"@vitest/coverage-v8": "^4.0.9",
|
|
21
|
+
"jsdom": "^27.2.0",
|
|
22
|
+
"vitest": "4.0.9"
|
|
23
|
+
},
|
|
24
|
+
"peerDependencies": {
|
|
25
|
+
"@mui/material": "^7.3.5",
|
|
26
|
+
"react": "19.2.0"
|
|
27
|
+
},
|
|
28
|
+
"module": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"exports": {
|
|
31
|
+
".": {
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"import": "./dist/index.js",
|
|
34
|
+
"require": "./dist/index.cjs"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md"
|
|
40
|
+
],
|
|
41
|
+
"description": "Personal Finance Management - PARTNERS ui-mui layer",
|
|
42
|
+
"keywords": [
|
|
43
|
+
"pfm",
|
|
44
|
+
"finance",
|
|
45
|
+
"partners",
|
|
46
|
+
"ui-mui",
|
|
47
|
+
"react",
|
|
48
|
+
"typescript"
|
|
49
|
+
],
|
|
50
|
+
"author": "Lenny Miller",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"repository": {
|
|
53
|
+
"type": "git",
|
|
54
|
+
"url": "https://github.com/lennylmiller/pfm-research",
|
|
55
|
+
"directory": "packages/partners/ui-mui"
|
|
56
|
+
},
|
|
57
|
+
"bugs": "https://github.com/lennylmiller/pfm-research/issues",
|
|
58
|
+
"homepage": "https://github.com/lennylmiller/pfm-research#readme",
|
|
59
|
+
"scripts": {
|
|
60
|
+
"test": "vitest run",
|
|
61
|
+
"test:watch": "vitest",
|
|
62
|
+
"test:ui": "vitest --ui",
|
|
63
|
+
"test:coverage": "vitest run --coverage",
|
|
64
|
+
"build": "tsup src/index.ts --format cjs,esm --dts --clean"
|
|
65
|
+
}
|
|
66
|
+
}
|