@paperless/core 1.36.2 → 1.37.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/CHANGELOG.md +11 -0
- package/dist/build/{p-0d71fc44.entry.js → p-60400a89.entry.js} +2 -2
- package/dist/build/p-60400a89.entry.js.map +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/build/paperless.esm.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/p-drawer.cjs.entry.js +12 -7
- package/dist/cjs/p-drawer.cjs.entry.js.map +1 -1
- package/dist/cjs/paperless.cjs.js +1 -1
- package/dist/collection/components/organisms/drawer/drawer.component.js +18 -7
- package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -1
- package/dist/components/p-drawer.js +13 -8
- package/dist/components/p-drawer.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/p-drawer.entry.js +12 -7
- package/dist/esm/p-drawer.entry.js.map +1 -1
- package/dist/esm/paperless.js +1 -1
- package/dist/index.html +1 -1
- package/dist/paperless/{p-0d71fc44.entry.js → p-60400a89.entry.js} +2 -2
- package/dist/paperless/p-60400a89.entry.js.map +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/paperless/paperless.esm.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/organisms/drawer/drawer.component.d.ts +2 -1
- package/hydrate/index.js +13 -8
- package/package.json +1 -1
- package/dist/build/p-0d71fc44.entry.js.map +0 -1
- package/dist/paperless/p-0d71fc44.entry.js.map +0 -1
package/hydrate/index.js
CHANGED
|
@@ -18115,13 +18115,15 @@ class Drawer {
|
|
|
18115
18115
|
}
|
|
18116
18116
|
this.close(ev);
|
|
18117
18117
|
}
|
|
18118
|
-
close(ev) {
|
|
18119
|
-
|
|
18120
|
-
|
|
18121
|
-
|
|
18122
|
-
|
|
18123
|
-
|
|
18124
|
-
|
|
18118
|
+
close(ev, force = false) {
|
|
18119
|
+
if (!force) {
|
|
18120
|
+
this.closeClicked.emit({
|
|
18121
|
+
event: ev,
|
|
18122
|
+
canClose: this.canClose,
|
|
18123
|
+
});
|
|
18124
|
+
if (!this.canClose) {
|
|
18125
|
+
return;
|
|
18126
|
+
}
|
|
18125
18127
|
}
|
|
18126
18128
|
this._closing = true;
|
|
18127
18129
|
setTimeout(() => {
|
|
@@ -18133,6 +18135,9 @@ class Drawer {
|
|
|
18133
18135
|
handleCloseDrawer() {
|
|
18134
18136
|
this.close();
|
|
18135
18137
|
}
|
|
18138
|
+
handleForceCloseDrawer() {
|
|
18139
|
+
this.close(null, true);
|
|
18140
|
+
}
|
|
18136
18141
|
get _el() { return getElement(this); }
|
|
18137
18142
|
static get style() { return drawerComponentCss; }
|
|
18138
18143
|
static get cmpMeta() { return {
|
|
@@ -18148,7 +18153,7 @@ class Drawer {
|
|
|
18148
18153
|
"scrollLock": [4, "scroll-lock"],
|
|
18149
18154
|
"_closing": [32]
|
|
18150
18155
|
},
|
|
18151
|
-
"$listeners$": [[8, "closeDrawer", "handleCloseDrawer"]],
|
|
18156
|
+
"$listeners$": [[8, "closeDrawer", "handleCloseDrawer"], [8, "forceCloseDrawer", "handleForceCloseDrawer"]],
|
|
18152
18157
|
"$lazyBundleId$": "-",
|
|
18153
18158
|
"$attrsToReflect$": []
|
|
18154
18159
|
}; }
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["drawerComponentCss","Drawer","this","_hasHeaderSlot","componentWillLoad","_el","querySelector","render","show","headerContent","h","name","bodyContent","Host","class","variant","applyBlur","onClicked","ev","_backdropClick","detail","closing","_closing","scrollLock","_a","header","length","showClose","onClose","close","backdropClickClose","closeClicked","emit","event","canClose","setTimeout","closed","handleCloseDrawer"],"sources":["src/components/organisms/drawer/drawer.component.scss?tag=p-drawer&encapsulation=shadow","src/components/organisms/drawer/drawer.component.tsx"],"sourcesContent":[":host {\n\t@apply block;\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-drawer',\n\tstyleUrl: 'drawer.component.scss',\n\tshadow: true,\n})\nexport class Drawer {\n\t/**\n\t * The Header of the drawer\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the drawer or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close on mobile in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to hide the drawer when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether the drawer can be closed\n\t */\n\t@Prop() canClose: boolean = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<{\n\t\tevent: MouseEvent;\n\t\tcanClose: boolean;\n\t}>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<null>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-drawer\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tvariant=\"drawer\"\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-drawer-container closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-drawer-header\n\t\t\t\t\t\t\t\tshow-close={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close(ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-drawer-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-drawer-body>{bodyContent}</p-drawer-body>\n\t\t\t\t\t</p-drawer-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close(ev);\n\t}\n\n\tpublic close(ev?: MouseEvent) {\n\t\tthis.closeClicked.emit({\n\t\t\tevent: ev,\n\t\t\tcanClose: this.canClose,\n\t\t});\n\n\t\tif (!this.canClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.show = false;\n\t\t\tthis._closing = false;\n\t\t\tthis.closed.emit();\n\t\t}, 250);\n\t}\n\n\t@Listen('closeDrawer', { target: 'window' })\n\thandleCloseDrawer() {\n\t\tthis.close();\n\t}\n}\n"],"mappings":"gEAAA,MAAMA,EAAqB,gH,MCiBdC,EAAM,M,mGA4DVC,KAAAC,eAAiB,M,gCAnDD,M,eAKK,M,eAKT,K,wBAKS,K,cAKD,K,gBAKE,K,cA4BF,K,CAE5B,iBAAAC,GACCF,KAAKC,iBAAmBD,KAAKG,IAAIC,cAChC,2B,CAIF,MAAAC,G,MACC,IAAKL,KAAKM,KAAM,CACf,M,CAGD,MAAMC,EAAgBC,EAAA,QAAMC,KAAK,WACjC,MAAMC,EAAcF,EAAA,QAAMC,KAAK,YAE/B,OACCD,EAACG,EAAI,CAACC,MAAM,YACXJ,EAAA,cACCK,QAAQ,SACRC,UAAWd,KAAKc,UAChBC,UAAYC,GAAOhB,KAAKiB,eAAeD,EAAGE,QAC1CC,QAASnB,KAAKoB,SACdC,WAAYrB,KAAKqB,YAEjBb,EAAA,sBAAoBW,QAASnB,KAAKoB,aAC/BE,EAAAtB,KAAKuB,UAAM,MAAAD,SAAA,SAAAA,EAAEE,SAAUxB,KAAKC,iBAC7BO,EAAA,gCACaR,KAAKyB,UACjBC,QAAUV,GAAOhB,KAAK2B,MAAMX,EAAGE,SAE9BlB,KAAKC,eACHM,EACAP,KAAKuB,QAGVf,EAAA,qBAAgBE,K,CAOb,cAAAO,CAAeD,GACtB,IAAKhB,KAAK4B,mBAAoB,CAC7B,M,CAGD5B,KAAK2B,MAAMX,E,CAGL,KAAAW,CAAMX,GACZhB,KAAK6B,aAAaC,KAAK,CACtBC,MAAOf,EACPgB,SAAUhC,KAAKgC,WAGhB,IAAKhC,KAAKgC,SAAU,CACnB,M,CAGDhC,KAAKoB,SAAW,KAEhBa,YAAW,KACVjC,KAAKM,KAAO,MACZN,KAAKoB,SAAW,MAChBpB,KAAKkC,OAAOJ,MAAM,GAChB,I,CAIJ,iBAAAK,GACCnC,KAAK2B,O"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["drawerComponentCss","Drawer","this","_hasHeaderSlot","componentWillLoad","_el","querySelector","render","show","headerContent","h","name","bodyContent","Host","class","variant","applyBlur","onClicked","ev","_backdropClick","detail","closing","_closing","scrollLock","_a","header","length","showClose","onClose","close","backdropClickClose","closeClicked","emit","event","canClose","setTimeout","closed","handleCloseDrawer"],"sources":["src/components/organisms/drawer/drawer.component.scss?tag=p-drawer&encapsulation=shadow","src/components/organisms/drawer/drawer.component.tsx"],"sourcesContent":[":host {\n\t@apply block;\n}\n","import {\n\tComponent,\n\tElement,\n\tEvent,\n\tEventEmitter,\n\th,\n\tHost,\n\tListen,\n\tProp,\n\tState,\n} from '@stencil/core';\n\n@Component({\n\ttag: 'p-drawer',\n\tstyleUrl: 'drawer.component.scss',\n\tshadow: true,\n})\nexport class Drawer {\n\t/**\n\t * The Header of the drawer\n\t */\n\t@Prop() header?: string;\n\n\t/**\n\t * Wether to show the drawer or not\n\t */\n\t@Prop() show: boolean = false;\n\n\t/**\n\t * Wether to apply blur to the backdrop\n\t */\n\t@Prop() applyBlur: boolean = false;\n\n\t/**\n\t * Wether to show the close on mobile in the header\n\t */\n\t@Prop() showClose = true;\n\n\t/**\n\t * Wether to hide the drawer when the backdrop is clicked\n\t */\n\t@Prop() backdropClickClose = true;\n\n\t/**\n\t * Wether the drawer can be closed\n\t */\n\t@Prop() canClose: boolean = true;\n\n\t/**\n\t * Wether we should scroll lock the body\n\t */\n\t@Prop() scrollLock: boolean = true;\n\n\t/**\n\t * Close click event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tcloseClicked: EventEmitter<{\n\t\tevent: MouseEvent;\n\t\tcanClose: boolean;\n\t}>;\n\n\t/**\n\t * Closed event\n\t */\n\t@Event({\n\t\tbubbles: false,\n\t})\n\tclosed: EventEmitter<null>;\n\n\t/**\n\t * The host element\n\t */\n\t@Element() private _el: HTMLElement;\n\n\tprivate _hasHeaderSlot = false;\n\n\t@State() private _closing = false;\n\n\tcomponentWillLoad() {\n\t\tthis._hasHeaderSlot = !!this._el.querySelector(\n\t\t\t':scope > [slot=\"header\"]'\n\t\t);\n\t}\n\n\trender() {\n\t\tif (!this.show) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst headerContent = <slot name=\"header\" />;\n\t\tconst bodyContent = <slot name=\"content\" />;\n\n\t\treturn (\n\t\t\t<Host class=\"p-drawer\">\n\t\t\t\t<p-backdrop\n\t\t\t\t\tvariant=\"drawer\"\n\t\t\t\t\tapplyBlur={this.applyBlur}\n\t\t\t\t\tonClicked={(ev) => this._backdropClick(ev.detail)}\n\t\t\t\t\tclosing={this._closing}\n\t\t\t\t\tscrollLock={this.scrollLock}\n\t\t\t\t>\n\t\t\t\t\t<p-drawer-container closing={this._closing}>\n\t\t\t\t\t\t{(this.header?.length || this._hasHeaderSlot) && (\n\t\t\t\t\t\t\t<p-drawer-header\n\t\t\t\t\t\t\t\tshow-close={this.showClose}\n\t\t\t\t\t\t\t\tonClose={(ev) => this.close(ev.detail)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t{this._hasHeaderSlot\n\t\t\t\t\t\t\t\t\t? headerContent\n\t\t\t\t\t\t\t\t\t: this.header}\n\t\t\t\t\t\t\t</p-drawer-header>\n\t\t\t\t\t\t)}\n\t\t\t\t\t\t<p-drawer-body>{bodyContent}</p-drawer-body>\n\t\t\t\t\t</p-drawer-container>\n\t\t\t\t</p-backdrop>\n\t\t\t</Host>\n\t\t);\n\t}\n\n\tprivate _backdropClick(ev) {\n\t\tif (!this.backdropClickClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.close(ev);\n\t}\n\n\tpublic close(ev?: MouseEvent) {\n\t\tthis.closeClicked.emit({\n\t\t\tevent: ev,\n\t\t\tcanClose: this.canClose,\n\t\t});\n\n\t\tif (!this.canClose) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._closing = true;\n\n\t\tsetTimeout(() => {\n\t\t\tthis.show = false;\n\t\t\tthis._closing = false;\n\t\t\tthis.closed.emit();\n\t\t}, 250);\n\t}\n\n\t@Listen('closeDrawer', { target: 'window' })\n\thandleCloseDrawer() {\n\t\tthis.close();\n\t}\n}\n"],"mappings":"gEAAA,MAAMA,EAAqB,gH,MCiBdC,EAAM,M,mGA4DVC,KAAAC,eAAiB,M,gCAnDD,M,eAKK,M,eAKT,K,wBAKS,K,cAKD,K,gBAKE,K,cA4BF,K,CAE5B,iBAAAC,GACCF,KAAKC,iBAAmBD,KAAKG,IAAIC,cAChC,2B,CAIF,MAAAC,G,MACC,IAAKL,KAAKM,KAAM,CACf,M,CAGD,MAAMC,EAAgBC,EAAA,QAAMC,KAAK,WACjC,MAAMC,EAAcF,EAAA,QAAMC,KAAK,YAE/B,OACCD,EAACG,EAAI,CAACC,MAAM,YACXJ,EAAA,cACCK,QAAQ,SACRC,UAAWd,KAAKc,UAChBC,UAAYC,GAAOhB,KAAKiB,eAAeD,EAAGE,QAC1CC,QAASnB,KAAKoB,SACdC,WAAYrB,KAAKqB,YAEjBb,EAAA,sBAAoBW,QAASnB,KAAKoB,aAC/BE,EAAAtB,KAAKuB,UAAM,MAAAD,SAAA,SAAAA,EAAEE,SAAUxB,KAAKC,iBAC7BO,EAAA,gCACaR,KAAKyB,UACjBC,QAAUV,GAAOhB,KAAK2B,MAAMX,EAAGE,SAE9BlB,KAAKC,eACHM,EACAP,KAAKuB,QAGVf,EAAA,qBAAgBE,K,CAOb,cAAAO,CAAeD,GACtB,IAAKhB,KAAK4B,mBAAoB,CAC7B,M,CAGD5B,KAAK2B,MAAMX,E,CAGL,KAAAW,CAAMX,GACZhB,KAAK6B,aAAaC,KAAK,CACtBC,MAAOf,EACPgB,SAAUhC,KAAKgC,WAGhB,IAAKhC,KAAKgC,SAAU,CACnB,M,CAGDhC,KAAKoB,SAAW,KAEhBa,YAAW,KACVjC,KAAKM,KAAO,MACZN,KAAKoB,SAAW,MAChBpB,KAAKkC,OAAOJ,MAAM,GAChB,I,CAIJ,iBAAAK,GACCnC,KAAK2B,O"}
|