@camstack/addon-admin-ui 1.2.653 → 1.2.655
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/CHANGELOG.md +14 -0
- package/dist/assets/Addons-DyJCfk3K.js +5 -0
- package/dist/assets/{AdminPage-IHC_FLB8.js → AdminPage-aLHp47jf.js} +1 -1
- package/dist/assets/{AdminSectionedPage-Ch-ZRoVJ.js → AdminSectionedPage-DC99_NYO.js} +1 -1
- package/dist/assets/AiProfiles-7TjJU7gH.js +3 -0
- package/dist/assets/{BootstrapSettingsForm-BIJKJjHp.js → BootstrapSettingsForm-DujO7xd3.js} +1 -1
- package/dist/assets/Build-5EPZNJc_.js +40 -0
- package/dist/assets/Calendars-B21A2j3J.js +1 -0
- package/dist/assets/{CameraGrids-MUUhy0x2.js → CameraGrids-CXNpT_B8.js} +1 -1
- package/dist/assets/Cluster-DpgPRLih.js +1 -0
- package/dist/assets/CompositionBlockEditor-GDw9wpyC.js +2 -0
- package/dist/assets/{CompositionEditorPage-Dz7XI_eP.js → CompositionEditorPage-D4mYMm-K.js} +1 -1
- package/dist/assets/Data-BTlEa5yB.js +2 -0
- package/dist/assets/DeviceDetail-CNtpEA24.js +2 -0
- package/dist/assets/{Devices-Bf4nCnel.js → Devices-DcZIXngR.js} +1 -1
- package/dist/assets/EmbedDevicePage-NUKM9Y94.js +1 -0
- package/dist/assets/{EmbedPlayerPage-BBY-Sx6F.js → EmbedPlayerPage-CzDEkeN3.js} +1 -1
- package/dist/assets/History-Co3N1ECB.js +1 -0
- package/dist/assets/Identity-Cb_y_j4v.js +1 -0
- package/dist/assets/InstancesTable-DZHp204O.js +1 -0
- package/dist/assets/IntegrationDetail-oeZTeQnA.js +1 -0
- package/dist/assets/IntegrationWizard-BZ2-i83L.js +1 -0
- package/dist/assets/{Integrations-Cj6uWWN_.js → Integrations-B0sKe_MX.js} +2 -2
- package/dist/assets/Integrations-D9FcrJXz.js +1 -0
- package/dist/assets/Library-BqYimbZR.js +1 -0
- package/dist/assets/Locations-9q72GJxA.js +3 -0
- package/dist/assets/{Logs-BhqOgQ6e.js → Logs-DyUEl7-W.js} +1 -1
- package/dist/assets/{MaskShapeCanvas-LlW1oTr3.js → MaskShapeCanvas-D4W6rB-U.js} +1 -1
- package/dist/assets/{MotionZonesSettings-Dw3DU6pD.js → MotionZonesSettings-CI3yCbis.js} +1 -1
- package/dist/assets/MyAccess-CCWVg8X1.js +2 -0
- package/dist/assets/Network-ChHr4jPK.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-BaDE0Pex.js → NodeAddonsSettingsPanel-DyAkVlR3.js} +2 -2
- package/dist/assets/Notifications-CxxZDBll.js +1 -0
- package/dist/assets/Pipeline-Bsh224Sd.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-DCVqX841.js → PrivacyMaskSettings-C4UU_fXQ.js} +1 -1
- package/dist/assets/Recordings-DEvP3Bfl.js +1 -0
- package/dist/assets/{RemoteGrid--NiAHBK3.js → RemoteGrid-Bsj2x0GN.js} +1 -1
- package/dist/assets/{ScanSubnetEditor-Dp0E5C1_.js → ScanSubnetEditor-83bxeuIV.js} +1 -1
- package/dist/assets/SceneMonitorEditor-OVXtamOi.js +1 -0
- package/dist/assets/SessionsList-DPfHCju_.js +2 -0
- package/dist/assets/{Showroom-l4vJyL2_.js → Showroom-JytwI7ts.js} +1 -1
- package/dist/assets/StorageLocationsTable-D0-iwXJt.js +1 -0
- package/dist/assets/{System-XHHHEn1g.js → System-CfB4TfTX.js} +1 -1
- package/dist/assets/Templates-Cu0Zx0WB.js +1 -0
- package/dist/assets/{Terminal-CSQtVQmE.js → Terminal-D2wG4YSv.js} +4 -4
- package/dist/assets/{TrainingProviders-De81MhS-.js → TrainingProviders-BKBWflor.js} +1 -1
- package/dist/assets/{Viewer-FR0LH5M7.js → Viewer-rKCQt8Pi.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BBA_NCm-.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-rv5WZowx.js} +1 -1
- package/dist/assets/{action-draft-BUIf6miK.js → action-draft-BpL552GS.js} +1 -1
- package/dist/assets/{ai-page.helpers-CowRsr4f.js → ai-page.helpers-DLFlpj3G.js} +1 -1
- package/dist/assets/{assignment-candidates-DNvncHM2.js → assignment-candidates-BK42JAzD.js} +1 -1
- package/dist/assets/{authed-media-DQUbrVb4.js → authed-media-CdfUt51r.js} +1 -1
- package/dist/assets/{board-model-YFLbUrn6.js → board-model-BACBh92I.js} +1 -1
- package/dist/assets/client-BD4NsqEN.js +1115 -0
- package/dist/assets/{command-vocab-tdjzfkdy.js → command-vocab-B_sqDpAc.js} +1 -1
- package/dist/assets/create-composition-CtkD_L5c.js +1 -0
- package/dist/assets/device-detail-DNqKt0La.js +1 -0
- package/dist/assets/{device-integration-icon-BT-_hxIF.js → device-integration-icon-BLg5i-Lj.js} +1 -1
- package/dist/assets/device-picker-model-Du6UAsiy.js +1 -0
- package/dist/assets/dist-BK12oHz3.js +1115 -0
- package/dist/assets/{dist-BGrtxcme.js → dist-BonRqxy_.js} +1 -1
- package/dist/assets/{format--HuC16nb.js → format-DRt7qFMH.js} +1 -1
- package/dist/assets/{hostInit-3uCgRlGz.js → hostInit-Bgo3XaDt.js} +1 -1
- package/dist/assets/i18n-EpyjWJGh.js +1 -0
- package/dist/assets/icons-BiHuBwzY.js +1 -0
- package/dist/assets/index-C_D8eRsf.js +4 -0
- package/dist/assets/index-DHx7H0Qb.css +2 -0
- package/dist/assets/{linked-devices-model-JZgr5Mkd.js → linked-devices-model-4oBb-ZIa.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-01002c42.js → mf-entry-bootstrap-0-b3c36c58.js} +2 -2
- package/dist/assets/mount-Du6UAsiy.js +1 -0
- package/dist/assets/{notification-rule-status-DIIXoVdn.js → notification-rule-status-jGDjCnq5.js} +1 -1
- package/dist/assets/player-overlays-Bs9A8fez.js +1 -0
- package/dist/assets/remoteEntry-BFByx-0h.js +1 -0
- package/dist/assets/src-CNcEcLrI.js +263 -0
- package/dist/assets/{step-inspector-model-C76V4MWJ.js → step-inspector-model-CQ4ZhPOo.js} +1 -1
- package/dist/assets/{video-De6y5yax.js → terminal-BSZfUawf.js} +1 -1
- package/dist/assets/{use-scenes-feed-cmZKGNSW.js → use-scenes-feed-DZp1AHrK.js} +1 -1
- package/dist/assets/{use-stationary-objects-BoUGi1JO.js → use-stationary-objects-B_EMLFx7.js} +1 -1
- package/dist/assets/{useAdminDeviceRemoval-DLI0kLAU.js → useAdminDeviceRemoval-BGavriCa.js} +1 -1
- package/dist/assets/useEventInvalidation-Du6UAsiy.js +1 -0
- package/dist/assets/{useNodeUrlSelection-DMmVYpSE.js → useNodeUrlSelection-DnHxOtlP.js} +1 -1
- package/dist/assets/useTemplateSave-CT5IvdL4.js +1 -0
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-6S8fCuje.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-922VMW57.js} +2 -2
- package/dist/index.html +9 -9
- package/dist/server/addon.js +65 -10
- package/package.json +2 -2
- package/dist/assets/Addons-B-UM6GSX.js +0 -5
- package/dist/assets/AiProfiles-B4SUJQ9G.js +0 -3
- package/dist/assets/Build-BHR9T6UJ.js +0 -40
- package/dist/assets/Calendars-GKfsLcqY.js +0 -1
- package/dist/assets/Cluster-DxEZYSF0.js +0 -1
- package/dist/assets/CompositionBlockEditor-BFBeiHR4.js +0 -2
- package/dist/assets/Data-BaAuEhoW.js +0 -2
- package/dist/assets/DeviceDetail-C0SC_4iD.js +0 -2
- package/dist/assets/EmbedDevicePage-C3NGsRrc.js +0 -1
- package/dist/assets/History-DCTkD2C5.js +0 -1
- package/dist/assets/Identity-nbJoxA5E.js +0 -1
- package/dist/assets/InstancesTable-D2eTsMze.js +0 -1
- package/dist/assets/IntegrationDetail-DL_jE7Ho.js +0 -1
- package/dist/assets/IntegrationWizard-BeAKGqkD.js +0 -1
- package/dist/assets/Integrations-B6dYn6fd.js +0 -1
- package/dist/assets/Library-DZE79diS.js +0 -1
- package/dist/assets/Locations-CqKj6DUZ.js +0 -3
- package/dist/assets/MyAccess-D-Cz_u-P.js +0 -2
- package/dist/assets/Network-B1Tex5sO.js +0 -1
- package/dist/assets/Notifications-DhTbXKSI.js +0 -1
- package/dist/assets/Pipeline-DdOSXsJd.js +0 -1
- package/dist/assets/Recordings-Clozl5li.js +0 -1
- package/dist/assets/SceneMonitorEditor-Djr3jYA7.js +0 -1
- package/dist/assets/SessionsList-GT-Vu8fp.js +0 -2
- package/dist/assets/StorageLocationsTable-BnmqVIjs.js +0 -1
- package/dist/assets/Templates-DdfynSCT.js +0 -1
- package/dist/assets/bell-off-ChsIJ9tx.js +0 -1
- package/dist/assets/client-BPycW7-C.js +0 -1115
- package/dist/assets/create-composition-DLzarGQj.js +0 -1
- package/dist/assets/device-detail-CLGID6OK.js +0 -1
- package/dist/assets/device-picker-model-Dp5rCpVe.js +0 -1
- package/dist/assets/dist-D_CJWYmG.js +0 -1115
- package/dist/assets/i18n-DMi5B3uV.js +0 -1
- package/dist/assets/icons-Q-ksrnyT.js +0 -1
- package/dist/assets/index-CfI8I1jw.css +0 -2
- package/dist/assets/index-D4P9-tQo.js +0 -4
- package/dist/assets/mount-Dp5rCpVe.js +0 -1
- package/dist/assets/player-overlays-DuVrpJ5X.js +0 -1
- package/dist/assets/remoteEntry-Cll_F6YF.js +0 -1
- package/dist/assets/settings-2-BIrKVPOG.js +0 -1
- package/dist/assets/src-CDP4x5TP.js +0 -253
- package/dist/assets/useEventInvalidation-Dp5rCpVe.js +0 -1
- package/dist/assets/useTemplateSave-j5OtpDNQ.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,K as t,S as n,Y as r,a as i,et as a,x as o}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{gt as s,ut as c}from"./player-overlays-DuVrpJ5X.js";import{Cn as l,rs as u,us as d,xn as f}from"./client-BPycW7-C.js";import{t as p}from"./boxes-k5PsZ3NR.js";import{$ as m,$d as h,C as g,Ka as _,Ro as v,T as y,df as b,dr as x,fr as S,g as C,mr as w,pr as ee,rf as T,w as te}from"./src-CDP4x5TP.js";import{t as E}from"./useTranslation-BJr-n0es.js";import{t as D,vt as O}from"./CompositionBlockEditor-BFBeiHR4.js";import{a as k,c as A,d as j,f as M,i as N,l as P,n as ne,o as re,r as ie,u as F}from"./command-vocab-tdjzfkdy.js";a();function I(e){return e===void 0||!Number.isFinite(e)?``:String(e)}function L({value:e,onValue:t,onBrace:i,onBlur:a,...o}){let[s,c]=r(null);return n(b,{...o,inputMode:`decimal`,value:s??I(e),onChange:e=>{let n=e.target.value;if(n.includes(`{`)){i?.();return}c(n);let r=n.trim()===``?NaN:Number(n);t(Number.isFinite(r)?r:null)},onBlur:e=>{c(null),a?.(e)}})}function R(e){return e.kind===`dynamic`}function z(e){return e.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase())}function B(e){return e.from===`method`?e.method:`getStatus`}function V(e,t){return typeof e==`object`&&e?Reflect.get(e,t):void 0}function H(e){return typeof e==`string`||typeof e==`number`}function U(e,t){let n=t.from===`status`?V(e,t.field):e;if(!Array.isArray(n))return[];let r=[];for(let e of n){if(t.where!==void 0&&V(e,t.where.key)!==t.where.equals)continue;let n=t.valueKey===void 0?e:V(e,t.valueKey);if(!H(n))continue;let i=t.labelKey===void 0?n:V(e,t.labelKey);r.push({value:n,label:H(i)?String(i):String(n)})}return r}function W({widthClass:e,...t}){return n(`span`,{className:`block max-w-full ${e}`,children:n(c,{...t})})}a();function G(e){return e.kind===`fixed`?String(e.value):``}function K({arg:t,locale:i,variables:a,value:o,onChange:s,choices:c}){let{t:l}=E(),[u,d]=r(!1),f=t.label[i],p=ne(t,o),m=o.kind===`var`?n(h,{label:o.name,onRemove:()=>s(N(t))}):n(q,{arg:t,locale:i,value:o,onChange:s,onBrace:()=>d(!0),choices:c});return e(`span`,{className:`inline-flex flex-col gap-0.5 align-top`,"data-testid":`arg-${t.key}`,children:[e(`span`,{className:`inline-flex items-center gap-1`,children:[m,a.length>0&&e(x,{open:u,onOpenChange:d,children:[n(w,{"aria-label":l(`flow.arg.useVariable`,`Use a variable for {{label}}`,{label:f}),className:`h-8 rounded-md border border-border bg-surface px-2 font-mono text-xs text-foreground hover:bg-surface-hover`,children:`{x}`}),n(S,{children:a.map(e=>n(ee,{onClick:()=>s({kind:`var`,name:e.name}),children:`${e.name} · ${e.hint}`},e.name))})]})]}),n(Y,{arg:t,value:o,issue:p})]})}function q({arg:e,locale:t,value:r,onChange:i,onBrace:a,choices:o}){let{t:s}=E(),c=e.offer,l=e.label[t];if(R(c)&&o?.state===`ready`){let t=o.choices.some(e=>e.value===r.value);return n(W,{widthClass:`w-48`,"aria-label":l,"data-testid":`dynamic-${e.key}`,value:String(r.value),onChange:e=>{let t=o.choices.find(t=>String(t.value)===e.target.value);t!==void 0&&i({kind:`fixed`,value:t.value})},options:[...t?[]:[{value:String(r.value),label:r.value===``?s(`flow.arg.choose`,`Choose…`):String(r.value)}],...o.choices.map(e=>({value:String(e.value),label:e.label}))]})}if(c.kind===`enum`)return n(W,{widthClass:`w-40`,"aria-label":l,value:String(r.value),onChange:e=>{let t=c.values.find(t=>String(t.value)===e.target.value);t!==void 0&&i({kind:`fixed`,value:t.value})},options:c.values.map(e=>({value:String(e.value),label:e.label[t]}))});if(c.kind===`boolean`)return n(W,{widthClass:`w-28`,"aria-label":l,value:r.value===!0?`yes`:`no`,onChange:e=>i({kind:`fixed`,value:e.target.value===`yes`}),options:[{value:`yes`,label:s(`common.yes`,`Yes`)},{value:`no`,label:s(`common.no`,`No`)}]});let u=P(e);return u===void 0?c.kind===`number`?n(J,{label:l,unit:c.unit,value:r,onChange:i,onBrace:a}):c.kind===`text`&&c.secret===!0?n(b,{"aria-label":l,type:`password`,className:`w-40`,value:G(r),onChange:e=>i({kind:`fixed`,value:e.target.value})}):n(C,{label:l,className:`flex w-56 flex-col gap-1`,testId:`arg-text-${e.key}`,value:G(r),onChange:e=>i({kind:`fixed`,value:e})}):n(g,{quantity:u.quantity,storedUnit:u.unit,value:typeof r.value==`number`?r.value:void 0,unit:r.unit,min:u.min,max:u.max,"aria-label":l,onBrace:a,onChange:e=>{let t=y(e,u.unit);i({kind:`fixed`,value:t.value,unit:t.unit})}})}function J({label:t,unit:r,value:i,onChange:a,onBrace:s}){return e(o,{children:[n(L,{"aria-label":t,className:`w-20`,value:typeof i.value==`number`?i.value:void 0,onValue:e=>a({kind:`fixed`,value:e??NaN}),onBrace:s}),r!==void 0&&n(`span`,{className:`text-sm text-foreground-muted`,children:r})]})}function Y({arg:e,value:t,issue:r}){let{t:i}=E(),a=e.offer;if(t.kind!==`fixed`||a.kind!==`number`||a.min===void 0&&a.max===void 0)return null;let o=P(e),s=o===void 0?a.unit:t.unit??o.unit,c=o===void 0?{min:a.min,max:a.max}:te({min:a.min,max:a.max},o.unit,s??o.unit),l=s??``,u=e=>e===void 0||o===void 0?e:Number(e.toPrecision(4)),d={min:u(c.min),max:u(c.max)},f=d.min!==void 0&&d.max!==void 0?i(`flow.arg.range`,`{{min}} to {{max}} {{unit}}`,{min:d.min,max:d.max,unit:l}):d.min===void 0?i(`flow.arg.atMost`,`at most {{max}} {{unit}}`,{max:d.max,unit:l}):i(`flow.arg.atLeast`,`at least {{min}} {{unit}}`,{min:d.min,unit:l});return n(`span`,{className:`text-[11px] ${r===null?`text-foreground-subtle`:`text-danger`}`,role:r===null?void 0:`alert`,children:f.trim()})}var X=[d.Container],ae=[d.Camera];function Z(e,t){let n=u(e);if(n!==void 0)return f([n.cap],t).find(t=>t.id===e)}function oe(e,t){return e.kind===`devices`?e.ids.map(t.deviceName).join(`, `):e.kind===`var`?e.name===`deviceId`?t.triggerDevice:e.name===`item`?t.roundDevice:`{${e.name}}`:t.someDevices}function se(e,t,n){if(t.kind===`var`)return`{${t.name}}`;let r=e.offer;if(r.kind===`enum`){let e=r.values.find(e=>e.value===t.value);return e===void 0?String(t.value):e.label[n]}return String(t.value)}function ce(e,t,n,r){if(e.actionId===``)return null;let i=Z(e.actionId,r);if(i===void 0)return null;let a=A([i],e),o=oe(e.target,n);return j(i.phrase[t]).map(e=>{if(e.kind===`text`)return e.text;if(e.key===`device`)return o;let n=i.openArgs.find(t=>t.key===e.key),r=a?.values[e.key];return n===void 0||r===void 0?`{${e.key}}`:se(n,r,t)}).join(``)}var le=3e4;function ue(e){return typeof e==`object`&&!!e&&typeof Reflect.get(e,`query`)==`function`}function de(e,t,n){let r=s(),a=n===null?``:B(n),o=i({queryKey:[`build`,`dynamic-offer`,e,t,a],enabled:e!==null&&e>0&&n!==null,staleTime:le,retry:!1,queryFn:async()=>{let n=Reflect.get(r.trpcClient,z(t)),i=typeof n==`object`&&n?Reflect.get(n,a):void 0;if(!ue(i)||e===null)throw Error(`no readable ${t}.${a}`);return i.query({deviceId:e})}});if(n===null||e===null)return{state:`unavailable`};if(o.isPending)return{state:`loading`};if(o.isError)return{state:`unavailable`};let c=U(o.data,n);return c.length===0?{state:`unavailable`}:{state:`ready`,choices:c}}function fe({deviceId:e,cap:t,arg:r,...i}){return n(K,{arg:r,choices:de(e,t,R(r.offer)?r.offer:null),...i})}a();function pe(e){let{t}=E();return{deviceName:t=>e.find(e=>e.id===t)?.name??`#${String(t)}`,triggerDevice:t(`flow.command.triggerDevice`),roundDevice:t(`automation.repeat.itemHint`,`the device of this round`),someDevices:t(`flow.command.domainDevices`)}}function me({step:t,devices:i,variables:a,roundDevices:o,singleTarget:s=!1,autoOpen:c=!0,onChange:l}){let{t:u,i18n:d}=E(),f=M(d.language),p=pe(i),[m,h]=r(c&&t.actionId===``);return e(`div`,{className:`flex flex-wrap items-center gap-2`,"data-testid":`command-step`,children:[n(`p`,{className:`min-w-0 flex-1 text-sm text-foreground`,"data-testid":`command-step-phrase`,children:ce(t,f,p,Q(t.target,i))??n(`span`,{className:`text-foreground-subtle`,children:u(`flow.command.pickCommand`)})}),n(T,{variant:`outline`,size:`sm`,"data-testid":`command-step-change`,onClick:()=>h(!0),children:t.actionId===``?u(`flow.command.choose`):u(`flow.command.change`)}),m&&n($,{step:t,devices:i,variables:a,singleTarget:s,...o===void 0?{}:{roundDevices:o},onCancel:()=>h(!1),onConfirm:e=>{h(!1),l(e)}})]})}function Q(e,t){if(e?.kind!==`devices`)return;let n=e.ids[0];return t.find(e=>e.id===n)?.type}function he(e){return{target:e.target.kind===`devices`&&e.target.ids.length===0?null:e.target,actionId:e.actionId===``?null:e.actionId}}function $({step:t,devices:i,variables:a,roundDevices:s,singleTarget:c,onCancel:l,onConfirm:u}){let{t:d,i18n:f}=E(),p=M(f.language),[h,g]=r(()=>he(t)),_=h.actionId===null?void 0:Z(h.actionId,Q(h.target,i)),[v,y]=r(()=>_===void 0?{}:A([_],t)?.values??k(_)),b=_===void 0?null:re(_,v),x=h.target!==null&&_!==void 0&&b===null;return n(m,{open:!0,onClose:l,title:d(`flow.command.dialogTitle`),width:`xl`,fill:!0,testId:`command-picker-dialog`,footer:e(o,{children:[n(T,{variant:`ghost`,onClick:l,children:d(`common.cancel`,`Cancel`)}),n(T,{disabled:!x,"data-testid":`command-picker-confirm`,onClick:()=>{h.target===null||_===void 0||b!==null||u(ie(_,h.target,v))},children:d(`flow.command.use`)})]}),children:n(O,{kind:`action`,intent:`action`,value:h,onChange:e=>{if(e.actionId!==h.actionId){let t=e.actionId===null?void 0:Z(e.actionId,Q(e.target,i));y(t===void 0?{}:k(t))}g(e)},allowTriggerDevice:!c,multiple:!c,excludeTypes:X,fillHeight:!0,...s===void 0?{}:{roundDevices:s},args:_!==void 0&&_.openArgs.length>0?n(ge,{action:_,deviceId:h.target===null?null:F({target:h.target}),values:v,locale:p,variables:a,onChange:y}):null})})}function ge({action:t,deviceId:r,values:i,locale:a,variables:o,onChange:s}){return n(`div`,{className:`flex flex-wrap items-start gap-3`,"data-testid":`command-args`,children:t.openArgs.map(c=>{let l=i[c.key];if(l===void 0)return null;let u=e=>s({...i,[c.key]:e});return e(`label`,{className:`flex flex-col gap-1 text-[11px] text-foreground`,children:[c.label[a],r===null?n(K,{arg:c,locale:a,variables:o,value:l,onChange:u}):n(fe,{deviceId:r,cap:t.cap,arg:c,locale:a,variables:o,value:l,onChange:u})]},c.key)})})}a();var _e=6e4;function ve(){let e=v({projection:`slim`});return t(()=>{let t=new Map((e.data??[]).map(e=>[e.id,e.name]));return(e.data??[]).filter(e=>l(String(e.type))).map(e=>({id:e.id,name:e.name,stableId:e.stableId,addonId:e.addonId,type:String(e.type),location:e.location??null,parentName:e.parentDeviceId===null?null:t.get(e.parentDeviceId)??null})).toSorted((e,t)=>e.name.localeCompare(t.name))},[e.data])}function ye(e){let t=s();return i({queryKey:[`automation`,`wireable-fields`,e],enabled:e>0,staleTime:_e,queryFn:async()=>(await t.trpcClient.deviceManager.getWireableFields.query({deviceId:e})).caps})}function be(e,t){return e.find(e=>e.cap===t)?.fields??[]}function xe({blockId:e,onClose:t}){let{t:r}=E();return n(m,{open:e!==null,onClose:t,title:r(`build.customDeviceTab.editComposedDevice`,`Edit composed device`),icon:p,width:`xl`,testId:`composed-device-editor`,fill:!0,children:e!==null&&n(D,{blockId:e,fillHeight:!0})})}function Se(){return _()}export{ye as a,ae as c,ve as i,W as l,xe as n,me as o,be as r,X as s,Se as t,L as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e,C as t,K as n,R as r,S as i,V as a,Y as o,d as s,et as c,k as l,u,x as d}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{Wt as f,it as p,ja as m,ka as h,mt as g}from"./player-overlays-DuVrpJ5X.js";import{At as _,Au as v,Eu as y,Gd as b,Gr as x,Gt as S,Hf as C,If as w,Jd as T,Kr as E,Kt as D,Ot as ee,Ou as O,Tu as k,Wr as A,Xr as j,Yr as M,Zt as te,ku as ne,qt as N,rf as P,xn as F,yd as I,yf as L}from"./src-CDP4x5TP.js";import{t as R}from"./i18n-DMi5B3uV.js";import{n as z,t as B}from"./useTranslation-BJr-n0es.js";import{C as V,q as H}from"./index-D4P9-tQo.js";import{n as U,r as W,t as G,v as K}from"./RemoteGrid--NiAHBK3.js";c();function q({i18n:t,defaultNS:r,children:i}){let a=n(()=>({i18n:t,defaultNS:r}),[t,r]);return e(z.Provider,{value:a},i)}c();function J({deviceId:e,button:n,sources:r,current:a,placement:s}){let{t:c}=B(),l=v(),[u,p]=o(!1),[m,g]=o(null);if(r.length===0)return null;let _=a===``?c(`remote.sourceSelect.label`):a,y=r.filter(e=>e.kind===`digits`),b=r.filter(e=>e.kind!==`digits`),S=async t=>{g(null);try{let n=await l.mutateAsync({deviceId:e,command:`selectSource`,source:t.name,repeat:1});if(n.status===`refused`){g(c(`remote.test.refused.${n.reason}`,{detail:n.detail??``}));return}if(n.status===`not-routed`){g(c(`remote.sourceSelect.notRouted`));return}p(!1)}catch(e){g(e instanceof Error?e.message:String(e))}};return t(d,{children:[t(P,{type:`button`,size:`sm`,variant:`secondary`,"aria-label":_,title:_,"data-testid":`remote-grid-button-${n.id}`,"data-widget":`source_select`,className:h(`z-10 h-full min-w-0 overflow-hidden border border-border px-2`,U(n.shape),W(n.tone)),style:s,onClick:()=>{g(null),p(!0)},children:[i(f,{className:`h-4 w-4 shrink-0`,"aria-hidden":!0}),i(`span`,{className:`min-w-0 truncate text-xs`,children:_})]}),u&&i(A,{open:!0,onOpenChange:e=>!e&&p(!1),children:t(E,{width:`sm`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(M,{children:i(j,{children:c(`remote.sourceSelect.title`)})}),t(x,{className:`space-y-3`,"data-testid":`source-picker`,children:[i(Y,{title:c(`remote.sourceSelect.channels`),sources:y,current:a,busy:l.isPending,onPick:e=>void S(e)}),i(Y,{title:c(`remote.sourceSelect.inputs`),sources:b,current:a,busy:l.isPending,onPick:e=>void S(e)}),m!==null&&i(`p`,{role:`alert`,className:`text-xs text-danger`,"data-testid":`source-picker-failure`,children:m})]})]})})]})}function Y({title:e,sources:n,current:r,busy:a,onPick:o}){return n.length===0?null:t(`section`,{className:`space-y-1`,children:[i(`h3`,{className:`text-xs font-medium uppercase tracking-wide text-foreground-muted`,children:e}),i(`ul`,{className:`space-y-1`,children:n.map(e=>i(`li`,{children:t(P,{type:`button`,variant:e.name===r?`secondary`:`ghost`,size:`sm`,disabled:a,className:`w-full justify-start gap-2`,"data-testid":`source-pick-${e.id}`,onClick:()=>o(e),children:[e.kind===`digits`&&i(`span`,{className:`w-10 shrink-0 text-right tabular-nums text-foreground-muted`,children:e.number}),i(`span`,{className:`min-w-0 truncate`,children:e.name})]})},e.id))})]})}c();function X({deviceId:e,deviceName:n}){let{t:r}=B(),a=w(`remote`),s=O({deviceId:e},{enabled:a===`present`}),[c,l]=o(!1);return a!==`present`||(s.data?.commands.length??0)===0&&(s.data?.sources.length??0)===0?null:t(`div`,{className:`flex flex-wrap items-center justify-center gap-1`,children:[t(P,{size:`sm`,variant:`outline`,onClick:()=>l(!0),"data-testid":`hero-remote`,children:[i(F,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),r(`remote.hero.open`)]}),c&&i(re,{deviceId:e,deviceName:n,onClose:()=>l(!1)})]})}function re({deviceId:e,deviceName:n,onClose:r}){let{t:a}=B(),s=y({deviceId:e}),c=I({kind:`remote`}),l=O({deviceId:e}),u=ne(),d=k({deviceId:e}),[f,p]=o(null),m=s.data?.layoutTemplateId??null,h=(c.data??[]).find(e=>e.id===m),g=h===void 0?null:K(h.payload),_=new Set((l.data?.commands??[]).map(e=>e.role)),v=async t=>{let n=g?.buttons.find(e=>e.id===t)?.role;if(!(n===void 0||!_.has(n))){p(null);try{let t=await u.mutateAsync({deviceId:e,role:n,repeat:1});t.status===`refused`&&p(a(`remote.test.refused.${t.reason}`,{detail:t.detail??``}))}catch(e){p(e instanceof Error?e.message:String(e))}}};return i(A,{open:!0,onOpenChange:e=>!e&&r(),children:t(E,{width:`md`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(M,{children:i(j,{children:a(`remote.hero.title`,{name:n})})}),t(x,{className:`space-y-3`,children:[s.status===`error`?i(b,{title:a(`remote.dialog.unreadable`),message:s.error?.message??``,onRetry:()=>void s.refetch()}):g===null?i(`p`,{className:`text-xs text-foreground-muted`,children:a(`remote.hero.noLayout`)}):i(`div`,{className:`mx-auto w-full max-w-xs`,"data-testid":`remote-press`,children:i(G,{grid:g,label:a(`remote.hero.title`,{name:n}),boundRoles:_,onSelect:e=>void v(e),renderWidget:(t,n)=>i(J,{deviceId:e,button:t,sources:l.data?.sources??[],current:d.data?.source??``,placement:n})})}),f!==null&&i(`p`,{role:`alert`,className:`text-xs text-danger`,children:f})]})]})})}c();var ie=l({});function ae({value:e,children:t}){return i(ie.Provider,{value:e,children:t})}c();var Z={"off-while-running":{title:`Turn off while running?`,message:`The device is running. Cutting its power now interrupts what it is doing.`,confirm:`Turn off`},unlock:{title:`Unlock?`,message:`The lock will open.`,confirm:`Unlock`},install:{title:`Install the update?`,message:`The device may restart and be unavailable for a while.`,confirm:`Install`},press:{title:`Run it now?`,message:`The device acts as soon as you confirm.`,confirm:`Run`}},Q=e=>e===`off-while-running`?`deviceHero.model.confirmOff`:`deviceHero.model.confirm.${e}`;function oe(){let{t:e,i18n:t}=B(),r=t.language;return n(()=>{let t=t=>({title:e(`${Q(t)}.title`,Z[t].title),message:e(`${Q(t)}.message`,Z[t].message),confirm:e(`${Q(t)}.confirm`,Z[t].confirm)});return{noValue:e(`deviceHero.model.noValue`,`–`),callFailed:e(`deviceHero.model.callFailed`,`The device did not accept the command`),historyTooltip:e(`deviceHero.utility.history.tooltip`,`Opens the history of this device.`),consumables:{label:e(`deviceHero.utility.consumables.label`,`Consumables`),low:t=>e(`deviceHero.utility.consumables.low`,`{{count}} low`,{count:t}),ok:e(`deviceHero.utility.consumables.ok`,`OK`),tooltip:e(`deviceHero.utility.consumables.tooltip`,`Shows the level of each consumable and which ones need attention.`)},power:{label:e(`deviceHero.utility.power.label`,`Power source`),on:e(`deviceHero.utility.power.on`,`On`),off:e(`deviceHero.utility.power.off`,`Off`),tooltip:e(`deviceHero.utility.power.tooltip`,`Opens a menu to cut or restore the power feeding this device, or to restart it.`),tooltipReadOnly:e(`deviceHero.utility.power.tooltipReadOnly`,`Whether the power source feeding this device is on. Your session cannot change it.`)},confirm:{"off-while-running":t(`off-while-running`),unlock:t(`unlock`),install:t(`install`),press:t(`press`)}}},[e,r])}c();function $(e){let[t]=o(()=>new s({defaultOptions:{queries:{retry:!1,staleTime:5e3}}}));return e??t}function se({deviceId:e,kind:t,canActuate:n,onDrawn:r,showName:o}){let s=L();return a(()=>{r?.(!0)},[r]),i(`div`,{className:`flex justify-center`,children:i(S,{kind:t,deviceId:e,canActuate:n,orientation:s?`vertical`:`horizontal`,showName:o!==!1})})}function ce(e){let t=D(e.deviceId);return t===`pending`?i(T,{className:`h-72 w-full`}):t===null?i(le,{...e}):i(se,{deviceId:e.deviceId,kind:t,canActuate:e.canActuate,onDrawn:e.onDrawn,showName:e.showName})}function le({deviceId:e,canActuate:n,fallback:a,onDrawn:s,defaultHistoryOpen:c,showName:l}){let{t:u,i18n:f}=B(),p=oe(),[m,h]=o(c===!0),g=te(e),v=H(g.presence,g.list),y=r(()=>h(!0),[]);return t(d,{children:[i(ee,{deviceId:e,canActuate:n,lang:_(f.language),labels:p,renderRemote:t=>i(X,{deviceId:e,deviceName:t}),fallback:a??null,showName:l!==!1,...v?{onOpenHistory:y}:{},...s===void 0?{}:{onDrawn:s}}),m?i(A,{open:!0,onOpenChange:e=>!e&&h(!1),children:t(E,{width:`xl`,scroll:`body`,children:[i(M,{children:i(j,{children:u(`deviceModule.history`,`History`)})}),i(x,{className:`mt-3`,children:i(N,{deviceId:e})})]})}):null]})}function ue({deviceId:e,trpcClient:t,theme:r,locale:a,canActuate:o=!1,defaultHistoryOpen:s,queryClient:c,fallback:l,onDrawn:d,onOpenDevice:f,onOpenCamera:h,onClose:_,onNavigate:v,showName:y}){let b=$(c),x=n(()=>R.cloneInstance({lng:a}),[a]),S=n(()=>V(x.t.bind(x)),[x]),w=n(()=>({onOpenDevice:f,onOpenCamera:h,onClose:_,onNavigate:v}),[f,h,_,v]);return i(`div`,{className:r,"data-theme":r,"data-testid":`device-detail-module`,children:i(q,{i18n:x,children:i(m,{t:S,children:i(g,{client:t,children:i(C.Provider,{client:t,queryClient:b,children:i(u,{client:b,children:i(p,{children:i(ae,{value:w,children:i(ce,{deviceId:e,canActuate:o,fallback:l,onDrawn:d,defaultHistoryOpen:s,showName:y})})})})})})})})})}export{X as n,ue as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-CDP4x5TP.js";
|