@paperless/core 1.36.1 → 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.
Files changed (41) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/{paperless/p-141e1345.entry.js → build/p-22a84714.entry.js} +2 -2
  3. package/dist/{paperless/p-141e1345.entry.js.map → build/p-22a84714.entry.js.map} +1 -1
  4. package/dist/build/{p-0d71fc44.entry.js → p-60400a89.entry.js} +2 -2
  5. package/dist/build/p-60400a89.entry.js.map +1 -0
  6. package/dist/build/paperless.esm.js +1 -1
  7. package/dist/build/paperless.esm.js.map +1 -1
  8. package/dist/cjs/loader.cjs.js +1 -1
  9. package/dist/cjs/p-drawer.cjs.entry.js +12 -7
  10. package/dist/cjs/p-drawer.cjs.entry.js.map +1 -1
  11. package/dist/cjs/p-select.cjs.entry.js +1 -1
  12. package/dist/cjs/p-select.cjs.entry.js.map +1 -1
  13. package/dist/cjs/paperless.cjs.js +1 -1
  14. package/dist/collection/components/molecules/select/select.component.js +1 -1
  15. package/dist/collection/components/molecules/select/select.component.js.map +1 -1
  16. package/dist/collection/components/organisms/drawer/drawer.component.js +18 -7
  17. package/dist/collection/components/organisms/drawer/drawer.component.js.map +1 -1
  18. package/dist/components/p-drawer.js +13 -8
  19. package/dist/components/p-drawer.js.map +1 -1
  20. package/dist/components/p-select.js +1 -1
  21. package/dist/components/p-select.js.map +1 -1
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/p-drawer.entry.js +12 -7
  24. package/dist/esm/p-drawer.entry.js.map +1 -1
  25. package/dist/esm/p-select.entry.js +1 -1
  26. package/dist/esm/p-select.entry.js.map +1 -1
  27. package/dist/esm/paperless.js +1 -1
  28. package/dist/index.html +1 -1
  29. package/dist/{build/p-141e1345.entry.js → paperless/p-22a84714.entry.js} +2 -2
  30. package/dist/{build/p-141e1345.entry.js.map → paperless/p-22a84714.entry.js.map} +1 -1
  31. package/dist/paperless/{p-0d71fc44.entry.js → p-60400a89.entry.js} +2 -2
  32. package/dist/paperless/p-60400a89.entry.js.map +1 -0
  33. package/dist/paperless/paperless.esm.js +1 -1
  34. package/dist/paperless/paperless.esm.js.map +1 -1
  35. package/dist/sw.js +1 -1
  36. package/dist/sw.js.map +1 -1
  37. package/dist/types/components/organisms/drawer/drawer.component.d.ts +2 -1
  38. package/hydrate/index.js +14 -9
  39. package/package.json +1 -1
  40. package/dist/build/p-0d71fc44.entry.js.map +0 -1
  41. 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
- this.closeClicked.emit({
18120
- event: ev,
18121
- canClose: this.canClose,
18122
- });
18123
- if (!this.canClose) {
18124
- return;
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
  }; }
@@ -21187,7 +21192,7 @@ class Select {
21187
21192
  return items;
21188
21193
  }
21189
21194
  _getAutoCompleteItem() {
21190
- return (hAsync("div", { class: "bg-white sticky top-0 pt-2 -mt-2" }, hAsync("input", { class: "p-input size-small mb-2 sticky top-2", placeholder: this.autocompletePlaceholder, onInput: (ev) => this._onAutoComplete(ev), ref: (ref) => (this.autocompleteInputRef = ref) })));
21195
+ return (hAsync("div", { class: "bg-white sticky top-0 pt-2 -mt-2" }, hAsync("input", { class: "p-input size-small mb-2 sticky top-2", placeholder: this.autocompletePlaceholder, onInput: (ev) => this._onAutoComplete(ev), ref: (ref) => (this.autocompleteInputRef = ref), value: this.query })));
21191
21196
  }
21192
21197
  _setMultiContainerMaxWidth() {
21193
21198
  if (!this._inputRef || !this._multiContainerRef) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paperless/core",
3
- "version": "1.36.1",
3
+ "version": "1.37.0",
4
4
  "description": "Stencil Component Starter",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -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"}