@things-factory/attachment-ui 4.1.27 → 4.3.0-alpha.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.
@@ -1,4 +1,4 @@
1
- import { LitElement, html, css } from 'lit-element'
1
+ import { LitElement, html, css } from 'lit'
2
2
  import { i18next, localize } from '@things-factory/i18n-base'
3
3
  import { FileDropHelper } from '@things-factory/utils'
4
4
  import './components/file-selector'
@@ -188,17 +188,11 @@ export class AttachmentCreationCard extends localize(i18next)(LitElement) {
188
188
  ></file-selector>
189
189
 
190
190
  <div id="thumbnail-area">
191
- ${this._files.map(
192
- file => html`
193
- <image-upload-previewer .file=${file}></image-upload-previewer>
194
- `
195
- )}
191
+ ${this._files.map(file => html` <image-upload-previewer .file=${file}></image-upload-previewer> `)}
196
192
  </div>
197
193
 
198
194
  <!-- ${/^(video|image)/.test((this._files || {}).type)
199
- ? html`
200
- <image-upload-previewer .file=${this._files}></image-upload-previewer>
201
- `
195
+ ? html` <image-upload-previewer .file=${this._files}></image-upload-previewer> `
202
196
  : html``} -->
203
197
 
204
198
  <input type="submit" value=${i18next.t('button.create')} />
@@ -1,14 +1,14 @@
1
1
  import './attachment-creation-card'
2
2
 
3
3
  import gql from 'graphql-tag'
4
- import { css, html, LitElement } from 'lit-element'
4
+ import { css, html, LitElement } from 'lit'
5
5
 
6
6
  import Headroom from '@operato/headroom'
7
7
  import InfiniteScrollable from '@operato/utils/mixins/infinite-scrollable.js'
8
8
  import { i18next, localize } from '@things-factory/i18n-base'
9
9
  import { client } from '@things-factory/shell'
10
10
  import { HeadroomStyles, ScrollbarStyles, TooltipStyles } from '@things-factory/styles'
11
- import { gqlBuilder, pulltorefresh, sleep } from '@things-factory/utils'
11
+ import { copyToClipboard, gqlBuilder, pulltorefresh, sleep } from '@things-factory/utils'
12
12
 
13
13
  const FETCH_ATTACHMENT_LIST_GQL = listParam => {
14
14
  return gql`
@@ -471,7 +471,7 @@ export class AttachmentSelector extends InfiniteScrollable(localize(i18next)(Lit
471
471
  }
472
472
 
473
473
  async copy(copied) {
474
- navigator.clipboard.writeText(copied)
474
+ await copyToClipboard(copied)
475
475
  }
476
476
  }
477
477
 
@@ -1,6 +1,6 @@
1
1
  import '@material/mwc-icon'
2
2
  import '@material/mwc-icon-button'
3
- import { css, html, LitElement } from 'lit-element'
3
+ import { css, html, LitElement } from 'lit'
4
4
 
5
5
  export class FileSelector extends LitElement {
6
6
  static get styles() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/attachment-ui",
3
- "version": "4.1.27",
3
+ "version": "4.3.0-alpha.0",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,9 +24,9 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@operato/headroom": "^0.3.28",
28
- "@things-factory/attachment-base": "^4.1.27",
29
- "@things-factory/image-uploader-ui": "^4.1.27"
27
+ "@operato/headroom": "^0.4.5",
28
+ "@things-factory/attachment-base": "^4.3.0-alpha.0",
29
+ "@things-factory/image-uploader-ui": "^4.3.0-alpha.0"
30
30
  },
31
- "gitHead": "d2bcc934a52e1a2f68738ec8b56ad72503172f6f"
31
+ "gitHead": "6467d1b2a5b2f8abb1bc3982e4651a5742ad4043"
32
32
  }