@paperless/core 2.0.1-beta.114 → 2.0.1-beta.115
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 +11 -0
- package/dist/build/{p-8577755d.entry.js → p-2def1fe8.entry.js} +2 -2
- package/dist/build/p-2def1fe8.entry.js.map +1 -0
- package/dist/build/{p-ab23f388.js → p-48e752ed.js} +1 -1
- package/dist/build/p-attachment.entry.esm.js.map +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/p-attachment.cjs.entry.js +21 -9
- package/dist/cjs/p-attachment.cjs.entry.js.map +1 -1
- package/dist/cjs/p-attachment.entry.cjs.js.map +1 -1
- package/dist/collection/components/molecules/attachment/attachment.component.js +21 -9
- package/dist/collection/components/molecules/attachment/attachment.component.js.map +1 -1
- package/dist/components/p-attachment.js +21 -9
- package/dist/components/p-attachment.js.map +1 -1
- package/dist/esm/p-attachment.entry.js +21 -9
- package/dist/esm/p-attachment.entry.js.map +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-8577755d.entry.js → p-2def1fe8.entry.js} +2 -2
- package/dist/paperless/p-2def1fe8.entry.js.map +1 -0
- package/dist/paperless/p-attachment.entry.esm.js.map +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/package.json +1 -1
- package/dist/build/p-8577755d.entry.js.map +0 -1
- package/dist/paperless/p-8577755d.entry.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["attachmentComponentCss","attachment","cva","variants","error","false","true","Attachment","value","label","helper","required","mode","placeholder","downloadTooltip","uploadTooltip","deleteTooltip","loading","upload","download","delete","render","prefix","h","key","class","variant","this","baseText","forceShowTooltip","length","slot","cn","content","iconOnly","icon","disabled","onOnClick","emit"],"sources":["src/components/molecules/attachment/attachment.component.css?tag=p-attachment&encapsulation=shadow","src/components/molecules/attachment/attachment.component.tsx"],"sourcesContent":[":host {\n\t@apply block w-full;\n}\n","import { Component, Event, EventEmitter, h, Prop } from '@stencil/core';\nimport { cn } from '../../../utils';\nimport { cva } from 'class-variance-authority';\n\nconst attachment = cva([\n\t\t'flex flex-1 items-center justify-start gap-2',\n\t\t'h-8 min-w-0 px-2 rounded-lg',\n\t\t'border border-solid bg-white-600'\n\t], {\n\t\tvariants: {\n\t\t\terror: {\n\t\t\t\tfalse: 'bg-white-600 border-black-teal-100 text-black-teal-200',\n\t\t\t\ttrue: 'border-negative-red',\n\t\t\t}\n\t\t}\n\t})\n\n@Component({\n\ttag: 'p-attachment',\n\tstyleUrl: 'attachment.component.css',\n\tshadow: true,\n})\nexport class Attachment {\n\t/**\n\t * The value of the attachment (usually the file name)\n\t */\n\t@Prop() value: string;\n\n\t/**\n\t * The label of the attachment\n\t */\n\t@Prop() label: string | HTMLSlotElement;\n\n\t/**\n\t * The helper of the attachment\n\t */\n\t@Prop() helper: string | HTMLSlotElement;\n\n\t/**\n\t * Wether the attachment is required\n\t */\n\t@Prop({ reflect: true }) required = true;\n\n\n\t/**\n\t * The variant of the attachment\n\t */\n\t@Prop() mode: 'read' | 'write' = 'read';\n\n\t/**\n\t * The placeholder of the attachment\n\t */\n\t@Prop() placeholder: string = 'Upload a file...';\n\n\t/**\n\t * The text for the download tooltip\n\t */\n\t@Prop() downloadTooltip: string = 'Download';\n\n\t/**\n\t * The text for the upload tooltip\n\t */\n\t@Prop() uploadTooltip: string = 'Upload';\n\n\t/**\n\t * The text for the delete tooltip\n\t */\n\t@Prop() deleteTooltip: string = 'Delete';\n\n\t/**\n\t * Wether the attachment is loading\n\t */\n\t@Prop() loading = false;\n\n\t/**\n\t * The error to show\n\t */\n\t@Prop() error: string;\n\n\t/**\n\t * Event when upload is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tupload: EventEmitter<void>;\n\n\t/**\n\t * Event when download is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdownload: EventEmitter<void>;\n\n\t/**\n\t * Event when delete is pressed\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tdelete: EventEmitter<void>;\n\n\trender() {\n\t\tlet prefix = <p-icon class=\"text-black-teal-300\" variant='attachment' />;\n\n\t\tif (this.loading) {\n\t\t\tprefix = <p-loader />;\n\t\t}\n\n\t\tif (this.error) {\n\t\t\tprefix = (\n\t\t\t\t<p-icon\n\t\t\t\t\tvariant='warning'\n\t\t\t\t\tclass='text-negative-red'\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\n\t\tconst baseText = 'min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-sm'\n\t\treturn (\n\t\t\t<p-field-container variant=\"write\" label={this.label} helper={this.helper} error={this.error} required={this.required} forceShowTooltip={!!this.error?.length}>\n\t\t\t\t<div slot=\"content\" class='flex items-start gap-2 w-full'>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclass={attachment({\n\t\t\t\t\t\t\terror: !!this.error?.length\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{prefix}\n\n\t\t\t\t\t\t<span class={cn(baseText, 'peer empty:hidden')}>\n\t\t\t\t\t\t\t{this.value}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class={cn(baseText, 'hidden peer-empty:block')}>\n\t\t\t\t\t\t\t{this.placeholder}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p-tooltip content={this.mode === 'read' ? this.downloadTooltip : this.value?.length ? this.deleteTooltip : this.uploadTooltip}>\n\t\t\t\t\t\t<p-button\n\t\t\t\t\t\t\tslot=\"trigger\"\n\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\ticonOnly={true}\n\t\t\t\t\t\t\ticon={this.mode === 'read' ? 'download' : this.value?.length ? 'trash' : 'upload'}\n\t\t\t\t\t\t\tdisabled={this.loading}\n\t\t\t\t\t\t\tloading={this.loading}\n\t\t\t\t\t\t\tonOnClick={() =>\n\t\t\t\t\t\t\t\t(this.mode === 'read' ? this.download : this.value?.length ? this.delete : this.upload).emit()\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</p-tooltip>\n\t\t\t\t</div>\n\t\t\t</p-field-container>\n\t\t);\n\t}\n}\n"],"mappings":"kJAAA,MAAMA,EAAyB,gmDCI/B,MAAMC,EAAaC,EAAI,CACrB,+CACA,8BACA,oCACE,CACFC,SAAU,CACTC,MAAO,CACNC,MAAO,yDACPC,KAAM,0B,MAUGC,EAAU,M,0HAIdC,MAKAC,MAKAC,OAKiBC,SAAW,KAM5BC,KAAyB,OAKzBC,YAAsB,mBAKtBC,gBAA0B,WAK1BC,cAAwB,SAKxBC,cAAwB,SAKxBC,QAAU,MAKVb,MAQRc,OAQAC,SAQAC,OAEA,MAAAC,GACC,IAAIC,EAASC,EAAA,UAAAC,IAAA,2CAAQC,MAAM,sBAAsBC,QAAQ,eAEzD,GAAIC,KAAKV,QAAS,CACjBK,EAASC,EAAA,YAAAC,IAAA,4C,CAGV,GAAIG,KAAKvB,MAAO,CACfkB,EACCC,EACC,UAAAC,IAAA,2CAAAE,QAAQ,UACRD,MAAM,qB,CAKT,MAAMG,EAAW,0EACjB,OACCL,EAAmB,qBAAAC,IAAA,2CAAAE,QAAQ,QAAQjB,MAAOkB,KAAKlB,MAAOC,OAAQiB,KAAKjB,OAAQN,MAAOuB,KAAKvB,MAAOO,SAAUgB,KAAKhB,SAAWkB,mBAAoBF,KAAKvB,OAAO0B,QACvJP,EAAA,OAAAC,IAAA,2CAAKO,KAAK,UAAUN,MAAM,iCACzBF,EACC,OAAAC,IAAA,2CAAAC,MAAOxB,EAAW,CACjBG,QAASuB,KAAKvB,OAAO0B,UAGrBR,EAEDC,EAAA,QAAAC,IAAA,2CAAMC,MAAOO,EAAGJ,EAAU,sBACxBD,KAAKnB,OAEPe,EAAA,QAAAC,IAAA,2CAAMC,MAAOO,EAAGJ,EAAU,4BACxBD,KAAKd,cAIRU,EAAA,aAAAC,IAAA,2CAAWS,QAASN,KAAKf,OAAS,OAASe,KAAKb,gBAAkBa,KAAKnB,OAAOsB,OAASH,KAAKX,cAAgBW,KAAKZ,eAChHQ,EACC,YAAAC,IAAA,2CAAAO,KAAK,UACLL,QAAQ,YACRQ,SAAU,KACVC,KAAMR,KAAKf,OAAS,OAAS,WAAae,KAAKnB,OAAOsB,OAAS,QAAU,SACzEM,SAAUT,KAAKV,QACfA,QAASU,KAAKV,QACdoB,UAAW,KACTV,KAAKf,OAAS,OAASe,KAAKR,SAAWQ,KAAKnB,OAAOsB,OAASH,KAAKP,OAASO,KAAKT,QAAQoB,W","ignoreList":[]}
|