@operato/attachment 2.0.0-alpha.8 → 2.0.0-alpha.80
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/CHANGELOG.md +358 -0
- package/demo/index.html +13 -2
- package/dist/src/ox-attachment-list.d.ts +4 -4
- package/dist/src/ox-attachment-list.js +6 -5
- package/dist/src/ox-attachment-list.js.map +1 -1
- package/dist/src/ox-attachment-selector.d.ts +2 -2
- package/dist/src/ox-attachment-selector.js +3 -3
- package/dist/src/ox-attachment-selector.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +20 -20
- package/src/ox-attachment-list.ts +8 -7
- package/src/ox-attachment-selector.ts +3 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@operato/attachment",
|
|
3
3
|
"description": "Webcomponent attachment following open-wc recommendations",
|
|
4
4
|
"author": "heartyoh",
|
|
5
|
-
"version": "2.0.0-alpha.
|
|
5
|
+
"version": "2.0.0-alpha.80",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
7
7
|
"module": "dist/src/index.js",
|
|
8
8
|
"exports": {
|
|
@@ -51,32 +51,32 @@
|
|
|
51
51
|
"storybook:build": "tsc && npm run analyze -- --exclude dist && build-storybook"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@material/
|
|
55
|
-
"@operato/data-grist": "^2.0.0-alpha.
|
|
56
|
-
"@operato/graphql": "^2.0.0-alpha.
|
|
57
|
-
"@operato/input": "^2.0.0-alpha.
|
|
58
|
-
"@operato/property-editor": "^2.0.0-alpha.
|
|
59
|
-
"@operato/styles": "^2.0.0-alpha.
|
|
60
|
-
"@operato/utils": "^2.0.0-alpha.
|
|
54
|
+
"@material/web": "^1.4.0",
|
|
55
|
+
"@operato/data-grist": "^2.0.0-alpha.80",
|
|
56
|
+
"@operato/graphql": "^2.0.0-alpha.57",
|
|
57
|
+
"@operato/input": "^2.0.0-alpha.80",
|
|
58
|
+
"@operato/property-editor": "^2.0.0-alpha.80",
|
|
59
|
+
"@operato/styles": "^2.0.0-alpha.80",
|
|
60
|
+
"@operato/utils": "^2.0.0-alpha.68",
|
|
61
61
|
"i18next": "^21.6.3",
|
|
62
|
-
"lit": "^
|
|
62
|
+
"lit": "^3.1.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@custom-elements-manifest/analyzer": "^0.
|
|
65
|
+
"@custom-elements-manifest/analyzer": "^0.9.2",
|
|
66
66
|
"@hatiolab/prettier-config": "^1.0.0",
|
|
67
|
-
"@open-wc/eslint-config": "^
|
|
67
|
+
"@open-wc/eslint-config": "^12.0.3",
|
|
68
68
|
"@open-wc/testing": "^3.1.6",
|
|
69
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
70
|
-
"@typescript-eslint/parser": "^
|
|
69
|
+
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
|
70
|
+
"@typescript-eslint/parser": "^7.0.1",
|
|
71
71
|
"@web/dev-server": "^0.3.0",
|
|
72
|
-
"@web/dev-server-storybook": "^0.
|
|
73
|
-
"@web/test-runner": "^0.
|
|
72
|
+
"@web/dev-server-storybook": "^2.0.1",
|
|
73
|
+
"@web/test-runner": "^0.18.0",
|
|
74
74
|
"concurrently": "^8.0.1",
|
|
75
75
|
"eslint": "^8.39.0",
|
|
76
|
-
"eslint-config-prettier": "^
|
|
77
|
-
"husky": "^
|
|
78
|
-
"lint-staged": "^
|
|
79
|
-
"prettier": "^2.
|
|
76
|
+
"eslint-config-prettier": "^9.1.0",
|
|
77
|
+
"husky": "^9.0.11",
|
|
78
|
+
"lint-staged": "^15.2.2",
|
|
79
|
+
"prettier": "^3.2.5",
|
|
80
80
|
"tslib": "^2.3.1",
|
|
81
81
|
"typescript": "^5.0.4"
|
|
82
82
|
},
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"prettier --write"
|
|
94
94
|
]
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "9405ad5252a157db9c9680256a6cb65f764a890b"
|
|
97
97
|
}
|
|
@@ -242,6 +242,7 @@ export class OxAttachmentList extends LitElement {
|
|
|
242
242
|
element.setAttribute('download', record.name!)
|
|
243
243
|
document.body.appendChild(element)
|
|
244
244
|
element.click()
|
|
245
|
+
element.remove()
|
|
245
246
|
}
|
|
246
247
|
}
|
|
247
248
|
},
|
|
@@ -298,13 +299,13 @@ export class OxAttachmentList extends LitElement {
|
|
|
298
299
|
return record.category == 'image'
|
|
299
300
|
? html` <img src=${record.fullpath} style="max-width: 100%; max-height: 100%;" /> `
|
|
300
301
|
: record.category == 'video'
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
302
|
+
? html` <video src=${record.fullpath} style="width: 100%; height: 100%;" controls></video> `
|
|
303
|
+
: html`
|
|
304
|
+
<div style="width: 100%; height: 100%;" etc>
|
|
305
|
+
<md-icon style="--md-icon-size: 24px;">insert_drive_file</md-icon>
|
|
306
|
+
<span>${record.path.substr(record.path.lastIndexOf('.'))}</span>
|
|
307
|
+
</div>
|
|
308
|
+
`
|
|
308
309
|
} as FieldRenderer
|
|
309
310
|
},
|
|
310
311
|
handlers: {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright © HatioLab Inc. All rights reserved.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import '@material/
|
|
5
|
+
import '@material/web/icon/icon.js'
|
|
6
6
|
import './ox-attachment-list.js'
|
|
7
7
|
|
|
8
8
|
import { LitElement, css, html } from 'lit'
|
|
@@ -27,7 +27,7 @@ export class OxAttachmentSelector extends LitElement {
|
|
|
27
27
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
md-icon {
|
|
31
31
|
position: absolute;
|
|
32
32
|
top: 0;
|
|
33
33
|
right: 3px;
|
|
@@ -49,7 +49,7 @@ export class OxAttachmentSelector extends LitElement {
|
|
|
49
49
|
@change=${(e: KeyboardEvent) => this._onInputChanged(e)}
|
|
50
50
|
/>
|
|
51
51
|
|
|
52
|
-
<
|
|
52
|
+
<md-icon @click=${() => this.openSelector()}>${this.getIconByCategory()}</md-icon>
|
|
53
53
|
`
|
|
54
54
|
}
|
|
55
55
|
|