@leavittsoftware/web 1.22.0 → 1.23.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/leavitt/file-explorer/add-folder-modal.d.ts +359 -0
- package/leavitt/file-explorer/add-folder-modal.js +135 -0
- package/leavitt/file-explorer/add-folder-modal.js.map +1 -0
- package/leavitt/file-explorer/events/file-explorer-events.d.ts +4 -0
- package/leavitt/file-explorer/events/file-explorer-events.js +5 -0
- package/leavitt/file-explorer/events/file-explorer-events.js.map +1 -0
- package/leavitt/file-explorer/file-explorer-error.d.ts +7 -0
- package/leavitt/file-explorer/file-explorer-error.js +38 -0
- package/leavitt/file-explorer/file-explorer-error.js.map +1 -0
- package/leavitt/file-explorer/file-explorer-image.d.ts +9 -0
- package/leavitt/file-explorer/file-explorer-image.js +54 -0
- package/leavitt/file-explorer/file-explorer-image.js.map +1 -0
- package/leavitt/file-explorer/file-explorer-no-files.d.ts +7 -0
- package/leavitt/file-explorer/file-explorer-no-files.js +38 -0
- package/leavitt/file-explorer/file-explorer-no-files.js.map +1 -0
- package/leavitt/file-explorer/file-explorer-no-permission.d.ts +7 -0
- package/leavitt/file-explorer/file-explorer-no-permission.js +38 -0
- package/leavitt/file-explorer/file-explorer-no-permission.js.map +1 -0
- package/leavitt/file-explorer/file-explorer.d.ts +411 -0
- package/leavitt/file-explorer/file-explorer.js +871 -0
- package/leavitt/file-explorer/file-explorer.js.map +1 -0
- package/leavitt/file-explorer/file-list-item.d.ts +15 -0
- package/leavitt/file-explorer/file-list-item.js +273 -0
- package/leavitt/file-explorer/file-list-item.js.map +1 -0
- package/leavitt/file-explorer/file-modal.d.ts +362 -0
- package/leavitt/file-explorer/file-modal.js +323 -0
- package/leavitt/file-explorer/file-modal.js.map +1 -0
- package/leavitt/file-explorer/folder-list-item.d.ts +14 -0
- package/leavitt/file-explorer/folder-list-item.js +188 -0
- package/leavitt/file-explorer/folder-list-item.js.map +1 -0
- package/leavitt/file-explorer/folder-modal.d.ts +360 -0
- package/leavitt/file-explorer/folder-modal.js +226 -0
- package/leavitt/file-explorer/folder-modal.js.map +1 -0
- package/leavitt/file-explorer/helpers/file-types.d.ts +2 -0
- package/leavitt/file-explorer/helpers/file-types.js +19 -0
- package/leavitt/file-explorer/helpers/file-types.js.map +1 -0
- package/leavitt/file-explorer/helpers/format-bytes.d.ts +2 -0
- package/leavitt/file-explorer/helpers/format-bytes.js +8 -0
- package/leavitt/file-explorer/helpers/format-bytes.js.map +1 -0
- package/package.json +2 -2
- package/titanium/styles/data-row.js +7 -0
- package/titanium/styles/data-row.js.map +1 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { css, html, LitElement, nothing } from 'lit';
|
|
3
|
+
import { customElement, property, query, state } from 'lit/decorators.js';
|
|
4
|
+
import '@material/web/dialog/dialog';
|
|
5
|
+
import '@material/web/icon/icon';
|
|
6
|
+
import '@material/web/iconbutton/icon-button';
|
|
7
|
+
import '@material/web/button/text-button';
|
|
8
|
+
import '@material/web/textfield/filled-text-field';
|
|
9
|
+
import '../profile-picture/profile-picture';
|
|
10
|
+
import dayjs from 'dayjs/esm';
|
|
11
|
+
import { a, dataRow, ellipsis, h1, h5, p } from '../../titanium/styles/styles';
|
|
12
|
+
import fileExplorerEvents from './events/file-explorer-events';
|
|
13
|
+
import { TitaniumSnackbarSingleton } from '../../titanium/snackbar/snackbar';
|
|
14
|
+
import { LoadWhile } from '../../titanium/helpers/helpers';
|
|
15
|
+
let FolderModal = class FolderModal extends LoadWhile(LitElement) {
|
|
16
|
+
#apiService_accessor_storage;
|
|
17
|
+
get apiService() { return this.#apiService_accessor_storage; }
|
|
18
|
+
set apiService(value) { this.#apiService_accessor_storage = value; }
|
|
19
|
+
#enableEditing_accessor_storage = false;
|
|
20
|
+
get enableEditing() { return this.#enableEditing_accessor_storage; }
|
|
21
|
+
set enableEditing(value) { this.#enableEditing_accessor_storage = value; }
|
|
22
|
+
#state_accessor_storage = 'view';
|
|
23
|
+
get state() { return this.#state_accessor_storage; }
|
|
24
|
+
set state(value) { this.#state_accessor_storage = value; }
|
|
25
|
+
#folder_accessor_storage = null;
|
|
26
|
+
get folder() { return this.#folder_accessor_storage; }
|
|
27
|
+
set folder(value) { this.#folder_accessor_storage = value; }
|
|
28
|
+
#folderName_accessor_storage;
|
|
29
|
+
get folderName() { return this.#folderName_accessor_storage; }
|
|
30
|
+
set folderName(value) { this.#folderName_accessor_storage = value; }
|
|
31
|
+
#dialog_accessor_storage;
|
|
32
|
+
get dialog() { return this.#dialog_accessor_storage; }
|
|
33
|
+
set dialog(value) { this.#dialog_accessor_storage = value; }
|
|
34
|
+
firstUpdated() {
|
|
35
|
+
fileExplorerEvents.subscribe('FileExplorerFolder', 'Update', (o) => {
|
|
36
|
+
if (o.Id === this.folder?.Id) {
|
|
37
|
+
this.folder = { ...this.folder, ...o };
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
async #saveFolderName() {
|
|
42
|
+
if (!this.apiService || this.folderName === this.folder?.Name || !this.folderName) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const dto = {
|
|
46
|
+
Name: this.folderName,
|
|
47
|
+
};
|
|
48
|
+
try {
|
|
49
|
+
const patch = this.apiService.patchAsync(`FileExplorerFolders(${this.folder?.Id})`, dto);
|
|
50
|
+
this.loadWhile(patch);
|
|
51
|
+
await patch;
|
|
52
|
+
fileExplorerEvents.dispatch('FileExplorerFolder', 'Update', { ...this.folder, Name: this.folderName });
|
|
53
|
+
this.state = 'view';
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
TitaniumSnackbarSingleton.open(error);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
open(folder) {
|
|
60
|
+
this.folder = folder;
|
|
61
|
+
this.state = 'view';
|
|
62
|
+
this.dialog.show();
|
|
63
|
+
}
|
|
64
|
+
static { this.styles = [
|
|
65
|
+
h1,
|
|
66
|
+
h5,
|
|
67
|
+
p,
|
|
68
|
+
a,
|
|
69
|
+
ellipsis,
|
|
70
|
+
dataRow,
|
|
71
|
+
css `
|
|
72
|
+
:host {
|
|
73
|
+
display: block;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
md-dialog {
|
|
77
|
+
min-width: 550px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
static-header {
|
|
81
|
+
height: 80px;
|
|
82
|
+
display: grid;
|
|
83
|
+
grid: 'icon input button' / auto 1fr auto;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
static-header h1 {
|
|
87
|
+
word-break: break-all;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
md-icon-button[save] {
|
|
91
|
+
--md-icon-button-icon-color: var(--md-sys-color-primary);
|
|
92
|
+
--md-icon-button-focus-icon-color: var(--md-sys-color-primary);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
md-filled-text-field {
|
|
96
|
+
width: 100%;
|
|
97
|
+
--md-filled-text-field-container-shape-start-start: 16px;
|
|
98
|
+
--md-filled-text-field-container-shape-start-end: 16px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
main {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: column;
|
|
104
|
+
gap: 12px;
|
|
105
|
+
overflow: auto;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
data-row {
|
|
109
|
+
margin: 0;
|
|
110
|
+
border: none;
|
|
111
|
+
padding: 8px 24px 8px 0px;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
data-row p {
|
|
115
|
+
max-width: 450px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@media (max-width: 620px) {
|
|
119
|
+
md-dialog {
|
|
120
|
+
min-width: initial;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (max-width: 480px) {
|
|
125
|
+
header {
|
|
126
|
+
gap: 12px;
|
|
127
|
+
align-items: center;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
header {
|
|
131
|
+
flex-direction: column;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[hidden] {
|
|
136
|
+
display: none;
|
|
137
|
+
}
|
|
138
|
+
`,
|
|
139
|
+
]; }
|
|
140
|
+
render() {
|
|
141
|
+
return html `
|
|
142
|
+
<md-dialog>
|
|
143
|
+
${this.state === 'view'
|
|
144
|
+
? html `<static-header slot="headline"
|
|
145
|
+
><md-icon>folder</md-icon>
|
|
146
|
+
<h1>${this.folder?.Name}</h1>
|
|
147
|
+
<md-icon-button
|
|
148
|
+
?hidden=${!this.enableEditing}
|
|
149
|
+
@click=${() => {
|
|
150
|
+
this.state = 'edit';
|
|
151
|
+
this.folderName = this.folder?.Name ?? '';
|
|
152
|
+
}}
|
|
153
|
+
>
|
|
154
|
+
<md-icon>create</md-icon>
|
|
155
|
+
</md-icon-button>
|
|
156
|
+
</static-header>`
|
|
157
|
+
: html `<md-filled-text-field
|
|
158
|
+
slot="headline"
|
|
159
|
+
label="Folder name"
|
|
160
|
+
.value=${this.folderName ?? ''}
|
|
161
|
+
@input=${(event) => (this.folderName = event.target.value)}
|
|
162
|
+
>
|
|
163
|
+
<md-icon-button slot="trailing-icon" @click=${() => (this.state = 'view')} ?disabled=${this.isLoading}>
|
|
164
|
+
<md-icon>cancel</md-icon>
|
|
165
|
+
</md-icon-button>
|
|
166
|
+
<md-icon-button
|
|
167
|
+
save
|
|
168
|
+
slot="trailing-icon"
|
|
169
|
+
?disabled=${this.folderName === this.folder?.Name || !this.folderName || this.isLoading}
|
|
170
|
+
@click=${() => this.#saveFolderName()}
|
|
171
|
+
>
|
|
172
|
+
<md-icon>save</md-icon>
|
|
173
|
+
</md-icon-button>
|
|
174
|
+
</md-filled-text-field>`}
|
|
175
|
+
<main slot="content">
|
|
176
|
+
<data-row force-stacked>
|
|
177
|
+
<h5>Files</h5>
|
|
178
|
+
<p>${this.folder?.FilesCount}</p>
|
|
179
|
+
</data-row>
|
|
180
|
+
<data-row force-stacked>
|
|
181
|
+
<h5>Folders</h5>
|
|
182
|
+
<p>${this.folder?.FoldersCount}</p>
|
|
183
|
+
</data-row>
|
|
184
|
+
<data-row force-stacked>
|
|
185
|
+
<h5>Created</h5>
|
|
186
|
+
<p>${dayjs(this.folder?.CreatedDate).format('MMM D, YYYY h:mm:ss a')}</p>
|
|
187
|
+
</data-row>
|
|
188
|
+
${!this.folder?.CreatorId
|
|
189
|
+
? nothing
|
|
190
|
+
: html `<data-row force-stacked>
|
|
191
|
+
<h5>Created by</h5>
|
|
192
|
+
<p image>
|
|
193
|
+
<profile-picture size="24" .fileName=${this.folder.CreatorProfilePictureCndFileName}></profile-picture> ${this.folder?.CreatorFullName}
|
|
194
|
+
</p>
|
|
195
|
+
</data-row>`}
|
|
196
|
+
</main>
|
|
197
|
+
<div slot="actions">
|
|
198
|
+
<md-text-button @click=${() => this.dialog.close()}> Close </md-text-button>
|
|
199
|
+
</div>
|
|
200
|
+
</md-dialog>
|
|
201
|
+
`;
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
__decorate([
|
|
205
|
+
property({ attribute: false })
|
|
206
|
+
], FolderModal.prototype, "apiService", null);
|
|
207
|
+
__decorate([
|
|
208
|
+
property({ type: Boolean })
|
|
209
|
+
], FolderModal.prototype, "enableEditing", null);
|
|
210
|
+
__decorate([
|
|
211
|
+
state()
|
|
212
|
+
], FolderModal.prototype, "state", null);
|
|
213
|
+
__decorate([
|
|
214
|
+
state()
|
|
215
|
+
], FolderModal.prototype, "folder", null);
|
|
216
|
+
__decorate([
|
|
217
|
+
state()
|
|
218
|
+
], FolderModal.prototype, "folderName", null);
|
|
219
|
+
__decorate([
|
|
220
|
+
query('md-dialog')
|
|
221
|
+
], FolderModal.prototype, "dialog", null);
|
|
222
|
+
FolderModal = __decorate([
|
|
223
|
+
customElement('leavitt-folder-modal')
|
|
224
|
+
], FolderModal);
|
|
225
|
+
export { FolderModal };
|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,MAAM,CAAC,uBAAuB,CAAC;;YAEpE,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS;YACvB,CAAC,CAAC,OAAO;YACT,CAAC,CAAC,IAAI,CAAA;;;yDAGuC,IAAI,CAAC,MAAM,CAAC,gCAAgC,uBAAuB,IAAI,CAAC,MAAM,EAAE,eAAe;;0BAE9H;;;mCAGS,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;;;KAGvD,CAAC;IACJ,CAAC;;AAtLwC;IAAxC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6CAAwC;AACjC;IAArC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;gDAAyC;AAE3C;IAAzB,KAAK,EAAE;wCAAkD;AAChC;IAAzB,KAAK,EAAE;yCAA8D;AAC5C;IAAzB,KAAK,EAAE;6CAAqC;AAER;IAApC,KAAK,CAAC,WAAW,CAAC;yCAAoC;AAR5C,WAAW;IADvB,aAAa,CAAC,sBAAsB,CAAC;GACzB,WAAW,CAwLvB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export function getIcon(extension) {
|
|
2
|
+
if (extension === 'pdf' || extension === 'txt' || extension === 'rtf' || extension === 'doc' || extension === 'docx' || extension === 'csv') {
|
|
3
|
+
return 'article';
|
|
4
|
+
}
|
|
5
|
+
if (extension === 'pptx' || extension === 'pptm' || extension === 'ppt') {
|
|
6
|
+
return 'slideshow';
|
|
7
|
+
}
|
|
8
|
+
if (extension === 'xlsx' || extension === 'xlsx') {
|
|
9
|
+
return 'text_snippet';
|
|
10
|
+
}
|
|
11
|
+
if (extension === 'jpg' || extension === 'jpeg' || extension === 'png' || extension === 'webp' || extension === 'ico' || extension === 'svg') {
|
|
12
|
+
return 'photo';
|
|
13
|
+
}
|
|
14
|
+
if (extension === 'mp4') {
|
|
15
|
+
return 'movie';
|
|
16
|
+
}
|
|
17
|
+
return 'article';
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=file-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-types.js","sourceRoot":"","sources":["file-types.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,OAAO,CAAC,SAAiB;IACvC,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QAC5I,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QACxE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,MAAM,EAAE,CAAC;QACjD,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,MAAM,IAAI,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QAC7I,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,IAAI,SAAS,KAAK,KAAK,EAAE,CAAC;QACxB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export function formatBytes(bytes, decimalPlaces = 2) {
|
|
2
|
+
if (0 === bytes) {
|
|
3
|
+
return '0 Bytes';
|
|
4
|
+
}
|
|
5
|
+
const c = 1024, d = decimalPlaces || 2, e = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'], f = Math.floor(Math.log(bytes) / Math.log(c));
|
|
6
|
+
return parseFloat((bytes / Math.pow(c, f)).toFixed(d)) + ' ' + e[f];
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=format-bytes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-bytes.js","sourceRoot":"","sources":["format-bytes.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,CAAC;IAClD,IAAI,CAAC,KAAK,KAAK,EAAE,CAAC;QAChB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,CAAC,GAAG,IAAI,EACZ,CAAC,GAAG,aAAa,IAAI,CAAC,EACtB,CAAC,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,EAC7D,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAChD,OAAO,UAAU,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@leavittsoftware/web",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"files": [
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"url": "https://github.com/LeavittSoftware/titanium-elements/issues"
|
|
40
40
|
},
|
|
41
41
|
"homepage": "https://github.com/LeavittSoftware/titanium-elements/#readme",
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "dbf57f8f5ba428be0330cb1c92af1a046a452849"
|
|
43
43
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data-row.js","sourceRoot":"","sources":["data-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE;IACF,CAAC;IACD,GAAG,CAAA
|
|
1
|
+
{"version":3,"file":"data-row.js","sourceRoot":"","sources":["data-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,EAAE;IACF,CAAC;IACD,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkDF;CACF,CAAC"}
|