UNPKG

@rero/rero-ils-ui

Version:

User interface for RERO integrated library system (RERO ILS).

39 lines (33 loc) 6.14 kB
import{Ba as J,Ea as K,Fa as L,Ga as h,Ha as v,o as V,va as $,wa as z,xa as G,ya as b}from"./chunk-FRI676LD.js";import{_ as O,ga as H,wa as P}from"./chunk-WKOKZ3JO.js";import{Aa as D,Cb as j,Db as Q,Eb as p,Fa as C,Fc as w,Gc as m,Hc as x,Ic as B,Vc as A,ac as i,bc as f,cc as u,da as I,ea as F,ga as S,gb as r,hc as E,ia as T,ic as M,jc as y,sc as _,tc as R,uc as g,vc as q,xc as c,yb as k,yc as d,zb as N}from"./chunk-3WD6XLXL.js";var U=` .p-card { background: dt('card.background'); color: dt('card.color'); box-shadow: dt('card.shadow'); border-radius: dt('card.border.radius'); display: flex; flex-direction: column; } .p-card-caption { display: flex; flex-direction: column; gap: dt('card.caption.gap'); } .p-card-body { padding: dt('card.body.padding'); display: flex; flex-direction: column; gap: dt('card.body.gap'); } .p-card-title { font-size: dt('card.title.font.size'); font-weight: dt('card.title.font.weight'); } .p-card-subtitle { color: dt('card.subtitle.color'); } `;var Y=["header"],Z=["title"],ee=["subtitle"],te=["content"],ne=["footer"],ie=["*",[["p-header"]],[["p-footer"]]],ae=["*","p-header","p-footer"];function re(e,l){e&1&&y(0)}function oe(e,l){if(e&1&&(f(0,"div",1),g(1,1),p(2,re,1,0,"ng-container",2),u()),e&2){let t=_();m(t.cx("header")),i("pBind",t.ptm("header")),r(2),i("ngTemplateOutlet",t.headerTemplate||t._headerTemplate)}}function le(e,l){if(e&1&&(E(0),x(1),M()),e&2){let t=_(2);r(),B(t.header)}}function pe(e,l){e&1&&y(0)}function ce(e,l){if(e&1&&(f(0,"div",1),p(1,le,2,1,"ng-container",3)(2,pe,1,0,"ng-container",2),u()),e&2){let t=_();m(t.cx("title")),i("pBind",t.ptm("title")),r(),i("ngIf",t.header&&!t._titleTemplate&&!t.titleTemplate),r(),i("ngTemplateOutlet",t.titleTemplate||t._titleTemplate)}}function de(e,l){if(e&1&&(E(0),x(1),M()),e&2){let t=_(2);r(),B(t.subheader)}}function se(e,l){e&1&&y(0)}function me(e,l){if(e&1&&(f(0,"div",1),p(1,de,2,1,"ng-container",3)(2,se,1,0,"ng-container",2),u()),e&2){let t=_();m(t.cx("subtitle")),i("pBind",t.ptm("subtitle")),r(),i("ngIf",t.subheader&&!t._subtitleTemplate&&!t.subtitleTemplate),r(),i("ngTemplateOutlet",t.subtitleTemplate||t._subtitleTemplate)}}function fe(e,l){e&1&&y(0)}function ue(e,l){e&1&&y(0)}function _e(e,l){if(e&1&&(f(0,"div",1),g(1,2),p(2,ue,1,0,"ng-container",2),u()),e&2){let t=_();m(t.cx("footer")),i("pBind",t.ptm("footer")),r(2),i("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var ye=` ${U} .p-card { display: block; } `,he={root:"p-card p-component",header:"p-card-header",body:"p-card-body",caption:"p-card-caption",title:"p-card-title",subtitle:"p-card-subtitle",content:"p-card-content",footer:"p-card-footer"},W=(()=>{class e extends J{name="card";style=ye;classes=he;static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(e)))(n||e)}})();static \u0275prov=I({token:e,factory:e.\u0275fac})}return e})(),Te=(function(e){return e.root="p-card",e.header="p-card-header",e.body="p-card-body",e.caption="p-card-caption",e.title="p-card-title",e.subtitle="p-card-subtitle",e.content="p-card-content",e.footer="p-card-footer",e})(Te||{}),X=new S("CARD_INSTANCE"),ge=(()=>{class e extends L{componentName="Card";$pcCard=T(X,{optional:!0,skipSelf:!0})??void 0;bindDirectiveInstance=T(h,{self:!0});_componentStyle=T(W);onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}header;subheader;set style(t){V(this._style(),t)||(this._style.set(t),this.el?.nativeElement&&t&&Object.keys(t).forEach(o=>{this.el.nativeElement.style[o]=t[o]}))}get style(){return this._style()}styleClass;headerFacet;footerFacet;headerTemplate;titleTemplate;subtitleTemplate;contentTemplate;footerTemplate;_headerTemplate;_titleTemplate;_subtitleTemplate;_contentTemplate;_footerTemplate;_style=D(null);getBlockableElement(){return this.el.nativeElement}templates;onAfterContentInit(){this.templates.forEach(t=>{switch(t.getType()){case"header":this._headerTemplate=t.template;break;case"title":this._titleTemplate=t.template;break;case"subtitle":this._subtitleTemplate=t.template;break;case"content":this._contentTemplate=t.template;break;case"footer":this._footerTemplate=t.template;break;default:this._contentTemplate=t.template;break}})}static \u0275fac=(()=>{let t;return function(n){return(t||(t=C(e)))(n||e)}})();static \u0275cmp=k({type:e,selectors:[["p-card"]],contentQueries:function(o,n,s){if(o&1&&q(s,$,5)(s,z,5)(s,Y,4)(s,Z,4)(s,ee,4)(s,te,4)(s,ne,4)(s,G,4),o&2){let a;c(a=d())&&(n.headerFacet=a.first),c(a=d())&&(n.footerFacet=a.first),c(a=d())&&(n.headerTemplate=a.first),c(a=d())&&(n.titleTemplate=a.first),c(a=d())&&(n.subtitleTemplate=a.first),c(a=d())&&(n.contentTemplate=a.first),c(a=d())&&(n.footerTemplate=a.first),c(a=d())&&(n.templates=a)}},hostVars:4,hostBindings:function(o,n){o&2&&(w(n._style()),m(n.cn(n.cx("root"),n.styleClass)))},inputs:{header:"header",subheader:"subheader",style:"style",styleClass:"styleClass"},features:[A([W,{provide:X,useExisting:e},{provide:K,useExisting:e}]),j([h]),Q],ngContentSelectors:ae,decls:8,vars:11,consts:[[3,"pBind","class",4,"ngIf"],[3,"pBind"],[4,"ngTemplateOutlet"],[4,"ngIf"]],template:function(o,n){o&1&&(R(ie),p(0,oe,3,4,"div",0),f(1,"div",1),p(2,ce,3,5,"div",0)(3,me,3,5,"div",0),f(4,"div",1),g(5),p(6,fe,1,0,"ng-container",2),u(),p(7,_e,3,4,"div",0),u()),o&2&&(i("ngIf",n.headerFacet||n.headerTemplate||n._headerTemplate),r(),m(n.cx("body")),i("pBind",n.ptm("body")),r(),i("ngIf",n.header||n.titleTemplate||n._titleTemplate),r(),i("ngIf",n.subheader||n.subtitleTemplate||n._subtitleTemplate),r(),m(n.cx("content")),i("pBind",n.ptm("content")),r(2),i("ngTemplateOutlet",n.contentTemplate||n._contentTemplate),r(),i("ngIf",n.footerFacet||n.footerTemplate||n._footerTemplate))},dependencies:[P,O,H,b,v,h],encapsulation:2,changeDetection:0})}return e})(),He=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=N({type:e});static \u0275inj=F({imports:[ge,b,v,b,v]})}return e})();export{W as a,Te as b,ge as c,He as d};