@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isi-ui7/bos7-shared",
3
- "version": "0.2.1",
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/lookup-input": "0.2.1",
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/realtime": "0.2.2"
107
+ "@isi-ui7/lookup-input": "0.2.1"
108
108
  },
109
109
  "dependencies": {
110
110
  "@carbon/icons-react": "^11.71.0",
@@ -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
- <LookupInput
382
- id={key}
383
- labelText={mkLabel(field.label, effectiveRequired)}
384
- value={asString(rawValue)}
385
- onChange={(next: string) => setValue(field.key, next as TData[keyof TData])}
386
- onDataSelected={(row: Record<string, unknown>) => {
387
- if (lookup?.onDataPatch) {
388
- const patch = lookup.onDataPatch(row as never, value);
389
- onChange?.(patch);
390
- }
391
- }}
392
- dataSource={lookup?.dataSource ?? "api"}
393
- lookupAPI={lookup?.lookupAPI ?? ""}
394
- lookupDataStructure={lookup?.lookupDataStructure ?? {}}
395
- lookupFieldTitles={lookup?.lookupFieldTitles ?? {}}
396
- displayFieldNames={lookup?.displayFieldNames ?? []}
397
- popupWidthPx={lookup?.popupWidthPx}
398
- placeholder={lookup?.placeholder}
399
- disabled={disabled}
400
- />
401
- {field.helperText ? (
402
- <div className={UI7_FORM_VISUAL_CLASSNAMES.helper}>{field.helperText}</div>
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
  }