@pod-os/elements 0.32.1-rc.f28b628.0 → 0.33.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.
- package/dist/cjs/pos-add-new-thing_29.cjs.entry.js +2 -1
- package/dist/cjs/pos-markdown-document.cjs.entry.js +2667 -250
- package/dist/cjs/pos-markdown-document.entry.cjs.js.map +1 -1
- package/dist/collection/components/pos-upload/pos-upload.js +2 -1
- package/dist/collection/components/pos-upload/pos-upload.js.map +1 -1
- package/dist/components/pos-markdown-document2.js +2667 -250
- package/dist/components/pos-markdown-document2.js.map +1 -1
- package/dist/components/pos-upload2.js +2 -1
- package/dist/components/pos-upload2.js.map +1 -1
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/{p-634ec3ba.entry.js → p-3f3bfccf.entry.js} +2 -2
- package/dist/elements/{p-634ec3ba.entry.js.map → p-3f3bfccf.entry.js.map} +1 -1
- package/dist/elements/p-66ff17ba.entry.js +2 -0
- package/dist/elements/p-66ff17ba.entry.js.map +1 -0
- package/dist/elements/pos-markdown-document.entry.esm.js.map +1 -1
- package/dist/esm/pos-add-new-thing_29.entry.js +2 -1
- package/dist/esm/pos-markdown-document.entry.js +2667 -250
- package/dist/esm/pos-markdown-document.entry.js.map +1 -1
- package/package.json +10 -10
- package/dist/elements/p-300ef87f.entry.js +0 -2
- package/dist/elements/p-300ef87f.entry.js.map +0 -1
|
@@ -15,6 +15,7 @@ export class PosUpload {
|
|
|
15
15
|
.use(Dashboard, {
|
|
16
16
|
inline: true,
|
|
17
17
|
target: this.uppy,
|
|
18
|
+
theme: 'auto',
|
|
18
19
|
})
|
|
19
20
|
.use(ImageEditor)
|
|
20
21
|
.use(Webcam, { modes: ['picture'] });
|
|
@@ -41,7 +42,7 @@ export class PosUpload {
|
|
|
41
42
|
});
|
|
42
43
|
}
|
|
43
44
|
render() {
|
|
44
|
-
return h("div", { key: '
|
|
45
|
+
return h("div", { key: 'f28bebfde1c89399e3f51e48224038fbba7119af', class: "container", ref: el => (this.uppy = el) });
|
|
45
46
|
}
|
|
46
47
|
static get is() { return "pos-upload"; }
|
|
47
48
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pos-upload.js","sourceRoot":"","sources":["../../../../src/components/pos-upload/pos-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,MAAM,MAAM,cAAc,CAAC;AASlC,MAAM,OAAO,SAAS;IALtB;QAME;;WAEG;QAEH,WAAM,GAAa,CAAC,SAAS,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"pos-upload.js","sourceRoot":"","sources":["../../../../src/components/pos-upload/pos-upload.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,IAAI,MAAM,YAAY,CAAC;AAC9B,OAAO,SAAS,MAAM,iBAAiB,CAAC;AACxC,OAAO,WAAW,MAAM,oBAAoB,CAAC;AAC7C,OAAO,MAAM,MAAM,cAAc,CAAC;AASlC,MAAM,OAAO,SAAS;IALtB;QAME;;WAEG;QAEH,WAAM,GAAa,CAAC,SAAS,CAAC,CAAC;KAyChC;IAnCC,kBAAkB;QAChB,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE;aACpB,GAAG,CAAC,SAAS,EAAE;YACd,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,IAAI,CAAC,IAAI;YACjB,KAAK,EAAE,MAAM;SACd,CAAC;aACD,GAAG,CAAC,WAAW,CAAC;aAChB,GAAG,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,SAAS,CAAC,EAAE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;;;;CACF","sourcesContent":["import { Component, h, Prop } from '@stencil/core';\n\nimport Uppy from '@uppy/core';\nimport Dashboard from '@uppy/dashboard';\nimport ImageEditor from '@uppy/image-editor';\nimport Webcam from '@uppy/webcam';\nimport { ResultAsync } from 'neverthrow';\nimport { HttpProblem, NetworkProblem } from '@pod-os/core';\n\n@Component({\n tag: 'pos-upload',\n styleUrl: 'pos-upload.css',\n shadow: true,\n})\nexport class PosUpload {\n /**\n * The accepted file types.\n */\n @Prop()\n accept: string[] = ['image/*'];\n\n @Prop() uploader: (file: File) => ResultAsync<{ url: string }, HttpProblem | NetworkProblem>;\n\n uppy: HTMLElement;\n\n componentDidRender() {\n const uppy = new Uppy()\n .use(Dashboard, {\n inline: true,\n target: this.uppy,\n theme: 'auto',\n })\n .use(ImageEditor)\n .use(Webcam, { modes: ['picture'] });\n uppy.setOptions({\n restrictions: {\n allowedFileTypes: this.accept,\n },\n });\n uppy.addUploader(async fileIds => {\n const files = uppy.getFilesByIds(fileIds);\n uppy.emit('upload-start', files);\n\n for (const file of files) {\n if (file.data instanceof File) {\n await this.uploader(file.data)\n .map(() => {\n uppy.emit('upload-success', file, { status: 201 });\n })\n .mapErr(it => uppy.emit('upload-error', file, new Error(it.title + ' - ' + it.detail)));\n } else {\n uppy.emit('upload-error', file, new Error('Expected file to be a File object'));\n }\n }\n });\n }\n\n render() {\n return <div class=\"container\" ref={el => (this.uppy = el)}></div>;\n }\n}\n"]}
|