@nice2dev/ui 1.2.0 → 1.2.1
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 +107 -0
- package/dist/NiceApiExplorer.doc-CFJndg5h.js +25 -0
- package/dist/NiceApiExplorer.doc-TEx67kV5.cjs +1 -0
- package/dist/NiceBPMNDesigner.doc-6lK1pXRq.js +32 -0
- package/dist/NiceBPMNDesigner.doc-BY8t7qOi.cjs +8 -0
- package/dist/NiceBackupDiffViewer.doc-CYvOeX19.js +25 -0
- package/dist/NiceBackupDiffViewer.doc-ChQaZCg1.cjs +1 -0
- package/dist/NiceBackupList.doc-BdQCw0_D.cjs +1 -0
- package/dist/NiceBackupList.doc-BwjIAoqz.js +25 -0
- package/dist/NiceBackupRestoreDialog.doc-B2iiqTps.cjs +1 -0
- package/dist/NiceBackupRestoreDialog.doc-DuXSGJiD.js +25 -0
- package/dist/NiceBackupScheduler.doc-BpY45181.js +31 -0
- package/dist/NiceBackupScheduler.doc-ByeL3iH1.cjs +7 -0
- package/dist/NiceBackupStatusBadge.doc-BA3dYgiW.cjs +1 -0
- package/dist/NiceBackupStatusBadge.doc-CxwkVarP.js +25 -0
- package/dist/NiceBackupTagEditor.doc-Bej1KHco.cjs +7 -0
- package/dist/NiceBackupTagEditor.doc-CNy4uNws.js +31 -0
- package/dist/NiceBottomSheet.doc-keq-Fzlz.cjs +8 -0
- package/dist/NiceBottomSheet.doc-v-UPUKQk.js +32 -0
- package/dist/NiceBranchManager.doc-BTyRjX7X.cjs +6 -0
- package/dist/NiceBranchManager.doc-Cz4SyEqE.js +30 -0
- package/dist/NiceButton-3AcJJ15c.cjs +1 -0
- package/dist/NiceButton-vkI07DP0.js +88 -0
- package/dist/NiceCodeEditor-VGIDWSkS.js +1181 -0
- package/dist/NiceCodeEditor-qX39PSnQ.cjs +260 -0
- package/dist/NiceColorPicker-CQhhjZ8w.cjs +1 -0
- package/dist/NiceColorPicker-Cbop7VMu.js +491 -0
- package/dist/NiceConnectorConfigForm.doc-BKrDuhXw.cjs +7 -0
- package/dist/NiceConnectorConfigForm.doc-BsHeXz3M.js +31 -0
- package/dist/NiceDataBranchGraph.doc-Axidz41W.js +29 -0
- package/dist/NiceDataBranchGraph.doc-sjLmrrtE.cjs +5 -0
- package/dist/NiceDataBranchManager.doc-B1-Rp2X4.cjs +6 -0
- package/dist/NiceDataBranchManager.doc-GUqfTFvW.js +30 -0
- package/dist/NiceDataConflictResolver.doc-CjQryrTu.cjs +5 -0
- package/dist/NiceDataConflictResolver.doc-L-TcnQMX.js +29 -0
- package/dist/NiceDataDiffViewer.doc-BzGrf0U-.cjs +6 -0
- package/dist/NiceDataDiffViewer.doc-goxhSldH.js +30 -0
- package/dist/NiceDataGrid-BDEIbuBS.js +2218 -0
- package/dist/NiceDataGrid-CS5aB-EN.cjs +10 -0
- package/dist/NiceDataMapper.doc-QmnmnvVq.js +30 -0
- package/dist/NiceDataMapper.doc-ytGVtYVr.cjs +6 -0
- package/dist/NiceDataMergeBuilder.doc-BcmzKxh2.cjs +6 -0
- package/dist/NiceDataMergeBuilder.doc-BvYa4aUJ.js +30 -0
- package/dist/NiceDataSnapshot.doc-C73K1biG.cjs +6 -0
- package/dist/NiceDataSnapshot.doc-hU7wnOzM.js +30 -0
- package/dist/NiceDesktopViews.doc-DJjYlyP2.cjs +1 -0
- package/dist/NiceDesktopViews.doc-ly-VUAJj.js +25 -0
- package/dist/NiceDeviceControlCard.doc-BZIo92-w.cjs +1 -0
- package/dist/NiceDeviceControlCard.doc-DIzZcW9L.js +25 -0
- package/dist/NiceDocumentViewer-B9VIVKyw.js +726 -0
- package/dist/NiceDocumentViewer-CDXAmPp7.cjs +180 -0
- package/dist/NiceDocumentationViewer.doc-BSNGa7a_.js +25 -0
- package/dist/NiceDocumentationViewer.doc-CrwlvPFg.cjs +1 -0
- package/dist/NiceEnergyChart.doc-DW-jllDV.cjs +1 -0
- package/dist/NiceEnergyChart.doc-DnEehTff.js +25 -0
- package/dist/NiceFeatureGate.doc-DN17uS_B.cjs +3 -0
- package/dist/NiceFeatureGate.doc-DNfFSRrh.js +27 -0
- package/dist/NiceForm-BcN4p2kG.cjs +1 -0
- package/dist/NiceForm-tIXS-M6b.js +4770 -0
- package/dist/NiceFormItem.doc-BJwEnDz2.js +36 -0
- package/dist/NiceFormItem.doc-Ck3PgaPD.cjs +12 -0
- package/dist/NiceGantt-CTbqCuwv.cjs +1 -0
- package/dist/NiceGantt-Dao7pN9z.js +328 -0
- package/dist/NiceGantt.doc-B6YZcJvG.cjs +11 -0
- package/dist/NiceGantt.doc-DsI1QXly.js +48 -0
- package/dist/NiceGitBlame.doc-BQ2KvGkD.js +30 -0
- package/dist/NiceGitBlame.doc-DuTSjZVN.cjs +6 -0
- package/dist/NiceGitDiffViewer.doc-D24AGos_.js +30 -0
- package/dist/NiceGitDiffViewer.doc-D9FVquBC.cjs +6 -0
- package/dist/NiceGitGraph.doc-C-8VGMIz.js +29 -0
- package/dist/NiceGitGraph.doc-eRvTmefl.cjs +5 -0
- package/dist/NiceGitHooks.doc-DCTVw7HX.cjs +5 -0
- package/dist/NiceGitHooks.doc-OCFj5w6v.js +29 -0
- package/dist/NiceHtmlEditor-DUwcqj5N.cjs +10 -0
- package/dist/NiceHtmlEditor-DiAphF1k.js +889 -0
- package/dist/NiceInstanceMonitor.doc-BSDZp5xa.js +31 -0
- package/dist/NiceInstanceMonitor.doc-HVbLufnh.cjs +7 -0
- package/dist/NiceLocaleManager.doc-CbVHDEWu.js +25 -0
- package/dist/NiceLocaleManager.doc-XH6hMW0Z.cjs +1 -0
- package/dist/NiceLockButton.doc-BMhSj3TB.cjs +1 -0
- package/dist/NiceLockButton.doc-DvHGhcfm.js +25 -0
- package/dist/NiceLoginForm-DQe77Isv.js +747 -0
- package/dist/NiceLoginForm-NBCo-DUZ.cjs +1 -0
- package/dist/NiceLoginForm.css +1 -1
- package/dist/NiceMAM.doc-CsQ57saR.cjs +8 -0
- package/dist/NiceMAM.doc-hjW7buTH.js +32 -0
- package/dist/NiceMention--3P3vO-W.cjs +430 -0
- package/dist/NiceMention-Co2cqkVM.js +11316 -0
- package/dist/NiceMention.css +1 -1
- package/dist/NiceModuleLifecyclePanel-DV3F_QdI.cjs +1 -0
- package/dist/NiceModuleLifecyclePanel-gaZkIEtK.js +6825 -0
- package/dist/NiceModuleLifecyclePanel.css +1 -1
- package/dist/NiceNetworkDiscoveryPanel.doc-B0RtGaS3.js +25 -0
- package/dist/NiceNetworkDiscoveryPanel.doc-BFgFZI5G.cjs +1 -0
- package/dist/NicePagination-B3nZDZem.js +165 -0
- package/dist/NicePagination-B8rg1Y67.cjs +1 -0
- package/dist/NicePipelineEditor.doc-CjqDKe2x.js +29 -0
- package/dist/NicePipelineEditor.doc-DZ0pTVTp.cjs +5 -0
- package/dist/NicePipelineMonitor.doc-C88-TagI.cjs +5 -0
- package/dist/NicePipelineMonitor.doc-CFtH4XJx.js +29 -0
- package/dist/NicePivotGrid-BaZa2YZW.js +1157 -0
- package/dist/NicePivotGrid-DyOPhPO8.cjs +152 -0
- package/dist/NiceRoomGrid.doc-DJPVUQVg.cjs +8 -0
- package/dist/NiceRoomGrid.doc-DLHJS_Wb.js +32 -0
- package/dist/NiceSavedQueryPanel-BC84uRfh.cjs +586 -0
- package/dist/NiceSavedQueryPanel-CMfcODIO.js +5120 -0
- package/dist/NiceSavedQueryPanel.css +1 -1
- package/dist/NiceSceneBar.doc-09sc3yuF.cjs +1 -0
- package/dist/NiceSceneBar.doc-DLePMuVU.js +25 -0
- package/dist/NiceSceneSelector.doc-CPzCAy-d.cjs +7 -0
- package/dist/NiceSceneSelector.doc-FCLZvPc0.js +31 -0
- package/dist/NiceScheduler-BAJRzFQN.js +1690 -0
- package/dist/NiceScheduler-dJ7gHDv7.cjs +5 -0
- package/dist/NiceSchedulerViews.doc-C9opZpgg.cjs +1 -0
- package/dist/NiceSchedulerViews.doc-Dy7ZH1iL.js +25 -0
- package/dist/NiceSelect-CZR8Zu_k.js +420 -0
- package/dist/NiceSelect-DIKGbaJo.cjs +1 -0
- package/dist/NiceSensorGaugePanel.doc-BHirbWLn.cjs +8 -0
- package/dist/NiceSensorGaugePanel.doc-DjKmooI6.js +32 -0
- package/dist/NiceSpotlight.doc-BVZFfDVI.cjs +10 -0
- package/dist/NiceSpotlight.doc-JqwkzrEm.js +34 -0
- package/dist/NiceStateDesigner.doc-CfnwiwfU.js +29 -0
- package/dist/NiceStateDesigner.doc-DV4zEC50.cjs +5 -0
- package/dist/NiceStepper.doc-5VjaLM6r.js +31 -0
- package/dist/NiceStepper.doc-f8lYpr33.cjs +7 -0
- package/dist/NiceTaskInbox.doc-CHrxthqp.js +32 -0
- package/dist/NiceTaskInbox.doc-CdCTfgBq.cjs +8 -0
- package/dist/NiceTestBuilder.doc-BoBzLfa0.js +30 -0
- package/dist/NiceTestBuilder.doc-Cj1fNTvk.cjs +6 -0
- package/dist/NiceTranscoder.doc-Dnirl3wg.cjs +7 -0
- package/dist/NiceTranscoder.doc-cInCYZh7.js +31 -0
- package/dist/NiceVideoAnnotator.doc-C1iEi7OM.cjs +7 -0
- package/dist/NiceVideoAnnotator.doc-C8zyfKH_.js +31 -0
- package/dist/NiceVideoEditor.doc-C6mhEb-q.cjs +7 -0
- package/dist/NiceVideoEditor.doc-lrwmKjqj.js +31 -0
- package/dist/NiceWindow-CWN8OCHF.js +2109 -0
- package/dist/NiceWindow-Dd8qjkIW.cjs +1 -0
- package/dist/NiceWindow.css +1 -1
- package/dist/charts-Bo2WAI5T.cjs +768 -0
- package/dist/charts-ByrdMeQP.js +4767 -0
- package/dist/charts.cjs +1 -1
- package/dist/charts.css +1 -1
- package/dist/charts.d.ts +28 -18
- package/dist/charts.mjs +1 -1
- package/dist/core-B8eBUE4m.js +438 -0
- package/dist/core-lBFqvT0V.cjs +1 -0
- package/dist/core-lazy-Bh2yg4Et.js +351 -0
- package/dist/core-lazy-CkWKjfc6.cjs +1 -0
- package/dist/data-branching-Dak1_ZKR.cjs +1 -0
- package/dist/data-branching-DiLAO4Qt.js +6386 -0
- package/dist/data-branching.cjs +1 -1
- package/dist/data-branching.mjs +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.d.ts +22 -18
- package/dist/data.mjs +3 -3
- package/dist/devops-DkVluHBp.cjs +17 -0
- package/dist/devops-zsMUueTd.js +8648 -0
- package/dist/devops.cjs +1 -1
- package/dist/devops.d.ts +3 -3
- package/dist/devops.mjs +1 -1
- package/dist/editors.cjs +1 -1
- package/dist/editors.d.ts +100 -38
- package/dist/editors.mjs +8 -8
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.d.ts +71 -2
- package/dist/feedback.mjs +10 -9
- package/dist/index.cjs +193 -193
- package/dist/index.css +1 -1
- package/dist/index.d.ts +637 -225
- package/dist/index.mjs +26403 -26405
- package/dist/injectStyleOnce-BzC_BCs_.js +9 -0
- package/dist/injectStyleOnce-DeWaxcdf.cjs +1 -0
- package/dist/lazy.cjs +1 -1
- package/dist/lazy.d.ts +9 -7
- package/dist/lazy.mjs +51 -51
- package/dist/navigation.cjs +1 -1
- package/dist/navigation.css +1 -0
- package/dist/navigation.d.ts +99 -43
- package/dist/navigation.mjs +504 -547
- package/dist/no-code-DiTEnuRv.js +8288 -0
- package/dist/no-code-wG9c0z_T.cjs +331 -0
- package/dist/no-code.cjs +1 -1
- package/dist/no-code.css +1 -1
- package/dist/no-code.mjs +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.d.ts +12 -6
- package/dist/overlays.mjs +1 -1
- package/dist/pickerCommons-BCRiHDE_.cjs +1 -0
- package/dist/pickerCommons-DkumQ3KE.js +548 -0
- package/dist/style.css +12 -9
- package/package.json +3 -3
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),p=require("@nice2dev/ui-core"),n=require("react"),he=require("./injectStyleOnce-DeWaxcdf.cjs");function ve(t,r){const i=t.split(".").pop()?.toLowerCase().split("?")[0]??"";return i==="pdf"?"pdf":["jpg","jpeg","png","gif","bmp","webp","svg","ico","tiff","tif"].includes(i)?"image":["mp4","webm","ogg","mov","avi","mkv"].includes(i)?"video":["mp3","wav","flac","aac","m4a","ogg"].includes(i)?"audio":["doc","docx","xls","xlsx","ppt","pptx","odt","ods","odp"].includes(i)?"office":i==="html"||i==="htm"?"html":["txt","log","md","json","xml","csv","yaml","yml"].includes(i)?"text":"unknown"}function ge(t){if(t===0)return"0 B";const r=1024,i=["B","KB","MB","GB"],o=Math.floor(Math.log(t)/Math.log(r));return parseFloat((t/Math.pow(r,o)).toFixed(1))+" "+i[o]}function xe(t){const r=Math.floor(t/3600),i=Math.floor(t%3600/60),o=Math.floor(t%60);return r>0?`${r}:${i.toString().padStart(2,"0")}:${o.toString().padStart(2,"0")}`:`${i}:${o.toString().padStart(2,"0")}`}function be({src:t,page:r,zoom:i,rotation:o,onPageChange:c,onLoad:f,onError:d,workerUrl:m}){const w=n.useRef(null),N=n.useRef(null),[g,y]=n.useState(0),[T,F]=n.useState(!1);return n.useEffect(()=>{let x=!1;return(async()=>{try{let u;if(u=window.pdfjsLib,!u)try{u=await new Function("m","return import(m)")("pdfjs-dist")}catch{throw new Error('PDF.js library not found. Please install pdfjs-dist or include it via CDN: <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"><\/script>')}m?u.GlobalWorkerOptions.workerSrc=m:u.version&&(u.GlobalWorkerOptions.workerSrc=`https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${u.version}/pdf.worker.min.js`);const v=await u.getDocument(t).promise;if(x)return;N.current=v,y(v.numPages),f({name:t.split("/").pop()??"document.pdf",type:"pdf",mimeType:"application/pdf",pageCount:v.numPages})}catch(u){x||d(u instanceof Error?u:new Error("Failed to load PDF"))}})(),()=>{x=!0}},[t,m,f,d]),n.useEffect(()=>{const x=N.current,k=w.current;if(!x||!k||g===0)return;let u=!1;return(async()=>{if(!T){F(!0);try{const v=Math.max(1,Math.min(r,g)),S=await x.getPage(v);if(u)return;const P=S.getViewport({scale:i,rotation:o}),E=k.getContext("2d");if(!E)return;k.height=P.height,k.width=P.width,await S.render({canvasContext:E,viewport:P}).promise}catch(v){console.error("Error rendering PDF page:",v)}finally{u||F(!1)}}})(),()=>{u=!0}},[r,i,o,g,T]),e.jsx("div",{className:"nice-document-viewer__pdf",children:e.jsx("canvas",{ref:w,className:"nice-document-viewer__pdf-canvas"})})}function _e({src:t,zoom:r,rotation:i,onLoad:o,onError:c}){const{t:f}=p.useNiceTranslation(),[d,m]=n.useState(!1),w=n.useCallback(g=>{const y=g.currentTarget;m(!0),o({name:t.split("/").pop()??"image",type:"image",width:y.naturalWidth,height:y.naturalHeight})},[t,o]),N=n.useCallback(()=>{c(new Error("Failed to load image"))},[c]);return e.jsx("div",{className:"nice-document-viewer__image",children:e.jsx("img",{src:t,alt:f("documentViewer.document","Document"),onLoad:w,onError:N,style:{transform:`scale(${r}) rotate(${i}deg)`,opacity:d?1:0},draggable:!1})})}function je({src:t,type:r,onLoad:i,onError:o}){const c=n.useRef(null),f=n.useCallback(()=>{const m=c.current;if(!m)return;const w={name:t.split("/").pop()??(r==="video"?"video":"audio"),type:r,duration:m.duration};r==="video"&&"videoWidth"in m&&(w.width=m.videoWidth,w.height=m.videoHeight),i(w)},[t,r,i]),d=n.useCallback(()=>{o(new Error(`Failed to load ${r}`))},[r,o]);return r==="video"?e.jsx("div",{className:"nice-document-viewer__video",children:e.jsx("video",{ref:c,src:t,controls:!0,onLoadedMetadata:f,onError:d})}):e.jsx("div",{className:"nice-document-viewer__audio",children:e.jsx("audio",{ref:c,src:t,controls:!0,onLoadedMetadata:f,onError:d})})}function ye({src:t,viewerUrl:r,onLoad:i}){const{t:o}=p.useNiceTranslation(),[c,f]=n.useState(!1),m=`${r??"https://view.officeapps.live.com/op/embed.aspx?src="}${encodeURIComponent(t)}`,w=n.useCallback(()=>{f(!0),i({name:t.split("/").pop()??"document",type:"office"})},[t,i]);return e.jsx("div",{className:"nice-document-viewer__office",children:e.jsx("iframe",{src:m,onLoad:w,title:o("documentViewer.officeDocument","Office Document"),style:{opacity:c?1:0}})})}function ke({src:t,onLoad:r,onError:i}){const{t:o}=p.useNiceTranslation(),[c,f]=n.useState(null);return n.useEffect(()=>{fetch(t).then(d=>{if(!d.ok)throw new Error("Failed to fetch text");return d.text()}).then(d=>{f(d),r({name:t.split("/").pop()??"text",type:"text",size:d.length})}).catch(d=>{i(d instanceof Error?d:new Error("Failed to load text"))})},[t,r,i]),c===null?e.jsx("div",{className:"nice-document-viewer__loading",children:o("documentViewer.loading","Loading...")}):e.jsx("div",{className:"nice-document-viewer__text",children:e.jsx("pre",{children:c})})}function Ce({src:t,onLoad:r}){const{t:i}=p.useNiceTranslation(),o=n.useCallback(()=>{r({name:t.split("/").pop()??"page.html",type:"html"})},[t,r]);return e.jsx("div",{className:"nice-document-viewer__html",children:e.jsx("iframe",{src:t,onLoad:o,title:i("documentViewer.htmlDocument","HTML Document"),sandbox:"allow-same-origin allow-scripts"})})}const Ne=n.forwardRef(function(r,i){const{t:o}=p.useNiceTranslation();he.injectStyleOnce(Pe,ze);const{src:c,type:f,name:d,height:m=600,width:w="100%",zoom:N=1,minZoom:g=.25,maxZoom:y=4,page:T=1,showToolbar:F=!0,showPageNav:x=!0,showZoomControls:k=!0,showFullscreen:u=!0,showDownload:H=!0,showPrint:v=!0,showRotate:S=!0,enableKeyboard:P=!0,onLoad:E,onError:G,onPageChange:A,onZoomChange:Y,pdfWorkerUrl:ne,officeViewerUrl:te,loading:oe,errorContent:q,className:ie,"data-testid":re}=r,B=n.useRef(null),[s,ae]=n.useState(null),[b,ce]=n.useState(T),[C,se]=n.useState(N),[J,de]=n.useState(0),[Z,Q]=n.useState(!1),[$,le]=n.useState(null),[ue,X]=n.useState(!0),_=n.useMemo(()=>f??ve(c),[c,f]),z=n.useCallback(a=>{ae(a),X(!1),E?.(a)},[E]),K=n.useCallback(a=>{le(a),X(!1),G?.(a)},[G]),h=n.useCallback(a=>{const l=s?.pageCount??1,ee=Math.max(1,Math.min(a,l));ce(ee),A?.(ee)},[s?.pageCount,A]),D=n.useCallback(()=>h(b+1),[b,h]),V=n.useCallback(()=>h(b-1),[b,h]),j=n.useCallback(a=>{const l=Math.max(g,Math.min(a,y));se(l),Y?.(l)},[g,y,Y]),L=n.useCallback(()=>j(C*1.25),[C,j]),I=n.useCallback(()=>j(C/1.25),[C,j]),M=n.useCallback(()=>j(1),[j]),O=n.useCallback(a=>{de(l=>(l+a)%360)},[]),W=n.useCallback(()=>{const a=document.createElement("a");a.href=c,a.download=d??s?.name??"document",document.body.appendChild(a),a.click(),document.body.removeChild(a)},[c,d,s?.name]),U=n.useCallback(()=>{const a=window.open(c,"_blank");a&&(a.onload=()=>a.print())},[c]),R=n.useCallback(()=>{B.current&&(Z?(document.exitFullscreen?.(),Q(!1)):(B.current.requestFullscreen?.(),Q(!0)))},[Z]);n.useEffect(()=>{if(!P)return;const a=l=>{switch(l.key){case"ArrowRight":case"PageDown":D();break;case"ArrowLeft":case"PageUp":V();break;case"Home":h(1);break;case"End":h(s?.pageCount??1);break;case"+":case"=":(l.ctrlKey||l.metaKey)&&(l.preventDefault(),L());break;case"-":(l.ctrlKey||l.metaKey)&&(l.preventDefault(),I());break;case"0":(l.ctrlKey||l.metaKey)&&(l.preventDefault(),M());break;case"f":(l.ctrlKey||l.metaKey)&&(l.preventDefault(),R());break}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[P,D,V,h,s?.pageCount,L,I,M,R]),n.useImperativeHandle(i,()=>({goToPage:h,nextPage:D,prevPage:V,setZoom:j,zoomIn:L,zoomOut:I,resetZoom:M,rotate:O,download:W,print:U,toggleFullscreen:R,getInfo:()=>s}),[h,D,V,j,L,I,M,O,W,U,R,s]);const me=()=>{if($)return(typeof q=="function"?q($):q)??e.jsx("div",{className:"nice-document-viewer__error",children:e.jsxs("span",{children:[e.jsx(p.NiceIcon,{name:"warning",size:14})," ",$.message]})});switch(_){case"pdf":return e.jsx(be,{src:c,page:b,zoom:C,rotation:J,onPageChange:h,onLoad:z,onError:K,workerUrl:ne});case"image":return e.jsx(_e,{src:c,zoom:C,rotation:J,onLoad:z,onError:K});case"video":case"audio":return e.jsx(je,{src:c,type:_,onLoad:z,onError:K});case"office":return e.jsx(ye,{src:c,viewerUrl:te,onLoad:z});case"text":return e.jsx(ke,{src:c,onLoad:z,onError:K});case"html":return e.jsx(Ce,{src:c,onLoad:z});default:return e.jsxs("div",{className:"nice-document-viewer__unknown",children:[e.jsxs("span",{children:[e.jsx(p.NiceIcon,{name:"file",size:14})," ",o("documentViewer.unknownDocumentType","Unknown document type")]}),e.jsx("button",{type:"button",onClick:W,children:o("documentViewer.download","Download")})]})}},pe=x&&_==="pdf"&&(s?.pageCount??0)>1,fe=k&&(_==="pdf"||_==="image"),we=S&&(_==="pdf"||_==="image");return e.jsxs("div",{ref:B,className:`nice-document-viewer ${Z?"nice-document-viewer--fullscreen":""} ${ie??""}`,style:{height:m,width:w},"data-testid":re,"data-type":_,children:[F&&e.jsxs("div",{className:"nice-document-viewer__toolbar",children:[e.jsx("div",{className:"nice-document-viewer__toolbar-left",children:pe&&e.jsxs("div",{className:"nice-document-viewer__pagination",children:[e.jsx("button",{type:"button",onClick:V,disabled:b<=1,"aria-label":o("documentViewer.previousPage","Previous page"),children:e.jsx(p.NiceIcon,{name:"chevron-left",size:16})}),e.jsxs("span",{children:[e.jsx("input",{type:"number",value:b,onChange:a=>h(parseInt(a.target.value,10)),min:1,max:s?.pageCount??1}),"/ ",s?.pageCount??1]}),e.jsx("button",{type:"button",onClick:D,disabled:b>=(s?.pageCount??1),"aria-label":o("documentViewer.nextPage","Next page"),children:e.jsx(p.NiceIcon,{name:"chevron-right",size:16})})]})}),e.jsxs("div",{className:"nice-document-viewer__toolbar-center",children:[fe&&e.jsxs("div",{className:"nice-document-viewer__zoom",children:[e.jsx("button",{type:"button",onClick:I,"aria-label":o("documentViewer.zoomOut","Zoom out"),children:"−"}),e.jsxs("span",{children:[Math.round(C*100),"%"]}),e.jsx("button",{type:"button",onClick:L,"aria-label":o("documentViewer.zoomIn","Zoom in"),children:"+"}),e.jsx("button",{type:"button",onClick:M,"aria-label":o("documentViewer.resetZoom","Reset zoom"),children:e.jsx(p.NiceIcon,{name:"refresh",size:16})})]}),we&&e.jsxs("div",{className:"nice-document-viewer__rotation",children:[e.jsx("button",{type:"button",onClick:()=>O(270),"aria-label":o("documentViewer.rotateLeft","Rotate left"),children:e.jsx(p.NiceIcon,{name:"refresh",size:16})}),e.jsx("button",{type:"button",onClick:()=>O(90),"aria-label":o("documentViewer.rotateRight","Rotate right"),children:e.jsx(p.NiceIcon,{name:"refresh",size:16})})]})]}),e.jsxs("div",{className:"nice-document-viewer__toolbar-right",children:[H&&e.jsx("button",{type:"button",onClick:W,"aria-label":o("documentViewer.download","Download"),children:e.jsx(p.NiceIcon,{name:"download",size:16})}),v&&e.jsx("button",{type:"button",onClick:U,"aria-label":o("documentViewer.print","Print"),children:e.jsx(p.NiceIcon,{name:"printer",size:16})}),u&&e.jsx("button",{type:"button",onClick:R,"aria-label":o("documentViewer.fullscreen","Fullscreen"),children:e.jsx(p.NiceIcon,{name:Z?"collapse":"expand",size:16})})]})]}),e.jsxs("div",{className:"nice-document-viewer__content",children:[ue&&!$&&(oe??e.jsx("div",{className:"nice-document-viewer__loading",children:o("documentViewer.loading","Loading...")})),me()]}),s&&e.jsxs("div",{className:"nice-document-viewer__info",children:[e.jsx("span",{className:"nice-document-viewer__name",children:d??s.name}),s.size&&e.jsx("span",{className:"nice-document-viewer__size",children:ge(s.size)}),s.width&&s.height&&e.jsxs("span",{className:"nice-document-viewer__dimensions",children:[s.width," × ",s.height]}),s.duration&&e.jsx("span",{className:"nice-document-viewer__duration",children:xe(s.duration)})]})]})}),Pe="nice-document-viewer-styles",ze=`
|
|
2
|
+
.nice-document-viewer {
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
border: 1px solid var(--nice-border-color, #e5e7eb);
|
|
6
|
+
border-radius: var(--nice-radius-sm, 4px);
|
|
7
|
+
overflow: hidden;
|
|
8
|
+
background: var(--nice-bg-primary, #ffffff);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.nice-document-viewer--fullscreen {
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
z-index: 9999;
|
|
18
|
+
border: none;
|
|
19
|
+
border-radius: 0;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.nice-document-viewer__toolbar {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
padding: var(--nice-space-2, 8px) var(--nice-space-3, 12px);
|
|
27
|
+
background: var(--nice-bg-primary, #ffffff);
|
|
28
|
+
border-bottom: 1px solid var(--nice-border-color, #e5e7eb);
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.nice-document-viewer__toolbar-left,
|
|
33
|
+
.nice-document-viewer__toolbar-center,
|
|
34
|
+
.nice-document-viewer__toolbar-right {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--nice-space-2, 8px);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.nice-document-viewer__toolbar button {
|
|
41
|
+
padding: var(--nice-space-1-5, 6px) var(--nice-space-2-5, 10px);
|
|
42
|
+
border: 1px solid var(--nice-border-color, #e5e7eb);
|
|
43
|
+
border-radius: var(--nice-radius-sm, 4px);
|
|
44
|
+
background: var(--nice-bg-primary, #ffffff);
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
font-size: 14px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.nice-document-viewer__toolbar button:hover:not(:disabled) {
|
|
50
|
+
background: var(--nice-hover-bg, color-mix(in srgb, var(--nice-text-primary, #000) 4%, transparent));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.nice-document-viewer__toolbar button:disabled {
|
|
54
|
+
opacity: 0.4;
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.nice-document-viewer__pagination,
|
|
59
|
+
.nice-document-viewer__zoom,
|
|
60
|
+
.nice-document-viewer__rotation {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: var(--nice-space-1-5, 6px);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.nice-document-viewer__pagination input {
|
|
67
|
+
width: 50px;
|
|
68
|
+
padding: var(--nice-space-1, 4px);
|
|
69
|
+
border: 1px solid var(--nice-border-color, #e5e7eb);
|
|
70
|
+
border-radius: var(--nice-radius-sm, 4px);
|
|
71
|
+
text-align: center;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.nice-document-viewer__zoom span {
|
|
75
|
+
min-width: 50px;
|
|
76
|
+
text-align: center;
|
|
77
|
+
font-size: 13px;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.nice-document-viewer__content {
|
|
81
|
+
flex: 1;
|
|
82
|
+
overflow: auto;
|
|
83
|
+
display: flex;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
position: relative;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.nice-document-viewer__loading,
|
|
90
|
+
.nice-document-viewer__error,
|
|
91
|
+
.nice-document-viewer__unknown {
|
|
92
|
+
display: flex;
|
|
93
|
+
flex-direction: column;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
gap: var(--nice-space-3, 12px);
|
|
97
|
+
padding: var(--nice-space-10, 40px);
|
|
98
|
+
color: var(--nice-text-secondary, #475569);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.nice-document-viewer__error span {
|
|
102
|
+
color: var(--nice-error, #d32f2f);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.nice-document-viewer__pdf,
|
|
106
|
+
.nice-document-viewer__image {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: center;
|
|
110
|
+
min-height: 100%;
|
|
111
|
+
min-width: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.nice-document-viewer__pdf-canvas {
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
height: auto;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.nice-document-viewer__image img {
|
|
120
|
+
max-width: 100%;
|
|
121
|
+
max-height: 100%;
|
|
122
|
+
object-fit: contain;
|
|
123
|
+
transition: transform 0.2s;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.nice-document-viewer__video,
|
|
127
|
+
.nice-document-viewer__audio {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
width: 100%;
|
|
132
|
+
height: 100%;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.nice-document-viewer__video video,
|
|
136
|
+
.nice-document-viewer__audio audio {
|
|
137
|
+
max-width: 100%;
|
|
138
|
+
max-height: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.nice-document-viewer__office iframe,
|
|
142
|
+
.nice-document-viewer__html iframe {
|
|
143
|
+
width: 100%;
|
|
144
|
+
height: 100%;
|
|
145
|
+
border: none;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.nice-document-viewer__text {
|
|
149
|
+
width: 100%;
|
|
150
|
+
height: 100%;
|
|
151
|
+
overflow: auto;
|
|
152
|
+
padding: var(--nice-space-4, 16px);
|
|
153
|
+
background: var(--nice-bg-primary, #ffffff);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.nice-document-viewer__text pre {
|
|
157
|
+
margin: 0;
|
|
158
|
+
font-family: 'Fira Code', monospace;
|
|
159
|
+
font-size: 13px;
|
|
160
|
+
white-space: pre-wrap;
|
|
161
|
+
word-wrap: break-word;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.nice-document-viewer__info {
|
|
165
|
+
display: flex;
|
|
166
|
+
align-items: center;
|
|
167
|
+
gap: var(--nice-space-4, 16px);
|
|
168
|
+
padding: var(--nice-space-1-5, 6px) var(--nice-space-3, 12px);
|
|
169
|
+
background: var(--nice-bg-primary, #ffffff);
|
|
170
|
+
border-top: 1px solid var(--nice-border-color, #e5e7eb);
|
|
171
|
+
font-size: 12px;
|
|
172
|
+
color: var(--nice-text-secondary, #475569);
|
|
173
|
+
flex-shrink: 0;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.nice-document-viewer__name {
|
|
177
|
+
font-weight: 500;
|
|
178
|
+
color: var(--nice-text-primary, #0f172a);
|
|
179
|
+
}
|
|
180
|
+
`;exports.NiceDocumentViewer=Ne;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", o = "NiceDocumentationViewer", t = "Documentation viewer/browser.", c = "display", i = "1.0.0", n = "stable", s = [{ name: "docs", type: "DocNode[]", required: !0, description: "Documentation tree" }, { name: "onNavigate", type: "(path: string) => void", description: "Navigation callback" }], a = [{ title: "Doc Viewer", code: '<NiceDocumentationViewer docs={docTree} activePath="/intro" />' }], r = { keyboard: ["Arrow keys"], aria: ["Tree navigation"] }, d = ["NiceDocPage", "NiceApiExplorer"], p = {
|
|
2
|
+
$schema: e,
|
|
3
|
+
name: o,
|
|
4
|
+
description: t,
|
|
5
|
+
category: c,
|
|
6
|
+
since: i,
|
|
7
|
+
status: n,
|
|
8
|
+
props: s,
|
|
9
|
+
examples: a,
|
|
10
|
+
accessibility: r,
|
|
11
|
+
seeAlso: d
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
e as $schema,
|
|
15
|
+
r as accessibility,
|
|
16
|
+
c as category,
|
|
17
|
+
p as default,
|
|
18
|
+
t as description,
|
|
19
|
+
a as examples,
|
|
20
|
+
o as name,
|
|
21
|
+
s as props,
|
|
22
|
+
d as seeAlso,
|
|
23
|
+
i as since,
|
|
24
|
+
n as status
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",o="NiceDocumentationViewer",t="Documentation viewer/browser.",c="display",i="1.0.0",s="stable",n=[{name:"docs",type:"DocNode[]",required:!0,description:"Documentation tree"},{name:"onNavigate",type:"(path: string) => void",description:"Navigation callback"}],a=[{title:"Doc Viewer",code:'<NiceDocumentationViewer docs={docTree} activePath="/intro" />'}],r={keyboard:["Arrow keys"],aria:["Tree navigation"]},d=["NiceDocPage","NiceApiExplorer"],p={$schema:e,name:o,description:t,category:c,since:i,status:s,props:n,examples:a,accessibility:r,seeAlso:d};exports.$schema=e;exports.accessibility=r;exports.category=c;exports.default=p;exports.description=t;exports.examples=a;exports.name=o;exports.props=n;exports.seeAlso=d;exports.since=i;exports.status=s;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceEnergyChart",a="Energy consumption chart.",s="display",n="1.0.0",c="stable",o=[{name:"data",type:"EnergyData[]",required:!1,default:"[]",description:"Energy data"},{name:"period",type:"'hour' | 'day' | 'week' | 'month'",default:"'day'",description:"Time period"},{name:"unit",type:"'kWh' | 'MWh'",default:"'kWh'",description:"Energy unit"}],i=[{title:"Energy Chart",code:'<NiceEnergyChart data={energyData} period="week" />'}],r={keyboard:[],aria:["Chart description"]},d=["NiceChart","NiceAdvancedCharts"],p={$schema:e,name:t,description:a,category:s,since:n,status:c,props:o,examples:i,accessibility:r,seeAlso:d};exports.$schema=e;exports.accessibility=r;exports.category=s;exports.default=p;exports.description=a;exports.examples=i;exports.name=t;exports.props=o;exports.seeAlso=d;exports.since=n;exports.status=c;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceEnergyChart", a = "Energy consumption chart.", n = "display", c = "1.0.0", s = "stable", o = [{ name: "data", type: "EnergyData[]", required: !1, default: "[]", description: "Energy data" }, { name: "period", type: "'hour' | 'day' | 'week' | 'month'", default: "'day'", description: "Time period" }, { name: "unit", type: "'kWh' | 'MWh'", default: "'kWh'", description: "Energy unit" }], r = [{ title: "Energy Chart", code: '<NiceEnergyChart data={energyData} period="week" />' }], i = { keyboard: [], aria: ["Chart description"] }, d = ["NiceChart", "NiceAdvancedCharts"], p = {
|
|
2
|
+
$schema: e,
|
|
3
|
+
name: t,
|
|
4
|
+
description: a,
|
|
5
|
+
category: n,
|
|
6
|
+
since: c,
|
|
7
|
+
status: s,
|
|
8
|
+
props: o,
|
|
9
|
+
examples: r,
|
|
10
|
+
accessibility: i,
|
|
11
|
+
seeAlso: d
|
|
12
|
+
};
|
|
13
|
+
export {
|
|
14
|
+
e as $schema,
|
|
15
|
+
i as accessibility,
|
|
16
|
+
n as category,
|
|
17
|
+
p as default,
|
|
18
|
+
a as description,
|
|
19
|
+
r as examples,
|
|
20
|
+
t as name,
|
|
21
|
+
o as props,
|
|
22
|
+
d as seeAlso,
|
|
23
|
+
c as since,
|
|
24
|
+
s as status
|
|
25
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="https://nice2dev.com/schemas/component-doc-v1.json",t="NiceFeatureGate",a="Feature gate component that conditionally renders based on flags.",s="tools",n="1.0.0",c="stable",o=[{name:"flag",type:"string",required:!0,description:"Flag name"},{name:"children",type:"React.ReactNode",required:!0,description:"Content when enabled"},{name:"fallback",type:"React.ReactNode",description:"Content when disabled"},{name:"variant",type:"string",description:"Required variant value"}],i=[{title:"Feature Gate",description:"Gate feature",code:`<NiceFeatureGate flag="newDashboard" fallback={<OldDashboard />}>
|
|
2
|
+
<NewDashboard />
|
|
3
|
+
</NiceFeatureGate>`}],r={keyboard:[],aria:[]},d=["NiceFeatureFlagsProvider"],l={$schema:e,name:t,description:a,category:s,since:n,status:c,props:o,examples:i,accessibility:r,seeAlso:d};exports.$schema=e;exports.accessibility=r;exports.category=s;exports.default=l;exports.description=a;exports.examples=i;exports.name=t;exports.props=o;exports.seeAlso=d;exports.since=n;exports.status=c;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
const e = "https://nice2dev.com/schemas/component-doc-v1.json", t = "NiceFeatureGate", a = "Feature gate component that conditionally renders based on flags.", n = "tools", o = "1.0.0", s = "stable", c = [{ name: "flag", type: "string", required: !0, description: "Flag name" }, { name: "children", type: "React.ReactNode", required: !0, description: "Content when enabled" }, { name: "fallback", type: "React.ReactNode", description: "Content when disabled" }, { name: "variant", type: "string", description: "Required variant value" }], r = [{ title: "Feature Gate", description: "Gate feature", code: `<NiceFeatureGate flag="newDashboard" fallback={<OldDashboard />}>
|
|
2
|
+
<NewDashboard />
|
|
3
|
+
</NiceFeatureGate>` }], i = { keyboard: [], aria: [] }, d = ["NiceFeatureFlagsProvider"], l = {
|
|
4
|
+
$schema: e,
|
|
5
|
+
name: t,
|
|
6
|
+
description: a,
|
|
7
|
+
category: n,
|
|
8
|
+
since: o,
|
|
9
|
+
status: s,
|
|
10
|
+
props: c,
|
|
11
|
+
examples: r,
|
|
12
|
+
accessibility: i,
|
|
13
|
+
seeAlso: d
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
e as $schema,
|
|
17
|
+
i as accessibility,
|
|
18
|
+
n as category,
|
|
19
|
+
l as default,
|
|
20
|
+
a as description,
|
|
21
|
+
r as examples,
|
|
22
|
+
t as name,
|
|
23
|
+
c as props,
|
|
24
|
+
d as seeAlso,
|
|
25
|
+
o as since,
|
|
26
|
+
s as status
|
|
27
|
+
};
|