@kosdev-code/kos-ddk-model-components 0.1.0-dev.5096 → 0.1.0-dev.5098
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/components/software/software.d.ts.map +1 -1
- package/index.cjs +1 -1
- package/index.js +5 -3
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"software.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/software/software.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,QAAQ;;
|
|
1
|
+
{"version":3,"file":"software.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-model-components/src/components/software/software.tsx"],"names":[],"mappings":"AAOA,eAAO,MAAM,QAAQ;;CA4BnB,CAAC"}
|
package/index.cjs
CHANGED
|
@@ -409,7 +409,7 @@ ${e("agitator:agitate-after-without",{data:{value:t.volWithoutIceMl.displayValue
|
|
|
409
409
|
letter-spacing: 0.44px;
|
|
410
410
|
white-space: nowrap;
|
|
411
411
|
overflow: hidden;
|
|
412
|
-
`,to=u.kosComponent(({setupStepContainer:t,onStepSelected:e,...n})=>{const{t:s,labelMap:o}=Ns({defaultNamespace:"setup",extensionPoint:$t.id}),a=t==null?void 0:t.currentStep,c=(t==null?void 0:t.data.map(i=>r.jsxs(Qs,{onPointerDown:()=>{t.setCurrentStep(i.id),e(i.id)},children:[r.jsx(l.StatusIndicator,{size:"large",status:a===i?"active":i.complete?"completed":"pending"}),r.jsx(eo,{children:s(o[i.name]??i.titleKey)})]},i.id)))||[];return r.jsx(l.Sidebar,{...n,children:c})}),ec=Bs(to),tc=u.kosComponent(()=>{const{model:t}=u.useSoftwareInfo();return(t==null?void 0:t.nodes)&&t.nodes.map((e,n)=>r.jsxs(l.FrameContainer,{name:e.nodeName,children:[r.jsx("div",{children:r.jsx(l.FrameBody,{keyList:[],tableHead:`KOS Release Version: ${e.kosVersion}`,tableData:[]})},"kosVersion"),Object.keys(e.group).map((s,o)=>r.jsx("div",{children:r.jsx(l.FrameBody,{keyList:["name","version"],tableHead:s==="undefined"?"":s,tableData:e.group[s]})},o))]},n))}),St=S(l.LabelInformation)`
|
|
412
|
+
`,to=u.kosComponent(({setupStepContainer:t,onStepSelected:e,...n})=>{const{t:s,labelMap:o}=Ns({defaultNamespace:"setup",extensionPoint:$t.id}),a=t==null?void 0:t.currentStep,c=(t==null?void 0:t.data.map(i=>r.jsxs(Qs,{onPointerDown:()=>{t.setCurrentStep(i.id),e(i.id)},children:[r.jsx(l.StatusIndicator,{size:"large",status:a===i?"active":i.complete?"completed":"pending"}),r.jsx(eo,{children:s(o[i.name]??i.titleKey)})]},i.id)))||[];return r.jsx(l.Sidebar,{...n,children:c})}),ec=Bs(to),tc=u.kosComponent(()=>{const{model:t}=u.useSoftwareInfo();return(t==null?void 0:t.nodes)&&t.nodes.map((e,n)=>r.jsxs(l.FrameContainer,{name:e.nodeName,children:[r.jsx("div",{children:r.jsx(l.FrameBody,{keyList:[],tableHead:`KOS Release Version: ${e.kosVersion}`,tableData:[],tableLayout:"fixed"})},"kosVersion"),Object.keys(e.group).map((s,o)=>r.jsx("div",{children:r.jsx(l.FrameBody,{keyList:["name","version"],tableHead:s==="undefined"?"Apps":s,tableData:e.group[s],tableLayout:"fixed"})},o))]},n))}),St=S(l.LabelInformation)`
|
|
413
413
|
white-space: pre-wrap;
|
|
414
414
|
`,no=u.kosComponent(({pump:t,onComplete:e})=>{const{t:n}=u.useKosTranslation("common",{keyPrefix:"spm-field-calibration"}),[s,o]=p.useState("preparation-idle"),[a,c]=p.useState(),[i,d]=p.useState(),[m,f]=p.useState(),{clearFuture:h,future:g}=G(t);p.useEffect(()=>{switch(g==null?void 0:g.endState){case"CANCEL":switch(s){case"preparation-in-progress":o("preparation-idle");break;default:c("calibration-canceled"),o("failure")}break;case"SUCCESS":switch(s){case"preparation-in-progress":o("preparation-success");break;case"calibration-in-progress":o("calibration-input");break;case"verification-in-progress":o("verification-input");break}break;case"FAIL":case"ABORT":c(""),o("failure");break}},[g==null?void 0:g.endState,g==null?void 0:g.reason,s]);const y=p.useMemo(()=>({"preparation-idle":{information:r.jsx(St,{children:n("preparation-idle-info")}),footer:r.jsx(l.Button,{onPointerDown:()=>{h(),t.performPreCalibrate(),o("preparation-in-progress")},children:n("preparation-action")}),status:"information"},"preparation-in-progress":{information:r.jsx(l.LabelInformation,{children:n("preparation-progress-info")}),footer:r.jsx(l.Button,{disabled:!0,children:n("preparation-action")}),status:"loading"},"preparation-success":{information:r.jsx(l.LabelInformation,{children:n("preparation-success-info")}),footer:r.jsx(l.Button,{onPointerDown:()=>o("calibration-idle"),children:n("preparation-success-action")}),status:"success"},"preparation-failed":{},"calibration-idle":{information:r.jsx(St,{children:n("calibration-idle-info")}),footer:r.jsx(l.Button,{onPointerDown:()=>{h(),t.performCalibrate(),o("calibration-in-progress")},children:n("calibrate")}),status:"information"},"calibration-in-progress":{information:r.jsx(l.LabelInformation,{children:n("calibration-progress-info")}),status:"loading"},"calibration-input":{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("calibration-input-info")}),r.jsx(l.InputCard,{label:"Volume",unitValue:"ml",layout:"num",onChange:v=>{v!==void 0&&d(v)},value:i!==void 0?i:""})]}),footer:r.jsx(l.Button,{disabled:i===void 0,onPointerDown:()=>{i!==void 0&&o("verification-idle")},children:n("proceed")}),status:"information"},"calibration-input-confirmation":{},"verification-idle":{information:r.jsx(St,{children:n("verification-idle-info")}),footer:r.jsx(l.Button,{onPointerDown:async()=>{i!==void 0&&(h(),t.performVerify(i,g==null?void 0:g.clientData),o("verification-in-progress"))},children:n("initiate-verification-pour")}),status:"information"},"verification-in-progress":{information:r.jsx(l.LabelInformation,{children:n("verification-progress-info")}),status:"loading"},"verification-trouble":{},"verification-input":{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("verification-input-info")}),r.jsx(l.InputCard,{label:"Volume",unitValue:"ml",layout:"num",onChange:v=>{v!==void 0&&f(v)},value:m!==void 0?m:""})]}),footer:r.jsx(l.Button,{disabled:m===void 0,onPointerDown:async()=>{if(i===void 0||m===void 0)return;h();const[v,w]=await t.performComplete(i,m,g==null?void 0:g.clientData);v?(c(v),o("failure")):o("verification-success")},children:n("proceed")}),status:"information"},"verification-input-confirmation":{},"verification-success":{information:r.jsx(l.LabelInformation,{children:n("verification-success-info")}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"success"},"verification-failure":{information:r.jsx(l.LabelInformation,{children:n("verification-failed-info",{data:{ingredient:t.name}})}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"error"},failure:{information:r.jsxs(r.Fragment,{children:[r.jsx(l.LabelInformation,{children:n("calibration-failed")}),r.jsx(l.BodyMediumInformation,{children:n(`error.${a||"unknownError"}`)})]}),footer:r.jsx(l.Button,{onPointerDown:e,children:n("exit-calibration")}),status:"error"}}),[h,a,g==null?void 0:g.clientData,e,t,n,i,m]);let b;switch(s){case"preparation-in-progress":b="preparation-progress-title";break;case"calibration-in-progress":b="calibration-progress-title";break;case"verification-in-progress":b="verification-progress-title";break;default:b="initiating"}return r.jsxs(r.Fragment,{children:[r.jsx(l.WorkflowModal,{title:n("title",{data:{ingredient:t.name}}),...y[s],onClose:()=>e()}),g&&r.jsx(V,{title:n(b),future:g})]})}),nc=u.KosLog.createLogger({name:"state-experience"});nc.debug("state-experience component loaded");const sc=S.div``,oc=u.kosComponent(()=>{const{getExtensions:t}=Fe(),{model:e}=Yt(),[n,s]=p.useState(null);return p.useEffect(()=>u.kosAutoEffect(()=>{const a=t(Qe.id),c=y=>{const b=a.find(w=>w.data.troubleType===y),v=b==null?void 0:b.data;return b?v.stateKey??v.troubleType:void 0},i=a.reduce((y,b)=>{const v=b.data,w=v.stateKey??v.troubleType;return y[w]={extension:Qe.id,module:b.id,namespace:v.namespace,title:v.title,stateValue:v.stateValue??v.troubleType},y},{}),d=e==null?void 0:e.activeTroubleType,m=e==null?void 0:e.activeTrouble,f=d?c(d):void 0,h=f?i[f]:void 0,g=h?r.jsx(ae.DynamicComponent,{...h,props:{trouble:m}}):null;s(g)}),[t,e]),r.jsx(sc,{children:n})}),rc=[0,6],so=()=>{const{regionModel:t}=u.useKosRegions(),{model:e}=u.useKosTime(),[n,s]=p.useState(new Date),o=n.getFullYear(),a=u.useDateProps({formatOptions:{dayFormat:"short",yearFormat:"long",monthFormat:"long",formatString:(t==null?void 0:t.selectedDateFormat)||"yyyy/MM/dd"},filterOptions:{daysOfWeekFilter:rc,yearsRange:[o-10,o+10]}}),c=p.useCallback((m,f)=>{switch(m){case"year":a.dateActions.setYear(f.id);break;case"month":a.dateActions.setMonth(f.id);break;case"day":a.dateActions.setDay(f.id);break}},[a.dateActions]),i=p.useCallback(()=>{a.dateActions.setYear(n.getFullYear()),a.dateActions.setMonth(n.getMonth()),a.dateActions.setDay(n.getDate())},[n,a.dateActions]),d=p.useCallback(async({day:m,month:f,year:h})=>{a.dateActions.setYear(h),a.dateActions.setMonth(f),a.dateActions.setDay(m),await(e==null?void 0:e.updateSystemDate({day:m,month:f,year:h})),s(new Date)},[a.dateActions,e]);return r.jsx(Cs,{onDiscard:i,onChange:c,onSave:d})},oo=u.kosComponent(({...t})=>{var i;const{regionModel:e}=u.useKosRegions(),{model:n}=u.useKosTime(),{t:s}=u.useKosTranslation("common"),o=e==null?void 0:e.allTimeZones.map(d=>({id:d,label:d.replace(/_/g," ")})),a=(i=e==null?void 0:e.timeZones)==null?void 0:i.map(d=>({id:d,label:d.replace(/_/g," ")})),c=[{id:"region",label:s("suggested"),items:a||[]},{id:"all",label:s("all"),items:o||[]}];return r.jsx(l.SwitchPickerCard,{...t,label:s("time-zone"),data:c,displayValue:(n==null?void 0:n.timezone).replace("_"," "),loop:!1,selectedItemId:n==null?void 0:n.timezone,onSave:n==null?void 0:n.updateSystemTimezone,closeButtonLabel:s("close","Close")||void 0,cancelButtonLabel:s("discard-changes","Discard Changes")||void 0,proceedButtonLabel:s("save","Save")||void 0})}),ac=u.kosComponent(({showHeading:t})=>{var y,b,v,w,P,O,E,j;const{t:e}=u.useKosTranslation("region"),{regionModel:n}=u.useKosRegions(),{model:s}=u.useKosTime(),{amPmOptions:o,formattedTime:a,hourOptions:c,minuteOptions:i,setTime:d,time:m}=u.useRegionTimeProps(),f=m.getHours(),h=p.useMemo(()=>[{id:"hr",items:c,selectedItemId:f<12?f:f-12,loop:!0},{id:"min",items:i,selectedItemId:m.getMinutes(),loop:!0},{id:"ampm",items:o,selectedItemId:f<12?"AM":"PM"}],[o,c,i,m,f]),g=p.useMemo(()=>[{id:"hr",items:c,selectedItemId:f,loop:!0},{id:"min",items:i,selectedItemId:m.getMinutes(),loop:!0}],[c,i,m,f]);return p.useEffect(()=>{const _=setInterval(()=>{d(new Date)},3e4);return()=>{clearInterval(_)}},[d]),r.jsxs(l.TabContainer,{children:[t&&r.jsx(l.SettingsSubheading,{children:e("time-settings","Time Settings")}),((y=n==null?void 0:n.dateFormatOptions)==null?void 0:y.length)&&r.jsx(l.SwitchCard,{label:e("date-format","Date Format"),value:(v=(b=n==null?void 0:n.dateFormatOptions)==null?void 0:b.find(_=>_.format===n.selectedDateFormat))==null?void 0:v.id,options:(w=n==null?void 0:n.dateFormatOptions)==null?void 0:w.map(_=>({label:_.format.toUpperCase(),..._})),onChange:_=>_&&(n==null?void 0:n.setSelectedDateFormat(String(_)))}),r.jsx(so,{}),r.jsx(oo,{}),((P=n==null?void 0:n.timeFormatOptions)==null?void 0:P.length)&&r.jsx(l.SwitchCard,{label:e("time-format","Time Format"),value:(E=(O=n==null?void 0:n.timeFormatOptions)==null?void 0:O.find(_=>_.format===n.selectedTimeFormat))==null?void 0:E.id,options:(j=n==null?void 0:n.timeFormatOptions)==null?void 0:j.map(_=>({label:_!=null&&_.ampm?"12 HR":"24 HR",..._})).reverse(),onChange:_=>_&&(n==null?void 0:n.setSelectedTimeFormat(String(_)))}),r.jsx(l.MultiPickerCard,{data:n!=null&&n.is12HourTimeFormat?h:g,icon:ye.TimeIcon,displayValue:a,label:e("current-time","Current Time"),closeButtonLabel:e("close","Close")||void 0,cancelButtonLabel:e("discard-changes","Discard Changes")||void 0,proceedButtonLabel:e("save","Save")||void 0,onSave:_=>{const $=n!=null&&n.is12HourTimeFormat?_.ampm==="AM"?_.hr:_.hr+12:_.hr,z=_.min,Y=new Date(m);Y.setHours($),Y.setMinutes(z),d(Y),s==null||s.updateSystemTime({hour:$,min:z,sec:0})}})]})}),ic=Xt(u.kosComponent(({settings:t,showHeading:e})=>{const{t:n}=u.useKosTranslation("dispenser-profile");return r.jsxs(l.TabContainer,{children:[e&&r.jsx(l.SettingsSubheading,{children:n("water-settings","Water Settings")}),r.jsx(Pe,{label:n("plain-water","Plain Water"),configProperty:t.hidePlainWaterBev}),r.jsx(Pe,{label:n("carbonated-water","Carbonated Water"),configProperty:t.hideCarbWaterBev})]})})),cc=S.div`
|
|
415
415
|
display: flex;
|
package/index.js
CHANGED
|
@@ -6592,15 +6592,17 @@ const Ka = k.div`
|
|
|
6592
6592
|
{
|
|
6593
6593
|
keyList: [],
|
|
6594
6594
|
tableHead: `KOS Release Version: ${e.kosVersion}`,
|
|
6595
|
-
tableData: []
|
|
6595
|
+
tableData: [],
|
|
6596
|
+
tableLayout: "fixed"
|
|
6596
6597
|
}
|
|
6597
6598
|
) }, "kosVersion"),
|
|
6598
6599
|
Object.keys(e.group).map((r, s) => /* @__PURE__ */ i("div", { children: /* @__PURE__ */ i(
|
|
6599
6600
|
Gt,
|
|
6600
6601
|
{
|
|
6601
6602
|
keyList: ["name", "version"],
|
|
6602
|
-
tableHead: r === "undefined" ? "" : r,
|
|
6603
|
-
tableData: e.group[r]
|
|
6603
|
+
tableHead: r === "undefined" ? "Apps" : r,
|
|
6604
|
+
tableData: e.group[r],
|
|
6605
|
+
tableLayout: "fixed"
|
|
6604
6606
|
}
|
|
6605
6607
|
) }, s))
|
|
6606
6608
|
] }, n));
|
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.5098",
|
|
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.5098",
|
|
15
|
+
"@kosdev-code/kos-dispense-sdk": "~0.1.0-dev.5098",
|
|
16
|
+
"@kosdev-code/kos-ddk-components": "~0.1.0-dev.5098",
|
|
17
|
+
"@kosdev-code/kos-ddk-models": "~0.1.0-dev.5098",
|
|
18
|
+
"@kosdev-code/kos-ddk-styles": "~0.1.0-dev.5098"
|
|
19
19
|
},
|
|
20
20
|
"kos": {
|
|
21
21
|
"build": {
|
|
22
|
-
"gitHash": "
|
|
22
|
+
"gitHash": "75122e8de40bb9b81c28284697fb5749591ef94e"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
"publishConfig": {
|