@isi-ui7/bos7-shared 0.2.1 → 0.2.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/package.json +4 -4
- package/src/form-renderer.tsx +22 -23
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@isi-ui7/bos7-shared",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Shared auth7 and layout primitives for bos7 applications.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
"@carbon/react": "^1.97.0",
|
|
100
100
|
"@carbon/icons-react": "^11.71.0",
|
|
101
101
|
"@isi-ui7/ui-shell": "0.2.2",
|
|
102
|
-
"@isi-ui7/modal-manager": "0.2.1",
|
|
103
102
|
"@isi-ui7/i18n": "0.2.0",
|
|
104
103
|
"@isi-ui7/corporate-themes": "0.2.2",
|
|
105
|
-
"@isi-ui7/
|
|
104
|
+
"@isi-ui7/realtime": "0.2.2",
|
|
105
|
+
"@isi-ui7/modal-manager": "0.2.1",
|
|
106
106
|
"@isi-ui7/data-table": "0.2.1",
|
|
107
|
-
"@isi-ui7/
|
|
107
|
+
"@isi-ui7/lookup-input": "0.2.1"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
110
|
"@carbon/icons-react": "^11.71.0",
|
package/src/form-renderer.tsx
CHANGED
|
@@ -378,29 +378,28 @@ export function SchemaFormRenderer<TData extends Record<string, unknown>>({
|
|
|
378
378
|
const lookup = field.lookup;
|
|
379
379
|
return [
|
|
380
380
|
<div key={key} className={UI7_FORM_VISUAL_CLASSNAMES.column} style={wrapperStyle}>
|
|
381
|
-
<
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
) : null}
|
|
381
|
+
<FieldShell label={field.label} required={effectiveRequired} helperText={field.helperText} htmlFor={key}>
|
|
382
|
+
<LookupInput
|
|
383
|
+
id={key}
|
|
384
|
+
labelText=""
|
|
385
|
+
value={asString(rawValue)}
|
|
386
|
+
onChange={(next: string) => setValue(field.key, next as TData[keyof TData])}
|
|
387
|
+
onDataSelected={(row: Record<string, unknown>) => {
|
|
388
|
+
if (lookup?.onDataPatch) {
|
|
389
|
+
const patch = lookup.onDataPatch(row as never, value);
|
|
390
|
+
onChange?.(patch);
|
|
391
|
+
}
|
|
392
|
+
}}
|
|
393
|
+
dataSource={lookup?.dataSource ?? "api"}
|
|
394
|
+
lookupAPI={lookup?.lookupAPI ?? ""}
|
|
395
|
+
lookupDataStructure={lookup?.lookupDataStructure ?? {}}
|
|
396
|
+
lookupFieldTitles={lookup?.lookupFieldTitles ?? {}}
|
|
397
|
+
displayFieldNames={lookup?.displayFieldNames ?? []}
|
|
398
|
+
popupWidthPx={lookup?.popupWidthPx}
|
|
399
|
+
placeholder={lookup?.placeholder}
|
|
400
|
+
disabled={disabled}
|
|
401
|
+
/>
|
|
402
|
+
</FieldShell>
|
|
404
403
|
</div>,
|
|
405
404
|
];
|
|
406
405
|
}
|