@viswa-test/creative-workspace-ui-component 0.0.46 → 0.0.48
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/_virtual/_tslib.js +1 -1
- package/dist/cjs/_virtual/_tslib.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignLevelAccordions.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/cjs/components/AssignReminders/AssignReminderWrapper.js +1 -1
- package/dist/cjs/components/AssignReminders/ManageReminders.js +1 -1
- package/dist/cjs/components/AssignReminders/assets/FileCheckCorner.js +1 -1
- package/dist/cjs/components/AssignReminders/assets/VerticalLine.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AddUserPopup.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/AssigneeCalendarView.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomCheckbox.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/cjs/components/AssignReminders/components/CustomDropdown.js +1 -1
- package/dist/cjs/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/cjs/components/AssignReminders/components/ReminderFrequencyAutocomplete.js +1 -1
- package/dist/cjs/components/AssignReminders/components/ReviewStatus.js +1 -1
- package/dist/cjs/components/AssignReminders/utils/generateRandomColorsPair.js +1 -1
- package/dist/cjs/components/ScopeTree/HighlightedText.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeAddAction.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeMenu.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeNode.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeSectionItem.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/cjs/components/ScopeTree/TreeTooltip.js +1 -1
- package/dist/cjs/features/lsc-guidelines/LscGuidelines.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineAttachmentIcon.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCardMenu.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCart.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCartHeader.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineCartItem.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineClearCartDialog.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineConfirmDialog.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineEditor.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineEditorPage.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineEmptyState.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineHeader.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineIconButton.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineLandingPage.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineLibrary.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineLibraryCard.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelinePopoverCart.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineProceedButton.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineSavedModal.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineSelectButton.js +1 -1
- package/dist/cjs/features/lsc-guidelines/components/GuidelineTooltip.js +1 -1
- package/dist/cjs/features/lsc-guidelines/constants.js +1 -1
- package/dist/cjs/features/lsc-guidelines/hooks/useControllableState.js +1 -1
- package/dist/cjs/features/lsc-guidelines/hooks/useGuidelineFlow.js +1 -1
- package/dist/cjs/features/lsc-guidelines/hooks/useGuidelineSelection.js +1 -1
- package/dist/cjs/features/lsc-guidelines/icons/GuidelineSpinner.js +1 -1
- package/dist/cjs/features/lsc-guidelines/utils.js +1 -1
- package/dist/cjs/utils/treeUtils.js +1 -1
- package/dist/components/AssignReminders/AssignLevelAccordions.js +1 -1
- package/dist/components/AssignReminders/AssignReminderLevels.js +1 -1
- package/dist/components/AssignReminders/AssignReminderTest.js +1 -1
- package/dist/components/AssignReminders/AssignReminderWrapper.js +1 -1
- package/dist/components/AssignReminders/ManageReminders.js +1 -1
- package/dist/components/AssignReminders/assets/FileCheckCorner.js +1 -1
- package/dist/components/AssignReminders/assets/VerticalLine.js +1 -1
- package/dist/components/AssignReminders/components/AddUserPopup.js +1 -1
- package/dist/components/AssignReminders/components/AssignLevelsDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/AssigneeCalendarView.js +1 -1
- package/dist/components/AssignReminders/components/CustomCheckbox.js +1 -1
- package/dist/components/AssignReminders/components/CustomDatePicker.js +1 -1
- package/dist/components/AssignReminders/components/CustomDropdown.js +1 -1
- package/dist/components/AssignReminders/components/LevelData.js +1 -1
- package/dist/components/AssignReminders/components/ReminderFrequencyAutocomplete.js +1 -1
- package/dist/components/AssignReminders/components/ReviewStatus.js +1 -1
- package/dist/components/AssignReminders/styles/AssignLevelsDatePickerStyles.js +1 -1
- package/dist/components/AssignReminders/styles/AssignReminderStyles.js +1 -1
- package/dist/components/AssignReminders/styles/AssignReminderWrapperStyles.js +1 -1
- package/dist/components/AssignReminders/styles/ManageReminder.style.js +1 -1
- package/dist/components/AssignReminders/styles/ReviewStatusStyles.js +1 -1
- package/dist/components/AssignReminders/utils/generateRandomColorsPair.js +1 -1
- package/dist/components/ScopeTree/HighlightedText.js +1 -1
- package/dist/components/ScopeTree/TreeAddAction.js +1 -1
- package/dist/components/ScopeTree/TreeMenu.js +1 -1
- package/dist/components/ScopeTree/TreeNode.js +1 -1
- package/dist/components/ScopeTree/TreeNodeHeader.js +1 -1
- package/dist/components/ScopeTree/TreeSectionItem.js +1 -1
- package/dist/components/ScopeTree/TreeSidebar.js +1 -1
- package/dist/components/ScopeTree/TreeTooltip.js +1 -1
- package/dist/features/lsc-guidelines/LscGuidelines.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineAttachmentIcon.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCardMenu.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCart.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCartHeader.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineCartItem.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineClearCartDialog.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineConfirmDialog.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineEditor.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineEditorPage.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineEmptyState.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineHeader.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineIconButton.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineLandingPage.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineLibrary.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineLibraryCard.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelinePopoverCart.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineProceedButton.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineSavedModal.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineSelectButton.js +1 -1
- package/dist/features/lsc-guidelines/components/GuidelineTooltip.js +1 -1
- package/dist/features/lsc-guidelines/constants.js +1 -1
- package/dist/features/lsc-guidelines/hooks/useControllableState.js +1 -1
- package/dist/features/lsc-guidelines/hooks/useGuidelineFlow.js +1 -1
- package/dist/features/lsc-guidelines/hooks/useGuidelineSelection.js +1 -1
- package/dist/features/lsc-guidelines/icons/GuidelineSpinner.js +1 -1
- package/dist/features/lsc-guidelines/utils.js +1 -1
- package/dist/types/App.d.ts.map +1 -1
- package/dist/utils/treeUtils.js +1 -1
- package/package.json +5 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useRef as r,useEffect as i}from"react";import{Pencil as o,Copy as l,Trash2 as d}from"lucide-react";import{cx as a}from"../utils.js";function u(o){var l=o.open,d=o.onClose,u=o.anchorRef,c=o.items,s=o.classNames,m=o.styles,f=r(null);if(i(function(){if(l){var e=function(e){var n=e.target;f.current&&!f.current.contains(n)&&u.current&&!u.current.contains(n)&&d()},n=function(e){"Escape"===e.key&&d()};return document.addEventListener("mousedown",e),document.addEventListener("keydown",n),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",n)}}},[l,d,u]),!l)return null;var p=c.filter(function(e){return!e.hidden});return n("div",e({ref:f,role:"menu",className:a("absolute right-0 top-full z-50 mt-1 min-w-[180px] rounded-[8px] border border-[#EAECF0] bg-white py-1 shadow-[0_4px_16px_rgba(16,24,40,0.12)]",null==s?void 0:s.libraryCardMenu),style:null==m?void 0:m.libraryCardMenu},{children:p.map(function(r){return t("button",e({type:"button",role:"menuitem",disabled:r.disabled,onClick:function(){r.onClick(),d()},className:a("flex w-full items-center gap-2.5 px-3.5 py-2.5 text-left text-[13px] font-medium transition-colors",r.danger?"text-[#EF4444] hover:bg-[#FEF2F2]":"text-[#344054] hover:bg-[#F9FAFB]",r.disabled&&"cursor-not-allowed opacity-50",r.danger?null==s?void 0:s.libraryCardMenuItemDanger:null==s?void 0:s.libraryCardMenuItem),style:r.danger?null==m?void 0:m.libraryCardMenuItemDanger:null==m?void 0:m.libraryCardMenuItem},{children:[r.icon,n("span",{children:r.label})]}),r.key)})}))}function c(e){var t=e.onEdit,r=e.onDuplicate,i=e.onDelete,a=e.editLabel,u=void 0===a?"Edit":a,c=e.duplicateLabel,s=void 0===c?"Duplicate":c,m=e.deleteLabel,f=void 0===m?"Delete":m,p=e.hideEdit,v=void 0!==p&&p,b=e.hideDuplicate,h=void 0!==b&&b,y=e.hideDelete,k=void 0!==y&&y;return[{key:"edit",label:u,icon:n(o,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2}),onClick:t,hidden:v},{key:"duplicate",label:s,icon:n(l,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2}),onClick:r,hidden:h},{key:"delete",label:f,icon:n(d,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2}),onClick:i,danger:!0,hidden:k}]}export{u as GuidelineCardMenu,c as createGuidelineCardMenuItems};
|
|
2
2
|
//# sourceMappingURL=GuidelineCardMenu.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as i,jsx as l}from"react/jsx-runtime";import{mergeGuidelineLabels as t,cx as d,defaultFormatAddedOnLabel as n}from"../utils.js";import{GuidelineCartHeader as o}from"./GuidelineCartHeader.js";import{GuidelineCartItem as r}from"./GuidelineCartItem.js";import{GuidelineEmptyState as s}from"./GuidelineEmptyState.js";import{GuidelineProceedButton as a}from"./GuidelineProceedButton.js";function u(u){var c=u.guidelines,m=u.cartGuidelineIds,p=u.selectedGuidelineIds,f=u.onToggleGuideline,v=u.onPreviewGuideline,y=u.onRemoveGuideline,b=u.onProceed,G=u.onAddGuideline,x=u.hideDeleteButton,g=void 0!==x&&x,h=u.classNames,B=u.styles,N=u.labels,j=u.formatAddedOnLabel,L=void 0===j?n:j,w=t(N),C=m?c.filter(function(e){return m.includes(e.id)}):c,F=C.filter(function(e){return p.includes(e.id)}),_=F.length;return i("aside",e({className:d("flex w-full flex-col rounded-[12px] border border-[#5B2CF4] bg-[#F5F1FF] px-7 py-7 font-[Inter] shadow-[0_1px_4px_rgba(16,24,40,0.04)]",null==h?void 0:h.cart),style:null==B?void 0:B.cart},{children:[l(o,{title:w.cartTitle,description:w.cartDescription,selectedLabel:_>0?w.selectedBadge(_):void 0,addGuidelineLabel:w.addGuidelineLabel,onAddGuideline:G,classNames:h,styles:B}),l("div",e({className:d("mt-8 min-h-[280px] flex-1 overflow-hidden",null==h?void 0:h.cartBody),style:null==B?void 0:B.cartBody},{children:0===C.length?l(s,{title:w.emptyCartTitle,description:w.emptyCartDescription,classNames:h,styles:B}):l("div",e({className:d("max-h-[420px] space-y-4 overflow-y-auto pr-2",null==h?void 0:h.cartList),style:null==B?void 0:B.cartList},{children:C.map(function(e){return l(r,{guideline:e,isSelected:p.includes(e.id),onToggle:f,onPreview:v,onRemove:y,hideDeleteButton:g,classNames:h,styles:B,formatAddedOnLabel:L},e.id)})}))})),l(a,{label:w.proceedButton,disabled:0===_,onClick:function(){return b(F)},classNames:h,styles:B})]}))}export{u as GuidelineCart};
|
|
2
2
|
//# sourceMappingURL=GuidelineCart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as l}from"react/jsx-runtime";import{Plus as i}from"lucide-react";import{cx as r}from"../utils.js";function a(a){var d=a.title,n=a.description,s=a.selectedLabel,o=a.addGuidelineLabel,c=a.onAddGuideline,u=a.classNames,m=a.styles;return t("div",e({className:r("flex items-start justify-between gap-3",null==u?void 0:u.cartHeader),style:null==m?void 0:m.cartHeader},{children:[t("div",e({className:"min-w-0"},{children:[t("div",e({className:"flex flex-wrap items-center gap-2"},{children:[l("h2",e({className:r("text-[20px] font-semibold leading-7 text-[#1F2937]",null==u?void 0:u.cartTitle),style:null==m?void 0:m.cartTitle},{children:d})),s&&l("span",e({className:r("rounded-full bg-[#E8DDFF] px-2.5 py-1 text-[13px] font-semibold leading-4 text-[#5B2CF4]",null==u?void 0:u.cartSelectedBadge),style:null==m?void 0:m.cartSelectedBadge},{children:s}))]})),l("p",e({className:r("mt-1 text-[13px] leading-5 text-[#475467]",null==u?void 0:u.cartDescription),style:null==m?void 0:m.cartDescription},{children:n}))]})),c&&l("button",e({type:"button",onClick:c,className:r("flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-[8px] border border-[#CDBDFF] bg-white text-[#5B2CF4] transition-colors hover:bg-[#F9F7FF]",null==u?void 0:u.cartAddButton),style:null==m?void 0:m.cartAddButton,"aria-label":o,title:o},{children:l(i,{className:"h-4 w-4",strokeWidth:2.4})}))]}))}export{a as GuidelineCartHeader};
|
|
2
2
|
//# sourceMappingURL=GuidelineCartHeader.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as l}from"react/jsx-runtime";import{Eye as i,X as n}from"lucide-react";import{getGuidelineDescription as a,cx as r}from"../utils.js";import{GuidelineIconButton as s}from"./GuidelineIconButton.js";import{GuidelineSelectButton as o}from"./GuidelineSelectButton.js";function c(c){var m=c.guideline,d=c.isSelected,u=c.onToggle,v=c.onPreview,p=c.onRemove,x=c.hideDeleteButton,h=void 0!==x&&x,f=c.classNames,I=c.styles,w=c.formatAddedOnLabel,N=a(m),y=w(m.date);return t("div",e({className:r("rounded-[8px] border border-[#EAECF0] bg-white px-4 py-4 shadow-[0_1px_2px_rgba(16,24,40,0.04)]",null==f?void 0:f.cartItem),style:null==I?void 0:I.cartItem},{children:l("div",e({className:"flex items-start gap-3"},{children:[t(o,{isSelected:d,onClick:function(){return u(m.id)},classNames:f,styles:I}),l("div",e({className:r("min-w-0 flex-1",null==f?void 0:f.cartItemContent),style:null==I?void 0:I.cartItemContent},{children:[l("div",e({className:r("flex min-w-0 items-start justify-between gap-3",null==f?void 0:f.cartItemTitleRow),style:null==I?void 0:I.cartItemTitleRow},{children:[t("h3",e({className:r("min-w-0 truncate text-[15px] font-semibold leading-5 text-[#1F2937]",null==f?void 0:f.cartItemTitle),style:null==I?void 0:I.cartItemTitle,title:m.name},{children:m.name})),l("div",e({className:r("flex flex-shrink-0 items-center gap-2 text-[#64748B]",null==f?void 0:f.cartItemActions),style:null==I?void 0:I.cartItemActions},{children:[t(s,e({slot:"cartItemPreviewButton",label:"Preview ".concat(m.name),title:"Preview",onClick:function(){return v(m)},classNames:f,styles:I},{children:t(i,{className:"h-4 w-4",strokeWidth:2.2})})),!h&&t(s,e({slot:"cartItemRemoveButton",label:"Remove ".concat(m.name),title:"Remove",onClick:function(){return p(m)},classNames:f,styles:I},{children:t(n,{className:"h-4 w-4",strokeWidth:2.2})}))]}))]})),t("p",e({className:r("mt-2 truncate text-[13px] leading-5 text-[#344054]",null==f?void 0:f.cartItemDescription),style:null==I?void 0:I.cartItemDescription,title:N},{children:N})),y&&t("p",e({className:r("mt-2 truncate text-[12px] leading-4 text-[#475467]",null==f?void 0:f.cartItemDate),style:null==I?void 0:I.cartItemDate,title:y},{children:y}))]}))]}))}))}export{c as GuidelineCartItem};
|
|
2
2
|
//# sourceMappingURL=GuidelineCartItem.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useEffect as l}from"react";import{X as r}from"lucide-react";import{cx as n}from"../utils.js";var a={title:"Clear Guideline Cart?",countPrefix:"Your guideline cart contains",countSuffixSingular:"item.",countSuffixPlural:"items.",description:"Do you want to keep these guidelines for the new chat or start with an empty cart?",clearCart:"Clear Cart",keepGuidelines:"Keep Guidelines",closeAriaLabel:"Close"};function o(o){var s=o.open,c=o.itemCount,d=o.onKeepGuidelines,u=o.onClearCart,m=o.onClose,p=o.loading,f=void 0!==p&&p,x=o.labels,b=o.className,h=o.overlayClassName,g=o.style,y=e(e({},a),x);if(l(function(){if(s){var e=function(e){"Escape"!==e.key||f||m()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}},[s,m,f]),!s)return null;var v=1===c?y.countSuffixSingular:y.countSuffixPlural;return t("div",e({className:n("fixed inset-0 z-[9999] flex items-center justify-center bg-black/40 px-4",h),role:"presentation",onClick:function(){f||m()}},{children:i("div",e({role:"dialog","aria-modal":"true","aria-labelledby":"guideline-clear-cart-title",className:n("w-full max-w-[420px] rounded-lg bg-white p-6 shadow-xl",b),style:g,onClick:function(e){return e.stopPropagation()}},{children:[i("div",e({className:"flex items-start justify-between"},{children:[t("h2",e({id:"guideline-clear-cart-title",className:"text-[18px] font-semibold leading-7 text-[#1F2937]"},{children:y.title})),t("button",e({type:"button",onClick:m,disabled:f,"aria-label":y.closeAriaLabel,className:"ml-3 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-600 disabled:opacity-50"},{children:t(r,{className:"h-4 w-4"})}))]})),i("p",e({className:"mt-4 text-[14px] leading-6 text-[#344054]"},{children:[y.countPrefix," ",i("span",e({className:"font-semibold text-[#1F2937]"},{children:[c," ",v]}))]})),t("p",e({className:"mt-3 text-[14px] leading-6 text-[#344054]"},{children:y.description})),i("div",e({className:"mt-6 flex justify-end gap-3"},{children:[t("button",e({type:"button",onClick:u,disabled:f,className:"h-[40px] rounded-lg border border-gray-300 bg-white px-4 text-[14px] font-medium text-[#111827] transition-colors duration-150 hover:bg-gray-50 disabled:opacity-50"},{children:y.clearCart})),t("button",e({type:"button",onClick:d,disabled:f,className:"h-[40px] rounded-lg bg-violet-700 px-4 text-[14px] font-medium text-white transition-colors duration-150 hover:bg-violet-800 disabled:opacity-50"},{children:y.keepGuidelines}))]}))]}))}))}export{o as GuidelineClearCartDialog};
|
|
2
2
|
//# sourceMappingURL=GuidelineClearCartDialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as i}from"../../../_virtual/_tslib.js";import{jsx as o,jsxs as e}from"react/jsx-runtime";import{useRef as n,useEffect as l}from"react";import{cx as t}from"../utils.js";function r(r){var a=r.open,d=r.onClose,c=r.onConfirm,s=r.title,m=r.description,u=r.confirmLabel,f=void 0===u?"Confirm":u,v=r.cancelLabel,g=void 0===v?"Cancel":v,p=r.variant,b=void 0===p?"default":p,x=r.loading,D=void 0!==x&&x,y=r.classNames,h=r.styles,C=n(null);return l(function(){if(a){var i=function(i){"Escape"!==i.key||D||d()};return document.addEventListener("keydown",i),function(){return document.removeEventListener("keydown",i)}}},[a,d,D]),a?o("div",i({className:t("fixed inset-0 z-[9999] flex items-center justify-center bg-black/40",null==y?void 0:y.confirmDialogOverlay),style:null==h?void 0:h.confirmDialogOverlay,onClick:function(i){i.target!==i.currentTarget||D||d()}},{children:e("div",i({ref:C,role:"dialog","aria-modal":"true",className:t("w-full max-w-[420px] rounded-[12px] bg-white px-6 py-6 shadow-[0_8px_30px_rgba(0,0,0,0.12)]",null==y?void 0:y.confirmDialog),style:null==h?void 0:h.confirmDialog},{children:[o("h3",i({className:t("text-[16px] font-semibold leading-6 text-[#1F2937]",null==y?void 0:y.confirmDialogTitle),style:null==h?void 0:h.confirmDialogTitle},{children:s})),o("p",i({className:t("mt-2 text-[14px] leading-5 text-[#667085]",null==y?void 0:y.confirmDialogDescription),style:null==h?void 0:h.confirmDialogDescription},{children:m})),e("div",i({className:t("mt-6 flex items-center justify-end gap-3",null==y?void 0:y.confirmDialogActions),style:null==h?void 0:h.confirmDialogActions},{children:[o("button",i({type:"button",onClick:d,disabled:D,className:t("h-10 rounded-[6px] border border-[#D0D5DD] bg-white px-4 text-[14px] font-semibold text-[#344054] transition-colors hover:bg-[#F9FAFB] disabled:opacity-50",null==y?void 0:y.confirmDialogCancelButton),style:null==h?void 0:h.confirmDialogCancelButton},{children:g})),o("button",i({type:"button",onClick:c,disabled:D,className:t("h-10 rounded-[6px] border border-transparent px-4 text-[14px] font-semibold text-white transition-colors disabled:opacity-50","danger"===b?"bg-[#EF4444] hover:bg-[#DC2626]":"bg-[#5B2CF4] hover:bg-[#4C1FE8]",null==y?void 0:y.confirmDialogConfirmButton),style:null==h?void 0:h.confirmDialogConfirmButton},{children:D?"Processing...":f}))]}))]}))})):null}export{r as GuidelineConfirmDialog};
|
|
2
2
|
//# sourceMappingURL=GuidelineConfirmDialog.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as e}from"../../../_virtual/_tslib.js";import{jsx as
|
|
1
|
+
import{__assign as n,__awaiter as t,__generator as e}from"../../../_virtual/_tslib.js";import{jsx as i}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import a from"@e-llm-studio/requirement-ai/RequirementAIWrapper";import{UserStoryCardWrapper as u}from"@e-llm-studio/requirement-ai/UserStoryCardWrapper";function d(d){var l,s,p=this,c=d.userStory,f=d.aiReasoning,g=d.updateUserStories,y=d.readOnly,S=void 0!==y&&y,h=d.additionalStyles,m=o(c),C=m[0],v=m[1];r(function(){v(c)},[c]);return i(a,n({searchQueryList:[],searchQueryReasoningIdList:[],userStory:C,setUserStory:function(n){return function(n){v(n)}(n)},aiReasoning:f,setAiReasoning:function(){},citations:{},setCitations:function(){},apiCachingConfig:{queryClient:null,useGetSignedUrlQuery:function(){return null},useGetSignedUrlMutation:function(){return null},useExtractAudioPeaksMutation:function(){return null},useExtractAudioPeaksQuery:function(){return null},useGetVideoSignedUrlMutation:function(){return null},useGetVideoSignedUrlQuery:function(){return null},getProjectFileUrl:function(){return null}},citationConfig:{},customStyles:{userStoryCardStyles:{cardContentStyle:{padding:0,border:"none"},titleSection:{padding:"8px 8px 8px 10px",backgroundColor:"#F9FAFB",borderTopLeftRadius:"10px",borderTopRightRadius:"10px"},titleRow:{margin:"0px"},descriptionSection:{gap:"0px"},showDisplayName:{wrapper:{display:"none"}},saveButton:{background:"linear-gradient(115deg, #2546F0 -23.58%, #5928ED 74.92%)",color:"white"},editButton:S?{display:"none"}:void 0,cancelButton:S?{display:"none"}:void 0,savingButton:S?{display:"none"}:void 0,userStoryCardWrapper:{gap:"10px",display:"flex",flexDirection:"column",width:null!==(s=null===(l=null==h?void 0:h.userStoryCard)||void 0===l?void 0:l.width)&&void 0!==s?s:"100%",margin:"2rem"},userStoryEditStyles:S?{titleEditButton:{display:"none"},addSectionButton:{display:"none"},deleteButton:{display:"none"}}:void 0,BigEnoughStyles:{buttonStyle:{display:"none"}}},userStoryScreenStyles:{userStoryContentStyles:{container:{border:"none",padding:"14px",fontSize:"10px"},confidenceScoreContainer:{display:"none"},inserted:{color:"#0F172A",backgroundColor:"#DBEAFE"},inlineUpdatedComponent:{pillStyleWrapper:{right:"-135px"},pillComponent:{commonStyle:{fontSize:"12px",padding:"0px 5px",width:"130px",justifyContent:"space-between",alignItems:"center"}},Chevron:{wrapper:{width:"16px",marginLeft:"0px"}},cognitiveDecisionIcon:{wrapper:{width:"11px",marginLeft:"0px"}}},attachedContext:{wrapper:{display:"none"}}}}},aiReasoningAccordionOpenStates:{isBottomComponentCollapsed:!1,reasoningDefaultOpen:!1,gapAlwaysOpen:!1,gapDefaultOpen:!0,isBottomComponentDefaultOpen:!0,reasoningAlwaysOpen:!1},inlineUpdateComponentConfig:{handleClickUpdatedPill:function(){return t(p,void 0,void 0,function(){return e(this,function(n){return[2,void 0]})})},handleClickCognitiveDecision:function(){return t(p,void 0,void 0,function(){return e(this,function(n){return[2,void 0]})})}}},{children:i(u,{artifactTitleIDs:[],isDiffEditReviewMode:!1,showUserStoryDiff:!1,updateUserStoryArtifact:function(n,i){return t(p,void 0,void 0,function(){return e(this,function(n){switch(n.label){case 0:return S?[2]:[4,g(i)];case 1:return n.sent(),[2]}})})},handleOpenSendDialog:function(){},handleDownloadUserStory:function(){return t(p,void 0,void 0,function(){return e(this,function(n){return[2,void 0]})})},artifactId:"guideline-editor",isDisplayHighlightControl:!0,showWrapper:!1,elementDisplayConfig:{parentConfig:{showShareButton:!1,showEditButton:!S,actionItemsButton:!1},childConfig:{showShareButton:!1,showEditButton:!S,actionItemsButton:!1}}})}))}export{d as GuidelineEditor};
|
|
2
2
|
//# sourceMappingURL=GuidelineEditor.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as i}from"../../../_virtual/_tslib.js";import{jsxs as n,jsx as r}from"react/jsx-runtime";import{useState as a,useRef as l,useEffect as o}from"react";import{ChevronRight as s,ArrowLeft as d,Check as c,X as u,Pencil as m}from"lucide-react";import{DEFAULT_GUIDELINE_ARTIFACT_TEMPLATE as f}from"../constants.js";import{cx as h,createGuidelineId as p}from"../utils.js";import{GuidelineEditor as x}from"./GuidelineEditor.js";import{GuidelineSpinner as b}from"../icons/GuidelineSpinner.js";function g(g){var y=this,v=g.onBack,N=g.onExit,w=g.onSave,k=g.onRenameGuideline,C=g.initialArtifact,S=g.readOnly,j=void 0!==S&&S,D=g.isLoading,E=void 0!==D&&D,F=g.breadcrumbRootLabel,_=void 0===F?"Guidelines Addition":F,B=g.breadcrumbCurrentLabel,G=g.title,R=void 0===G?"Type your Guidelines":G,L=g.description,A=void 0===L?"Add rules that shape how your agent behaves, responds, or interprets information":L,O=g.exitLabel,U=g.className,W=g.classNames,H=g.styles,z=a(function(){return C||((e=structuredClone(f)).data.artifactData.userStorySnapshot.push({artifactId:p(),title:"Untitled",value:"",big_enough:0,big_enough_decision_factors:{},sub_features:[],isDefaultEdit:!0,isDefaultOpen:!0}),e);var e}),I=z[0],K=z[1],T=a(!1),V=T[0],q=T[1],J=a(!1),M=J[0],P=J[1],Q=a(!1),X=Q[0],Y=Q[1],Z=a(null!=R?R:""),$=Z[0],ee=Z[1],te=l(null);o(function(){C&&K(C)},[C]),o(function(){M||ee(null!=R?R:"")},[R,M]),o(function(){var e,t;M&&(null===(e=te.current)||void 0===e||e.focus(),null===(t=te.current)||void 0===t||t.select())},[M]);var ie=function(){return t(y,void 0,void 0,function(){var e;return i(this,function(t){switch(t.label){case 0:if(!(e=$.trim())||e===R)return P(!1),[2];Y(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),[4,null==k?void 0:k(e)];case 2:return t.sent(),ee(e),[3,4];case 3:return P(!1),Y(!1),[7];case 4:return[2]}})})},ne=function(){ee(null!=R?R:""),P(!1)};return n("div",e({className:h("w-full h-full flex flex-col bg-white",null==W?void 0:W.editorRoot,U),style:e({},null==H?void 0:H.editorRoot)},{children:[n("div",e({className:h("flex items-center justify-between px-6 h-[60px] bg-gray-50 border-b border-gray-200",null==W?void 0:W.editorHeader),style:null==H?void 0:H.editorHeader},{children:[n("div",e({className:"flex items-center gap-2 text-sm font-semibold"},{children:[r("button",e({type:"button",className:"text-gray-800 cursor-pointer hover:text-gray-700",onClick:v,title:"Back"},{children:_})),r(s,{size:16,className:"text-gray-400"}),r("span",e({className:"text-violet-700"},{children:null!=B?B:j?"View Guideline":"Upload Files"}))]})),n("div",e({className:"flex items-center gap-3"},{children:[V&&n("div",e({className:"flex items-center gap-2 text-[13px] text-violet-600 font-medium"},{children:[r(b,{}),r("span",{children:"Saving..."})]})),r("button",e({type:"button","data-testid":"contextAdditionBackButton",onClick:N,className:"!bg-[#FFFFFF] h-[40px] px-2 py-2 hover:!bg-gray-50 !shadow-none text-[#111827] font-medium text-[14px] rounded-lg flex items-center justify-center transition-colors duration-150 border border-gray-300"},{children:null!=O?O:"Exit ".concat(_)}))]}))]})),n("div",e({className:h("px-8 pt-4",null==W?void 0:W.editorContent),style:null==H?void 0:H.editorContent},{children:[n("div",e({className:"flex min-w-0 flex-1 items-center gap-2"},{children:[r("button",e({type:"button",onClick:v,className:"inline-flex h-8 w-8 items-center justify-center rounded-full text-gray-700 hover:bg-gray-100","aria-label":"Back",title:"Back"},{children:r(d,{className:"h-4 w-4"})})),n("div",e({className:"flex min-w-0 flex-1 items-center gap-1"},!j&&M?{children:[r("input",{ref:te,type:"text",value:$,onChange:function(e){return ee(e.target.value)},onKeyDown:function(e){"Enter"===e.key&&ie(),"Escape"===e.key&&ne()},disabled:X,className:"min-w-0 flex-1 rounded border border-violet-400 px-2 py-0.5 text-lg font-semibold text-gray-900 tracking-tight focus:outline-none disabled:opacity-60",placeholder:"Enter guideline name..."}),r("button",e({type:"button",onClick:function(){ie()},disabled:X,className:"inline-flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-green-600 hover:bg-green-50 disabled:opacity-60",title:"Confirm rename"},{children:X?r(b,{}):r(c,{className:"h-4 w-4",strokeWidth:2.4})})),r("button",e({type:"button",onClick:ne,disabled:X,className:"inline-flex h-7 w-7 flex-shrink-0 items-center justify-center rounded-full text-gray-500 hover:bg-gray-100 disabled:opacity-60",title:"Cancel rename"},{children:r(u,{className:"h-4 w-4",strokeWidth:2.4})}))]}:{children:[r("h1",e({className:"min-w-0 truncate text-lg font-semibold text-gray-900 tracking-tight",title:R},{children:R})),!j&&k&&r("button",e({type:"button",onClick:function(){ee(null!=R?R:""),P(!0)},className:"inline-flex h-6 w-6 flex-shrink-0 items-center justify-center rounded text-gray-400 hover:bg-gray-100 hover:text-violet-600",title:"Edit guideline name","aria-label":"Edit guideline name"},{children:r(m,{className:"h-3.5 w-3.5",strokeWidth:2})}))]}))]})),r("p",e({className:"text-gray-400 ml-[2.8rem]"},{children:A})),E&&r("p",e({className:"ml-[2.8rem] mt-1 text-xs font-medium text-violet-600"},{children:"Loading guideline content..."}))]})),r(x,{userStory:I.data.artifactData.userStorySnapshot,aiReasoning:I.data.artifactData.aiReasoningsSnapshot,updateUserStories:function(n){return t(y,void 0,void 0,function(){var t,r;return i(this,function(i){switch(i.label){case 0:if(j)return[2];t=n.map(function(t){return e(e({},t),{isDefaultEdit:!1,isDefaultOpen:!1})}),r=e(e({},I),{data:e(e({},I.data),{artifactData:e(e({},I.data.artifactData),{userStorySnapshot:t})})}),K(r),q(!0),i.label=1;case 1:return i.trys.push([1,,3,4]),[4,w(r)];case 2:return i.sent(),[3,4];case 3:return q(!1),[7];case 4:return[2]}})})},readOnly:j,additionalStyles:{userStoryCard:{width:"90%"}}})]}))}export{g as GuidelineEditorPage};
|
|
2
2
|
//# sourceMappingURL=GuidelineEditorPage.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as t}from"../../../_virtual/_tslib.js";import{jsxs as e,jsx as l}from"react/jsx-runtime";import{cx as r}from"../utils.js";function i(i){var s=i.title,o=i.description,n=i.classNames,c=i.styles;return e("div",t({className:r("flex h-full min-h-[260px] flex-col items-center justify-center rounded-[8px] border border-dashed border-[#CDBDFF] bg-white/70 px-5 text-center",null==n?void 0:n.cartEmptyState),style:null==c?void 0:c.cartEmptyState},{children:[l("p",t({className:r("text-[14px] font-semibold text-[#344054]",null==n?void 0:n.cartEmptyTitle),style:null==c?void 0:c.cartEmptyTitle},{children:s})),l("p",t({className:r("mt-1 text-[13px] leading-5 text-[#667085]",null==n?void 0:n.cartEmptyDescription),style:null==c?void 0:c.cartEmptyDescription},{children:o}))]}))}export{i as GuidelineEmptyState};
|
|
2
2
|
//# sourceMappingURL=GuidelineEmptyState.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as r}from"react/jsx-runtime";import{ArrowLeft as l,Home as n,ChevronRight as i,X as o}from"lucide-react";import{cx as s}from"../utils.js";var a=function(a){var c=a.breadcrumbItems,d=a.onBack,u=a.onClose,m=a.className,h=a.classNames,x=a.styles;return t("div",e({className:s("flex h-[76px] items-center justify-between border-b border-[#EAECF0] px-9",null==h?void 0:h.headerRoot,m),style:null==x?void 0:x.headerRoot},{children:[t("div",e({className:"flex min-w-0 items-center gap-2 text-[15px] font-semibold text-[#1F2937]"},{children:[d&&c.length>1&&r("button",e({type:"button",onClick:d,className:s("inline-flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-[8px] text-[#111827] hover:bg-[#F2F4F7]",null==h?void 0:h.backButton),"aria-label":"Back",title:"Back"},{children:r(l,{className:"h-5 w-5",strokeWidth:2.4})})),r("button",e({type:"button",onClick:d&&c.length>1?d:void 0,className:s("inline-flex h-9 w-9 flex-shrink-0 items-center justify-center rounded-[8px]",d&&c.length>1?"cursor-pointer hover:bg-[#F2F4F7]":"cursor-default"),"aria-label":"Home"},{children:r(n,{className:"h-5 w-5 flex-shrink-0 text-[#8CA0B8]",strokeWidth:2})})),c.map(function(l,n){return t("div",e({className:s("flex min-w-0 items-center gap-2",null==h?void 0:h.breadcrumbItem)},{children:[r(i,{className:"h-4 w-4 flex-shrink-0 text-[#8CA0B8]",strokeWidth:2}),r("span",e({className:s("truncate",n===c.length-1?"text-[#1F2937]":"text-[#6B7280] cursor-pointer hover:text-[#1F2937]"),onClick:function(){n<c.length-1&&(null==d||d())}},{children:l}))]}),"".concat(l,"-").concat(n))})]})),u&&r("button",e({type:"button",onClick:u,className:s("inline-flex h-10 w-10 items-center justify-center rounded-[8px] border border-[#CBD5E1] bg-white text-[#111827] hover:bg-[#F8FAFC]",null==h?void 0:h.closeButton),"aria-label":"Close guidelines",title:"Close"},{children:r(o,{className:"h-5 w-5",strokeWidth:2.2})}))]}))};export{a as GuidelineHeader};
|
|
2
2
|
//# sourceMappingURL=GuidelineHeader.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as t}from"../../../_virtual/_tslib.js";import{jsx as e}from"react/jsx-runtime";import{forwardRef as r}from"react";import{cx as l}from"../utils.js";var o=r(function(r,o){var i=r.label,s=r.title,n=r.onClick,a=r.children,c=r.slot,m=r.classNames,u=r.styles,f=r.className;return e("button",t({ref:o,type:"button",onClick:n,className:l("flex h-6 w-6 items-center justify-center rounded text-[#667085] transition-colors hover:bg-[#F2F4F7] hover:text-[#344054]",f,null==m?void 0:m[c]),style:null==u?void 0:u[c],"aria-label":i,title:null!=s?s:i},{children:a}))});export{o as GuidelineIconButton};
|
|
2
2
|
//# sourceMappingURL=GuidelineIconButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as e,__spreadArray as i}from"../../../_virtual/_tslib.js";import{jsx as n,jsxs as l}from"react/jsx-runtime";import{CircleHelp as t,Plus as d}from"lucide-react";import{mergeGuidelineLabels as o,cx as a,defaultFormatAddedOnLabel as r}from"../utils.js";import{useGuidelineSelection as s}from"../hooks/useGuidelineSelection.js";import{useControllableState as u}from"../hooks/useControllableState.js";import{GuidelineCart as c}from"./GuidelineCart.js";import{GuidelineLibrary as m}from"./GuidelineLibrary.js";import{GuidelineTooltip as g}from"./GuidelineTooltip.js";function f(f){var p=f.guidelines,b=f.recentGuidelines,h=f.selectedGuidelineIds,v=f.defaultSelectedGuidelineIds,x=f.cartGuidelineIds,G=f.defaultCartGuidelineIds,y=f.onSelectedGuidelineIdsChange,D=f.onCartGuidelineIdsChange,w=f.onToggleGuideline,I=f.onPreviewGuideline,T=f.onRemoveGuideline,C=f.onProceed,L=f.onAddGuideline,N=f.onDebugInfoClick,k=f.hideDeleteButton,j=f.className,A=f.classNames,O=f.styles,S=f.labels,R=f.formatAddedOnLabel,E=void 0===R?r:R,_=f.initialVisibleCount,B=f.showRecentlyUsedTab,P=f.onEditGuideline,F=f.onDuplicateGuideline,V=f.onDeleteGuideline,W=f.hideEditOption,M=f.hideDuplicateOption,U=f.hideDeleteOption,q=o(S),z=s({guidelines:p,selectedGuidelineIds:h,defaultSelectedGuidelineIds:v,onSelectedGuidelineIdsChange:y}),H=z.selectedIds,J=z.selectedGuidelines,K=z.toggleGuideline,Q=z.setSelectedIds,X=u({value:x,defaultValue:null!=G?G:[],onChange:D}),Y=X[0],Z=X[1],$=J.filter(function(e){return Y.includes(e.id)});return n("div",e({className:a("lsc-guidelines h-full w-full bg-white font-[Inter]",null==A?void 0:A.landingRoot,j),style:null==O?void 0:O.landingRoot},{children:l("main",e({className:a("h-full overflow-auto px-10 py-10",null==A?void 0:A.landingContent),style:null==O?void 0:O.landingContent},{children:[l("div",e({className:a("flex flex-col gap-6 sm:flex-row sm:items-start sm:justify-between",null==A?void 0:A.landingIntroRow),style:null==O?void 0:O.landingIntroRow},{children:[l("div",e({className:a("min-w-0 flex-1",null==A?void 0:A.landingIntro),style:null==O?void 0:O.landingIntro},{children:[n("h1",e({className:a("text-[30px] font-bold leading-[38px] text-[#6D35F2]",null==A?void 0:A.landingTitle),style:null==O?void 0:O.landingTitle},{children:q.landingTitle})),n("p",e({className:a("mt-2 text-[19px] leading-7 text-[#1F2937]",null==A?void 0:A.landingDescription),style:null==O?void 0:O.landingDescription},{children:q.landingDescription})),n(g,e({content:q.landingDebugTooltipContent,side:"right",maxWidth:400},{children:l("button",e({type:"button",onClick:N,className:a("mt-3 inline-flex items-center gap-2 text-[14px] font-medium text-[#53657D] hover:text-[#344054]",null==A?void 0:A.landingDebugLink),style:null==O?void 0:O.landingDebugLink},{children:[n("span",{children:q.landingDebugLabel}),n(t,{className:a("h-5 w-5",null==A?void 0:A.landingDebugIcon),style:null==O?void 0:O.landingDebugIcon,strokeWidth:2})]}))}))]})),L&&l("button",e({type:"button",onClick:L,className:a("inline-flex h-11 min-w-[210px] flex-shrink-0 items-center justify-center gap-3 rounded-[6px] bg-[#4438F5] px-5 text-[15px] font-semibold text-white shadow-[0_1px_2px_rgba(16,24,40,0.08)] transition-colors hover:bg-[#392DE8] sm:ml-auto",null==A?void 0:A.landingTopAddButton),style:null==O?void 0:O.landingTopAddButton},{children:[n(d,{className:"h-5 w-5 flex-shrink-0",strokeWidth:2.4}),n("span",e({className:"truncate"},{children:q.landingAddGuidelineLabel}))]}))]})),l("div",e({className:a("mt-12 grid w-full grid-cols-[minmax(0,1fr)_minmax(300px,360px)] items-start gap-6 2xl:grid-cols-[minmax(0,1fr)_minmax(360px,424px)]",null==A?void 0:A.landingBody),style:null==O?void 0:O.landingBody},{children:[n(m,{guidelines:p,recentGuidelines:b,cartGuidelineIds:Y,savedTabLabel:q.savedTabLabel,recentTabLabel:q.recentTabLabel,emptyTitle:q.libraryEmptyTitle,emptyDescription:q.libraryEmptyDescription,addToCartLabel:q.libraryAddToCart,addedToCartLabel:q.libraryAddedToCart,showMoreLabel:q.libraryShowMore,showLessLabel:q.libraryShowLess,initialVisibleCount:_,showRecentlyUsedTab:B,onToggleGuideline:function(e){if(Y.includes(e)){var n=p.find(function(i){return i.id===e});return Z(function(i){return i.filter(function(i){return i!==e})}),Q(function(i){return i.filter(function(i){return i!==e})}),void(n&&T(n))}Z(function(n){return i(i([],n,!0),[e],!1)}),Q(function(n){var l=n.includes(e)?n:i(i([],n,!0),[e],!1);return null==w||w(e,l),l})},onPreviewGuideline:I,classNames:A,styles:O,formatAddedOnLabel:E,onEditGuideline:P,onDuplicateGuideline:F,onDeleteGuideline:V,hideEditOption:W,hideDuplicateOption:M,hideDeleteOption:U}),n(c,{guidelines:p,cartGuidelineIds:Y,selectedGuidelineIds:H,onToggleGuideline:K,onPreviewGuideline:I,onRemoveGuideline:function(e){Z(function(i){return i.filter(function(i){return i!==e.id})}),Q(function(i){return i.filter(function(i){return i!==e.id})}),T(e)},onProceed:function(){return C($)},hideDeleteButton:k,classNames:A,styles:O,labels:S,formatAddedOnLabel:E})]}))]}))}))}export{f as GuidelineLandingPage};
|
|
2
2
|
//# sourceMappingURL=GuidelineLandingPage.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as i,Fragment as l}from"react/jsx-runtime";import{useState as r,useMemo as n}from"react";import{ChevronDown as a,BookmarkCheck as o,Clock3 as d}from"lucide-react";import{cx as s}from"../utils.js";import{GuidelineLibraryCard as c}from"./GuidelineLibraryCard.js";function u(u){var b=u.guidelines,m=u.recentGuidelines,p=void 0===m?[]:m,y=u.cartGuidelineIds,v=u.savedTabLabel,h=u.recentTabLabel,f=u.emptyTitle,x=u.emptyDescription,T=u.addToCartLabel,g=u.addedToCartLabel,D=u.showMoreLabel,C=u.showLessLabel,E=u.initialVisibleCount,N=void 0===E?4:E,F=u.showRecentlyUsedTab,L=void 0===F||F,w=u.onToggleGuideline,G=u.onPreviewGuideline,B=u.classNames,O=u.styles,A=u.formatAddedOnLabel,j=u.onEditGuideline,k=u.onDuplicateGuideline,S=u.onDeleteGuideline,I=u.hideEditOption,M=u.hideDuplicateOption,P=u.hideDeleteOption,W=r("saved"),_=W[0],R=W[1],U=r(!1),V=U[0],q=U[1],z=p.length>0,H="recent"===_?p:b,J=n(function(){return V?H:H.slice(0,N)},[H,N,V]),K=H.length>N,Q=function(l,r,n){var a=_===l,c="recent"===l&&!z,u="saved"===n?o:d;return t("button",e({type:"button",onClick:function(){c||(R(l),q(!1))},disabled:c,className:s("relative inline-flex h-10 items-center gap-2 px-4 text-[14px] font-medium transition-colors",a?"text-[#1F2937] after:absolute after:inset-x-0 after:bottom-0 after:h-[3px] after:rounded-full after:bg-[#6D5BFF]":"text-[#B5BDC8]",a?null==B?void 0:B.libraryTabActive:null==B?void 0:B.libraryTabInactive,null==B?void 0:B.libraryTab),style:e(e({},null==O?void 0:O.libraryTab),a?null==O?void 0:O.libraryTabActive:null==O?void 0:O.libraryTabInactive)},{children:[i(u,{className:"h-5 w-5 flex-shrink-0",strokeWidth:2}),i("span",e({className:"truncate"},{children:r}))]}))};return t("section",e({className:s("min-w-0",null==B?void 0:B.library),style:null==O?void 0:O.library},{children:[t("div",e({className:s("flex border-b border-[#EAECF0]",null==B?void 0:B.libraryTabs),style:null==O?void 0:O.libraryTabs},{children:[Q("saved",v,"saved"),L&&Q("recent",h,"recent")]})),0===H.length?t("div",e({className:s("mt-6 flex min-h-[260px] flex-col items-center justify-center rounded-[8px] border border-dashed border-[#CDBDFF] bg-[#FBFAFF] px-6 text-center",null==B?void 0:B.libraryEmptyState),style:null==O?void 0:O.libraryEmptyState},{children:[i("p",e({className:s("text-[15px] font-semibold text-[#344054]",null==B?void 0:B.libraryEmptyTitle),style:null==O?void 0:O.libraryEmptyTitle},{children:f})),i("p",e({className:s("mt-2 max-w-[320px] text-[13px] leading-5 text-[#667085]",null==B?void 0:B.libraryEmptyDescription),style:null==O?void 0:O.libraryEmptyDescription},{children:x}))]})):t(l,{children:[i("div",e({className:s("mt-6 grid grid-cols-2 gap-5",null==B?void 0:B.libraryGrid),style:null==O?void 0:O.libraryGrid},{children:J.map(function(e){return i(c,{guideline:e,isSelected:y.includes(e.id),addToCartLabel:T,addedToCartLabel:g,onToggle:w,onPreview:G,onEdit:j,onDuplicate:k,onDelete:S,hideEditOption:I,hideDuplicateOption:M,hideDeleteOption:P,classNames:B,styles:O,formatAddedOnLabel:A},e.id)})})),K&&t("button",e({type:"button",onClick:function(){return q(function(e){return!e})},className:s("mt-7 inline-flex items-center gap-2 text-[14px] font-semibold text-[#5B2CF4] hover:text-[#4C1FE8]",null==B?void 0:B.libraryShowMoreButton),style:null==O?void 0:O.libraryShowMoreButton},{children:[i("span",{children:V?C:D}),i(a,{className:s("h-4 w-4 transition-transform",V&&"rotate-180"),strokeWidth:2.4})]}))]})]}))}export{u as GuidelineLibrary};
|
|
2
2
|
//# sourceMappingURL=GuidelineLibrary.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__awaiter as
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as i}from"../../../_virtual/_tslib.js";import{jsxs as l,Fragment as r,jsx as n}from"react/jsx-runtime";import{useRef as o,useState as a}from"react";import{BookOpen as d,Eye as s,MoreHorizontal as c,UserCheck as u,Check as m,Plus as p}from"lucide-react";import{getGuidelineDescription as b,cx as f}from"../utils.js";import{GuidelineIconButton as h}from"./GuidelineIconButton.js";import{createGuidelineCardMenuItems as v,GuidelineCardMenu as y}from"./GuidelineCardMenu.js";import{GuidelineConfirmDialog as C}from"./GuidelineConfirmDialog.js";import{GuidelineTooltip as x}from"./GuidelineTooltip.js";function w(w){var g=this,N=w.guideline,D=w.isSelected,F=w.addToCartLabel,L=w.addedToCartLabel,k=w.onToggle,B=w.onPreview,E=w.onEdit,j=w.onDuplicate,T=w.onDelete,A=w.hideEditOption,G=void 0!==A&&A,O=w.hideDuplicateOption,P=void 0!==O&&O,_=w.hideDeleteOption,S=void 0!==_&&_,W=w.editOptionLabel,M=void 0===W?"Edit":W,I=w.duplicateOptionLabel,H=void 0===I?"Duplicate":I,R=w.deleteOptionLabel,U=void 0===R?"Delete":R,q=w.duplicateConfirmTitle,z=void 0===q?"Duplicate Guideline":q,J=w.duplicateConfirmDescription,K=w.duplicateConfirmLabel,Q=void 0===K?"Duplicate":K,V=w.deleteConfirmTitle,X=void 0===V?"Delete Guideline":V,Y=w.deleteConfirmDescription,Z=w.deleteConfirmLabel,$=void 0===Z?"Delete":Z,ee=w.classNames,te=w.styles,ie=w.formatAddedOnLabel,le=b(N),re=ie(N.date),ne=o(null),oe=a(!1),ae=oe[0],de=oe[1],se=a(!1),ce=se[0],ue=se[1],me=a(!1),pe=me[0],be=me[1],fe=a(!1),he=fe[0],ve=fe[1],ye=null!=J?J:'Are you sure you want to duplicate "'.concat(N.name,'"? A copy will be created with "(1)" appended to the title.'),Ce=null!=Y?Y:'Are you sure you want to delete "'.concat(N.name,'"? This action cannot be undone.'),xe=v({onEdit:function(){null==E||E(N)},onDuplicate:function(){return ue(!0)},onDelete:function(){return be(!0)},editLabel:M,duplicateLabel:H,deleteLabel:U,hideEdit:G||!E,hideDuplicate:P||!j,hideDelete:S||!T}),we=xe.some(function(e){return!e.hidden});return l(r,{children:[l("article",e({className:f("flex min-h-[156px] flex-col rounded-[8px] border border-[#EAECF0] bg-white px-5 py-5 shadow-[0_1px_2px_rgba(16,24,40,0.03)]",null==ee?void 0:ee.libraryCard),style:null==te?void 0:te.libraryCard},{children:[l("div",e({className:f("flex min-w-0 items-start justify-between gap-4",null==ee?void 0:ee.libraryCardHeader),style:null==te?void 0:te.libraryCardHeader},{children:[l("div",e({className:"flex min-w-0 items-center gap-2"},{children:[n(d,{className:f("h-5 w-5 flex-shrink-0 text-[#7C6CFF]",null==ee?void 0:ee.libraryCardIcon),style:null==te?void 0:te.libraryCardIcon,strokeWidth:2}),n("h3",e({className:f("min-w-0 truncate text-[15px] font-semibold leading-5 text-[#1F2937]",null==ee?void 0:ee.libraryCardTitle),style:null==te?void 0:te.libraryCardTitle,title:N.name},{children:N.name}))]})),l("div",e({className:f("flex flex-shrink-0 items-center gap-2 text-[#64748B]",null==ee?void 0:ee.libraryCardActions),style:null==te?void 0:te.libraryCardActions},{children:[n(h,e({slot:"libraryCardPreviewButton",label:"Preview ".concat(N.name),title:"Preview",onClick:function(){return B(N)},classNames:ee,styles:te},{children:n(s,{className:"h-4 w-4",strokeWidth:2.2})})),l("div",e({className:"relative"},{children:[n(h,e({slot:"libraryCardMoreButton",label:"More options for ".concat(N.name),title:"More options",onClick:function(){return we?de(function(e){return!e}):void 0},classNames:ee,styles:te,ref:ne},{children:n(c,{className:"h-4 w-4",strokeWidth:2.2})})),we&&n(y,{open:ae,onClose:function(){return de(!1)},anchorRef:ne,items:xe,classNames:ee,styles:te})]})),n(x,e({content:"Saved Guideline",side:"bottom"},{children:n("span",{children:n(h,e({slot:"libraryCardUserButton",label:"Saved guideline: ".concat(N.name),title:"",onClick:function(){},classNames:ee,styles:te},{children:n(u,{className:"h-4 w-4",strokeWidth:2.2})}))})}))]}))]})),n("p",e({className:f("mt-6 line-clamp-2 min-h-[40px] text-[13px] leading-5 text-[#344054]",null==ee?void 0:ee.libraryCardDescription),style:null==te?void 0:te.libraryCardDescription,title:le},{children:le})),l("div",e({className:f("mt-auto grid grid-cols-[minmax(0,1fr)_minmax(140px,176px)] items-end gap-3 pt-5",null==ee?void 0:ee.libraryCardFooter),style:null==te?void 0:te.libraryCardFooter},{children:[n("p",e({className:f("min-w-0 truncate text-[12px] leading-4 text-[#475467]",null==ee?void 0:ee.libraryCardDate),style:null==te?void 0:te.libraryCardDate,title:re},{children:re})),l("button",e({type:"button",onClick:function(){return k(N.id)},"aria-pressed":D,className:f("inline-flex h-10 w-full min-w-0 items-center justify-center gap-2 rounded-[6px] border px-4 text-[14px] font-semibold transition-colors",D?"border-transparent bg-[#F3EFFF] text-[#5B2CF4] hover:bg-[#EDE5FF]":"border-[#8B5CF6] bg-white text-[#5B2CF4] hover:bg-[#F8F5FF]",null==ee?void 0:ee.libraryCardSelectButton),style:null==te?void 0:te.libraryCardSelectButton},{children:[n(D?m:p,{className:"h-4 w-4 flex-shrink-0",strokeWidth:2.6}),n("span",e({className:"truncate"},{children:D?L:F}))]}))]}))]})),n(C,{open:ce,onClose:function(){return ue(!1)},onConfirm:function(){return t(g,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:if(!j)return[2];ve(!0),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,Promise.resolve(j(N))];case 2:return e.sent(),[3,4];case 3:return ve(!1),ue(!1),[7];case 4:return[2]}})})},title:z,description:ye,confirmLabel:Q,loading:he,classNames:ee,styles:te}),n(C,{open:pe,onClose:function(){return be(!1)},onConfirm:function(){return t(g,void 0,void 0,function(){return i(this,function(e){switch(e.label){case 0:if(!T)return[2];ve(!0),e.label=1;case 1:return e.trys.push([1,,3,4]),[4,Promise.resolve(T(N))];case 2:return e.sent(),[3,4];case 3:return ve(!1),be(!1),[7];case 4:return[2]}})})},title:X,description:Ce,confirmLabel:$,variant:"danger",loading:he,classNames:ee,styles:te})]})}export{w as GuidelineLibraryCard};
|
|
2
2
|
//# sourceMappingURL=GuidelineLibraryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{Plus as l,ExternalLink as i}from"lucide-react";import{cx as n,defaultFormatAddedOnLabel as r}from"../utils.js";import{GuidelineCartItem as d}from"./GuidelineCartItem.js";import{GuidelineTooltip as p}from"./GuidelineTooltip.js";import{DEFAULT_GUIDELINE_LABELS as s}from"../constants.js";function u(u){var a=u.guidelines,v=u.cartGuidelineIds,c=u.selectedGuidelineIds,m=u.onToggleGuideline,b=u.onPreviewGuideline,y=u.onRemoveGuideline,f=u.onAddGuideline,h=u.onOpenFullView,g=u.debugEnabled,x=void 0!==g&&g,D=u.onDebugChange,E=u.title,N=void 0===E?"Guideline Cart":E,w=u.debugLabel,F=void 0===w?"Debug":w,A=u.addGuidelineLabel,C=void 0===A?"Add guideline":A,T=u.openFullViewLabel,j=void 0===T?"Open full view":T,G=u.emptyTitle,L=void 0===G?"No guideline yet":G,k=u.emptyDescription,B=void 0===k?"Add your first guideline to get started":k,I=u.emptyActionLabel,O=void 0===I?"Add guideline":I,S=u.emptyIcon,z=u.className,W=u.classNames,H=u.styles,P=u.formatAddedOnLabel,R=void 0===P?r:P,V=u.debugTooltipContent,_=void 0===V?s.popoverDebugTooltipContent:V,q=v?a.filter(function(e){return v.includes(e.id)}):a.filter(function(e){return c.includes(e.id)});return t("section",e({className:n("flex min-h-[420px] flex-col bg-white p-6",null==W?void 0:W.popoverCart,z),style:null==H?void 0:H.popoverCart},{children:[t("div",e({className:n("flex items-center justify-between gap-4",null==W?void 0:W.popoverHeader),style:null==H?void 0:H.popoverHeader},{children:[o("h3",e({className:n("text-[18px] font-semibold leading-7 text-[#5928ED]",null==W?void 0:W.popoverTitle),style:null==H?void 0:H.popoverTitle},{children:N})),t("div",e({className:n("flex shrink-0 items-center gap-3 text-[#5928ED]",null==W?void 0:W.popoverActions),style:null==H?void 0:H.popoverActions},{children:[D&&t("div",e({className:n("flex items-center gap-2",null==W?void 0:W.popoverDebug),style:null==H?void 0:H.popoverDebug},{children:[o("button",e({type:"button",role:"switch","aria-checked":x,onClick:function(){return D(!x)},className:n("relative inline-flex h-5 w-9 items-center rounded-full border transition-colors focus:outline-none",x?"border-[#5928ED] bg-[#5928ED]":"border-[#D0D5DD] bg-[#EAECF0]",null==W?void 0:W.popoverDebugSwitch),style:null==H?void 0:H.popoverDebugSwitch},{children:o("span",{className:n("inline-block h-4 w-4 transform rounded-full bg-white transition-transform",x?"translate-x-4":"translate-x-0.5",null==W?void 0:W.popoverDebugThumb),style:null==H?void 0:H.popoverDebugThumb})})),o(p,e({content:_,side:"bottom",maxWidth:400},{children:o("span",e({className:n("text-[14px] leading-5 text-[#667085] cursor-help",null==W?void 0:W.popoverDebugLabel),style:null==H?void 0:H.popoverDebugLabel},{children:F}))}))]})),o("div",{className:n("h-6 w-px bg-[#D0D5DD]",null==W?void 0:W.popoverDivider),style:null==H?void 0:H.popoverDivider}),o("button",e({type:"button",onClick:f,className:n("flex h-7 w-7 items-center justify-center rounded-md text-[#5928ED] transition hover:bg-[#F4F0FF]",null==W?void 0:W.popoverAddButton),style:null==H?void 0:H.popoverAddButton,"aria-label":C,title:C},{children:o(l,{size:20,strokeWidth:2.1})})),o("button",e({type:"button",onClick:h,className:n("flex h-7 w-7 items-center justify-center rounded-md text-[#5928ED] transition hover:bg-[#F4F0FF]",null==W?void 0:W.popoverOpenButton),style:null==H?void 0:H.popoverOpenButton,"aria-label":j,title:j},{children:o(i,{size:18,strokeWidth:2.1})}))]}))]})),o("div",e({className:n("mt-6 min-h-[360px] flex-1 space-y-4 overflow-y-auto pr-1",null==W?void 0:W.popoverList),style:null==H?void 0:H.popoverList},{children:0===q.length?t("div",e({className:n("flex h-full min-h-[360px] flex-col items-center justify-center rounded-[8px] bg-[#F9FAFB] px-5 py-6 text-center",null==W?void 0:W.popoverEmptyState),style:null==H?void 0:H.popoverEmptyState},{children:[S&&o("div",e({className:n("mb-2 flex h-12 w-12 items-center justify-center rounded-xl bg-[#EDE9FE]",null==W?void 0:W.popoverEmptyIcon),style:null==H?void 0:H.popoverEmptyIcon},{children:S})),o("p",e({className:n("text-[14px] font-semibold text-[#1F2937]",null==W?void 0:W.popoverEmptyTitle),style:null==H?void 0:H.popoverEmptyTitle},{children:L})),o("p",e({className:n("mt-1 text-[12px] text-[#667085]",null==W?void 0:W.popoverEmptyDescription),style:null==H?void 0:H.popoverEmptyDescription},{children:B})),t("button",e({type:"button",onClick:h,className:n("mt-4 flex items-center gap-1.5 rounded-lg bg-[#5928ED] px-5 py-2 text-sm font-medium text-white transition hover:bg-[#4A1FD6]",null==W?void 0:W.popoverEmptyButton),style:null==H?void 0:H.popoverEmptyButton},{children:[o(l,{size:16}),O]}))]})):q.map(function(e){return o(d,{guideline:e,isSelected:c.includes(e.id),onToggle:m,onPreview:b,onRemove:y,classNames:W,styles:H,formatAddedOnLabel:R},e.id)})}))]}))}export{u as GuidelinePopoverCart};
|
|
2
2
|
//# sourceMappingURL=GuidelinePopoverCart.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t,jsxs as r,Fragment as o}from"react/jsx-runtime";import{useState as n,useRef as i}from"react";import{ArrowRight as l}from"lucide-react";import{cx as c}from"../utils.js";import{GuidelineSpinner as s}from"../icons/GuidelineSpinner.js";function a(a){var d=a.label,u=a.disabled,m=a.onClick,p=a.classNames,f=a.styles,b=n(!1),h=b[0],x=b[1],v=i(0);return t("button",e({type:"button",onClick:function(){var e=Date.now();h||e-v.current<2e3||(v.current=e,x(!0),m(),setTimeout(function(){x(!1)},2e3))},disabled:u||h,className:c("mt-5 flex h-[52px] w-full items-center justify-center gap-2 rounded-[6px] bg-[#5B2CF4] px-4 text-[16px] font-semibold text-white transition-colors hover:bg-[#4C1FE8] disabled:cursor-not-allowed disabled:bg-[#C7B7FF]",null==p?void 0:p.cartProceedButton),style:null==f?void 0:f.cartProceedButton},{children:r(o,h?{children:[t(s,{}),t("span",e({className:"truncate"},{children:"Processing..."}))]}:{children:[t("span",e({className:"truncate"},{children:d})),t(l,{className:c("h-4 w-4 flex-shrink-0",null==p?void 0:p.cartProceedIcon),style:null==f?void 0:f.cartProceedIcon,strokeWidth:2.3})]})}))}export{a as GuidelineProceedButton};
|
|
2
2
|
//# sourceMappingURL=GuidelineProceedButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as l,jsxs as t}from"react/jsx-runtime";import{useEffect as o}from"react";import{X as d}from"lucide-react";import{cx as a}from"../utils.js";var i={title:"Guideline Saved Successfully",description:"Would you like to add it to the current Guideline Cart?",saveOnly:"Save Only",addToCart:"Add To Cart",closeAriaLabel:"Close"};function n(n){var s=n.open,r=n.onSaveOnly,u=n.onAddToCart,v=n.onClose,c=n.labels,m=n.disableModalButtons,y=void 0!==m&&m,p=n.classNames,b=n.styles,x=e(e({},i),c);return o(function(){if(s){var e=function(e){"Escape"===e.key&&v()};return document.addEventListener("keydown",e),function(){return document.removeEventListener("keydown",e)}}},[s,v]),s?l("div",e({className:a("fixed inset-0 z-50 flex items-center justify-center bg-black/40 px-4",null==p?void 0:p.savedModalOverlay),style:null==b?void 0:b.savedModalOverlay,role:"presentation",onClick:v},{children:t("div",e({role:"dialog","aria-modal":"true","aria-labelledby":"guideline-saved-modal-title",className:a("w-full max-w-[420px] rounded-lg bg-white p-6 shadow-xl",null==p?void 0:p.savedModalDialog),style:null==b?void 0:b.savedModalDialog,onClick:function(e){return e.stopPropagation()}},{children:[t("div",e({className:a("flex items-start justify-between",null==p?void 0:p.savedModalHeader),style:null==b?void 0:b.savedModalHeader},{children:[l("h2",e({id:"guideline-saved-modal-title",className:a("text-[18px] font-semibold leading-7 text-[#1F2937]",null==p?void 0:p.savedModalTitle),style:null==b?void 0:b.savedModalTitle},{children:x.title})),l("button",e({type:"button",onClick:v,"aria-label":x.closeAriaLabel,className:a("ml-3 inline-flex h-8 w-8 shrink-0 items-center justify-center rounded-full text-gray-400 hover:bg-gray-100 hover:text-gray-600",null==p?void 0:p.savedModalCloseButton),style:null==b?void 0:b.savedModalCloseButton},{children:l(d,{className:"h-4 w-4"})}))]})),l("p",e({className:a("mt-2 text-[14px] leading-6 text-[#344054]",null==p?void 0:p.savedModalDescription),style:null==b?void 0:b.savedModalDescription},{children:x.description})),t("div",e({className:a("mt-6 flex justify-end gap-3",null==p?void 0:p.savedModalActions),style:null==b?void 0:b.savedModalActions},{children:[l("button",e({type:"button",onClick:r,disabled:y,className:a("h-[40px] rounded-lg border border-gray-300 bg-white px-4 text-[14px] font-medium text-[#111827] transition-colors duration-150 hover:bg-gray-50 disabled:opacity-50",null==p?void 0:p.savedModalSaveButton),style:null==b?void 0:b.savedModalSaveButton},{children:x.saveOnly})),l("button",e({type:"button",onClick:u,disabled:y,className:a("h-[40px] rounded-lg bg-violet-700 px-4 text-[14px] font-medium text-white transition-colors duration-150 hover:bg-violet-800 disabled:opacity-50",null==p?void 0:p.savedModalAddButton),style:null==b?void 0:b.savedModalAddButton},{children:x.addToCart}))]}))]}))})):null}export{n as GuidelineSavedModal};
|
|
2
2
|
//# sourceMappingURL=GuidelineSavedModal.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as e}from"../../../_virtual/_tslib.js";import{jsx as t}from"react/jsx-runtime";import{Check as r}from"lucide-react";import{cx as i}from"../utils.js";function l(l){var o=l.isSelected,s=l.onClick,n=l.classNames,a=l.styles;return t("button",e({type:"button",onClick:s,"aria-pressed":o,"aria-label":o?"Unselect guideline":"Select guideline",className:i("mt-1 flex h-5 w-5 flex-shrink-0 items-center justify-center rounded-[5px] border transition-colors",o?"border-[#5B2CF4] bg-[#5B2CF4] text-white":"border-[#CBD5E1] bg-white text-transparent hover:border-[#8B5CF6]",null==n?void 0:n.cartItemSelectButton),style:null==a?void 0:a.cartItemSelectButton},{children:t(r,{className:"h-3.5 w-3.5",strokeWidth:3.2})}))}export{l as GuidelineSelectButton};
|
|
2
2
|
//# sourceMappingURL=GuidelineSelectButton.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{__assign as i}from"../../../_virtual/_tslib.js";import{jsx as o,jsxs as r}from"react/jsx-runtime";import{Provider as t,Root as e,Trigger as d,Portal as n,Content as l,Arrow as a}from"../../../node_modules/@radix-ui/react-tooltip/dist/index.mjs.js";function s(s){var h=s.content,x=s.children,c=s.side,p=void 0===c?"top":c,f=s.maxWidth,m=void 0===f?320:f;return o(t,i({delayDuration:200},{children:r(e,{children:[o(d,i({asChild:!0},{children:x})),o(n,{children:r(l,i({side:p,sideOffset:6,style:{maxWidth:m,zIndex:9999,borderRadius:8,backgroundColor:"#1F2937",padding:"8px 12px",fontSize:12,lineHeight:"18px",color:"#fff",boxShadow:"0 4px 16px rgba(0,0,0,0.16)"}},{children:[h,o(a,{style:{fill:"#1F2937"},width:10,height:5})]}))})]})}))}export{s as GuidelineTooltip};
|
|
2
2
|
//# sourceMappingURL=GuidelineTooltip.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
var e={landingBreadcrumbLabel:"Agent Guidelines",landingTitle:"Set Your Agent's Guidelines",landingDescription:"Add guidelines that shape how your agent behaves, responds, and interprets.",landingDebugLabel:"Know more about debug mode",landingAddGuidelineLabel:"Add New Guideline",savedTabLabel:"Saved",recentTabLabel:"Recently used",libraryEmptyTitle:"No saved guidelines",libraryEmptyDescription:"Create a new guideline to start building your session rules.",libraryAddToCart:"Add to Cart",libraryAddedToCart:"Added to Cart",libraryShowMore:"Show more guidelines",libraryShowLess:"Show fewer guidelines",cartTitle:"Guideline Cart",cartDescription:"Guidelines added to your current session",emptyCartTitle:"No guidelines added",emptyCartDescription:"Your selected guidelines will appear here.",proceedButton:"Proceed with Selected",addGuidelineLabel:"Add guideline",selectedBadge:function(e){return"".concat(e," Selected")},landingDebugTooltipContent:"Debug Mode is a transparency and control mechanism designed to intercept prompt submissions before they are dispatched to the LLM to help users test and debug with different guidelines rapidly. It serves as an approval gate, allowing users to verify, configure, and approve the guideline payload for a specific query.",popoverDebugTooltipContent:"Debug Mode is a transparency and control mechanism designed to intercept prompt submissions before they are dispatched to the LLM to help users test and debug with different guidelines rapidly. It serves as an approval gate, allowing users to verify, configure, and approve the guideline payload for a specific query."},t={data:{_id:"",artifactId:"",artifactTitle:"",artifactTitleIDs:[],artifactData:{final_response_gs_url:"",citationsSnapshot:{image_citations:[],appmod_citations:[],audio_citations:[],file_citations:[],web_citations:[],pdf_citations:[],gpt_citations:[]},projectIdSnapshot:"",userStorySnapshot:[],breadCrumbsSnapShot:[],activePageSnapShot:"",aiReasoningsSnapshot:[],dataSources_files:{},knowledgeBaseSnapshot:[],projectAnalyserSummarySnapshot:[],chatHistorySnapshot:[],persistedDataFilesSnapshot:{},risk_gap_items_json:{},selectedCodebasesSnapshot:[],selectedUserStoryTypeSnapshot:""},dataSources_files:{},modeName:"",modeId:null,artifactSubTitle:"",isLoading:!1,widgetName:"user story",userEmail:"",optionalData:{},created_at:"",updated_at:""},counter:{ai_reasoning_id_counter:0,pdf_citation_id_counter:0,section_number:0}};export{t as DEFAULT_GUIDELINE_ARTIFACT_TEMPLATE,e as DEFAULT_GUIDELINE_LABELS};
|
|
2
2
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as n,useRef as
|
|
1
|
+
import{useState as n,useRef as r,useEffect as t,useCallback as u}from"react";function e(e){var o=e.value,a=e.defaultValue,c=e.onChange,f=n(a),i=f[0],l=f[1],v=void 0!==o,p=v?o:i,d=r(p);t(function(){d.current=p},[p]);var m=u(function(n){var r="function"==typeof n?n(d.current):n;d.current=r,v||l(r),null==c||c(r)},[v,c]);return[p,m]}export{e as useControllableState};
|
|
2
2
|
//# sourceMappingURL=useControllableState.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useState as t,useCallback as
|
|
1
|
+
import{useState as t,useCallback as r}from"react";function e(e){void 0===e&&(e="list");var i=t(e),o=i[0],n=i[1],p=r(function(){return n("editor")},[]),s=r(function(){return n("list")},[]);return{step:o,setStep:n,openEditor:p,openList:s,isEditorOpen:"editor"===o}}export{e as useGuidelineFlow};
|
|
2
2
|
//# sourceMappingURL=useGuidelineFlow.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{useCallback as
|
|
1
|
+
import{__spreadArray as e}from"../../../_virtual/_tslib.js";import{useCallback as t,useMemo as n}from"react";import{useControllableState as l}from"./useControllableState.js";function i(i){var u=i.guidelines,d=i.selectedGuidelineIds,r=i.defaultSelectedGuidelineIds,o=void 0===r?[]:r,s=i.onSelectedGuidelineIdsChange,c=i.onToggleGuideline,f=l({value:d,defaultValue:o,onChange:s}),a=f[0],g=f[1],m=t(function(t){g(function(n){var l=n.includes(t)?n.filter(function(e){return e!==t}):e(e([],n,!0),[t],!1);return null==c||c(t,l),l})},[c,g]),G=n(function(){return u.filter(function(e){return a.includes(e.id)})},[u,a]);return{selectedIds:a,selectedGuidelines:G,selectedCount:G.length,toggleGuideline:m,setSelectedIds:g}}export{i as useGuidelineSelection};
|
|
2
2
|
//# sourceMappingURL=useGuidelineSelection.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsxs as
|
|
1
|
+
import{__assign as r}from"../../../_virtual/_tslib.js";import{jsxs as t,jsx as o}from"react/jsx-runtime";import{cx as s}from"../utils.js";function i(i){var a=i.className;return t("svg",r({className:s("h-4 w-4 animate-spin",a),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},{children:[o("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),o("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}))}export{i as GuidelineSpinner};
|
|
2
2
|
//# sourceMappingURL=GuidelineSpinner.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{__assign as t}from"../../_virtual/_tslib.js";import{DEFAULT_GUIDELINE_LABELS as n}from"./constants.js";var r=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")},i=function(r){return t(t({},n),r)},e=function(t){return(t.summary||t.instruction||"").replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim()||"No description available"},o=function(t){if(!t)return"";var n=new Date(t);if(Number.isNaN(n.getTime()))return"";var r=n.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit",hour12:!0}),i=n.toLocaleDateString("en-GB",{day:"2-digit",month:"2-digit",year:"2-digit"});return"Added on - ".concat(r," | ").concat(i)},a=function(){return"undefined"!=typeof crypto&&"randomUUID"in crypto?crypto.randomUUID():"guideline-".concat(Date.now(),"-").concat(Math.random().toString(16).slice(2))};export{a as createGuidelineId,r as cx,o as defaultFormatAddedOnLabel,e as getGuidelineDescription,i as mergeGuidelineLabels};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
package/dist/types/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AA0E1B,iBAAS,GAAG,sBAgBX;AAED,eAAe,GAAG,CAAC"}
|
package/dist/utils/treeUtils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import{__spreadArray as r}from"../_virtual/_tslib.js";var i=function(n,t,l){if(void 0===l&&(l=[]),!n)return null;var e=r(r([],l,!0),[n.id],!1);if(n.id===t)return e;if(n.children)for(var u=0,f=n.children;u<f.length;u++){var o=f[u],v=i(o,t,e);if(v)return v}return null};export{i as findNodePathById};
|
|
2
2
|
//# sourceMappingURL=treeUtils.js.map
|