unifyedx-storybook-new 0.1.51 → 0.1.53

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.
@@ -51092,6 +51092,47 @@ body.toast-backdrop #ui-toast-backdrop {
51092
51092
  position: relative;
51093
51093
  contain: content;
51094
51094
  }
51095
+ /* FullConfigPage Styles */
51096
+ .full-config-page {
51097
+ padding: 18px;
51098
+ background: #f5f6f8;
51099
+ min-height: 100vh;
51100
+ }
51101
+
51102
+ .full-config-page .icon {
51103
+ display: flex;
51104
+ align-items: center;
51105
+ justify-content: center;
51106
+ }
51107
+
51108
+ .full-config-page .pill {
51109
+ display: inline-block;
51110
+ }
51111
+
51112
+ /* Tab content styling */
51113
+ .full-config-page .tab-content {
51114
+ height: calc(100vh - 200px);
51115
+ overflow-y: auto;
51116
+ }
51117
+
51118
+ /* Custom scrollbar for better UX */
51119
+ .full-config-page ::-webkit-scrollbar {
51120
+ width: 8px;
51121
+ }
51122
+
51123
+ .full-config-page ::-webkit-scrollbar-track {
51124
+ background: #f1f1f1;
51125
+ border-radius: 4px;
51126
+ }
51127
+
51128
+ .full-config-page ::-webkit-scrollbar-thumb {
51129
+ background: #c1c1c1;
51130
+ border-radius: 4px;
51131
+ }
51132
+
51133
+ .full-config-page ::-webkit-scrollbar-thumb:hover {
51134
+ background: #a8a8a8;
51135
+ }
51095
51136
  :root {
51096
51137
  --toastify-color-light: #fff;
51097
51138
  --toastify-color-dark: #121212;
@@ -51892,47 +51933,6 @@ body.toast-backdrop #ui-toast-backdrop {
51892
51933
  transform: rotate(360deg);
51893
51934
  }
51894
51935
  }
51895
- /* FullConfigPage Styles */
51896
- .full-config-page {
51897
- padding: 18px;
51898
- background: #f5f6f8;
51899
- min-height: 100vh;
51900
- }
51901
-
51902
- .full-config-page .icon {
51903
- display: flex;
51904
- align-items: center;
51905
- justify-content: center;
51906
- }
51907
-
51908
- .full-config-page .pill {
51909
- display: inline-block;
51910
- }
51911
-
51912
- /* Tab content styling */
51913
- .full-config-page .tab-content {
51914
- height: calc(100vh - 200px);
51915
- overflow-y: auto;
51916
- }
51917
-
51918
- /* Custom scrollbar for better UX */
51919
- .full-config-page ::-webkit-scrollbar {
51920
- width: 8px;
51921
- }
51922
-
51923
- .full-config-page ::-webkit-scrollbar-track {
51924
- background: #f1f1f1;
51925
- border-radius: 4px;
51926
- }
51927
-
51928
- .full-config-page ::-webkit-scrollbar-thumb {
51929
- background: #c1c1c1;
51930
- border-radius: 4px;
51931
- }
51932
-
51933
- .full-config-page ::-webkit-scrollbar-thumb:hover {
51934
- background: #a8a8a8;
51935
- }
51936
51936
  /* Backdrop below the toast container, above the app content */
51937
51937
  #ui-toast-backdrop {
51938
51938
  position: fixed;
@@ -40978,8 +40978,9 @@ const Select = ({
40978
40978
  placeholder = "Select an option...",
40979
40979
  disabled = false,
40980
40980
  error,
40981
- ref
40981
+ ref,
40982
40982
  // From RHF's <Controller>
40983
+ showSearch = true
40983
40984
  }) => {
40984
40985
  const [query, setQuery] = useState("");
40985
40986
  const filteredOptions = query === "" ? options : options.filter(
@@ -41008,7 +41009,7 @@ const Select = ({
41008
41009
  leaveFrom: "opacity-100",
41009
41010
  leaveTo: "opacity-0",
41010
41011
  children: /* @__PURE__ */ jsxs(ListboxOptions, { className: "select-options", children: [
41011
- /* @__PURE__ */ jsx("div", { className: "search-input-wrapper", children: /* @__PURE__ */ jsx(
41012
+ showSearch && /* @__PURE__ */ jsx("div", { className: "search-input-wrapper", children: /* @__PURE__ */ jsx(
41012
41013
  SearchBar,
41013
41014
  {
41014
41015
  value: query,
@@ -76300,6 +76301,58 @@ function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else i
76300
76301
  function Mt(t){if(typeof document=="undefined")return;let o=document.head||document.getElementsByTagName("head")[0],e=document.createElement("style");e.type="text/css",o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e),e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t));}Mt(`:root{--toastify-color-light: #fff;--toastify-color-dark: #121212;--toastify-color-info: #3498db;--toastify-color-success: #07bc0c;--toastify-color-warning: #f1c40f;--toastify-color-error: hsl(6, 78%, 57%);--toastify-color-transparent: rgba(255, 255, 255, .7);--toastify-icon-color-info: var(--toastify-color-info);--toastify-icon-color-success: var(--toastify-color-success);--toastify-icon-color-warning: var(--toastify-color-warning);--toastify-icon-color-error: var(--toastify-color-error);--toastify-container-width: fit-content;--toastify-toast-width: 320px;--toastify-toast-offset: 16px;--toastify-toast-top: max(var(--toastify-toast-offset), env(safe-area-inset-top));--toastify-toast-right: max(var(--toastify-toast-offset), env(safe-area-inset-right));--toastify-toast-left: max(var(--toastify-toast-offset), env(safe-area-inset-left));--toastify-toast-bottom: max(var(--toastify-toast-offset), env(safe-area-inset-bottom));--toastify-toast-background: #fff;--toastify-toast-padding: 14px;--toastify-toast-min-height: 64px;--toastify-toast-max-height: 800px;--toastify-toast-bd-radius: 6px;--toastify-toast-shadow: 0px 4px 12px rgba(0, 0, 0, .1);--toastify-font-family: sans-serif;--toastify-z-index: 9999;--toastify-text-color-light: #757575;--toastify-text-color-dark: #fff;--toastify-text-color-info: #fff;--toastify-text-color-success: #fff;--toastify-text-color-warning: #fff;--toastify-text-color-error: #fff;--toastify-spinner-color: #616161;--toastify-spinner-color-empty-area: #e0e0e0;--toastify-color-progress-light: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55);--toastify-color-progress-dark: #bb86fc;--toastify-color-progress-info: var(--toastify-color-info);--toastify-color-progress-success: var(--toastify-color-success);--toastify-color-progress-warning: var(--toastify-color-warning);--toastify-color-progress-error: var(--toastify-color-error);--toastify-color-progress-bgo: .2}.Toastify__toast-container{z-index:var(--toastify-z-index);-webkit-transform:translate3d(0,0,var(--toastify-z-index));position:fixed;width:var(--toastify-container-width);box-sizing:border-box;color:#fff;display:flex;flex-direction:column}.Toastify__toast-container--top-left{top:var(--toastify-toast-top);left:var(--toastify-toast-left)}.Toastify__toast-container--top-center{top:var(--toastify-toast-top);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--top-right{top:var(--toastify-toast-top);right:var(--toastify-toast-right);align-items:end}.Toastify__toast-container--bottom-left{bottom:var(--toastify-toast-bottom);left:var(--toastify-toast-left)}.Toastify__toast-container--bottom-center{bottom:var(--toastify-toast-bottom);left:50%;transform:translate(-50%);align-items:center}.Toastify__toast-container--bottom-right{bottom:var(--toastify-toast-bottom);right:var(--toastify-toast-right);align-items:end}.Toastify__toast{--y: 0;position:relative;touch-action:none;width:var(--toastify-toast-width);min-height:var(--toastify-toast-min-height);box-sizing:border-box;margin-bottom:1rem;padding:var(--toastify-toast-padding);border-radius:var(--toastify-toast-bd-radius);box-shadow:var(--toastify-toast-shadow);max-height:var(--toastify-toast-max-height);font-family:var(--toastify-font-family);z-index:0;display:flex;flex:1 auto;align-items:center;word-break:break-word}@media only screen and (max-width: 480px){.Toastify__toast-container{width:100vw;left:env(safe-area-inset-left);margin:0}.Toastify__toast-container--top-left,.Toastify__toast-container--top-center,.Toastify__toast-container--top-right{top:env(safe-area-inset-top);transform:translate(0)}.Toastify__toast-container--bottom-left,.Toastify__toast-container--bottom-center,.Toastify__toast-container--bottom-right{bottom:env(safe-area-inset-bottom);transform:translate(0)}.Toastify__toast-container--rtl{right:env(safe-area-inset-right);left:initial}.Toastify__toast{--toastify-toast-width: 100%;margin-bottom:0;border-radius:0}}.Toastify__toast-container[data-stacked=true]{width:var(--toastify-toast-width)}.Toastify__toast--stacked{position:absolute;width:100%;transform:translate3d(0,var(--y),0) scale(var(--s));transition:transform .3s}.Toastify__toast--stacked[data-collapsed] .Toastify__toast-body,.Toastify__toast--stacked[data-collapsed] .Toastify__close-button{transition:opacity .1s}.Toastify__toast--stacked[data-collapsed=false]{overflow:visible}.Toastify__toast--stacked[data-collapsed=true]:not(:last-child)>*{opacity:0}.Toastify__toast--stacked:after{content:"";position:absolute;left:0;right:0;height:calc(var(--g) * 1px);bottom:100%}.Toastify__toast--stacked[data-pos=top]{top:0}.Toastify__toast--stacked[data-pos=bot]{bottom:0}.Toastify__toast--stacked[data-pos=bot].Toastify__toast--stacked:before{transform-origin:top}.Toastify__toast--stacked[data-pos=top].Toastify__toast--stacked:before{transform-origin:bottom}.Toastify__toast--stacked:before{content:"";position:absolute;left:0;right:0;bottom:0;height:100%;transform:scaleY(3);z-index:-1}.Toastify__toast--rtl{direction:rtl}.Toastify__toast--close-on-click{cursor:pointer}.Toastify__toast-icon{margin-inline-end:10px;width:22px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.5s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light,.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;position:absolute;top:6px;right:6px;background:transparent;outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;z-index:1}.Toastify__toast--rtl .Toastify__close-button{left:6px;right:unset}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:100%;z-index:1;opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right;border-bottom-left-radius:initial}.Toastify__progress-bar--wrp{position:absolute;overflow:hidden;bottom:0;left:0;width:100%;height:5px;border-bottom-left-radius:var(--toastify-toast-bd-radius);border-bottom-right-radius:var(--toastify-toast-bd-radius)}.Toastify__progress-bar--wrp[data-hidden=true]{opacity:0}.Toastify__progress-bar--bg{opacity:var(--toastify-color-progress-bgo);width:100%;height:100%}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(3000px,0,0)}60%{opacity:1;transform:translate3d(-25px,0,0)}75%{transform:translate3d(10px,0,0)}90%{transform:translate3d(-5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px,var(--y),0)}to{opacity:0;transform:translate3d(2000px,var(--y),0)}}@keyframes Toastify__bounceInLeft{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(-3000px,0,0)}60%{opacity:1;transform:translate3d(25px,0,0)}75%{transform:translate3d(-10px,0,0)}90%{transform:translate3d(5px,0,0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px,var(--y),0)}to{opacity:0;transform:translate3d(-2000px,var(--y),0)}}@keyframes Toastify__bounceInUp{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,3000px,0)}60%{opacity:1;transform:translate3d(0,-20px,0)}75%{transform:translate3d(0,10px,0)}90%{transform:translate3d(0,-5px,0)}to{transform:translateZ(0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,-2000px,0)}}@keyframes Toastify__bounceInDown{0%,60%,75%,90%,to{animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;transform:translate3d(0,-3000px,0)}60%{opacity:1;transform:translate3d(0,25px,0)}75%{transform:translate3d(0,-10px,0)}90%{transform:translate3d(0,5px,0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0,calc(var(--y) - 10px),0)}40%,45%{opacity:1;transform:translate3d(0,calc(var(--y) + 20px),0)}to{opacity:0;transform:translate3d(0,2000px,0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{0%{opacity:0;transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{0%{opacity:1}50%{opacity:0;transform:translate3d(0,var(--y),0) scale3d(.3,.3,.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{0%{transform:perspective(400px) rotateX(90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotateX(-20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotateX(10deg);opacity:1}80%{transform:perspective(400px) rotateX(-5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{0%{transform:translate3d(0,var(--y),0) perspective(400px)}30%{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(-20deg);opacity:1}to{transform:translate3d(0,var(--y),0) perspective(400px) rotateX(90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{0%{transform:translate3d(110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInLeft{0%{transform:translate3d(-110%,0,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInUp{0%{transform:translate3d(0,110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideInDown{0%{transform:translate3d(0,-110%,0);visibility:visible}to{transform:translate3d(0,var(--y),0)}}@keyframes Toastify__slideOutRight{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(110%,var(--y),0)}}@keyframes Toastify__slideOutLeft{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(-110%,var(--y),0)}}@keyframes Toastify__slideOutDown{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,500px,0)}}@keyframes Toastify__slideOutUp{0%{transform:translate3d(0,var(--y),0)}to{visibility:hidden;transform:translate3d(0,-500px,0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp;animation-timing-function:ease-in;animation-duration:.3s}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown;animation-timing-function:ease-in;animation-duration:.3s}@keyframes Toastify__spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}
76301
76302
  `);var L=t=>typeof t=="number"&&!isNaN(t),N=t=>typeof t=="string",P=t=>typeof t=="function",mt=t=>N(t)||L(t),B=t=>N(t)||P(t)?t:null,pt=(t,o)=>t===false||L(t)&&t>0?t:o,z=t=>isValidElement(t)||N(t)||P(t)||L(t);function Z(t,o,e=300){let{scrollHeight:r,style:s}=t;requestAnimationFrame(()=>{s.minHeight="initial",s.height=r+"px",s.transition=`all ${e}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(o,e);});});}function $({enter:t,exit:o,appendPosition:e=false,collapse:r=true,collapseDuration:s=300}){return function({children:a,position:d,preventExitTransition:c,done:T,nodeRef:g,isIn:v,playToast:x}){let C=e?`${t}--${d}`:t,S=e?`${o}--${d}`:o,E=useRef(0);return useLayoutEffect(()=>{let f=g.current,p=C.split(" "),b=n=>{n.target===g.current&&(x(),f.removeEventListener("animationend",b),f.removeEventListener("animationcancel",b),E.current===0&&n.type!=="animationcancel"&&f.classList.remove(...p));};(()=>{f.classList.add(...p),f.addEventListener("animationend",b),f.addEventListener("animationcancel",b);})();},[]),useEffect(()=>{let f=g.current,p=()=>{f.removeEventListener("animationend",p),r?Z(f,T,s):T();};v||(c?p():(()=>{E.current=1,f.className+=` ${S}`,f.addEventListener("animationend",p);})());},[v]),React__default.createElement(React__default.Fragment,null,a)}}function J(t,o){return {content:tt(t.content,t.props),containerId:t.props.containerId,id:t.props.toastId,theme:t.props.theme,type:t.props.type,data:t.props.data||{},isLoading:t.props.isLoading,icon:t.props.icon,reason:t.removalReason,status:o}}function tt(t,o,e=false){return isValidElement(t)&&!N(t.type)?cloneElement(t,{closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):P(t)?t({closeToast:o.closeToast,toastProps:o,data:o.data,isPaused:e}):t}function yt({closeToast:t,theme:o,ariaLabel:e="close"}){return React__default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${o}`,type:"button",onClick:r=>{r.stopPropagation(),t(true);},"aria-label":e},React__default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},React__default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function gt({delay:t,isRunning:o,closeToast:e,type:r="default",hide:s,className:l,controlledProgress:a,progress:d,rtl:c,isIn:T,theme:g}){let v=s||a&&d===0,x={animationDuration:`${t}ms`,animationPlayState:o?"running":"paused"};a&&(x.transform=`scaleX(${d})`);let C=clsx("Toastify__progress-bar",a?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${r}`,{["Toastify__progress-bar--rtl"]:c}),S=P(l)?l({rtl:c,type:r,defaultClassName:C}):clsx(C,l),E={[a&&d>=1?"onTransitionEnd":"onAnimationEnd"]:a&&d<1?null:()=>{T&&e();}};return React__default.createElement("div",{className:"Toastify__progress-bar--wrp","data-hidden":v},React__default.createElement("div",{className:`Toastify__progress-bar--bg Toastify__progress-bar-theme--${g} Toastify__progress-bar--${r}`}),React__default.createElement("div",{role:"progressbar","aria-hidden":v?"true":"false","aria-label":"notification timer",className:S,style:x,...E}))}var Xt=1,at=()=>`${Xt++}`;function _t(t,o,e){let r=1,s=0,l=[],a=[],d=o,c=new Map,T=new Set,g=i=>(T.add(i),()=>T.delete(i)),v=()=>{a=Array.from(c.values()),T.forEach(i=>i());},x=({containerId:i,toastId:n,updateId:u})=>{let h=i?i!==t:t!==1,m=c.has(n)&&u==null;return h||m},C=(i,n)=>{c.forEach(u=>{var h;(n==null||n===u.props.toastId)&&((h=u.toggle)==null||h.call(u,i));});},S=i=>{var n,u;(u=(n=i.props)==null?void 0:n.onClose)==null||u.call(n,i.removalReason),i.isActive=false;},E=i=>{if(i==null)c.forEach(S);else {let n=c.get(i);n&&S(n);}v();},f=()=>{s-=l.length,l=[];},p=i=>{var m,_;let{toastId:n,updateId:u}=i.props,h=u==null;i.staleId&&c.delete(i.staleId),i.isActive=true,c.set(n,i),v(),e(J(i,h?"added":"updated")),h&&((_=(m=i.props).onOpen)==null||_.call(m));};return {id:t,props:d,observe:g,toggle:C,removeToast:E,toasts:c,clearQueue:f,buildToast:(i,n)=>{if(x(n))return;let{toastId:u,updateId:h,data:m,staleId:_,delay:k}=n,M=h==null;M&&s++;let A={...d,style:d.toastStyle,key:r++,...Object.fromEntries(Object.entries(n).filter(([D,Y])=>Y!=null)),toastId:u,updateId:h,data:m,isIn:false,className:B(n.className||d.toastClassName),progressClassName:B(n.progressClassName||d.progressClassName),autoClose:n.isLoading?false:pt(n.autoClose,d.autoClose),closeToast(D){c.get(u).removalReason=D,E(u);},deleteToast(){let D=c.get(u);if(D!=null){if(e(J(D,"removed")),c.delete(u),s--,s<0&&(s=0),l.length>0){p(l.shift());return}v();}}};A.closeButton=d.closeButton,n.closeButton===false||z(n.closeButton)?A.closeButton=n.closeButton:n.closeButton===true&&(A.closeButton=z(d.closeButton)?d.closeButton:true);let R={content:i,props:A,staleId:_};d.limit&&d.limit>0&&s>d.limit&&M?l.push(R):L(k)?setTimeout(()=>{p(R);},k):p(R);},setProps(i){d=i;},setToggle:(i,n)=>{let u=c.get(i);u&&(u.toggle=n);},isToastActive:i=>{var n;return (n=c.get(i))==null?void 0:n.isActive},getSnapshot:()=>a}}var I=new Map,F=[],st=new Set,Vt=t=>st.forEach(o=>o(t)),bt=()=>I.size>0;function Qt(){F.forEach(t=>nt(t.content,t.options)),F=[];}var vt=(t,{containerId:o})=>{var e;return (e=I.get(o||1))==null?void 0:e.toasts.get(t)};function X(t,o){var r;if(o)return !!((r=I.get(o))!=null&&r.isToastActive(t));let e=false;return I.forEach(s=>{s.isToastActive(t)&&(e=true);}),e}function ht(t){if(!bt()){F=F.filter(o=>t!=null&&o.options.toastId!==t);return}if(t==null||mt(t))I.forEach(o=>{o.removeToast(t);});else if(t&&("containerId"in t||"id"in t)){let o=I.get(t.containerId);o?o.removeToast(t.id):I.forEach(e=>{e.removeToast(t.id);});}}var Ct=(t={})=>{I.forEach(o=>{o.props.limit&&(!t.containerId||o.id===t.containerId)&&o.clearQueue();});};function nt(t,o){z(t)&&(bt()||F.push({content:t,options:o}),I.forEach(e=>{e.buildToast(t,o);}));}function xt(t){var o;(o=I.get(t.containerId||1))==null||o.setToggle(t.id,t.fn);}function rt(t,o){I.forEach(e=>{(o==null||!(o!=null&&o.containerId)||(o==null?void 0:o.containerId)===e.id)&&e.toggle(t,o==null?void 0:o.id);});}function Et(t){let o=t.containerId||1;return {subscribe(e){let r=_t(o,t,Vt);I.set(o,r);let s=r.observe(e);return Qt(),()=>{s(),I.delete(o);}},setProps(e){var r;(r=I.get(o))==null||r.setProps(e);},getSnapshot(){var e;return (e=I.get(o))==null?void 0:e.getSnapshot()}}}function Pt(t){return st.add(t),()=>{st.delete(t);}}function Wt(t){return t&&(N(t.toastId)||L(t.toastId))?t.toastId:at()}function U(t,o){return nt(t,o),o.toastId}function V(t,o){return {...o,type:o&&o.type||t,toastId:Wt(o)}}function Q(t){return (o,e)=>U(o,V(t,e))}function y(t,o){return U(t,V("default",o))}y.loading=(t,o)=>U(t,V("default",{isLoading:true,autoClose:false,closeOnClick:false,closeButton:false,draggable:false,...o}));function Gt(t,{pending:o,error:e,success:r},s){let l;o&&(l=N(o)?y.loading(o,s):y.loading(o.render,{...s,...o}));let a={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},d=(T,g,v)=>{if(g==null){y.dismiss(l);return}let x={type:T,...a,...s,data:v},C=N(g)?{render:g}:g;return l?y.update(l,{...x,...C}):y(C.render,{...x,...C}),v},c=P(t)?t():t;return c.then(T=>d("success",r,T)).catch(T=>d("error",e,T)),c}y.promise=Gt;y.success=Q("success");y.info=Q("info");y.error=Q("error");y.warning=Q("warning");y.warn=y.warning;y.dark=(t,o)=>U(t,V("default",{theme:"dark",...o}));function qt(t){ht(t);}y.dismiss=qt;y.clearWaitingQueue=Ct;y.isActive=X;y.update=(t,o={})=>{let e=vt(t,o);if(e){let{props:r,content:s}=e,l={delay:100,...r,...o,toastId:o.toastId||t,updateId:at()};l.toastId!==t&&(l.staleId=t);let a=l.render||s;delete l.render,U(a,l);}};y.done=t=>{y.update(t,{progress:1});};y.onChange=Pt;y.play=t=>rt(true,t);y.pause=t=>rt(false,t);function It(t){var a;let{subscribe:o,getSnapshot:e,setProps:r}=useRef(Et(t)).current;r(t);let s=(a=useSyncExternalStore(o,e,e))==null?void 0:a.slice();function l(d){if(!s)return [];let c=new Map;return t.newestOnTop&&s.reverse(),s.forEach(T=>{let{position:g}=T.props;c.has(g)||c.set(g,[]),c.get(g).push(T);}),Array.from(c,T=>d(T[0],T[1]))}return {getToastToRender:l,isToastActive:X,count:s==null?void 0:s.length}}function At(t){let[o,e]=useState(false),[r,s]=useState(false),l=useRef(null),a=useRef({start:0,delta:0,removalDistance:0,canCloseOnClick:true,canDrag:false,didMove:false}).current,{autoClose:d,pauseOnHover:c,closeToast:T,onClick:g,closeOnClick:v}=t;xt({id:t.toastId,containerId:t.containerId,fn:e}),useEffect(()=>{if(t.pauseOnFocusLoss)return x(),()=>{C();}},[t.pauseOnFocusLoss]);function x(){document.hasFocus()||p(),window.addEventListener("focus",f),window.addEventListener("blur",p);}function C(){window.removeEventListener("focus",f),window.removeEventListener("blur",p);}function S(m){if(t.draggable===true||t.draggable===m.pointerType){b();let _=l.current;a.canCloseOnClick=true,a.canDrag=true,_.style.transition="none",t.draggableDirection==="x"?(a.start=m.clientX,a.removalDistance=_.offsetWidth*(t.draggablePercent/100)):(a.start=m.clientY,a.removalDistance=_.offsetHeight*(t.draggablePercent===80?t.draggablePercent*1.5:t.draggablePercent)/100);}}function E(m){let{top:_,bottom:k,left:M,right:A}=l.current.getBoundingClientRect();m.nativeEvent.type!=="touchend"&&t.pauseOnHover&&m.clientX>=M&&m.clientX<=A&&m.clientY>=_&&m.clientY<=k?p():f();}function f(){e(true);}function p(){e(false);}function b(){a.didMove=false,document.addEventListener("pointermove",n),document.addEventListener("pointerup",u);}function i(){document.removeEventListener("pointermove",n),document.removeEventListener("pointerup",u);}function n(m){let _=l.current;if(a.canDrag&&_){a.didMove=true,o&&p(),t.draggableDirection==="x"?a.delta=m.clientX-a.start:a.delta=m.clientY-a.start,a.start!==m.clientX&&(a.canCloseOnClick=false);let k=t.draggableDirection==="x"?`${a.delta}px, var(--y)`:`0, calc(${a.delta}px + var(--y))`;_.style.transform=`translate3d(${k},0)`,_.style.opacity=`${1-Math.abs(a.delta/a.removalDistance)}`;}}function u(){i();let m=l.current;if(a.canDrag&&a.didMove&&m){if(a.canDrag=false,Math.abs(a.delta)>a.removalDistance){s(true),t.closeToast(true),t.collapseAll();return}m.style.transition="transform 0.2s, opacity 0.2s",m.style.removeProperty("transform"),m.style.removeProperty("opacity");}}let h={onPointerDown:S,onPointerUp:E};return d&&c&&(h.onMouseEnter=p,t.stacked||(h.onMouseLeave=f)),v&&(h.onClick=m=>{g&&g(m),a.canCloseOnClick&&T(true);}),{playToast:f,pauseToast:p,isRunning:o,preventExitTransition:r,toastRef:l,eventHandlers:h}}var Ot=typeof window!="undefined"?useLayoutEffect:useEffect;var G=({theme:t,type:o,isLoading:e,...r})=>React__default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:t==="colored"?"currentColor":`var(--toastify-icon-color-${o})`,...r});function ao(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))}function so(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))}function no(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))}function ro(t){return React__default.createElement(G,{...t},React__default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))}function io(){return React__default.createElement("div",{className:"Toastify__spinner"})}var W={info:so,warning:ao,success:no,error:ro,spinner:io},lo=t=>t in W;function Nt({theme:t,type:o,isLoading:e,icon:r}){let s=null,l={theme:t,type:o};return r===false||(P(r)?s=r({...l,isLoading:e}):isValidElement(r)?s=cloneElement(r,l):e?s=W.spinner():lo(o)&&(s=W[o](l))),s}var wt=t=>{let{isRunning:o,preventExitTransition:e,toastRef:r,eventHandlers:s,playToast:l}=At(t),{closeButton:a,children:d,autoClose:c,onClick:T,type:g,hideProgressBar:v,closeToast:x,transition:C,position:S,className:E,style:f,progressClassName:p,updateId:b,role:i,progress:n,rtl:u,toastId:h,deleteToast:m,isIn:_,isLoading:k,closeOnClick:M,theme:A,ariaLabel:R}=t,D=clsx("Toastify__toast",`Toastify__toast-theme--${A}`,`Toastify__toast--${g}`,{["Toastify__toast--rtl"]:u},{["Toastify__toast--close-on-click"]:M}),Y=P(E)?E({rtl:u,position:S,type:g,defaultClassName:D}):clsx(D,E),ft=Nt(t),dt=!!n||!c,j={closeToast:x,type:g,theme:A},H=null;return a===false||(P(a)?H=a(j):isValidElement(a)?H=cloneElement(a,j):H=yt(j)),React__default.createElement(C,{isIn:_,done:m,position:S,preventExitTransition:e,nodeRef:r,playToast:l},React__default.createElement("div",{id:h,tabIndex:0,onClick:T,"data-in":_,className:Y,...s,style:f,ref:r,..._&&{role:i,"aria-label":R}},ft!=null&&React__default.createElement("div",{className:clsx("Toastify__toast-icon",{["Toastify--animate-icon Toastify__zoom-enter"]:!k})},ft),tt(d,t,!o),H,!t.customProgressBar&&React__default.createElement(gt,{...b&&!dt?{key:`p-${b}`}:{},rtl:u,theme:A,delay:c,isRunning:o,isIn:_,closeToast:x,hide:v,type:g,className:p,controlledProgress:dt,progress:n||0})))};var K=(t,o=false)=>({enter:`Toastify--animate Toastify__${t}-enter`,exit:`Toastify--animate Toastify__${t}-exit`,appendPosition:o}),lt=$(K("bounce",true)),mo=$(K("slide",true));var _o={position:"top-right",transition:lt,autoClose:5e3,closeButton:true,pauseOnHover:true,pauseOnFocusLoss:true,draggable:"touch",draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light","aria-label":"Notifications Alt+T",hotKeys:t=>t.altKey&&t.code==="KeyT"};function Lt(t){let o={..._o,...t},e=t.stacked,[r,s]=useState(true),l=useRef(null),{getToastToRender:a,isToastActive:d,count:c}=It(o),{className:T,style:g,rtl:v,containerId:x,hotKeys:C}=o;function S(f){let p=clsx("Toastify__toast-container",`Toastify__toast-container--${f}`,{["Toastify__toast-container--rtl"]:v});return P(T)?T({position:f,rtl:v,defaultClassName:p}):clsx(p,B(T))}function E(){e&&(s(true),y.play());}return Ot(()=>{var f;if(e){let p=l.current.querySelectorAll('[data-in="true"]'),b=12,i=(f=o.position)==null?void 0:f.includes("top"),n=0,u=0;Array.from(p).reverse().forEach((h,m)=>{let _=h;_.classList.add("Toastify__toast--stacked"),m>0&&(_.dataset.collapsed=`${r}`),_.dataset.pos||(_.dataset.pos=i?"top":"bot");let k=n*(r?.2:1)+(r?0:b*m);_.style.setProperty("--y",`${i?k:k*-1}px`),_.style.setProperty("--g",`${b}`),_.style.setProperty("--s",`${1-(r?u:0)}`),n+=_.offsetHeight,u+=.025;});}},[r,c,e]),useEffect(()=>{function f(p){var i;let b=l.current;C(p)&&((i=b.querySelector('[tabIndex="0"]'))==null||i.focus(),s(false),y.pause()),p.key==="Escape"&&(document.activeElement===b||b!=null&&b.contains(document.activeElement))&&(s(true),y.play());}return document.addEventListener("keydown",f),()=>{document.removeEventListener("keydown",f);}},[C]),React__default.createElement("section",{ref:l,className:"Toastify",id:x,onMouseEnter:()=>{e&&(s(false),y.pause());},onMouseLeave:E,"aria-live":"polite","aria-atomic":"false","aria-relevant":"additions text","aria-label":o["aria-label"]},a((f,p)=>{let b=p.length?{...g}:{...g,pointerEvents:"none"};return React__default.createElement("div",{tabIndex:-1,className:S(f),"data-stacked":e,style:b,key:`c-${f}`},p.map(({content:i,props:n})=>React__default.createElement(wt,{...n,stacked:e,collapseAll:E,isIn:d(n.toastId,n.containerId),key:`t-${n.key}`},i)))}))}
76302
76303
 
76304
+ const defaults = {
76305
+ containerId: "ui-toast",
76306
+ position: "bottom-right",
76307
+ autoClose: 3500,
76308
+ hideProgressBar: true,
76309
+ pauseOnFocusLoss: false,
76310
+ closeOnClick: true
76311
+ };
76312
+ let backdropCount = 0;
76313
+ const addBackdrop = () => {
76314
+ if (typeof document === "undefined") return;
76315
+ backdropCount += 1;
76316
+ document.body.classList.add("toast-backdrop");
76317
+ };
76318
+ const removeBackdrop = () => {
76319
+ if (typeof document === "undefined") return;
76320
+ backdropCount = Math.max(0, backdropCount - 1);
76321
+ if (backdropCount === 0) document.body.classList.remove("toast-backdrop");
76322
+ };
76323
+ const notify = {
76324
+ success: (msg, opts) => y.success(msg, { ...defaults, ...opts }),
76325
+ info: (msg, opts) => y.info(msg, { ...defaults, ...opts }),
76326
+ warn: (msg, opts) => y.warn(msg, { ...defaults, ...opts }),
76327
+ // Error: no autoClose + modal-like behavior via backdrop
76328
+ error: (msg, opts) => y.error(msg, {
76329
+ ...defaults,
76330
+ autoClose: false,
76331
+ closeOnClick: false,
76332
+ draggable: false,
76333
+ onOpen: addBackdrop,
76334
+ onClose: removeBackdrop,
76335
+ ...opts
76336
+ }),
76337
+ // Promise helper (error branch inherits the modal behavior)
76338
+ promise: (p, messages, opts) => y.promise(
76339
+ p,
76340
+ {
76341
+ pending: messages?.pending,
76342
+ success: messages?.success,
76343
+ error: {
76344
+ render: () => messages?.error || "Something went wrong.",
76345
+ autoClose: false,
76346
+ closeOnClick: false,
76347
+ draggable: false,
76348
+ onOpen: addBackdrop,
76349
+ onClose: removeBackdrop
76350
+ }
76351
+ },
76352
+ { ...defaults, ...opts }
76353
+ )
76354
+ };
76355
+
76303
76356
  const getApiEndpoint = (path) => {
76304
76357
  try {
76305
76358
  return `${getBaseUrl()}${gateWayUrl()}${path}`;
@@ -76402,7 +76455,7 @@ const ManageCollectionList = ({
76402
76455
  onCollectionChange?.(newData);
76403
76456
  return newData;
76404
76457
  });
76405
- y.success("Collection created successfully");
76458
+ notify.success("Collection created successfully");
76406
76459
  }
76407
76460
  } else {
76408
76461
  const resp = await axiosPut(
@@ -76830,13 +76883,7 @@ function DynamicConfig({
76830
76883
  } else {
76831
76884
  errorMessage = error.message || "An unexpected error occurred while loading configuration.";
76832
76885
  }
76833
- y.error(errorMessage, {
76834
- autoClose: 6e3,
76835
- hideProgressBar: false,
76836
- closeOnClick: true,
76837
- pauseOnHover: true,
76838
- draggable: true
76839
- });
76886
+ notify.error(errorMessage);
76840
76887
  initializeEmptyData();
76841
76888
  } finally {
76842
76889
  setLoading(false);
@@ -76910,31 +76957,20 @@ function DynamicConfig({
76910
76957
  const errors = validateRequiredFields();
76911
76958
  setValidationErrors(errors);
76912
76959
  if (hasValidationErrors(errors)) {
76913
- let errorCount = 0;
76914
76960
  let errorDetails = [];
76915
76961
  Object.keys(errors).forEach((sectionKey) => {
76916
76962
  if (typeof errors[sectionKey] === "object") {
76917
76963
  Object.keys(errors[sectionKey]).forEach((itemKey) => {
76918
76964
  if (typeof errors[sectionKey][itemKey] === "object") {
76919
76965
  Object.keys(errors[sectionKey][itemKey]).forEach((fieldKey) => {
76920
- errorCount++;
76921
76966
  errorDetails.push(`${sectionKey} row ${parseInt(itemKey) + 1}: ${errors[sectionKey][itemKey][fieldKey]}`);
76922
76967
  });
76923
76968
  } else {
76924
- errorCount++;
76925
76969
  errorDetails.push(`${sectionKey}: ${errors[sectionKey][itemKey]}`);
76926
76970
  }
76927
76971
  });
76928
76972
  }
76929
76973
  });
76930
- const errorMessage = errorCount === 1 ? "Please fill in the required field before saving" : `Please fill in all ${errorCount} required fields before saving`;
76931
- y.error(errorMessage, {
76932
- autoClose: 6e3,
76933
- hideProgressBar: false,
76934
- closeOnClick: true,
76935
- pauseOnHover: true,
76936
- draggable: true
76937
- });
76938
76974
  return;
76939
76975
  }
76940
76976
  const saveData = async () => {
@@ -76972,13 +77008,7 @@ function DynamicConfig({
76972
77008
  if (response && response.data?.status != "fail") {
76973
77009
  setValidationErrors({});
76974
77010
  const successMessage = response.message || "Configuration has been saved successfully";
76975
- y.success(successMessage, {
76976
- autoClose: 4e3,
76977
- hideProgressBar: false,
76978
- closeOnClick: true,
76979
- pauseOnHover: true,
76980
- draggable: true
76981
- });
77011
+ notify.success(successMessage);
76982
77012
  } else {
76983
77013
  throw new Error("No response received from server");
76984
77014
  }
@@ -77005,13 +77035,7 @@ function DynamicConfig({
77005
77035
  } else {
77006
77036
  errorMessage = error.message || "An unexpected error occurred while saving.";
77007
77037
  }
77008
- y.error(errorMessage, {
77009
- autoClose: 8e3,
77010
- hideProgressBar: false,
77011
- closeOnClick: true,
77012
- pauseOnHover: true,
77013
- draggable: true
77014
- });
77038
+ notify.error(errorMessage);
77015
77039
  } finally {
77016
77040
  setSaving(false);
77017
77041
  }
@@ -77035,33 +77059,10 @@ function DynamicConfig({
77035
77059
  setValidationErrors({});
77036
77060
  setData(null);
77037
77061
  setReload((prev) => prev + 1);
77038
- y.info("Configuration changes cancelled", {
77039
- autoClose: 2e3,
77040
- hideProgressBar: false,
77041
- closeOnClick: true,
77042
- pauseOnHover: true,
77043
- draggable: true
77044
- });
77062
+ notify.info("Configuration changes cancelled");
77045
77063
  };
77046
77064
  if (!config?.configuration && !configdata?.configuration) {
77047
- return /* @__PURE__ */ jsxs("div", { className: "min-h-screen flex items-center justify-center", children: [
77048
- /* @__PURE__ */ jsx("div", { className: "text-gray-500", children: "No configuration available" }),
77049
- /* @__PURE__ */ jsx(
77050
- Lt,
77051
- {
77052
- position: "top-right",
77053
- autoClose: 5e3,
77054
- hideProgressBar: false,
77055
- newestOnTop: false,
77056
- closeOnClick: true,
77057
- rtl: false,
77058
- pauseOnFocusLoss: true,
77059
- draggable: true,
77060
- pauseOnHover: true,
77061
- theme: "light"
77062
- }
77063
- )
77064
- ] });
77065
+ return /* @__PURE__ */ jsx("div", { className: "min-h-screen flex items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "text-gray-500", children: "No configuration available" }) });
77065
77066
  }
77066
77067
  const configurationSections = configdata?.configuration || config?.configuration;
77067
77068
  useEffect(() => {
@@ -77119,25 +77120,180 @@ function DynamicConfig({
77119
77120
  type: "submit"
77120
77121
  }
77121
77122
  )
77123
+ ] })
77124
+ ] });
77125
+ }
77126
+
77127
+ const FullConfigPage = ({
77128
+ config,
77129
+ appid = "default-app",
77130
+ disableApi = false
77131
+ }) => {
77132
+ const [activeTab, setActiveTab] = useState(0);
77133
+ const [showCancelModal, setShowCancelModal] = useState(false);
77134
+ const {
77135
+ pageHeader = {},
77136
+ appletHeader = {},
77137
+ breadcrumb = [],
77138
+ overview = {},
77139
+ configuration = []
77140
+ } = config;
77141
+ const defaultPageHeader = {
77142
+ heading: "App Details",
77143
+ subHeading: "View app details and customize configurations to align with institutional requirements.",
77144
+ isLeftArrow: true,
77145
+ onBackClick: () => window.history.back(),
77146
+ ...pageHeader
77147
+ };
77148
+ const breadcrumbItems = breadcrumb.map((item) => ({
77149
+ label: item.text,
77150
+ href: item.href || "#"
77151
+ }));
77152
+ const handleCancelRequest = useCallback(() => {
77153
+ console.log("handleCancelRequest called - showing modal");
77154
+ setShowCancelModal(true);
77155
+ }, []);
77156
+ const handleCancelConfirm = useCallback((result) => {
77157
+ setShowCancelModal(false);
77158
+ if (result.primary) {
77159
+ console.log("User confirmed cancel - navigating back");
77160
+ window.history.back();
77161
+ } else {
77162
+ console.log("User cancelled the cancel action - modal closed, data preserved");
77163
+ }
77164
+ }, []);
77165
+ const defaultAppletHeader = {
77166
+ heading: "Application",
77167
+ subHeading: "Application configuration and details",
77168
+ tags: [],
77169
+ ...appletHeader
77170
+ };
77171
+ const defaultOverview = {
77172
+ about: "This application provides comprehensive functionality for your organization.",
77173
+ images: {
77174
+ desktop: "https://via.placeholder.com/600x400?text=Desktop+View",
77175
+ mobile1: "https://via.placeholder.com/200x400?text=Mobile+View+1",
77176
+ mobile2: "https://via.placeholder.com/200x400?text=Mobile+View+2"
77177
+ },
77178
+ features: [
77179
+ {
77180
+ title: "Feature 1",
77181
+ description: "Description of feature 1"
77182
+ },
77183
+ {
77184
+ title: "Feature 2",
77185
+ description: "Description of feature 2"
77186
+ }
77187
+ ],
77188
+ ...overview
77189
+ };
77190
+ const tabs = [
77191
+ { label: "Overview", content: renderOverview(defaultOverview) },
77192
+ { label: "Configuration", content: /* @__PURE__ */ jsx(DynamicConfig, { appid, configdata: { configuration }, disableApi, onCancel: handleCancelRequest }) }
77193
+ ];
77194
+ function renderIcon(icon) {
77195
+ if (!icon) {
77196
+ return "📱";
77197
+ }
77198
+ if (icon.includes("<svg")) {
77199
+ return /* @__PURE__ */ jsx("div", { dangerouslySetInnerHTML: { __html: icon } });
77200
+ }
77201
+ return icon;
77202
+ }
77203
+ function renderOverview(overviewData) {
77204
+ return /* @__PURE__ */ jsxs("div", { className: "bg-white rounded-2xl p-1", children: [
77205
+ /* @__PURE__ */ jsxs("section", { className: "mb-8", children: [
77206
+ /* @__PURE__ */ jsx("h2", { className: "text-xl font-semibold mb-2", children: "About" }),
77207
+ /* @__PURE__ */ jsx("p", { className: "text-gray-700 text-base", children: overviewData.about })
77208
+ ] }),
77209
+ /* @__PURE__ */ jsxs("section", { className: "flex flex-row gap-6 justify-center items-center mb-8", children: [
77210
+ /* @__PURE__ */ jsx(
77211
+ "img",
77212
+ {
77213
+ src: overviewData.images.desktop,
77214
+ alt: "Desktop View",
77215
+ className: "rounded-xl border border-gray-200 w-[340px] h-[220px] object-cover"
77216
+ }
77217
+ ),
77218
+ /* @__PURE__ */ jsx(
77219
+ "img",
77220
+ {
77221
+ src: overviewData.images.mobile1,
77222
+ alt: "Mobile View 1",
77223
+ className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
77224
+ }
77225
+ ),
77226
+ /* @__PURE__ */ jsx(
77227
+ "img",
77228
+ {
77229
+ src: overviewData.images.mobile2,
77230
+ alt: "Mobile View 2",
77231
+ className: "rounded-2xl border border-gray-200 w-[120px] h-[220px] object-cover"
77232
+ }
77233
+ )
77234
+ ] }),
77235
+ /* @__PURE__ */ jsxs("section", { children: [
77236
+ /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold mb-4", children: "Key Features" }),
77237
+ /* @__PURE__ */ jsx("ul", { className: "space-y-3", children: overviewData.features.map((feature, index) => /* @__PURE__ */ jsxs("li", { children: [
77238
+ /* @__PURE__ */ jsx("span", { className: "font-semibold", children: feature.title }),
77239
+ /* @__PURE__ */ jsx("br", {}),
77240
+ /* @__PURE__ */ jsx("span", { className: "text-gray-700", children: feature.description })
77241
+ ] }, index)) })
77242
+ ] })
77243
+ ] });
77244
+ }
77245
+ return /* @__PURE__ */ jsxs("div", { className: "full-config-page", children: [
77246
+ /* @__PURE__ */ jsx(
77247
+ PageHeader,
77248
+ {
77249
+ heading: defaultPageHeader.heading,
77250
+ subHeading: breadcrumbItems.length > 0 ? void 0 : defaultPageHeader.subHeading,
77251
+ breadcrumbItems,
77252
+ isLeftArrow: defaultPageHeader.isLeftArrow,
77253
+ onBackClick: defaultPageHeader.onBackClick
77254
+ }
77255
+ ),
77256
+ /* @__PURE__ */ jsxs("div", { className: "bg-[#ffffff] border border-[#eef2f6] rounded-[12px] px-6 py-5 flex gap-4 items-start mb-4 shadow-sm", children: [
77257
+ /* @__PURE__ */ jsx("div", { className: "icon w-[72px] h-[72px] rounded-full flex items-center justify-center bg-[#F5F5F6] text-[#1C274C] font-bold text-[18px]", children: renderIcon(defaultAppletHeader.icon) }),
77258
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-col min-w-0", children: [
77259
+ /* @__PURE__ */ jsx("h2", { className: "text-[24px] font-semibold m-0 leading-tight truncate", children: defaultAppletHeader.heading }),
77260
+ /* @__PURE__ */ jsx("p", { className: "text-[13px] text-[#101112] mt-1 mb-0 max-w-[800px] leading-normal", children: defaultAppletHeader.subHeading }),
77261
+ /* @__PURE__ */ jsx("div", { className: "mt-2 flex flex-wrap gap-2", children: defaultAppletHeader.tags && defaultAppletHeader.tags.map((tag, index) => /* @__PURE__ */ jsx(
77262
+ "span",
77263
+ {
77264
+ className: "pill inline-block px-[10px] py-[6px] rounded-[14px] text-[11px] border border-[#e6e9ee] text-[#767676] font-semibold mt-1",
77265
+ children: tag
77266
+ },
77267
+ index
77268
+ )) })
77269
+ ] })
77270
+ ] }),
77271
+ /* @__PURE__ */ jsxs("div", { className: "bg-white border border-gray-300 rounded-2xl w-full mt-5 ", children: [
77272
+ /* @__PURE__ */ jsx("div", { className: "border-b border-gray-200", children: /* @__PURE__ */ jsx("nav", { className: "flex space-x-8", "aria-label": "Tabs", children: tabs.map((tab, index) => /* @__PURE__ */ jsx(
77273
+ "button",
77274
+ {
77275
+ onClick: () => setActiveTab(index),
77276
+ className: `${activeTab === index ? "border-black text-black" : "border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"} whitespace-nowrap py-3 px-6 border-b-2 font-medium text-sm transition-colors duration-200`,
77277
+ children: tab.label
77278
+ },
77279
+ index
77280
+ )) }) }),
77281
+ /* @__PURE__ */ jsx("div", { className: "p-8 h-full overflow-y-auto", children: tabs[activeTab].content })
77122
77282
  ] }),
77123
77283
  /* @__PURE__ */ jsx(
77124
- Lt,
77284
+ Modal,
77125
77285
  {
77126
- position: "top-right",
77127
- autoClose: 5e3,
77128
- hideProgressBar: false,
77129
- newestOnTop: false,
77130
- closeOnClick: true,
77131
- rtl: false,
77132
- pauseOnFocusLoss: true,
77133
- draggable: true,
77134
- pauseOnHover: true,
77135
- theme: "light",
77136
- style: { zIndex: 9999 }
77286
+ isOpen: showCancelModal,
77287
+ onClose: handleCancelConfirm,
77288
+ variant: "warning",
77289
+ title: "Are you sure you want to cancel?",
77290
+ primaryButtonText: "Proceed",
77291
+ secondaryButtonText: "Cancel",
77292
+ children: "Your unsaved changes will be lost if you proceed."
77137
77293
  }
77138
77294
  )
77139
77295
  ] });
77140
- }
77296
+ };
77141
77297
 
77142
77298
  function ToastProvider({ children }) {
77143
77299
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -77165,58 +77321,6 @@ function ToastProvider({ children }) {
77165
77321
  ] });
77166
77322
  }
77167
77323
 
77168
- const defaults = {
77169
- containerId: "ui-toast",
77170
- position: "bottom-right",
77171
- autoClose: 3500,
77172
- hideProgressBar: true,
77173
- pauseOnFocusLoss: false,
77174
- closeOnClick: true
77175
- };
77176
- let backdropCount = 0;
77177
- const addBackdrop = () => {
77178
- if (typeof document === "undefined") return;
77179
- backdropCount += 1;
77180
- document.body.classList.add("toast-backdrop");
77181
- };
77182
- const removeBackdrop = () => {
77183
- if (typeof document === "undefined") return;
77184
- backdropCount = Math.max(0, backdropCount - 1);
77185
- if (backdropCount === 0) document.body.classList.remove("toast-backdrop");
77186
- };
77187
- const notify = {
77188
- success: (msg, opts) => y.success(msg, { ...defaults, ...opts }),
77189
- info: (msg, opts) => y.info(msg, { ...defaults, ...opts }),
77190
- warn: (msg, opts) => y.warn(msg, { ...defaults, ...opts }),
77191
- // Error: no autoClose + modal-like behavior via backdrop
77192
- error: (msg, opts) => y.error(msg, {
77193
- ...defaults,
77194
- autoClose: false,
77195
- closeOnClick: false,
77196
- draggable: false,
77197
- onOpen: addBackdrop,
77198
- onClose: removeBackdrop,
77199
- ...opts
77200
- }),
77201
- // Promise helper (error branch inherits the modal behavior)
77202
- promise: (p, messages, opts) => y.promise(
77203
- p,
77204
- {
77205
- pending: messages?.pending,
77206
- success: messages?.success,
77207
- error: {
77208
- render: () => messages?.error || "Something went wrong.",
77209
- autoClose: false,
77210
- closeOnClick: false,
77211
- draggable: false,
77212
- onOpen: addBackdrop,
77213
- onClose: removeBackdrop
77214
- }
77215
- },
77216
- { ...defaults, ...opts }
77217
- )
77218
- };
77219
-
77220
77324
  const CustomGridToolbar = ({
77221
77325
  heading = "Data Grid",
77222
77326
  subheading = "",
@@ -77381,5 +77485,5 @@ const CustomGridToolbar = ({
77381
77485
  ] });
77382
77486
  };
77383
77487
 
77384
- export { AddUserGroupsRolesModal, Avatar, AvatarGroup$1 as AvatarGroup, Badge, Breadcrumbs, Button$1 as Button, Checkbox, CustomDialog, CustomGridToolbar, DatePicker, DateRangePicker$1 as DateRangePicker, DynamicConfig, FileUploadModal, FullScreenLoader, GenericFilter, Input, ManageCollectionList, Modal, MultiSelect, OptionsMenu, PageHeader, PageLayout, Pagination, RadioGroup, SearchBar, Select, Sidebar, Spinner, Textarea, ToastProvider, ToggleSwitch, Tooltip, TreeView, UnifyedCoreButton, WizardModal, adGroupsListSearchApi, axiosDelete, axiosGet, axiosPatch, axiosPost, axiosPut, cookies$1 as cookies, createHttpClient, directoryPermissionsApi, filePermissionsApi, gateWayUrl, gatewayBase, getBaseUrl, getSnapshot, http, localStore, myDriveGatewayBaseV2, notify, provisioningBase, rbacBase, searchRolesApi, sessionStore, userSearchBase };
77488
+ export { AddUserGroupsRolesModal, Avatar, AvatarGroup$1 as AvatarGroup, Badge, Breadcrumbs, Button$1 as Button, Checkbox, CustomDialog, CustomGridToolbar, DatePicker, DateRangePicker$1 as DateRangePicker, DynamicConfig, FileUploadModal, FullConfigPage, FullScreenLoader, GenericFilter, Input, ManageCollectionList, Modal, MultiSelect, OptionsMenu, PageHeader, PageLayout, Pagination, RadioGroup, SearchBar, Select, Sidebar, Spinner, Textarea, ToastProvider, ToggleSwitch, Tooltip, TreeView, UnifyedCoreButton, WizardModal, adGroupsListSearchApi, axiosDelete, axiosGet, axiosPatch, axiosPost, axiosPut, cookies$1 as cookies, createHttpClient, directoryPermissionsApi, filePermissionsApi, gateWayUrl, gatewayBase, getBaseUrl, getSnapshot, http, localStore, myDriveGatewayBaseV2, notify, provisioningBase, rbacBase, searchRolesApi, sessionStore, userSearchBase };
77385
77489
  //# sourceMappingURL=unifyedx-storybook-new.es.js.map