@things-factory/attachment-ui 4.0.4 → 4.0.5

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 { HeadroomStyles, ScrollbarStyles, TooltipStyles } from '@things-factory/styles'
4
- import { InfiniteScrollable, client } from '@things-factory/shell'
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 gql from 'graphql-tag'
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`
@@ -470,18 +470,7 @@ export class AttachmentSelector extends InfiniteScrollable(localize(i18next)(Lit
470
470
  }
471
471
 
472
472
  async copy(copied) {
473
- var textArea = document.createElement('textarea')
474
- textArea.style.position = 'absolute'
475
- textArea.style.opacity = '0'
476
- textArea.value = copied
477
- document.body.appendChild(textArea)
478
-
479
- await sleep(100)
480
-
481
- textArea.select()
482
-
483
- document.execCommand('copy')
484
- document.body.removeChild(textArea)
473
+ navigator.clipboard.writeText(copied)
485
474
  }
486
475
  }
487
476
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/attachment-ui",
3
- "version": "4.0.4",
3
+ "version": "4.0.5",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@operato/headroom": "^0.1.11",
28
- "@things-factory/attachment-base": "^4.0.4",
29
- "@things-factory/image-uploader-ui": "^4.0.4",
30
- "@things-factory/layout-base": "^4.0.4"
28
+ "@things-factory/attachment-base": "^4.0.5",
29
+ "@things-factory/image-uploader-ui": "^4.0.5",
30
+ "@things-factory/layout-base": "^4.0.5"
31
31
  },
32
- "gitHead": "292d7c4e2675d228d6be474ea6a0525d26ac1657"
32
+ "gitHead": "b7b2976818dceab74a34903499d408eed5d45b04"
33
33
  }