@iobroker/adapter-react-v5 6.0.9 → 6.0.10
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/Components/ObjectBrowser.d.ts +6 -1
- package/Components/ObjectBrowser.js +278 -107
- package/README.md +4 -0
- package/i18n/de.json +2 -1
- package/i18n/en.json +2 -1
- package/i18n/es.json +2 -1
- package/i18n/fr.json +2 -1
- package/i18n/it.json +2 -1
- package/i18n/nl.json +2 -1
- package/i18n/pl.json +2 -1
- package/i18n/pt.json +2 -1
- package/i18n/ru.json +2 -1
- package/i18n/uk.json +2 -1
- package/i18n/zh-cn.json +2 -1
- package/package.json +1 -1
|
@@ -181,6 +181,7 @@ interface ObjectBrowserValueProps {
|
|
|
181
181
|
isFloatComma: boolean;
|
|
182
182
|
t: Translate;
|
|
183
183
|
lang: ioBroker.Languages;
|
|
184
|
+
width: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
184
185
|
}
|
|
185
186
|
interface ObjectBrowserEditObjectProps {
|
|
186
187
|
socket: Connection;
|
|
@@ -285,6 +286,7 @@ interface ObjectBrowserState {
|
|
|
285
286
|
loaded: boolean;
|
|
286
287
|
foldersFirst: boolean;
|
|
287
288
|
selected: string[];
|
|
289
|
+
focused: string;
|
|
288
290
|
selectedNonObject: string;
|
|
289
291
|
filter: ObjectBrowserFilter;
|
|
290
292
|
filterKey: number;
|
|
@@ -538,7 +540,10 @@ export declare class ObjectBrowserClass extends Component<ObjectBrowserProps, Ob
|
|
|
538
540
|
*/
|
|
539
541
|
renderLeaf(item: TreeItem, isExpanded: boolean | undefined, counter: {
|
|
540
542
|
count: number;
|
|
541
|
-
}):
|
|
543
|
+
}): {
|
|
544
|
+
row: React.JSX.Element;
|
|
545
|
+
details: React.JSX.Element | null;
|
|
546
|
+
};
|
|
542
547
|
/**
|
|
543
548
|
* Renders an item.
|
|
544
549
|
*/
|
|
@@ -179,6 +179,7 @@ const styles = {
|
|
|
179
179
|
lineHeight: `${ROW_HEIGHT}px`,
|
|
180
180
|
verticalAlign: 'top',
|
|
181
181
|
userSelect: 'none',
|
|
182
|
+
position: 'relative',
|
|
182
183
|
width: '100%',
|
|
183
184
|
'&:hover': {
|
|
184
185
|
background: `${theme.palette.mode === 'dark' ? theme.palette.primary.dark : theme.palette.primary.light} !important`,
|
|
@@ -202,6 +203,17 @@ const styles = {
|
|
|
202
203
|
tableRowAliasReadWrite: {
|
|
203
204
|
height: ROW_HEIGHT + 22,
|
|
204
205
|
},
|
|
206
|
+
tableRowFocused: (theme) => ({
|
|
207
|
+
'&:after': {
|
|
208
|
+
content: '""',
|
|
209
|
+
position: 'absolute',
|
|
210
|
+
top: 1,
|
|
211
|
+
left: 1,
|
|
212
|
+
right: 1,
|
|
213
|
+
bottom: 1,
|
|
214
|
+
border: theme.palette.mode ? '1px dotted #000' : '1px dotted #FFF',
|
|
215
|
+
},
|
|
216
|
+
}),
|
|
205
217
|
checkBox: {
|
|
206
218
|
padding: 0,
|
|
207
219
|
},
|
|
@@ -276,6 +288,12 @@ const styles = {
|
|
|
276
288
|
position: 'absolute',
|
|
277
289
|
right: 3,
|
|
278
290
|
},
|
|
291
|
+
cellCopyButtonInDetails: {
|
|
292
|
+
width: SMALL_BUTTON_SIZE,
|
|
293
|
+
height: SMALL_BUTTON_SIZE,
|
|
294
|
+
top: (ROW_HEIGHT - SMALL_BUTTON_SIZE) / 2,
|
|
295
|
+
opacity: 0.8,
|
|
296
|
+
},
|
|
279
297
|
cellEditButton: {
|
|
280
298
|
width: SMALL_BUTTON_SIZE,
|
|
281
299
|
height: SMALL_BUTTON_SIZE,
|
|
@@ -501,6 +519,18 @@ const styles = {
|
|
|
501
519
|
cellButtonsValueButtonEdit: {
|
|
502
520
|
right: (SMALL_BUTTON_SIZE / 2) + 16,
|
|
503
521
|
},
|
|
522
|
+
cellDetailsLine: {
|
|
523
|
+
display: 'flex',
|
|
524
|
+
alignItems: 'center',
|
|
525
|
+
width: '100%',
|
|
526
|
+
height: 32,
|
|
527
|
+
fontSize: 16,
|
|
528
|
+
},
|
|
529
|
+
cellDetailsName: {
|
|
530
|
+
fontWeight: 'bold',
|
|
531
|
+
marginRight: 8,
|
|
532
|
+
minWidth: 100,
|
|
533
|
+
},
|
|
504
534
|
filteredOut: {
|
|
505
535
|
opacity: 0.5,
|
|
506
536
|
},
|
|
@@ -2270,6 +2300,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
2270
2300
|
selectedNonObject: this.localStorage.getItem(`${props.dialogName || 'App'}.selectedNonObject`) || '',
|
|
2271
2301
|
filter,
|
|
2272
2302
|
filterKey: 0,
|
|
2303
|
+
focused: this.localStorage.getItem(`${props.dialogName || 'App'}.focused`) || '',
|
|
2273
2304
|
depth: 0,
|
|
2274
2305
|
expandAllVisible: false,
|
|
2275
2306
|
expanded,
|
|
@@ -2303,6 +2334,8 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
2303
2334
|
tooltipInfo: null,
|
|
2304
2335
|
};
|
|
2305
2336
|
this.texts = {
|
|
2337
|
+
name: props.t('ra_Name'),
|
|
2338
|
+
categories: props.t('ra_Categories'),
|
|
2306
2339
|
value: props.t('ra_tooltip_value'),
|
|
2307
2340
|
ack: props.t('ra_tooltip_ack'),
|
|
2308
2341
|
ts: props.t('ra_tooltip_ts'),
|
|
@@ -2679,12 +2712,13 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
2679
2712
|
* Called when an item is selected/deselected.
|
|
2680
2713
|
*/
|
|
2681
2714
|
onSelect(toggleItem, isDouble, cb) {
|
|
2715
|
+
this.localStorage.setItem(`${this.props.dialogName || 'App'}.focused`, toggleItem);
|
|
2682
2716
|
if (!this.props.multiSelect) {
|
|
2683
2717
|
if (this.objects[toggleItem] &&
|
|
2684
2718
|
(!this.props.types || this.props.types.includes(this.objects[toggleItem].type))) {
|
|
2685
2719
|
this.localStorage.removeItem(`${this.props.dialogName || 'App'}.selectedNonObject`);
|
|
2686
2720
|
if (this.state.selected[0] !== toggleItem) {
|
|
2687
|
-
this.setState({ selected: [toggleItem], selectedNonObject: '' }, () => {
|
|
2721
|
+
this.setState({ selected: [toggleItem], selectedNonObject: '', focused: toggleItem }, () => {
|
|
2688
2722
|
this.onAfterSelect(isDouble);
|
|
2689
2723
|
cb && cb();
|
|
2690
2724
|
});
|
|
@@ -2695,7 +2729,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
2695
2729
|
}
|
|
2696
2730
|
else {
|
|
2697
2731
|
this.localStorage.setItem(`${this.props.dialogName || 'App'}.selectedNonObject`, toggleItem);
|
|
2698
|
-
this.setState({ selected: [], selectedNonObject: toggleItem }, () => {
|
|
2732
|
+
this.setState({ selected: [], selectedNonObject: toggleItem, focused: toggleItem }, () => {
|
|
2699
2733
|
this.onAfterSelect();
|
|
2700
2734
|
cb && cb();
|
|
2701
2735
|
});
|
|
@@ -2713,7 +2747,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
2713
2747
|
else if (!isDouble) {
|
|
2714
2748
|
selected.splice(pos, 1);
|
|
2715
2749
|
}
|
|
2716
|
-
this.setState({ selected, selectedNonObject: '' }, () => {
|
|
2750
|
+
this.setState({ selected, selectedNonObject: '', focused: toggleItem }, () => {
|
|
2717
2751
|
this.onAfterSelect(isDouble);
|
|
2718
2752
|
cb && cb();
|
|
2719
2753
|
});
|
|
@@ -3500,6 +3534,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3500
3534
|
display: 'flex',
|
|
3501
3535
|
width: '100%',
|
|
3502
3536
|
alignItems: 'center',
|
|
3537
|
+
overflowX: 'auto',
|
|
3503
3538
|
} },
|
|
3504
3539
|
react_1.default.createElement("div", { style: {
|
|
3505
3540
|
display: 'flex',
|
|
@@ -3510,19 +3545,19 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3510
3545
|
react_1.default.createElement("div", null,
|
|
3511
3546
|
react_1.default.createElement(material_1.IconButton, { onClick: () => this.refreshComponent(), disabled: this.state.updating, size: "large" },
|
|
3512
3547
|
react_1.default.createElement(icons_material_1.Refresh, null)))),
|
|
3513
|
-
this.props.showExpertButton && !this.props.expertMode &&
|
|
3548
|
+
this.props.showExpertButton && !this.props.expertMode && react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_expertMode'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3514
3549
|
react_1.default.createElement(material_1.IconButton, { key: "expertMode", color: this.state.filter.expertMode ? 'secondary' : 'default', onClick: () => this.onFilter('expertMode', !this.state.filter.expertMode), size: "large" },
|
|
3515
|
-
react_1.default.createElement(IconExpert_1.default, null)))
|
|
3516
|
-
!this.props.disableColumnSelector &&
|
|
3550
|
+
react_1.default.createElement(IconExpert_1.default, null))),
|
|
3551
|
+
!this.props.disableColumnSelector && this.props.width !== 'xs' && react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Configure'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3517
3552
|
react_1.default.createElement(material_1.IconButton, { key: "columnSelector", color: this.state.columnsAuto ? 'primary' : 'default', onClick: () => this.setState({ columnsSelectorShow: true }), size: "large" },
|
|
3518
|
-
react_1.default.createElement(icons_material_1.ViewColumn, null)))
|
|
3519
|
-
this.state.expandAllVisible &&
|
|
3553
|
+
react_1.default.createElement(icons_material_1.ViewColumn, null))),
|
|
3554
|
+
this.props.width !== 'xs' && this.state.expandAllVisible && react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Expand all nodes'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3520
3555
|
react_1.default.createElement(material_1.IconButton, { key: "expandAll", onClick: () => this.onExpandAll(), size: "large" },
|
|
3521
|
-
react_1.default.createElement(IconOpen_1.default, null)))
|
|
3556
|
+
react_1.default.createElement(IconOpen_1.default, null))),
|
|
3522
3557
|
react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Collapse all nodes'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3523
3558
|
react_1.default.createElement(material_1.IconButton, { key: "collapseAll", onClick: () => this.onCollapseAll(), size: "large" },
|
|
3524
3559
|
react_1.default.createElement(IconClosed_1.default, null))),
|
|
3525
|
-
react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Expand one step node'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3560
|
+
this.props.width !== 'xs' && react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Expand one step node'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3526
3561
|
react_1.default.createElement(material_1.IconButton, { key: "expandVisible", color: "primary", onClick: () => this.onExpandVisible(), size: "large" },
|
|
3527
3562
|
react_1.default.createElement(material_1.Badge, { badgeContent: this.state.depth, color: "secondary", sx: (theme) => ({
|
|
3528
3563
|
badge: {
|
|
@@ -3533,7 +3568,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3533
3568
|
},
|
|
3534
3569
|
}) },
|
|
3535
3570
|
react_1.default.createElement(IconOpen_1.default, null)))),
|
|
3536
|
-
react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Collapse one step node'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3571
|
+
this.props.width !== 'xs' && react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Collapse one step node'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3537
3572
|
react_1.default.createElement(material_1.IconButton, { key: "collapseVisible", color: "primary", onClick: () => this.onCollapseVisible(), size: "large" },
|
|
3538
3573
|
react_1.default.createElement(material_1.Badge, { sx: (theme) => ({
|
|
3539
3574
|
badge: {
|
|
@@ -3544,9 +3579,9 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3544
3579
|
},
|
|
3545
3580
|
}), badgeContent: this.state.depth, color: "secondary" },
|
|
3546
3581
|
react_1.default.createElement(IconClosed_1.default, null)))),
|
|
3547
|
-
this.props.objectStatesView &&
|
|
3582
|
+
this.props.objectStatesView && react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Toggle the states view'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3548
3583
|
react_1.default.createElement(material_1.IconButton, { onClick: () => this.onStatesViewVisible(), size: "large" },
|
|
3549
|
-
react_1.default.createElement(icons_material_1.LooksOne, { color: this.state.statesView ? 'primary' : 'inherit' })))
|
|
3584
|
+
react_1.default.createElement(icons_material_1.LooksOne, { color: this.state.statesView ? 'primary' : 'inherit' }))),
|
|
3550
3585
|
react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Show/Hide object descriptions'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3551
3586
|
react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
3552
3587
|
this.localStorage.setItem(`${this.props.dialogName || 'App'}.desc`, this.state.showDescription ? 'false' : 'true');
|
|
@@ -3576,7 +3611,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3576
3611
|
react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Save objects tree as JSON file'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3577
3612
|
react_1.default.createElement(material_1.IconButton, { onClick: () => this.setState({ showExportDialog: this._getSelectedIdsForExport().length }), size: "large" },
|
|
3578
3613
|
react_1.default.createElement(icons_material_1.Publish, { style: { transform: 'rotate(180deg)' } })))),
|
|
3579
|
-
!!this.props.objectBrowserEditObject &&
|
|
3614
|
+
!!this.props.objectBrowserEditObject && this.props.width !== 'xs' && react_1.default.createElement("div", { style: { display: 'flex', whiteSpace: 'nowrap' } }, `${this.props.t('ra_Objects')}: ${Object.keys(this.info.objects).length}, ${this.props.t('ra_States')}: ${Object.keys(this.info.objects).filter(el => this.info.objects[el].type === 'state').length}`),
|
|
3580
3615
|
this.props.objectEditBoolean && react_1.default.createElement(material_1.Tooltip, { title: this.props.t('ra_Edit custom config'), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
3581
3616
|
react_1.default.createElement(material_1.IconButton, { onClick: () => {
|
|
3582
3617
|
var _b;
|
|
@@ -3794,7 +3829,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3794
3829
|
}
|
|
3795
3830
|
this.setState({ tooltipInfo: { el: valFullRx, id } }, () => cb && cb());
|
|
3796
3831
|
}
|
|
3797
|
-
renderColumnValue(id, item) {
|
|
3832
|
+
renderColumnValue(id, item, narrowStyleWithDetails) {
|
|
3798
3833
|
var _b, _c;
|
|
3799
3834
|
const obj = item.data.obj;
|
|
3800
3835
|
if (!obj || !this.states) {
|
|
@@ -3832,7 +3867,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3832
3867
|
"(",
|
|
3833
3868
|
valText.s,
|
|
3834
3869
|
")"));
|
|
3835
|
-
valTextRx.push(react_1.default.createElement(IconCopy_1.default, { className: "copyButton", style: this.styles.iconCopy, onClick: e => this.onCopy(e, copyText), key: "cc" }));
|
|
3870
|
+
!narrowStyleWithDetails && valTextRx.push(react_1.default.createElement(IconCopy_1.default, { className: "copyButton", style: this.styles.iconCopy, onClick: e => this.onCopy(e, copyText), key: "cc" }));
|
|
3836
3871
|
// <IconEdit className="copyButton" style={{{ ...styles.cellButtonsValueButton, styles.cellButtonsValueButtonEdit)} key="ce" />
|
|
3837
3872
|
info = item.data.state;
|
|
3838
3873
|
}
|
|
@@ -3841,11 +3876,11 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
3841
3876
|
if (!this.state.filter.expertMode && item.data.button) {
|
|
3842
3877
|
val = [react_1.default.createElement(icons_material_1.RoomService, { style: styles.cellValueButton })];
|
|
3843
3878
|
}
|
|
3844
|
-
return react_1.default.createElement(material_1.Tooltip, { key: "value", title: (
|
|
3879
|
+
return react_1.default.createElement(material_1.Tooltip, { key: "value", title: (_c = this.state.tooltipInfo) === null || _c === void 0 ? void 0 : _c.el, componentsProps: {
|
|
3845
3880
|
popper: { sx: styles.cellValueTooltipBox },
|
|
3846
3881
|
tooltip: { sx: styles.cellValueTooltip },
|
|
3847
3882
|
}, onOpen: () => this.getTooltipInfo(id, () => this.readHistory(id)), onClose: () => { var _b; return ((_b = this.state.tooltipInfo) === null || _b === void 0 ? void 0 : _b.id) === id && this.setState({ tooltipInfo: null }); } },
|
|
3848
|
-
react_1.default.createElement(material_1.Box, { component: "div", style: info.style, sx: styles.cellValueText }, val));
|
|
3883
|
+
react_1.default.createElement(material_1.Box, { component: "div", style: info.style, sx: Object.assign(Object.assign({}, styles.cellValueText), { height: narrowStyleWithDetails ? undefined : ROW_HEIGHT }) }, val));
|
|
3849
3884
|
}
|
|
3850
3885
|
_syncEnum(id, enumIds, newArray, cb) {
|
|
3851
3886
|
var _b, _c, _d;
|
|
@@ -4157,7 +4192,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
4157
4192
|
* Renders a leaf.
|
|
4158
4193
|
*/
|
|
4159
4194
|
renderLeaf(item, isExpanded, counter) {
|
|
4160
|
-
var _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
4195
|
+
var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r;
|
|
4161
4196
|
const id = item.data.id;
|
|
4162
4197
|
counter.count++;
|
|
4163
4198
|
isExpanded = isExpanded === undefined ? this.state.expanded.includes(id) : isExpanded;
|
|
@@ -4411,7 +4446,208 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
4411
4446
|
useDesc = !!oTooltip;
|
|
4412
4447
|
}
|
|
4413
4448
|
}
|
|
4414
|
-
|
|
4449
|
+
const narrowStyleWithDetails = this.props.width === 'xs' && this.state.focused === id;
|
|
4450
|
+
const colID = react_1.default.createElement(material_1.Grid, { container: true, wrap: "nowrap", direction: "row", sx: styles.cellId, style: { width: this.columnsVisibility.id, paddingLeft } },
|
|
4451
|
+
react_1.default.createElement(material_1.Grid, { item: true, container: true, alignItems: "center" },
|
|
4452
|
+
checkbox,
|
|
4453
|
+
iconFolder),
|
|
4454
|
+
react_1.default.createElement(material_1.Grid, { item: true, style: Object.assign(Object.assign(Object.assign({}, styles.cellIdSpan), (invertBackground ? this.styles.invertedBackground : undefined)), { color: checkColor, fontWeight: bold ? 'bold' : undefined }) },
|
|
4455
|
+
react_1.default.createElement(material_1.Tooltip, { title: getIdFieldTooltip(item.data, this.props.lang), componentsProps: { popper: { sx: styles.tooltip } } },
|
|
4456
|
+
react_1.default.createElement("div", null, item.data.name)),
|
|
4457
|
+
alias,
|
|
4458
|
+
icons),
|
|
4459
|
+
react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.grow), (invertBackground ? this.styles.invertedBackgroundFlex : {})) }),
|
|
4460
|
+
react_1.default.createElement(material_1.Grid, { item: true, container: true, alignItems: "center" }, iconItem),
|
|
4461
|
+
this.props.width !== 'xs' || narrowStyleWithDetails ? react_1.default.createElement("div", null,
|
|
4462
|
+
react_1.default.createElement(IconCopy_1.default, { className: narrowStyleWithDetails ? '' : 'copyButton', style: styles.cellCopyButton, onClick: e => this.onCopy(e, id) })) : null);
|
|
4463
|
+
let colName = (narrowStyleWithDetails && name) || this.columnsVisibility.name ? react_1.default.createElement(material_1.Box, { component: "div", sx: Object.assign(Object.assign(Object.assign({}, styles.cellName), (useDesc ? styles.cellNameWithDesc : undefined)), { width: this.props.width !== 'xs' ? this.columnsVisibility.name : undefined, ml: narrowStyleWithDetails ? 0 : '5px' }) },
|
|
4464
|
+
name,
|
|
4465
|
+
!narrowStyleWithDetails && ((_g = item.data) === null || _g === void 0 ? void 0 : _g.title) ? react_1.default.createElement(material_1.Box, { style: { color: checkColor } },
|
|
4466
|
+
react_1.default.createElement(IconCopy_1.default, { className: "copyButton", style: styles.cellCopyButton, onClick: e => { var _b; return this.onCopy(e, (_b = item.data) === null || _b === void 0 ? void 0 : _b.title); } })) : null) : null;
|
|
4467
|
+
let colMiddle;
|
|
4468
|
+
if (!this.state.statesView) {
|
|
4469
|
+
colMiddle = [
|
|
4470
|
+
(narrowStyleWithDetails && (obj === null || obj === void 0 ? void 0 : obj.type)) || this.columnsVisibility.type ? {
|
|
4471
|
+
el: react_1.default.createElement("div", { key: "type", style: Object.assign(Object.assign({}, styles.cellType), { width: this.props.width !== 'xs' ? this.columnsVisibility.type : undefined }) },
|
|
4472
|
+
typeImg,
|
|
4473
|
+
"\u00A0", obj === null || obj === void 0 ? void 0 :
|
|
4474
|
+
obj.type),
|
|
4475
|
+
type: 'filter_type',
|
|
4476
|
+
} : null,
|
|
4477
|
+
(narrowStyleWithDetails && common) || this.columnsVisibility.role ? {
|
|
4478
|
+
el: react_1.default.createElement("div", { key: "role", style: Object.assign(Object.assign({}, styles.cellRole), { width: this.props.width !== 'xs' ? this.columnsVisibility.role : '100%', cursor: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole
|
|
4479
|
+
? 'text'
|
|
4480
|
+
: 'default' }), onClick: !narrowStyleWithDetails && this.state.filter.expertMode &&
|
|
4481
|
+
enumEditable && this.props.objectBrowserEditRole
|
|
4482
|
+
? () => this.setState({ roleDialog: item.data.id })
|
|
4483
|
+
: undefined }, common === null || common === void 0 ? void 0 : common.role),
|
|
4484
|
+
type: 'filter_role',
|
|
4485
|
+
onClick: narrowStyleWithDetails && this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole
|
|
4486
|
+
? () => this.setState({ roleDialog: item.data.id })
|
|
4487
|
+
: undefined,
|
|
4488
|
+
} : null,
|
|
4489
|
+
(narrowStyleWithDetails && common) || this.columnsVisibility.room ? {
|
|
4490
|
+
el: react_1.default.createElement("div", { key: "room", style: Object.assign(Object.assign(Object.assign({}, styles.cellRoom), (item.data.per ? styles.cellEnumParent : {})), { width: this.props.width !== 'xs' ? this.columnsVisibility.room : '100%', cursor: enumEditable ? 'text' : 'default' }), onClick: !narrowStyleWithDetails && enumEditable ? () => {
|
|
4491
|
+
const enums = findEnumsForObjectAsIds(this.info, item.data.id, 'roomEnums');
|
|
4492
|
+
this.setState({
|
|
4493
|
+
enumDialogEnums: enums,
|
|
4494
|
+
enumDialog: {
|
|
4495
|
+
item,
|
|
4496
|
+
type: 'room',
|
|
4497
|
+
enumsOriginal: JSON.stringify(enums),
|
|
4498
|
+
},
|
|
4499
|
+
});
|
|
4500
|
+
} : undefined }, item.data.rooms),
|
|
4501
|
+
type: 'filter_room',
|
|
4502
|
+
onClick: narrowStyleWithDetails && enumEditable ? () => {
|
|
4503
|
+
const enums = findEnumsForObjectAsIds(this.info, item.data.id, 'roomEnums');
|
|
4504
|
+
this.setState({
|
|
4505
|
+
enumDialogEnums: enums,
|
|
4506
|
+
enumDialog: {
|
|
4507
|
+
item,
|
|
4508
|
+
type: 'room',
|
|
4509
|
+
enumsOriginal: JSON.stringify(enums),
|
|
4510
|
+
},
|
|
4511
|
+
});
|
|
4512
|
+
} : undefined,
|
|
4513
|
+
} : null,
|
|
4514
|
+
(narrowStyleWithDetails && common) || this.columnsVisibility.func ? {
|
|
4515
|
+
el: react_1.default.createElement("div", { key: "func", style: Object.assign(Object.assign(Object.assign({}, styles.cellFunc), (item.data.pef ? styles.cellEnumParent : {})), { width: this.props.width !== 'xs' ? this.columnsVisibility.func : '100%', cursor: enumEditable ? 'text' : 'default' }), onClick: !narrowStyleWithDetails && enumEditable ? () => {
|
|
4516
|
+
const enums = findEnumsForObjectAsIds(this.info, item.data.id, 'funcEnums');
|
|
4517
|
+
this.setState({
|
|
4518
|
+
enumDialogEnums: enums,
|
|
4519
|
+
enumDialog: {
|
|
4520
|
+
item,
|
|
4521
|
+
type: 'func',
|
|
4522
|
+
enumsOriginal: JSON.stringify(enums),
|
|
4523
|
+
},
|
|
4524
|
+
});
|
|
4525
|
+
} : undefined }, item.data.funcs),
|
|
4526
|
+
type: 'filter_func',
|
|
4527
|
+
onClick: narrowStyleWithDetails && enumEditable ? () => {
|
|
4528
|
+
const enums = findEnumsForObjectAsIds(this.info, item.data.id, 'funcEnums');
|
|
4529
|
+
this.setState({
|
|
4530
|
+
enumDialogEnums: enums,
|
|
4531
|
+
enumDialog: {
|
|
4532
|
+
item,
|
|
4533
|
+
type: 'func',
|
|
4534
|
+
enumsOriginal: JSON.stringify(enums),
|
|
4535
|
+
},
|
|
4536
|
+
});
|
|
4537
|
+
} : undefined,
|
|
4538
|
+
} : null,
|
|
4539
|
+
];
|
|
4540
|
+
}
|
|
4541
|
+
else {
|
|
4542
|
+
colMiddle = [
|
|
4543
|
+
(narrowStyleWithDetails && checkVisibleObjectType && ((_h = this.states[id]) === null || _h === void 0 ? void 0 : _h.from)) || this.columnsVisibility.changedFrom ? {
|
|
4544
|
+
el: react_1.default.createElement("div", { key: "from", style: Object.assign(Object.assign({}, styles.cellRole), { width: this.props.width !== 'xs' ? this.columnsVisibility.changedFrom : undefined }), title: newValueTitle.join('\n') }, checkVisibleObjectType && ((_j = this.states[id]) === null || _j === void 0 ? void 0 : _j.from) ? newValue : null),
|
|
4545
|
+
type: 'from',
|
|
4546
|
+
} : null,
|
|
4547
|
+
(narrowStyleWithDetails && q) || this.columnsVisibility.qualityCode ? {
|
|
4548
|
+
el: react_1.default.createElement("div", { key: "q", style: Object.assign(Object.assign({}, styles.cellRole), { width: this.props.width !== 'xs' ? this.columnsVisibility.qualityCode : undefined }), title: q || '' }, q),
|
|
4549
|
+
type: 'quality',
|
|
4550
|
+
} : null,
|
|
4551
|
+
(narrowStyleWithDetails && checkVisibleObjectType && ((_k = this.states[id]) === null || _k === void 0 ? void 0 : _k.ts)) || this.columnsVisibility.timestamp ? {
|
|
4552
|
+
el: react_1.default.createElement("div", { key: "ts", style: Object.assign(Object.assign({}, styles.cellRole), { width: this.props.width !== 'xs' ? this.columnsVisibility.timestamp : undefined }) }, checkVisibleObjectType && ((_l = this.states[id]) === null || _l === void 0 ? void 0 : _l.ts)
|
|
4553
|
+
? Utils_1.default.formatDate(new Date(this.states[id].ts), this.props.dateFormat || this.systemConfig.common.dateFormat)
|
|
4554
|
+
: null),
|
|
4555
|
+
type: 'ts',
|
|
4556
|
+
} : null,
|
|
4557
|
+
(narrowStyleWithDetails && checkVisibleObjectType && ((_m = this.states[id]) === null || _m === void 0 ? void 0 : _m.lc)) || this.columnsVisibility.lastChange ? {
|
|
4558
|
+
el: react_1.default.createElement("div", { key: "lc", style: Object.assign(Object.assign({}, styles.cellRole), { width: this.props.width !== 'xs' ? this.columnsVisibility.lastChange : undefined }) }, checkVisibleObjectType && ((_o = this.states[id]) === null || _o === void 0 ? void 0 : _o.lc)
|
|
4559
|
+
? Utils_1.default.formatDate(new Date(this.states[id].lc), this.props.dateFormat || this.systemConfig.common.dateFormat)
|
|
4560
|
+
: null),
|
|
4561
|
+
type: 'lc',
|
|
4562
|
+
} : null,
|
|
4563
|
+
];
|
|
4564
|
+
}
|
|
4565
|
+
let colCustom = ((_p = this.adapterColumns) === null || _p === void 0 ? void 0 : _p.map(it => react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellAdapter), { width: this.props.width !== 'xs' ? this.columnsVisibility[it.id] : undefined }), key: it.id, title: `${it.adapter} => ${it.pathText}` }, obj ? this.renderCustomValue(obj, it, item) : null))) || null;
|
|
4566
|
+
const columnValue = narrowStyleWithDetails || this.columnsVisibility.val ? this.renderColumnValue(id, item, narrowStyleWithDetails) : null;
|
|
4567
|
+
let colValue = (narrowStyleWithDetails && columnValue) || this.columnsVisibility.val ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellValue), { width: this.props.width !== 'xs' ? this.columnsVisibility.val : undefined, cursor: valueEditable ? ((common === null || common === void 0 ? void 0 : common.type) === 'file' ? 'zoom-in' : (item.data.button ? 'grab' : 'text')) : 'default' }), onClick: valueEditable ? () => {
|
|
4568
|
+
if (!obj || !this.states) {
|
|
4569
|
+
// return;
|
|
4570
|
+
}
|
|
4571
|
+
else if ((common === null || common === void 0 ? void 0 : common.type) === 'file') {
|
|
4572
|
+
this.setState({ viewFileDialog: id });
|
|
4573
|
+
// eslint-disable-next-line brace-style
|
|
4574
|
+
}
|
|
4575
|
+
else if (!this.state.filter.expertMode && item.data.button) {
|
|
4576
|
+
// in non-expert mode control button directly
|
|
4577
|
+
this.props.socket
|
|
4578
|
+
.setState(id, true)
|
|
4579
|
+
.catch(e => window.alert(`Cannot write state "${id}": ${e}`));
|
|
4580
|
+
}
|
|
4581
|
+
else {
|
|
4582
|
+
this.edit = {
|
|
4583
|
+
val: this.states[id] ? this.states[id].val : '',
|
|
4584
|
+
q: this.states[id] ? this.states[id].q || 0 : 0,
|
|
4585
|
+
ack: false,
|
|
4586
|
+
id,
|
|
4587
|
+
};
|
|
4588
|
+
this.setState({ updateOpened: true });
|
|
4589
|
+
}
|
|
4590
|
+
} : undefined }, columnValue) : null;
|
|
4591
|
+
let colButtons = narrowStyleWithDetails || this.columnsVisibility.buttons ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellButtons), { width: this.props.width !== 'xs' ? this.columnsVisibility.buttons : undefined }) }, this.renderColumnButtons(id, item)) : null;
|
|
4592
|
+
let colDetails = null;
|
|
4593
|
+
if (this.props.width === 'xs' && this.state.focused === id) {
|
|
4594
|
+
colMiddle = colMiddle.filter(a => a);
|
|
4595
|
+
let renderedMiddle;
|
|
4596
|
+
if (!colMiddle.length) {
|
|
4597
|
+
renderedMiddle = null;
|
|
4598
|
+
}
|
|
4599
|
+
else {
|
|
4600
|
+
renderedMiddle = colMiddle.map(it => react_1.default.createElement("div", { style: styles.cellDetailsLine },
|
|
4601
|
+
react_1.default.createElement("span", { style: styles.cellDetailsName },
|
|
4602
|
+
this.texts[it.type],
|
|
4603
|
+
":"),
|
|
4604
|
+
it.el,
|
|
4605
|
+
react_1.default.createElement("div", { style: { flexGrow: 1 } }),
|
|
4606
|
+
it.onClick ? react_1.default.createElement(icons_material_1.Edit, { style: styles.cellCopyButtonInDetails, onClick: () => it.onClick() }) : null));
|
|
4607
|
+
}
|
|
4608
|
+
if (!colCustom.length) {
|
|
4609
|
+
colCustom = null;
|
|
4610
|
+
}
|
|
4611
|
+
colDetails = react_1.default.createElement(material_1.Paper, { style: {
|
|
4612
|
+
width: '100%',
|
|
4613
|
+
display: 'flex',
|
|
4614
|
+
flexDirection: 'column',
|
|
4615
|
+
padding: 10,
|
|
4616
|
+
backgroundColor: this.props.theme.palette.mode === 'dark' ? '#333' : '#ccc',
|
|
4617
|
+
} },
|
|
4618
|
+
colName && react_1.default.createElement("div", { style: styles.cellDetailsLine },
|
|
4619
|
+
react_1.default.createElement("span", { style: styles.cellDetailsName },
|
|
4620
|
+
this.texts.name,
|
|
4621
|
+
":"),
|
|
4622
|
+
colName,
|
|
4623
|
+
react_1.default.createElement("div", { style: { flexGrow: 1 } }),
|
|
4624
|
+
((_q = item.data) === null || _q === void 0 ? void 0 : _q.title) ? react_1.default.createElement(IconCopy_1.default, { className: "copyButton", style: styles.cellCopyButtonInDetails, onClick: e => { var _b; return this.onCopy(e, (_b = item.data) === null || _b === void 0 ? void 0 : _b.title); } }) : null),
|
|
4625
|
+
renderedMiddle,
|
|
4626
|
+
colCustom && react_1.default.createElement("div", { style: styles.cellDetailsLine }, colCustom),
|
|
4627
|
+
((_r = this.objects[id]) === null || _r === void 0 ? void 0 : _r.type) === 'state' && react_1.default.createElement("div", { style: styles.cellDetailsLine },
|
|
4628
|
+
react_1.default.createElement("span", { style: styles.cellDetailsName },
|
|
4629
|
+
this.texts.value,
|
|
4630
|
+
":"),
|
|
4631
|
+
colValue,
|
|
4632
|
+
react_1.default.createElement("div", { style: { flexGrow: 1 } }),
|
|
4633
|
+
react_1.default.createElement(IconCopy_1.default, { className: "copyButton", style: styles.cellCopyButtonInDetails, onClick: e => {
|
|
4634
|
+
const { valText } = formatValue({
|
|
4635
|
+
state: this.states[id],
|
|
4636
|
+
obj: this.objects[id],
|
|
4637
|
+
texts: this.texts,
|
|
4638
|
+
dateFormat: this.props.dateFormat || this.systemConfig.common.dateFormat,
|
|
4639
|
+
isFloatComma: this.props.isFloatComma === undefined ? this.systemConfig.common.isFloatComma : this.props.isFloatComma,
|
|
4640
|
+
});
|
|
4641
|
+
this.onCopy(e, valText.v.toString());
|
|
4642
|
+
}, key: "cc" })),
|
|
4643
|
+
colButtons && react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellDetailsLine), { justifyContent: 'right' }) }, colButtons));
|
|
4644
|
+
colName = null;
|
|
4645
|
+
colMiddle = null;
|
|
4646
|
+
colCustom = null;
|
|
4647
|
+
colValue = null;
|
|
4648
|
+
colButtons = null;
|
|
4649
|
+
}
|
|
4650
|
+
const row = react_1.default.createElement(material_1.Grid, { container: true, direction: "row", wrap: "nowrap", sx: Utils_1.default.getStyle(this.props.theme, styles.tableRow, this.state.linesEnabled && styles.tableRowLines, !this.props.dragEnabled && styles.tableRowNoDragging, alias && styles.tableRowAlias, readWriteAlias && styles.tableRowAliasReadWrite, this.state.focused === id && this.props.multiSelect && styles.tableRowFocused, !item.data.visible && styles.filteredOut, item.data.hasVisibleParent &&
|
|
4415
4651
|
!item.data.visible &&
|
|
4416
4652
|
!item.data.hasVisibleChildren &&
|
|
4417
4653
|
styles.filteredParentOut, this.state.selected.includes(id) && styles.itemSelected, this.state.selectedNonObject === id && styles.itemSelected), key: id, id: id, onMouseDown: e => {
|
|
@@ -4442,89 +4678,13 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
4442
4678
|
this.toggleExpanded(id);
|
|
4443
4679
|
}
|
|
4444
4680
|
} },
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
alias,
|
|
4453
|
-
icons),
|
|
4454
|
-
react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.grow), (invertBackground ? this.styles.invertedBackgroundFlex : {})) }),
|
|
4455
|
-
react_1.default.createElement(material_1.Grid, { item: true, container: true, alignItems: "center" }, iconItem),
|
|
4456
|
-
react_1.default.createElement("div", null,
|
|
4457
|
-
react_1.default.createElement(IconCopy_1.default, { className: "copyButton", style: styles.cellCopyButton, onClick: e => this.onCopy(e, id) }))),
|
|
4458
|
-
this.columnsVisibility.name ? react_1.default.createElement(material_1.Box, { component: "div", sx: Object.assign(Object.assign(Object.assign({}, styles.cellName), (useDesc ? styles.cellNameWithDesc : undefined)), { width: this.columnsVisibility.name }) },
|
|
4459
|
-
name,
|
|
4460
|
-
((_g = item.data) === null || _g === void 0 ? void 0 : _g.title) ? react_1.default.createElement(material_1.Box, { style: { color: checkColor } },
|
|
4461
|
-
react_1.default.createElement(IconCopy_1.default, { className: "copyButton", style: styles.cellCopyButton, onClick: e => { var _b; return this.onCopy(e, (_b = item.data) === null || _b === void 0 ? void 0 : _b.title); } })) : null) : null,
|
|
4462
|
-
!this.state.statesView ? react_1.default.createElement(react_1.default.Fragment, null,
|
|
4463
|
-
this.columnsVisibility.type ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellType), { width: this.columnsVisibility.type }) },
|
|
4464
|
-
typeImg,
|
|
4465
|
-
"\u00A0",
|
|
4466
|
-
obj && obj.type) : null,
|
|
4467
|
-
this.columnsVisibility.role ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellRole), { width: this.columnsVisibility.role, cursor: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole
|
|
4468
|
-
? 'text'
|
|
4469
|
-
: 'default' }), onClick: this.state.filter.expertMode && enumEditable && this.props.objectBrowserEditRole
|
|
4470
|
-
? () => this.setState({ roleDialog: item.data.id })
|
|
4471
|
-
: undefined }, common === null || common === void 0 ? void 0 : common.role) : null,
|
|
4472
|
-
this.columnsVisibility.room ? react_1.default.createElement("div", { style: Object.assign(Object.assign(Object.assign({}, styles.cellRoom), (item.data.per ? styles.cellEnumParent : {})), { width: this.columnsVisibility.room, cursor: enumEditable ? 'text' : 'default' }), onClick: enumEditable ? () => {
|
|
4473
|
-
const enums = findEnumsForObjectAsIds(this.info, item.data.id, 'roomEnums');
|
|
4474
|
-
this.setState({
|
|
4475
|
-
enumDialogEnums: enums,
|
|
4476
|
-
enumDialog: {
|
|
4477
|
-
item,
|
|
4478
|
-
type: 'room',
|
|
4479
|
-
enumsOriginal: JSON.stringify(enums),
|
|
4480
|
-
},
|
|
4481
|
-
});
|
|
4482
|
-
} : undefined }, item.data.rooms) : null,
|
|
4483
|
-
this.columnsVisibility.func ? react_1.default.createElement("div", { style: Object.assign(Object.assign(Object.assign({}, styles.cellFunc), (item.data.pef ? styles.cellEnumParent : {})), { width: this.columnsVisibility.func, cursor: enumEditable ? 'text' : 'default' }), onClick: enumEditable ? () => {
|
|
4484
|
-
const enums = findEnumsForObjectAsIds(this.info, item.data.id, 'funcEnums');
|
|
4485
|
-
this.setState({
|
|
4486
|
-
enumDialogEnums: enums,
|
|
4487
|
-
enumDialog: {
|
|
4488
|
-
item,
|
|
4489
|
-
type: 'func',
|
|
4490
|
-
enumsOriginal: JSON.stringify(enums),
|
|
4491
|
-
},
|
|
4492
|
-
});
|
|
4493
|
-
} : undefined }, item.data.funcs) : null) : react_1.default.createElement(react_1.default.Fragment, null,
|
|
4494
|
-
this.columnsVisibility.changedFrom ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellRole), { width: this.columnsVisibility.changedFrom }), title: newValueTitle.join('\n') }, checkVisibleObjectType && ((_h = this.states[id]) === null || _h === void 0 ? void 0 : _h.from) ? newValue : null) : null,
|
|
4495
|
-
this.columnsVisibility.qualityCode ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellRole), { width: this.columnsVisibility.qualityCode }), title: q || '' }, q) : null,
|
|
4496
|
-
this.columnsVisibility.timestamp ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellRole), { width: this.columnsVisibility.timestamp }) }, checkVisibleObjectType && ((_j = this.states[id]) === null || _j === void 0 ? void 0 : _j.ts)
|
|
4497
|
-
? Utils_1.default.formatDate(new Date(this.states[id].ts), this.props.dateFormat || this.systemConfig.common.dateFormat)
|
|
4498
|
-
: null) : null,
|
|
4499
|
-
this.columnsVisibility.lastChange ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellRole), { width: this.columnsVisibility.lastChange }) }, checkVisibleObjectType && ((_k = this.states[id]) === null || _k === void 0 ? void 0 : _k.lc)
|
|
4500
|
-
? Utils_1.default.formatDate(new Date(this.states[id].lc), this.props.dateFormat || this.systemConfig.common.dateFormat)
|
|
4501
|
-
: null) : null),
|
|
4502
|
-
this.adapterColumns.map(it => react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellAdapter), { width: this.columnsVisibility[it.id] }), key: it.id, title: `${it.adapter} => ${it.pathText}` }, obj ? this.renderCustomValue(obj, it, item) : null)),
|
|
4503
|
-
this.columnsVisibility.val ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellValue), { width: this.columnsVisibility.val, cursor: valueEditable ? ((common === null || common === void 0 ? void 0 : common.type) === 'file' ? 'zoom-in' : (item.data.button ? 'grab' : 'text')) : 'default' }), onClick: valueEditable ? () => {
|
|
4504
|
-
if (!obj || !this.states) {
|
|
4505
|
-
// return;
|
|
4506
|
-
}
|
|
4507
|
-
else if ((common === null || common === void 0 ? void 0 : common.type) === 'file') {
|
|
4508
|
-
this.setState({ viewFileDialog: id });
|
|
4509
|
-
// eslint-disable-next-line brace-style
|
|
4510
|
-
}
|
|
4511
|
-
else if (!this.state.filter.expertMode && item.data.button) {
|
|
4512
|
-
// in non-expert mode control button directly
|
|
4513
|
-
this.props.socket
|
|
4514
|
-
.setState(id, true)
|
|
4515
|
-
.catch(e => window.alert(`Cannot write state "${id}": ${e}`));
|
|
4516
|
-
}
|
|
4517
|
-
else {
|
|
4518
|
-
this.edit = {
|
|
4519
|
-
val: this.states[id] ? this.states[id].val : '',
|
|
4520
|
-
q: this.states[id] ? this.states[id].q || 0 : 0,
|
|
4521
|
-
ack: false,
|
|
4522
|
-
id,
|
|
4523
|
-
};
|
|
4524
|
-
this.setState({ updateOpened: true });
|
|
4525
|
-
}
|
|
4526
|
-
} : undefined }, this.renderColumnValue(id, item)) : null,
|
|
4527
|
-
this.columnsVisibility.buttons ? react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.cellButtons), { width: this.columnsVisibility.buttons }) }, this.renderColumnButtons(id, item)) : null);
|
|
4681
|
+
colID,
|
|
4682
|
+
colName, colMiddle === null || colMiddle === void 0 ? void 0 :
|
|
4683
|
+
colMiddle.map(it => it === null || it === void 0 ? void 0 : it.el),
|
|
4684
|
+
colCustom,
|
|
4685
|
+
colValue,
|
|
4686
|
+
colButtons);
|
|
4687
|
+
return { row, details: colDetails };
|
|
4528
4688
|
}
|
|
4529
4689
|
/**
|
|
4530
4690
|
* Renders an item.
|
|
@@ -4532,18 +4692,25 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
4532
4692
|
renderItem(root, isExpanded, counter) {
|
|
4533
4693
|
const items = [];
|
|
4534
4694
|
counter = counter || { count: 0 };
|
|
4535
|
-
|
|
4695
|
+
const result = this.renderLeaf(root, isExpanded, counter);
|
|
4696
|
+
let leaf;
|
|
4536
4697
|
const DragWrapper = this.props.DragWrapper;
|
|
4537
4698
|
if (this.props.dragEnabled && DragWrapper) {
|
|
4538
4699
|
if (root.data.sumVisibility) {
|
|
4539
|
-
leaf = react_1.default.createElement(DragWrapper, { key: root.data.id, item: root, style: styles.draggable },
|
|
4700
|
+
leaf = react_1.default.createElement(DragWrapper, { key: root.data.id, item: root, style: styles.draggable }, result.row);
|
|
4540
4701
|
}
|
|
4541
4702
|
else {
|
|
4542
4703
|
// change cursor
|
|
4543
|
-
leaf = react_1.default.createElement("div", { key: root.data.id, style: styles.nonDraggable },
|
|
4704
|
+
leaf = react_1.default.createElement("div", { key: root.data.id, style: styles.nonDraggable }, result.row);
|
|
4544
4705
|
}
|
|
4545
4706
|
}
|
|
4707
|
+
else {
|
|
4708
|
+
leaf = result.row;
|
|
4709
|
+
}
|
|
4546
4710
|
root.data.id && leaf && items.push(leaf);
|
|
4711
|
+
if (result.details) {
|
|
4712
|
+
items.push(result.details);
|
|
4713
|
+
}
|
|
4547
4714
|
isExpanded = isExpanded === undefined ? binarySearch(this.state.expanded, root.data.id) : isExpanded;
|
|
4548
4715
|
if (!root.data.id || isExpanded) {
|
|
4549
4716
|
if (!this.state.foldersFirst) {
|
|
@@ -4815,6 +4982,10 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
4815
4982
|
react_1.default.createElement(IconClearFilter_1.default, null),
|
|
4816
4983
|
react_1.default.createElement(icons_material_1.Close, { style: styles.buttonClearFilterIcon }));
|
|
4817
4984
|
}
|
|
4985
|
+
if (this.props.width === 'xs') {
|
|
4986
|
+
return react_1.default.createElement("div", { style: styles.headerRow },
|
|
4987
|
+
react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.headerCell), { width: '100%' }) }, this.getFilterInput('id')));
|
|
4988
|
+
}
|
|
4818
4989
|
return react_1.default.createElement("div", { style: styles.headerRow },
|
|
4819
4990
|
react_1.default.createElement("div", { style: Object.assign(Object.assign({}, styles.headerCell), { width: this.columnsVisibility.id, position: 'relative' }), "data-min": 240, "data-name": "id" },
|
|
4820
4991
|
this.getFilterInput('id'),
|
|
@@ -5302,7 +5473,7 @@ class ObjectBrowserClass extends react_1.Component {
|
|
|
5302
5473
|
return react_1.default.createElement(ObjectBrowserValue, { t: this.props.t, lang: this.props.lang, type: type, role: role || '', states: Utils_1.default.getStates(this.objects[this.edit.id]), themeType: this.props.themeType, theme: this.props.theme, expertMode: !!this.state.filter.expertMode, value: this.edit.val, socket: this.props.socket, object: this.objects[this.edit.id], defaultHistory: this.defaultHistory, dateFormat: this.props.dateFormat || this.systemConfig.common.dateFormat, isFloatComma: this.props.isFloatComma === undefined ? this.systemConfig.common.isFloatComma : this.props.isFloatComma, onClose: (res) => {
|
|
5303
5474
|
this.setState({ updateOpened: false });
|
|
5304
5475
|
res && this.onUpdate(res);
|
|
5305
|
-
} });
|
|
5476
|
+
}, width: this.props.width });
|
|
5306
5477
|
}
|
|
5307
5478
|
/**
|
|
5308
5479
|
* The rendering method of this component.
|
package/README.md
CHANGED
|
@@ -771,6 +771,10 @@ The best practice is to replace `padding` with `p` and `margin` with `m`, so you
|
|
|
771
771
|
-->
|
|
772
772
|
|
|
773
773
|
## Changelog
|
|
774
|
+
### 6.0.10 (2024-06-27)
|
|
775
|
+
* (bluefox) Added translation
|
|
776
|
+
* (bluefox) Mobile object browser improved
|
|
777
|
+
|
|
774
778
|
### 6.0.9 (2024-06-26)
|
|
775
779
|
* (bluefox) Corrected Icons
|
|
776
780
|
|
package/i18n/de.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Erweiterte Optionen",
|
|
426
426
|
"sc_everyN_dow": "jeden x-ten Tag der Woche",
|
|
427
427
|
"sc_every_dow": "jeden Tag der Woche",
|
|
428
|
-
"sc_specific_dow": "bestimmte(r) Tag(e) der Woche"
|
|
428
|
+
"sc_specific_dow": "bestimmte(r) Tag(e) der Woche",
|
|
429
|
+
"ra_Name": "Name"
|
|
429
430
|
}
|
package/i18n/en.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_create_boolean_state": "Create boolean state",
|
|
426
426
|
"ra_Select color": "Select color",
|
|
427
427
|
"ra_Cannot read licenses: %s": "Cannot read licenses: %s",
|
|
428
|
-
"ra_Advanced options": "Advanced options"
|
|
428
|
+
"ra_Advanced options": "Advanced options",
|
|
429
|
+
"ra_Name": "Name"
|
|
429
430
|
}
|
package/i18n/es.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Opciones avanzadas",
|
|
426
426
|
"sc_everyN_dow": "cada enésimo día de la semana",
|
|
427
427
|
"sc_every_dow": "Cada día de la semana",
|
|
428
|
-
"sc_specific_dow": "día(s) específico(s) de la semana"
|
|
428
|
+
"sc_specific_dow": "día(s) específico(s) de la semana",
|
|
429
|
+
"ra_Name": "Nombre"
|
|
429
430
|
}
|
package/i18n/fr.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Options avancées",
|
|
426
426
|
"sc_everyN_dow": "chaque Nième jour de la semaine",
|
|
427
427
|
"sc_every_dow": "Chaque jour de la semaine",
|
|
428
|
-
"sc_specific_dow": "jour(s) spécifique(s) de la semaine"
|
|
428
|
+
"sc_specific_dow": "jour(s) spécifique(s) de la semaine",
|
|
429
|
+
"ra_Name": "Nom"
|
|
429
430
|
}
|
package/i18n/it.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Opzioni avanzate",
|
|
426
426
|
"sc_everyN_dow": "ogni Nesimo giorno della settimana",
|
|
427
427
|
"sc_every_dow": "Tutti i giorni della settimana",
|
|
428
|
-
"sc_specific_dow": "giorno/i specifico/i della settimana"
|
|
428
|
+
"sc_specific_dow": "giorno/i specifico/i della settimana",
|
|
429
|
+
"ra_Name": "Nome"
|
|
429
430
|
}
|
package/i18n/nl.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Geavanceerde mogelijkheden",
|
|
426
426
|
"sc_everyN_dow": "elke N-de dag van de week",
|
|
427
427
|
"sc_every_dow": "elke dag van de week",
|
|
428
|
-
"sc_specific_dow": "specifieke dag(en) van de week"
|
|
428
|
+
"sc_specific_dow": "specifieke dag(en) van de week",
|
|
429
|
+
"ra_Name": "Naam"
|
|
429
430
|
}
|
package/i18n/pl.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Zaawansowane opcje",
|
|
426
426
|
"sc_everyN_dow": "w każdy N-ty dzień tygodnia",
|
|
427
427
|
"sc_every_dow": "każdy dzień tygodnia",
|
|
428
|
-
"sc_specific_dow": "określone dni tygodnia"
|
|
428
|
+
"sc_specific_dow": "określone dni tygodnia",
|
|
429
|
+
"ra_Name": "Nazwa"
|
|
429
430
|
}
|
package/i18n/pt.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Opções avançadas",
|
|
426
426
|
"sc_everyN_dow": "todo enésimo dia da semana",
|
|
427
427
|
"sc_every_dow": "todos os dias da semana",
|
|
428
|
-
"sc_specific_dow": "dia(s) específico(s) da semana"
|
|
428
|
+
"sc_specific_dow": "dia(s) específico(s) da semana",
|
|
429
|
+
"ra_Name": "Nome"
|
|
429
430
|
}
|
package/i18n/ru.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Расширенные настройки",
|
|
426
426
|
"sc_everyN_dow": "каждый N-й день недели",
|
|
427
427
|
"sc_every_dow": "Каждый день недели",
|
|
428
|
-
"sc_specific_dow": "конкретный день(а) недели"
|
|
428
|
+
"sc_specific_dow": "конкретный день(а) недели",
|
|
429
|
+
"ra_Name": "Имя"
|
|
429
430
|
}
|
package/i18n/uk.json
CHANGED
|
@@ -425,5 +425,6 @@
|
|
|
425
425
|
"ra_Advanced options": "Розширені опції",
|
|
426
426
|
"sc_everyN_dow": "кожен N-й день тижня",
|
|
427
427
|
"sc_every_dow": "кожен день тижня",
|
|
428
|
-
"sc_specific_dow": "конкретний день (дні) тижня"
|
|
428
|
+
"sc_specific_dow": "конкретний день (дні) тижня",
|
|
429
|
+
"ra_Name": "Ім'я"
|
|
429
430
|
}
|
package/i18n/zh-cn.json
CHANGED