@fmsim/board 1.0.35 → 1.0.38
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/.storybook/main.ts +58 -0
- package/.storybook/preview.ts +15 -0
- package/custom-elements.json +1947 -874
- package/dist/src/component/index.d.ts +3 -1
- package/dist/src/component/index.js +3 -1
- package/dist/src/component/index.js.map +1 -1
- package/dist/src/component/restful-attachment-creation-card.d.ts +18 -0
- package/dist/src/component/restful-attachment-creation-card.js +264 -0
- package/dist/src/component/restful-attachment-creation-card.js.map +1 -0
- package/dist/src/component/restful-attachment-selector.d.ts +36 -0
- package/dist/src/component/restful-attachment-selector.js +663 -0
- package/dist/src/component/restful-attachment-selector.js.map +1 -0
- package/dist/src/component/restful-file-selector.d.ts +14 -0
- package/dist/src/component/restful-file-selector.js +181 -0
- package/dist/src/component/restful-file-selector.js.map +1 -0
- package/dist/src/component/restful-input-attachment-selector.d.ts +16 -0
- package/dist/src/component/restful-input-attachment-selector.js +110 -0
- package/dist/src/component/restful-input-attachment-selector.js.map +1 -0
- package/dist/src/component/restful-input-fill-style.d.ts +45 -0
- package/dist/src/component/restful-input-fill-style.js +344 -0
- package/dist/src/component/restful-input-fill-style.js.map +1 -0
- package/dist/src/component/restrul-input-background-pattern.d.ts +35 -0
- package/dist/src/component/restrul-input-background-pattern.js +183 -0
- package/dist/src/component/restrul-input-background-pattern.js.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/modeller/property-sidebar/styles/styles.d.ts +1 -0
- package/dist/src/modeller/property-sidebar/styles/styles.js +5 -1
- package/dist/src/modeller/property-sidebar/styles/styles.js.map +1 -1
- package/dist/stories/restful-attachment-selector.stories.d.ts +30 -0
- package/dist/stories/restful-attachment-selector.stories.js +104 -0
- package/dist/stories/restful-attachment-selector.stories.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/icons/attachment/btn-copy-link-hover.svg +4 -0
- package/icons/attachment/btn-copy-link.svg +4 -0
- package/icons/attachment/btn-delete-hover.svg +4 -0
- package/icons/attachment/btn-delete.svg +4 -0
- package/icons/attachment/btn-download-hover.svg +4 -0
- package/icons/attachment/btn-download.svg +4 -0
- package/icons/attachment/btn-zoom-hover.svg +4 -0
- package/icons/attachment/btn-zoom.svg +4 -0
- package/icons/attachment/file.svg +3 -0
- package/icons/board/btn-add-board.svg +5 -0
- package/icons/board/btn-add-list.svg +5 -0
- package/icons/board/btn-close-dropbox.svg +3 -0
- package/icons/board/btn-edit-hover.svg +4 -0
- package/icons/board/btn-edit.svg +4 -0
- package/icons/board/btn-favorite-hover-on.svg +4 -0
- package/icons/board/btn-favorite-hover.svg +4 -0
- package/icons/board/btn-favorite-on.svg +4 -0
- package/icons/board/btn-favorite.svg +4 -0
- package/icons/board/btn-info-hover.svg +3 -0
- package/icons/board/btn-info.svg +3 -0
- package/icons/board/btn-open-dropbox.svg +3 -0
- package/icons/board/btn-users.svg +4 -0
- package/icons/board/favorite_black.svg +1 -0
- package/icons/group-bar/btn-add-list.png +0 -0
- package/icons/group-bar/btn-close-dropbox.png +0 -0
- package/icons/group-bar/btn-edit.png +0 -0
- package/icons/group-bar/btn-open-dropbox-color.png +0 -0
- package/icons/group-bar/btn-search-name.png +0 -0
- package/package.json +11 -7
- package/stories/restful-attachment-selector.stories.ts +113 -0
- package/.storybook/main.js +0 -3
- package/dist/stories/index.stories.d.ts +0 -33
- package/dist/stories/index.stories.js +0 -33
- package/dist/stories/index.stories.js.map +0 -1
- package/stories/index.stories.ts +0 -52
|
@@ -0,0 +1,663 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import './restful-attachment-creation-card.js';
|
|
3
|
+
import { css, html, LitElement, unsafeCSS } from 'lit';
|
|
4
|
+
import { customElement, property, query } from 'lit/decorators.js';
|
|
5
|
+
import { i18next, localize } from '@operato/i18n';
|
|
6
|
+
import { ScrollbarStyles, TooltipStyles } from '@operato/styles';
|
|
7
|
+
import { sleep } from '@operato/utils';
|
|
8
|
+
import { fetchAttachmentList, getRestServiceFullPath, createAttachment, deleteAttachment, deleteFile, getRestServiceSecondaryUrl } from '@fmsim/api/restful.js';
|
|
9
|
+
const btnOpenDropboxColor = require('../../../icons/group-bar/btn-open-dropbox-color.png');
|
|
10
|
+
const btnCloseDropbox = require('../../../icons/group-bar/btn-close-dropbox.png');
|
|
11
|
+
const btnAddList = require('../../../icons/group-bar/btn-add-list.png');
|
|
12
|
+
const btnZoom = require('../../../icons/attachment/btn-zoom.svg');
|
|
13
|
+
const btnZoomHover = require('../../../icons/attachment/btn-zoom-hover.svg');
|
|
14
|
+
const btnCopyLink = require('../../../icons/attachment/btn-copy-link.svg');
|
|
15
|
+
const btnCopyLinkHover = require('../../../icons/attachment/btn-copy-link-hover.svg');
|
|
16
|
+
const btnDelete = require('../../../icons/attachment/btn-delete.svg');
|
|
17
|
+
const btnDeleteHover = require('../../../icons/attachment/btn-delete-hover.svg');
|
|
18
|
+
const btnDownload = require('../../../icons/attachment/btn-download.svg');
|
|
19
|
+
const btnDownloadHover = require('../../../icons/attachment/btn-download-hover.svg');
|
|
20
|
+
const file = require('../../../icons/attachment/file.svg');
|
|
21
|
+
let RestfulAttachmentSelector = class RestfulAttachmentSelector extends localize(i18next)(LitElement) {
|
|
22
|
+
constructor() {
|
|
23
|
+
super(...arguments);
|
|
24
|
+
this.categories = ['audio', 'video', 'image', 'text', 'application'];
|
|
25
|
+
this.attachments = [];
|
|
26
|
+
this._page = 1;
|
|
27
|
+
this._total = 0;
|
|
28
|
+
this.btnDropBoxIcon = 'btn-open-dropbox';
|
|
29
|
+
this.userName = localStorage.getItem('FMB_userNM') || '';
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
return html `
|
|
33
|
+
<div id="filter">
|
|
34
|
+
<div class="group-select-box" @click=${this.toggleSelectBox}>
|
|
35
|
+
${this.category
|
|
36
|
+
? html ` <span>${this.category}</span> `
|
|
37
|
+
: html ` <span>${i18next.t('text.please choose a category')}</span> `}
|
|
38
|
+
<span><i class=${this.btnDropBoxIcon}></i></span>
|
|
39
|
+
<ul class=${`select-box ${this.selectBoxToggle}`}>
|
|
40
|
+
<li
|
|
41
|
+
value=""
|
|
42
|
+
@click=${(e) => {
|
|
43
|
+
this.category = '';
|
|
44
|
+
this.requestUpdate();
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
<a>${i18next.t('text.please choose a category')}</a>
|
|
48
|
+
</li>
|
|
49
|
+
${this.categories.map(category => html ` <li
|
|
50
|
+
value=${category}
|
|
51
|
+
@click=${(e) => {
|
|
52
|
+
this.category = category;
|
|
53
|
+
this.requestUpdate();
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
56
|
+
<a>${category}</a>
|
|
57
|
+
</li>`)}
|
|
58
|
+
</ul>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div id="main">
|
|
63
|
+
${this.creatable
|
|
64
|
+
? html `
|
|
65
|
+
<restful-attachment-creation-card
|
|
66
|
+
class="card create"
|
|
67
|
+
.categories=${this.categories}
|
|
68
|
+
.defaultCategory=${this.category}
|
|
69
|
+
@create-attachment=${(e) => this.onCreateAttachment(e)}
|
|
70
|
+
@file-drop=${(e) => this.onAttachmentDropped(e)}
|
|
71
|
+
></restful-attachment-creation-card>
|
|
72
|
+
`
|
|
73
|
+
: html ``}
|
|
74
|
+
${this.attachments.map(attachment => {
|
|
75
|
+
var _a;
|
|
76
|
+
var url = attachment.fullpath;
|
|
77
|
+
return html `
|
|
78
|
+
<div class="card" @click=${(e) => this.onClickSelect(attachment)}>
|
|
79
|
+
<div show>
|
|
80
|
+
${attachment.category == 'image'
|
|
81
|
+
? html ` <img src=${url} /> `
|
|
82
|
+
: attachment.category == 'video'
|
|
83
|
+
? html ` <video src=${url} controls></video> `
|
|
84
|
+
: html `
|
|
85
|
+
<div etc>
|
|
86
|
+
<i class="file"></i>
|
|
87
|
+
<span>${(_a = attachment.path) === null || _a === void 0 ? void 0 : _a.substr(attachment.path.lastIndexOf('.'))}</span>
|
|
88
|
+
</div>
|
|
89
|
+
`}
|
|
90
|
+
</div>
|
|
91
|
+
<a target="_blank" href=${url}>
|
|
92
|
+
<span class="btn-zoom-cover"><i class="btn-zoom"></i></span>
|
|
93
|
+
</a>
|
|
94
|
+
<div class="name">${attachment.name}</div>
|
|
95
|
+
<span @click=${(e) => this.onDeleteAttachment(attachment.id)} delete>
|
|
96
|
+
<i class="btn-delete"></i>
|
|
97
|
+
</span>
|
|
98
|
+
<a href=${attachment.download + '/' + encodeURIComponent(attachment.name)} download=${attachment.name}>
|
|
99
|
+
<span class="btn-download-cover" download><i class="btn-download"></i></span>
|
|
100
|
+
</a>
|
|
101
|
+
</div>
|
|
102
|
+
`;
|
|
103
|
+
})}
|
|
104
|
+
</div>
|
|
105
|
+
`;
|
|
106
|
+
}
|
|
107
|
+
toggleSelectBox() {
|
|
108
|
+
if (this.selectBoxToggle === 'on') {
|
|
109
|
+
this.selectBoxToggle = null;
|
|
110
|
+
this.btnDropBoxIcon = 'btn-close-dropbox';
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
this.selectBoxToggle = 'on';
|
|
114
|
+
this.btnDropBoxIcon = 'btn-open-dropbox';
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
async firstUpdated() {
|
|
118
|
+
this.renderRoot.addEventListener('click', async (e) => {
|
|
119
|
+
var target = e.target;
|
|
120
|
+
var url = target.getAttribute('data-clipboard-url');
|
|
121
|
+
if (url) {
|
|
122
|
+
var { protocol, hostname, port } = location;
|
|
123
|
+
await this.copy(`${protocol}//${hostname}:${port}${url}`);
|
|
124
|
+
target.setAttribute('data-tooltip', 'url copied!');
|
|
125
|
+
await sleep(2000);
|
|
126
|
+
target.removeAttribute('data-tooltip');
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
this.refreshAttachments();
|
|
130
|
+
}
|
|
131
|
+
updated(changed) {
|
|
132
|
+
if (changed.has('category')) {
|
|
133
|
+
this.refreshAttachments();
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
onClickSelect(attachment) {
|
|
137
|
+
this.dispatchEvent(new CustomEvent('attachment-selected', {
|
|
138
|
+
composed: true,
|
|
139
|
+
bubbles: true,
|
|
140
|
+
detail: {
|
|
141
|
+
attachment
|
|
142
|
+
}
|
|
143
|
+
}));
|
|
144
|
+
}
|
|
145
|
+
async onAttachmentDropped(e) {
|
|
146
|
+
var files = e.detail;
|
|
147
|
+
await this.createAttachments('', files);
|
|
148
|
+
this.refreshAttachments();
|
|
149
|
+
}
|
|
150
|
+
async onCreateAttachment(e) {
|
|
151
|
+
var { category, files, fileId } = e.detail;
|
|
152
|
+
files = Array.from(files);
|
|
153
|
+
await this.createAttachments(category, files, fileId);
|
|
154
|
+
this.refreshAttachments();
|
|
155
|
+
}
|
|
156
|
+
async onDeleteAttachment(id) {
|
|
157
|
+
await this.deleteAttachment(id);
|
|
158
|
+
this.refreshAttachments();
|
|
159
|
+
}
|
|
160
|
+
async refreshAttachments() {
|
|
161
|
+
var attachments = await this.getAttachments();
|
|
162
|
+
this.attachments = [...attachments];
|
|
163
|
+
if (this.creationCard) {
|
|
164
|
+
this.creationCard.reset();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
async appendAttachments() {
|
|
168
|
+
var attachments = await this.getAttachments({ page: this._page + 1 });
|
|
169
|
+
this.attachments = [...this.attachments, ...attachments];
|
|
170
|
+
}
|
|
171
|
+
async getAttachments({ page = 1, limit = 1000 } = {}) {
|
|
172
|
+
var _a;
|
|
173
|
+
var filters = [];
|
|
174
|
+
var sortings = [];
|
|
175
|
+
var pagination = {
|
|
176
|
+
limit,
|
|
177
|
+
page
|
|
178
|
+
};
|
|
179
|
+
if (this.category)
|
|
180
|
+
filters.push({
|
|
181
|
+
name: 'category',
|
|
182
|
+
operator: 'eq',
|
|
183
|
+
value: this.category
|
|
184
|
+
});
|
|
185
|
+
var params = {
|
|
186
|
+
filters,
|
|
187
|
+
sortings,
|
|
188
|
+
pagination
|
|
189
|
+
};
|
|
190
|
+
let response = (_a = (await fetchAttachmentList(params))) === null || _a === void 0 ? void 0 : _a.data;
|
|
191
|
+
if (!response || !response.status) {
|
|
192
|
+
throw new Error('Error : fetchAttachmentList');
|
|
193
|
+
}
|
|
194
|
+
let attachmentListResponse = response.attachments;
|
|
195
|
+
if (!attachmentListResponse || !attachmentListResponse.items.length)
|
|
196
|
+
return [];
|
|
197
|
+
attachmentListResponse.items.forEach((attachment) => {
|
|
198
|
+
attachment.fullpath = getRestServiceFullPath() + '/images/' + attachment.path;
|
|
199
|
+
attachment.download = getRestServiceFullPath() + '/downloadFile/' + attachment.path;
|
|
200
|
+
});
|
|
201
|
+
this._total = attachmentListResponse.total;
|
|
202
|
+
this._page = page;
|
|
203
|
+
return attachmentListResponse.items;
|
|
204
|
+
}
|
|
205
|
+
async createAttachments(category, files, fileId) {
|
|
206
|
+
var _a;
|
|
207
|
+
try {
|
|
208
|
+
files[0].category = category;
|
|
209
|
+
files[0].fileId = fileId;
|
|
210
|
+
const body = {
|
|
211
|
+
category: files[0].category,
|
|
212
|
+
name: files[0].name,
|
|
213
|
+
size: files[0].size,
|
|
214
|
+
type: files[0].type,
|
|
215
|
+
fileId: files[0].fileId,
|
|
216
|
+
userName: this.userName
|
|
217
|
+
};
|
|
218
|
+
let result = (_a = (await createAttachment(body))) === null || _a === void 0 ? void 0 : _a.data;
|
|
219
|
+
if (!result || !result.status)
|
|
220
|
+
throw new Error('Create Error');
|
|
221
|
+
}
|
|
222
|
+
catch (ex) {
|
|
223
|
+
document.dispatchEvent(new CustomEvent('notify', {
|
|
224
|
+
detail: {
|
|
225
|
+
level: 'error',
|
|
226
|
+
message: ex,
|
|
227
|
+
ex: ex
|
|
228
|
+
}
|
|
229
|
+
}));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
async deleteAttachment(id) {
|
|
233
|
+
var _a, _b, _c;
|
|
234
|
+
let server = 'Primary';
|
|
235
|
+
try {
|
|
236
|
+
const result = (_a = (await deleteAttachment(id))) === null || _a === void 0 ? void 0 : _a.data;
|
|
237
|
+
if (!result || !result.status)
|
|
238
|
+
throw new Error('DB Error');
|
|
239
|
+
const deleteFileResult = (_b = (await deleteFile(result.attachment.path, 'primary'))) === null || _b === void 0 ? void 0 : _b.data;
|
|
240
|
+
if (!deleteFileResult || !deleteFileResult.status) {
|
|
241
|
+
throw new Error('Primary Server File Delete Error');
|
|
242
|
+
}
|
|
243
|
+
if (getRestServiceSecondaryUrl()) {
|
|
244
|
+
server = 'Secondary';
|
|
245
|
+
const deleteFileResultSecond = (_c = (await deleteFile(result.attachment.path, 'secondary'))) === null || _c === void 0 ? void 0 : _c.data;
|
|
246
|
+
if (!deleteFileResultSecond || !deleteFileResultSecond.status) {
|
|
247
|
+
throw new Error('Secondary Server File Delete Error');
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
catch (ex) {
|
|
252
|
+
document.dispatchEvent(new CustomEvent('notify', {
|
|
253
|
+
detail: {
|
|
254
|
+
level: 'error',
|
|
255
|
+
message: server + ' Server File Delete Error // ' + ex,
|
|
256
|
+
ex: ex
|
|
257
|
+
}
|
|
258
|
+
}));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
async copy(copied) {
|
|
262
|
+
var textArea = document.createElement('textarea');
|
|
263
|
+
textArea.style.position = 'absolute';
|
|
264
|
+
textArea.style.opacity = '0';
|
|
265
|
+
textArea.value = copied;
|
|
266
|
+
document.body.appendChild(textArea);
|
|
267
|
+
await sleep(100);
|
|
268
|
+
textArea.select();
|
|
269
|
+
document.execCommand('copy');
|
|
270
|
+
document.body.removeChild(textArea);
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
RestfulAttachmentSelector.styles = [
|
|
274
|
+
ScrollbarStyles,
|
|
275
|
+
TooltipStyles,
|
|
276
|
+
css `
|
|
277
|
+
:host {
|
|
278
|
+
display: flex;
|
|
279
|
+
flex-direction: column;
|
|
280
|
+
overflow: hidden;
|
|
281
|
+
background-color: #fff;
|
|
282
|
+
/* --card-list-create-color: var(--primary-color); */
|
|
283
|
+
|
|
284
|
+
position: relative;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
:host(.candrop) {
|
|
288
|
+
background: orange;
|
|
289
|
+
cursor: pointer;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
#main {
|
|
293
|
+
overflow: auto;
|
|
294
|
+
padding: var(--popup-content-padding);
|
|
295
|
+
display: grid;
|
|
296
|
+
grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
297
|
+
grid-auto-rows: var(--card-list-rows-height);
|
|
298
|
+
grid-gap: 20px;
|
|
299
|
+
padding-top: 10px !important;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
#main .card {
|
|
303
|
+
display: flex;
|
|
304
|
+
flex-direction: column;
|
|
305
|
+
align-items: center;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
border-radius: var(--card-list-border-radius);
|
|
308
|
+
border: var(--attachment-selector-border);
|
|
309
|
+
background-color: var(--attachment-selector-background-color);
|
|
310
|
+
|
|
311
|
+
position: relative;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
#main .card.create {
|
|
315
|
+
overflow: visible;
|
|
316
|
+
background-color: initial;
|
|
317
|
+
min-height: 120px;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
#main .card:hover {
|
|
321
|
+
cursor: pointer;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.name {
|
|
325
|
+
background-color: var(--primary-color);
|
|
326
|
+
opacity: 0.8;
|
|
327
|
+
position: absolute;
|
|
328
|
+
bottom: 0px;
|
|
329
|
+
width: 100%;
|
|
330
|
+
padding: 2px 5px;
|
|
331
|
+
font: var(--attachment-selector-name-font);
|
|
332
|
+
color: #fff;
|
|
333
|
+
text-indent: 7px;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
[show] {
|
|
337
|
+
height: 100%;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
.card img,
|
|
341
|
+
.card video {
|
|
342
|
+
max-height: 100%;
|
|
343
|
+
max-width: 100%;
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
mwc-icon {
|
|
347
|
+
position: absolute;
|
|
348
|
+
right: 0px;
|
|
349
|
+
text-align: center;
|
|
350
|
+
|
|
351
|
+
background-color: var(--attachment-selector-icon-background-color);
|
|
352
|
+
width: var(--attachment-selector-icon-size);
|
|
353
|
+
height: var(--attachment-selector-icon-size);
|
|
354
|
+
font: var(--attachment-selector-icon-font);
|
|
355
|
+
color: var(--attachment-selector-icon-color);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
mwc-icon:hover,
|
|
359
|
+
mwc-icon:active,
|
|
360
|
+
span:hover,
|
|
361
|
+
span:active {
|
|
362
|
+
background-color: var(--primary-color);
|
|
363
|
+
color: #fff;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
[open-in-new] {
|
|
367
|
+
top: 0px;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
[delete] {
|
|
371
|
+
top: 35px;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
[download] {
|
|
375
|
+
top: 70px;
|
|
376
|
+
border-bottom-left-radius: 12px;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
#filter {
|
|
380
|
+
padding: 12px 12px 12px 20px;
|
|
381
|
+
background-color: var(--group-bar-background-color);
|
|
382
|
+
height: 28px;
|
|
383
|
+
z-index: 1;
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
select {
|
|
387
|
+
text-transform: capitalize;
|
|
388
|
+
float: right;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
[etc] mwc-icon:hover,
|
|
392
|
+
[etc] mwc-icon:active {
|
|
393
|
+
background-color: initial;
|
|
394
|
+
color: initial;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
[etc] {
|
|
398
|
+
margin: auto;
|
|
399
|
+
margin-top: 45px;
|
|
400
|
+
position: relative;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
[etc] mwc-icon {
|
|
404
|
+
position: initial;
|
|
405
|
+
opacity: 0.2;
|
|
406
|
+
width: initial;
|
|
407
|
+
height: initial;
|
|
408
|
+
|
|
409
|
+
font: var(--attachment-selector-etc-icon-font);
|
|
410
|
+
color: var(--attachment-selector-etc-icon-color);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
[etc] span {
|
|
414
|
+
position: absolute;
|
|
415
|
+
bottom: 25px;
|
|
416
|
+
right: 8px;
|
|
417
|
+
padding: 1px 2px;
|
|
418
|
+
color: #fff;
|
|
419
|
+
text-transform: uppercase;
|
|
420
|
+
opacity: 0.8;
|
|
421
|
+
|
|
422
|
+
background-color: var(--attachment-selector-etc-background-color);
|
|
423
|
+
font: var(--attachment-selector-etc-font);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
ul {
|
|
427
|
+
display: flex;
|
|
428
|
+
list-style: none;
|
|
429
|
+
margin: 0;
|
|
430
|
+
padding: 0;
|
|
431
|
+
white-space: nowrap;
|
|
432
|
+
clear: both;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
li {
|
|
436
|
+
padding: 0px 3px;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
li:hover {
|
|
440
|
+
background-color: rgba(255, 180, 180, 1);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
li a {
|
|
444
|
+
width: calc(100% - 24px);
|
|
445
|
+
padding: 5px 4px 1px 4px;
|
|
446
|
+
text-decoration: none;
|
|
447
|
+
font-size: 12px;
|
|
448
|
+
font-weight: bold;
|
|
449
|
+
color: rgb(233, 103, 128);
|
|
450
|
+
display: inline-block;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
li span {
|
|
454
|
+
height: 16px;
|
|
455
|
+
margin-top: 4px;
|
|
456
|
+
border-radius: 2px;
|
|
457
|
+
float: right;
|
|
458
|
+
display: none;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
li:hover span {
|
|
462
|
+
display: inline-block;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
li span:hover {
|
|
466
|
+
background-color: #f8c2cc;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
mwc-icon {
|
|
470
|
+
vertical-align: middle;
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
.group-select-box {
|
|
474
|
+
position: absolute;
|
|
475
|
+
width: 200px;
|
|
476
|
+
min-height: 22px;
|
|
477
|
+
font-size: 12px;
|
|
478
|
+
font-weight: bold;
|
|
479
|
+
color: #e96780;
|
|
480
|
+
border: 1px solid #ccc;
|
|
481
|
+
padding: 5px;
|
|
482
|
+
background-color: #fff;
|
|
483
|
+
float: left;
|
|
484
|
+
cursor: pointer;
|
|
485
|
+
display: inline-block;
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
.group-select-box span {
|
|
489
|
+
background-color: #fff !important;
|
|
490
|
+
color: #e96780 !important;
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
.group-select-box > span:nth-child(1) {
|
|
494
|
+
padding: 4px 0 0 6px;
|
|
495
|
+
float: left;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
.group-select-box > span:nth-child(2) {
|
|
499
|
+
float: right;
|
|
500
|
+
margin-top: 1px;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.select-box {
|
|
504
|
+
display: none;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.select-box.on {
|
|
508
|
+
display: block;
|
|
509
|
+
padding-top: 2px;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
.select-box.active {
|
|
513
|
+
background-color: #1344;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
.add-group {
|
|
517
|
+
cursor: pointer;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.btn-open-dropbox {
|
|
521
|
+
width: 8px;
|
|
522
|
+
height: 5px;
|
|
523
|
+
display: inline-block;
|
|
524
|
+
background: url(${unsafeCSS(btnOpenDropboxColor)}) no-repeat;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.btn-close-dropbox {
|
|
528
|
+
width: 8px;
|
|
529
|
+
height: 5px;
|
|
530
|
+
display: inline-block;
|
|
531
|
+
background: url(${unsafeCSS(btnCloseDropbox)}) no-repeat;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.btn-add-list-wrap {
|
|
535
|
+
margin: 5px 0 0 172px;
|
|
536
|
+
cursor: pointer;
|
|
537
|
+
display: inline-block;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
.btn-add-list {
|
|
541
|
+
width: 9px;
|
|
542
|
+
height: 9px;
|
|
543
|
+
display: inline-block;
|
|
544
|
+
background: url(${unsafeCSS(btnAddList)}) no-repeat;
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
select {
|
|
548
|
+
position: absolute;
|
|
549
|
+
width: 150px;
|
|
550
|
+
min-height: 22px;
|
|
551
|
+
font-size: 12px;
|
|
552
|
+
font-weight: bold;
|
|
553
|
+
color: #e96780;
|
|
554
|
+
border: 1px solid #ccc;
|
|
555
|
+
padding: 5px;
|
|
556
|
+
background-color: #fff;
|
|
557
|
+
z-index: 1;
|
|
558
|
+
float: left;
|
|
559
|
+
cursor: pointer;
|
|
560
|
+
display: inline-block;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
.card > span,
|
|
564
|
+
.card > a > span {
|
|
565
|
+
position: absolute;
|
|
566
|
+
width: 35px;
|
|
567
|
+
height: 35px;
|
|
568
|
+
right: 0px;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.btn-zoom-cover {
|
|
572
|
+
top: 0px;
|
|
573
|
+
}
|
|
574
|
+
.btn-zoom {
|
|
575
|
+
width: 20px;
|
|
576
|
+
height: 20px;
|
|
577
|
+
margin: 7px;
|
|
578
|
+
background: url(${unsafeCSS(btnZoom)}) no-repeat;
|
|
579
|
+
display: inline-block;
|
|
580
|
+
}
|
|
581
|
+
.btn-zoom-cover:hover > .btn-zoom {
|
|
582
|
+
background: url(${unsafeCSS(btnZoomHover)}) no-repeat;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
.btn-copy-link {
|
|
586
|
+
width: 20px;
|
|
587
|
+
height: 20px;
|
|
588
|
+
margin: 7px;
|
|
589
|
+
background: url(${unsafeCSS(btnCopyLink)}) no-repeat;
|
|
590
|
+
display: inline-block;
|
|
591
|
+
}
|
|
592
|
+
.card > span:hover > .btn-copy-link {
|
|
593
|
+
background: url(${unsafeCSS(btnCopyLinkHover)}) no-repeat;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
.btn-delete {
|
|
597
|
+
width: 20px;
|
|
598
|
+
height: 20px;
|
|
599
|
+
margin: 7px;
|
|
600
|
+
background: url(${unsafeCSS(btnDelete)}) no-repeat;
|
|
601
|
+
display: inline-block;
|
|
602
|
+
}
|
|
603
|
+
.card > span:hover > .btn-delete {
|
|
604
|
+
background: url(${unsafeCSS(btnDeleteHover)}) no-repeat;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
.btn-download {
|
|
608
|
+
width: 20px;
|
|
609
|
+
height: 20px;
|
|
610
|
+
margin: 7px;
|
|
611
|
+
background: url(${unsafeCSS(btnDownload)}) no-repeat;
|
|
612
|
+
display: inline-block;
|
|
613
|
+
}
|
|
614
|
+
.btn-download-cover:hover > .btn-download {
|
|
615
|
+
background: url(${unsafeCSS(btnDownloadHover)}) no-repeat;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
.file {
|
|
619
|
+
width: 52px;
|
|
620
|
+
height: 65px;
|
|
621
|
+
background: url(${unsafeCSS(file)}) no-repeat;
|
|
622
|
+
display: inline-block;
|
|
623
|
+
}
|
|
624
|
+
`
|
|
625
|
+
];
|
|
626
|
+
__decorate([
|
|
627
|
+
property({ type: Array })
|
|
628
|
+
], RestfulAttachmentSelector.prototype, "categories", void 0);
|
|
629
|
+
__decorate([
|
|
630
|
+
property({ type: Array })
|
|
631
|
+
], RestfulAttachmentSelector.prototype, "attachments", void 0);
|
|
632
|
+
__decorate([
|
|
633
|
+
property({ type: String })
|
|
634
|
+
], RestfulAttachmentSelector.prototype, "category", void 0);
|
|
635
|
+
__decorate([
|
|
636
|
+
property({ type: Number })
|
|
637
|
+
], RestfulAttachmentSelector.prototype, "_page", void 0);
|
|
638
|
+
__decorate([
|
|
639
|
+
property({ type: Number })
|
|
640
|
+
], RestfulAttachmentSelector.prototype, "_total", void 0);
|
|
641
|
+
__decorate([
|
|
642
|
+
property({ type: Boolean })
|
|
643
|
+
], RestfulAttachmentSelector.prototype, "creatable", void 0);
|
|
644
|
+
__decorate([
|
|
645
|
+
property({ type: String })
|
|
646
|
+
], RestfulAttachmentSelector.prototype, "selectBoxToggle", void 0);
|
|
647
|
+
__decorate([
|
|
648
|
+
property({ type: String })
|
|
649
|
+
], RestfulAttachmentSelector.prototype, "btnDropBoxIcon", void 0);
|
|
650
|
+
__decorate([
|
|
651
|
+
property({ type: String })
|
|
652
|
+
], RestfulAttachmentSelector.prototype, "userName", void 0);
|
|
653
|
+
__decorate([
|
|
654
|
+
query('#main')
|
|
655
|
+
], RestfulAttachmentSelector.prototype, "main", void 0);
|
|
656
|
+
__decorate([
|
|
657
|
+
query('attachment-creation-card')
|
|
658
|
+
], RestfulAttachmentSelector.prototype, "creationCard", void 0);
|
|
659
|
+
RestfulAttachmentSelector = __decorate([
|
|
660
|
+
customElement('restful-attachment-selector')
|
|
661
|
+
], RestfulAttachmentSelector);
|
|
662
|
+
export { RestfulAttachmentSelector };
|
|
663
|
+
//# sourceMappingURL=restful-attachment-selector.js.map
|