@kosdev-code/kos-ddk-model-components 0.1.0-dev.5880 → 0.1.0-dev.5881
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"holder-card.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/holders/holder-card.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAEL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AA6BxC,UAAU,KAAK;IACb,MAAM,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACvC;AA+CD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"holder-card.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/holders/holder-card.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAEL,kBAAkB,EAEnB,MAAM,gCAAgC,CAAC;AA6BxC,UAAU,KAAK;IACb,MAAM,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,aAAa,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACvC;AA+CD,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAsQrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"macro-holder-card.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/holders/macro-holder-card.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAwHpE,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAID,eAAO,MAAM,eAAe,2DAMvB,oBAAoB;;
|
|
1
|
+
{"version":3,"file":"macro-holder-card.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/holders/macro-holder-card.tsx"],"names":[],"mappings":";AAWA,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAwHpE,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACxC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B;AAID,eAAO,MAAM,eAAe,2DAMvB,oBAAoB;;CAoKxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-nns-modal.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/remote-nns-modal/remote-nns-modal.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,gCAAgC,CAAC;AAcxC,UAAU,mBAAoB,SAAQ,eAAe;IACnD,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,gCACI,mBAAmB;;
|
|
1
|
+
{"version":3,"file":"remote-nns-modal.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/remote-nns-modal/remote-nns-modal.tsx"],"names":[],"mappings":"AACA,OAAO,EAKL,KAAK,eAAe,EAErB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,gCAAgC,CAAC;AAcxC,UAAU,mBAAoB,SAAQ,eAAe;IACnD,UAAU,EAAE,eAAe,CAAC;CAC7B;AAED,eAAO,MAAM,cAAc,gCACI,mBAAmB;;CAoLjD,CAAC"}
|
package/index.cjs
CHANGED
|
@@ -195,7 +195,7 @@
|
|
|
195
195
|
`,gi=T.div`
|
|
196
196
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
197
197
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
198
|
-
`,xi=t=>!t||t==="white",bi=t=>t?void 0:"white",yi=(t,e)=>e&&e.hasEnjoyByWarning?"var(--ddk-component-dashboard-enjoy-by-trouble-warning-color)":t?void 0:"white",so=u.kosComponent(({holder:t,onHolderSelect:e,showNavIcon:n,summaryBody:s,altNamePolicy:o="disable"})=>{const{model:a}=Me(),{visibleTroubles:c,initialized:i}=je(t),l=a==null?void 0:a.currentRole,{t:m}=u.useKosTranslation("troubles"),{t:h}=u.useKosTranslation("common"),{componentModeOverride:f}=d.useComponentConfigurationContext(),g=f==="compact",{getExtensions:v}=Te();let y=!1;const x=u.getKosCompanionModel(t,$.FreestyleHolder.type),_=x==null?void 0:x.altName,R=x==null?void 0:x.isRemote,D=o==="replace"&&!!_&&(x==null?void 0:x.isRemote);x!=null&&x.isRemote&&o==="disable"&&(no.warn("Holder is remote, skipping rendering"),y=!0);const[P,E]=p.useState(!1),w=!!t.ingredientId,U=p.useCallback(()=>{E(!1)},[]),q=(c==null?void 0:c.length)??0,B=c==null?void 0:c[0],H=q>0,wt=Ke(B),Ie=t.hasFuelGuage,pe=t.fillPercent,_t=t.removed?"var(--ddk-component-dashboard-card-background-color-removed)":y?"var(--ddk-component-dashboard-card-background-color-disabled)":H?`${B==null?void 0:B.color}`:t.unassigned?"var(--ddk-component-dashboard-card-background-color-unassigned)":void 0,ze
|
|
198
|
+
`,xi=t=>!t||t==="white",bi=t=>t?void 0:"white",yi=(t,e)=>e&&e.hasEnjoyByWarning?"var(--ddk-component-dashboard-enjoy-by-trouble-warning-color)":t?void 0:"white",so=u.kosComponent(({holder:t,onHolderSelect:e,showNavIcon:n,summaryBody:s,altNamePolicy:o="disable"})=>{const{model:a}=Me(),{visibleTroubles:c,initialized:i}=je(t),l=a==null?void 0:a.currentRole,{t:m}=u.useKosTranslation("troubles"),{t:h}=u.useKosTranslation("common"),{componentModeOverride:f}=d.useComponentConfigurationContext(),g=f==="compact",{getExtensions:v}=Te();let y=!1;const x=u.getKosCompanionModel(t,$.FreestyleHolder.type),_=x==null?void 0:x.altName,R=x==null?void 0:x.isRemote,D=o==="replace"&&!!_&&(x==null?void 0:x.isRemote);x!=null&&x.isRemote&&o==="disable"&&(no.warn("Holder is remote, skipping rendering"),y=!0);const[P,E]=p.useState(!1),w=!!t.ingredientId,U=p.useCallback(()=>{E(!1)},[]),q=(c==null?void 0:c.length)??0,B=c==null?void 0:c[0],H=q>0,wt=Ke(B),Ie=t.hasFuelGuage,pe=t.fillPercent,_t=t.removed?"var(--ddk-component-dashboard-card-background-color-removed)":y?"var(--ddk-component-dashboard-card-background-color-disabled)":H?`${B==null?void 0:B.color}`:t.unassigned?"var(--ddk-component-dashboard-card-background-color-unassigned)":void 0,ze=!g&&t.removed?"var(--ddk-component-dashboard-card-header-background-color-removed)":void 0,He=xi(_t),he=y?"white":t.unassigned?"var(--ddk-generic-color-grey-30)":H?bi(He):w?void 0:"var(--ddk-component-dashboard-card-color-unassigned)",kt=y?"white":H?yi(He,t):w?void 0:"var(--ddk-component-dashboard-card-color-unassigned)",Ze=D?h(_,{defaultValue:"Remote NNS Tray"}):d.useAbbreviation(t.name,g),We=y?h("disabled"):D?"":t.removed?h(t.previousIngredientName):t.unassigned?h("unassigned"):h(t.ingredientName),Xe=r.jsx(ns,{color:he,children:We}),St=r.jsx(fi,{color:he,children:Ze}),Tt=D?h(_,{defaultValue:"Remote NNS Tray"}):t.name,jt=r.jsxs(ns,{children:[Tt," ",We]}),It=w&&Ie&&!H&&i?s??r.jsx(d.FuelGauge,{color:H?"var(--ddk-generic-color-white)":void 0,size:"small",value:pe}):null,qe=w&&Ie&&!H&&i&&d.getFillColor(pe)||void 0,fe=u.ExtensionManager.executeDashboardKeyFactory(t)||"",ie=p.useMemo(()=>v(le.id),[v]),ge=p.useMemo(()=>ie.filter(ce=>!!ce.data).reduce((ce,En)=>{const So=En.data;return ce[So.dashboardKey]=En.data,ce},{}),[ie]),Ye=!!ge[fe],{HolderContent:Et,modalOptions:bo}=en(t),Pt=se.useExtensionComponent(le),yo=p.useMemo(()=>{var ce;return Et?r.jsx(Et,{holder:t,onComplete:U}):Ye&&Pt?r.jsx(Pt,{module:(ce=ge[fe])==null?void 0:ce.id,holder:t}):void 0},[Et,U,ge,Ye,t,fe,Pt]),vo=$e(B),Co=R&&!D,wo=r.jsx(gi,{color:H?he:kt,children:Co?h("remote-nns-active"):H?m(vo.summary,{context:B!=null&&B.deferred?"queued":void 0,data:wt}):!g&&r.jsx(mn,{size:"small",holder:t})}),{holderExperience:_o,setHolderExperience:In}=Se(t),{future:Ge}=J(B),ko=p.useCallback(()=>{y||t.sortedPumps.length<=0||(l==="technician"?E(!0):t.unassigned||t.removed?In("rfid-override"):H&&(e==null||e(t)))},[y,t,l,In,H,e]);return r.jsxs(r.Fragment,{children:[r.jsxs(d.Modal,{contain:!g,...bo,show:P,onClose:U,children:[r.jsx(d.Header,{contain:g,showCloseButton:!0,title:jt,onClose:U,CloseButton:g?d.BackButton:void 0}),yo]}),r.jsx(p.Suspense,{children:_o}),r.jsx(d.HolderDashboardCard,{avatar:St,headerBackgroundColor:ze,backgroundColor:_t,footer:wo,cardId:t.path,errors:q,title:Xe,indicatorColor:qe,disabled:y,body:It,showNavIcon:n,onCardSelect:ko},t.path),(B==null?void 0:B.future)&&r.jsx(K,{title:Xe,future:Ge,failureMessage:m(`troubles.${B.type}.error`,{context:Ge==null?void 0:Ge.reason})})]})}),jn=T.div`
|
|
199
199
|
display: flex;
|
|
200
200
|
flex-direction: var(--ddk-component-dashboard-card-flex-direction);
|
|
201
201
|
flex-wrap: nowrap;
|
|
@@ -229,7 +229,7 @@
|
|
|
229
229
|
`,Ti=T.div`
|
|
230
230
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
231
231
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
232
|
-
`,ji=(t,e,n,s)=>{const o=s(`common:macros.${t.name}`),a=_i.includes(t.name),c=e?a?"":` ${s(`common:${t.ingredientName}`)}`:` ${s("common:macros.unassigned")}`,i=`${o}${c}`,l=n?a?o:c:`${o} ${c}`;return{titleText:i,cardTitleText:l}},Ii=u.kosComponent(({holder:t,dashboardKey:e,fallbackStatus:n})=>{const{getExtensions:s}=Te(),o=s(Le.id),a=l=>o.find(m=>{const h=m.data;return(h==null?void 0:h.dashboardKey)===l}),c=a(t.name)??a(e),i=se.useExtensionComponent(Le);return c&&i?r.jsx(i,{module:c.id,holder:t}):r.jsx(d.StatusIndicator,{size:"small",status:n})}),Ei=t=>!t||t==="white",Pi=t=>t?void 0:"white",oo=u.kosComponent(({holder:t,onHolderSelect:e,showNavIcon:n,summaryBody:s})=>{var qe,fe;const{model:o}=Me(),{visibleTroubles:a,initialized:c}=je(t),{t:i}=u.useKosTranslation(["troubles","common"]),{componentModeOverride:l}=d.useComponentConfigurationContext(),m=l==="compact",{getExtensions:h}=Te(),f=(qe=o==null?void 0:o.currentRole)==null?void 0:qe.toLowerCase(),[g,v]=p.useState(!1),y=!!t.ingredientId,x=(a==null?void 0:a.length)??0,_=a==null?void 0:a[0],R=a?a.length>0:!1,D=t.removed?"var(--ddk-component-dashboard-card-background-color-removed)":R?`${_==null?void 0:_.color}`:t.unassigned?"var(--ddk-component-dashboard-card-background-color-unassigned)":void 0,P
|
|
232
|
+
`,ji=(t,e,n,s)=>{const o=s(`common:macros.${t.name}`),a=_i.includes(t.name),c=e?a?"":` ${s(`common:${t.ingredientName}`)}`:` ${s("common:macros.unassigned")}`,i=`${o}${c}`,l=n?a?o:c:`${o} ${c}`;return{titleText:i,cardTitleText:l}},Ii=u.kosComponent(({holder:t,dashboardKey:e,fallbackStatus:n})=>{const{getExtensions:s}=Te(),o=s(Le.id),a=l=>o.find(m=>{const h=m.data;return(h==null?void 0:h.dashboardKey)===l}),c=a(t.name)??a(e),i=se.useExtensionComponent(Le);return c&&i?r.jsx(i,{module:c.id,holder:t}):r.jsx(d.StatusIndicator,{size:"small",status:n})}),Ei=t=>!t||t==="white",Pi=t=>t?void 0:"white",oo=u.kosComponent(({holder:t,onHolderSelect:e,showNavIcon:n,summaryBody:s})=>{var qe,fe;const{model:o}=Me(),{visibleTroubles:a,initialized:c}=je(t),{t:i}=u.useKosTranslation(["troubles","common"]),{componentModeOverride:l}=d.useComponentConfigurationContext(),m=l==="compact",{getExtensions:h}=Te(),f=(qe=o==null?void 0:o.currentRole)==null?void 0:qe.toLowerCase(),[g,v]=p.useState(!1),y=!!t.ingredientId,x=(a==null?void 0:a.length)??0,_=a==null?void 0:a[0],R=a?a.length>0:!1,D=t.removed?"var(--ddk-component-dashboard-card-background-color-removed)":R?`${_==null?void 0:_.color}`:t.unassigned?"var(--ddk-component-dashboard-card-background-color-unassigned)":void 0,P=!m&&t.removed?"var(--ddk-component-dashboard-card-header-background-color-removed)":void 0,E=Ei(D),w=t.unassigned?"var(--ddk-generic-color-grey-30)":R?Pi(E):y?void 0:"var(--ddk-component-dashboard-card-color-unassigned)",U=d.useAbbreviation(t.name,l==="compact"),{titleText:q,cardTitleText:B}=ji(t,y,m,i),H=l==="compact"&&r.jsx(Si,{color:w,children:U}),wt=r.jsx(ss,{color:w,children:B}),Ie=r.jsx(ss,{children:q}),pe=u.ExtensionManager.executeDashboardKeyFactory(t)||"",ze=h(le.id).filter(ie=>!!ie.data).reduce((ie,ge)=>{const Ye=ge.data;return ie[Ye.dashboardKey]=ge.data,ie},{}),He=!!ze[pe],{HolderContent:he,modalOptions:kt}=en(t),Ze=se.useExtensionComponent(le),We=s??r.jsx(Ii,{holder:t,dashboardKey:pe,fallbackStatus:R?"pending":"completed"}),Xe=he?r.jsx(he,{holder:t,onComplete:()=>v(!1)}):He&&Ze?r.jsx(Ze,{module:(fe=ze[pe])==null?void 0:fe.id,holder:t}):null,St=$e(_),Tt=Ke(_),jt=R?r.jsx(Ti,{color:w,children:i(St.summary,{context:_!=null&&_.deferred?"queued":void 0,data:Tt})}):null,It=p.useCallback(()=>{t.sortedPumps.length>0&&(f==="technician"?v(!0):R&&(e==null||e(t)))},[R,t,e,f]);return r.jsxs(r.Fragment,{children:[r.jsx(d.HolderDashboardCard,{avatar:H,headerBackgroundColor:P,backgroundColor:D,body:R?null:We,footer:jt,cardId:t.path,errors:x,title:wt,showNavIcon:n,onCardSelect:It},t.path),r.jsx(d.Modal,{contain:l!=="compact",...kt,show:g,onClose:()=>v(!1),children:r.jsxs(ki,{children:[r.jsx(d.Header,{contain:l==="compact",showCloseButton:!0,title:Ie,onClose:()=>v(!1),CloseButton:l==="compact"?d.BackButton:void 0}),Xe]})}),(_==null?void 0:_.future)&&r.jsx(K,{title:Ie,future:_==null?void 0:_.future})]})}),Ai=u.kosComponent(({holders:t,showNavIcons:e,...n})=>r.jsx(jn,{...n,children:t.map(s=>{const o=s.troubles[0];return r.jsx(oo,{holder:s,showNavIcon:e,onHolderSelect:()=>{o.resolvable&&o.resolve()}},s.id)})})),Ni=T(ke.MessageInformationIconWithBackground)`
|
|
233
233
|
width: var(--ddk-component-macro-card-unavailable-icon-size);
|
|
234
234
|
height: var(--ddk-component-macro-card-unavailable-icon-size);
|
|
235
235
|
`,Di=T(d.UtilityModalHeading)`
|
|
@@ -379,7 +379,7 @@ ${e("agitator:agitate-after-without",{data:{value:t.volWithoutIceMl.displayValue
|
|
|
379
379
|
text-align: center;
|
|
380
380
|
`,dc=({onComplete:t})=>{const{t:e}=u.useKosTranslation("reboot"),[n,s]=p.useState(!1),{model:o}=bt(),{componentModeOverride:a}=d.useComponentConfigurationContext();return r.jsxs(d.Modal,{show:!n,onClose:()=>s(!0),onClosed:t,contain:a!=="compact",children:[a==="compact"&&r.jsx(d.Header,{title:e("reboot"),showCloseButton:!0,onClose:()=>s(!0),CloseButton:d.CompactCloseButton}),r.jsxs(ac,{children:[r.jsxs(ic,{children:[r.jsx(d.QuestionIconStyle,{}),r.jsx(cc,{children:r.jsx(d.UtilityModalHeading,{children:e("modal-heading","Are you sure you want to reboot dispenser?")})})]}),r.jsx(d.CancelProceedFooter,{cancelLabel:`${e("cancel","Cancel")}`,proceedLabel:`${e("reboot","Reboot")}`,onCancel:()=>s(!0),onProceed:()=>o==null?void 0:o.completeReboot()})]})]})},Ee=T(d.LabelInformation)`
|
|
381
381
|
text-align: center;
|
|
382
|
-
`,lc=u.kosComponent(({remoteTray:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"remote-nns"}),[s,o]=p.useState("idle"),[a,c]=p.useState({}),[i,l]=p.useState({}),h=t.holder.pumps.data.filter(D=>D.childPump),f=t.remoteTrayEnabled.value===!0,g=()=>h.every(D=>{const P=a[D.name];return P!=null&&P!==""}),v=p.useCallback((D,P)=>{c(E=>({...E,[D]:P}))},[]),y=p.useCallback(D=>(P="")=>{v(D,P)},[v]),x=p.useCallback(async()=>{t.remoteTrayEnabled.updateProperty(!f),o(f?"disableSuccess":"success")},[f,t.remoteTrayEnabled]),_=p.useCallback(async()=>{o("progress"),l({});let D=!1;await Promise.all(h.map(async P=>{try{const E=u.getKosCompanionModel(P,$.FreestylePump.type),[w]=await E.replacePump(a[P.name]);w&&(l(U=>({...U,[P.name]:w})),D=!0)}catch(E){console.error(E),l(w=>({...w,[P.name]:"unknownError"})),D=!0}})),D?o("pump"):x()},[
|
|
382
|
+
`,lc=u.kosComponent(({remoteTray:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"remote-nns"}),[s,o]=p.useState("idle"),[a,c]=p.useState({}),[i,l]=p.useState({}),h=t.holder.pumps.data.filter(D=>D.childPump),f=t.remoteTrayEnabled.value===!0,g=p.useCallback(()=>h.every(D=>{const P=a[D.name];return P!=null&&P!==""}),[a,h]),v=p.useCallback((D,P)=>{c(E=>({...E,[D]:P}))},[]),y=p.useCallback(D=>(P="")=>{v(D,P)},[v]),x=p.useCallback(async()=>{t.remoteTrayEnabled.updateProperty(!f),o(f?"disableSuccess":"success")},[f,t.remoteTrayEnabled]),_=p.useCallback(async()=>{o("progress"),l({});let D=!1;await Promise.all(h.map(async P=>{try{const E=u.getKosCompanionModel(P,$.FreestylePump.type),[w]=await E.replacePump(a[P.name]);w&&(l(U=>({...U,[P.name]:w})),D=!0)}catch(E){console.error(E),l(w=>({...w,[P.name]:"unknownError"})),D=!0}})),D?o("pump"):x()},[a,h,x]),R=p.useMemo(()=>({idle:{title:n(f?"disable-title":"idle-title"),information:r.jsx(Ee,{children:n(f?"disable-info":"idle-info")}),footer:r.jsx(d.Button,{onPointerDown:()=>{f?x():o("pump")},children:n(f?"disable":"enable")}),status:"information"},pump:{title:n("pump-title"),information:r.jsxs(r.Fragment,{children:[r.jsx(Ee,{children:n("pump-info")}),h.map(D=>r.jsx(d.ErrorInputCard,{layout:"hex",description:i[D.name]?n(`errors.${i[D.name]}`):"",value:a[D.name]??"",label:n(`pumps.${D.name}`),onChange:y(D.name)},D.name))]}),footer:r.jsxs(r.Fragment,{children:[r.jsx(d.Button,{disabled:!g(),onPointerDown:_,children:n("enter")}),r.jsx(d.Button,{onPointerDown:e,children:n("cancel")})]})},progress:{title:n("progress-title"),information:r.jsx(Ee,{children:n("progress-info")}),status:"loading"},success:{title:n("success-title"),information:r.jsx(Ee,{children:n("success-info")}),status:"success"},disableSuccess:{title:n("disable-success-title"),information:r.jsx(Ee,{children:n("disable-success-info")}),status:"success"}}),[f,y,e,a,i,h,g,_,n,x]);return r.jsx(d.WorkflowModal,{...R[s],onClose:()=>e()})}),uc=u.kosComponent(({cardModel:t})=>(u.KosLog.debug("RemoteTray",t.name),r.jsx(io,{holder:t.holder}))),mc=T.div`
|
|
383
383
|
font-size: var(--ddk-component-holder-card-footer-font-size);
|
|
384
384
|
color: ${t=>t.color??"var(--ddk-generic-color-black)"};
|
|
385
385
|
position: absolute;
|
package/index.js
CHANGED
|
@@ -5237,7 +5237,7 @@ const Dr = S.div`
|
|
|
5237
5237
|
h != null && h.isRemote && s === "disable" && (Us.warn("Holder is remote, skipping rendering"), y = !0);
|
|
5238
5238
|
const [P, E] = T(!1), x = !!t.ingredientId, X = V(() => {
|
|
5239
5239
|
E(!1);
|
|
5240
|
-
}, []), oe = (c == null ? void 0 : c.length) ?? 0, U = c == null ? void 0 : c[0], te = oe > 0, Ht = Ut(U), Xe = t.hasFuelGuage, De = t.fillPercent, Wt = t.removed ? "var(--ddk-component-dashboard-card-background-color-removed)" : y ? "var(--ddk-component-dashboard-card-background-color-disabled)" : te ? `${U == null ? void 0 : U.color}` : t.unassigned ? "var(--ddk-component-dashboard-card-background-color-unassigned)" : void 0, lt = t.removed ? "var(--ddk-component-dashboard-card-header-background-color-removed)" : void 0, ut = ic(Wt), Ne = y ? "white" : t.unassigned ? "var(--ddk-generic-color-grey-30)" : te ? ac(ut) : x ? void 0 : "var(--ddk-component-dashboard-card-color-unassigned)", Xt = y ? "white" : te ? cc(ut, t) : x ? void 0 : "var(--ddk-component-dashboard-card-color-unassigned)", pt = R ? u(_, { defaultValue: "Remote NNS Tray" }) : Fr(t.name, m), mt = y ? u("disabled") : R ? "" : t.removed ? u(t.previousIngredientName) : t.unassigned ? u("unassigned") : u(t.ingredientName), ht = /* @__PURE__ */ i(Dr, { color: Ne, children: mt }), qt = /* @__PURE__ */ i(sc, { color: Ne, children: pt }), Yt = R ? u(_, { defaultValue: "Remote NNS Tray" }) : t.name, Gt = /* @__PURE__ */ f(Dr, { children: [
|
|
5240
|
+
}, []), oe = (c == null ? void 0 : c.length) ?? 0, U = c == null ? void 0 : c[0], te = oe > 0, Ht = Ut(U), Xe = t.hasFuelGuage, De = t.fillPercent, Wt = t.removed ? "var(--ddk-component-dashboard-card-background-color-removed)" : y ? "var(--ddk-component-dashboard-card-background-color-disabled)" : te ? `${U == null ? void 0 : U.color}` : t.unassigned ? "var(--ddk-component-dashboard-card-background-color-unassigned)" : void 0, lt = !m && t.removed ? "var(--ddk-component-dashboard-card-header-background-color-removed)" : void 0, ut = ic(Wt), Ne = y ? "white" : t.unassigned ? "var(--ddk-generic-color-grey-30)" : te ? ac(ut) : x ? void 0 : "var(--ddk-component-dashboard-card-color-unassigned)", Xt = y ? "white" : te ? cc(ut, t) : x ? void 0 : "var(--ddk-component-dashboard-card-color-unassigned)", pt = R ? u(_, { defaultValue: "Remote NNS Tray" }) : Fr(t.name, m), mt = y ? u("disabled") : R ? "" : t.removed ? u(t.previousIngredientName) : t.unassigned ? u("unassigned") : u(t.ingredientName), ht = /* @__PURE__ */ i(Dr, { color: Ne, children: mt }), qt = /* @__PURE__ */ i(sc, { color: Ne, children: pt }), Yt = R ? u(_, { defaultValue: "Remote NNS Tray" }) : t.name, Gt = /* @__PURE__ */ f(Dr, { children: [
|
|
5241
5241
|
Yt,
|
|
5242
5242
|
" ",
|
|
5243
5243
|
mt
|
|
@@ -5429,7 +5429,7 @@ const pc = ["water", "carb", "ns", "nns"], mc = S.div`
|
|
|
5429
5429
|
summaryBody: r
|
|
5430
5430
|
}) => {
|
|
5431
5431
|
var ft, Ae;
|
|
5432
|
-
const { model: s } = At(), { visibleTroubles: o, initialized: c } = dt(t), { t: a } = I(["troubles", "common"]), { componentModeOverride: d } = J(), l = d === "compact", { getExtensions: u } = ct(), p = (ft = s == null ? void 0 : s.currentRole) == null ? void 0 : ft.toLowerCase(), [m, v] = T(!1), y = !!t.ingredientId, h = (o == null ? void 0 : o.length) ?? 0, _ = o == null ? void 0 : o[0], L = o ? o.length > 0 : !1, R = t.removed ? "var(--ddk-component-dashboard-card-background-color-removed)" : L ? `${_ == null ? void 0 : _.color}` : t.unassigned ? "var(--ddk-component-dashboard-card-background-color-unassigned)" : void 0, P = t.removed ? "var(--ddk-component-dashboard-card-header-background-color-removed)" : void 0, E = vc(R), x = t.unassigned ? "var(--ddk-generic-color-grey-30)" : L ? bc(E) : y ? void 0 : "var(--ddk-component-dashboard-card-color-unassigned)", X = Fr(
|
|
5432
|
+
const { model: s } = At(), { visibleTroubles: o, initialized: c } = dt(t), { t: a } = I(["troubles", "common"]), { componentModeOverride: d } = J(), l = d === "compact", { getExtensions: u } = ct(), p = (ft = s == null ? void 0 : s.currentRole) == null ? void 0 : ft.toLowerCase(), [m, v] = T(!1), y = !!t.ingredientId, h = (o == null ? void 0 : o.length) ?? 0, _ = o == null ? void 0 : o[0], L = o ? o.length > 0 : !1, R = t.removed ? "var(--ddk-component-dashboard-card-background-color-removed)" : L ? `${_ == null ? void 0 : _.color}` : t.unassigned ? "var(--ddk-component-dashboard-card-background-color-unassigned)" : void 0, P = !l && t.removed ? "var(--ddk-component-dashboard-card-header-background-color-removed)" : void 0, E = vc(R), x = t.unassigned ? "var(--ddk-generic-color-grey-30)" : L ? bc(E) : y ? void 0 : "var(--ddk-component-dashboard-card-color-unassigned)", X = Fr(
|
|
5433
5433
|
t.name,
|
|
5434
5434
|
d === "compact"
|
|
5435
5435
|
), { titleText: oe, cardTitleText: U } = gc(
|
|
@@ -6386,10 +6386,13 @@ const Nc = S.div`
|
|
|
6386
6386
|
text-align: center;
|
|
6387
6387
|
`, mu = D(
|
|
6388
6388
|
({ remoteTray: t, onComplete: e }) => {
|
|
6389
|
-
const { t: n } = I("common", { keyPrefix: "remote-nns" }), [r, s] = T("idle"), [o, c] = T({}), [a, d] = T({}), u = t.holder.pumps.data.filter((R) => R.childPump), p = t.remoteTrayEnabled.value === !0, m = (
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6389
|
+
const { t: n } = I("common", { keyPrefix: "remote-nns" }), [r, s] = T("idle"), [o, c] = T({}), [a, d] = T({}), u = t.holder.pumps.data.filter((R) => R.childPump), p = t.remoteTrayEnabled.value === !0, m = V(
|
|
6390
|
+
() => u.every((R) => {
|
|
6391
|
+
const P = o[R.name];
|
|
6392
|
+
return P != null && P !== "";
|
|
6393
|
+
}),
|
|
6394
|
+
[o, u]
|
|
6395
|
+
), v = V((R, P) => {
|
|
6393
6396
|
c((E) => ({ ...E, [R]: P }));
|
|
6394
6397
|
}, []), y = V(
|
|
6395
6398
|
(R) => (P = "") => {
|
|
@@ -6416,13 +6419,7 @@ const Nc = S.div`
|
|
|
6416
6419
|
}
|
|
6417
6420
|
})
|
|
6418
6421
|
), R ? s("pump") : h();
|
|
6419
|
-
}, [
|
|
6420
|
-
p,
|
|
6421
|
-
o,
|
|
6422
|
-
u,
|
|
6423
|
-
t.remoteTrayEnabled,
|
|
6424
|
-
h
|
|
6425
|
-
]), L = F(() => ({
|
|
6422
|
+
}, [o, u, h]), L = F(() => ({
|
|
6426
6423
|
idle: {
|
|
6427
6424
|
title: n(p ? "disable-title" : "idle-title"),
|
|
6428
6425
|
information: /* @__PURE__ */ i(qe, { children: n(p ? "disable-info" : "idle-info") }),
|
|
@@ -6474,14 +6471,16 @@ const Nc = S.div`
|
|
|
6474
6471
|
status: "success"
|
|
6475
6472
|
}
|
|
6476
6473
|
}), [
|
|
6477
|
-
v,
|
|
6478
6474
|
p,
|
|
6475
|
+
y,
|
|
6479
6476
|
e,
|
|
6480
6477
|
o,
|
|
6481
6478
|
a,
|
|
6482
6479
|
u,
|
|
6480
|
+
m,
|
|
6483
6481
|
_,
|
|
6484
|
-
n
|
|
6482
|
+
n,
|
|
6483
|
+
h
|
|
6485
6484
|
]);
|
|
6486
6485
|
return /* @__PURE__ */ i(Nt, { ...L[r], onClose: () => e() });
|
|
6487
6486
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosdev-code/kos-ddk-model-components",
|
|
3
|
-
"version": "0.1.0-dev.
|
|
3
|
+
"version": "0.1.0-dev.5881",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@kosdev-code/kos-ui-sdk": "0.1.0-dev.
|
|
15
|
-
"@kosdev-code/kos-dispense-sdk": "0.1.0-dev.
|
|
16
|
-
"@kosdev-code/kos-ddk-components": "0.1.0-dev.
|
|
17
|
-
"@kosdev-code/kos-ddk-models": "0.1.0-dev.
|
|
18
|
-
"@kosdev-code/kos-ddk-styles": "0.1.0-dev.
|
|
14
|
+
"@kosdev-code/kos-ui-sdk": "0.1.0-dev.5881",
|
|
15
|
+
"@kosdev-code/kos-dispense-sdk": "0.1.0-dev.5881",
|
|
16
|
+
"@kosdev-code/kos-ddk-components": "0.1.0-dev.5881",
|
|
17
|
+
"@kosdev-code/kos-ddk-models": "0.1.0-dev.5881",
|
|
18
|
+
"@kosdev-code/kos-ddk-styles": "0.1.0-dev.5881"
|
|
19
19
|
},
|
|
20
20
|
"kos": {
|
|
21
21
|
"build": {
|
|
22
|
-
"gitHash": "
|
|
22
|
+
"gitHash": "a164cedafaa2338d40f006ae34f91fb1906d84ec"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|