@things-factory/attachment-ui 4.0.0 → 4.0.6
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './attachment-creation-card'
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { LitElement, css, html } from 'lit-element'
|
|
6
|
-
import { gqlBuilder, pulltorefresh, sleep } from '@things-factory/utils'
|
|
7
|
-
import { i18next, localize } from '@things-factory/i18n-base'
|
|
3
|
+
import gql from 'graphql-tag'
|
|
4
|
+
import { css, html, LitElement } from 'lit-element'
|
|
8
5
|
|
|
9
6
|
import Headroom from '@operato/headroom'
|
|
10
|
-
import
|
|
7
|
+
import { i18next, localize } from '@things-factory/i18n-base'
|
|
8
|
+
import { client, InfiniteScrollable } from '@things-factory/shell'
|
|
9
|
+
import { HeadroomStyles, ScrollbarStyles, TooltipStyles } from '@things-factory/styles'
|
|
10
|
+
import { gqlBuilder, pulltorefresh, sleep } from '@things-factory/utils'
|
|
11
11
|
|
|
12
12
|
const FETCH_ATTACHMENT_LIST_GQL = listParam => {
|
|
13
13
|
return gql`
|
|
@@ -31,22 +31,12 @@ const FETCH_ATTACHMENT_LIST_GQL = listParam => {
|
|
|
31
31
|
|
|
32
32
|
const DELETE_ATTACHMENT_GQL = gql`
|
|
33
33
|
mutation DeleteAttachment($id: String!) {
|
|
34
|
-
deleteAttachment(id: $id)
|
|
35
|
-
id
|
|
36
|
-
name
|
|
37
|
-
description
|
|
38
|
-
mimetype
|
|
39
|
-
encoding
|
|
40
|
-
category
|
|
41
|
-
path
|
|
42
|
-
createdAt
|
|
43
|
-
updatedAt
|
|
44
|
-
}
|
|
34
|
+
deleteAttachment(id: $id)
|
|
45
35
|
}
|
|
46
36
|
`
|
|
47
37
|
|
|
48
38
|
const CREATE_ATTACHMENTS_GQL = gql`
|
|
49
|
-
mutation($attachments: [NewAttachment]!) {
|
|
39
|
+
mutation($attachments: [NewAttachment!]!) {
|
|
50
40
|
createAttachments(attachments: $attachments) {
|
|
51
41
|
id
|
|
52
42
|
name
|
|
@@ -480,18 +470,7 @@ export class AttachmentSelector extends InfiniteScrollable(localize(i18next)(Lit
|
|
|
480
470
|
}
|
|
481
471
|
|
|
482
472
|
async copy(copied) {
|
|
483
|
-
|
|
484
|
-
textArea.style.position = 'absolute'
|
|
485
|
-
textArea.style.opacity = '0'
|
|
486
|
-
textArea.value = copied
|
|
487
|
-
document.body.appendChild(textArea)
|
|
488
|
-
|
|
489
|
-
await sleep(100)
|
|
490
|
-
|
|
491
|
-
textArea.select()
|
|
492
|
-
|
|
493
|
-
document.execCommand('copy')
|
|
494
|
-
document.body.removeChild(textArea)
|
|
473
|
+
navigator.clipboard.writeText(copied)
|
|
495
474
|
}
|
|
496
475
|
}
|
|
497
476
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/attachment-ui",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.6",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@operato/headroom": "^0.
|
|
28
|
-
"@things-factory/attachment-base": "^4.0.
|
|
29
|
-
"@things-factory/image-uploader-ui": "^4.0.
|
|
30
|
-
"@things-factory/layout-base": "^4.0.
|
|
27
|
+
"@operato/headroom": "^0.2.26",
|
|
28
|
+
"@things-factory/attachment-base": "^4.0.6",
|
|
29
|
+
"@things-factory/image-uploader-ui": "^4.0.6",
|
|
30
|
+
"@things-factory/layout-base": "^4.0.6"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "471247c3499ba439b074c7654ae8d8e9fc3972f0"
|
|
33
33
|
}
|