@cratis/components 1.4.1 → 1.4.2
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/cjs/DataPage/DataPage.js +3 -3
- package/dist/cjs/DataPage/DataPage.js.map +1 -1
- package/dist/cjs/ObjectContentEditor/ObjectContentEditor.js +119 -10
- package/dist/cjs/ObjectContentEditor/ObjectContentEditor.js.map +1 -1
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/index.js +8 -0
- package/dist/cjs/types/index.js.map +1 -0
- package/dist/esm/DataPage/DataPage.d.ts +3 -0
- package/dist/esm/DataPage/DataPage.d.ts.map +1 -1
- package/dist/esm/DataPage/DataPage.js +3 -3
- package/dist/esm/DataPage/DataPage.js.map +1 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts +4 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.d.ts.map +1 -1
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.js +120 -11
- package/dist/esm/ObjectContentEditor/ObjectContentEditor.js.map +1 -1
- package/dist/esm/index.d.ts +2 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/esm/types/index.d.ts +3 -0
- package/dist/esm/types/index.d.ts.map +1 -0
- package/dist/esm/types/index.js +2 -0
- package/dist/esm/types/index.js.map +1 -0
- package/dist/esm/vitest.setup.js +0 -2
- package/dist/esm/vitest.setup.js.map +1 -1
- package/package.json +7 -2
|
@@ -1,12 +1,65 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { Tooltip } from 'primereact/tooltip';
|
|
3
|
-
import React, { useState, useCallback, useMemo } from 'react';
|
|
3
|
+
import React, { useState, useCallback, useEffect, useMemo } from 'react';
|
|
4
4
|
import * as faIcons from 'react-icons/fa6';
|
|
5
5
|
import { ObjectNavigationalBar } from '../ObjectNavigationalBar/ObjectNavigationalBar.js';
|
|
6
6
|
import { getValueAtPath } from './objectHelpers.js';
|
|
7
|
+
import { InputText } from 'primereact/inputtext';
|
|
8
|
+
import { InputNumber } from 'primereact/inputnumber';
|
|
9
|
+
import { Checkbox } from 'primereact/checkbox';
|
|
10
|
+
import { Calendar } from 'primereact/calendar';
|
|
11
|
+
import { InputTextarea } from 'primereact/inputtextarea';
|
|
7
12
|
|
|
8
|
-
const ObjectContentEditor = ({ object, timestamp, schema }) => {
|
|
13
|
+
const ObjectContentEditor = ({ object, timestamp, schema, editMode = false, onChange, onValidationChange }) => {
|
|
9
14
|
const [navigationPath, setNavigationPath] = useState([]);
|
|
15
|
+
const [validationErrors, setValidationErrors] = useState({});
|
|
16
|
+
const validateValue = useCallback((propertyName, value, property) => {
|
|
17
|
+
if (editMode) {
|
|
18
|
+
if (value === null || value === undefined || value === '') {
|
|
19
|
+
return 'This field is required';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
const isRequired = schema.required?.includes(propertyName);
|
|
24
|
+
if (isRequired && (value === null || value === undefined || value === '')) {
|
|
25
|
+
return 'This field is required';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
if (property.type === 'string' && typeof value === 'string') {
|
|
29
|
+
if (property.format === 'email' && value && !value.match(/^[^\s@]+@[^\s@]+\.[^\s@]+$/)) {
|
|
30
|
+
return 'Invalid email format';
|
|
31
|
+
}
|
|
32
|
+
if (property.format === 'uri' && value && !value.match(/^https?:\/\/.+/)) {
|
|
33
|
+
return 'Invalid URI format';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
if (property.type === 'number' || property.type === 'integer') {
|
|
37
|
+
if (value !== null && value !== undefined && value !== '' && isNaN(Number(value))) {
|
|
38
|
+
return 'Must be a valid number';
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}, [schema, editMode]);
|
|
43
|
+
useEffect(() => {
|
|
44
|
+
if (!editMode || navigationPath.length > 0)
|
|
45
|
+
return;
|
|
46
|
+
const errors = {};
|
|
47
|
+
const properties = schema.properties || {};
|
|
48
|
+
Object.entries(properties).forEach(([propertyName, property]) => {
|
|
49
|
+
const value = object[propertyName];
|
|
50
|
+
const error = validateValue(propertyName, value, property);
|
|
51
|
+
if (error) {
|
|
52
|
+
errors[propertyName] = error;
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
setValidationErrors(errors);
|
|
56
|
+
}, [object, schema, editMode, navigationPath, validateValue]);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (editMode && onValidationChange) {
|
|
59
|
+
const hasErrors = Object.keys(validationErrors).length > 0;
|
|
60
|
+
onValidationChange(hasErrors);
|
|
61
|
+
}
|
|
62
|
+
}, [validationErrors, editMode, onValidationChange]);
|
|
10
63
|
const navigateToProperty = useCallback((key) => {
|
|
11
64
|
setNavigationPath([...navigationPath, key]);
|
|
12
65
|
}, [navigationPath]);
|
|
@@ -60,6 +113,7 @@ const ObjectContentEditor = ({ object, timestamp, schema }) => {
|
|
|
60
113
|
textAlign: 'left',
|
|
61
114
|
fontWeight: 500,
|
|
62
115
|
width: '140px',
|
|
116
|
+
whiteSpace: 'nowrap',
|
|
63
117
|
};
|
|
64
118
|
const valueStyle = {
|
|
65
119
|
padding: '8px 12px',
|
|
@@ -67,10 +121,62 @@ const ObjectContentEditor = ({ object, timestamp, schema }) => {
|
|
|
67
121
|
textAlign: 'left',
|
|
68
122
|
};
|
|
69
123
|
const infoIconStyle = {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
124
|
+
fontSize: '0.875rem',
|
|
125
|
+
color: 'var(--text-color-secondary)',
|
|
126
|
+
flexShrink: 0,
|
|
127
|
+
};
|
|
128
|
+
const updateValue = useCallback((propertyName, newValue) => {
|
|
129
|
+
if (!onChange)
|
|
130
|
+
return;
|
|
131
|
+
const updatedObject = { ...object };
|
|
132
|
+
updatedObject[propertyName] = newValue;
|
|
133
|
+
onChange(updatedObject);
|
|
134
|
+
}, [object, onChange]);
|
|
135
|
+
const renderEditField = (propertyName, property, value) => {
|
|
136
|
+
const error = validationErrors[propertyName];
|
|
137
|
+
const handleChange = (newValue) => {
|
|
138
|
+
updateValue(propertyName, newValue);
|
|
139
|
+
const validationError = validateValue(propertyName, newValue, property);
|
|
140
|
+
setValidationErrors(prev => {
|
|
141
|
+
const newErrors = { ...prev };
|
|
142
|
+
if (validationError) {
|
|
143
|
+
newErrors[propertyName] = validationError;
|
|
144
|
+
}
|
|
145
|
+
else {
|
|
146
|
+
delete newErrors[propertyName];
|
|
147
|
+
}
|
|
148
|
+
return newErrors;
|
|
149
|
+
});
|
|
150
|
+
};
|
|
151
|
+
const inputStyle = {
|
|
152
|
+
width: '100%',
|
|
153
|
+
...(error ? { borderColor: 'var(--red-500)' } : {})
|
|
154
|
+
};
|
|
155
|
+
if (property.type === 'boolean') {
|
|
156
|
+
return (jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px' }, children: [jsx(Checkbox, { checked: Boolean(value), onChange: (e) => handleChange(e.checked ?? false) }), error && jsx("small", { className: "p-error", children: error })] }));
|
|
157
|
+
}
|
|
158
|
+
if (property.type === 'number' || property.type === 'integer') {
|
|
159
|
+
return (jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px' }, children: [jsx(InputNumber, { value: (value === null || value === undefined) ? null : Number(value), onValueChange: (e) => handleChange(e.value ?? null), mode: "decimal", useGrouping: false, style: inputStyle }), error && jsx("small", { className: "p-error", children: error })] }));
|
|
160
|
+
}
|
|
161
|
+
if (property.type === 'string' && property.format === 'date-time') {
|
|
162
|
+
const dateValue = value ? new Date(value) : null;
|
|
163
|
+
return (jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px' }, children: [jsx(Calendar, { value: dateValue, onChange: (e) => handleChange(e.value instanceof Date ? e.value.toISOString() : null), showTime: true, showIcon: true, style: inputStyle }), error && jsx("small", { className: "p-error", children: error })] }));
|
|
164
|
+
}
|
|
165
|
+
if (property.type === 'string' && property.format === 'date') {
|
|
166
|
+
const dateValue = value ? new Date(value) : null;
|
|
167
|
+
return (jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px' }, children: [jsx(Calendar, { value: dateValue, onChange: (e) => handleChange(e.value instanceof Date ? e.value.toISOString().split('T')[0] : null), showIcon: true, style: inputStyle }), error && jsx("small", { className: "p-error", children: error })] }));
|
|
168
|
+
}
|
|
169
|
+
if (property.type === 'array') {
|
|
170
|
+
return (jsx("div", { className: "flex align-items-center gap-2", style: { color: 'rgba(255,255,255,0.6)', fontStyle: 'italic' }, children: jsx("span", { children: "Array editing not yet supported" }) }));
|
|
171
|
+
}
|
|
172
|
+
if (property.type === 'object') {
|
|
173
|
+
return (jsx("div", { className: "flex align-items-center gap-2", style: { color: 'rgba(255,255,255,0.6)', fontStyle: 'italic' }, children: jsx("span", { children: "Object editing not yet supported" }) }));
|
|
174
|
+
}
|
|
175
|
+
const isLongText = value?.length > 50;
|
|
176
|
+
if (isLongText) {
|
|
177
|
+
return (jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px' }, children: [jsx(InputTextarea, { value: String(value ?? ''), onChange: (e) => handleChange(e.target.value), rows: 3, style: inputStyle }), error && jsx("small", { className: "p-error", children: error })] }));
|
|
178
|
+
}
|
|
179
|
+
return (jsxs("div", { style: { display: 'flex', flexDirection: 'column', gap: '4px' }, children: [jsx(InputText, { value: String(value ?? ''), onChange: (e) => handleChange(e.target.value), style: inputStyle }), error && jsx("small", { className: "p-error", children: error })] }));
|
|
74
180
|
};
|
|
75
181
|
const renderValue = (value, propertyName) => {
|
|
76
182
|
if (value === null || value === undefined)
|
|
@@ -102,13 +208,16 @@ const ObjectContentEditor = ({ object, timestamp, schema }) => {
|
|
|
102
208
|
return (jsx("table", { style: tableStyle, children: jsx("tbody", { children: entries.map(([propertyName, propertyDef]) => {
|
|
103
209
|
const value = currentData[propertyName];
|
|
104
210
|
const isSchemaProperty = navigationPath.length === 0;
|
|
105
|
-
const
|
|
106
|
-
? propertyDef
|
|
107
|
-
:
|
|
108
|
-
|
|
211
|
+
const property = isSchemaProperty && typeof propertyDef === 'object' && propertyDef !== null && 'type' in propertyDef
|
|
212
|
+
? propertyDef
|
|
213
|
+
: null;
|
|
214
|
+
const description = property?.description;
|
|
215
|
+
return (jsxs("tr", { style: rowStyle, children: [jsx("td", { style: labelStyle, children: jsxs("span", { style: { display: 'inline-flex', alignItems: 'center', gap: '6px' }, children: [propertyName, description && (jsx(faIcons.FaCircleInfo, { className: "property-info-icon", style: infoIconStyle, "data-pr-tooltip": description, "data-pr-position": "right" }))] }) }), jsx("td", { style: valueStyle, children: editMode && property
|
|
216
|
+
? renderEditField(propertyName, property, value)
|
|
217
|
+
: renderValue(value, propertyName) })] }, propertyName));
|
|
109
218
|
}) }) }));
|
|
110
219
|
};
|
|
111
|
-
return (jsxs("div", { className: "order-content", style: { display: 'flex', flexDirection: 'column', height: '100%' }, children: [jsx(Tooltip, { target: "
|
|
220
|
+
return (jsxs("div", { className: "order-content", style: { display: 'flex', flexDirection: 'column', height: '100%' }, children: [jsx(Tooltip, { target: "[data-pr-tooltip]" }), jsx(ObjectNavigationalBar, { navigationPath: navigationPath, onNavigate: navigateToBreadcrumb }), renderTable(), timestamp && (jsxs("div", { style: {
|
|
112
221
|
marginTop: '20px',
|
|
113
222
|
padding: '12px',
|
|
114
223
|
background: 'rgba(100, 150, 255, 0.1)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectContentEditor.js","sources":["../../../ObjectContentEditor/ObjectContentEditor.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Tooltip } from 'primereact/tooltip';\nimport React, { useState, useCallback, useMemo } from 'react';\nimport * as faIcons from 'react-icons/fa6';\nimport { ObjectNavigationalBar } from '../ObjectNavigationalBar';\nimport { Json, JsonSchema, JsonSchemaProperty } from '../types/JsonSchema';\nimport { getValueAtPath } from './objectHelpers';\n\nexport interface ObjectContentEditorProps {\n object: Json;\n timestamp?: Date;\n schema: JsonSchema;\n}\n\nexport const ObjectContentEditor = ({ object, timestamp, schema }: ObjectContentEditorProps) => {\n const [navigationPath, setNavigationPath] = useState<string[]>([]);\n\n const navigateToProperty = useCallback((key: string) => {\n setNavigationPath([...navigationPath, key]);\n }, [navigationPath]);\n\n const navigateToBreadcrumb = useCallback((index: number) => {\n if (index === 0) {\n setNavigationPath([]);\n } else {\n setNavigationPath(navigationPath.slice(0, index));\n }\n }, [navigationPath]);\n\n const currentData = useMemo(() => {\n if (navigationPath.length === 0) {\n return object;\n }\n\n const lastKey = navigationPath[navigationPath.length - 1];\n const pathToParent = navigationPath.slice(0, -1);\n\n const parentValue = pathToParent.length > 0\n ? getValueAtPath(object, pathToParent)\n : object;\n\n if (parentValue && typeof parentValue === 'object' && !Array.isArray(parentValue)) {\n const value = (parentValue as { [k: string]: Json })[lastKey];\n\n if (Array.isArray(value)) {\n return value;\n } else if (value && typeof value === 'object') {\n return value;\n }\n }\n\n return object;\n }, [object, navigationPath, getValueAtPath]);\n\n const currentProperties = useMemo(() => {\n const properties = schema.properties || {};\n\n if (navigationPath.length === 0) {\n return properties;\n }\n\n return {};\n }, [schema, navigationPath]);\n\n const tableStyle: React.CSSProperties = {\n width: '100%',\n borderCollapse: 'collapse',\n fontFamily: '-apple-system, BlinkMacSystemFont, \"SF Mono\", monospace',\n fontSize: '13px',\n };\n\n const rowStyle: React.CSSProperties = {\n borderBottom: '1px solid rgba(255,255,255,0.1)',\n };\n\n const labelStyle: React.CSSProperties = {\n padding: '8px 12px',\n color: 'rgba(255,255,255,0.6)',\n textAlign: 'left',\n fontWeight: 500,\n width: '140px',\n };\n\n const valueStyle: React.CSSProperties = {\n padding: '8px 12px',\n color: '#fff',\n textAlign: 'left',\n };\n\n const infoIconStyle: React.CSSProperties = {\n marginLeft: '6px',\n fontSize: '12px',\n color: 'rgba(100, 150, 255, 0.6)',\n cursor: 'help',\n };\n\n const renderValue = (value: Json, propertyName: string) => {\n if (value === null || value === undefined) return '';\n\n if (Array.isArray(value)) {\n return (\n <div\n className=\"flex align-items-center gap-2 cursor-pointer\"\n onClick={() => navigateToProperty(propertyName)}\n style={{ color: 'var(--primary-color)', display: 'flex', alignItems: 'center' }}\n >\n <span>Array[{value.length}]</span>\n <faIcons.FaArrowRight style={{ fontSize: '0.875rem', display: 'inline-flex' }} />\n </div>\n );\n }\n\n if (typeof value === 'object') {\n return (\n <div\n className=\"flex align-items-center gap-2 cursor-pointer\"\n onClick={() => navigateToProperty(propertyName)}\n style={{ color: 'var(--primary-color)', display: 'flex', alignItems: 'center' }}\n >\n <span>Object</span>\n <faIcons.FaArrowRight style={{ fontSize: '0.875rem', display: 'inline-flex' }} />\n </div>\n );\n }\n\n return String(value);\n };\n\n const renderTable = () => {\n if (Array.isArray(currentData)) {\n if (currentData.length === 0) return <div style={{ padding: '12px', color: 'rgba(255,255,255,0.6)' }}>Empty array</div>;\n\n const firstItem = currentData[0];\n if (typeof firstItem === 'object' && firstItem !== null && !Array.isArray(firstItem)) {\n const keys = Object.keys(firstItem);\n\n return (\n <table style={tableStyle}>\n <tbody>\n {currentData.map((item, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <tr style={{ height: '8px', background: 'rgba(255,255,255,0.05)' }}>\n <td colSpan={2}></td>\n </tr>\n )}\n {keys.map((key) => (\n <tr key={`${index}-${key}`} style={rowStyle}>\n <td style={labelStyle}>{key}</td>\n <td style={valueStyle}>{renderValue((item as Record<string, Json>)[key], key)}</td>\n </tr>\n ))}\n </React.Fragment>\n ))}\n </tbody>\n </table>\n );\n } else {\n return (\n <table style={tableStyle}>\n <tbody>\n {currentData.map((item, index) => (\n <tr key={index} style={rowStyle}>\n <td style={labelStyle}>[{index}]</td>\n <td style={valueStyle}>{renderValue(item, `[${index}]`)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n }\n\n const entries = navigationPath.length === 0\n ? Object.entries(currentProperties)\n : Object.entries(currentData as { [key: string]: Json });\n\n return (\n <table style={tableStyle}>\n <tbody>\n {entries.map(([propertyName, propertyDef]: [string, JsonSchemaProperty | Json]) => {\n const value = (currentData as Record<string, Json>)[propertyName];\n\n const isSchemaProperty = navigationPath.length === 0;\n const description = isSchemaProperty && typeof propertyDef === 'object' && propertyDef !== null && 'description' in propertyDef\n ? (propertyDef as JsonSchemaProperty).description\n : undefined;\n\n return (\n <tr key={propertyName} style={rowStyle}>\n <td style={labelStyle}>\n {propertyName}\n {description && (\n <i\n className=\"pi pi-info-circle property-info-icon\"\n style={infoIconStyle}\n data-pr-tooltip={description} />\n )}\n </td>\n <td style={valueStyle}>{renderValue(value as Json, propertyName)}</td>\n </tr>\n );\n })}\n </tbody>\n </table>\n );\n };\n\n return (\n <div className=\"order-content\" style={{ display: 'flex', flexDirection: 'column', height: '100%' }}>\n <Tooltip target=\".property-info-icon\" />\n <ObjectNavigationalBar\n navigationPath={navigationPath}\n onNavigate={navigateToBreadcrumb}\n />\n {renderTable()}\n {timestamp && (\n <div style={{\n marginTop: '20px',\n padding: '12px',\n background: 'rgba(100, 150, 255, 0.1)',\n borderRadius: '8px',\n fontSize: '12px',\n color: 'rgba(255,255,255,0.6)'\n }}>\n Snapshot captured: {timestamp.toLocaleString()}\n </div>\n )}\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;AAgBO,MAAM,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAA4B,KAAI;IAC3F,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC;AAElE,IAAA,MAAM,kBAAkB,GAAG,WAAW,CAAC,CAAC,GAAW,KAAI;QACnD,iBAAiB,CAAC,CAAC,GAAG,cAAc,EAAE,GAAG,CAAC,CAAC;AAC/C,IAAA,CAAC,EA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C,EAChD,KAAK,EAAE,aAAa,EAAA,iBAAA,EACH,WAAW,GAAI,CACvC,CAAA,EAAA,CACA,EACLA,GAAA,CAAA,IAAA,EAAA,EAAI,KAAK,EAAE,UAAU,EAAA,QAAA,EAAG,WAAW,CAAC,KAAa,EAAE,YAAY,CAAC,GAAM,CAAA,EAAA,EAVjE,YAAY,CAWhB;AAEb,gBAAA,CAAC,CAAC,EAAA,CACE,EAAA,CACJ;AAEhB,IAAA,CAAC;IAED,QACID,cAAK,SAAS,EAAC,eAAe,EAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,CAC9FC,GAAA,CAAC,OAAO,EAAA,EAAC,MAAM,EAAC,qBAAqB,GAAG,EACxCA,GAAA,CAAC,qBAAqB,EAAA,EAClB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,oBAAoB,EAAA,CAClC,EACD,WAAW,EAAE,EACb,SAAS,KACND,IAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAE;AACR,oBAAA,SAAS,EAAE,MAAM;AACjB,oBAAA,OAAO,EAAE,MAAM;AACf,oBAAA,UAAU,EAAE,0BAA0B;AACtC,oBAAA,YAAY,EAAE,KAAK;AACnB,oBAAA,QAAQ,EAAE,MAAM;AAChB,oBAAA,KAAK,EAAE;iBACV,EAAA,QAAA,EAAA,CAAA,qBAAA,EACuB,SAAS,CAAC,cAAc,EAAE,IAC5C,CACT,CAAA,EAAA,CACC;AAEd;;;;"}
|
|
1
|
+
{"version":3,"file":"ObjectContentEditor.js","sources":["../../../ObjectContentEditor/ObjectContentEditor.tsx"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { Tooltip } from 'primereact/tooltip';\nimport React, { useState, useCallback, useMemo, useEffect } from 'react';\nimport * as faIcons from 'react-icons/fa6';\nimport { ObjectNavigationalBar } from '../ObjectNavigationalBar';\nimport { Json, JsonSchema, JsonSchemaProperty } from '../types/JsonSchema';\nimport { getValueAtPath } from './objectHelpers';\nimport { InputText } from 'primereact/inputtext';\nimport { InputNumber } from 'primereact/inputnumber';\nimport { Checkbox } from 'primereact/checkbox';\nimport { Calendar } from 'primereact/calendar';\nimport { InputTextarea } from 'primereact/inputtextarea';\n\nexport interface ObjectContentEditorProps {\n object: Json;\n timestamp?: Date;\n schema: JsonSchema;\n /**\n * When true, renders editable input fields for each property respecting type/format\n */\n editMode?: boolean;\n /**\n * Called with the updated object after any field edit\n */\n onChange?: (object: Json) => void;\n /**\n * Called when the validation state changes\n */\n onValidationChange?: (hasErrors: boolean) => void;\n}\n\nexport const ObjectContentEditor = ({ object, timestamp, schema, editMode = false, onChange, onValidationChange }: ObjectContentEditorProps) => {\n const [navigationPath, setNavigationPath] = useState<string[]>([]);\n const [validationErrors, setValidationErrors] = useState<Record<string, string>>({});\n\n const validateValue = useCallback((propertyName: string, value: Json, property: JsonSchemaProperty): string | undefined => {\n if (editMode) {\n if (value === null || value === undefined || value === '') {\n return 'This field is required';\n }\n } else {\n const isRequired = schema.required?.includes(propertyName);\n if (isRequired && (value === null || value === undefined || value === '')) {\n return 'This field is required';\n }\n }\n\n if (property.type === 'string' && typeof value === 'string') {\n if (property.format === 'email' && value && !value.match(/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/)) {\n return 'Invalid email format';\n }\n if (property.format === 'uri' && value && !value.match(/^https?:\\/\\/.+/)) {\n return 'Invalid URI format';\n }\n }\n\n if (property.type === 'number' || property.type === 'integer') {\n if (value !== null && value !== undefined && value !== '' && isNaN(Number(value))) {\n return 'Must be a valid number';\n }\n }\n\n return undefined;\n }, [schema, editMode]);\n\n useEffect(() => {\n if (!editMode || navigationPath.length > 0) return;\n\n const errors: Record<string, string> = {};\n const properties = schema.properties || {};\n\n Object.entries(properties).forEach(([propertyName, property]) => {\n const value = (object as Record<string, Json>)[propertyName];\n const error = validateValue(propertyName, value, property as JsonSchemaProperty);\n if (error) {\n errors[propertyName] = error;\n }\n });\n\n setValidationErrors(errors);\n }, [object, schema, editMode, navigationPath, validateValue]);\n\n useEffect(() => {\n if (editMode && onValidationChange) {\n const hasErrors = Object.keys(validationErrors).length > 0;\n onValidationChange(hasErrors);\n }\n }, [validationErrors, editMode, onValidationChange]);\n\n const navigateToProperty = useCallback((key: string) => {\n setNavigationPath([...navigationPath, key]);\n }, [navigationPath]);\n\n const navigateToBreadcrumb = useCallback((index: number) => {\n if (index === 0) {\n setNavigationPath([]);\n } else {\n setNavigationPath(navigationPath.slice(0, index));\n }\n }, [navigationPath]);\n\n const currentData = useMemo(() => {\n if (navigationPath.length === 0) {\n return object;\n }\n\n const lastKey = navigationPath[navigationPath.length - 1];\n const pathToParent = navigationPath.slice(0, -1);\n\n const parentValue = pathToParent.length > 0\n ? getValueAtPath(object, pathToParent)\n : object;\n\n if (parentValue && typeof parentValue === 'object' && !Array.isArray(parentValue)) {\n const value = (parentValue as { [k: string]: Json })[lastKey];\n\n if (Array.isArray(value)) {\n return value;\n } else if (value && typeof value === 'object') {\n return value;\n }\n }\n\n return object;\n }, [object, navigationPath, getValueAtPath]);\n\n const currentProperties = useMemo(() => {\n const properties = schema.properties || {};\n\n if (navigationPath.length === 0) {\n return properties;\n }\n\n return {};\n }, [schema, navigationPath]);\n\n const tableStyle: React.CSSProperties = {\n width: '100%',\n borderCollapse: 'collapse',\n fontFamily: '-apple-system, BlinkMacSystemFont, \"SF Mono\", monospace',\n fontSize: '13px',\n };\n\n const rowStyle: React.CSSProperties = {\n borderBottom: '1px solid rgba(255,255,255,0.1)',\n };\n\n const labelStyle: React.CSSProperties = {\n padding: '8px 12px',\n color: 'rgba(255,255,255,0.6)',\n textAlign: 'left',\n fontWeight: 500,\n width: '140px',\n whiteSpace: 'nowrap',\n };\n\n const valueStyle: React.CSSProperties = {\n padding: '8px 12px',\n color: '#fff',\n textAlign: 'left',\n };\n\n const infoIconStyle: React.CSSProperties = {\n fontSize: '0.875rem',\n color: 'var(--text-color-secondary)',\n flexShrink: 0,\n };\n\n const updateValue = useCallback((propertyName: string, newValue: Json) => {\n if (!onChange) return;\n\n const updatedObject = { ...(object as Record<string, Json>) };\n updatedObject[propertyName] = newValue;\n onChange(updatedObject);\n }, [object, onChange]);\n\n const renderEditField = (propertyName: string, property: JsonSchemaProperty, value: Json) => {\n const error = validationErrors[propertyName];\n\n const handleChange = (newValue: Json) => {\n updateValue(propertyName, newValue);\n const validationError = validateValue(propertyName, newValue, property);\n setValidationErrors(prev => {\n const newErrors = { ...prev };\n if (validationError) {\n newErrors[propertyName] = validationError;\n } else {\n delete newErrors[propertyName];\n }\n return newErrors;\n });\n };\n\n const inputStyle = {\n width: '100%',\n ...(error ? { borderColor: 'var(--red-500)' } : {})\n };\n\n if (property.type === 'boolean') {\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>\n <Checkbox\n checked={Boolean(value)}\n onChange={(e) => handleChange(e.checked ?? false)}\n />\n {error && <small className=\"p-error\">{error}</small>}\n </div>\n );\n }\n\n if (property.type === 'number' || property.type === 'integer') {\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>\n <InputNumber\n value={(value === null || value === undefined) ? null : Number(value)}\n onValueChange={(e) => handleChange(e.value ?? null)}\n mode=\"decimal\"\n useGrouping={false}\n style={inputStyle}\n />\n {error && <small className=\"p-error\">{error}</small>}\n </div>\n );\n }\n\n if (property.type === 'string' && property.format === 'date-time') {\n const dateValue = value ? new Date(value as string) : null;\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>\n <Calendar\n value={dateValue}\n onChange={(e) => handleChange(e.value instanceof Date ? e.value.toISOString() : null)}\n showTime\n showIcon\n style={inputStyle}\n />\n {error && <small className=\"p-error\">{error}</small>}\n </div>\n );\n }\n\n if (property.type === 'string' && property.format === 'date') {\n const dateValue = value ? new Date(value as string) : null;\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>\n <Calendar\n value={dateValue}\n onChange={(e) => handleChange(e.value instanceof Date ? e.value.toISOString().split('T')[0] : null)}\n showIcon\n style={inputStyle}\n />\n {error && <small className=\"p-error\">{error}</small>}\n </div>\n );\n }\n\n if (property.type === 'array') {\n return (\n <div className=\"flex align-items-center gap-2\" style={{ color: 'rgba(255,255,255,0.6)', fontStyle: 'italic' }}>\n <span>Array editing not yet supported</span>\n </div>\n );\n }\n\n if (property.type === 'object') {\n return (\n <div className=\"flex align-items-center gap-2\" style={{ color: 'rgba(255,255,255,0.6)', fontStyle: 'italic' }}>\n <span>Object editing not yet supported</span>\n </div>\n );\n }\n\n const isLongText = (value as string)?.length > 50;\n\n if (isLongText) {\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>\n <InputTextarea\n value={String(value ?? '')}\n onChange={(e) => handleChange(e.target.value)}\n rows={3}\n style={inputStyle}\n />\n {error && <small className=\"p-error\">{error}</small>}\n </div>\n );\n }\n\n return (\n <div style={{ display: 'flex', flexDirection: 'column', gap: '4px' }}>\n <InputText\n value={String(value ?? '')}\n onChange={(e) => handleChange(e.target.value)}\n style={inputStyle}\n />\n {error && <small className=\"p-error\">{error}</small>}\n </div>\n );\n };\n\n const renderValue = (value: Json, propertyName: string) => {\n if (value === null || value === undefined) return '';\n\n if (Array.isArray(value)) {\n return (\n <div\n className=\"flex align-items-center gap-2 cursor-pointer\"\n onClick={() => navigateToProperty(propertyName)}\n style={{ color: 'var(--primary-color)', display: 'flex', alignItems: 'center' }}\n >\n <span>Array[{value.length}]</span>\n <faIcons.FaArrowRight style={{ fontSize: '0.875rem', display: 'inline-flex' }} />\n </div>\n );\n }\n\n if (typeof value === 'object') {\n return (\n <div\n className=\"flex align-items-center gap-2 cursor-pointer\"\n onClick={() => navigateToProperty(propertyName)}\n style={{ color: 'var(--primary-color)', display: 'flex', alignItems: 'center' }}\n >\n <span>Object</span>\n <faIcons.FaArrowRight style={{ fontSize: '0.875rem', display: 'inline-flex' }} />\n </div>\n );\n }\n\n return String(value);\n };\n\n const renderTable = () => {\n if (Array.isArray(currentData)) {\n if (currentData.length === 0) return <div style={{ padding: '12px', color: 'rgba(255,255,255,0.6)' }}>Empty array</div>;\n\n const firstItem = currentData[0];\n if (typeof firstItem === 'object' && firstItem !== null && !Array.isArray(firstItem)) {\n const keys = Object.keys(firstItem);\n\n return (\n <table style={tableStyle}>\n <tbody>\n {currentData.map((item, index) => (\n <React.Fragment key={index}>\n {index > 0 && (\n <tr style={{ height: '8px', background: 'rgba(255,255,255,0.05)' }}>\n <td colSpan={2}></td>\n </tr>\n )}\n {keys.map((key) => (\n <tr key={`${index}-${key}`} style={rowStyle}>\n <td style={labelStyle}>{key}</td>\n <td style={valueStyle}>{renderValue((item as Record<string, Json>)[key], key)}</td>\n </tr>\n ))}\n </React.Fragment>\n ))}\n </tbody>\n </table>\n );\n } else {\n return (\n <table style={tableStyle}>\n <tbody>\n {currentData.map((item, index) => (\n <tr key={index} style={rowStyle}>\n <td style={labelStyle}>[{index}]</td>\n <td style={valueStyle}>{renderValue(item, `[${index}]`)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n );\n }\n }\n\n const entries = navigationPath.length === 0\n ? Object.entries(currentProperties)\n : Object.entries(currentData as { [key: string]: Json });\n\n return (\n <table style={tableStyle}>\n <tbody>\n {entries.map(([propertyName, propertyDef]: [string, JsonSchemaProperty | Json]) => {\n const value = (currentData as Record<string, Json>)[propertyName];\n\n const isSchemaProperty = navigationPath.length === 0;\n const property = isSchemaProperty && typeof propertyDef === 'object' && propertyDef !== null && 'type' in propertyDef\n ? (propertyDef as JsonSchemaProperty)\n : null;\n const description = property?.description;\n\n return (\n <tr key={propertyName} style={rowStyle}>\n <td style={labelStyle}>\n <span style={{ display: 'inline-flex', alignItems: 'center', gap: '6px' }}>\n {propertyName}\n {description && (\n <faIcons.FaCircleInfo\n className=\"property-info-icon\"\n style={infoIconStyle}\n data-pr-tooltip={description}\n data-pr-position=\"right\" />\n )}\n </span>\n </td>\n <td style={valueStyle}>\n {editMode && property\n ? renderEditField(propertyName, property, value)\n : renderValue(value as Json, propertyName)\n }\n </td>\n </tr>\n );\n })}\n </tbody>\n </table>\n );\n };\n\n return (\n <div className=\"order-content\" style={{ display: 'flex', flexDirection: 'column', height: '100%' }}>\n <Tooltip target=\"[data-pr-tooltip]\" />\n <ObjectNavigationalBar\n navigationPath={navigationPath}\n onNavigate={navigateToBreadcrumb}\n />\n {renderTable()}\n {timestamp && (\n <div style={{\n marginTop: '20px',\n padding: '12px',\n background: 'rgba(100, 150, 255, 0.1)',\n borderRadius: '8px',\n fontSize: '12px',\n color: 'rgba(255,255,255,0.6)'\n }}>\n Snapshot captured: {timestamp.toLocaleString()}\n </div>\n )}\n </div>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;MAiCa,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAA4B,KAAI;IAC3I,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAW,EAAE,CAAC;IAClE,MAAM,CAAC,gBAAgB,EAAE,mBAAmB,CAAC,GAAG,QAAQ,CAAyB,EAAE,CAAC;IAEpF,MAAM,aAAa,GAAG,WAAW,CAAC,CAAC,YAAoB,EAAE,KAAW,EAAE,QAA4B,KAAwB;QACtH,IAAI,QAAQ,EAAE;AACV,YAAA,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,EAAE;AACvD,gBAAA,OAAO,wBAAwB;YACnC;QACJ;aAAO;YACH,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC;AAC1D,YAAA,IAAI,UAAU,KAAK,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,EAAE,CAAC,EAAE;AACv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@ import * as PivotViewer from './PivotViewer';
|
|
|
11
11
|
import * as SchemaEditor from './SchemaEditor';
|
|
12
12
|
import * as TimeMachine from './TimeMachine';
|
|
13
13
|
import * as Toolbar from './Toolbar';
|
|
14
|
-
|
|
14
|
+
import * as Types from './types';
|
|
15
|
+
export { CommandDialog, CommandForm, Common, DataPage, DataTables, Dialogs, Dropdown, ObjectContentEditor, ObjectNavigationalBar, PivotViewer, SchemaEditor, TimeMachine, Toolbar, Types, };
|
|
15
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,aAAa,MAAM,iBAAiB,CAAC;AACjD,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,MAAM,MAAM,UAAU,CAAC;AACnC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,UAAU,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,QAAQ,MAAM,YAAY,CAAC;AACvC,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,qBAAqB,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,WAAW,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACH,aAAa,EACb,WAAW,EACX,MAAM,EACN,QAAQ,EACR,UAAU,EACV,OAAO,EACP,QAAQ,EACR,mBAAmB,EACnB,qBAAqB,EACrB,WAAW,EACX,YAAY,EACZ,WAAW,EACX,OAAO,EACP,KAAK,GACR,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -24,4 +24,6 @@ import * as index$b from './TimeMachine/index.js';
|
|
|
24
24
|
export { index$b as TimeMachine };
|
|
25
25
|
import * as index$c from './Toolbar/index.js';
|
|
26
26
|
export { index$c as Toolbar };
|
|
27
|
+
import * as index$d from './types/index.js';
|
|
28
|
+
export { index$d as Types };
|
|
27
29
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|