@onehat/ui 0.4.80 → 0.4.82
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 +1 -1
- package/src/Components/Container/Container.js +4 -4
- package/src/Components/Form/Field/Combo/Combo.js +5 -2
- package/src/Components/Form/Field/Combo/MeterTypesCombo.js +1 -0
- package/src/Components/Form/Field/Date.js +1 -1
- package/src/Components/Form/Field/Select/PageSizeSelect.js +6 -1
- package/src/Components/Form/Field/Select/Select.js +14 -38
- package/src/Components/Form/Field/Tag/Tag.js +215 -13
- package/src/Components/Form/Field/Tag/ValueBox.js +20 -1
- package/src/Components/Form/Form.js +25 -13
- package/src/Components/Grid/Grid.js +312 -106
- package/src/Components/Grid/GridHeaderRow.js +42 -22
- package/src/Components/Grid/GridRow.js +13 -6
- package/src/Components/Grid/RowHandle.js +16 -4
- package/src/Components/Hoc/withData.js +7 -0
- package/src/Components/Hoc/withEditor.js +19 -4
- package/src/Components/Hoc/withPresetButtons.js +1 -1
- package/src/Components/Hoc/withSideEditor.js +1 -1
- package/src/Components/Icons/Join.js +10 -0
- package/src/Components/Layout/AsyncOperation.js +62 -14
- package/src/Components/Layout/CenterBox.js +1 -1
- package/src/Components/Screens/Manager.js +1 -1
- package/src/Components/Toolbar/PaginationToolbar.js +3 -1
- package/src/Components/Toolbar/Toolbar.js +10 -6
- package/src/Components/Tree/TreeNode.js +38 -9
- package/src/Components/Viewer/Viewer.js +10 -2
- package/src/Constants/Progress.js +2 -1
|
@@ -128,7 +128,7 @@ export default function TreeNode(props) {
|
|
|
128
128
|
'items-center',
|
|
129
129
|
'flex-1',
|
|
130
130
|
'grow-1',
|
|
131
|
-
'select-none',
|
|
131
|
+
!showNodeHandle && 'select-none',
|
|
132
132
|
'cursor-pointer',
|
|
133
133
|
);
|
|
134
134
|
|
|
@@ -169,16 +169,44 @@ export default function TreeNode(props) {
|
|
|
169
169
|
canDrag={nodeCanDrag}
|
|
170
170
|
/>}
|
|
171
171
|
|
|
172
|
-
{hasChildren
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
{hasChildren ?
|
|
173
|
+
<IconButton
|
|
174
|
+
{...testProps('expandBtn')}
|
|
175
|
+
icon={isExpanded ? ChevronDown : ChevronRight}
|
|
176
|
+
_icon={{
|
|
177
|
+
className: clsx(
|
|
178
|
+
'text-gray-400',
|
|
179
|
+
),
|
|
180
|
+
}}
|
|
181
|
+
onPress={(e) => onToggle(datum, e)}
|
|
182
|
+
className={clsx(
|
|
183
|
+
'TreeNode-expandBtn',
|
|
184
|
+
'ml-2',
|
|
185
|
+
styles.TREE_NODE_EXPAND_BTN_CLASSNAME,
|
|
186
|
+
)}
|
|
187
|
+
/> :
|
|
188
|
+
<Box
|
|
189
|
+
{...testProps('spacer')}
|
|
190
|
+
className={clsx(
|
|
191
|
+
'TreeNode-spacer',
|
|
192
|
+
'ml-2',
|
|
193
|
+
styles.TREE_NODE_SPACER_CLASSNAME,
|
|
194
|
+
)}
|
|
195
|
+
/>}
|
|
196
|
+
|
|
179
197
|
{isLoading && <Spinner className="px-2" />}
|
|
180
198
|
|
|
181
|
-
{!isLoading && icon &&
|
|
199
|
+
{!isLoading && icon &&
|
|
200
|
+
<Icon
|
|
201
|
+
as={icon}
|
|
202
|
+
className={clsx(
|
|
203
|
+
'TreeNode-icon',
|
|
204
|
+
'ml-2',
|
|
205
|
+
'mr-1',
|
|
206
|
+
styles.TREE_NODE_ICON_CLASSNAME,
|
|
207
|
+
nodeProps?._icon?.className ?? null,
|
|
208
|
+
)}
|
|
209
|
+
/>}
|
|
182
210
|
|
|
183
211
|
{text && <TextNative
|
|
184
212
|
numberOfLines={1}
|
|
@@ -192,6 +220,7 @@ export default function TreeNode(props) {
|
|
|
192
220
|
'flex-1',
|
|
193
221
|
'text-ellipsis',
|
|
194
222
|
styles.TREE_NODE_CLASSNAME,
|
|
223
|
+
nodeProps?._text?.className ?? null,
|
|
195
224
|
)}
|
|
196
225
|
>{text}</TextNative>}
|
|
197
226
|
|
|
@@ -159,6 +159,13 @@ function Viewer(props) {
|
|
|
159
159
|
}
|
|
160
160
|
if (type?.match(/(Tag|TagEditor)$/)) {
|
|
161
161
|
viewerTypeProps.isViewOnly = true;
|
|
162
|
+
viewerTypeProps.SourceRepository = Repository;
|
|
163
|
+
}
|
|
164
|
+
if (type?.match(/(GridEditor)$/)) {
|
|
165
|
+
viewerTypeProps.disableAdd = true;
|
|
166
|
+
viewerTypeProps.disableEdit = true;
|
|
167
|
+
viewerTypeProps.disableDelete = true;
|
|
168
|
+
viewerTypeProps.disableDuplicate = true;
|
|
162
169
|
}
|
|
163
170
|
const Element = getComponentFromType(type);
|
|
164
171
|
|
|
@@ -253,9 +260,9 @@ function Viewer(props) {
|
|
|
253
260
|
label = propertyDef.title;
|
|
254
261
|
}
|
|
255
262
|
|
|
256
|
-
let value = record?.properties[name]?.displayValue || null;
|
|
263
|
+
let value = record?.properties?.[name]?.displayValue || record?.[name] || null;
|
|
257
264
|
const
|
|
258
|
-
schema = record?.repository
|
|
265
|
+
schema = record?.repository?.getSchema(),
|
|
259
266
|
propertyDefinition = schema?.getPropertyDefinition(name);
|
|
260
267
|
if (propertyDefinition?.isFk) {
|
|
261
268
|
// value above is the id, get the actual display value
|
|
@@ -479,6 +486,7 @@ function Viewer(props) {
|
|
|
479
486
|
'Viewer-VStackNative',
|
|
480
487
|
'h-full',
|
|
481
488
|
'bg-white',
|
|
489
|
+
'[transform:translateZ(0)]', // so embedded FAB will be relative to this container, not to viewport
|
|
482
490
|
);
|
|
483
491
|
if (props.className) {
|
|
484
492
|
className += ' ' + props.className;
|
|
@@ -2,4 +2,5 @@ export const PROGRESS__NONE_FOUND = 'NONE_FOUND';
|
|
|
2
2
|
export const PROGRESS__IN_PROCESS = 'IN_PROCESS';
|
|
3
3
|
export const PROGRESS__COMPLETED = 'COMPLETED';
|
|
4
4
|
export const PROGRESS__FAILED = 'FAILED';
|
|
5
|
-
export const PROGRESS__STUCK = 'STUCK';
|
|
5
|
+
export const PROGRESS__STUCK = 'STUCK';
|
|
6
|
+
export const PROGRESS__UNSTUCK = 'UNSTUCK';
|