@e-llm-studio/citation 0.0.218 → 0.0.220
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/dist/cjs/features/IngestionStatus/IngestionStatusComponent.js +1 -1
- package/dist/features/IngestionStatus/IngestionStatusComponent.js +1 -1
- package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts +2 -0
- package/dist/types/src/features/IngestionStatus/IngestionStatusComponent.d.ts.map +1 -1
- package/dist/types/src/features/IngestionStatus/IngestionStatusComponentTest.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),s=require("./ingestion.module.css.js"),t=require("./useIngestionStatus.js"),r=require("lucide-react"),i={ingested:{label:"Ingested",className:s.default.ingested},failed:{label:"Ingestion Failed",className:s.default.failed},in_progress:{label:"Ingesting...",className:s.default.inProgress},pending:{label:"Pending",className:s.default.pending}};var o=function(t){var o=t.status,a=t.label,l=t.percentage,u=t.customConfig,c=t.redirectionLink;if(u)return n.jsx("span",e.__assign({className:s.default.chip,style:{border:"1px solid ".concat(u.borderColor),background:u.background,color:u.color}},{children:null!=a?a:u.label}));if("custom"===o)return null;var d=i[o];if(!d)return null;var g="in_progress"===o&&void 0!==l;return n.jsxs("span",e.__assign({className:"".concat(s.default.chip," ").concat(d.className),style:{display:"inline-flex",alignItems:"center",gap:6}},{children:[g?n.jsxs(n.Fragment,{children:[null!=a?a:"Ingesting",n.jsx("span",{className:s.default.dot}),"".concat(l,"%")]}):null!=a?a:d.label,c&&n.jsx(r.ExternalLink,{size:14,style:{cursor:"pointer",flexShrink:0},onClick:function(e){e.stopPropagation(),window.open(c,"_blank","noopener,noreferrer")}})]}))},a=new Set(["DONE","COMPLETED","FAILED"]);exports.IngestionStatusChip=o,exports.IngestionStatusComponent=function(e){var s,r,i,l,u=e.ingestionId,c=e.status,d=e.wsBaseUrl,g=e.showPercentage,p=void 0===g||g,f=e.statusMap,v=e.customStatusConfigs,m=e.redirectionLink;console.log("Component:",m);var b=!!c&&a.has(c.toUpperCase()),x=t.useIngestionWebSocket(!b&&u?u:null,d).data,C=b?c:null!==(r=null!==(s=null==x?void 0:x.ingestionStatus)&&void 0!==s?s:c)&&void 0!==r?r:"",I=C?function(e,n){if(!e)return"custom";if(n){if(void 0!==n[e])return n[e];var s=e.toUpperCase();if(void 0!==n[s])return n[s]}return"custom"}(C,f):"pending",h=v?null!==(l=null!==(i=v[I])&&void 0!==i?i:v[C])&&void 0!==l?l:v[C.toUpperCase()]:void 0,j=function(){if(!b&&p)return void 0!==(null==x?void 0:x.currentProgress)?Math.max(5,x.currentProgress):"in_progress"===I?5:void 0}();return n.jsx(o,{status:I,percentage:j,customConfig:h,redirectionLink:m})};
|
|
2
2
|
//# sourceMappingURL=IngestionStatusComponent.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{jsx as n,jsxs as
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as n,jsxs as r,Fragment as o}from"react/jsx-runtime";import i from"./ingestion.module.css.js";import{useIngestionWebSocket as s}from"./useIngestionStatus.js";import{ExternalLink as t}from"lucide-react";var l={ingested:{label:"Ingested",className:i.ingested},failed:{label:"Ingestion Failed",className:i.failed},in_progress:{label:"Ingesting...",className:i.inProgress},pending:{label:"Pending",className:i.pending}};var a=function(s){var a=s.status,c=s.label,u=s.percentage,d=s.customConfig,p=s.redirectionLink;if(d)return n("span",e({className:i.chip,style:{border:"1px solid ".concat(d.borderColor),background:d.background,color:d.color}},{children:null!=c?c:d.label}));if("custom"===a)return null;var g=l[a];if(!g)return null;var m="in_progress"===a&&void 0!==u;return r("span",e({className:"".concat(i.chip," ").concat(g.className),style:{display:"inline-flex",alignItems:"center",gap:6}},{children:[m?r(o,{children:[null!=c?c:"Ingesting",n("span",{className:i.dot}),"".concat(u,"%")]}):null!=c?c:g.label,p&&n(t,{size:14,style:{cursor:"pointer",flexShrink:0},onClick:function(e){e.stopPropagation(),window.open(p,"_blank","noopener,noreferrer")}})]}))},c=new Set(["DONE","COMPLETED","FAILED"]),u=function(e){var r,o,i,t,l=e.ingestionId,u=e.status,d=e.wsBaseUrl,p=e.showPercentage,g=void 0===p||p,m=e.statusMap,f=e.customStatusConfigs,v=e.redirectionLink;console.log("Component:",v);var b=!!u&&c.has(u.toUpperCase()),C=s(!b&&l?l:null,d).data,h=b?u:null!==(o=null!==(r=null==C?void 0:C.ingestionStatus)&&void 0!==r?r:u)&&void 0!==o?o:"",N=h?function(e,n){if(!e)return"custom";if(n){if(void 0!==n[e])return n[e];var r=e.toUpperCase();if(void 0!==n[r])return n[r]}return"custom"}(h,m):"pending",k=f?null!==(t=null!==(i=f[N])&&void 0!==i?i:f[h])&&void 0!==t?t:f[h.toUpperCase()]:void 0,I=function(){if(!b&&g)return void 0!==(null==C?void 0:C.currentProgress)?Math.max(5,C.currentProgress):"in_progress"===N?5:void 0}();return n(a,{status:N,percentage:I,customConfig:k,redirectionLink:v})};export{a as IngestionStatusChip,u as IngestionStatusComponent};
|
|
2
2
|
//# sourceMappingURL=IngestionStatusComponent.js.map
|
|
@@ -11,6 +11,7 @@ interface IngestionStatusChipProps {
|
|
|
11
11
|
label?: string;
|
|
12
12
|
percentage?: number;
|
|
13
13
|
customConfig?: CustomChipConfig;
|
|
14
|
+
redirectionLink?: string;
|
|
14
15
|
}
|
|
15
16
|
export declare const IngestionStatusChip: React.FC<IngestionStatusChipProps>;
|
|
16
17
|
interface IngestionStatusComponentProps {
|
|
@@ -20,6 +21,7 @@ interface IngestionStatusComponentProps {
|
|
|
20
21
|
showPercentage?: boolean;
|
|
21
22
|
statusMap?: Record<string, string>;
|
|
22
23
|
customStatusConfigs?: Record<string, CustomChipConfig>;
|
|
24
|
+
redirectionLink?: string;
|
|
23
25
|
}
|
|
24
26
|
export declare const IngestionStatusComponent: React.FC<IngestionStatusComponentProps>;
|
|
25
27
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IngestionStatusComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/IngestionStatus/IngestionStatusComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"IngestionStatusComponent.d.ts","sourceRoot":"","sources":["../../../../../src/features/IngestionStatus/IngestionStatusComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAgB1B,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAYD,UAAU,wBAAwB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,eAAe,CAAC,EAAE,MAAM,CAAC;CAE1B;AAED,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,wBAAwB,CAyDlE,CAAC;AAKF,UAAU,6BAA6B;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACvD,eAAe,CAAC,EAAE,MAAM,CAAC;CAE1B;AAED,eAAO,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,6BAA6B,CAyC5E,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IngestionStatusComponentTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/IngestionStatus/IngestionStatusComponentTest.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQrD,CAAC;AAqBF,UAAU,iCAAiC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,4BAA4B,kBAAmB,iCAAiC,
|
|
1
|
+
{"version":3,"file":"IngestionStatusComponentTest.d.ts","sourceRoot":"","sources":["../../../../../src/features/IngestionStatus/IngestionStatusComponentTest.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAQrD,CAAC;AAqBF,UAAU,iCAAiC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,4BAA4B,kBAAmB,iCAAiC,4CAyHjF,CAAC;AAEN,eAAe,4BAA4B,CAAC"}
|