@peak-ai/canvas 1.4.20-rc.6 → 1.4.20-rc.8
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/GrapesjsCanvas.js +3 -2
- package/GrapesjsCanvas.js.map +1 -1
- package/package.json +1 -1
- package/plugins/grapejs-plugin.js +3 -3
- package/plugins/grapejs-plugin.js.map +1 -1
- package/plugins/helpers/query-details-modal.d.ts +2 -7
- package/plugins/helpers/query-details-modal.js +3 -3
- package/plugins/helpers/query-details-modal.js.map +1 -1
- package/plugins/helpers/query-loading-modal.d.ts +1 -2
- package/plugins/helpers/query-loading-modal.js +1 -1
- package/plugins/helpers/query-loading-modal.js.map +1 -1
- package/plugins/helpers/render-components.js +3 -3
- package/plugins/helpers/render-components.js.map +1 -1
- package/plugins/helpers/styled-info-button.d.ts +1 -2
- package/plugins/helpers/styled-info-button.js +1 -4
- package/plugins/helpers/styled-info-button.js.map +1 -1
- package/shadcn/components/ui/error-wrapper.js +1 -1
- package/shadcn/components/ui/error-wrapper.js.map +1 -1
- package/declaration.d.js +0 -2
- package/declaration.d.js.map +0 -1
- package/plugins/helpers/query-cache-context.d.ts +0 -18
- package/plugins/helpers/query-cache-context.js +0 -2
- package/plugins/helpers/query-cache-context.js.map +0 -1
- package/plugins/helpers/query-cache-singleton.d.ts +0 -22
- package/plugins/helpers/query-cache-singleton.js +0 -3
- package/plugins/helpers/query-cache-singleton.js.map +0 -1
- package/plugins/helpers/query-cache-utils.d.ts +0 -48
- package/plugins/helpers/query-cache-utils.js +0 -3
- package/plugins/helpers/query-cache-utils.js.map +0 -1
- package/plugins/helpers/query-heading-formatter.d.ts +0 -1
- package/plugins/helpers/query-heading-formatter.js +0 -5
- package/plugins/helpers/query-heading-formatter.js.map +0 -1
- package/shadcn/components/icons/thinking.gif +0 -0
- package/types/images.d.js +0 -2
- package/types/images.d.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styled-info-button.js","names":["React","useState","useRef","QueryDetailsModal","QueryLoadingModal","formatQueryHeading","useQueryCache","extractInteractionState","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","POSITION_CLASSES","ERROR_MESSAGES","FETCH_FAILED","LOAD_FAILED","SQL_NOT_AVAILABLE","StyledInfoButton","_ref","_ref$position","position","componentId","_ref$className","className","_ref$isVisible","isVisible","onSqlFetch","_ref$performInteracti","performInteraction","Promise","resolve","_ref$tableActions","tableActions","_ref$firstRowData","firstRowData","_ref$componentProps","componentProps","_useState","isModalOpen","setIsModalOpen","_useState2","isLoadingModalOpen","setIsLoadingModalOpen","_useState3","sqlQuery","setSqlQuery","_useState4","queryHeadings","setQueryHeadings","_useState5","tableButtonExplanations","setTableButtonExplanations","_useState6","isLoading","setIsLoading","_useState7","error","setError","modalOpen","queryCache","currentInteractionState","interactionStateKey","JSON","stringify","prevInteractionStateKeyRef","undefined","prevKey","current","currentKey","invalidateComponent","interactionState","fetchTableButtonExplanations","_fetchTableButtonExplanations","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","buttonPromises","results","wrap","_callee2$","_context2","prev","next","length","abrupt","map","_ref2","_callee","action","result","response","buttonStyle","actionClassName","bgMatch","textMatch","borderMatch","formFields","jsonBody","filesArg","hasFormFields","hasJsonBody","hasFilesArg","hasPayload","_callee$","_context","id","interactionType","payload","row","params","isInfoButtonInteraction","affectedComponents","sent","apiResponse","request_url","match","backgroundColor","color","border","form_fields","json_body","files_arg","Object","keys","text","explanation","operationName","operation_name","operationSummary","operation_summary","operationDescription","operation_description","buttonClassName","t0","stop","_x2","all","filter","fetchSemanticLayerQuery","_fetchSemanticLayerQuery","_callee3","sqlResponse","successArray","hasAnyValidQuery","validQueries","sqlQueries","extractedHeadings","sqlObjects","_validQueries","_sqlQueries","_extractedHeadings","_callee3$","_context3","sql","headings","Array","isArray","success","some","item","trim","queryKey","query_key","q","obj","finish","handleInfoClick","_x","_handleInfoClick","_callee4","e","cachedSemanticQuery","cachedTableButton","_yield$Promise$all","sqlResult","buttonExplanations","cacheEntry","_callee4$","_context4","stopPropagation","preventDefault","getCachedQuery","timestamp","Date","now","setCachedQuery","_extends","resetState","handleModalClose","handleRetry","mockEvent","children","onClick","title","type","style","width","height","transform","opacity","background","padding","viewBox","fill","xmlns","x","y","rx","stroke","strokeWidth","shapeRendering","d","filterUnits","colorInterpolationFilters","floodOpacity","values","radius","operator","stdDeviation","in2","mode","isOpen","onClose","onRetry"],"sources":["../../../src/plugins/helpers/styled-info-button.tsx"],"sourcesContent":["import React, { useState, useRef } from 'react';\nimport { QueryDetailsModal } from './query-details-modal';\nimport { QueryLoadingModal } from './query-loading-modal';\nimport { formatQueryHeading } from './query-heading-formatter';\nimport { useQueryCache } from './query-cache-context';\nimport { extractInteractionState } from './query-cache-utils';\n\nconst POSITION_CLASSES = {\n 'top-right': 'absolute top-0 right-0',\n 'top-left': 'absolute top-2 left-2', \n 'bottom-left': 'absolute bottom-0 left-1/2 transform -translate-x-1/2',\n 'bottom-right': 'absolute bottom-0 right-0 ',\n 'card-overlay': 'absolute bottom-0 right-0'\n} as const;\n\nconst ERROR_MESSAGES = {\n FETCH_FAILED: 'Failed to fetch query details from semantic layer',\n LOAD_FAILED: 'Failed to load query information',\n SQL_NOT_AVAILABLE: 'SQL not available'\n} as const;\n\n\ntype ButtonStyle = {\n backgroundColor?: string;\n color?: string;\n border?: string;\n [key: string]: unknown;\n};\n\ntype TableButtonExplanation = {\n action: string;\n explanation: string;\n operationName?: string;\n operationSummary?: string;\n operationDescription?: string;\n buttonClassName?: string;\n buttonStyle?: ButtonStyle;\n formFields?: Record<string, unknown>;\n jsonBody?: unknown;\n filesArg?: Record<string, unknown>;\n hasPayload?: boolean;\n};\n\ntype TableAction = {\n id: string;\n text: string;\n className?: string;\n [key: string]: unknown;\n};\n\ntype Position = 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' | 'card-overlay';\n\ntype StyledInfoButtonProps = {\n buttonStyle?: ButtonStyle;\n onClick?: () => void;\n isVisible?: boolean;\n tableName?: string;\n position?: Position;\n componentId?: string;\n className?: string;\n onSqlFetch?: (sql: string | string[]) => void;\n performInteraction?: (payload: Record<string, unknown>) => Promise<Record<string, unknown>>;\n tableActions?: TableAction[];\n firstRowData?: Record<string, unknown>;\n componentProps?: Record<string, unknown>;\n}\n\n\nexport function StyledInfoButton({ \n position = 'bottom-right', \n componentId,\n className = '',\n isVisible = true,\n onSqlFetch,\n performInteraction = () => Promise.resolve({} as Record<string, unknown>),\n tableActions = [],\n firstRowData = {},\n componentProps = {}\n}: StyledInfoButtonProps) {\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [isLoadingModalOpen, setIsLoadingModalOpen] = useState(false);\n \n const [sqlQuery, setSqlQuery] = useState<string | string[]>('');\n const [queryHeadings, setQueryHeadings] = useState<string[]>([]);\n const [tableButtonExplanations, setTableButtonExplanations] = useState<TableButtonExplanation[]>([]);\n \n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<string>('');\n \n const modalOpen = useRef(false);\n \n const queryCache = useQueryCache();\n \n const currentInteractionState = extractInteractionState(componentProps);\n const interactionStateKey = JSON.stringify(currentInteractionState);\n \n const prevInteractionStateKeyRef = useRef<string | undefined>(undefined);\n \n const prevKey = prevInteractionStateKeyRef.current;\n const currentKey = interactionStateKey;\n \n if (prevKey !== currentKey && prevKey !== undefined) {\n if (componentId) {\n queryCache.invalidateComponent(componentId);\n \n setSqlQuery('');\n setQueryHeadings([]);\n setTableButtonExplanations([]);\n setError('');\n }\n }\n \n prevInteractionStateKeyRef.current = currentKey;\n \n const interactionState = currentInteractionState;\n\n async function fetchTableButtonExplanations(): Promise<TableButtonExplanation[]> {\n try {\n if (!tableActions || tableActions.length === 0) {\n return [];\n }\n \n\n const buttonPromises = tableActions.map(async (action) => {\n try {\n const result = await performInteraction({\n id: action.id || componentId,\n interactionType: 'tableButton',\n payload: {\n row: firstRowData,\n params: { isInfoButtonInteraction: true }\n },\n affectedComponents: []\n });\n\n if (result && typeof result === 'object' && 'apiResponse' in result && \n result.apiResponse && typeof result.apiResponse === 'object') {\n const response = result.apiResponse as Record<string, unknown>;\n \n if (response.request_url && typeof response.request_url === 'string') {\n const buttonStyle: ButtonStyle = {};\n const actionClassName = (action.className as string) || '';\n \n if (typeof actionClassName === 'string') {\n const bgMatch = actionClassName.match(/bg-\\[(#[0-9A-Fa-f]{6})\\]/);\n\n if (bgMatch) {\n buttonStyle.backgroundColor = bgMatch[1];\n }\n \n const textMatch = actionClassName.match(/text-\\[(#[0-9A-Fa-f]{6})\\]/);\n\n if (textMatch) {\n buttonStyle.color = textMatch[1];\n }\n \n const borderMatch = actionClassName.match(/border-\\[(#[0-9A-Fa-f]{6})\\]/);\n\n if (borderMatch) {\n buttonStyle.border = `1px solid ${borderMatch[1]}`;\n }\n }\n \n const formFields = response.form_fields as Record<string, unknown> || {};\n const jsonBody = response.json_body;\n const filesArg = response.files_arg as Record<string, unknown> || {};\n \n // Check if any payload fields have content\n const hasFormFields = Object.keys(formFields).length > 0;\n const hasJsonBody = jsonBody !== null && jsonBody !== undefined && jsonBody !== '';\n const hasFilesArg = Object.keys(filesArg).length > 0;\n const hasPayload = hasFormFields || hasJsonBody || hasFilesArg;\n \n return {\n action: action.text || action.id || 'Button Action',\n explanation: response.request_url,\n operationName: response.operation_name as string,\n operationSummary: response.operation_summary as string,\n operationDescription: response.operation_description as string,\n buttonClassName: actionClassName,\n buttonStyle,\n formFields,\n jsonBody,\n filesArg,\n hasPayload\n };\n }\n }\n\n return null;\n } catch (err) {\n return null;\n }\n });\n\n const results = await Promise.all(buttonPromises);\n\n return results.filter((result) => result !== null) as TableButtonExplanation[];\n } catch (err) {\n return [];\n }\n }\n\n async function fetchSemanticLayerQuery(): Promise<{sql: string | string[], headings: string[]}> {\n try {\n setIsLoading(true);\n setError('');\n \n const result = await performInteraction({\n id: componentId || 'styled-info-button',\n interactionType: 'semanticLayerQuery',\n affectedComponents: []\n });\n\n if (result && typeof result === 'object' && 'apiResponse' in result && \n result.apiResponse && typeof result.apiResponse === 'object') {\n const apiResponse = result.apiResponse as Record<string, unknown>;\n \n if (!('sql' in apiResponse)) {\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n }\n \n const sqlResponse = apiResponse.sql;\n \n if (!sqlResponse || (typeof sqlResponse !== 'object')) {\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n }\n \n if ('success' in sqlResponse && Array.isArray(sqlResponse.success)) {\n const successArray = sqlResponse.success as Array<{\n error: boolean;\n sql?: string;\n errorMessage?: string;\n query_key?: string;\n }>;\n \n const hasAnyValidQuery = successArray.some(item => \n item && typeof item === 'object' && \n item.error === false && \n 'sql' in item && \n typeof item.sql === 'string' && \n item.sql.trim()\n );\n \n if (!hasAnyValidQuery) {\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n }\n \n const validQueries = successArray\n .filter(item => \n item && \n typeof item === 'object' && \n item.error === false && \n 'sql' in item && \n typeof item.sql === 'string' && \n item.sql.trim()\n )\n .map(item => ({\n sql: item.sql as string,\n queryKey: item.query_key || 'unknown'\n }));\n \n if (validQueries.length === 0) {\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n }\n \n // Extract SQL and headings in the correct order\n const sqlQueries = validQueries.map(q => q.sql);\n const extractedHeadings = validQueries.map(q => formatQueryHeading(q.queryKey));\n \n return {\n sql: sqlQueries.length > 1 ? sqlQueries : sqlQueries[0],\n headings: extractedHeadings\n };\n }\n \n if ('error' in sqlResponse && typeof sqlResponse.error === 'string') {\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n }\n \n if (Array.isArray(sqlResponse)) {\n const sqlObjects = sqlResponse as Array<{sql: string, error: boolean, query_key?: string}>;\n \n const validQueries = sqlObjects\n .filter(obj => obj && typeof obj === 'object' && 'sql' in obj && 'error' in obj && !obj.error && obj.sql && obj.sql.trim())\n .map(obj => ({\n sql: obj.sql,\n queryKey: obj.query_key || 'unknown'\n }));\n \n if (validQueries.length === 0) {\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n }\n \n const sqlQueries = validQueries.map(q => q.sql);\n const extractedHeadings = validQueries.map(q => formatQueryHeading(q.queryKey));\n \n return {\n sql: sqlQueries.length > 1 ? sqlQueries : sqlQueries[0],\n headings: extractedHeadings\n };\n }\n \n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n }\n\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n\n } catch (err) {\n\n return {sql: ERROR_MESSAGES.SQL_NOT_AVAILABLE, headings: []};\n\n } finally {\n setIsLoading(false);\n }\n }\n\n async function handleInfoClick(e: React.MouseEvent) {\n e.stopPropagation();\n e.preventDefault();\n \n modalOpen.current = true;\n \n try {\n const cachedSemanticQuery = componentId \n ? queryCache.getCachedQuery(componentId, 'semanticLayerQuery', interactionState)\n : null;\n \n const cachedTableButton = componentId && tableActions.length > 0\n ? queryCache.getCachedQuery(componentId, 'tableButton', interactionState)\n : null;\n \n if (cachedSemanticQuery && (tableActions.length === 0 || cachedTableButton)) {\n setSqlQuery(cachedSemanticQuery.sqlQuery);\n setQueryHeadings(cachedSemanticQuery.queryHeadings);\n setTableButtonExplanations(\n cachedTableButton?.tableButtonExplanations || cachedSemanticQuery.tableButtonExplanations\n );\n setError('');\n \n if (modalOpen.current) {\n setIsModalOpen(true);\n }\n \n if (onSqlFetch && cachedSemanticQuery.sqlQuery && \n cachedSemanticQuery.sqlQuery !== ERROR_MESSAGES.SQL_NOT_AVAILABLE) {\n onSqlFetch(cachedSemanticQuery.sqlQuery);\n }\n \n return;\n }\n \n setIsLoadingModalOpen(true);\n setError('');\n\n const [sqlResult, buttonExplanations] = await Promise.all([\n fetchSemanticLayerQuery(),\n fetchTableButtonExplanations()\n ]);\n \n if (componentId) {\n const cacheEntry = {\n sqlQuery: sqlResult.sql || ERROR_MESSAGES.SQL_NOT_AVAILABLE,\n queryHeadings: sqlResult.headings || [],\n tableButtonExplanations: buttonExplanations,\n timestamp: Date.now(),\n };\n \n queryCache.setCachedQuery(componentId, 'semanticLayerQuery', interactionState, cacheEntry);\n \n if (tableActions.length > 0) {\n queryCache.setCachedQuery(componentId, 'tableButton', interactionState, {\n ...cacheEntry,\n tableButtonExplanations: buttonExplanations,\n });\n }\n }\n \n setSqlQuery(sqlResult.sql || ERROR_MESSAGES.SQL_NOT_AVAILABLE);\n setQueryHeadings(sqlResult.headings || []);\n setTableButtonExplanations(buttonExplanations);\n \n setIsLoadingModalOpen(false);\n \n if (modalOpen.current) {\n setIsModalOpen(true);\n }\n \n if (onSqlFetch && sqlResult.sql && sqlResult.sql !== ERROR_MESSAGES.SQL_NOT_AVAILABLE) {\n onSqlFetch(sqlResult.sql);\n }\n } catch (err) {\n setSqlQuery(ERROR_MESSAGES.SQL_NOT_AVAILABLE);\n setTableButtonExplanations([]);\n setIsLoadingModalOpen(false);\n \n if (modalOpen.current) {\n setIsModalOpen(true);\n }\n }\n }\n\n function resetState() {\n setIsModalOpen(false);\n setIsLoadingModalOpen(false);\n setSqlQuery('');\n setQueryHeadings([]);\n setTableButtonExplanations([]);\n setError('');\n setIsLoading(false);\n }\n\n function handleModalClose() {\n // User explicitly closed the modal\n modalOpen.current = false;\n resetState();\n }\n\n function handleRetry() {\n resetState();\n const mockEvent = { \n stopPropagation: () => void 0,\n preventDefault: () => void 0\n } as React.MouseEvent;\n handleInfoClick(mockEvent);\n }\n\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <>\n <button\n className={`${POSITION_CLASSES[position]} ${className}`}\n onClick={handleInfoClick}\n title=\"View Query Details\"\n type=\"button\"\n style={{\n width: '60px',\n height: '60px',\n transform: 'rotate(0deg)',\n opacity: 1,\n border: 'none',\n background: 'transparent',\n padding: 0,\n }}\n >\n <svg \n width=\"50\" \n height=\"50\" \n viewBox=\"0 0 67 66\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g filter=\"url(#filter0_d_4766_2811)\">\n <rect x=\"16.1667\" y=\"15.5\" width=\"35\" height=\"35\" rx=\"7.5\" stroke=\"#A601FF\" strokeWidth=\"1\" shapeRendering=\"crispEdges\"/>\n <path d=\"M33.0756 28.0171C33.3312 27.5498 34.0023 27.5498 34.2578 28.0171L35.7159 30.683C35.7777 30.7961 35.8706 30.889 35.9837 30.9508L38.6496 32.4089C39.1169 32.6644 39.1169 33.3355 38.6496 33.5911L35.9837 35.0491C35.8706 35.111 35.7777 35.2039 35.7159 35.317L34.2578 37.9829C34.0023 38.4501 33.3312 38.4501 33.0756 37.9829L31.6176 35.317C31.5557 35.2039 31.4628 35.111 31.3497 35.0491L28.6838 33.5911C28.2166 33.3355 28.2166 32.6644 28.6838 32.4089L31.3497 30.9508C31.4628 30.889 31.5557 30.7961 31.6176 30.683L33.0756 28.0171Z\" fill=\"#A601FF\"/>\n <path d=\"M29.0634 27.1601C29.1801 26.9466 29.4866 26.9466 29.6033 27.1601L29.9973 27.8804C30.0255 27.932 30.068 27.9745 30.1196 28.0027L30.84 28.3967C31.0534 28.5134 31.0534 28.8199 30.84 28.9367L30.1196 29.3306C30.068 29.3589 30.0255 29.4013 29.9973 29.4529L29.6033 30.1733C29.4866 30.3867 29.1801 30.3867 29.0634 30.1733L28.6694 29.4529C28.6412 29.4013 28.5987 29.3589 28.5471 29.3306L27.8268 28.9367C27.6133 28.8199 27.6133 28.5134 27.8268 28.3967L28.5471 28.0027C28.5987 27.9745 28.6412 27.932 28.6694 27.8804L29.0634 27.1601Z\" fill=\"#A601FF\"/>\n <path d=\"M38.0346 36.5104C38.1638 36.2743 38.5029 36.2743 38.6321 36.5105L38.8874 36.9773C38.9186 37.0344 38.9656 37.0814 39.0227 37.1126L39.4896 37.368C39.7257 37.4971 39.7257 37.8363 39.4896 37.9654L39.0227 38.2207C38.9656 38.252 38.9186 38.2989 38.8874 38.3561L38.6321 38.8229C38.5029 39.059 38.1638 39.059 38.0346 38.8229L37.7793 38.3561C37.748 38.2989 37.7011 38.252 37.6439 38.2207L37.1771 37.9654C36.941 37.8363 36.941 37.4971 37.1771 37.368L37.6439 37.1126C37.7011 37.0814 37.748 37.0344 37.7793 36.9773L38.0346 36.5104Z\" fill=\"#A601FF\"/>\n </g>\n <defs>\n <filter id=\"filter0_d_4766_2811\" x=\"0.666687\" y=\"0\" width=\"66\" height=\"66\" filterUnits=\"userSpaceOnUse\" colorInterpolationFilters=\"sRGB\">\n <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\"/>\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/>\n <feMorphology radius=\"5\" operator=\"dilate\" in=\"SourceAlpha\" result=\"effect1_dropShadow_4766_2811\"/>\n <feOffset/>\n <feGaussianBlur stdDeviation=\"5\"/>\n <feComposite in2=\"hardAlpha\" operator=\"out\"/>\n <feColorMatrix type=\"matrix\" values=\"0 0 0 0 0.0317231 0 0 0 0 0.0834676 0 0 0 0 0.370052 0 0 0 0.05 0\"/>\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_4766_2811\"/>\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_4766_2811\" result=\"shape\"/>\n </filter>\n </defs>\n </svg>\n </button>\n \n <QueryLoadingModal isOpen={isLoadingModalOpen} onClose={handleModalClose} />\n \n <QueryDetailsModal\n isOpen={isModalOpen}\n onClose={handleModalClose}\n isLoading={isLoading}\n error={error}\n sqlQuery={sqlQuery}\n queryHeadings={queryHeadings}\n tableButtonExplanations={tableButtonExplanations}\n onRetry={handleRetry}\n />\n </>\n );\n}"],"mappings":"wLAAA,MAAO,CAAAA,KAAK,EAAIC,QAAQ,CAAEC,MAAM,KAAQ,OAAO,CAC/C,OAASC,iBAAiB,KAAQ,uBAAuB,CACzD,OAASC,iBAAiB,KAAQ,uBAAuB,CACzD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IAAA,mBAAgBsN,YAAY,CAAC,GAAG,CAAC,CAAC,cAClCtN,IAAA,gBAAauN,GAAG,CAAC,WAAW,CAACF,QAAQ,CAAC,KAAK,CAAC,CAAC,cAC7CrN,IAAA,kBAAe8L,IAAI,CAAC,QAAQ,CAACqB,MAAM,CAAC,mEAAmE,CAAC,CAAC,cACzGnN,IAAA,YAASwN,IAAI,CAAC,QAAQ,CAACD,GAAG,CAAC,oBAAoB,CAAClI,MAAM,CAAC,8BAA8B,CAAC,CAAC,cACvFrF,IAAA,YAASwN,IAAI,CAAC,QAAQ,CAAC,KAAG,eAAe,CAACD,GAAG,CAAC,8BAA8B,CAAClI,MAAM,CAAC,OAAO,CAAC,CAAC,EACvF,CAAC,CACL,CAAC,EACJ,CAAC,CACA,CAAC,cAETrF,IAAA,CAACL,iBAAiB,EAAC8N,MAAM,CAAEvL,kBAAmB,CAACwL,OAAO,CAAElC,gBAAiB,CAAE,CAAC,cAE5ExL,IAAA,CAACN,iBAAiB,EAChB+N,MAAM,CAAE1L,WAAY,CACpB2L,OAAO,CAAElC,gBAAiB,CAC1B1I,SAAS,CAAEA,SAAU,CACrBG,KAAK,CAAEA,KAAM,CACbZ,QAAQ,CAAEA,QAAS,CACnBG,aAAa,CAAEA,aAAc,CAC7BG,uBAAuB,CAAEA,uBAAwB,CACjDgL,OAAO,CAAElC,WAAY,CACtB,CAAC,EACF,CAEN","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"styled-info-button.js","names":["React","useState","QueryDetailsModal","QueryLoadingModal","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","POSITION_CLASSES","ERROR_MESSAGES","FETCH_FAILED","LOAD_FAILED","SQL_NOT_AVAILABLE","StyledInfoButton","_ref","_ref$position","position","componentId","_ref$className","className","_ref$isVisible","isVisible","onSqlFetch","_ref$performInteracti","performInteraction","Promise","resolve","_ref$tableActions","tableActions","_ref$firstRowData","firstRowData","_useState","isModalOpen","setIsModalOpen","_useState2","isLoadingModalOpen","setIsLoadingModalOpen","_useState3","sqlQuery","setSqlQuery","_useState4","tableButtonExplanations","setTableButtonExplanations","_useState5","isLoading","setIsLoading","_useState6","error","setError","fetchTableButtonExplanations","_fetchTableButtonExplanations","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee2","buttonPromises","results","wrap","_callee2$","_context2","prev","next","length","abrupt","map","_ref2","_callee","action","result","response","buttonStyle","actionClassName","bgMatch","textMatch","borderMatch","_callee$","_context","id","interactionType","payload","row","params","isInfoButtonInteraction","affectedComponents","sent","apiResponse","request_url","match","backgroundColor","color","border","text","explanation","operationName","operation_name","buttonClassName","t0","stop","_x2","all","filter","fetchSemanticLayerQuery","_fetchSemanticLayerQuery","_callee3","sqlResponse","successArray","hasAnyValidQuery","validQueries","uniqueQueries","sqlObjects","_validQueries","_uniqueQueries","_callee3$","_context3","sql","Array","isArray","success","some","item","trim","from","Set","obj","finish","handleInfoClick","_x","_handleInfoClick","_callee4","e","_yield$Promise$all","buttonExplanations","_callee4$","_context4","stopPropagation","preventDefault","resetState","handleModalClose","handleRetry","mockEvent","children","onClick","title","type","style","width","height","transform","opacity","background","padding","viewBox","fill","xmlns","x","y","rx","stroke","strokeWidth","shapeRendering","d","filterUnits","colorInterpolationFilters","floodOpacity","values","radius","operator","stdDeviation","in2","mode","isOpen","onClose","onRetry"],"sources":["../../../src/plugins/helpers/styled-info-button.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { QueryDetailsModal } from './query-details-modal';\nimport { QueryLoadingModal } from './query-loading-modal';\n\nconst POSITION_CLASSES = {\n 'top-right': 'absolute top-0 right-0',\n 'top-left': 'absolute top-2 left-2', \n 'bottom-left': 'absolute bottom-0 left-1/2 transform -translate-x-1/2',\n 'bottom-right': 'absolute bottom-0 right-0 ',\n 'card-overlay': 'absolute bottom-0 right-0'\n} as const;\n\nconst ERROR_MESSAGES = {\n FETCH_FAILED: 'Failed to fetch query details from semantic layer',\n LOAD_FAILED: 'Failed to load query information',\n SQL_NOT_AVAILABLE: 'SQL not available'\n} as const;\n\ntype ButtonStyle = {\n backgroundColor?: string;\n color?: string;\n border?: string;\n [key: string]: unknown;\n};\n\ntype TableButtonExplanation = {\n action: string;\n explanation: string;\n operationName?: string;\n buttonClassName?: string;\n buttonStyle?: ButtonStyle;\n};\n\ntype TableAction = {\n id: string;\n text: string;\n className?: string;\n [key: string]: unknown;\n};\n\ntype Position = 'top-right' | 'top-left' | 'bottom-left' | 'bottom-right' | 'card-overlay';\n\ntype StyledInfoButtonProps = {\n buttonStyle?: ButtonStyle;\n onClick?: () => void;\n isVisible?: boolean;\n tableName?: string;\n position?: Position;\n componentId?: string;\n className?: string;\n onSqlFetch?: (sql: string | string[]) => void;\n performInteraction?: (payload: Record<string, unknown>) => Promise<Record<string, unknown>>;\n tableActions?: TableAction[];\n firstRowData?: Record<string, unknown>;\n}\n\n\nexport function StyledInfoButton({ \n position = 'bottom-right', \n componentId,\n className = '',\n isVisible = true,\n onSqlFetch,\n performInteraction = () => Promise.resolve({} as Record<string, unknown>),\n tableActions = [],\n firstRowData = {}\n}: StyledInfoButtonProps) {\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [isLoadingModalOpen, setIsLoadingModalOpen] = useState(false);\n \n const [sqlQuery, setSqlQuery] = useState<string | string[]>('');\n const [tableButtonExplanations, setTableButtonExplanations] = useState<TableButtonExplanation[]>([]);\n \n const [isLoading, setIsLoading] = useState(false);\n const [error, setError] = useState<string>('');\n\n async function fetchTableButtonExplanations(): Promise<TableButtonExplanation[]> {\n try {\n if (!tableActions || tableActions.length === 0) {\n return [];\n }\n \n\n const buttonPromises = tableActions.map(async (action) => {\n try {\n const result = await performInteraction({\n id: action.id || componentId,\n interactionType: 'tableButton',\n payload: {\n row: firstRowData,\n params: { isInfoButtonInteraction: true }\n },\n affectedComponents: []\n });\n\n if (result && typeof result === 'object' && 'apiResponse' in result && \n result.apiResponse && typeof result.apiResponse === 'object') {\n const response = result.apiResponse as Record<string, unknown>;\n \n if (response.request_url && typeof response.request_url === 'string') {\n const buttonStyle: ButtonStyle = {};\n const actionClassName = (action.className as string) || '';\n \n if (typeof actionClassName === 'string') {\n const bgMatch = actionClassName.match(/bg-\\[(#[0-9A-Fa-f]{6})\\]/);\n\n if (bgMatch) {\n buttonStyle.backgroundColor = bgMatch[1];\n }\n \n const textMatch = actionClassName.match(/text-\\[(#[0-9A-Fa-f]{6})\\]/);\n\n if (textMatch) {\n buttonStyle.color = textMatch[1];\n }\n \n const borderMatch = actionClassName.match(/border-\\[(#[0-9A-Fa-f]{6})\\]/);\n\n if (borderMatch) {\n buttonStyle.border = `1px solid ${borderMatch[1]}`;\n }\n }\n \n return {\n action: action.text || action.id || 'Button Action',\n explanation: response.request_url,\n operationName: response.operation_name as string,\n buttonClassName: actionClassName,\n buttonStyle\n };\n }\n }\n\n return null;\n } catch (err) {\n return null;\n }\n });\n\n const results = await Promise.all(buttonPromises);\n\n return results.filter((result) => result !== null) as TableButtonExplanation[];\n } catch (err) {\n return [];\n }\n }\n\n async function fetchSemanticLayerQuery(): Promise<string | string[]> {\n try {\n setIsLoading(true);\n setError('');\n \n const result = await performInteraction({\n id: componentId || 'styled-info-button',\n interactionType: 'semanticLayerQuery',\n affectedComponents: []\n });\n\n if (result && typeof result === 'object' && 'apiResponse' in result && \n result.apiResponse && typeof result.apiResponse === 'object') {\n const apiResponse = result.apiResponse as Record<string, unknown>;\n \n if (!('sql' in apiResponse)) {\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n }\n \n const sqlResponse = apiResponse.sql;\n \n if (!sqlResponse || (typeof sqlResponse !== 'object')) {\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n }\n \n if ('success' in sqlResponse && Array.isArray(sqlResponse.success)) {\n const successArray = sqlResponse.success as Array<{\n error: boolean;\n sql?: string;\n errorMessage?: string;\n }>;\n \n const hasAnyValidQuery = successArray.some(item => \n item && typeof item === 'object' && \n item.error === false && \n 'sql' in item && \n typeof item.sql === 'string' && \n item.sql.trim()\n );\n \n if (!hasAnyValidQuery) {\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n }\n \n const validQueries = successArray\n .filter(item => \n item && \n typeof item === 'object' && \n item.error === false && \n 'sql' in item && \n typeof item.sql === 'string' && \n item.sql.trim()\n )\n .map(item => item.sql as string);\n \n if (validQueries.length === 0) {\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n }\n \n const uniqueQueries = Array.from(new Set(validQueries));\n \n return uniqueQueries.length > 1 ? uniqueQueries : uniqueQueries[0];\n }\n \n if ('error' in sqlResponse && typeof sqlResponse.error === 'string') {\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n }\n \n if (Array.isArray(sqlResponse)) {\n const sqlObjects = sqlResponse as Array<{sql: string, error: boolean}>;\n \n const validQueries = sqlObjects\n .filter(obj => obj && typeof obj === 'object' && 'sql' in obj && 'error' in obj && !obj.error && obj.sql && obj.sql.trim())\n .map(obj => obj.sql);\n \n if (validQueries.length === 0) {\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n }\n \n const uniqueQueries = Array.from(new Set(validQueries));\n \n return uniqueQueries.length > 1 ? uniqueQueries : uniqueQueries[0];\n }\n \n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n }\n\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n\n } catch (err) {\n\n return ERROR_MESSAGES.SQL_NOT_AVAILABLE;\n\n } finally {\n setIsLoading(false);\n }\n }\n\n async function handleInfoClick(e: React.MouseEvent) {\n e.stopPropagation();\n e.preventDefault();\n \n try {\n setIsLoadingModalOpen(true);\n setError('');\n\n const [sql, buttonExplanations] = await Promise.all([\n fetchSemanticLayerQuery(),\n fetchTableButtonExplanations()\n ]);\n \n setSqlQuery(sql || ERROR_MESSAGES.SQL_NOT_AVAILABLE);\n setTableButtonExplanations(buttonExplanations);\n \n setIsLoadingModalOpen(false);\n setIsModalOpen(true);\n \n if (onSqlFetch && sql && sql !== ERROR_MESSAGES.SQL_NOT_AVAILABLE) {\n onSqlFetch(sql);\n }\n } catch (err) {\n setSqlQuery(ERROR_MESSAGES.SQL_NOT_AVAILABLE);\n setTableButtonExplanations([]);\n setIsLoadingModalOpen(false);\n setIsModalOpen(true);\n }\n }\n\n function resetState() {\n setIsModalOpen(false);\n setIsLoadingModalOpen(false);\n setSqlQuery('');\n setTableButtonExplanations([]);\n setError('');\n setIsLoading(false);\n }\n\n function handleModalClose() {\n resetState();\n }\n\n function handleRetry() {\n resetState();\n const mockEvent = { \n stopPropagation: () => void 0,\n preventDefault: () => void 0\n } as React.MouseEvent;\n handleInfoClick(mockEvent);\n }\n\n\n if (!isVisible) {\n return null;\n }\n\n return (\n <>\n <button\n className={`${POSITION_CLASSES[position]} ${className}`}\n onClick={handleInfoClick}\n title=\"View Query Details\"\n type=\"button\"\n style={{\n width: '60px',\n height: '60px',\n transform: 'rotate(0deg)',\n opacity: 1,\n border: 'none',\n background: 'transparent',\n padding: 0,\n }}\n >\n <svg \n width=\"50\" \n height=\"50\" \n viewBox=\"0 0 67 66\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <g filter=\"url(#filter0_d_4766_2811)\">\n <rect x=\"16.1667\" y=\"15.5\" width=\"35\" height=\"35\" rx=\"7.5\" stroke=\"#A601FF\" strokeWidth=\"1\" shapeRendering=\"crispEdges\"/>\n <path d=\"M33.0756 28.0171C33.3312 27.5498 34.0023 27.5498 34.2578 28.0171L35.7159 30.683C35.7777 30.7961 35.8706 30.889 35.9837 30.9508L38.6496 32.4089C39.1169 32.6644 39.1169 33.3355 38.6496 33.5911L35.9837 35.0491C35.8706 35.111 35.7777 35.2039 35.7159 35.317L34.2578 37.9829C34.0023 38.4501 33.3312 38.4501 33.0756 37.9829L31.6176 35.317C31.5557 35.2039 31.4628 35.111 31.3497 35.0491L28.6838 33.5911C28.2166 33.3355 28.2166 32.6644 28.6838 32.4089L31.3497 30.9508C31.4628 30.889 31.5557 30.7961 31.6176 30.683L33.0756 28.0171Z\" fill=\"#A601FF\"/>\n <path d=\"M29.0634 27.1601C29.1801 26.9466 29.4866 26.9466 29.6033 27.1601L29.9973 27.8804C30.0255 27.932 30.068 27.9745 30.1196 28.0027L30.84 28.3967C31.0534 28.5134 31.0534 28.8199 30.84 28.9367L30.1196 29.3306C30.068 29.3589 30.0255 29.4013 29.9973 29.4529L29.6033 30.1733C29.4866 30.3867 29.1801 30.3867 29.0634 30.1733L28.6694 29.4529C28.6412 29.4013 28.5987 29.3589 28.5471 29.3306L27.8268 28.9367C27.6133 28.8199 27.6133 28.5134 27.8268 28.3967L28.5471 28.0027C28.5987 27.9745 28.6412 27.932 28.6694 27.8804L29.0634 27.1601Z\" fill=\"#A601FF\"/>\n <path d=\"M38.0346 36.5104C38.1638 36.2743 38.5029 36.2743 38.6321 36.5105L38.8874 36.9773C38.9186 37.0344 38.9656 37.0814 39.0227 37.1126L39.4896 37.368C39.7257 37.4971 39.7257 37.8363 39.4896 37.9654L39.0227 38.2207C38.9656 38.252 38.9186 38.2989 38.8874 38.3561L38.6321 38.8229C38.5029 39.059 38.1638 39.059 38.0346 38.8229L37.7793 38.3561C37.748 38.2989 37.7011 38.252 37.6439 38.2207L37.1771 37.9654C36.941 37.8363 36.941 37.4971 37.1771 37.368L37.6439 37.1126C37.7011 37.0814 37.748 37.0344 37.7793 36.9773L38.0346 36.5104Z\" fill=\"#A601FF\"/>\n </g>\n <defs>\n <filter id=\"filter0_d_4766_2811\" x=\"0.666687\" y=\"0\" width=\"66\" height=\"66\" filterUnits=\"userSpaceOnUse\" colorInterpolationFilters=\"sRGB\">\n <feFlood floodOpacity=\"0\" result=\"BackgroundImageFix\"/>\n <feColorMatrix in=\"SourceAlpha\" type=\"matrix\" values=\"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\" result=\"hardAlpha\"/>\n <feMorphology radius=\"5\" operator=\"dilate\" in=\"SourceAlpha\" result=\"effect1_dropShadow_4766_2811\"/>\n <feOffset/>\n <feGaussianBlur stdDeviation=\"5\"/>\n <feComposite in2=\"hardAlpha\" operator=\"out\"/>\n <feColorMatrix type=\"matrix\" values=\"0 0 0 0 0.0317231 0 0 0 0 0.0834676 0 0 0 0 0.370052 0 0 0 0.05 0\"/>\n <feBlend mode=\"normal\" in2=\"BackgroundImageFix\" result=\"effect1_dropShadow_4766_2811\"/>\n <feBlend mode=\"normal\" in=\"SourceGraphic\" in2=\"effect1_dropShadow_4766_2811\" result=\"shape\"/>\n </filter>\n </defs>\n </svg>\n </button>\n \n <QueryLoadingModal isOpen={isLoadingModalOpen} />\n \n <QueryDetailsModal\n isOpen={isModalOpen}\n onClose={handleModalClose}\n isLoading={isLoading}\n error={error}\n sqlQuery={sqlQuery}\n tableButtonExplanations={tableButtonExplanations}\n onRetry={handleRetry}\n />\n </>\n );\n}"],"mappings":"mIAAA,MAAO,CAAAA,KAAK,EAAIC,QAAQ,KAAQ,OAAO,CACvC,OAASC,iBAAiB,KAAQ,uBAAuB,CACzD,OAASC,iBAAiB,KAAQ,uBAAuB,CAAC,OAAAC,GAAA,IAAAC,IAAA,CAAAC,IAAA,IAAAC,KAAA,CAAAC,QAAA,IAAAC,SAAA,yBAE1D,GAAM,CAAAC,gBAAgB,CAAG,CACvB,WAAW,CAAE,wBAAwB,CACrC,UAAU,CAAE,uBAAuB,CACnC,aAAa,CAAE,uDAAuD,CACtE,cAAc,CAAE,4BAA4B,CAC5C,cAAc,CAAE,2BAClB,CAAU,CAEV,GAAM,CAAAC,cAAc,CAAG,CACrBC,YAAY,CAAE,mDAAmD,CACjEC,WAAW,CAAE,kCAAkC,CAC/CC,iBAAiB,CAAE,mBACrB,CAAU,CAyCV,MAAO,SAAS,CAAAC,gBAAgBA,CAAAC,IAAA,CASN,KAAAC,aAAA,CAAAD,IAAA,CARxBE,QAAQ,CAARA,QAAQ,CAAAD,aAAA,UAAG,cAAc,CAAAA,aAAA,CACzBE,WAAW,CAAAH,IAAA,CAAXG,WAAW,CAAAC,cAAA,CAAAJ,IAAA,CACXK,SAAS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CAAC,CAAC,EACvF,CAAC,CACL,CAAC,EACJ,CAAC,CACA,CAAC,cAETnE,IAAA,CAACF,iBAAiB,EAAC2K,MAAM,CAAEzI,kBAAmB,CAAE,CAAC,cAEjDhC,IAAA,CAACH,iBAAiB,EAChB4K,MAAM,CAAE5I,WAAY,CACpB6I,OAAO,CAAElC,gBAAiB,CAC1B/F,SAAS,CAAEA,SAAU,CACrBG,KAAK,CAAEA,KAAM,CACbT,QAAQ,CAAEA,QAAS,CACnBG,uBAAuB,CAAEA,uBAAwB,CACjDqI,OAAO,CAAElC,WAAY,CACtB,CAAC,EACF,CAEN","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import _extends from"@babel/runtime/helpers/extends";/* eslint-disable @typescript-eslint/no-explicit-any */import React,{useEffect,useState}from"react";import{CircleAlert}from"lucide-react";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";function renderNoDataFallback(){return/*#__PURE__*/_jsxs("div",{className:"w-full py-8 flex flex-col items-center justify-center px-6 text-center",style:{minHeight:"180px"},children:[/*#__PURE__*/_jsx(CircleAlert,{className:"w-12 h-12 text-gray-400 mb-2"}),/*#__PURE__*/_jsx("h3",{className:"text-lg font-medium text-gray-900",children:"No data available"}),/*#__PURE__*/_jsx("p",{className:"mt-2 text-sm text-gray-500 max-w-md",children:"Check your filters or try a different time range."})]})}var COMPONENTS_WITH_CUSTOM_ERROR_HANDLING=new Set(["
|
|
1
|
+
import _extends from"@babel/runtime/helpers/extends";/* eslint-disable @typescript-eslint/no-explicit-any */import React,{useEffect,useState}from"react";import{CircleAlert}from"lucide-react";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";function renderNoDataFallback(){return/*#__PURE__*/_jsxs("div",{className:"w-full py-8 flex flex-col items-center justify-center px-6 text-center",style:{minHeight:"180px"},children:[/*#__PURE__*/_jsx(CircleAlert,{className:"w-12 h-12 text-gray-400 mb-2"}),/*#__PURE__*/_jsx("h3",{className:"text-lg font-medium text-gray-900",children:"No data available"}),/*#__PURE__*/_jsx("p",{className:"mt-2 text-sm text-gray-500 max-w-md",children:"Check your filters or try a different time range."})]})}var COMPONENTS_WITH_CUSTOM_ERROR_HANDLING=new Set(["Actions","ActionCard","Card","Chart","Markdown","Table","Tabs"]);export function ComponentWrapper(_ref){var children=_ref.children,componentProps=_ref.componentProps,_ref$className=_ref.className,className=_ref$className===void 0?"":_ref$className;var gjsModel=componentProps.gjsModel,componentType=componentProps.componentType;var _useState=useState(componentProps),currentProps=_useState[0],setCurrentProps=_useState[1];var _useState2=useState((gjsModel==null?void 0:gjsModel.get("attributes"))||{}),currentAttributes=_useState2[0],setCurrentAttributes=_useState2[1];function handlePropsChange(model){var updatedModelProps=model.get("componentProps");setCurrentProps(_extends({},componentProps,updatedModelProps))}function handleAttributesChange(model){var updatedAttributes=model.get("attributes");setCurrentAttributes(updatedAttributes)}useEffect(function(){if(gjsModel){gjsModel.on("change:componentProps",function(){return handlePropsChange(gjsModel)});gjsModel.on("change:attributes",function(){return handleAttributesChange(gjsModel)});return function(){gjsModel.off("change:componentProps",function(){return handlePropsChange(gjsModel)});gjsModel.off("change:attributes",function(){return handleAttributesChange(gjsModel)})}}return undefined},[gjsModel,componentProps,componentType]);var error=currentAttributes.error||currentProps.error;var isMissing=currentAttributes.isMissing||currentProps.isMissing;var hasCustomErrorHandling=componentType&&COMPONENTS_WITH_CUSTOM_ERROR_HANDLING.has(componentType);var shouldShowWrapperFallback=!hasCustomErrorHandling&&(isMissing||error);if(shouldShowWrapperFallback){return/*#__PURE__*/_jsx("div",{className:className,children:renderNoDataFallback()})}return/*#__PURE__*/_jsx(_Fragment,{children:children})}
|
|
2
2
|
//# sourceMappingURL=error-wrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-wrapper.js","names":["React","useEffect","useState","CircleAlert","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","renderNoDataFallback","className","style","minHeight","children","COMPONENTS_WITH_CUSTOM_ERROR_HANDLING","Set","ComponentWrapper","_ref","componentProps","_ref$className","gjsModel","componentType","_useState","currentProps","setCurrentProps","_useState2","get","currentAttributes","setCurrentAttributes","handlePropsChange","model","updatedModelProps","_extends","handleAttributesChange","updatedAttributes","on","off","undefined","error","isMissing","hasCustomErrorHandling","has","shouldShowWrapperFallback"],"sources":["../../../../src/shadcn/components/ui/error-wrapper.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect, useState } from 'react';\nimport { CircleAlert } from 'lucide-react';\n\ntype IssueInfo = {\n message: string;\n type?: string;\n};\n\ntype ComponentProps = {\n error?: IssueInfo;\n isMissing?: boolean;\n componentType?: string;\n gjsModel?: any;\n onDismissMissing?: (componentId: string) => void;\n [key: string]: unknown;\n};\n\ntype ComponentWrapperProps = {\n children: React.ReactNode;\n componentProps: ComponentProps;\n className?: string;\n};\n\nfunction renderNoDataFallback() {\n return (\n <div\n className=\"w-full py-8 flex flex-col items-center justify-center px-6 text-center\"\n style={{ minHeight: '180px' }}\n >\n <CircleAlert className=\"w-12 h-12 text-gray-400 mb-2\" />\n <h3 className=\"text-lg font-medium text-gray-900\">No data available</h3>\n <p className=\"mt-2 text-sm text-gray-500 max-w-md\">\n Check your filters or try a different time range.\n </p>\n </div>\n );\n}\n\nconst COMPONENTS_WITH_CUSTOM_ERROR_HANDLING = new Set([\n '
|
|
1
|
+
{"version":3,"file":"error-wrapper.js","names":["React","useEffect","useState","CircleAlert","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","renderNoDataFallback","className","style","minHeight","children","COMPONENTS_WITH_CUSTOM_ERROR_HANDLING","Set","ComponentWrapper","_ref","componentProps","_ref$className","gjsModel","componentType","_useState","currentProps","setCurrentProps","_useState2","get","currentAttributes","setCurrentAttributes","handlePropsChange","model","updatedModelProps","_extends","handleAttributesChange","updatedAttributes","on","off","undefined","error","isMissing","hasCustomErrorHandling","has","shouldShowWrapperFallback"],"sources":["../../../../src/shadcn/components/ui/error-wrapper.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport React, { useEffect, useState } from 'react';\nimport { CircleAlert } from 'lucide-react';\n\ntype IssueInfo = {\n message: string;\n type?: string;\n};\n\ntype ComponentProps = {\n error?: IssueInfo;\n isMissing?: boolean;\n componentType?: string;\n gjsModel?: any;\n onDismissMissing?: (componentId: string) => void;\n [key: string]: unknown;\n};\n\ntype ComponentWrapperProps = {\n children: React.ReactNode;\n componentProps: ComponentProps;\n className?: string;\n};\n\nfunction renderNoDataFallback() {\n return (\n <div\n className=\"w-full py-8 flex flex-col items-center justify-center px-6 text-center\"\n style={{ minHeight: '180px' }}\n >\n <CircleAlert className=\"w-12 h-12 text-gray-400 mb-2\" />\n <h3 className=\"text-lg font-medium text-gray-900\">No data available</h3>\n <p className=\"mt-2 text-sm text-gray-500 max-w-md\">\n Check your filters or try a different time range.\n </p>\n </div>\n );\n}\n\nconst COMPONENTS_WITH_CUSTOM_ERROR_HANDLING = new Set([\n 'Actions',\n 'ActionCard',\n 'Card',\n 'Chart',\n 'Markdown',\n 'Table',\n 'Tabs',\n]);\n\nexport function ComponentWrapper({\n children,\n componentProps,\n className = '',\n}: ComponentWrapperProps) {\n const { gjsModel, componentType } = componentProps;\n\n const [currentProps, setCurrentProps] = useState(componentProps);\n const [currentAttributes, setCurrentAttributes] = useState(gjsModel?.get('attributes') || {});\n\n function handlePropsChange(model: any) {\n const updatedModelProps = model.get('componentProps');\n setCurrentProps({\n ...componentProps,\n ...updatedModelProps,\n });\n }\n\n function handleAttributesChange(model: any) {\n const updatedAttributes = model.get('attributes');\n setCurrentAttributes(updatedAttributes);\n }\n\n useEffect(() => {\n if (gjsModel) {\n gjsModel.on('change:componentProps', () => handlePropsChange(gjsModel));\n gjsModel.on('change:attributes', () => handleAttributesChange(gjsModel));\n\n return () => {\n gjsModel.off('change:componentProps', () => handlePropsChange(gjsModel));\n gjsModel.off('change:attributes', () => handleAttributesChange(gjsModel));\n };\n }\n\n return undefined;\n }, [gjsModel, componentProps, componentType]);\n\n const error = currentAttributes.error || currentProps.error;\n const isMissing = currentAttributes.isMissing || currentProps.isMissing;\n\n const hasCustomErrorHandling =\n componentType && COMPONENTS_WITH_CUSTOM_ERROR_HANDLING.has(componentType);\n const shouldShowWrapperFallback = !hasCustomErrorHandling && (isMissing || error);\n\n if (shouldShowWrapperFallback) {\n return <div className={className}>{renderNoDataFallback()}</div>;\n }\n\n return <>{children}</>;\n}\n"],"mappings":"qDAAA,uDACA,MAAO,CAAAA,KAAK,EAAIC,SAAS,CAAEC,QAAQ,KAAQ,OAAO,CAClD,OAASC,WAAW,KAAQ,cAAc,CAAC,OAAAC,GAAA,IAAAC,IAAA,CAAAC,IAAA,IAAAC,KAAA,CAAAC,QAAA,IAAAC,SAAA,yBAsB3C,QAAS,CAAAC,oBAAoBA,CAAA,CAAG,CAC9B,mBACEH,KAAA,QACEI,SAAS,CAAC,wEAAwE,CAClFC,KAAK,CAAE,CAAEC,SAAS,CAAE,OAAQ,CAAE,CAAAC,QAAA,eAE9BT,IAAA,CAACF,WAAW,EAACQ,SAAS,CAAC,8BAA8B,CAAE,CAAC,cACxDN,IAAA,OAAIM,SAAS,CAAC,mCAAmC,CAAAG,QAAA,CAAC,mBAAiB,CAAI,CAAC,cACxET,IAAA,MAAGM,SAAS,CAAC,qCAAqC,CAAAG,QAAA,CAAC,mDAEnD,CAAG,CAAC,EACD,CAET,CAEA,GAAM,CAAAC,qCAAqC,CAAG,GAAI,CAAAC,GAAG,CAAC,CACpD,SAAS,CACT,YAAY,CACZ,MAAM,CACN,OAAO,CACP,UAAU,CACV,OAAO,CACP,MAAM,CACP,CAAC,CAEF,MAAO,SAAS,CAAAC,gBAAgBA,CAAAC,IAAA,CAIN,IAHxB,CAAAJ,QAAQ,CAAAI,IAAA,CAARJ,QAAQ,CACRK,cAAc,CAAAD,IAAA,CAAdC,cAAc,CAAAC,cAAA,CAAAF,IAAA,CACd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AQ,CAAC,EAC1E,CACF,CAEA,MAAO,CAAAiB,SACT,CAAC,CAAE,CAACjB,QAAQ,CAAEF,cAAc,CAAEG,aAAa,CAAC,CAAC,CAE7C,GAAM,CAAAiB,KAAK,CAAGX,iBAAiB,CAACW,KAAK,EAAIf,YAAY,CAACe,KAAK,CAC3D,GAAM,CAAAC,SAAS,CAAGZ,iBAAiB,CAACY,SAAS,EAAIhB,YAAY,CAACgB,SAAS,CAEvE,GAAM,CAAAC,sBAAsB,CAC1BnB,aAAa,EAAIP,qCAAqC,CAAC2B,GAAG,CAACpB,aAAa,CAAC,CAC3E,GAAM,CAAAqB,yBAAyB,CAAG,CAACF,sBAAsB,GAAKD,SAAS,EAAID,KAAK,CAAC,CAEjF,GAAII,yBAAyB,CAAE,CAC7B,mBAAOtC,IAAA,QAAKM,SAAS,CAAEA,SAAU,CAAAG,QAAA,CAAEJ,oBAAoB,CAAC,CAAC,CAAM,CACjE,CAEA,mBAAOL,IAAA,CAAAI,SAAA,EAAAK,QAAA,CAAGA,QAAQ,CAAG,CACvB","ignoreList":[]}
|
package/declaration.d.js
DELETED
package/declaration.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declaration.d.js","names":[],"sources":["../src/declaration.d.ts"],"sourcesContent":["declare module '*.gif';"],"mappings":"","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { QueryCacheEntry, InteractionType, InteractionState } from './query-cache-utils';
|
|
3
|
-
type QueryCacheContextValue = {
|
|
4
|
-
getCachedQuery: (componentId: string, interactionType: InteractionType, state: InteractionState) => QueryCacheEntry | null;
|
|
5
|
-
setCachedQuery: (componentId: string, interactionType: InteractionType, state: InteractionState, entry: QueryCacheEntry) => void;
|
|
6
|
-
invalidateComponent: (componentId: string) => void;
|
|
7
|
-
invalidateAll: () => void;
|
|
8
|
-
isCached: (componentId: string, interactionType: InteractionType, state: InteractionState) => boolean;
|
|
9
|
-
};
|
|
10
|
-
type QueryCacheProviderProps = {
|
|
11
|
-
children: React.ReactNode;
|
|
12
|
-
maxCacheSize?: number;
|
|
13
|
-
maxCacheAge?: number;
|
|
14
|
-
};
|
|
15
|
-
export declare function QueryCacheProvider({ children, maxCacheSize, maxCacheAge, }: QueryCacheProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
-
export declare function useQueryCache(): QueryCacheContextValue;
|
|
17
|
-
export declare function useInvalidateCacheOnChange(componentId: string | undefined, dependencies: unknown[]): void;
|
|
18
|
-
export {};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import React,{createContext,useContext,useCallback,useRef,useMemo}from"react";import{getGlobalQueryCache,configureGlobalQueryCache}from"./query-cache-singleton";import{jsx as _jsx}from"react/jsx-runtime";var QueryCacheContext=/*#__PURE__*/createContext(null);export function QueryCacheProvider(_ref){var children=_ref.children,_ref$maxCacheSize=_ref.maxCacheSize,maxCacheSize=_ref$maxCacheSize===void 0?100:_ref$maxCacheSize,_ref$maxCacheAge=_ref.maxCacheAge,maxCacheAge=_ref$maxCacheAge===void 0?5*60*1000:_ref$maxCacheAge;var isConfigured=useRef(false);if(!isConfigured.current){configureGlobalQueryCache(maxCacheSize,maxCacheAge);isConfigured.current=true}var cacheManager=useRef(getGlobalQueryCache()).current;var getCachedQuery=useCallback(function(componentId,interactionType,state){return cacheManager.getCachedQuery(componentId,interactionType,state)},[cacheManager]);var setCachedQuery=useCallback(function(componentId,interactionType,state,entry){cacheManager.setCachedQuery(componentId,interactionType,state,entry)},[cacheManager]);var invalidateComponent=useCallback(function(componentId){cacheManager.invalidateComponent(componentId)},[cacheManager]);var invalidateAll=useCallback(function(){cacheManager.invalidateAll()},[cacheManager]);var isCached=useCallback(function(componentId,interactionType,state){return cacheManager.isCached(componentId,interactionType,state)},[cacheManager]);var value=useMemo(function(){return{getCachedQuery:getCachedQuery,setCachedQuery:setCachedQuery,invalidateComponent:invalidateComponent,invalidateAll:invalidateAll,isCached:isCached}},[getCachedQuery,setCachedQuery,invalidateComponent,invalidateAll,isCached]);return/*#__PURE__*/_jsx(QueryCacheContext.Provider,{value:value,children:children})}export function useQueryCache(){var context=useContext(QueryCacheContext);if(!context){throw new Error("useQueryCache must be used within a QueryCacheProvider")}return context}export function useInvalidateCacheOnChange(componentId,dependencies){var _useQueryCache=useQueryCache(),invalidateComponent=_useQueryCache.invalidateComponent;var prevDepsRef=useRef([]);React.useEffect(function(){if(prevDepsRef.current.length===0){prevDepsRef.current=dependencies;return}var hasChanged=dependencies.some(function(dep,index){return dep!==prevDepsRef.current[index]});if(hasChanged&&componentId){invalidateComponent(componentId)}prevDepsRef.current=dependencies},[componentId,invalidateComponent,dependencies])}
|
|
2
|
-
//# sourceMappingURL=query-cache-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-cache-context.js","names":["React","createContext","useContext","useCallback","useRef","useMemo","getGlobalQueryCache","configureGlobalQueryCache","jsx","_jsx","QueryCacheContext","QueryCacheProvider","_ref","children","_ref$maxCacheSize","maxCacheSize","_ref$maxCacheAge","maxCacheAge","isConfigured","current","cacheManager","getCachedQuery","componentId","interactionType","state","setCachedQuery","entry","invalidateComponent","invalidateAll","isCached","value","Provider","useQueryCache","context","Error","useInvalidateCacheOnChange","dependencies","_useQueryCache","prevDepsRef","useEffect","length","hasChanged","some","dep","index"],"sources":["../../../src/plugins/helpers/query-cache-context.tsx"],"sourcesContent":["import React, { createContext, useContext, useCallback, useRef, useMemo } from 'react';\nimport {\n QueryCacheEntry,\n InteractionType,\n InteractionState,\n} from './query-cache-utils';\nimport { getGlobalQueryCache, configureGlobalQueryCache } from './query-cache-singleton';\n\ntype QueryCacheContextValue = {\n getCachedQuery: (\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState\n ) => QueryCacheEntry | null;\n \n setCachedQuery: (\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState,\n entry: QueryCacheEntry\n ) => void;\n \n invalidateComponent: (componentId: string) => void;\n\n invalidateAll: () => void;\n\n isCached: (\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState\n ) => boolean;\n};\n\nconst QueryCacheContext = createContext<QueryCacheContextValue | null>(null);\n\ntype QueryCacheProviderProps = {\n children: React.ReactNode;\n maxCacheSize?: number;\n maxCacheAge?: number;\n};\n\nexport function QueryCacheProvider({\n children,\n maxCacheSize = 100,\n maxCacheAge = 5 * 60 * 1000, // 5 minutes\n}: QueryCacheProviderProps) {\n const isConfigured = useRef(false);\n \n if (!isConfigured.current) {\n configureGlobalQueryCache(maxCacheSize, maxCacheAge);\n isConfigured.current = true;\n }\n\n const cacheManager = useRef(getGlobalQueryCache()).current;\n \n const getCachedQuery = useCallback(\n (\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState\n ): QueryCacheEntry | null => {\n return cacheManager.getCachedQuery(componentId, interactionType, state);\n },\n [cacheManager]\n );\n \n const setCachedQuery = useCallback(\n (\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState,\n entry: QueryCacheEntry\n ) => {\n cacheManager.setCachedQuery(componentId, interactionType, state, entry);\n },\n [cacheManager]\n );\n \n const invalidateComponent = useCallback(\n (componentId: string) => {\n cacheManager.invalidateComponent(componentId);\n },\n [cacheManager]\n );\n \n const invalidateAll = useCallback(() => {\n cacheManager.invalidateAll();\n }, [cacheManager]);\n \n const isCached = useCallback(\n (\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState\n ): boolean => {\n return cacheManager.isCached(componentId, interactionType, state);\n },\n [cacheManager]\n );\n \n const value = useMemo(\n () => ({\n getCachedQuery,\n setCachedQuery,\n invalidateComponent,\n invalidateAll,\n isCached,\n }),\n [getCachedQuery, setCachedQuery, invalidateComponent, invalidateAll, isCached]\n );\n \n return (\n <QueryCacheContext.Provider value={value}>\n {children}\n </QueryCacheContext.Provider>\n );\n}\n\nexport function useQueryCache(): QueryCacheContextValue {\n const context = useContext(QueryCacheContext);\n \n if (!context) {\n throw new Error('useQueryCache must be used within a QueryCacheProvider');\n }\n \n return context;\n}\n\nexport function useInvalidateCacheOnChange(\n componentId: string | undefined,\n dependencies: unknown[]\n): void {\n const { invalidateComponent } = useQueryCache();\n const prevDepsRef = useRef<unknown[]>([]);\n \n React.useEffect(() => {\n if (prevDepsRef.current.length === 0) {\n prevDepsRef.current = dependencies;\n\n return;\n }\n \n const hasChanged = dependencies.some(\n (dep, index) => dep !== prevDepsRef.current[index]\n );\n \n if (hasChanged && componentId) {\n invalidateComponent(componentId);\n }\n \n prevDepsRef.current = dependencies;\n }, [componentId, invalidateComponent, dependencies]);\n}\n\n"],"mappings":"AAAA,MAAO,CAAAA,KAAK,EAAIC,aAAa,CAAEC,UAAU,CAAEC,WAAW,CAAEC,MAAM,CAAEC,OAAO,KAAQ,OAAO,CAMtF,OAASC,mBAAmB,CAAEC,yBAAyB,KAAQ,yBAAyB,CAAC,OAAAC,GAAA,IAAAC,IAAA,yBA2BzF,GAAM,CAAAC,iBAAiB,cAAGT,aAAa,CAAgC,IAAI,CAAC,CAQ5E,MAAO,SAAS,CAAAU,kBAAkBA,CAAAC,IAAA,CAIN,IAH1B,CAAAC,QAAQ,CAAAD,IAAA,CAARC,QAAQ,CAAAC,iBAAA,CAAAF,IAAA,CACRG,YAAY,CAAZA,YAAY,CAAAD,iBAAA,UAAG,GAAG,CAAAA,iBAAA,CAAAE,gBAAA,CAAAJ,IAAA,CAClBK,WAAW,CAAXA,WAAW,CAAAD,gBAAA,UAAG,CAAC,CAAG,EAAE,CAAG,IAAI,CAAAA,gBAAA,CAE3B,GAAM,CAAAE,YAAY,CAAGd,MAAM,CAAC,KAAK,CAAC,CAElC,GAAI,CAACc,YAAY,CAACC,OAAO,CAAE,CACzBZ,yBAAyB,CAACQ,YAAY,CAAEE,WAAW,CAAC,CACpDC,YAAY,CAACC,OAAO,CAAG,IACzB,CAEA,GAAM,CAAAC,YAAY,CAAGhB,MAAM,CAACE,mBAAmB,CAAC,CAAC,CAAC,CAACa,OAAO,CAE1D,GAAM,CAAAE,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B,QAAQ,EAACD,KAAK,CAAEA,KAAM,CAAAjB,QAAA,CACtCA,QAAQ,CACiB,CAEhC,CAEA,MAAO,SAAS,CAAAmB,aAAaA,CAAA,CAA2B,CACtD,GAAM,CAAAC,OAAO,CAAG/B,UAAU,CAACQ,iBAAiB,CAAC,CAE7C,GAAI,CAACuB,OAAO,CAAE,CACZ,KAAM,IAAI,CAAAC,KAAK,CAAC,wDAAwD,CAC1E,CAEA,MAAO,CAAAD,OACT,CAEA,MAAO,SAAS,CAAAE,0BAA0BA,CACxCb,WAA+B,CAC/Bc,YAAuB,CACjB,CACN,IAAAC,cAAA,CAAgCL,aAAa,CAAC,CAAC,CAAvCL,mBAAmB,CAAAU,cAAA,CAAnBV,mBAAmB,CAC3B,GAAM,CAAAW,WAAW,CAAGlC,MAAM,CAAY,EAAE,CAAC,CAEzCJ,KAAK,CAACuC,SAAS,CAAC,UAAM,CACpB,GAAID,WAAW,CAACnB,OAAO,CAACqB,MAAM,GAAK,CAAC,CAAE,CACpCF,WAAW,CAACnB,OAAO,CAAGiB,YAAY,CAElC,MACF,CAEA,GAAM,CAAAK,UAAU,CAAGL,YAAY,CAACM,IAAI,CAClC,SAACC,GAAG,CAAEC,KAAK,QAAK,CAAAD,GAAG,GAAKL,WAAW,CAACnB,OAAO,CAACyB,KAAK,CAAC,CACpD,CAAC,CAED,GAAIH,UAAU,EAAInB,WAAW,CAAE,CAC7BK,mBAAmB,CAACL,WAAW,CACjC,CAEAgB,WAAW,CAACnB,OAAO,CAAGiB,YACxB,CAAC,CAAE,CAACd,WAAW,CAAEK,mBAAmB,CAAES,YAAY,CAAC,CACrD","ignoreList":[]}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { QueryCacheEntry, InteractionType, InteractionState } from './query-cache-utils';
|
|
2
|
-
declare class QueryCacheManager {
|
|
3
|
-
private cache;
|
|
4
|
-
private maxCacheSize;
|
|
5
|
-
private maxCacheAge;
|
|
6
|
-
constructor(maxCacheSize?: number, maxCacheAge?: number);
|
|
7
|
-
getCachedQuery(componentId: string, interactionType: InteractionType, state: InteractionState): QueryCacheEntry | null;
|
|
8
|
-
setCachedQuery(componentId: string, interactionType: InteractionType, state: InteractionState, entry: QueryCacheEntry): void;
|
|
9
|
-
invalidateComponent(componentId: string): void;
|
|
10
|
-
invalidateAll(): void;
|
|
11
|
-
isCached(componentId: string, interactionType: InteractionType, state: InteractionState): boolean;
|
|
12
|
-
private cleanupCache;
|
|
13
|
-
getStats(): {
|
|
14
|
-
maxAge: number;
|
|
15
|
-
maxSize: number;
|
|
16
|
-
size: number;
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
export declare function getGlobalQueryCache(): QueryCacheManager;
|
|
20
|
-
export declare function resetGlobalQueryCache(): void;
|
|
21
|
-
export declare function configureGlobalQueryCache(maxCacheSize?: number, maxCacheAge?: number): void;
|
|
22
|
-
export {};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import _extends from"@babel/runtime/helpers/extends";function _createForOfIteratorHelperLoose(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}import{createCacheKey,getInvalidationPattern}from"./query-cache-utils";var QueryCacheManager=/*#__PURE__*/function(){// 5 minutes
|
|
2
|
-
function QueryCacheManager(maxCacheSize,maxCacheAge){if(maxCacheSize===void 0){maxCacheSize=100}if(maxCacheAge===void 0){maxCacheAge=5*60*1000}this.cache=new Map;this.maxCacheSize=100;this.maxCacheAge=5*60*1000;this.maxCacheSize=maxCacheSize;this.maxCacheAge=maxCacheAge}var _proto=QueryCacheManager.prototype;_proto.getCachedQuery=function getCachedQuery(componentId,interactionType,state){var key=createCacheKey(componentId,interactionType,state);var entry=this.cache.get(key);if(!entry){return null}var now=Date.now();if(now-entry.timestamp>this.maxCacheAge){this.cache["delete"](key);return null}return entry};_proto.setCachedQuery=function setCachedQuery(componentId,interactionType,state,entry){var key=createCacheKey(componentId,interactionType,state);this.cache.set(key,_extends({},entry,{timestamp:Date.now()}));if(this.cache.size>this.maxCacheSize){this.cleanupCache()}};_proto.invalidateComponent=function invalidateComponent(componentId){var pattern=getInvalidationPattern(componentId);for(var _iterator=_createForOfIteratorHelperLoose(this.cache.keys()),_step;!(_step=_iterator()).done;){var key=_step.value;if(pattern.test(key)){this.cache["delete"](key)}}};_proto.invalidateAll=function invalidateAll(){this.cache.clear()};_proto.isCached=function isCached(componentId,interactionType,state){return this.getCachedQuery(componentId,interactionType,state)!==null};_proto.cleanupCache=function cleanupCache(){var now=Date.now();for(var _iterator2=_createForOfIteratorHelperLoose(this.cache.entries()),_step2;!(_step2=_iterator2()).done;){var _step2$value=_step2.value,_key=_step2$value[0],entry=_step2$value[1];if(now-entry.timestamp>this.maxCacheAge){this.cache["delete"](_key)}}if(this.cache.size>this.maxCacheSize){var entries=Array.from(this.cache.entries());entries.sort(function(a,b){return a[1].timestamp-b[1].timestamp});var entriesToRemove=entries.slice(0,this.cache.size-this.maxCacheSize);for(var _iterator3=_createForOfIteratorHelperLoose(entriesToRemove),_step3;!(_step3=_iterator3()).done;){var _step3$value=_step3.value,key=_step3$value[0];this.cache["delete"](key)}}};_proto.getStats=function getStats(){return{maxAge:this.maxCacheAge,maxSize:this.maxCacheSize,size:this.cache.size}};return QueryCacheManager}();var globalCacheInstance=null;export function getGlobalQueryCache(){if(!globalCacheInstance){globalCacheInstance=new QueryCacheManager}return globalCacheInstance}export function resetGlobalQueryCache(){globalCacheInstance=null}export function configureGlobalQueryCache(maxCacheSize,maxCacheAge){if(maxCacheSize===void 0){maxCacheSize=100}if(maxCacheAge===void 0){maxCacheAge=5*60*1000}globalCacheInstance=new QueryCacheManager(maxCacheSize,maxCacheAge)}
|
|
3
|
-
//# sourceMappingURL=query-cache-singleton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-cache-singleton.js","names":["createCacheKey","getInvalidationPattern","QueryCacheManager","maxCacheSize","maxCacheAge","cache","Map","_proto","prototype","getCachedQuery","componentId","interactionType","state","key","entry","get","now","Date","timestamp","setCachedQuery","set","_extends","size","cleanupCache","invalidateComponent","pattern","_iterator","_createForOfIteratorHelperLoose","keys","_step","done","value","test","invalidateAll","clear","isCached","_iterator2","entries","_step2","_step2$value","Array","from","sort","a","b","entriesToRemove","slice","_iterator3","_step3","_step3$value","getStats","maxAge","maxSize","globalCacheInstance","getGlobalQueryCache","resetGlobalQueryCache","configureGlobalQueryCache"],"sources":["../../../src/plugins/helpers/query-cache-singleton.ts"],"sourcesContent":["import {\n QueryCacheEntry,\n InteractionType,\n InteractionState,\n createCacheKey,\n getInvalidationPattern\n} from './query-cache-utils';\n\nclass QueryCacheManager {\n private cache: Map<string, QueryCacheEntry> = new Map();\n private maxCacheSize = 100;\n private maxCacheAge: number = 5 * 60 * 1000; // 5 minutes\n\n constructor(maxCacheSize = 100, maxCacheAge = 5 * 60 * 1000) {\n this.maxCacheSize = maxCacheSize;\n this.maxCacheAge = maxCacheAge;\n }\n\n getCachedQuery(\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState\n ): QueryCacheEntry | null {\n const key = createCacheKey(componentId, interactionType, state);\n const entry = this.cache.get(key);\n \n if (!entry) {\n return null;\n }\n \n const now = Date.now();\n\n if (now - entry.timestamp > this.maxCacheAge) {\n this.cache.delete(key);\n\n return null;\n }\n \n return entry;\n }\n\n setCachedQuery(\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState,\n entry: QueryCacheEntry\n ): void {\n const key = createCacheKey(componentId, interactionType, state);\n this.cache.set(key, {\n ...entry,\n timestamp: Date.now(),\n });\n \n if (this.cache.size > this.maxCacheSize) {\n this.cleanupCache();\n }\n }\n\n invalidateComponent(componentId: string): void {\n const pattern = getInvalidationPattern(componentId);\n \n for (const key of this.cache.keys()) {\n if (pattern.test(key)) {\n this.cache.delete(key);\n }\n }\n }\n\n invalidateAll(): void {\n this.cache.clear();\n }\n\n isCached(\n componentId: string,\n interactionType: InteractionType,\n state: InteractionState\n ): boolean {\n return this.getCachedQuery(componentId, interactionType, state) !== null;\n }\n\n private cleanupCache(): void {\n const now = Date.now();\n \n for (const [key, entry] of this.cache.entries()) {\n if (now - entry.timestamp > this.maxCacheAge) {\n this.cache.delete(key);\n }\n }\n \n if (this.cache.size > this.maxCacheSize) {\n const entries = Array.from(this.cache.entries());\n entries.sort((a, b) => a[1].timestamp - b[1].timestamp);\n \n const entriesToRemove = entries.slice(0, this.cache.size - this.maxCacheSize);\n\n for (const [key] of entriesToRemove) {\n this.cache.delete(key);\n }\n }\n }\n\n getStats(): { maxAge: number; maxSize: number; size: number } {\n return {\n maxAge: this.maxCacheAge,\n maxSize: this.maxCacheSize,\n size: this.cache.size,\n };\n }\n}\n\nlet globalCacheInstance: QueryCacheManager | null = null;\n\nexport function getGlobalQueryCache(): QueryCacheManager {\n if (!globalCacheInstance) {\n globalCacheInstance = new QueryCacheManager();\n }\n\n return globalCacheInstance;\n}\n\nexport function resetGlobalQueryCache(): void {\n globalCacheInstance = null;\n}\n\nexport function configureGlobalQueryCache(maxCacheSize = 100, maxCacheAge = 5 * 60 * 1000): void {\n globalCacheInstance = new QueryCacheManager(maxCacheSize, maxCacheAge);\n}\n\n"],"m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AAA,IAGH,GAAI,CAAAmD,mBAA6C,CAAG,IAAI,CAExD,MAAO,SAAS,CAAAC,mBAAmBA,CAAA,CAAsB,CACvD,GAAI,CAACD,mBAAmB,CAAE,CACxBA,mBAAmB,CAAG,GAAI,CAAAnD,iBAC5B,CAEA,MAAO,CAAAmD,mBACT,CAEA,MAAO,SAAS,CAAAE,qBAAqBA,CAAA,CAAS,CAC5CF,mBAAmB,CAAG,IACxB,CAEA,MAAO,SAAS,CAAAG,yBAAyBA,CAACrD,YAAY,CAAQC,WAAW,CAAwB,IAAvDD,YAAY,WAAZA,YAAY,CAAG,GAAG,IAAEC,WAAW,WAAXA,WAAW,CAAG,CAAC,CAAG,EAAE,CAAG,IAAI,CACvFiD,mBAAmB,CAAG,GAAI,CAAAnD,iBAAiB,CAACC,YAAY,CAAEC,WAAW,CACvE","ignoreList":[]}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export type InteractionType = 'semanticLayerQuery' | 'tableButton';
|
|
2
|
-
export type InteractionState = {
|
|
3
|
-
[key: string]: unknown;
|
|
4
|
-
bodyContent?: unknown;
|
|
5
|
-
chartData?: unknown;
|
|
6
|
-
chartDataFingerprint?: string;
|
|
7
|
-
chartDataLength?: number;
|
|
8
|
-
dataFingerprint?: string;
|
|
9
|
-
dataLength?: number;
|
|
10
|
-
error?: unknown;
|
|
11
|
-
filterValue?: unknown;
|
|
12
|
-
filters?: Record<string, unknown>;
|
|
13
|
-
footerContent?: unknown;
|
|
14
|
-
headerContent?: unknown;
|
|
15
|
-
isMissing?: unknown;
|
|
16
|
-
pageNumber?: number;
|
|
17
|
-
pageSize?: number;
|
|
18
|
-
searchQuery?: string;
|
|
19
|
-
searchValue?: string;
|
|
20
|
-
sortColumn?: string | null;
|
|
21
|
-
sortDirection?: 'asc' | 'desc' | null;
|
|
22
|
-
summaryText?: unknown;
|
|
23
|
-
};
|
|
24
|
-
export type QueryCacheEntry = {
|
|
25
|
-
queryHeadings: string[];
|
|
26
|
-
sqlQuery: string | string[];
|
|
27
|
-
tableButtonExplanations: Array<{
|
|
28
|
-
action: string;
|
|
29
|
-
buttonClassName?: string;
|
|
30
|
-
buttonStyle?: Record<string, unknown>;
|
|
31
|
-
explanation: string;
|
|
32
|
-
formFields?: Record<string, unknown>;
|
|
33
|
-
jsonBody?: unknown;
|
|
34
|
-
operationDescription?: string;
|
|
35
|
-
operationSummary?: string;
|
|
36
|
-
requestUrl?: string;
|
|
37
|
-
}>;
|
|
38
|
-
timestamp: number;
|
|
39
|
-
};
|
|
40
|
-
export type CacheKey = {
|
|
41
|
-
componentId: string;
|
|
42
|
-
interactionType: InteractionType;
|
|
43
|
-
state: InteractionState;
|
|
44
|
-
};
|
|
45
|
-
export declare function createCacheKey(componentId: string, interactionType: InteractionType, interactionState: InteractionState): string;
|
|
46
|
-
export declare function extractInteractionState(componentProps: Record<string, unknown>): InteractionState;
|
|
47
|
-
export declare function areStatesEqual(state1: InteractionState, state2: InteractionState): boolean;
|
|
48
|
-
export declare function getInvalidationPattern(componentId: string): RegExp;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
function _createForOfIteratorHelperLoose(r,e){var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var o=0;return function(){return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,a){if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}export function createCacheKey(componentId,interactionType,interactionState){var sortedState=sortObjectKeys(interactionState);var stateString=JSON.stringify(sortedState);return componentId+"::"+interactionType+"::"+stateString}function sortObjectKeys(obj){if(obj===null||obj===undefined){return obj}if(Array.isArray(obj)){return obj.map(function(item){return sortObjectKeys(item)})}if(typeof obj==="object"){var sorted={};var keys=Object.keys(obj).sort();for(var _iterator=_createForOfIteratorHelperLoose(keys),_step;!(_step=_iterator()).done;){var _key=_step.value;sorted[_key]=sortObjectKeys(obj[_key])}return sorted}return obj}export function extractInteractionState(componentProps){var state={};if("pagination"in componentProps&&typeof componentProps.pagination==="object"&&componentProps.pagination){var pagination=componentProps.pagination;if("pageNumber"in pagination&&typeof pagination.pageNumber==="number"){state.pageNumber=pagination.pageNumber}if("pageSize"in pagination&&typeof pagination.pageSize==="number"){state.pageSize=pagination.pageSize}}if("sortColumn"in componentProps){state.sortColumn=componentProps.sortColumn}if("sortDirection"in componentProps){state.sortDirection=componentProps.sortDirection}if("filters"in componentProps&&typeof componentProps.filters==="object"){state.filters=componentProps.filters}if("value"in componentProps){state.filterValue=componentProps.value}if("searchQuery"in componentProps&&typeof componentProps.searchQuery==="string"){state.searchQuery=componentProps.searchQuery}if("searchValue"in componentProps&&typeof componentProps.searchValue==="string"){state.searchValue=componentProps.searchValue}if("data"in componentProps){var data=componentProps.data;if(Array.isArray(data)&&data.length>0){state.dataLength=data.length;var firstRow=data[0];var lastRow=data[data.length-1];if(firstRow&&typeof firstRow==="object"){state.dataFingerprint=JSON.stringify({firstId:firstRow.id||Object.values(firstRow)[0],lastId:lastRow&&typeof lastRow==="object"?lastRow.id||Object.values(lastRow)[0]:null,length:data.length})}}else if(data&&typeof data==="object"&&data.name==="__peak_placeholder"){state.dataFingerprint="__peak_placeholder"}else{state.dataFingerprint="empty"}}if("bodyContent"in componentProps){state.bodyContent=componentProps.bodyContent}if("headerContent"in componentProps){state.headerContent=componentProps.headerContent}if("footerContent"in componentProps){state.footerContent=componentProps.footerContent}if("chartData"in componentProps){var chartData=componentProps.chartData;if(Array.isArray(chartData)){state.chartDataLength=chartData.length;state.chartDataFingerprint=JSON.stringify(chartData)}}if("summaryText"in componentProps){state.summaryText=componentProps.summaryText}if("error"in componentProps){state.error=componentProps.error}if("isMissing"in componentProps){state.isMissing=componentProps.isMissing}return state}export function areStatesEqual(state1,state2){return createCacheKey("test","semanticLayerQuery",state1)===createCacheKey("test","semanticLayerQuery",state2)}export function getInvalidationPattern(componentId){var escapedId=componentId.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");// eslint-disable-next-line security/detect-non-literal-regexp
|
|
2
|
-
return new RegExp("^"+escapedId+"::")}
|
|
3
|
-
//# sourceMappingURL=query-cache-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-cache-utils.js","names":["createCacheKey","componentId","interactionType","interactionState","sortedState","sortObjectKeys","stateString","JSON","stringify","obj","undefined","Array","isArray","map","item","sorted","keys","Object","sort","_iterator","_createForOfIteratorHelperLoose","_step","done","key","value","extractInteractionState","componentProps","state","pagination","pageNumber","pageSize","sortColumn","sortDirection","filters","filterValue","searchQuery","searchValue","data","length","dataLength","firstRow","lastRow","dataFingerprint","firstId","id","values","lastId","name","bodyContent","headerContent","footerContent","chartData","chartDataLength","chartDataFingerprint","summaryText","error","isMissing","areStatesEqual","state1","state2","getInvalidationPattern","escapedId","replace","RegExp"],"sources":["../../../src/plugins/helpers/query-cache-utils.ts"],"sourcesContent":["\nexport type InteractionType = 'semanticLayerQuery' | 'tableButton';\n\nexport type InteractionState = {\n [key: string]: unknown;\n bodyContent?: unknown;\n chartData?: unknown;\n chartDataFingerprint?: string;\n chartDataLength?: number;\n dataFingerprint?: string;\n dataLength?: number;\n error?: unknown;\n filterValue?: unknown;\n filters?: Record<string, unknown>;\n footerContent?: unknown;\n headerContent?: unknown;\n isMissing?: unknown;\n pageNumber?: number;\n pageSize?: number;\n searchQuery?: string;\n searchValue?: string;\n sortColumn?: string | null;\n sortDirection?: 'asc' | 'desc' | null;\n summaryText?: unknown;\n};\n\nexport type QueryCacheEntry = {\n queryHeadings: string[];\n sqlQuery: string | string[];\n tableButtonExplanations: Array<{\n action: string;\n buttonClassName?: string;\n buttonStyle?: Record<string, unknown>;\n explanation: string;\n formFields?: Record<string, unknown>;\n jsonBody?: unknown;\n operationDescription?: string;\n operationSummary?: string;\n requestUrl?: string;\n }>;\n timestamp: number;\n};\n\nexport type CacheKey = {\n componentId: string;\n interactionType: InteractionType;\n state: InteractionState;\n};\n\nexport function createCacheKey(\n componentId: string,\n interactionType: InteractionType,\n interactionState: InteractionState\n): string {\n const sortedState = sortObjectKeys(interactionState);\n \n const stateString = JSON.stringify(sortedState);\n \n return `${componentId}::${interactionType}::${stateString}`;\n}\n\nfunction sortObjectKeys(obj: unknown): unknown {\n if (obj === null || obj === undefined) {\n return obj;\n }\n \n if (Array.isArray(obj)) {\n return obj.map(item => sortObjectKeys(item));\n }\n \n if (typeof obj === 'object') {\n const sorted: Record<string, unknown> = {};\n const keys = Object.keys(obj as Record<string, unknown>).sort();\n \n for (const key of keys) {\n sorted[key] = sortObjectKeys((obj as Record<string, unknown>)[key]);\n }\n \n return sorted;\n }\n \n return obj;\n}\n\nexport function extractInteractionState(componentProps: Record<string, unknown>): InteractionState {\n const state: InteractionState = {};\n \n if ('pagination' in componentProps && typeof componentProps.pagination === 'object' && componentProps.pagination) {\n const pagination = componentProps.pagination as Record<string, unknown>;\n\n if ('pageNumber' in pagination && typeof pagination.pageNumber === 'number') {\n state.pageNumber = pagination.pageNumber;\n }\n\n if ('pageSize' in pagination && typeof pagination.pageSize === 'number') {\n state.pageSize = pagination.pageSize;\n }\n }\n \n if ('sortColumn' in componentProps) {\n state.sortColumn = componentProps.sortColumn as string | null;\n }\n \n if ('sortDirection' in componentProps) {\n state.sortDirection = componentProps.sortDirection as 'asc' | 'desc' | null;\n }\n \n if ('filters' in componentProps && typeof componentProps.filters === 'object') {\n state.filters = componentProps.filters as Record<string, unknown>;\n }\n \n if ('value' in componentProps) {\n state.filterValue = componentProps.value as unknown;\n }\n \n if ('searchQuery' in componentProps && typeof componentProps.searchQuery === 'string') {\n state.searchQuery = componentProps.searchQuery;\n }\n \n if ('searchValue' in componentProps && typeof componentProps.searchValue === 'string') {\n state.searchValue = componentProps.searchValue;\n }\n\n if ('data' in componentProps) {\n const data = componentProps.data;\n \n if (Array.isArray(data) && data.length > 0) {\n state.dataLength = data.length;\n const firstRow = data[0];\n const lastRow = data[data.length - 1];\n \n if (firstRow && typeof firstRow === 'object') {\n state.dataFingerprint = JSON.stringify({\n firstId: (firstRow as Record<string, unknown>).id || Object.values(firstRow)[0],\n lastId: lastRow && typeof lastRow === 'object' \n ? ((lastRow as Record<string, unknown>).id || Object.values(lastRow)[0])\n : null,\n length: data.length\n });\n }\n } else if (data && typeof data === 'object' && (data as Record<string, unknown>).name === '__peak_placeholder') {\n state.dataFingerprint = '__peak_placeholder';\n } else {\n state.dataFingerprint = 'empty';\n }\n }\n \n if ('bodyContent' in componentProps) {\n state.bodyContent = componentProps.bodyContent as unknown;\n }\n \n if ('headerContent' in componentProps) {\n state.headerContent = componentProps.headerContent as unknown;\n }\n \n if ('footerContent' in componentProps) {\n state.footerContent = componentProps.footerContent as unknown;\n }\n \n if ('chartData' in componentProps) {\n const chartData = componentProps.chartData;\n\n if (Array.isArray(chartData)) {\n state.chartDataLength = chartData.length;\n state.chartDataFingerprint = JSON.stringify(chartData);\n }\n }\n \n if ('summaryText' in componentProps) {\n state.summaryText = componentProps.summaryText as unknown;\n }\n \n if ('error' in componentProps) {\n state.error = componentProps.error as unknown;\n }\n \n if ('isMissing' in componentProps) {\n state.isMissing = componentProps.isMissing as unknown;\n }\n \n return state;\n}\n\nexport function areStatesEqual(state1: InteractionState, state2: InteractionState): boolean {\n return createCacheKey('test', 'semanticLayerQuery', state1) === \n createCacheKey('test', 'semanticLayerQuery', state2);\n}\n\nexport function getInvalidationPattern(componentId: string): RegExp {\n const escapedId = componentId.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n\n // eslint-disable-next-line security/detect-non-literal-regexp\n return new RegExp(`^${escapedId}::`);\n}\n\n"],"mappings":"y6BAiDA,MAAO,SAAS,CAAAA,cAAcA,CAC5BC,WAAmB,CACnBC,eAAgC,CAChCC,gBAAkC,CAC1B,CACR,GAAM,CAAAC,WAAW,CAAGC,cAAc,CAACF,gBAAgB,CAAC,CAEpD,GAAM,CAAAG,WAAW,CAAGC,IAAI,CAACC,SAAS,CAACJ,WAAW,CAAC,CAE/C,MAAU,CAAAH,WAAW,MAAKC,eAAe,MAAKI,WAChD,CAEA,QAAS,CAAAD,cAAcA,CAACI,GAAY,CAAW,CAC7C,GAAIA,GAAG,GAAK,IAAI,EAAIA,GAAG,GAAKC,SAAS,CAAE,CACrC,MAAO,CAAAD,GACT,CAEA,GAAIE,KAAK,CAACC,OAAO,CAACH,GAAG,CAAC,CAAE,CACtB,MAAO,CAAAA,GAAG,CAACI,GAAG,CAAC,SAAAC,IAAI,QAAI,CAAAT,cAAc,CAACS,IAAI,CAAC,EAC7C,CAEA,GAAI,MAAO,CAAAL,GAAG,GAAK,QAAQ,CAAE,CAC3B,GAAM,CAAAM,MAA+B,CAAG,CAAC,CAAC,CAC1C,GAAM,CAAAC,IAAI,CAAGC,MAAM,CAACD,IAAI,CAACP,GAA8B,CAAC,CAACS,IAAI,CAAC,CAAC,CAE/D,QAAAC,SAAA,CAAAC,+BAAA,CAAkBJ,IAAI,EAAAK,KAAA,GAAAA,KAAA,CAAAF,SAAA,IAAAG,IAAA,EAAE,IAAb,CAAAC,IAAG,CAAAF,KAAA,CAAAG,KAAA,CACZT,MAAM,CAACQ,IAAG,CAAC,CAAGlB,cAAc,CAAEI,GAAG,CAA6Bc,IAAG,CAAC,CACpE,CAEA,MAAO,CAAAR,MACT,CAEA,MAAO,CAAAN,GACT,CAEA,MAAO,SAAS,CAAAgB,uBAAuBA,CAACC,c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string): string;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Utility function to format query headings for display
|
|
3
|
-
* Converts technical query keys into presentable headings
|
|
4
|
-
*/export function formatQueryHeading(heading){if(!heading){return"Query details"}var formatted=heading.replace(/_[a-z-]+-[a-z0-9]+$/i,"");formatted=formatted.replace(/_/g," ");formatted=formatted.replace(/([a-z])([A-Z])/g,"$1 $2");var componentRegex=/\b(table|chart|card|button|text|image|list|modal|dropdown|tabs|header|footer|nav|menu|pagination|search|filter|sort|pagination)\b/gi;formatted=formatted.replace(componentRegex,"").trim();formatted=formatted.replace(/\b\w/g,function(l){return l.toUpperCase()});formatted=formatted.replace(/\s+/g," ").trim();return formatted||"Query details"}
|
|
5
|
-
//# sourceMappingURL=query-heading-formatter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"query-heading-formatter.js","names":["formatQueryHeading","heading","formatted","replace","componentRegex","trim","l","toUpperCase"],"sources":["../../../src/plugins/helpers/query-heading-formatter.ts"],"sourcesContent":["/**\n * Utility function to format query headings for display\n * Converts technical query keys into presentable headings\n */\nexport function formatQueryHeading(heading: string): string {\n if (!heading) {\n return 'Query details';\n }\n\n let formatted = heading.replace(/_[a-z-]+-[a-z0-9]+$/i, '');\n \n formatted = formatted.replace(/_/g, ' ');\n \n formatted = formatted.replace(/([a-z])([A-Z])/g, '$1 $2');\n\n const componentRegex = /\\b(table|chart|card|button|text|image|list|modal|dropdown|tabs|header|footer|nav|menu|pagination|search|filter|sort|pagination)\\b/gi;\n formatted = formatted.replace(componentRegex, '').trim();\n \n formatted = formatted.replace(/\\b\\w/g, l => l.toUpperCase());\n \n formatted = formatted.replace(/\\s+/g, ' ').trim();\n \n return formatted || 'Query details';\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,GACA,MAAO,SAAS,CAAAA,kBAAkBA,CAACC,OAAe,CAAU,CAC1D,GAAI,CAACA,OAAO,CAAE,CACZ,MAAO,eACT,CAEA,GAAI,CAAAC,SAAS,CAAGD,OAAO,CAACE,OAAO,CAAC,sBAAsB,CAAE,EAAE,CAAC,CAE3DD,SAAS,CAAGA,SAAS,CAACC,OAAO,CAAC,IAAI,CAAE,GAAG,CAAC,CAExCD,SAAS,CAAGA,SAAS,CAACC,OAAO,CAAC,iBAAiB,CAAE,OAAO,CAAC,CAEzD,GAAM,CAAAC,cAAc,CAAG,qIAAqI,CAC5JF,SAAS,CAAGA,SAAS,CAACC,OAAO,CAACC,cAAc,CAAE,EAAE,CAAC,CAACC,IAAI,CAAC,CAAC,CAExDH,SAAS,CAAGA,SAAS,CAACC,OAAO,CAAC,OAAO,CAAE,SAAAG,CAAC,QAAI,CAAAA,CAAC,CAACC,WAAW,CAAC,CAAC,EAAC,CAE5DL,SAAS,CAAGA,SAAS,CAACC,OAAO,CAAC,MAAM,CAAE,GAAG,CAAC,CAACE,IAAI,CAAC,CAAC,CAEjD,MAAO,CAAAH,SAAS,EAAI,eACtB","ignoreList":[]}
|
|
Binary file
|
package/types/images.d.js
DELETED
package/types/images.d.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"images.d.js","names":[],"sources":["../../src/types/images.d.ts"],"sourcesContent":["declare module '*.gif';"],"mappings":"","ignoreList":[]}
|