@iobroker/adapter-react-v5 3.1.23 → 3.1.26
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/404.d.ts +3 -0
- package/Components/ColorPicker.d.ts +138 -0
- package/Components/ComplexCron.d.ts +8 -0
- package/Components/CustomModal.d.ts +3 -0
- package/Components/FileBrowser.d.ts +125 -0
- package/Components/FileBrowser.js +26 -9
- package/Components/FileBrowser.js.map +1 -1
- package/Components/FileViewer.d.ts +80 -0
- package/Components/FileViewer.js +27 -22
- package/Components/FileViewer.js.map +1 -1
- package/Components/Icon.d.ts +21 -0
- package/Components/IconPicker.d.ts +64 -0
- package/Components/IconSelector.d.ts +25 -0
- package/Components/Image.d.ts +64 -0
- package/Components/JsonConfigComponent/ChipInput.d.ts +13 -0
- package/Components/JsonConfigComponent/ConfigAlive.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigAutocomplete.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigAutocompleteSendTo.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCRON.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigCertificateSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCheckbox.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigChip.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigColor.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCoordinates.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigCustom.d.ts +26 -0
- package/Components/JsonConfigComponent/ConfigDatePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigFile.d.ts +15 -0
- package/Components/JsonConfigComponent/ConfigFileSelector.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigFunc.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigGeneric.d.ts +71 -0
- package/Components/JsonConfigComponent/ConfigIP.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigImageUpload.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigInstanceSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigJsonEditor.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigLanguage.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigNumber.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigObjectId.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigPanel.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigPassword.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigPattern.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigRoom.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSelect.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigSelectSendTo.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigSendto.d.ts +18 -0
- package/Components/JsonConfigComponent/ConfigSendto.js +171 -9
- package/Components/JsonConfigComponent/ConfigSendto.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigSetState.d.ts +18 -0
- package/Components/JsonConfigComponent/ConfigSlider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticDivider.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticHeader.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticImage.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigStaticText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigTable.d.ts +3 -0
- package/Components/JsonConfigComponent/ConfigTabs.d.ts +33 -0
- package/Components/JsonConfigComponent/ConfigText.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigText.js +24 -3
- package/Components/JsonConfigComponent/ConfigText.js.map +1 -1
- package/Components/JsonConfigComponent/ConfigTextSendTo.d.ts +10 -0
- package/Components/JsonConfigComponent/ConfigTimePicker.d.ts +14 -0
- package/Components/JsonConfigComponent/ConfigTopic.d.ts +17 -0
- package/Components/JsonConfigComponent/ConfigUser.d.ts +14 -0
- package/Components/JsonConfigComponent/index.d.ts +27 -0
- package/Components/JsonConfigComponent/index.js +21 -17
- package/Components/JsonConfigComponent/index.js.map +1 -1
- package/Components/Loader.d.ts +37 -0
- package/Components/Loaders/PT.d.ts +41 -0
- package/Components/Loaders/Vendor.d.ts +41 -0
- package/Components/Logo.d.ts +59 -0
- package/Components/MDUtils.d.ts +12 -0
- package/Components/ObjectBrowser.d.ts +632 -0
- package/Components/ObjectBrowser.js +315 -449
- package/Components/ObjectBrowser.js.map +1 -1
- package/Components/Router.d.ts +35 -0
- package/Components/SaveCloseButtons.d.ts +64 -0
- package/Components/Schedule.d.ts +7 -0
- package/Components/SelectWithIcon.d.ts +21 -0
- package/Components/SimpleCron/cron2text.d.ts +8 -0
- package/Components/SimpleCron/cronText.d.ts +2 -0
- package/Components/SimpleCron/index.d.ts +8 -0
- package/Components/SimpleCron/jquery.cron.locale.d.ts +2 -0
- package/Components/TabContainer.d.ts +42 -0
- package/Components/TabContent.d.ts +32 -0
- package/Components/TabHeader.d.ts +13 -0
- package/Components/TableResize.d.ts +14 -0
- package/Components/TextWithIcon.d.ts +3 -0
- package/Components/ToggleThemeMenu.d.ts +8 -0
- package/Components/TreeTable.d.ts +3 -0
- package/Components/UploadImage.d.ts +2 -0
- package/Components/Utils.d.ts +334 -0
- package/Components/copy-to-clipboard.d.ts +2 -0
- package/Components/withWidth.d.ts +2 -0
- package/Connection.d.ts +761 -0
- package/Connection.js +9 -1
- package/Connection.js.map +1 -1
- package/Dialogs/ComplexCron.d.ts +15 -0
- package/Dialogs/Confirm.d.ts +48 -0
- package/Dialogs/Cron.d.ts +15 -0
- package/Dialogs/Error.d.ts +49 -0
- package/Dialogs/FileSelect.d.ts +148 -0
- package/Dialogs/Message.d.ts +39 -0
- package/Dialogs/SelectID.d.ts +161 -0
- package/Dialogs/SimpleCron.d.ts +14 -0
- package/Dialogs/TextInput.d.ts +87 -0
- package/GenericApp.d.ts +213 -0
- package/Prompt.d.ts +5 -0
- package/README.md +7 -0
- package/Theme.d.ts +7 -0
- package/assets/devices/parseNames.d.ts +1 -0
- package/assets/rooms/parseNames.d.ts +1 -0
- package/i18n/de.json +4 -1
- package/i18n/en.json +4 -1
- package/i18n/es.json +4 -1
- package/i18n/fr.json +4 -1
- package/i18n/it.json +4 -1
- package/i18n/nl.json +4 -1
- package/i18n/pl.json +4 -1
- package/i18n/pt.json +4 -1
- package/i18n/ru.json +4 -1
- package/i18n/zh-cn.json +4 -1
- package/i18n.d.ts +92 -0
- package/icons/IconAdapter.d.ts +11 -0
- package/icons/IconAlias.d.ts +11 -0
- package/icons/IconChannel.d.ts +11 -0
- package/icons/IconClearFilter.d.ts +11 -0
- package/icons/IconClosed.d.ts +11 -0
- package/icons/IconCopy.d.ts +38 -0
- package/icons/IconDevice.d.ts +11 -0
- package/icons/IconDocument.d.ts +11 -0
- package/icons/IconDocumentReadOnly.d.ts +11 -0
- package/icons/IconExpert.d.ts +38 -0
- package/icons/IconFx.d.ts +11 -0
- package/icons/IconInstance.d.ts +11 -0
- package/icons/IconLogout.d.ts +38 -0
- package/icons/IconNoIcon.d.ts +38 -0
- package/icons/IconOpen.d.ts +11 -0
- package/icons/IconState.d.ts +11 -0
- package/index.d.ts +113 -0
- package/index.js +1 -0
- package/package.json +8 -8
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
export default _export;
|
|
2
|
+
export type Rgb = {
|
|
3
|
+
/**
|
|
4
|
+
* The red component of the color (0-255).
|
|
5
|
+
*/
|
|
6
|
+
r: number;
|
|
7
|
+
/**
|
|
8
|
+
* The green component of the color (0-255).
|
|
9
|
+
*/
|
|
10
|
+
g: number;
|
|
11
|
+
/**
|
|
12
|
+
* The blue component of the color (0-255).
|
|
13
|
+
*/
|
|
14
|
+
b: number;
|
|
15
|
+
/**
|
|
16
|
+
* The alpha component of the color (0-255).
|
|
17
|
+
*/
|
|
18
|
+
a: number;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Definition of a color.
|
|
22
|
+
*/
|
|
23
|
+
export type Color = string | Rgb | {
|
|
24
|
+
rgb: Rgb;
|
|
25
|
+
};
|
|
26
|
+
export type ColorPickerProps = {
|
|
27
|
+
/**
|
|
28
|
+
* Set to true to disable the color picker.
|
|
29
|
+
*/
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* The currently selected color.
|
|
33
|
+
*/
|
|
34
|
+
value?: Color;
|
|
35
|
+
/**
|
|
36
|
+
* The color change callback.
|
|
37
|
+
*/
|
|
38
|
+
onChange?: (rgba: string) => void;
|
|
39
|
+
/**
|
|
40
|
+
* The name.
|
|
41
|
+
*/
|
|
42
|
+
name?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Additional styling for this component.
|
|
45
|
+
*/
|
|
46
|
+
style?: React.CSSProperties;
|
|
47
|
+
/**
|
|
48
|
+
* The CSS class name.
|
|
49
|
+
*/
|
|
50
|
+
className?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Open the color picker above the field?
|
|
53
|
+
*/
|
|
54
|
+
openAbove?: boolean;
|
|
55
|
+
};
|
|
56
|
+
/** @type {typeof ColorPicker} */
|
|
57
|
+
declare const _export: typeof ColorPicker;
|
|
58
|
+
/**
|
|
59
|
+
* @typedef {object} Rgb
|
|
60
|
+
* @property {number} r The red component of the color (0-255).
|
|
61
|
+
* @property {number} g The green component of the color (0-255).
|
|
62
|
+
* @property {number} b The blue component of the color (0-255).
|
|
63
|
+
* @property {number} a The alpha component of the color (0-255).
|
|
64
|
+
*
|
|
65
|
+
* @typedef {string | Rgb | { rgb: Rgb }} Color Definition of a color.
|
|
66
|
+
*
|
|
67
|
+
* @typedef {object} ColorPickerProps
|
|
68
|
+
* @property {boolean} [disabled] Set to true to disable the color picker.
|
|
69
|
+
* @property {Color} [value] The currently selected color.
|
|
70
|
+
* @property {(rgba: string) => void} [onChange] The color change callback.
|
|
71
|
+
* @property {string} [name] The name.
|
|
72
|
+
* @property {React.CSSProperties} [style] Additional styling for this component.
|
|
73
|
+
* @property {string} [className] The CSS class name.
|
|
74
|
+
* @property {boolean} [openAbove] Open the color picker above the field?
|
|
75
|
+
*
|
|
76
|
+
* @extends {React.Component<ColorPickerProps>}
|
|
77
|
+
*/
|
|
78
|
+
declare class ColorPicker extends React.Component<ColorPickerProps, any, any> {
|
|
79
|
+
/**
|
|
80
|
+
* Get the state derived from the given properties and state.
|
|
81
|
+
* @param {{ color: Color; }} props
|
|
82
|
+
* @param {{ color: Color; }} state
|
|
83
|
+
*/
|
|
84
|
+
static getDerivedStateFromProps(props: {
|
|
85
|
+
color: Color;
|
|
86
|
+
}, state: {
|
|
87
|
+
color: Color;
|
|
88
|
+
}): {
|
|
89
|
+
color: any;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Convert the given color to hex ('#rrggbb') or rgba ('rgba(r,g,b,a)') format.
|
|
93
|
+
* @param {Color} [color]
|
|
94
|
+
* @param {boolean} [isHex] The returning string should be in hex format
|
|
95
|
+
* @returns {string} the hex or rgba representation of the given color.
|
|
96
|
+
*/
|
|
97
|
+
static getColor(color?: Color, isHex?: boolean): string;
|
|
98
|
+
/**
|
|
99
|
+
* Convert rgb() or rgba() format to hex format #rrggbb.
|
|
100
|
+
* @param {string} rgb
|
|
101
|
+
* @returns {string}
|
|
102
|
+
*/
|
|
103
|
+
static rgb2hex(rgb: string): string;
|
|
104
|
+
/**
|
|
105
|
+
* @param {Readonly<ColorPickerProps>} props
|
|
106
|
+
*/
|
|
107
|
+
constructor(props: Readonly<ColorPickerProps>);
|
|
108
|
+
state: {
|
|
109
|
+
displayColorPicker: boolean;
|
|
110
|
+
color: any;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
private handleClick;
|
|
116
|
+
/**
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
private handleClose;
|
|
120
|
+
/**
|
|
121
|
+
* @private
|
|
122
|
+
*/
|
|
123
|
+
private handleChange;
|
|
124
|
+
render(): JSX.Element;
|
|
125
|
+
}
|
|
126
|
+
declare namespace ColorPicker {
|
|
127
|
+
namespace propTypes {
|
|
128
|
+
const disabled: PropTypes.Requireable<boolean>;
|
|
129
|
+
const value: PropTypes.Requireable<string>;
|
|
130
|
+
const onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
131
|
+
const name: PropTypes.Requireable<string>;
|
|
132
|
+
const style: PropTypes.Requireable<object>;
|
|
133
|
+
const className: PropTypes.Requireable<string>;
|
|
134
|
+
const openAbove: PropTypes.Requireable<boolean>;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
import React from "react";
|
|
138
|
+
import PropTypes from "prop-types";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
declare const _default: React.JSXElementConstructor<Omit<PropTypes.InferProps<{
|
|
2
|
+
cronExpression: PropTypes.Requireable<string>;
|
|
3
|
+
onChange: PropTypes.Validator<(...args: any[]) => any>;
|
|
4
|
+
language: PropTypes.Requireable<string>;
|
|
5
|
+
}>, "classes"> & import("@mui/styles/withStyles").StyledComponentProps<"slider" | "appBar" | "mainDiv" | "periodSelect" | "tabContent" | "numberButton" | "numberButtonBreak"> & object>;
|
|
6
|
+
export default _default;
|
|
7
|
+
import PropTypes from "prop-types";
|
|
8
|
+
import React from "react";
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
export default _export;
|
|
2
|
+
/** @type {typeof FileBrowser} */
|
|
3
|
+
declare const _export: typeof FileBrowser;
|
|
4
|
+
/**
|
|
5
|
+
* @extends {React.Component<import('./types').FileBrowserProps>}
|
|
6
|
+
*/
|
|
7
|
+
declare class FileBrowser extends React.Component<import("./types").FileBrowserProps, any, any> {
|
|
8
|
+
static getDerivedStateFromProps(props: any, state: any): {
|
|
9
|
+
expertMode: any;
|
|
10
|
+
loadAllFolders: boolean;
|
|
11
|
+
};
|
|
12
|
+
static getEditFile(ext: any): boolean;
|
|
13
|
+
/**
|
|
14
|
+
* @param {Readonly<import("./types").FileBrowserProps>} props
|
|
15
|
+
*/
|
|
16
|
+
constructor(props: Readonly<import("./types").FileBrowserProps>);
|
|
17
|
+
limitToObjectID: any;
|
|
18
|
+
limitToPath: any;
|
|
19
|
+
state: {
|
|
20
|
+
viewType: any;
|
|
21
|
+
folders: {};
|
|
22
|
+
filterEmpty: boolean;
|
|
23
|
+
expanded: any;
|
|
24
|
+
currentDir: string;
|
|
25
|
+
expertMode: boolean;
|
|
26
|
+
addFolder: boolean;
|
|
27
|
+
uploadFile: boolean;
|
|
28
|
+
deleteItem: string;
|
|
29
|
+
marked: any[];
|
|
30
|
+
viewer: string;
|
|
31
|
+
formatEditFile: string;
|
|
32
|
+
path: any;
|
|
33
|
+
selected: any;
|
|
34
|
+
errorText: string;
|
|
35
|
+
modalEditOfAccess: boolean;
|
|
36
|
+
backgroundImage: any;
|
|
37
|
+
queueLength: number;
|
|
38
|
+
loadAllFolders: boolean;
|
|
39
|
+
allFoldersLoaded: boolean;
|
|
40
|
+
fileErrors: any[];
|
|
41
|
+
};
|
|
42
|
+
imagePrefix: string;
|
|
43
|
+
levelPadding: any;
|
|
44
|
+
mounted: boolean;
|
|
45
|
+
suppressDeleteConfirm: number;
|
|
46
|
+
browseList: any[];
|
|
47
|
+
browseListRunning: boolean;
|
|
48
|
+
initialReadFinished: boolean;
|
|
49
|
+
supportSubscribes: any;
|
|
50
|
+
_tempTimeout: {};
|
|
51
|
+
loadFolders(): any;
|
|
52
|
+
scrollToSelected(): void;
|
|
53
|
+
componentDidMount(): Promise<void>;
|
|
54
|
+
componentWillUnmount(): void;
|
|
55
|
+
browseFolders(foldersList: any, _newFolders: any, _resolve: any): any;
|
|
56
|
+
readDirSerial(adapter: any, relPath: any): Promise<any>;
|
|
57
|
+
processBrowseList(level: any): void;
|
|
58
|
+
browseFolder(folderId: any, _newFolders: any, _checkEmpty: any, force: any): any;
|
|
59
|
+
toggleFolder(item: any, e: any): any;
|
|
60
|
+
onFileChange: (id: any, fileName: any, size: any) => void;
|
|
61
|
+
changeFolder(e: any, folder: any): any;
|
|
62
|
+
lastSelect: number;
|
|
63
|
+
select(id: any, e: any, cb: any): void;
|
|
64
|
+
renderFolder(item: any, expanded: any): JSX.Element;
|
|
65
|
+
renderBackFolder(): JSX.Element;
|
|
66
|
+
formatSize(size: any): JSX.Element;
|
|
67
|
+
formatAcl(acl: any): JSX.Element;
|
|
68
|
+
getFileIcon(ext: any): JSX.Element;
|
|
69
|
+
setStateBackgroundImage: () => void;
|
|
70
|
+
getClassBackgroundImage: () => any;
|
|
71
|
+
renderFile(item: any): JSX.Element;
|
|
72
|
+
renderItems(folderId: any): any;
|
|
73
|
+
renderToolbar(): JSX.Element;
|
|
74
|
+
findItem(id: any, folders: any): any;
|
|
75
|
+
renderInputDialog(): void | JSX.Element;
|
|
76
|
+
componentDidUpdate(): void;
|
|
77
|
+
setOpacityTimer: any;
|
|
78
|
+
uploadFile(fileName: any, data: any): Promise<void>;
|
|
79
|
+
findFirstFolder(id: any): any;
|
|
80
|
+
renderUpload(): JSX.Element[];
|
|
81
|
+
deleteRecursive(id: any): Promise<void>;
|
|
82
|
+
deleteItem(deleteItem: any): void;
|
|
83
|
+
renderDeleteDialog(): false | JSX.Element;
|
|
84
|
+
renderViewDialog(): JSX.Element;
|
|
85
|
+
renderError(): JSX.Element;
|
|
86
|
+
updateItemsAcl(info: any): void;
|
|
87
|
+
changeToPath(): void;
|
|
88
|
+
renderBreadcrumb(): any;
|
|
89
|
+
renderPath(): JSX.Element;
|
|
90
|
+
render(): JSX.Element;
|
|
91
|
+
foldersLoading: boolean;
|
|
92
|
+
}
|
|
93
|
+
declare namespace FileBrowser {
|
|
94
|
+
namespace defaultProps {
|
|
95
|
+
function modalEditOfAccessControl(): void;
|
|
96
|
+
}
|
|
97
|
+
namespace propTypes {
|
|
98
|
+
export const style: PropTypes.Requireable<object>;
|
|
99
|
+
export const className: PropTypes.Requireable<string>;
|
|
100
|
+
export const t: PropTypes.Validator<(...args: any[]) => any>;
|
|
101
|
+
export const lang: PropTypes.Validator<string>;
|
|
102
|
+
export const socket: PropTypes.Validator<object>;
|
|
103
|
+
export const ready: PropTypes.Requireable<boolean>;
|
|
104
|
+
export const expertMode: PropTypes.Requireable<boolean>;
|
|
105
|
+
export const showToolbar: PropTypes.Requireable<boolean>;
|
|
106
|
+
export const allowUpload: PropTypes.Requireable<boolean>;
|
|
107
|
+
export const allowDownload: PropTypes.Requireable<boolean>;
|
|
108
|
+
export const allowCreateFolder: PropTypes.Requireable<boolean>;
|
|
109
|
+
export const allowDelete: PropTypes.Requireable<boolean>;
|
|
110
|
+
export const allowView: PropTypes.Requireable<boolean>;
|
|
111
|
+
export const imagePrefix: PropTypes.Requireable<string>;
|
|
112
|
+
export const showExpertButton: PropTypes.Requireable<boolean>;
|
|
113
|
+
export const viewType: PropTypes.Requireable<string>;
|
|
114
|
+
export const showViewTypeButton: PropTypes.Requireable<boolean>;
|
|
115
|
+
export const selected: PropTypes.Requireable<string>;
|
|
116
|
+
export const tileView: PropTypes.Requireable<boolean>;
|
|
117
|
+
export const filterFiles: PropTypes.Requireable<any[]>;
|
|
118
|
+
export const filterByType: PropTypes.Requireable<string>;
|
|
119
|
+
export const onSelect: PropTypes.Requireable<(...args: any[]) => any>;
|
|
120
|
+
const modalEditOfAccessControl_1: PropTypes.Requireable<(...args: any[]) => any>;
|
|
121
|
+
export { modalEditOfAccessControl_1 as modalEditOfAccessControl };
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
import React from "react";
|
|
125
|
+
import PropTypes from "prop-types";
|
|
@@ -294,17 +294,32 @@ var styles = function styles(theme) {
|
|
|
294
294
|
width: BUTTON_WIDTH,
|
|
295
295
|
height: ROW_HEIGHT,
|
|
296
296
|
minWidth: BUTTON_WIDTH,
|
|
297
|
-
verticalAlign: '
|
|
297
|
+
verticalAlign: 'middle',
|
|
298
|
+
textAlign: 'center',
|
|
298
299
|
padding: 0,
|
|
300
|
+
borderRadius: BUTTON_WIDTH / 2,
|
|
301
|
+
'&:hover': {
|
|
302
|
+
backgroundColor: theme.palette.mode === 'dark' ? 'rgba(255, 255, 255, 0.08)' : 'rgba(0, 0, 0, 0.08)'
|
|
303
|
+
},
|
|
299
304
|
'& span': {
|
|
300
305
|
paddingTop: 9
|
|
301
306
|
},
|
|
302
307
|
'& svg': {
|
|
303
308
|
width: 14,
|
|
304
309
|
height: 14,
|
|
305
|
-
fontSize: '1rem'
|
|
310
|
+
fontSize: '1rem',
|
|
311
|
+
marginTop: -3,
|
|
312
|
+
verticalAlign: 'middle',
|
|
313
|
+
color: theme.palette.mode === 'dark' ? '#EEE' : '#111'
|
|
306
314
|
}
|
|
307
315
|
},
|
|
316
|
+
itemDownloadEmptyTable: {
|
|
317
|
+
display: 'inline-block',
|
|
318
|
+
width: BUTTON_WIDTH,
|
|
319
|
+
height: ROW_HEIGHT,
|
|
320
|
+
minWidth: BUTTON_WIDTH,
|
|
321
|
+
padding: 0
|
|
322
|
+
},
|
|
308
323
|
itemAclButtonTable: {
|
|
309
324
|
width: BUTTON_WIDTH,
|
|
310
325
|
height: ROW_HEIGHT,
|
|
@@ -1160,7 +1175,7 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1160
1175
|
}, this.state.viewType === TABLE && this.props.expertMode ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1161
1176
|
className: this.props.classes["itemDeleteButton".concat(this.state.viewType)]
|
|
1162
1177
|
}) : null), this.state.viewType === TABLE && this.props.allowDownload ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
1163
|
-
className: this.props.classes["
|
|
1178
|
+
className: this.props.classes["itemDownloadEmpty".concat(this.state.viewType)]
|
|
1164
1179
|
}) : null, this.state.viewType === TABLE && this.props.allowDelete && this.state.folders[item.id] && this.state.folders[item.id].length ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
1165
1180
|
"aria-label": "delete",
|
|
1166
1181
|
onClick: function onClick(e) {
|
|
@@ -1238,6 +1253,7 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1238
1253
|
value: function getFileIcon(ext) {
|
|
1239
1254
|
switch (ext) {
|
|
1240
1255
|
case 'json':
|
|
1256
|
+
case 'json5':
|
|
1241
1257
|
return /*#__PURE__*/_react["default"].createElement(_Bookmark["default"], {
|
|
1242
1258
|
className: this.props.classes["itemIcon".concat(this.state.viewType)]
|
|
1243
1259
|
});
|
|
@@ -1350,14 +1366,14 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
1350
1366
|
fontSize: "small"
|
|
1351
1367
|
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
1352
1368
|
className: this.props.classes["itemDeleteButton".concat(this.state.viewType)]
|
|
1353
|
-
})), this.state.viewType === TABLE && this.props.allowDownload ? /*#__PURE__*/_react["default"].createElement(
|
|
1354
|
-
|
|
1369
|
+
})), this.state.viewType === TABLE && this.props.allowDownload ? /*#__PURE__*/_react["default"].createElement("a", {
|
|
1370
|
+
className: _Utils["default"].clsx('MuiButtonBase-root', 'MuiIconButton-root', 'MuiIconButton-sizeLarge', this.props.classes.itemDownloadButtonTable),
|
|
1371
|
+
tabIndex: "0",
|
|
1372
|
+
download: item.id,
|
|
1355
1373
|
href: this.imagePrefix + item.id,
|
|
1356
|
-
className: this.props.classes["itemDownloadButton".concat(this.state.viewType)],
|
|
1357
1374
|
onClick: function onClick(e) {
|
|
1358
|
-
|
|
1359
|
-
}
|
|
1360
|
-
size: "large"
|
|
1375
|
+
e.stopPropagation();
|
|
1376
|
+
}
|
|
1361
1377
|
}, /*#__PURE__*/_react["default"].createElement(_SaveAlt["default"], null)) : null, this.state.viewType === TABLE && this.props.allowDelete && item.id !== 'vis.0/' && item.id !== USER_DATA ? /*#__PURE__*/_react["default"].createElement(_IconButton["default"], {
|
|
1362
1378
|
"aria-label": "delete",
|
|
1363
1379
|
onClick: function onClick(e) {
|
|
@@ -2170,6 +2186,7 @@ var FileBrowser = /*#__PURE__*/function (_Component) {
|
|
|
2170
2186
|
value: function getEditFile(ext) {
|
|
2171
2187
|
switch (ext) {
|
|
2172
2188
|
case 'json':
|
|
2189
|
+
case 'json5':
|
|
2173
2190
|
case 'js':
|
|
2174
2191
|
case 'html':
|
|
2175
2192
|
case 'txt':
|