@paperless/core 3.0.0 → 3.0.2
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/build/{p-4ccf0ea2.entry.js → p-2937ea4e.entry.js} +1 -1
- package/dist/build/{p-99950bb2.js → p-57abbf5d.js} +1 -1
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/p-checkbox_3.cjs.entry.js +11 -8
- package/dist/collection/components/molecules/dropdown/dropdown.component.js +11 -8
- package/dist/components/{p-CzcyDhea.js → p-B4ldecyo.js} +1 -1
- package/dist/components/p-CFSNSi-H.js +1 -0
- package/dist/components/{p-COEYnacB.js → p-CKY-2A7w.js} +1 -1
- package/dist/components/{p-BfdNz0_n.js → p-Duu0fwUk.js} +1 -1
- package/dist/components/{p-DA6lXn-F.js → p-a6F6aMNs.js} +1 -1
- package/dist/components/p-datepicker.js +1 -1
- package/dist/components/p-dropdown.js +1 -1
- package/dist/components/p-pagination-pages.js +1 -1
- package/dist/components/p-pagination-size.js +1 -1
- package/dist/components/p-pagination.js +1 -1
- package/dist/components/p-profile.js +1 -1
- package/dist/components/p-select.js +1 -1
- package/dist/components/p-table-footer.js +1 -1
- package/dist/components/p-table.js +1 -1
- package/dist/esm/p-checkbox_3.entry.js +11 -8
- package/dist/index.html +1 -1
- package/dist/paperless/{p-4ccf0ea2.entry.js → p-2937ea4e.entry.js} +1 -1
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist/types/components/molecules/dropdown/dropdown.component.d.ts +1 -0
- package/hydrate/index.js +11 -8
- package/hydrate/index.mjs +11 -8
- package/package.json +1 -1
- package/dist/components/p-D9NAGtqV.js +0 -1
package/hydrate/index.js
CHANGED
|
@@ -94207,6 +94207,7 @@ class Dropdown {
|
|
|
94207
94207
|
isOpen;
|
|
94208
94208
|
_loaded = false;
|
|
94209
94209
|
_menu;
|
|
94210
|
+
_trigger;
|
|
94210
94211
|
_cleanup;
|
|
94211
94212
|
componentShouldUpdate() {
|
|
94212
94213
|
this._update();
|
|
@@ -94226,16 +94227,16 @@ class Dropdown {
|
|
|
94226
94227
|
this._checkItems();
|
|
94227
94228
|
}
|
|
94228
94229
|
render() {
|
|
94229
|
-
return (hAsync(Host, { key: '
|
|
94230
|
+
return (hAsync(Host, { key: '6b7b418a8b5e962f6881418630e9f284a8ed1785', class: 'relative' }, hAsync("div", { key: '46fb2c0286f69da71e4fbf940123761ee1869077', class: 'trigger', ref: el => (this._trigger = el), onClick: () => this._triggerClickHandler() }, hAsync("slot", { key: 'c9bb61458cfb2ef3dc99f04d699d83a173e94789', name: 'trigger' })), hAsync("div", { key: '33693a79995e4fe465c3d9576f512115ca8c9c9c', class: 'relative w-full' }, hAsync("p-dropdown-menu-container", { key: 'ca8c374c376c5529f8b1b91e542f3e6898038fbd', allowOverflow: this.allowOverflow, class: cn(dropdownContainerClass({
|
|
94230
94231
|
strategy: this.strategy,
|
|
94231
94232
|
maxWidth: this.applyMaxWidth,
|
|
94232
94233
|
fullWidth: this.applyFullWidth && !this.applyMaxWidth,
|
|
94233
94234
|
isDatepicker: this.isDatepicker,
|
|
94234
|
-
}), this.containerClass), "data-placement": this.placement, "data-strategy": this.strategy, fullWidth: this.applyFullWidth && !this.applyMaxWidth, maxWidth: this.applyMaxWidth, ref: el => this._load(el), role: 'popover', scrollable: this.scrollable, variant: this.variant, onClick: () => this._containerClickHandler() }, hAsync("slot", { key: '
|
|
94235
|
+
}), this.containerClass), "data-placement": this.placement, "data-strategy": this.strategy, fullWidth: this.applyFullWidth && !this.applyMaxWidth, maxWidth: this.applyMaxWidth, ref: el => this._load(el), role: 'popover', scrollable: this.scrollable, variant: this.variant, onClick: () => this._containerClickHandler() }, hAsync("slot", { key: '544f91dfb12b2f3e9a37b319270c75c2eed95662', name: 'items' })))));
|
|
94235
94236
|
}
|
|
94236
94237
|
_checkButtons(active = false) {
|
|
94237
94238
|
const buttons = this._el.querySelectorAll('p-button[slot="trigger"]');
|
|
94238
|
-
const isOpen = this._menu.dataset.show === '';
|
|
94239
|
+
const isOpen = this._menu.dataset.show === 'true';
|
|
94239
94240
|
for (let button of buttons) {
|
|
94240
94241
|
button.disabled = this.disableTriggerClick;
|
|
94241
94242
|
button.active = active;
|
|
@@ -94280,8 +94281,9 @@ class Dropdown {
|
|
|
94280
94281
|
this._show();
|
|
94281
94282
|
}
|
|
94282
94283
|
documentClickHandler(event) {
|
|
94283
|
-
if (
|
|
94284
|
-
childOfComposed(event, this._menu)
|
|
94284
|
+
if (this._menu.dataset.show === 'false' ||
|
|
94285
|
+
childOfComposed(event, this._menu) ||
|
|
94286
|
+
childOfComposed(event, this._trigger)) {
|
|
94285
94287
|
return;
|
|
94286
94288
|
}
|
|
94287
94289
|
this._hide();
|
|
@@ -94301,7 +94303,8 @@ class Dropdown {
|
|
|
94301
94303
|
if (this.manual) {
|
|
94302
94304
|
return;
|
|
94303
94305
|
}
|
|
94304
|
-
|
|
94306
|
+
const isOpen = this._menu.dataset.show === 'true';
|
|
94307
|
+
if (isOpen) {
|
|
94305
94308
|
this._hide();
|
|
94306
94309
|
return;
|
|
94307
94310
|
}
|
|
@@ -94322,7 +94325,7 @@ class Dropdown {
|
|
|
94322
94325
|
return;
|
|
94323
94326
|
}
|
|
94324
94327
|
this._cleanup = autoUpdate(this._el, this._menu, () => this._update());
|
|
94325
|
-
this._menu.dataset.show = '';
|
|
94328
|
+
this._menu.dataset.show = 'true';
|
|
94326
94329
|
this._menu.classList.remove('hidden');
|
|
94327
94330
|
this._menu.classList.add('block');
|
|
94328
94331
|
this.isOpen.emit(true);
|
|
@@ -94337,7 +94340,7 @@ class Dropdown {
|
|
|
94337
94340
|
this._cleanup = null;
|
|
94338
94341
|
}
|
|
94339
94342
|
// Hide the popover
|
|
94340
|
-
|
|
94343
|
+
this._menu.dataset.show = 'false';
|
|
94341
94344
|
this._menu.classList.remove('block');
|
|
94342
94345
|
this._menu.classList.add('hidden');
|
|
94343
94346
|
this.isOpen.emit(false);
|
package/hydrate/index.mjs
CHANGED
|
@@ -94205,6 +94205,7 @@ class Dropdown {
|
|
|
94205
94205
|
isOpen;
|
|
94206
94206
|
_loaded = false;
|
|
94207
94207
|
_menu;
|
|
94208
|
+
_trigger;
|
|
94208
94209
|
_cleanup;
|
|
94209
94210
|
componentShouldUpdate() {
|
|
94210
94211
|
this._update();
|
|
@@ -94224,16 +94225,16 @@ class Dropdown {
|
|
|
94224
94225
|
this._checkItems();
|
|
94225
94226
|
}
|
|
94226
94227
|
render() {
|
|
94227
|
-
return (hAsync(Host, { key: '
|
|
94228
|
+
return (hAsync(Host, { key: '6b7b418a8b5e962f6881418630e9f284a8ed1785', class: 'relative' }, hAsync("div", { key: '46fb2c0286f69da71e4fbf940123761ee1869077', class: 'trigger', ref: el => (this._trigger = el), onClick: () => this._triggerClickHandler() }, hAsync("slot", { key: 'c9bb61458cfb2ef3dc99f04d699d83a173e94789', name: 'trigger' })), hAsync("div", { key: '33693a79995e4fe465c3d9576f512115ca8c9c9c', class: 'relative w-full' }, hAsync("p-dropdown-menu-container", { key: 'ca8c374c376c5529f8b1b91e542f3e6898038fbd', allowOverflow: this.allowOverflow, class: cn(dropdownContainerClass({
|
|
94228
94229
|
strategy: this.strategy,
|
|
94229
94230
|
maxWidth: this.applyMaxWidth,
|
|
94230
94231
|
fullWidth: this.applyFullWidth && !this.applyMaxWidth,
|
|
94231
94232
|
isDatepicker: this.isDatepicker,
|
|
94232
|
-
}), this.containerClass), "data-placement": this.placement, "data-strategy": this.strategy, fullWidth: this.applyFullWidth && !this.applyMaxWidth, maxWidth: this.applyMaxWidth, ref: el => this._load(el), role: 'popover', scrollable: this.scrollable, variant: this.variant, onClick: () => this._containerClickHandler() }, hAsync("slot", { key: '
|
|
94233
|
+
}), this.containerClass), "data-placement": this.placement, "data-strategy": this.strategy, fullWidth: this.applyFullWidth && !this.applyMaxWidth, maxWidth: this.applyMaxWidth, ref: el => this._load(el), role: 'popover', scrollable: this.scrollable, variant: this.variant, onClick: () => this._containerClickHandler() }, hAsync("slot", { key: '544f91dfb12b2f3e9a37b319270c75c2eed95662', name: 'items' })))));
|
|
94233
94234
|
}
|
|
94234
94235
|
_checkButtons(active = false) {
|
|
94235
94236
|
const buttons = this._el.querySelectorAll('p-button[slot="trigger"]');
|
|
94236
|
-
const isOpen = this._menu.dataset.show === '';
|
|
94237
|
+
const isOpen = this._menu.dataset.show === 'true';
|
|
94237
94238
|
for (let button of buttons) {
|
|
94238
94239
|
button.disabled = this.disableTriggerClick;
|
|
94239
94240
|
button.active = active;
|
|
@@ -94278,8 +94279,9 @@ class Dropdown {
|
|
|
94278
94279
|
this._show();
|
|
94279
94280
|
}
|
|
94280
94281
|
documentClickHandler(event) {
|
|
94281
|
-
if (
|
|
94282
|
-
childOfComposed(event, this._menu)
|
|
94282
|
+
if (this._menu.dataset.show === 'false' ||
|
|
94283
|
+
childOfComposed(event, this._menu) ||
|
|
94284
|
+
childOfComposed(event, this._trigger)) {
|
|
94283
94285
|
return;
|
|
94284
94286
|
}
|
|
94285
94287
|
this._hide();
|
|
@@ -94299,7 +94301,8 @@ class Dropdown {
|
|
|
94299
94301
|
if (this.manual) {
|
|
94300
94302
|
return;
|
|
94301
94303
|
}
|
|
94302
|
-
|
|
94304
|
+
const isOpen = this._menu.dataset.show === 'true';
|
|
94305
|
+
if (isOpen) {
|
|
94303
94306
|
this._hide();
|
|
94304
94307
|
return;
|
|
94305
94308
|
}
|
|
@@ -94320,7 +94323,7 @@ class Dropdown {
|
|
|
94320
94323
|
return;
|
|
94321
94324
|
}
|
|
94322
94325
|
this._cleanup = autoUpdate(this._el, this._menu, () => this._update());
|
|
94323
|
-
this._menu.dataset.show = '';
|
|
94326
|
+
this._menu.dataset.show = 'true';
|
|
94324
94327
|
this._menu.classList.remove('hidden');
|
|
94325
94328
|
this._menu.classList.add('block');
|
|
94326
94329
|
this.isOpen.emit(true);
|
|
@@ -94335,7 +94338,7 @@ class Dropdown {
|
|
|
94335
94338
|
this._cleanup = null;
|
|
94336
94339
|
}
|
|
94337
94340
|
// Hide the popover
|
|
94338
|
-
|
|
94341
|
+
this._menu.dataset.show = 'false';
|
|
94339
94342
|
this._menu.classList.remove('block');
|
|
94340
94343
|
this._menu.classList.add('hidden');
|
|
94341
94344
|
this.isOpen.emit(false);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t,p as i,H as e,c as s,h as a,d as n}from"./p-CySg37XO.js";import{a as o,c as h,o as r,f as d,s as l}from"./p-CeBIrPPx.js";import{c}from"./p-CBWjHURv.js";import{a as m}from"./p-TyZ7uPES.js";import{c as p}from"./p-xs4N_Y-0.js";import{d as w}from"./p-Bl7NThUo.js";const u=c(["hidden"],{variants:{strategy:{absolute:"absolute",fixed:"fixed"},fullWidth:{false:null,true:"w-full"},maxWidth:{false:null,true:"max-w-[13.875rem]"},isDatepicker:{false:"z-dropdown",true:"z-datepicker"}},compoundVariants:[{fullWidth:!1,maxWidth:!0,class:"w-auto"}]}),f=i(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.isOpen=s(this,"isOpen",3)}variant="default";placement="bottom-start";offset=8;strategy="absolute";show=!1;applyMaxWidth=!0;applyFullWidth=!0;allowOverflow=!1;scrollable=!1;insideClick=!1;disableTriggerClick=!1;manual=!1;applyChevron=!0;manualChevron=!1;chevronPosition="end";chevronDirection;containerClass;isDatepicker=!1;get _el(){return this}isOpen;_loaded=!1;_menu;_cleanup;componentShouldUpdate(){this._update()}componentDidLoad(){this._checkButtons()}disconnectedCallback(){this._cleanup&&(this._cleanup(),this._cleanup=null)}componentDidRender(){this._checkButtons(),this._checkItems()}render(){return a(n,{key:"f0b2ce04023c667bf22d051c29beaa53549ed637",class:"relative"},a("div",{key:"c73fb7356e6948923b340983b22ceed3ec35b303",class:"trigger",onClick:()=>this._triggerClickHandler()},a("slot",{key:"2204a45e84b794f6c57e3eb2731b28af6b9b9b95",name:"trigger"})),a("div",{key:"6485ef65336ae895e9b6943880aed380ea409ea2",class:"relative w-full"},a("p-dropdown-menu-container",{key:"4aa30289b1b7522542db38fb1e29a6f203a64e16",allowOverflow:this.allowOverflow,class:p(u({strategy:this.strategy,maxWidth:this.applyMaxWidth,fullWidth:this.applyFullWidth&&!this.applyMaxWidth,isDatepicker:this.isDatepicker}),this.containerClass),"data-placement":this.placement,"data-strategy":this.strategy,fullWidth:this.applyFullWidth&&!this.applyMaxWidth,maxWidth:this.applyMaxWidth,ref:t=>this._load(t),role:"popover",scrollable:this.scrollable,variant:this.variant,onClick:()=>this._containerClickHandler()},a("slot",{key:"60036ad51052c0ea0133f414857b3a329908fb98",name:"items"}))))}_checkButtons(t=!1){const i=this._el.querySelectorAll('p-button[slot="trigger"]'),e=""===this._menu.dataset.show;for(let s of i)s.disabled=this.disableTriggerClick,s.active=t,s.iconOnly||(!1!==this.applyChevron&&!0!==this.manualChevron?(s.chevronPosition=this.chevronPosition,s.chevron=this.chevronDirection??(this.placement.includes("top")?e?"down":"up":e?"up":"down")):!1===this.manualChevron&&(s.chevron=!1))}_checkItems(){const t=this._el.querySelectorAll("p-dropdown-menu-item");for(let i of t)"pagination"!==i.variant&&"negative"!==i.variant&&(i.variant=this.variant)}onShowChange(t){this._loaded&&(t?this._show():this._hide())}documentClickHandler(t){Object.hasOwn(this._menu.dataset,"show")&&!m(t,this._menu)&&this._hide()}_containerClickHandler(){this.insideClick||Object.hasOwn(this._menu.dataset,"show")&&this._hide()}_triggerClickHandler(){this.disableTriggerClick||this.manual||(Object.hasOwn(this._menu.dataset,"show")?this._hide():this._show())}_load(t){this._menu=t,t&&(this._update(),this._loaded=!0,this.show&&setTimeout((()=>this._show()),100))}_show(){this._loaded&&(this._cleanup=o(this._el,this._menu,(()=>this._update())),this._menu.dataset.show="",this._menu.classList.remove("hidden"),this._menu.classList.add("block"),this.isOpen.emit(!0),this._checkButtons(!0))}_hide(){this._loaded&&!this.show&&(this._cleanup&&(this._cleanup(),this._cleanup=null),delete this._menu.dataset.show,this._menu.classList.remove("block"),this._menu.classList.add("hidden"),this.isOpen.emit(!1),this._checkButtons(!1))}_update(){this._menu&&h(this._el,this._menu,{placement:this.placement,strategy:this.strategy,middleware:[r(this.offset),d(),l()]}).then((({x:t,y:i,placement:e})=>{this._menu.dataset.placement=e,Object.assign(this._menu.style,{top:`${i}px`,left:`${t}px`})}))}static get watchers(){return{show:[{onShowChange:0}]}}static get style(){return"*{box-sizing:border-box}.static{position:static}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.z-datepicker{z-index:401}.z-dropdown{z-index:200}.block{display:block}.hidden{display:none}.w-auto{width:auto}.w-full{width:100%}.max-w-\\[13\\.875rem\\]{max-width:13.875rem}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:85.375rem){.container{max-width:85.375rem}}@media (min-width:90rem){.container{max-width:90rem}}@media (min-width:96rem){.container{max-width:96rem}}@media (min-width:105rem){.container{max-width:105rem}}@media (min-width:120rem){.container{max-width:120rem}}@media (min-width:160rem){.container{max-width:160rem}}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}"}},[769,"p-dropdown",{variant:[1],placement:[513],offset:[2],strategy:[1],show:[4],applyMaxWidth:[4,"apply-max-width"],applyFullWidth:[4,"apply-full-width"],allowOverflow:[4,"allow-overflow"],scrollable:[8],insideClick:[4,"inside-click"],disableTriggerClick:[4,"disable-trigger-click"],manual:[4],applyChevron:[4,"apply-chevron"],manualChevron:[4,"manual-chevron"],chevronPosition:[1,"chevron-position"],chevronDirection:[1,"chevron-direction"],containerClass:[1,"container-class"],isDatepicker:[4,"is-datepicker"]},[[6,"click","documentClickHandler"]],{show:[{onShowChange:0}]}]);function x(){"undefined"!=typeof customElements&&["p-dropdown","p-dropdown-menu-container"].forEach((i=>{switch(i){case"p-dropdown":customElements.get(t(i))||customElements.define(t(i),f);break;case"p-dropdown-menu-container":customElements.get(t(i))||w()}}))}x();export{f as D,x as d}
|