@deephaven/file-explorer 0.42.1-beta.2 → 0.43.0
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 +8 -8
- package/dist/FileExistsError.js +0 -14
- package/dist/FileExistsError.js.map +0 -1
- package/dist/FileExplorer.css +0 -26
- package/dist/FileExplorer.css.map +0 -1
- package/dist/FileExplorer.js +0 -153
- package/dist/FileExplorer.js.map +0 -1
- package/dist/FileExplorerShortcuts.js +0 -20
- package/dist/FileExplorerShortcuts.js.map +0 -1
- package/dist/FileExplorerToolbar.css +0 -37
- package/dist/FileExplorerToolbar.css.map +0 -1
- package/dist/FileExplorerToolbar.js +0 -37
- package/dist/FileExplorerToolbar.js.map +0 -1
- package/dist/FileList.css +0 -93
- package/dist/FileList.css.map +0 -1
- package/dist/FileList.js +0 -309
- package/dist/FileList.js.map +0 -1
- package/dist/FileListContainer.js +0 -167
- package/dist/FileListContainer.js.map +0 -1
- package/dist/FileListItem.js +0 -118
- package/dist/FileListItem.js.map +0 -1
- package/dist/FileListItemEditor.css +0 -33
- package/dist/FileListItemEditor.css.map +0 -1
- package/dist/FileListItemEditor.js +0 -92
- package/dist/FileListItemEditor.js.map +0 -1
- package/dist/FileListUtils.js +0 -34
- package/dist/FileListUtils.js.map +0 -1
- package/dist/FileNotFoundError.js +0 -11
- package/dist/FileNotFoundError.js.map +0 -1
- package/dist/FileStorage.js +0 -12
- package/dist/FileStorage.js.map +0 -1
- package/dist/FileTestUtils.js +0 -103
- package/dist/FileTestUtils.js.map +0 -1
- package/dist/FileUtils.js +0 -243
- package/dist/FileUtils.js.map +0 -1
- package/dist/NewItemModal.css +0 -17
- package/dist/NewItemModal.css.map +0 -1
- package/dist/NewItemModal.js +0 -467
- package/dist/NewItemModal.js.map +0 -1
- package/dist/index.js +0 -15
- package/dist/index.js.map +0 -1
package/dist/FileUtils.js
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import { ValidationError } from '@deephaven/utils';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* A basic list of some common MIME types.
|
|
5
|
-
*/
|
|
6
|
-
export var MIME_TYPE;
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Collection of utils for operating on file names
|
|
10
|
-
*/
|
|
11
|
-
(function (MIME_TYPE) {
|
|
12
|
-
MIME_TYPE["GROOVY"] = "text/x-groovy";
|
|
13
|
-
MIME_TYPE["PLAIN_TEXT"] = "text/plain";
|
|
14
|
-
MIME_TYPE["PYTHON"] = "text/x-python";
|
|
15
|
-
MIME_TYPE["PYTHON_COMPILED"] = "application/x-python-code";
|
|
16
|
-
MIME_TYPE["SCALA"] = "text/x-scala";
|
|
17
|
-
MIME_TYPE["UNKNOWN"] = "";
|
|
18
|
-
})(MIME_TYPE || (MIME_TYPE = {}));
|
|
19
|
-
export class FileUtils {
|
|
20
|
-
/**
|
|
21
|
-
* Format file extension
|
|
22
|
-
* @param extension File extension to format, defaults to empty string
|
|
23
|
-
* @returns Formatted string - '' for no extension, '.' for empty extension, '.ext' for non-empty extension
|
|
24
|
-
*/
|
|
25
|
-
static fileExtensionToString() {
|
|
26
|
-
var extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
27
|
-
return extension.length === 0 ? '' : ".".concat(extension);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Get the depth (how many directories deep it is) of the provided filename with path.
|
|
32
|
-
* @param name The full file name to get the depth of
|
|
33
|
-
*/
|
|
34
|
-
static getDepth(name) {
|
|
35
|
-
var _name$match;
|
|
36
|
-
if (!FileUtils.hasPath(name)) {
|
|
37
|
-
throw new Error("Invalid path provided: ".concat(name));
|
|
38
|
-
}
|
|
39
|
-
var matches = (_name$match = name.match(/\//g)) !== null && _name$match !== void 0 ? _name$match : [];
|
|
40
|
-
return matches.length - 1;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Get just the extension of file name.
|
|
45
|
-
* Note that it just returns the last extension, so 'example.tar.gz' would just return 'gz'.
|
|
46
|
-
* @param name The file name with or without path to get the extension of
|
|
47
|
-
* @returns The file extension
|
|
48
|
-
*/
|
|
49
|
-
static getExtension(name) {
|
|
50
|
-
var components = this.getBaseName(name).split('.');
|
|
51
|
-
if (components.length > 1) {
|
|
52
|
-
var _components$pop;
|
|
53
|
-
return (_components$pop = components.pop()) !== null && _components$pop !== void 0 ? _components$pop : '';
|
|
54
|
-
}
|
|
55
|
-
return '';
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Get the base name portion of the file, eg '/foo/bar.txt' => 'bar.txt'
|
|
60
|
-
* @param name The full name including path of the file
|
|
61
|
-
* @returns Just the file name part of the file
|
|
62
|
-
*/
|
|
63
|
-
static getBaseName(name) {
|
|
64
|
-
var _name$split$pop;
|
|
65
|
-
return (_name$split$pop = name.split('/').pop()) !== null && _name$split$pop !== void 0 ? _name$split$pop : '';
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Create copy file name, used for copying unsaved files so doesn't have to be unique
|
|
70
|
-
* @param originalName File name
|
|
71
|
-
* @returns The file name of the copy
|
|
72
|
-
*/
|
|
73
|
-
static getCopyFileName(originalName) {
|
|
74
|
-
var extensionPosition = originalName.lastIndexOf('.');
|
|
75
|
-
var extension = null;
|
|
76
|
-
var name = null;
|
|
77
|
-
if (extensionPosition < 0) {
|
|
78
|
-
// No extension
|
|
79
|
-
name = originalName;
|
|
80
|
-
} else {
|
|
81
|
-
name = originalName.substring(0, extensionPosition);
|
|
82
|
-
extension = originalName.substring(extensionPosition + 1);
|
|
83
|
-
}
|
|
84
|
-
var copyName = name ? "".concat(name, "-copy") : 'Copy';
|
|
85
|
-
return extension !== null ? "".concat(copyName, ".").concat(extension) : copyName;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Return a MIME type for the provided file
|
|
90
|
-
* @param name The file name to get the type for
|
|
91
|
-
* @returns A known MIME type if recognized
|
|
92
|
-
*/
|
|
93
|
-
static getMimeType(name) {
|
|
94
|
-
var extension = this.getExtension(name).toLowerCase();
|
|
95
|
-
switch (extension) {
|
|
96
|
-
case 'groovy':
|
|
97
|
-
return MIME_TYPE.GROOVY;
|
|
98
|
-
case 'py':
|
|
99
|
-
return MIME_TYPE.PYTHON;
|
|
100
|
-
case 'pyc':
|
|
101
|
-
return MIME_TYPE.PYTHON_COMPILED;
|
|
102
|
-
case 'scala':
|
|
103
|
-
return MIME_TYPE.SCALA;
|
|
104
|
-
case 'txt':
|
|
105
|
-
return MIME_TYPE.PLAIN_TEXT;
|
|
106
|
-
default:
|
|
107
|
-
return MIME_TYPE.UNKNOWN;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Pop the last part of the filename component to return the parent path
|
|
113
|
-
* @param name The file name to get the parent path of
|
|
114
|
-
*/
|
|
115
|
-
static getParent(name) {
|
|
116
|
-
if (!FileUtils.hasPath(name)) {
|
|
117
|
-
throw new Error("Invalid name provided: ".concat(name));
|
|
118
|
-
}
|
|
119
|
-
var parts = name.split('/');
|
|
120
|
-
while (parts.pop() === '');
|
|
121
|
-
if (parts.length === 0) {
|
|
122
|
-
throw new Error("No parent for path provided: ".concat(name));
|
|
123
|
-
}
|
|
124
|
-
return "".concat(parts.join('/'), "/");
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Get the path name portion of the file
|
|
129
|
-
* @param name The full path with or without filename to get the path of
|
|
130
|
-
* @returns Just the path with out the file name part, including trailing slash
|
|
131
|
-
*/
|
|
132
|
-
static getPath(name) {
|
|
133
|
-
if (!FileUtils.hasPath(name)) {
|
|
134
|
-
throw new Error("Invalid filename provided: ".concat(name));
|
|
135
|
-
}
|
|
136
|
-
var parts = name.split('/');
|
|
137
|
-
parts.pop();
|
|
138
|
-
return "".concat(parts.join('/'), "/");
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/**
|
|
142
|
-
* Check if a given file name includes the full path
|
|
143
|
-
* @param name The file name to check
|
|
144
|
-
* @returns True if it's a full path, false otherwise
|
|
145
|
-
*/
|
|
146
|
-
static hasPath(name) {
|
|
147
|
-
return name.startsWith('/');
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Check a given file name is a path
|
|
152
|
-
* @param name The file name to check
|
|
153
|
-
* @returns True if it's a full path, false otherwise
|
|
154
|
-
*/
|
|
155
|
-
static isPath(name) {
|
|
156
|
-
return name.startsWith('/') && name.endsWith('/');
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/**
|
|
160
|
-
* Turns a directory file name into a path. Basically ensures there's a trailing slash
|
|
161
|
-
* @param name The directory name to make a path
|
|
162
|
-
*/
|
|
163
|
-
static makePath(name) {
|
|
164
|
-
if (!name.endsWith('/')) {
|
|
165
|
-
return "".concat(name, "/");
|
|
166
|
-
}
|
|
167
|
-
return name;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Replace extension in the item name
|
|
172
|
-
* @param name Name to replace the extension in
|
|
173
|
-
* @param newExtension New extension, defaults to no extension
|
|
174
|
-
*/
|
|
175
|
-
static replaceExtension(name) {
|
|
176
|
-
var newExtension = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
177
|
-
var index = name.lastIndexOf('.');
|
|
178
|
-
var nameWithoutExtension = index > -1 ? name.substring(0, index) : name;
|
|
179
|
-
var extensionString = FileUtils.fileExtensionToString(newExtension);
|
|
180
|
-
return "".concat(nameWithoutExtension).concat(extensionString);
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* Validate the provided name. Throws an error if validation fails
|
|
185
|
-
* @param name The item name to validate
|
|
186
|
-
*/
|
|
187
|
-
static validateName(name) {
|
|
188
|
-
// Static checks
|
|
189
|
-
var reservedNames = ['.', '..'];
|
|
190
|
-
// Global flag to show all invalid chars, not just the first match
|
|
191
|
-
var invalidCharsRegex = /[\\/\0]/g;
|
|
192
|
-
var invalidCharLabels = new Map([['\0', 'null']]);
|
|
193
|
-
if (!name) {
|
|
194
|
-
throw new ValidationError("Name cannot be empty");
|
|
195
|
-
}
|
|
196
|
-
if (reservedNames.includes(name)) {
|
|
197
|
-
throw new ValidationError("\"".concat(name, "\" is a reserved name"));
|
|
198
|
-
}
|
|
199
|
-
if (invalidCharsRegex.test(name)) {
|
|
200
|
-
var _name$match$reduce$ma, _name$match2;
|
|
201
|
-
throw new ValidationError("Invalid characters in name: \"".concat((_name$match$reduce$ma = (_name$match2 = name.match(invalidCharsRegex)
|
|
202
|
-
// Filter out duplicates
|
|
203
|
-
) === null || _name$match2 === void 0 ? void 0 : _name$match2.reduce((acc, next) => acc.includes(next) ? acc : [...acc, next], []).map(char => invalidCharLabels.has(char) ? invalidCharLabels.get(char) : char).join('", "')) !== null && _name$match$reduce$ma !== void 0 ? _name$match$reduce$ma : '', "\""));
|
|
204
|
-
}
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/**
|
|
208
|
-
* Reduce the provided paths to the minimum selection.
|
|
209
|
-
* Removes any nested files or directories if a parent is already selected.
|
|
210
|
-
* @param paths The paths to reduce
|
|
211
|
-
*/
|
|
212
|
-
static reducePaths(paths) {
|
|
213
|
-
var folders = paths.filter(path => FileUtils.isPath(path));
|
|
214
|
-
return paths.filter(path => !folders.some(folder => path !== folder && path.startsWith(folder)));
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
/**
|
|
218
|
-
* Removes the root path from the provided file name. Throws if the filename does not start with root.
|
|
219
|
-
* @param root The root to remove
|
|
220
|
-
* @param filename Filename to remove the root path from
|
|
221
|
-
* @returns Filename without the root
|
|
222
|
-
*/
|
|
223
|
-
static removeRoot(root, filename) {
|
|
224
|
-
if (root.length === 0) {
|
|
225
|
-
return filename;
|
|
226
|
-
}
|
|
227
|
-
if (!filename.startsWith(root)) {
|
|
228
|
-
throw new Error("Filename ".concat(filename, " does not start with expected root ").concat(root));
|
|
229
|
-
}
|
|
230
|
-
return filename.substring(root.length);
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Add root to the filename as prefix
|
|
235
|
-
* @param path Filename to prefix root to
|
|
236
|
-
* @returns Filename with root at the prefix
|
|
237
|
-
*/
|
|
238
|
-
static addRoot(root, path) {
|
|
239
|
-
return "".concat(root).concat(path);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
export default FileUtils;
|
|
243
|
-
//# sourceMappingURL=FileUtils.js.map
|
package/dist/FileUtils.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileUtils.js","names":["ValidationError","MIME_TYPE","FileUtils","fileExtensionToString","extension","length","getDepth","name","hasPath","Error","matches","match","getExtension","components","getBaseName","split","pop","getCopyFileName","originalName","extensionPosition","lastIndexOf","substring","copyName","getMimeType","toLowerCase","GROOVY","PYTHON","PYTHON_COMPILED","SCALA","PLAIN_TEXT","UNKNOWN","getParent","parts","join","getPath","startsWith","isPath","endsWith","makePath","replaceExtension","newExtension","index","nameWithoutExtension","extensionString","validateName","reservedNames","invalidCharsRegex","invalidCharLabels","Map","includes","test","reduce","acc","next","map","char","has","get","reducePaths","paths","folders","filter","path","some","folder","removeRoot","root","filename","addRoot"],"sources":["../src/FileUtils.ts"],"sourcesContent":["import { ValidationError } from '@deephaven/utils';\n\n/**\n * A basic list of some common MIME types.\n */\nexport enum MIME_TYPE {\n GROOVY = 'text/x-groovy',\n PLAIN_TEXT = 'text/plain',\n PYTHON = 'text/x-python',\n PYTHON_COMPILED = 'application/x-python-code',\n SCALA = 'text/x-scala',\n UNKNOWN = '',\n}\n\n/**\n * Collection of utils for operating on file names\n */\nexport class FileUtils {\n /**\n * Format file extension\n * @param extension File extension to format, defaults to empty string\n * @returns Formatted string - '' for no extension, '.' for empty extension, '.ext' for non-empty extension\n */\n static fileExtensionToString(extension = ''): string {\n return extension.length === 0 ? '' : `.${extension}`;\n }\n\n /**\n * Get the depth (how many directories deep it is) of the provided filename with path.\n * @param name The full file name to get the depth of\n */\n static getDepth(name: string): number {\n if (!FileUtils.hasPath(name)) {\n throw new Error(`Invalid path provided: ${name}`);\n }\n const matches = name.match(/\\//g) ?? [];\n return matches.length - 1;\n }\n\n /**\n * Get just the extension of file name.\n * Note that it just returns the last extension, so 'example.tar.gz' would just return 'gz'.\n * @param name The file name with or without path to get the extension of\n * @returns The file extension\n */\n static getExtension(name: string): string {\n const components = this.getBaseName(name).split('.');\n if (components.length > 1) {\n return components.pop() ?? '';\n }\n return '';\n }\n\n /**\n * Get the base name portion of the file, eg '/foo/bar.txt' => 'bar.txt'\n * @param name The full name including path of the file\n * @returns Just the file name part of the file\n */\n static getBaseName(name: string): string {\n return name.split('/').pop() ?? '';\n }\n\n /**\n * Create copy file name, used for copying unsaved files so doesn't have to be unique\n * @param originalName File name\n * @returns The file name of the copy\n */\n static getCopyFileName(originalName: string): string {\n const extensionPosition = originalName.lastIndexOf('.');\n let extension = null;\n let name = null;\n if (extensionPosition < 0) {\n // No extension\n name = originalName;\n } else {\n name = originalName.substring(0, extensionPosition);\n extension = originalName.substring(extensionPosition + 1);\n }\n const copyName = name ? `${name}-copy` : 'Copy';\n return extension !== null ? `${copyName}.${extension}` : copyName;\n }\n\n /**\n * Return a MIME type for the provided file\n * @param name The file name to get the type for\n * @returns A known MIME type if recognized\n */\n static getMimeType(name: string): MIME_TYPE {\n const extension = this.getExtension(name).toLowerCase();\n switch (extension) {\n case 'groovy':\n return MIME_TYPE.GROOVY;\n case 'py':\n return MIME_TYPE.PYTHON;\n case 'pyc':\n return MIME_TYPE.PYTHON_COMPILED;\n case 'scala':\n return MIME_TYPE.SCALA;\n case 'txt':\n return MIME_TYPE.PLAIN_TEXT;\n default:\n return MIME_TYPE.UNKNOWN;\n }\n }\n\n /**\n * Pop the last part of the filename component to return the parent path\n * @param name The file name to get the parent path of\n */\n static getParent(name: string): string {\n if (!FileUtils.hasPath(name)) {\n throw new Error(`Invalid name provided: ${name}`);\n }\n\n const parts = name.split('/');\n while (parts.pop() === '');\n if (parts.length === 0) {\n throw new Error(`No parent for path provided: ${name}`);\n }\n return `${parts.join('/')}/`;\n }\n\n /**\n * Get the path name portion of the file\n * @param name The full path with or without filename to get the path of\n * @returns Just the path with out the file name part, including trailing slash\n */\n static getPath(name: string): string {\n if (!FileUtils.hasPath(name)) {\n throw new Error(`Invalid filename provided: ${name}`);\n }\n const parts = name.split('/');\n parts.pop();\n return `${parts.join('/')}/`;\n }\n\n /**\n * Check if a given file name includes the full path\n * @param name The file name to check\n * @returns True if it's a full path, false otherwise\n */\n static hasPath(name: string): boolean {\n return name.startsWith('/');\n }\n\n /**\n * Check a given file name is a path\n * @param name The file name to check\n * @returns True if it's a full path, false otherwise\n */\n static isPath(name: string): boolean {\n return name.startsWith('/') && name.endsWith('/');\n }\n\n /**\n * Turns a directory file name into a path. Basically ensures there's a trailing slash\n * @param name The directory name to make a path\n */\n static makePath(name: string): string {\n if (!name.endsWith('/')) {\n return `${name}/`;\n }\n return name;\n }\n\n /**\n * Replace extension in the item name\n * @param name Name to replace the extension in\n * @param newExtension New extension, defaults to no extension\n */\n static replaceExtension(name: string, newExtension = ''): string {\n const index = name.lastIndexOf('.');\n const nameWithoutExtension = index > -1 ? name.substring(0, index) : name;\n const extensionString = FileUtils.fileExtensionToString(newExtension);\n return `${nameWithoutExtension}${extensionString}`;\n }\n\n /**\n * Validate the provided name. Throws an error if validation fails\n * @param name The item name to validate\n */\n static validateName(name: string): void {\n // Static checks\n const reservedNames = ['.', '..'];\n // Global flag to show all invalid chars, not just the first match\n const invalidCharsRegex = /[\\\\/\\0]/g;\n const invalidCharLabels = new Map([['\\0', 'null']]);\n\n if (!name) {\n throw new ValidationError(`Name cannot be empty`);\n }\n if (reservedNames.includes(name)) {\n throw new ValidationError(`\"${name}\" is a reserved name`);\n }\n if (invalidCharsRegex.test(name)) {\n throw new ValidationError(\n `Invalid characters in name: \"${\n name\n .match(invalidCharsRegex)\n // Filter out duplicates\n ?.reduce(\n (acc, next) => (acc.includes(next) ? acc : [...acc, next]),\n [] as string[]\n )\n .map(char =>\n invalidCharLabels.has(char) ? invalidCharLabels.get(char) : char\n )\n .join('\", \"') ?? ''\n }\"`\n );\n }\n }\n\n /**\n * Reduce the provided paths to the minimum selection.\n * Removes any nested files or directories if a parent is already selected.\n * @param paths The paths to reduce\n */\n static reducePaths(paths: string[]): string[] {\n const folders = paths.filter(path => FileUtils.isPath(path));\n return paths.filter(\n path =>\n !folders.some(folder => path !== folder && path.startsWith(folder))\n );\n }\n\n /**\n * Removes the root path from the provided file name. Throws if the filename does not start with root.\n * @param root The root to remove\n * @param filename Filename to remove the root path from\n * @returns Filename without the root\n */\n static removeRoot(root: string, filename: string): string {\n if (root.length === 0) {\n return filename;\n }\n if (!filename.startsWith(root)) {\n throw new Error(\n `Filename ${filename} does not start with expected root ${root}`\n );\n }\n\n return filename.substring(root.length);\n }\n\n /**\n * Add root to the filename as prefix\n * @param path Filename to prefix root to\n * @returns Filename with root at the prefix\n */\n static addRoot(root: string, path: string): string {\n return `${root}${path}`;\n }\n}\n\nexport default FileUtils;\n"],"mappings":"AAAA,SAASA,eAAe,QAAQ,kBAAkB;;AAElD;AACA;AACA;AACA,WAAYC,SAAS;;AASrB;AACA;AACA;AAFA,WATYA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAATA,SAAS;AAAA,GAATA,SAAS,KAATA,SAAS;AAYrB,OAAO,MAAMC,SAAS,CAAC;EACrB;AACF;AACA;AACA;AACA;EACE,OAAOC,qBAAqB,GAAyB;IAAA,IAAxBC,SAAS,uEAAG,EAAE;IACzC,OAAOA,SAAS,CAACC,MAAM,KAAK,CAAC,GAAG,EAAE,cAAOD,SAAS,CAAE;EACtD;;EAEA;AACF;AACA;AACA;EACE,OAAOE,QAAQ,CAACC,IAAY,EAAU;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C+B,IAAI,CAAC,EAAE;MAC9B,MAAM,IAAIzD,KAAK,oBACD0D,QAAQ,gDAAsCD,IAAI,EAC/D;IACH;IAEA,OAAOC,QAAQ,CAAC9C,SAAS,CAAC6C,IAAI,CAAC7D,MAAM,CAAC;EACxC;;EAEA;AACF;AACA;AACA;AACA;EACE,OAAO+D,OAAO,CAACF,IAAY,EAAEJ,IAAY,EAAU;IACjD,iBAAUI,IAAI,SAAGJ,IAAI;EACvB;AACF;AAEA,eAAe5D,SAAS"}
|
package/dist/NewItemModal.css
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* stylelint-disable scss/at-import-no-partial-leading-underscore */
|
|
2
|
-
.new-file-modal-content .new-item-destination {
|
|
3
|
-
color: #929192;
|
|
4
|
-
}
|
|
5
|
-
.new-file-modal-content .file-explorer-container {
|
|
6
|
-
border: 1px solid #929192;
|
|
7
|
-
border-radius: 4px;
|
|
8
|
-
overflow: hidden;
|
|
9
|
-
height: 250px;
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
}
|
|
13
|
-
.new-file-modal-content .directory-breadcrumbs {
|
|
14
|
-
color: #4878ea;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
/*# sourceMappingURL=NewItemModal.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../../../node_modules/@deephaven/components/scss/custom.scss","../src/NewItemModal.scss","../../../node_modules/@deephaven/components/scss/bootstrap_overrides.scss"],"names":[],"mappings":"AAAA;ACME;EACE,OCcO;;ADXT;EACE;EACA,eC6GY;ED5GZ;EACA,QAXe;EAYf;EACA;;AAGF;EACE,OCRY","file":"NewItemModal.css","sourcesContent":["/* stylelint-disable scss/at-import-no-partial-leading-underscore */\n// Consumers should be able to resolve bootstrap/ to node_modules/bootstrap\n\n//Make bootstrap functions available for use in overrides\n@import 'bootstrap/scss/_functions.scss';\n@import './bootstrap_overrides.scss';\n\n//_variable imports come after bootstrap default overrides,\n// makes all other variables and mixins from bootstrap available\n/// with just importing customer.scss\n@import 'bootstrap/scss/_variables.scss';\n@import 'bootstrap/scss/_mixins.scss';\n\n//New variables come after imports\n@import './new_variables.scss';\n","@import '@deephaven/components/scss/custom.scss';\n\n$min-modal-content-height: 250px;\n$file-list-height: 250px;\n\n.new-file-modal-content {\n .new-item-destination {\n color: $text-muted;\n }\n\n .file-explorer-container {\n border: 1px solid $input-border-color;\n border-radius: $input-border-radius;\n overflow: hidden;\n height: $file-list-height;\n display: flex;\n flex-direction: column;\n }\n\n .directory-breadcrumbs {\n color: $primary;\n }\n}\n","// Styling overrides for bootstrap\n\n// Override / set color variables\n$red: #f95d84;\n$orange: #f37e3f;\n$yellow: #fcd65b;\n$green: #9edc6f;\n$blue: #76d9e4;\n$purple: #aa9af4;\n\n//Define some UI colors\n$interfacegray: #2d2a2e;\n$interfaceblue: #4878ea;\n$interfacewhite: #f0f0ee; //same as gray-200\n$interfaceblack: #1a171a;\n\n//Define our Gray scale\n$white: $interfacewhite;\n$gray-100: #fcfcfa;\n$gray-200: $interfacewhite;\n$gray-300: #c0bfbf;\n$gray-400: #929192;\n$gray-500: #5b5a5c;\n$gray-600: #555356;\n$gray-700: #403e41;\n$gray-800: #373438;\n$gray-850: #322f33;\n$gray-900: #211f22;\n$black: $interfaceblack;\n$content-bg: $interfacegray;\n$background: $interfaceblack;\n$foreground: $interfacewhite;\n\n//Load colors into map\n$colors: ();\n$colors: map-merge(\n (\n 'red': $red,\n 'orange': $orange,\n 'yellow': $yellow,\n 'green': $green,\n 'blue': $blue,\n 'purple': $purple,\n 'white': $white,\n 'black': $black,\n ),\n $colors\n);\n\n//Set default colors\n$body-bg: $black;\n$body-color: $interfacewhite;\n\n// Set brand colors\n$primary: $interfaceblue;\n$primary-hover: darken($primary, 8%);\n$primary-dark: mix($primary, $content-bg, 25%);\n$primary-light: scale-color($primary, $lightness: -25%);\n$secondary: $gray-500;\n$secondary-hover: darken($secondary, 8%);\n$success: $green;\n$info: $yellow;\n$warning: $orange;\n$danger: $red;\n$danger-hover: darken($danger, 8%);\n$light: $gray-100;\n$mid: $gray-400; //Added a mid color, useful for input styling\n$dark: $gray-800;\n$green-dark: scale-color($green, $lightness: -45%, $saturation: -10%);\n\n$theme-colors: () !default;\n$theme-colors: map-merge(\n (\n 'primary': $primary,\n 'primary-hover': $primary-hover,\n 'primary-light': $primary-light,\n 'primary-dark': $primary-dark,\n 'secondary': $secondary,\n 'success': $success,\n 'info': $info,\n 'warning': $warning,\n 'danger': $danger,\n 'light': $light,\n 'dark': $dark,\n 'mid': $mid,\n 'content-bg': $interfacegray,\n 'background': $interfaceblack,\n 'foreground': $interfacewhite,\n ),\n $theme-colors\n);\n\n$component-active-bg: $primary;\n$theme-color-interval: 9%;\n$yiq-contrasted-threshold: 180;\n\n// Override fonts\n$font-family-sans-serif: 'Fira Sans', -apple-system, blinkmacsystemfont,\n 'Segoe UI', 'Roboto', 'Helvetica Neue', arial, sans-serif; //fira sans then native system ui fallbacks\n$font-family-monospace: 'Fira Mono', menlo, monaco, consolas, 'Liberation Mono',\n 'Courier New', monospace;\n$font-family-base: $font-family-sans-serif;\n\n$headings-font-weight: 400;\n\n//Text overides\n$text-muted: $gray-400;\n\n//Style Selection highlight color\n//so browsers add alpha to your color by default, ignoring opacity 1\n//by setting rgba with 0.99 it tricks browser into thinking there is alpha applied\n$text-select-color: $primary-hover;\n$text-select-color-editor: lighten(\n $gray-700,\n 15%\n); //we lighten it abit to account for that 0.01 loss, and because it needs some anyways.\n\n//Grid variables, same value as default just making easily accessible\n$grid-gutter-width: 30px;\n\n//Visual Overrides\n$border-radius: 4px;\n$box-shadow: 0 0.1rem 1rem rgba($black, 45%); //because our UI is so dark, we need darker default shadows\n$box-shadow-900: 0 0.1rem 1rem rgba(0, 0, 0, 45%); //darkest shadow for $black popups over $black UI\n\n//Override Btn\n$btn-border-radius: 4rem;\n$btn-padding-x: 1.5rem;\n$btn-transition: color 0.12s ease-in-out, background-color 0.12s ease-in-out,\n border-color 0.12s ease-in-out, box-shadow 0.12s ease-in-out; //default 0.15 is too long\n$btn-border-width: 2px;\n\n//Override Inputs\n$input-bg: $gray-600;\n$input-disabled-bg: $gray-800;\n$input-color: $foreground;\n$input-border-color: $gray-400;\n$input-placeholder-color: $gray-400;\n$input-focus-border-color: rgba($primary, 85%);\n\n$input-btn-focus-width: 0.2rem;\n$input-btn-focus-color: rgba($component-active-bg, 35%);\n$input-btn-focus-box-shadow: 0 0 0 $input-btn-focus-width $input-btn-focus-color;\n\n//checkbox\n$custom-control-indicator-bg: $gray-600;\n$custom-control-indicator-bg-size: 75% 75%;\n$custom-control-indicator-disabled-bg: $gray-800;\n$custom-control-indicator-checked-disabled-bg: $gray-800;\n$custom-control-label-disabled-color: $gray-400;\n\n//Custom Select\n$custom-select-indicator-color: $gray-400;\n$custom-select-bg-size: 16px 16px;\n//dhSort icon encoded\n$custom-select-indicator: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='#{$custom-select-indicator-color}' d='M4 7l-.4-.8 4-3.7h.8l4 3.7-.4.8H4zm0 2l-.4.8 4 3.7h.8l4-3.7L12 9H4z'/%3E%3C/svg%3E\"),\n '#',\n '%23'\n);\n$custom-select-focus-box-shadow: $input-btn-focus-box-shadow;\n$custom-select-disabled-color: darken($gray-400, 5%);\n$custom-select-disabled-bg: $gray-800;\n\n//modal\n$modal-content-bg: $gray-200;\n$modal-content-border-width: 0;\n$modal-md: 550px;\n\n// Toast notification\n$toast-bg: $primary-dark;\n$toast-color: $foreground;\n$toast-error-bg: mix($danger, $content-bg, 15%);\n$toast-error-color: $foreground;\n\n//tooltips\n$tooltip-bg: $gray-700;\n$tooltip-color: $foreground;\n$tooltip-box-shadow: 0 0.1rem 1.5rem 0.1rem rgba($black, 80%);\n\n//drowdowns\n$dropdown-bg: $gray-600;\n$dropdown-link-color: $foreground;\n$dropdown-link-hover-color: $foreground;\n$dropdown-link-hover-bg: $primary;\n$dropdown-divider-bg: $gray-700;\n\n//context menus\n$contextmenu-bg: $gray-600;\n$contextmenu-color: $foreground;\n$contextmenu-disabled-color: $text-muted;\n$contextmenu-keyboard-selected-bg: rgba($primary, 50%);\n$contextmenu-selected-bg: $primary;\n$contextmenu-selected-color: $foreground;\n\n//links\n$link-color: $gray-400;\n$link-hover-color: $foreground;\n\n//progress-bar\n$progress-bg: $gray-600;\n$progress-border-radius: 1rem;\n\n// Set global options\n$enable-shadows: false;\n$enable-gradients: false;\n$enable-print-styles: false; //I don't think anyone should expect to \"print\" this app.\n\n// Transition times\n$transition: 0.15s;\n$transition-mid: 0.2s;\n$transition-long: 0.3s;\n$transition-slow: 0.6s;\n\n//form-validation icon, uses vsWarning icon encoded here as svg\n$form-feedback-icon-invalid-color: theme-color('danger');\n$form-feedback-icon-invalid: str-replace(\n url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cg fill='none'%3E%3Cg fill='#{$form-feedback-icon-invalid-color}'%3E%3Cpath d='M7.56 1h.88l6.54 12.26-.44.74H1.44L1 13.26 7.56 1zM8 2.28 2.28 13H13.7L8 2.28zM8.625 12v-1h-1.25v1h1.25zm-1.25-2V6h1.25v4h-1.25z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E \"),\n '#',\n '%23'\n);\n"]}
|