PageSourceSearch

https://www.allwage.com/_next/static/chunks/pages/admin/content/components-5e683f5d2ef80ae2.js

js allwage.com collected 2026-10-09 22:39:30 UTC 8,946 bytes, 2 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(new e.Error).stack]=function(e){for(var a=1;a<arguments.length;a++){var s=arguments[a];if(null!=s)for(var t in s)s.hasOwnProperty(t)&&(e[t]=s[t])}return e}({},e._sentryModuleMetadata[(new e.Error).stack],{"_sentryBundlerPluginAppKey:allwage-marketing-website":!0});var a=(new e.Error).stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="dee5ae0a-48b1-445f-bf92-6946ffbb58ca",e._sentryDebugIdIdentifier="sentry-dbid-dee5ae0a-48b1-445f-bf92-6946ffbb58ca")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2070],{31841:(e,a,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/content/components",function(){return s(44719)}])},44719:(e,a,s)=>{"use strict";s.r(a),s.d(a,{default:()=>p});var t=s(6029),n=s(95669),l=s.n(n),o=s(55729),r=s(48289),i=s(41188),c=s.n(i);let d=s(33601).env.NEXT_PUBLIC_STORYBOOK_URL||"http://localhost:4400";function m(e){return e.toLowerCase().replace(/[^a-z0-9]/g,"")}function h(e){return`${d.replace(/\/$/,"")}${e}`}function p(){var e;let[a,s]=(0,o.useState)([]),[n,i]=(0,o.useState)(""),[d,p]=(0,o.useState)(""),[u,x]=(0,o.useState)(""),[j,g]=(0,o.useState)(""),[v,N]=(0,o.useState)([]),[b,f]=(0,o.useState)("desktop");(0,o.useEffect)(()=>{fetch("/api/internal/content/components",{cache:"no-store"}).then(e=>e.json()).then(e=>{var a;let t=e.data||[];s(t),p((null==(a=t[0])?void 0:a.component)||"")})},[]),(0,o.useEffect)(()=>{fetch(h("/index.json"),{cache:"no-store"}).then(e=>{if(!e.ok)throw Error(`Storybook returned ${e.status}`);return e.json()}).then(e=>{N(Object.values(e.entries||e.stories||{}).filter(e=>{var a;return e.id&&(null==(a=e.title)?void 0:a.startsWith("Section /"))&&(!e.type||"story"===e.type)})),g("")}).catch(e=>{N([]),g(e instanceof Error?e.message:"Storybook index could not be loaded.")})},[]);let y=a.filter(e=>{var a,s,t,l;return[e.component,e.label,e.description,e.statusLabel,null==(a=e.agentMetadata)?void 0:a.purpose,...(null==(s=e.agentMetadata)?void 0:s.useWhen)||[],...(null==(t=e.agentMetadata)?void 0:t.avoidWhen)||[],...(null==(l=e.agentMetadata)?void 0:l.relatedComponents)||[]].join(" ").toLowerCase().includes(n.toLowerCase())}),S=(0,o.useMemo)(()=>a.find(e=>e.component===d),[a,d]),w=(0,o.useMemo)(()=>S?v.filter(e=>{let a;return(a=m(function(e){let[,a=e]=e.split("/").map(e=>e.trim());return a}(e.title)))===m(S.component)||a===m(S.label)}).sort((e,a)=>e.name.localeCompare(a.name)):[],[S,v]),k=w.find(e=>e.id===u)||w[0];return(0,t.jsxs)("main",{className:c().adminShell,children:[(0,t.jsx)(l(),{children:(0,t.jsx)("title",{children:"Components | AllWage Admin"})}),(0,t.jsx)(r.DH,{active:"components",subtitle:"Selectable page components, editor fields, usage labels, and starter JSON.",title:"Component Library"}),(0,t.jsxs)("div",{className:c().componentGrid,children:[(0,t.jsxs)("aside",{className:`${c().panel} ${c().componentLeftPane}`,children:[(0,t.jsx)("div",{className:c().searchBar,children:(0,t.jsx)("input",{className:c().input,onChange:e=>i(e.target.value),placeholder:"Search components, purpose, use, avoid...",value:n})}),(0,t.jsx)("div",{className:c().scrollArea,children:y.map(e=>(0,t.jsxs)("button",{className:`${c().componentButton} ${e.component===d?c().selected:""}`,onClick:()=>p(e.component),type:"button",children:[(0,t.jsx)("span",{className:c().componentButtonLabel,children:e.label}),(0,t.jsx)("span",{className:c().componentButtonName,children:e.component}),(0,t.jsxs)("span",{className:c().componentButtonBadges,children:[(0,t.jsx)("span",{className:c().chip,children:e.statusLabel}),"runtime-controlled"===e.status?(0,t.jsx)("span",{className:c().chip,children:"Not a page JSON block"}):(0,t.jsxs)("span",{className:c().chip,children:[e.usageCount," page section",1===e.usageCount?"":"s"]})]})]},e.component))}),(0,t.jsx)("div",{className:c().componentDetailsPane,children:S?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:c().componentDetailHeader,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:c().title,children:S.label}),(0,t.jsx)("p",{className:c().subtitle,children:S.description})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:c().chip,children:S.statusLabel}),S.metadata.statusLabel&&(0,t.jsx)("span",{className:c().chip,children:S.metadata.statusLabel})]})]}),(0,t.jsxs)("div",{className:c().componentInfoGrid,children:[S.agentMetadata&&(0,t.jsxs)("div",{className:c().fieldSet,children:[(0,t.jsx)("h3",{children:"Agent guidance"}),(0,t.jsx)("p",{className:c().small,children:S.agentMetadata.purpose}),(0,t.jsx)("h4",{children:"Use when"}),S.agentMetadata.useWhen.map(e=>(0,t.jsx)("div",{className:c().small,children:e},`use-${e}`)),(0,t.jsx)("h4",{children:"Avoid when"}),S.agentMetadata.avoidWhen.map(e=>(0,t.jsx)("div",{className:c().small,children:e},`avoid-${e}`)),S.agentMetadata.relatedComponents&&S.agentMetadata.relatedComponents.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h4",{children:"Related components"}),(0,t.jsx)("div",{className:c().usageBadges,children:S.agentMetadata.relatedComponents.map(e=>(0,t.jsx)("span",{className:c().chip,children:e},e))})]}),null==(e=S.agentMetadata.notes)?void 0:e.map(e=>(0,t.jsx)("p",{className:c().muted,children:e},e))]}),S.agentMetadataErrors&&S.agentMetadataErrors.length>0&&(0,t.jsxs)("div",{className:c().fieldSet,children:[(0,t.jsx)("h3",{children:"Agent metadata issues"}),S.agentMetadataErrors.map(e=>(0,t.jsxs)("div",{className:c().small,children:[e.filePath&&(0,t.jsxs)("strong",{children:[e.filePath,": "]}),e.message]},`${e.filePath||S.component}-${e.message}`))]}),(0,t.jsxs)("div",{className:c().fieldSet,children:[(0,t.jsx)("h3",{children:"Editor fields"}),S.metadata.fields.map(e=>(0,t.jsxs)("div",{className:c().small,children:[(0,t.jsx)("strong",{children:e.label}),(0,t.jsxs)("span",{className:c().muted,children:[" - ",e.path," (",e.widget,")"]})]},`${e.path}-${e.label}`))]}),(0,t.jsxs)("div",{className:c().fieldSet,children:[(0,t.jsx)("h3",{children:"Pages using this"}),S.pages.length>0?S.pages.map(e=>(0,t.jsxs)("a",{className:c().usageLink,href:`/admin/content/pages?page=${encodeURIComponent(e.slug)}&focus=${encodeURIComponent(`sections.${e.sectionIndex}`)}`,children:[e.title," - section ",e.sectionIndex+1]},`${e.slug}-${e.sectionIndex}`)):(0,t.jsx)("p",{className:c().muted,children:"runtime-controlled"===S.status?"Rendered by the page shell/navigation flow, not inserted into page JSON sections.":"Not used in page JSON right now."})]})]}),(0,t.jsxs)("details",{className:c().jsonPanel,children:[(0,t.jsx)("summary",{children:"Starter JSON"}),(0,t.jsx)("textarea",{className:c().jsonTextarea,readOnly:!0,value:`${JSON.stringify(S.metadata.defaultValue,null,2)}
2`})]})]}):(0,t.jsx)("div",{className:c().emptyState,children:"Select a component."})})]}),(0,t.jsx)("section",{className:`${c().panel} ${c().componentPreviewPane}`,children:(0,t.jsxs)("div",{className:c().viewerPanel,children:[(0,t.jsxs)("div",{className:c().viewerToolbar,children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("strong",{children:"Rendered preview"}),k?(0,t.jsxs)("span",{className:c().muted,children:[" - Storybook: ",k.name]}):(0,t.jsx)("span",{className:c().muted,children:" from Storybook stories"})]}),(0,t.jsxs)("div",{className:c().toolbar,children:[(0,t.jsx)("select",{className:c().select,disabled:0===w.length,onChange:e=>x(e.target.value),value:(null==k?void 0:k.id)||"",children:w.length?w.map(e=>(0,t.jsx)("option",{value:e.id,children:e.name},e.id)):(0,t.jsx)("option",{value:"",children:"No Storybook story"})}
2),k&&(0,t.jsx)("a",{className:c().secondaryButton,href:h(`/?path=/story/${k.id}`),rel:"noreferrer",target:"_blank",children:"Open Storybook"}),["desktop","tablet","mobile"].map(e=>(0,t.jsx)("button",{className:b===e?c().button:c().secondaryButton,onClick:()=>f(e),type:"button",children:e},e))]})]}),(0,t.jsx)("div",{className:c().viewerCanvas,children:(0,t.jsx)("div",{className:`${c().viewerFrame} ${c()[`viewerFrame--${b}`]}`,children:k?(0,t.jsx)("iframe",{className:c().storybookFrame,src:h(`/iframe.html?id=${encodeURIComponent(k.id)}&viewMode=story`),title:`${(null==S?void 0:S.label)||"Component"} Storybook preview`}):(0,t.jsx)("div",{className:c().emptyState,children:(0,t.jsxs)("div",{children:[(0,t.jsx)("p",{children:j?"Storybook is not available from the component catalog.":"No matching Storybook story exists for this component."}),j&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:c().muted,children:"Start Storybook locally, then refresh this page."}),(0,t.jsx)("code",{className:c().command,children:"npx nx storybook components -- --port 4400"})]})]})})})})]})})]})]})}}},e=>{e.O(0,[7993,8520,3735,4293,5495,744,6996,540,2828,6069,4448,7610,9733,478,5279,7275,9119,8289,636,9905,8790,8792],()=>e(e.s=31841)),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.