@onehat/ui 0.3.260 → 0.3.263

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": "@onehat/ui",
3
- "version": "0.3.260",
3
+ "version": "0.3.263",
4
4
  "description": "Base UI for OneHat apps",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -25,8 +25,9 @@
25
25
  },
26
26
  "license": "UNLICENSED",
27
27
  "dependencies": {
28
- "@gluestack-style/react": "^0.2.38",
29
- "@gluestack-ui/themed": "^1.1.22",
28
+ "@gluestack-style/react": "^1.0.56",
29
+ "@gluestack-ui/config": "^1.1.18",
30
+ "@gluestack-ui/themed": "^1.1.26",
30
31
  "@hookform/resolvers": "^3.3.1",
31
32
  "@k-renwick/colour-mixer": "^1.2.1",
32
33
  "@onehat/data": "^1.20.0",
@@ -70,6 +70,8 @@ function Form(props) {
70
70
  columnDefaults = {}, // defaults for each Column defined in items (above)
71
71
  columnsConfig, // Which columns are shown in Grid, so the inline editor can match. Used only for EDITOR_TYPE__INLINE
72
72
  validator, // custom validator, mainly for EDITOR_TYPE__PLAIN
73
+ formHeader = null,
74
+ containerProps = {},
73
75
  footerProps = {},
74
76
  buttonGroupProps = {}, // buttons in footer
75
77
  checkIsEditingDisabled = true,
@@ -958,7 +960,7 @@ function Form(props) {
958
960
  }
959
961
  }
960
962
 
961
- return <Column {...sizeProps} onLayout={onLayoutDecorated} ref={formRef} testID="form">
963
+ return <Column {...sizeProps} {...containerProps} onLayout={onLayoutDecorated} ref={formRef} testID="form">
962
964
  {!!containerWidth && <>
963
965
  {editorType === EDITOR_TYPE__INLINE &&
964
966
  <Row
@@ -973,6 +975,7 @@ function Form(props) {
973
975
  >{editor}</Row>}
974
976
  {editorType !== EDITOR_TYPE__INLINE &&
975
977
  <ScrollView _web={{ minHeight, }} width="100%" pb={1}>
978
+ {formheader}
976
979
  {formButtons}
977
980
  {editor}
978
981
  </ScrollView>}
@@ -71,13 +71,17 @@ function Viewer(props) {
71
71
  items,
72
72
  // onChange: onEditorChange,
73
73
  useSelectorId = false,
74
+ isHidden = false,
74
75
  isHiddenInViewMode = false,
75
76
  ...propsToPass
76
77
  } = item,
77
78
  editorTypeProps = {};
78
79
 
80
+ if (isHidden) {
81
+ return null;
82
+ }
79
83
  if (isHiddenInViewMode) {
80
- return;
84
+ return null;
81
85
  }
82
86
  const propertyDef = name && Repository?.getSchema().getPropertyDefinition(name);
83
87
  if (!type) {
@@ -203,6 +207,9 @@ function Viewer(props) {
203
207
  canRowsReorder={false}
204
208
  />;
205
209
  if (title) {
210
+ if (record?.displayValue) {
211
+ title += ' for ' + record.displayValue;
212
+ }
206
213
  title = <Text
207
214
  fontSize={styles.VIEWER_ANCILLARY_FONTSIZE}
208
215
  fontWeight="bold"