@burdenoff/microfe-brainyrich 2026.805.1 → 2026.825.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/_rolldown/runtime.js +1 -1
- package/dist/brainyrich/BrainyRichRoot.d.ts +0 -1
- package/dist/brainyrich/BrainyRichRoot.js.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.d.ts.map +1 -1
- package/dist/brainyrich/BrainyRichRoutes.js +21 -17
- package/dist/brainyrich/BrainyRichRoutes.js.map +1 -1
- package/dist/brainyrich/components/ActorName.js.map +1 -1
- package/dist/brainyrich/components/ConfirmDialog.d.ts +0 -1
- package/dist/brainyrich/components/ConfirmDialog.js.map +1 -1
- package/dist/brainyrich/components/LoadMore.js.map +1 -1
- package/dist/brainyrich/components/notify.js.map +1 -1
- package/dist/brainyrich/components/pickers.js.map +1 -1
- package/dist/brainyrich/components/reuse/CommentThread.js.map +1 -1
- package/dist/brainyrich/components/reuse/DocumentsPanel.js.map +1 -1
- package/dist/brainyrich/components/reuse/TagField.js.map +1 -1
- package/dist/brainyrich/components/reuse/transport.js.map +1 -1
- package/dist/brainyrich/components/viz.d.ts +0 -1
- package/dist/brainyrich/components/viz.js.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichAnalytics.js.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts +3 -2
- package/dist/brainyrich/hooks/useBrainyRichApi.d.ts.map +1 -1
- package/dist/brainyrich/hooks/useBrainyRichApi.js +20 -12
- package/dist/brainyrich/hooks/useBrainyRichApi.js.map +1 -1
- package/dist/brainyrich/pages/AccountsPage.d.ts.map +1 -1
- package/dist/brainyrich/pages/AccountsPage.js +367 -363
- package/dist/brainyrich/pages/AccountsPage.js.map +1 -1
- package/dist/brainyrich/pages/AdminFirmPage.d.ts +2 -0
- package/dist/brainyrich/pages/AdminFirmPage.d.ts.map +1 -0
- package/dist/brainyrich/pages/AdminFirmPage.js +137 -0
- package/dist/brainyrich/pages/AdminFirmPage.js.map +1 -0
- package/dist/brainyrich/pages/AiAssistantPage.js.map +1 -1
- package/dist/brainyrich/pages/AnalyticsPage.js.map +1 -1
- package/dist/brainyrich/pages/DashboardPage.js.map +1 -1
- package/dist/brainyrich/pages/FamilyPage.js.map +1 -1
- package/dist/brainyrich/pages/FirmPage.js.map +1 -1
- package/dist/brainyrich/pages/GoalsPage.js.map +1 -1
- package/dist/brainyrich/pages/InvestmentsPage.js.map +1 -1
- package/dist/brainyrich/pages/PortfoliosPage.js.map +1 -1
- package/dist/brainyrich/pages/ReportsPage.js.map +1 -1
- package/dist/brainyrich/pages/RiskPage.js.map +1 -1
- package/dist/brainyrich/pages/TaxPage.js.map +1 -1
- package/dist/brainyrich/pages/_shared.d.ts +0 -1
- package/dist/brainyrich/pages/_shared.js.map +1 -1
- package/dist/brainyrich/providers/BrainyRichProvider.d.ts +0 -1
- package/dist/brainyrich/providers/BrainyRichProvider.js.map +1 -1
- package/dist/brainyrich/services/createSandboxAssistantTransport.js.map +1 -1
- package/dist/brainyrich/types/bra.d.ts +15 -0
- package/dist/brainyrich/types/bra.d.ts.map +1 -1
- package/dist/brainyrich/types/index.d.ts +0 -1
- package/dist/brainyrich/utils/cn.d.ts +0 -1
- package/dist/brainyrich/utils/i18n.d.ts +0 -1
- package/dist/brainyrich/utils/i18n.js.map +1 -1
- package/dist/brainyrich/utils/nativeControls.d.ts +0 -1
- package/dist/brainyrich/utils/nativeControls.js.map +1 -1
- package/dist/brainyrich/utils/navigation.js.map +1 -1
- package/dist/brainyrich/utils/pageContext.js.map +1 -1
- package/dist/dev/main.d.ts +0 -1
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/d3-array/src/ascending.js.map +1 -1
- package/dist/node_modules/d3-array/src/bisect.js.map +1 -1
- package/dist/node_modules/d3-array/src/bisector.js.map +1 -1
- package/dist/node_modules/d3-array/src/descending.js.map +1 -1
- package/dist/node_modules/d3-array/src/max.js.map +1 -1
- package/dist/node_modules/d3-array/src/min.js.map +1 -1
- package/dist/node_modules/d3-array/src/number.js.map +1 -1
- package/dist/node_modules/d3-array/src/quantile.js.map +1 -1
- package/dist/node_modules/d3-array/src/quickselect.js.map +1 -1
- package/dist/node_modules/d3-array/src/range.js.map +1 -1
- package/dist/node_modules/d3-array/src/sort.js.map +1 -1
- package/dist/node_modules/d3-array/src/ticks.js.map +1 -1
- package/dist/node_modules/d3-color/src/color.js.map +1 -1
- package/dist/node_modules/d3-color/src/define.js.map +1 -1
- package/dist/node_modules/d3-format/src/defaultLocale.js.map +1 -1
- package/dist/node_modules/d3-format/src/exponent.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatDecimal.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatGroup.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatNumerals.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatPrefixAuto.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatRounded.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatSpecifier.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatTrim.js.map +1 -1
- package/dist/node_modules/d3-format/src/formatTypes.js.map +1 -1
- package/dist/node_modules/d3-format/src/identity.js.map +1 -1
- package/dist/node_modules/d3-format/src/locale.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionFixed.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionPrefix.js.map +1 -1
- package/dist/node_modules/d3-format/src/precisionRound.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/array.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/basis.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/basisClosed.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/color.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/date.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/number.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/numberArray.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/object.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/piecewise.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/rgb.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/round.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/string.js.map +1 -1
- package/dist/node_modules/d3-interpolate/src/value.js.map +1 -1
- package/dist/node_modules/d3-path/src/path.js.map +1 -1
- package/dist/node_modules/d3-scale/src/band.js.map +1 -1
- package/dist/node_modules/d3-scale/src/constant.js.map +1 -1
- package/dist/node_modules/d3-scale/src/continuous.js.map +1 -1
- package/dist/node_modules/d3-scale/src/diverging.js.map +1 -1
- package/dist/node_modules/d3-scale/src/identity.js.map +1 -1
- package/dist/node_modules/d3-scale/src/init.js.map +1 -1
- package/dist/node_modules/d3-scale/src/linear.js.map +1 -1
- package/dist/node_modules/d3-scale/src/log.js.map +1 -1
- package/dist/node_modules/d3-scale/src/nice.js.map +1 -1
- package/dist/node_modules/d3-scale/src/number.js.map +1 -1
- package/dist/node_modules/d3-scale/src/ordinal.js.map +1 -1
- package/dist/node_modules/d3-scale/src/pow.js.map +1 -1
- package/dist/node_modules/d3-scale/src/quantile.js.map +1 -1
- package/dist/node_modules/d3-scale/src/quantize.js.map +1 -1
- package/dist/node_modules/d3-scale/src/radial.js.map +1 -1
- package/dist/node_modules/d3-scale/src/sequential.js.map +1 -1
- package/dist/node_modules/d3-scale/src/sequentialQuantile.js.map +1 -1
- package/dist/node_modules/d3-scale/src/symlog.js.map +1 -1
- package/dist/node_modules/d3-scale/src/threshold.js.map +1 -1
- package/dist/node_modules/d3-scale/src/tickFormat.js.map +1 -1
- package/dist/node_modules/d3-scale/src/time.js.map +1 -1
- package/dist/node_modules/d3-scale/src/utcTime.js.map +1 -1
- package/dist/node_modules/d3-shape/src/area.js.map +1 -1
- package/dist/node_modules/d3-shape/src/array.js.map +1 -1
- package/dist/node_modules/d3-shape/src/constant.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basis.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basisClosed.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/basisOpen.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/bump.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/linear.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/linearClosed.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/monotone.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/natural.js.map +1 -1
- package/dist/node_modules/d3-shape/src/curve/step.js.map +1 -1
- package/dist/node_modules/d3-shape/src/line.js.map +1 -1
- package/dist/node_modules/d3-shape/src/noop.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/expand.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/none.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/silhouette.js.map +1 -1
- package/dist/node_modules/d3-shape/src/offset/wiggle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/order/none.js.map +1 -1
- package/dist/node_modules/d3-shape/src/path.js.map +1 -1
- package/dist/node_modules/d3-shape/src/point.js.map +1 -1
- package/dist/node_modules/d3-shape/src/stack.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/circle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/cross.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/diamond.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/square.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/star.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/triangle.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol/wye.js.map +1 -1
- package/dist/node_modules/d3-shape/src/symbol.js.map +1 -1
- package/dist/node_modules/d3-time/src/day.js.map +1 -1
- package/dist/node_modules/d3-time/src/hour.js.map +1 -1
- package/dist/node_modules/d3-time/src/interval.js.map +1 -1
- package/dist/node_modules/d3-time/src/millisecond.js.map +1 -1
- package/dist/node_modules/d3-time/src/minute.js.map +1 -1
- package/dist/node_modules/d3-time/src/month.js.map +1 -1
- package/dist/node_modules/d3-time/src/second.js.map +1 -1
- package/dist/node_modules/d3-time/src/ticks.js.map +1 -1
- package/dist/node_modules/d3-time/src/week.js.map +1 -1
- package/dist/node_modules/d3-time/src/year.js.map +1 -1
- package/dist/node_modules/d3-time-format/src/defaultLocale.js.map +1 -1
- package/dist/node_modules/d3-time-format/src/locale.js.map +1 -1
- package/dist/node_modules/decimal.js-light/decimal.js.map +1 -1
- package/dist/node_modules/eventemitter3/index.js.map +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js.map +1 -1
- package/dist/node_modules/internmap/src/index.js.map +1 -1
- package/dist/node_modules/lodash/_DataView.js.map +1 -1
- package/dist/node_modules/lodash/_Hash.js.map +1 -1
- package/dist/node_modules/lodash/_ListCache.js.map +1 -1
- package/dist/node_modules/lodash/_Map.js.map +1 -1
- package/dist/node_modules/lodash/_MapCache.js.map +1 -1
- package/dist/node_modules/lodash/_Promise.js.map +1 -1
- package/dist/node_modules/lodash/_Set.js.map +1 -1
- package/dist/node_modules/lodash/_SetCache.js.map +1 -1
- package/dist/node_modules/lodash/_Stack.js +2 -1
- package/dist/node_modules/lodash/_Stack.js.map +1 -1
- package/dist/node_modules/lodash/_Symbol.js.map +1 -1
- package/dist/node_modules/lodash/_Uint8Array.js.map +1 -1
- package/dist/node_modules/lodash/_WeakMap.js.map +1 -1
- package/dist/node_modules/lodash/_apply.js.map +1 -1
- package/dist/node_modules/lodash/_arrayEvery.js.map +1 -1
- package/dist/node_modules/lodash/_arrayFilter.js.map +1 -1
- package/dist/node_modules/lodash/_arrayIncludes.js.map +1 -1
- package/dist/node_modules/lodash/_arrayIncludesWith.js.map +1 -1
- package/dist/node_modules/lodash/_arrayLikeKeys.js.map +1 -1
- package/dist/node_modules/lodash/_arrayMap.js.map +1 -1
- package/dist/node_modules/lodash/_arrayPush.js.map +1 -1
- package/dist/node_modules/lodash/_arraySome.js.map +1 -1
- package/dist/node_modules/lodash/_asciiToArray.js.map +1 -1
- package/dist/node_modules/lodash/_assocIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_baseAssignValue.js.map +1 -1
- package/dist/node_modules/lodash/_baseEach.js.map +1 -1
- package/dist/node_modules/lodash/_baseEvery.js.map +1 -1
- package/dist/node_modules/lodash/_baseExtremum.js.map +1 -1
- package/dist/node_modules/lodash/_baseFindIndex.js.map +1 -1
- package/dist/node_modules/lodash/_baseFlatten.js.map +1 -1
- package/dist/node_modules/lodash/_baseFor.js.map +1 -1
- package/dist/node_modules/lodash/_baseForOwn.js.map +1 -1
- package/dist/node_modules/lodash/_baseGet.js.map +1 -1
- package/dist/node_modules/lodash/_baseGetAllKeys.js.map +1 -1
- package/dist/node_modules/lodash/_baseGetTag.js.map +1 -1
- package/dist/node_modules/lodash/_baseGt.js.map +1 -1
- package/dist/node_modules/lodash/_baseHasIn.js.map +1 -1
- package/dist/node_modules/lodash/_baseIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsArguments.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsEqual.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsMatch.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsNaN.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsNative.js.map +1 -1
- package/dist/node_modules/lodash/_baseIsTypedArray.js.map +1 -1
- package/dist/node_modules/lodash/_baseIteratee.js.map +1 -1
- package/dist/node_modules/lodash/_baseKeys.js.map +1 -1
- package/dist/node_modules/lodash/_baseLt.js.map +1 -1
- package/dist/node_modules/lodash/_baseMap.js.map +1 -1
- package/dist/node_modules/lodash/_baseMatches.js.map +1 -1
- package/dist/node_modules/lodash/_baseMatchesProperty.js.map +1 -1
- package/dist/node_modules/lodash/_baseOrderBy.js.map +1 -1
- package/dist/node_modules/lodash/_baseProperty.js.map +1 -1
- package/dist/node_modules/lodash/_basePropertyDeep.js.map +1 -1
- package/dist/node_modules/lodash/_baseRange.js.map +1 -1
- package/dist/node_modules/lodash/_baseRest.js.map +1 -1
- package/dist/node_modules/lodash/_baseSetToString.js.map +1 -1
- package/dist/node_modules/lodash/_baseSlice.js.map +1 -1
- package/dist/node_modules/lodash/_baseSome.js.map +1 -1
- package/dist/node_modules/lodash/_baseSortBy.js.map +1 -1
- package/dist/node_modules/lodash/_baseTimes.js.map +1 -1
- package/dist/node_modules/lodash/_baseToString.js.map +1 -1
- package/dist/node_modules/lodash/_baseTrim.js.map +1 -1
- package/dist/node_modules/lodash/_baseUnary.js.map +1 -1
- package/dist/node_modules/lodash/_baseUniq.js.map +1 -1
- package/dist/node_modules/lodash/_cacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_castPath.js.map +1 -1
- package/dist/node_modules/lodash/_castSlice.js.map +1 -1
- package/dist/node_modules/lodash/_compareAscending.js.map +1 -1
- package/dist/node_modules/lodash/_compareMultiple.js.map +1 -1
- package/dist/node_modules/lodash/_coreJsData.js.map +1 -1
- package/dist/node_modules/lodash/_createBaseEach.js.map +1 -1
- package/dist/node_modules/lodash/_createBaseFor.js.map +1 -1
- package/dist/node_modules/lodash/_createCaseFirst.js.map +1 -1
- package/dist/node_modules/lodash/_createFind.js.map +1 -1
- package/dist/node_modules/lodash/_createRange.js.map +1 -1
- package/dist/node_modules/lodash/_createSet.js.map +1 -1
- package/dist/node_modules/lodash/_defineProperty.js.map +1 -1
- package/dist/node_modules/lodash/_equalArrays.js.map +1 -1
- package/dist/node_modules/lodash/_equalByTag.js.map +1 -1
- package/dist/node_modules/lodash/_equalObjects.js.map +1 -1
- package/dist/node_modules/lodash/_freeGlobal.js.map +1 -1
- package/dist/node_modules/lodash/_getAllKeys.js.map +1 -1
- package/dist/node_modules/lodash/_getMapData.js.map +1 -1
- package/dist/node_modules/lodash/_getMatchData.js.map +1 -1
- package/dist/node_modules/lodash/_getNative.js.map +1 -1
- package/dist/node_modules/lodash/_getPrototype.js.map +1 -1
- package/dist/node_modules/lodash/_getRawTag.js.map +1 -1
- package/dist/node_modules/lodash/_getSymbols.js.map +1 -1
- package/dist/node_modules/lodash/_getTag.js.map +1 -1
- package/dist/node_modules/lodash/_getValue.js.map +1 -1
- package/dist/node_modules/lodash/_hasPath.js.map +1 -1
- package/dist/node_modules/lodash/_hasUnicode.js.map +1 -1
- package/dist/node_modules/lodash/_hashClear.js.map +1 -1
- package/dist/node_modules/lodash/_hashDelete.js.map +1 -1
- package/dist/node_modules/lodash/_hashGet.js.map +1 -1
- package/dist/node_modules/lodash/_hashHas.js.map +1 -1
- package/dist/node_modules/lodash/_hashSet.js.map +1 -1
- package/dist/node_modules/lodash/_isFlattenable.js.map +1 -1
- package/dist/node_modules/lodash/_isIndex.js.map +1 -1
- package/dist/node_modules/lodash/_isIterateeCall.js.map +1 -1
- package/dist/node_modules/lodash/_isKey.js.map +1 -1
- package/dist/node_modules/lodash/_isKeyable.js.map +1 -1
- package/dist/node_modules/lodash/_isMasked.js.map +1 -1
- package/dist/node_modules/lodash/_isPrototype.js.map +1 -1
- package/dist/node_modules/lodash/_isStrictComparable.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheClear.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheDelete.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheGet.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_listCacheSet.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheClear.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheDelete.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheGet.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_mapCacheSet.js.map +1 -1
- package/dist/node_modules/lodash/_mapToArray.js.map +1 -1
- package/dist/node_modules/lodash/_matchesStrictComparable.js.map +1 -1
- package/dist/node_modules/lodash/_memoizeCapped.js.map +1 -1
- package/dist/node_modules/lodash/_nativeCreate.js.map +1 -1
- package/dist/node_modules/lodash/_nativeKeys.js.map +1 -1
- package/dist/node_modules/lodash/_nodeUtil.js.map +1 -1
- package/dist/node_modules/lodash/_objectToString.js.map +1 -1
- package/dist/node_modules/lodash/_overArg.js.map +1 -1
- package/dist/node_modules/lodash/_overRest.js.map +1 -1
- package/dist/node_modules/lodash/_root.js.map +1 -1
- package/dist/node_modules/lodash/_setCacheAdd.js.map +1 -1
- package/dist/node_modules/lodash/_setCacheHas.js.map +1 -1
- package/dist/node_modules/lodash/_setToArray.js.map +1 -1
- package/dist/node_modules/lodash/_setToString.js.map +1 -1
- package/dist/node_modules/lodash/_shortOut.js.map +1 -1
- package/dist/node_modules/lodash/_stackClear.js.map +1 -1
- package/dist/node_modules/lodash/_stackDelete.js.map +1 -1
- package/dist/node_modules/lodash/_stackGet.js.map +1 -1
- package/dist/node_modules/lodash/_stackHas.js.map +1 -1
- package/dist/node_modules/lodash/_stackSet.js.map +1 -1
- package/dist/node_modules/lodash/_strictIndexOf.js.map +1 -1
- package/dist/node_modules/lodash/_stringToArray.js.map +1 -1
- package/dist/node_modules/lodash/_stringToPath.js.map +1 -1
- package/dist/node_modules/lodash/_toKey.js.map +1 -1
- package/dist/node_modules/lodash/_toSource.js.map +1 -1
- package/dist/node_modules/lodash/_trimmedEndIndex.js.map +1 -1
- package/dist/node_modules/lodash/_unicodeToArray.js.map +1 -1
- package/dist/node_modules/lodash/constant.js.map +1 -1
- package/dist/node_modules/lodash/debounce.js.map +1 -1
- package/dist/node_modules/lodash/eq.js.map +1 -1
- package/dist/node_modules/lodash/every.js.map +1 -1
- package/dist/node_modules/lodash/find.js.map +1 -1
- package/dist/node_modules/lodash/findIndex.js.map +1 -1
- package/dist/node_modules/lodash/flatMap.js.map +1 -1
- package/dist/node_modules/lodash/get.js.map +1 -1
- package/dist/node_modules/lodash/hasIn.js.map +1 -1
- package/dist/node_modules/lodash/identity.js.map +1 -1
- package/dist/node_modules/lodash/isArguments.js.map +1 -1
- package/dist/node_modules/lodash/isArray.js.map +1 -1
- package/dist/node_modules/lodash/isArrayLike.js.map +1 -1
- package/dist/node_modules/lodash/isBoolean.js.map +1 -1
- package/dist/node_modules/lodash/isBuffer.js.map +1 -1
- package/dist/node_modules/lodash/isEqual.js.map +1 -1
- package/dist/node_modules/lodash/isFunction.js.map +1 -1
- package/dist/node_modules/lodash/isLength.js.map +1 -1
- package/dist/node_modules/lodash/isNaN.js.map +1 -1
- package/dist/node_modules/lodash/isNil.js.map +1 -1
- package/dist/node_modules/lodash/isNumber.js.map +1 -1
- package/dist/node_modules/lodash/isObject.js.map +1 -1
- package/dist/node_modules/lodash/isObjectLike.js.map +1 -1
- package/dist/node_modules/lodash/isPlainObject.js.map +1 -1
- package/dist/node_modules/lodash/isString.js.map +1 -1
- package/dist/node_modules/lodash/isSymbol.js.map +1 -1
- package/dist/node_modules/lodash/isTypedArray.js.map +1 -1
- package/dist/node_modules/lodash/keys.js.map +1 -1
- package/dist/node_modules/lodash/last.js.map +1 -1
- package/dist/node_modules/lodash/map.js.map +1 -1
- package/dist/node_modules/lodash/mapValues.js.map +1 -1
- package/dist/node_modules/lodash/max.js.map +1 -1
- package/dist/node_modules/lodash/maxBy.js.map +1 -1
- package/dist/node_modules/lodash/memoize.js.map +1 -1
- package/dist/node_modules/lodash/min.js.map +1 -1
- package/dist/node_modules/lodash/minBy.js.map +1 -1
- package/dist/node_modules/lodash/noop.js.map +1 -1
- package/dist/node_modules/lodash/now.js.map +1 -1
- package/dist/node_modules/lodash/property.js.map +1 -1
- package/dist/node_modules/lodash/range.js.map +1 -1
- package/dist/node_modules/lodash/some.js.map +1 -1
- package/dist/node_modules/lodash/sortBy.js.map +1 -1
- package/dist/node_modules/lodash/stubArray.js.map +1 -1
- package/dist/node_modules/lodash/stubFalse.js.map +1 -1
- package/dist/node_modules/lodash/throttle.js.map +1 -1
- package/dist/node_modules/lodash/toFinite.js.map +1 -1
- package/dist/node_modules/lodash/toInteger.js.map +1 -1
- package/dist/node_modules/lodash/toNumber.js.map +1 -1
- package/dist/node_modules/lodash/toString.js.map +1 -1
- package/dist/node_modules/lodash/uniqBy.js.map +1 -1
- package/dist/node_modules/lodash/upperFirst.js.map +1 -1
- package/dist/node_modules/object-assign/index.js.map +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +1 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +1 -1
- package/dist/node_modules/prop-types/index.js.map +1 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +1 -1
- package/dist/node_modules/prop-types/lib/has.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/react-is/cjs/react-is.development.js.map +1 -1
- package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +1 -1
- package/dist/node_modules/react-is/index.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/Animate.js +2 -2
- package/dist/node_modules/react-smooth/es6/Animate.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/AnimateManager.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/configUpdate.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/easing.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js.map +1 -1
- package/dist/node_modules/react-smooth/es6/util.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Area.js +13 -13
- package/dist/node_modules/recharts/es6/cartesian/Area.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Bar.js +9 -9
- package/dist/node_modules/recharts/es6/cartesian/Bar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/Brush.js +12 -12
- package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +7 -7
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +4 -4
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +4 -4
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js +3 -3
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js.map +1 -1
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +1 -1
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/AreaChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/BarChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/PieChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +22 -22
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Cell.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Cursor.js +1 -1
- package/dist/node_modules/recharts/es6/component/Cursor.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +11 -11
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +6 -6
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Label.js +14 -14
- package/dist/node_modules/recharts/es6/component/Label.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/LabelList.js +6 -6
- package/dist/node_modules/recharts/es6/component/LabelList.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Legend.js +5 -5
- package/dist/node_modules/recharts/es6/component/Legend.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +3 -3
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Text.js +2 -2
- package/dist/node_modules/recharts/es6/component/Text.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/Tooltip.js +3 -3
- package/dist/node_modules/recharts/es6/component/Tooltip.js.map +1 -1
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +2 -2
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js.map +1 -1
- package/dist/node_modules/recharts/es6/container/Layer.js +2 -2
- package/dist/node_modules/recharts/es6/container/Layer.js.map +1 -1
- package/dist/node_modules/recharts/es6/container/Surface.js +2 -2
- package/dist/node_modules/recharts/es6/container/Surface.js.map +1 -1
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +2 -2
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/Pie.js +13 -13
- package/dist/node_modules/recharts/es6/polar/Pie.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js +8 -8
- package/dist/node_modules/recharts/es6/polar/PolarAngleAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js +6 -6
- package/dist/node_modules/recharts/es6/polar/PolarRadiusAxis.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Cross.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Cross.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Curve.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Curve.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Dot.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Dot.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Polygon.js +4 -4
- package/dist/node_modules/recharts/es6/shape/Polygon.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +4 -4
- package/dist/node_modules/recharts/es6/shape/Rectangle.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Sector.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Sector.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Symbols.js +1 -1
- package/dist/node_modules/recharts/es6/shape/Symbols.js.map +1 -1
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js +4 -4
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +9 -9
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/BarUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/BarUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DOMUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DataUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/Global.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/LogUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/PolarUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/PolarUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/TickUtils.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/getLegendProps.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js.map +1 -1
- package/dist/node_modules/recharts/es6/util/types.js +1 -1
- package/dist/node_modules/recharts/es6/util/types.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js.map +1 -1
- package/dist/node_modules/recharts-scale/es6/util/utils.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +1 -1
- package/dist/stories/LoadMore.stories.d.ts +0 -1
- package/package.json +15 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TagField.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/TagField.tsx"],"sourcesContent":["/**\n * TagField — REUSE of `wspace-tags-svc` UniversalTag (polymorphic-by-entity).\n * @module brainyrich/components/reuse/TagField\n *\n * Drop-in replacement for the free-text tag string inputs on Households /\n * Portfolios / Goals. Instead of writing a `tags` scalar on the bra entity,\n * this manages REAL `UniversalTag` assignments keyed by `(entityType, entityId)`\n * against the platform tag store — no bra-svc change required. The bra `tags`\n * scalar stays as legacy; this component is the canonical tag surface.\n *\n * Ops (all on the workspace supergraph):\n * - `getEntityTags(entityType, entityId)` → current assignments (chips)\n * - `searchTags(query, limit)` → typeahead over existing tags\n * - `assignTag(input)` → link an existing tag\n * - `createTag(input)` + `assignTag(...)` → create-from-label then link\n * - `removeTagAssignment(id)` → unlink a chip\n *\n * `createTag` needs a `vocabularyId`; we resolve a stable, workspace-scoped\n * \"brainyrich\" vocabulary via `getVocabularyByKey` (creating it on first use).\n *\n * Presentational + self-contained: owns its react-query hooks, reads the gateway\n * base URL from `useBrainyRich()`, uses fe-libs/ui primitives + semantic tokens.\n */\n\nimport { useState, type KeyboardEvent } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { Plus, Tag as TagIcon, X } from 'lucide-react';\nimport { Badge, Button, Input, Label, Skeleton } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\n// ============================================================================\n// Types (mirror the UniversalTag SDL fields we select)\n// ============================================================================\n\ninterface UniversalTag {\n id: string;\n label: string;\n color: string | null;\n key: string;\n}\n\ninterface UniversalTagAssignment {\n id: string;\n tag: UniversalTag;\n}\n\nconst TAG_FIELDS = 'id label color key';\nconst BRAINYRICH_VOCABULARY_KEY = 'brainyrich';\n\nconst entityTagsKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-tags', entityType, entityId] as const;\n\nconst slugify = (value: string): string =>\n value\n .toLowerCase()\n .trim()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 48) || 'tag';\n\n// ============================================================================\n// Hooks (co-located; reuse the shared workspace transport)\n// ============================================================================\n\nconst useEntityTags = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: entityTagsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getEntityTags: UniversalTagAssignment[] }>(\n `query BraGetEntityTags($entityType: String!, $entityId: ID!) {\n getEntityTags(entityType: $entityType, entityId: $entityId) {\n id\n tag { ${TAG_FIELDS} }\n }\n }`,\n { entityType, entityId },\n apiGatewayUrl\n );\n return data.getEntityTags;\n },\n });\n};\n\nconst useTagSearch = (query: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const trimmed = query.trim();\n return useQuery({\n queryKey: ['brainyrich', 'tag-search', trimmed],\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const data = await wspaceFetch<{ searchTags: UniversalTag[] }>(\n `query BraSearchTags($query: String!, $limit: Int) {\n searchTags(query: $query, limit: $limit) { ${TAG_FIELDS} }\n }`,\n { query: trimmed, limit: 8 },\n apiGatewayUrl\n );\n return data.searchTags;\n },\n });\n};\n\n/** Resolve (creating on first use) the workspace-scoped \"brainyrich\" vocabulary. */\nconst resolveVocabularyId = async (baseUrl?: string): Promise<string> => {\n const existing = await wspaceFetch<{ getVocabularyByKey: { id: string } | null }>(\n `query BraGetVocabulary($key: String!) {\n getVocabularyByKey(key: $key) { id }\n }`,\n { key: BRAINYRICH_VOCABULARY_KEY },\n baseUrl\n );\n if (existing.getVocabularyByKey?.id) return existing.getVocabularyByKey.id;\n\n const created = await wspaceMutate<{ createVocabulary: { id: string } }>(\n `mutation BraCreateVocabulary($input: CreateVocabularyInput!) {\n createVocabulary(input: $input) { id }\n }`,\n {\n input: {\n key: BRAINYRICH_VOCABULARY_KEY,\n name: 'BrainyRich',\n description: 'Tags for BrainyRich households, portfolios and goals.',\n allowCustomTags: true,\n },\n },\n baseUrl\n );\n return created.createVocabulary.id;\n};\n\nconst useAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (tagId: string) => {\n const data = await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId } },\n apiGatewayUrl\n );\n return data.assignTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\nconst useCreateAndAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (label: string) => {\n const trimmed = label.trim();\n if (!trimmed) throw new Error('A tag label is required.');\n const vocabularyId = await resolveVocabularyId(apiGatewayUrl);\n // Unique key avoids collisions inside the vocabulary; the label is the display text.\n const key = `${slugify(trimmed)}-${Math.random().toString(36).slice(2, 6)}`;\n const created = await wspaceMutate<{ createTag: { id: string } }>(\n `mutation BraCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }`,\n { input: { vocabularyId, key, label: trimmed } },\n apiGatewayUrl\n );\n await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignCreatedTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId: created.createTag.id } },\n apiGatewayUrl\n );\n return created.createTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\nconst useRemoveTagAssignment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (assignmentId: string) => {\n const data = await wspaceMutate<{ removeTagAssignment: boolean }>(\n `mutation BraRemoveTagAssignment($id: ID!) { removeTagAssignment(id: $id) }`,\n { id: assignmentId },\n apiGatewayUrl\n );\n return data.removeTagAssignment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport interface TagFieldProps {\n /** Polymorphic entity type, e.g. \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional field label (hidden visually when `hideLabel`). */\n label?: string;\n hideLabel?: boolean;\n}\n\nexport function TagField({\n entityType,\n entityId,\n label = 'Tags',\n hideLabel = false,\n}: TagFieldProps) {\n const [draft, setDraft] = useState('');\n const assignments = useEntityTags(entityType, entityId);\n const search = useTagSearch(draft);\n const assign = useAssignTag(entityType, entityId);\n const createAndAssign = useCreateAndAssignTag(entityType, entityId);\n const remove = useRemoveTagAssignment(entityType, entityId);\n\n const busy = assign.isPending || createAndAssign.isPending;\n const assigned = assignments.data ?? [];\n const assignedTagIds = new Set(assigned.map((a) => a.tag.id));\n const suggestions = (search.data ?? []).filter((t) => !assignedTagIds.has(t.id));\n const trimmed = draft.trim();\n const exactExists = suggestions.some((t) => t.label.toLowerCase() === trimmed.toLowerCase());\n\n const inputId = `tagfield-${entityType}-${entityId}`;\n\n const commitCreate = async () => {\n if (!trimmed || busy) return;\n await createAndAssign.mutateAsync(trimmed);\n setDraft('');\n };\n\n const commitAssign = async (tagId: string) => {\n if (busy) return;\n await assign.mutateAsync(tagId);\n setDraft('');\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n void commitCreate();\n }\n };\n\n return (\n <div className=\"space-y-2\">\n {!hideLabel && (\n <Label htmlFor={inputId} className=\"text-text-primary\">\n {label}\n </Label>\n )}\n\n {/* Current assignments */}\n {assignments.isLoading ? (\n <div className=\"flex flex-wrap gap-2\" aria-busy=\"true\">\n <Skeleton className=\"h-6 w-16 rounded-full\" />\n <Skeleton className=\"h-6 w-20 rounded-full\" />\n <Skeleton className=\"h-6 w-12 rounded-full\" />\n </div>\n ) : assignments.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load tags.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => assignments.refetch()}\n >\n Retry\n </button>\n </p>\n ) : assigned.length === 0 ? (\n <p className=\"flex items-center gap-1.5 text-sm text-text-secondary\">\n <TagIcon className=\"size-3.5\" aria-hidden=\"true\" />\n No tags yet — add one below.\n </p>\n ) : (\n <div className=\"flex flex-wrap gap-2\">\n {assigned.map((a) => (\n <Badge key={a.id} variant=\"secondary\" className=\"gap-1 pr-1\">\n <span>{a.tag.label}</span>\n <button\n type=\"button\"\n aria-label={`Remove tag ${a.tag.label}`}\n className=\"rounded-full p-0.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(a.id)}\n >\n <X className=\"size-3\" aria-hidden=\"true\" />\n </button>\n </Badge>\n ))}\n </div>\n )}\n\n {/* Add control */}\n <div className=\"relative\">\n <div className=\"flex gap-2\">\n <Input\n id={inputId}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Search or create a tag…\"\n aria-label=\"Search or create a tag\"\n autoComplete=\"off\"\n disabled={busy}\n />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={commitCreate}\n disabled={!trimmed || busy || exactExists}\n >\n <Plus className=\"size-4\" aria-hidden=\"true\" />\n Create\n </Button>\n </div>\n\n {/* Typeahead suggestions */}\n {trimmed.length > 0 && (suggestions.length > 0 || search.isFetching) && (\n <ul\n className=\"absolute z-10 mt-1 w-full overflow-hidden rounded-md border border-border-subtle bg-bg-surface shadow-md\"\n role=\"listbox\"\n aria-label=\"Tag suggestions\"\n >\n {search.isFetching && suggestions.length === 0 ? (\n <li className=\"px-3 py-2 text-sm text-text-secondary\">Searching…</li>\n ) : (\n suggestions.map((t) => (\n <li key={t.id} role=\"option\" aria-selected=\"false\">\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 px-3 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken focus-visible:bg-bg-sunken focus-visible:outline-none disabled:opacity-50\"\n disabled={busy}\n onClick={() => commitAssign(t.id)}\n >\n <TagIcon className=\"size-3.5 text-text-secondary\" aria-hidden=\"true\" />\n {t.label}\n </button>\n </li>\n ))\n )}\n </ul>\n )}\n </div>\n\n {(assign.isError || createAndAssign.isError || remove.isError) && (\n <p className=\"text-sm text-status-error-text\">Could not update tags. Please try again.</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAgDA,IAAM,IAAa,sBACb,IAA4B,cAE5B,KAAiB,GAAoB,MACzC;CAAC;CAAc;CAAe;CAAY;CAAS,EAE/C,KAAW,MACf,EACG,aAAa,CACb,MAAM,CACN,QAAQ,eAAe,IAAI,CAC3B,QAAQ,YAAY,GAAG,CACvB,MAAM,GAAG,GAAG,IAAI,OAMf,KAAiB,GAAoB,MAAiC;CAC1E,IAAM,EAAE,qBAAkB,GAAe;AACzC,QAAO,EAAS;EACd,UAAU,EAAc,GAAY,KAAY,GAAG;EACnD,SAAS,EAAQ;EACjB,SAAS,aACM,MAAM,EACjB;;;oBAGY,EAAW;;YAGvB;GAAE;GAAY;GAAU,EACxB,EACD,EACW;EAEf,CAAC;GAGE,KAAgB,MAAkB;CACtC,IAAM,EAAE,qBAAkB,GAAe,EACnC,IAAU,EAAM,MAAM;AAC5B,QAAO,EAAS;EACd,UAAU;GAAC;GAAc;GAAc;GAAQ;EAC/C,SAAS,EAAQ,SAAS;EAC1B,SAAS,aACM,MAAM,EACjB;uDAC+C,EAAW;YAE1D;GAAE,OAAO;GAAS,OAAO;GAAG,EAC5B,EACD,EACW;EAEf,CAAC;GAIE,IAAsB,OAAO,MAAsC;CACvE,IAAM,I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;KACL,cAAW;eAEV,EAAO,cAAc,EAAY,WAAW,IAC3C,kBAAC,MAAD;MAAI,WAAU;gBAAwC;MAAe,CAAA,GAErE,EAAY,KAAK,MACf,kBAAC,MAAD;MAAe,MAAK;MAAS,iBAAc;gBACzC,kBAAC,UAAD;OACE,MAAK;OACL,WAAU;OACV,UAAU;OACV,eAAe,EAAa,EAAE,GAAG;iBAJnC,CAME,kBAAC,GAAD;QAAS,WAAU;QAA+B,eAAY;QAAS,CAAA,EACtE,EAAE,MACI;;MACN,EAVI,EAAE,GAUN,CACL;KAED,CAAA,CAEH;;IAEJ,EAAO,WAAW,EAAgB,WAAW,EAAO,YACpD,kBAAC,KAAD;IAAG,WAAU;cAAiC;IAA4C,CAAA;GAExF"}
|
|
1
|
+
{"version":3,"file":"TagField.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/TagField.tsx"],"sourcesContent":["/**\n * TagField — REUSE of `wspace-tags-svc` UniversalTag (polymorphic-by-entity).\n * @module brainyrich/components/reuse/TagField\n *\n * Drop-in replacement for the free-text tag string inputs on Households /\n * Portfolios / Goals. Instead of writing a `tags` scalar on the bra entity,\n * this manages REAL `UniversalTag` assignments keyed by `(entityType, entityId)`\n * against the platform tag store — no bra-svc change required. The bra `tags`\n * scalar stays as legacy; this component is the canonical tag surface.\n *\n * Ops (all on the workspace supergraph):\n * - `getEntityTags(entityType, entityId)` → current assignments (chips)\n * - `searchTags(query, limit)` → typeahead over existing tags\n * - `assignTag(input)` → link an existing tag\n * - `createTag(input)` + `assignTag(...)` → create-from-label then link\n * - `removeTagAssignment(id)` → unlink a chip\n *\n * `createTag` needs a `vocabularyId`; we resolve a stable, workspace-scoped\n * \"brainyrich\" vocabulary via `getVocabularyByKey` (creating it on first use).\n *\n * Presentational + self-contained: owns its react-query hooks, reads the gateway\n * base URL from `useBrainyRich()`, uses fe-libs/ui primitives + semantic tokens.\n */\n\nimport { useState, type KeyboardEvent } from 'react';\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { Plus, Tag as TagIcon, X } from 'lucide-react';\nimport { Badge, Button, Input, Label, Skeleton } from '@burdenoff/fe-libs/ui';\n\nimport { useBrainyRich } from '../../providers/BrainyRichProvider';\nimport { wspaceFetch, wspaceMutate } from './transport';\n\n// ============================================================================\n// Types (mirror the UniversalTag SDL fields we select)\n// ============================================================================\n\ninterface UniversalTag {\n id: string;\n label: string;\n color: string | null;\n key: string;\n}\n\ninterface UniversalTagAssignment {\n id: string;\n tag: UniversalTag;\n}\n\nconst TAG_FIELDS = 'id label color key';\nconst BRAINYRICH_VOCABULARY_KEY = 'brainyrich';\n\nconst entityTagsKey = (entityType: string, entityId: string) =>\n ['brainyrich', 'entity-tags', entityType, entityId] as const;\n\nconst slugify = (value: string): string =>\n value\n .toLowerCase()\n .trim()\n .replace(/[^a-z0-9]+/g, '-')\n .replace(/^-+|-+$/g, '')\n .slice(0, 48) || 'tag';\n\n// ============================================================================\n// Hooks (co-located; reuse the shared workspace transport)\n// ============================================================================\n\nconst useEntityTags = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useBrainyRich();\n return useQuery({\n queryKey: entityTagsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{ getEntityTags: UniversalTagAssignment[] }>(\n `query BraGetEntityTags($entityType: String!, $entityId: ID!) {\n getEntityTags(entityType: $entityType, entityId: $entityId) {\n id\n tag { ${TAG_FIELDS} }\n }\n }`,\n { entityType, entityId },\n apiGatewayUrl\n );\n return data.getEntityTags;\n },\n });\n};\n\nconst useTagSearch = (query: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const trimmed = query.trim();\n return useQuery({\n queryKey: ['brainyrich', 'tag-search', trimmed],\n enabled: trimmed.length > 0,\n queryFn: async () => {\n const data = await wspaceFetch<{ searchTags: UniversalTag[] }>(\n `query BraSearchTags($query: String!, $limit: Int) {\n searchTags(query: $query, limit: $limit) { ${TAG_FIELDS} }\n }`,\n { query: trimmed, limit: 8 },\n apiGatewayUrl\n );\n return data.searchTags;\n },\n });\n};\n\n/** Resolve (creating on first use) the workspace-scoped \"brainyrich\" vocabulary. */\nconst resolveVocabularyId = async (baseUrl?: string): Promise<string> => {\n const existing = await wspaceFetch<{ getVocabularyByKey: { id: string } | null }>(\n `query BraGetVocabulary($key: String!) {\n getVocabularyByKey(key: $key) { id }\n }`,\n { key: BRAINYRICH_VOCABULARY_KEY },\n baseUrl\n );\n if (existing.getVocabularyByKey?.id) return existing.getVocabularyByKey.id;\n\n const created = await wspaceMutate<{ createVocabulary: { id: string } }>(\n `mutation BraCreateVocabulary($input: CreateVocabularyInput!) {\n createVocabulary(input: $input) { id }\n }`,\n {\n input: {\n key: BRAINYRICH_VOCABULARY_KEY,\n name: 'BrainyRich',\n description: 'Tags for BrainyRich households, portfolios and goals.',\n allowCustomTags: true,\n },\n },\n baseUrl\n );\n return created.createVocabulary.id;\n};\n\nconst useAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (tagId: string) => {\n const data = await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId } },\n apiGatewayUrl\n );\n return data.assignTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\nconst useCreateAndAssignTag = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (label: string) => {\n const trimmed = label.trim();\n if (!trimmed) throw new Error('A tag label is required.');\n const vocabularyId = await resolveVocabularyId(apiGatewayUrl);\n // Unique key avoids collisions inside the vocabulary; the label is the display text.\n const key = `${slugify(trimmed)}-${Math.random().toString(36).slice(2, 6)}`;\n const created = await wspaceMutate<{ createTag: { id: string } }>(\n `mutation BraCreateTag($input: CreateTagInput!) {\n createTag(input: $input) { id }\n }`,\n { input: { vocabularyId, key, label: trimmed } },\n apiGatewayUrl\n );\n await wspaceMutate<{ assignTag: { id: string } }>(\n `mutation BraAssignCreatedTag($input: AssignTagInput!) {\n assignTag(input: $input) { id }\n }`,\n { input: { entityType, entityId, tagId: created.createTag.id } },\n apiGatewayUrl\n );\n return created.createTag;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\nconst useRemoveTagAssignment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useBrainyRich();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (assignmentId: string) => {\n const data = await wspaceMutate<{ removeTagAssignment: boolean }>(\n `mutation BraRemoveTagAssignment($id: ID!) { removeTagAssignment(id: $id) }`,\n { id: assignmentId },\n apiGatewayUrl\n );\n return data.removeTagAssignment;\n },\n onSuccess: () => qc.invalidateQueries({ queryKey: entityTagsKey(entityType, entityId) }),\n });\n};\n\n// ============================================================================\n// Component\n// ============================================================================\n\nexport interface TagFieldProps {\n /** Polymorphic entity type, e.g. \"brainyrich-household\". */\n entityType: string;\n /** The bra entity's id (an ID scalar). */\n entityId: string;\n /** Optional field label (hidden visually when `hideLabel`). */\n label?: string;\n hideLabel?: boolean;\n}\n\nexport function TagField({\n entityType,\n entityId,\n label = 'Tags',\n hideLabel = false,\n}: TagFieldProps) {\n const [draft, setDraft] = useState('');\n const assignments = useEntityTags(entityType, entityId);\n const search = useTagSearch(draft);\n const assign = useAssignTag(entityType, entityId);\n const createAndAssign = useCreateAndAssignTag(entityType, entityId);\n const remove = useRemoveTagAssignment(entityType, entityId);\n\n const busy = assign.isPending || createAndAssign.isPending;\n const assigned = assignments.data ?? [];\n const assignedTagIds = new Set(assigned.map((a) => a.tag.id));\n const suggestions = (search.data ?? []).filter((t) => !assignedTagIds.has(t.id));\n const trimmed = draft.trim();\n const exactExists = suggestions.some((t) => t.label.toLowerCase() === trimmed.toLowerCase());\n\n const inputId = `tagfield-${entityType}-${entityId}`;\n\n const commitCreate = async () => {\n if (!trimmed || busy) return;\n await createAndAssign.mutateAsync(trimmed);\n setDraft('');\n };\n\n const commitAssign = async (tagId: string) => {\n if (busy) return;\n await assign.mutateAsync(tagId);\n setDraft('');\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === 'Enter') {\n event.preventDefault();\n void commitCreate();\n }\n };\n\n return (\n <div className=\"space-y-2\">\n {!hideLabel && (\n <Label htmlFor={inputId} className=\"text-text-primary\">\n {label}\n </Label>\n )}\n\n {/* Current assignments */}\n {assignments.isLoading ? (\n <div className=\"flex flex-wrap gap-2\" aria-busy=\"true\">\n <Skeleton className=\"h-6 w-16 rounded-full\" />\n <Skeleton className=\"h-6 w-20 rounded-full\" />\n <Skeleton className=\"h-6 w-12 rounded-full\" />\n </div>\n ) : assignments.isError ? (\n <p className=\"text-sm text-status-error-text\">\n Could not load tags.{' '}\n <button\n type=\"button\"\n className=\"underline underline-offset-2\"\n onClick={() => assignments.refetch()}\n >\n Retry\n </button>\n </p>\n ) : assigned.length === 0 ? (\n <p className=\"flex items-center gap-1.5 text-sm text-text-secondary\">\n <TagIcon className=\"size-3.5\" aria-hidden=\"true\" />\n No tags yet — add one below.\n </p>\n ) : (\n <div className=\"flex flex-wrap gap-2\">\n {assigned.map((a) => (\n <Badge key={a.id} variant=\"secondary\" className=\"gap-1 pr-1\">\n <span>{a.tag.label}</span>\n <button\n type=\"button\"\n aria-label={`Remove tag ${a.tag.label}`}\n className=\"rounded-full p-0.5 text-text-secondary hover:bg-bg-sunken hover:text-text-primary focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus disabled:opacity-50\"\n disabled={remove.isPending}\n onClick={() => remove.mutate(a.id)}\n >\n <X className=\"size-3\" aria-hidden=\"true\" />\n </button>\n </Badge>\n ))}\n </div>\n )}\n\n {/* Add control */}\n <div className=\"relative\">\n <div className=\"flex gap-2\">\n <Input\n id={inputId}\n value={draft}\n onChange={(e) => setDraft(e.target.value)}\n onKeyDown={onKeyDown}\n placeholder=\"Search or create a tag…\"\n aria-label=\"Search or create a tag\"\n autoComplete=\"off\"\n disabled={busy}\n />\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={commitCreate}\n disabled={!trimmed || busy || exactExists}\n >\n <Plus className=\"size-4\" aria-hidden=\"true\" />\n Create\n </Button>\n </div>\n\n {/* Typeahead suggestions */}\n {trimmed.length > 0 && (suggestions.length > 0 || search.isFetching) && (\n <ul\n className=\"absolute z-10 mt-1 w-full overflow-hidden rounded-md border border-border-subtle bg-bg-surface shadow-md\"\n role=\"listbox\"\n aria-label=\"Tag suggestions\"\n >\n {search.isFetching && suggestions.length === 0 ? (\n <li className=\"px-3 py-2 text-sm text-text-secondary\">Searching…</li>\n ) : (\n suggestions.map((t) => (\n <li key={t.id} role=\"option\" aria-selected=\"false\">\n <button\n type=\"button\"\n className=\"flex w-full items-center gap-2 px-3 py-2 text-left text-sm text-text-primary hover:bg-bg-sunken focus-visible:bg-bg-sunken focus-visible:outline-none disabled:opacity-50\"\n disabled={busy}\n onClick={() => commitAssign(t.id)}\n >\n <TagIcon className=\"size-3.5 text-text-secondary\" aria-hidden=\"true\" />\n {t.label}\n </button>\n </li>\n ))\n )}\n </ul>\n )}\n </div>\n\n {(assign.isError || createAndAssign.isError || remove.isError) && (\n <p className=\"text-sm text-status-error-text\">Could not update tags. Please try again.</p>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAgDA,IAAM,IAAa,sBACb,IAA4B,cAE5B,KAAiB,GAAoB,MACzC;CAAC;CAAc;CAAe;CAAY;AAAQ,GAE9C,KAAW,MACf,EACG,YAAY,EACZ,KAAK,EACL,QAAQ,eAAe,GAAG,EAC1B,QAAQ,YAAY,EAAE,EACtB,MAAM,GAAG,EAAE,KAAK,OAMf,KAAiB,GAAoB,MAAiC;CAC1E,IAAM,EAAE,qBAAkB,EAAc;CACxC,OAAO,EAAS;EACd,UAAU,EAAc,GAAY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E,kBAAC,GAAD;MACE,IAAI;MACJ,OAAO;MACP,WAAW,MAAM,EAAS,EAAE,OAAO,KAAK;MAC7B,YAhEF,MAA2C;OAC5D,AAAI,EAAM,QAAQ,YAChB,EAAM,eAAe,GACrB,EAAkB;MAEtB;MA4DU,aAAY;MACZ,cAAW;MACX,cAAa;MACb,UAAU;KACX,CAAA,GACD,kBAAC,GAAD;MACE,MAAK;MACL,SAAQ;MACR,MAAK;MACL,SAAS;MACT,UAAU,CAAC,KAAW,KAAQ;gBALhC,CAOE,kBAAC,GAAD;OAAM,WAAU;OAAS,eAAY;MAAQ,CAAA,GAAC,QAExC;OACL;QAGJ,EAAQ,SAAS,MAAM,EAAY,SAAS,KAAK,EAAO,eACvD,kBAAC,MAAD;KACE,WAAU;KACV,MAAK;KACL,cAAW;eAEV,EAAO,cAAc,EAAY,WAAW,IAC3C,kBAAC,MAAD;MAAI,WAAU;gBAAwC;KAAc,CAAA,IAEpE,EAAY,KAAK,MACf,kBAAC,MAAD;MAAe,MAAK;MAAS,iBAAc;gBACzC,kBAAC,UAAD;OACE,MAAK;OACL,WAAU;OACV,UAAU;OACV,eAAe,EAAa,EAAE,EAAE;iBAJlC,CAME,kBAAC,GAAD;QAAS,WAAU;QAA+B,eAAY;OAAQ,CAAA,GACrE,EAAE,KACG;;KACN,GAVK,EAAE,EAUP,CACL;IAED,CAAA,CAEH;;IAEH,EAAO,WAAW,EAAgB,WAAW,EAAO,YACpD,kBAAC,KAAD;IAAG,WAAU;cAAiC;GAA2C,CAAA;EAExF;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transport.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/transport.ts"],"sourcesContent":["/**\n * Shared workspace-gateway transport for the BrainyRich REUSE components.\n * @module brainyrich/components/reuse/transport\n *\n * The four reuse components (TagField, DocumentsPanel, CommentThread,\n * ReviewReminders) consume PLATFORM subgraphs — `wspace-tags-svc`,\n * `wspace-files-svc`, `wspace-conversations-svc`, `wspace-calendar-svc` —\n * that are composed into the SAME workspace supergraph the BrainyRich MFE\n * already talks to. So every call routes through the identical transport the\n * `bra*` hooks use: `graphqlFetch({ gateway: 'workspace', workspaceToken: true })`.\n *\n * This file only contains the transport primitive; each component owns its own\n * react-query hooks (kept co-located so a page can drop one component into a\n * Sheet/tab without pulling in the others).\n */\n\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache keyed by operationName+variables (~15s); mutations are never cached. A\n * read issued right after a write (the react-query refetch our `invalidateQueries`\n * triggers) would otherwise return the PRE-mutation response until the TTL lapses,\n * hiding just-created rows. fe-libs' documented remedy is that write-performing\n * callers clear those caches — we do exactly that after every reuse mutation.\n */\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\n/** Execute a workspace-gateway GraphQL operation with the workspace token. */\nexport const wspaceFetch = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n return response.data;\n};\n\n/** Mutation transport — identical to `wspaceFetch` but clears read caches after. */\nexport const wspaceMutate = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const data = await wspaceFetch<TData>(query, variables, baseUrl);\n clearGraphqlReadCaches();\n return data;\n};\n"],"mappings":";;AAgCA,IAAM,UAAqC;CACzC,IAAM,IAAI;
|
|
1
|
+
{"version":3,"file":"transport.js","names":[],"sources":["../../../../src/brainyrich/components/reuse/transport.ts"],"sourcesContent":["/**\n * Shared workspace-gateway transport for the BrainyRich REUSE components.\n * @module brainyrich/components/reuse/transport\n *\n * The four reuse components (TagField, DocumentsPanel, CommentThread,\n * ReviewReminders) consume PLATFORM subgraphs — `wspace-tags-svc`,\n * `wspace-files-svc`, `wspace-conversations-svc`, `wspace-calendar-svc` —\n * that are composed into the SAME workspace supergraph the BrainyRich MFE\n * already talks to. So every call routes through the identical transport the\n * `bra*` hooks use: `graphqlFetch({ gateway: 'workspace', workspaceToken: true })`.\n *\n * This file only contains the transport primitive; each component owns its own\n * react-query hooks (kept co-located so a page can drop one component into a\n * Sheet/tab without pulling in the others).\n */\n\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache keyed by operationName+variables (~15s); mutations are never cached. A\n * read issued right after a write (the react-query refetch our `invalidateQueries`\n * triggers) would otherwise return the PRE-mutation response until the TTL lapses,\n * hiding just-created rows. fe-libs' documented remedy is that write-performing\n * callers clear those caches — we do exactly that after every reuse mutation.\n */\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\nconst clearGraphqlReadCaches = (): void => {\n const g = globalThis as GraphqlReadCacheGlobals;\n g.__graphqlFetchResponseCache?.clear();\n g.__graphqlFetchPendingResponses?.clear();\n g.__boffGraphQLResponseCache?.clear();\n};\n\n/** Execute a workspace-gateway GraphQL operation with the workspace token. */\nexport const wspaceFetch = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const response = await graphqlFetch<TData>({\n gateway: 'workspace',\n baseUrl,\n query,\n variables,\n workspaceToken: true,\n });\n\n if (response.errors?.length) {\n throw new Error(response.errors[0]?.message ?? 'GraphQL request failed');\n }\n if (!response.data) {\n throw new Error('GraphQL response did not include data');\n }\n return response.data;\n};\n\n/** Mutation transport — identical to `wspaceFetch` but clears read caches after. */\nexport const wspaceMutate = async <TData>(\n query: string,\n variables: Record<string, unknown>,\n baseUrl?: string\n): Promise<TData> => {\n const data = await wspaceFetch<TData>(query, variables, baseUrl);\n clearGraphqlReadCaches();\n return data;\n};\n"],"mappings":";;AAgCA,IAAM,UAAqC;CACzC,IAAM,IAAI;CAGV,AAFA,EAAE,6BAA6B,MAAM,GACrC,EAAE,gCAAgC,MAAM,GACxC,EAAE,4BAA4B,MAAM;AACtC,GAGa,IAAc,OACzB,GACA,GACA,MACmB;CACnB,IAAM,IAAW,MAAM,EAAoB;EACzC,SAAS;EACT;EACA;EACA;EACA,gBAAgB;CAClB,CAAC;CAED,IAAI,EAAS,QAAQ,QACnB,MAAU,MAAM,EAAS,OAAO,IAAI,WAAW,wBAAwB;CAEzE,IAAI,CAAC,EAAS,MACZ,MAAU,MAAM,uCAAuC;CAEzD,OAAO,EAAS;AAClB,GAGa,IAAe,OAC1B,GACA,GACA,MACmB;CACnB,IAAM,IAAO,MAAM,EAAmB,GAAO,GAAW,CAAO;CAE/D,OADA,EAAuB,GAChB;AACT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"viz.js","names":[],"sources":["../../../src/brainyrich/components/viz.tsx"],"sourcesContent":["/**\n * BrainyRich data-viz + polish kit.\n * @module brainyrich/components/viz\n *\n * A tokenized, responsive, dark-mode-first visualization + motion kit built on\n * recharts (^2.15) with lightweight, dependency-free CSS motion. Every colour is read from the\n * platform's SEMANTIC CSS variables at runtime (see {@link useVizColors}) so\n * charts always track the active theme and the emerald BrainyRich brand\n * (`--color-action-primary-bg`). No raw hex/rgb literals live in this file.\n *\n * All chart components are wrapped in a recharts `<ResponsiveContainer>` so they\n * resize with their parent. Motion is tasteful (<=250ms) and disabled under\n * `prefers-reduced-motion`.\n *\n * Page agents: import from `#brainyrich/components/viz` (or the components\n * barrel). Pass values straight from the real `bra*` hooks — this kit only\n * renders; it never fabricates data.\n */\nimport { useEffect, useId, useMemo, useState, type CSSProperties, type ReactNode } from 'react';\nimport {\n Area,\n AreaChart,\n Bar,\n BarChart,\n Cell,\n Line,\n LineChart,\n Pie,\n PieChart,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nfunction cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n\n// ============================================================================\n// Motion primitives (dependency-free, pure CSS — no animation library)\n// ============================================================================\n\n/**\n * SSR-safe `prefers-reduced-motion` hook. Returns `false` on the server and on\n * the first client render, then subscribes to the media query so all motion in\n * this kit is disabled the moment the user asks for reduced motion.\n */\nfunction prefersReducedMotion(): boolean {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n\nexport function useReducedMotion(): boolean {\n // Read the current preference lazily at mount (SSR-safe: `false` on the\n // server), then only update via the media-query change listener.\n const [reduced, setReduced] = useState<boolean>(prefersReducedMotion);\n\n useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return;\n const mq = window.matchMedia('(prefers-reduced-motion: reduce)');\n const onChange = (e: MediaQueryListEvent) => setReduced(e.matches);\n mq.addEventListener('change', onChange);\n return () => mq.removeEventListener('change', onChange);\n }, []);\n\n return reduced;\n}\n\n// Enter animation (translateY + opacity) injected once as a real stylesheet so\n// the keyframes + `.br-fade-in` class exist before the first animated paint.\nconst FADE_IN_STYLE_ID = 'brainyrich-viz-motion';\nconst FADE_IN_CSS = `\n@keyframes br-fade-in {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: none; }\n}\n.br-fade-in {\n animation: br-fade-in 240ms var(--motion-easing-standard, ease-out) both;\n}\n`;\n\nif (typeof document !== 'undefined' && !document.getElementById(FADE_IN_STYLE_ID)) {\n const el = document.createElement('style');\n el.id = FADE_IN_STYLE_ID;\n el.textContent = FADE_IN_CSS;\n document.head.appendChild(el);\n}\n\n// ============================================================================\n// Token → colour resolution\n// ============================================================================\n//\n// recharts needs concrete colour strings (fills, stroke, gradient stops), so we\n// resolve each semantic CSS variable to its computed value off\n// `document.documentElement` and re-read whenever the theme attribute flips.\n// Consumers NEVER hard-code colours: they name a semantic token here.\n\nconst CORE_TOKENS = {\n brand: '--color-action-primary-bg',\n brandBorder: '--color-action-primary-border',\n grid: '--color-chart-grid',\n axis: '--color-chart-axis',\n positive: '--color-chart-positive',\n negative: '--color-chart-negative',\n success: '--color-status-success',\n error: '--color-status-error',\n warning: '--color-status-warning',\n info: '--color-status-info',\n teal: '--color-accent-teal',\n blue: '--color-accent-blue',\n purple: '--color-accent-purple',\n indigo: '--color-accent-indigo',\n textPrimary: '--color-text-primary',\n textSecondary: '--color-text-secondary',\n surface: '--color-bg-elevated',\n border: '--color-border-subtle',\n} as const;\n\ntype CoreToken = keyof typeof CORE_TOKENS;\n\n/** Ordered categorical palette — emerald brand first, then distinct chart hues. */\nconst PALETTE_VARS = [\n '--color-action-primary-bg',\n '--color-chart-2',\n '--color-chart-3',\n '--color-chart-4',\n '--color-chart-5',\n '--color-chart-6',\n '--color-chart-7',\n '--color-chart-8',\n '--color-chart-9',\n '--color-chart-10',\n '--color-chart-11',\n '--color-chart-12',\n];\n\nexport type VizColors = Record<CoreToken, string> & {\n /** Categorical palette (index 0 = emerald brand). */\n palette: string[];\n /** Resolve any semantic tone name to a concrete colour string. */\n tone: (tone?: VizTone) => string;\n};\n\n/** Named tones a datum may request; falls back to the categorical palette. */\nexport type VizTone =\n | 'brand'\n | 'primary'\n | 'success'\n | 'positive'\n | 'error'\n | 'negative'\n | 'warning'\n | 'info'\n | 'teal'\n | 'blue'\n | 'purple'\n | 'indigo'\n | 'neutral';\n\nfunction readVar(name: string): string {\n if (typeof window === 'undefined') return `var(${name})`;\n const v = getComputedStyle(document.documentElement).getPropertyValue(name).trim();\n return v || `var(${name})`;\n}\n\n/**\n * Resolve the semantic viz palette from CSS variables and keep it in sync with\n * the active theme. Returns concrete colour strings for use in recharts props.\n */\nexport function useVizColors(): VizColors {\n const [tick, setTick] = useState(0);\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n const rerender = () => setTick((t) => t + 1);\n const obs = new MutationObserver(rerender);\n obs.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-theme', 'class', 'style'],\n });\n return () => obs.disconnect();\n }, []);\n\n return useMemo(() => {\n void tick; // re-resolve whenever the theme attribute changes\n const core = Object.fromEntries(\n (Object.keys(CORE_TOKENS) as CoreToken[]).map((k) => [k, readVar(CORE_TOKENS[k])])\n ) as Record<CoreToken, string>;\n const palette = PALETTE_VARS.map(readVar);\n\n const tone = (t?: VizTone): string => {\n switch (t) {\n case 'brand':\n case 'primary':\n return core.brand;\n case 'success':\n case 'positive':\n return core.success;\n case 'error':\n case 'negative':\n return core.error;\n case 'warning':\n return core.warning;\n case 'info':\n return core.info;\n case 'teal':\n return core.teal;\n case 'blue':\n return core.blue;\n case 'purple':\n return core.purple;\n case 'indigo':\n return core.indigo;\n case 'neutral':\n return core.textSecondary;\n default:\n return core.brand;\n }\n };\n\n return { ...core, palette, tone };\n }, [tick]);\n}\n\n// ============================================================================\n// Shared chart tooltip (themed — recharts' default is light-only)\n// ============================================================================\n\ninterface TooltipEntry {\n name?: string | number;\n value?: string | number;\n color?: string;\n payload?: Record<string, unknown>;\n}\n\nfunction useTooltipStyles(): { wrapper: CSSProperties; label: CSSProperties } {\n const c = useVizColors();\n return {\n wrapper: {\n background: c.surface,\n border: `1px solid ${c.border}`,\n borderRadius: 10,\n padding: '8px 12px',\n color: c.textPrimary,\n fontSize: 12,\n boxShadow: 'var(--shadow-pop, 0 8px 24px rgba(0,0,0,0.35))',\n },\n label: { color: c.textSecondary, marginBottom: 4, fontSize: 11 },\n };\n}\n\nfunction ChartTooltip({\n active,\n payload,\n label,\n valueFormatter,\n}: {\n active?: boolean;\n payload?: TooltipEntry[];\n label?: string | number;\n valueFormatter?: (v: number) => string;\n}) {\n const styles = useTooltipStyles();\n if (!active || !payload || payload.length === 0) return null;\n return (\n <div style={styles.wrapper} role=\"tooltip\">\n {label !== undefined && label !== '' ? <div style={styles.label}>{label}</div> : null}\n {payload.map((entry, i) => {\n const raw = typeof entry.value === 'number' ? entry.value : Number(entry.value);\n const shown =\n valueFormatter && Number.isFinite(raw) ? valueFormatter(raw) : String(entry.value ?? '');\n return (\n <div key={i} className=\"flex items-center gap-2\">\n {entry.color ? (\n <span\n aria-hidden=\"true\"\n style={{\n width: 8,\n height: 8,\n borderRadius: 9999,\n background: entry.color,\n display: 'inline-block',\n }}\n />\n ) : null}\n {entry.name ? <span style={{ color: styles.label.color }}>{entry.name}:</span> : null}\n <span style={{ fontWeight: 600 }}>{shown}</span>\n </div>\n );\n })}\n </div>\n );\n}\n\n// ============================================================================\n// Motion helpers\n// ============================================================================\n\n/**\n * Staggered enter animation (translateY + opacity). Fully disabled under\n * `prefers-reduced-motion` (renders a plain element). Use `index` to stagger a\n * list/grid of cards.\n */\nexport function FadeIn({\n children,\n index = 0,\n delay = 0,\n className,\n as: Tag = 'div',\n}: {\n children: ReactNode;\n index?: number;\n delay?: number;\n className?: string;\n as?: 'div' | 'li' | 'section';\n}) {\n const reduce = useReducedMotion();\n if (reduce) {\n return <Tag className={className}>{children}</Tag>;\n }\n return (\n <Tag\n className={cn('br-fade-in', className)}\n style={{ animationDelay: `${delay + index * 0.04}s` }}\n >\n {children}\n </Tag>\n );\n}\n\n// ============================================================================\n// GlassCard — sanctioned glass/elevation surface with graceful fallback\n// ============================================================================\n\n/**\n * Floating/hero surface using the sanctioned glass tokens. Falls back to the\n * standard elevated surface when a glass token is absent (older brand builds).\n */\nexport function GlassCard({\n children,\n className,\n glow = false,\n}: {\n children: ReactNode;\n className?: string;\n /** Add a subtle emerald glow ring. */\n glow?: boolean;\n}) {\n return (\n <div\n className={cn(\n 'rounded-2xl border p-5',\n // Glass tokens with hard fallbacks to always-present semantic tokens.\n 'border-[var(--color-border-glass,var(--color-border-subtle))]',\n 'bg-[var(--color-surface-glass,var(--color-bg-elevated))]',\n 'shadow-[var(--shadow-float,var(--shadow-elevation-3))]',\n 'backdrop-blur-[var(--blur-glass,12px)]',\n glow && 'ring-1 ring-[var(--color-action-primary-border)]/40',\n className\n )}\n >\n {children}\n </div>\n );\n}\n\n// ============================================================================\n// DonutChart\n// ============================================================================\n\nexport interface DonutDatum {\n label: string;\n value: number;\n tone?: VizTone;\n}\n\nexport function DonutChart({\n data,\n centerLabel,\n centerValue,\n legend = true,\n height = 220,\n valueFormatter,\n}: {\n data: DonutDatum[];\n centerLabel?: string;\n centerValue?: string;\n legend?: boolean;\n height?: number;\n valueFormatter?: (v: number) => string;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const rows = data.filter((d) => Number.isFinite(d.value) && d.value > 0);\n\n if (rows.length === 0) {\n return <p className=\"text-sm text-text-secondary\">No data.</p>;\n }\n\n const colorFor = (d: DonutDatum, i: number) =>\n d.tone ? c.tone(d.tone) : c.palette[i % c.palette.length];\n\n return (\n <div className=\"flex flex-col items-center gap-4 sm:flex-row sm:items-center\">\n <div className=\"relative\" style={{ width: '100%', maxWidth: 260, height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={rows}\n dataKey=\"value\"\n nameKey=\"label\"\n innerRadius=\"62%\"\n outerRadius=\"90%\"\n paddingAngle={2}\n stroke=\"transparent\"\n isAnimationActive={!reduce}\n animationDuration={250}\n >\n {rows.map((d, i) => (\n <Cell key={d.label} fill={colorFor(d, i)} />\n ))}\n </Pie>\n <Tooltip content={<ChartTooltip valueFormatter={valueFormatter} />} />\n </PieChart>\n </ResponsiveContainer>\n {centerValue || centerLabel ? (\n <div className=\"pointer-events-none absolute inset-0 flex flex-col items-center justify-center\">\n {centerValue ? (\n <span className=\"text-xl font-semibold text-text-primary\">{centerValue}</span>\n ) : null}\n {centerLabel ? (\n <span className=\"text-xs text-text-secondary\">{centerLabel}</span>\n ) : null}\n </div>\n ) : null}\n </div>\n {legend ? (\n <ul className=\"grid flex-1 grid-cols-1 gap-2 sm:grid-cols-2\" aria-label=\"Legend\">\n {rows.map((d, i) => (\n <li key={d.label} className=\"flex items-center gap-2 text-xs\">\n <span\n aria-hidden=\"true\"\n className=\"size-2.5 shrink-0 rounded-full\"\n style={{ background: colorFor(d, i) }}\n />\n <span className=\"truncate text-text-secondary\">{d.label}</span>\n <span className=\"ml-auto font-medium text-text-primary\">\n {valueFormatter ? valueFormatter(d.value) : d.value}\n </span>\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n );\n}\n\n// ============================================================================\n// Sparkline\n// ============================================================================\n\nexport function Sparkline({\n data,\n tone = 'brand',\n height = 40,\n className,\n}: {\n data: number[];\n tone?: VizTone;\n height?: number;\n className?: string;\n}) {\n const c = useVizColors();\n const stroke = c.tone(tone);\n const points = data.filter((n) => Number.isFinite(n));\n const gradientId = `spark-${useId().replace(/:/g, '')}`;\n if (points.length < 2) {\n return <div className={className} style={{ height }} aria-hidden=\"true\" />;\n }\n const chartData = points.map((y, x) => ({ x, y }));\n return (\n <div className={className} style={{ width: '100%', height }} aria-hidden=\"true\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <AreaChart data={chartData} margin={{ top: 2, right: 0, bottom: 0, left: 0 }}>\n <defs>\n <linearGradient id={gradientId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={stroke} stopOpacity={0.28} />\n <stop offset=\"100%\" stopColor={stroke} stopOpacity={0} />\n </linearGradient>\n </defs>\n <Area\n type=\"monotone\"\n dataKey=\"y\"\n stroke={stroke}\n strokeWidth={2}\n fill={`url(#${gradientId})`}\n isAnimationActive={false}\n dot={false}\n />\n </AreaChart>\n </ResponsiveContainer>\n </div>\n );\n}\n\n// ============================================================================\n// ProgressRing — clean SVG radial progress\n// ============================================================================\n\nexport function ProgressRing({\n value,\n label,\n tone = 'brand',\n size = 120,\n strokeWidth = 10,\n}: {\n value: number;\n label?: string;\n tone?: VizTone;\n size?: number;\n strokeWidth?: number;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const pct = Math.max(0, Math.min(100, Number.isFinite(value) ? value : 0));\n const r = (size - strokeWidth) / 2;\n const circ = 2 * Math.PI * r;\n const dash = (pct / 100) * circ;\n const stroke = c.tone(tone);\n const targetOffset = circ - dash;\n // Reduced motion renders filled immediately; otherwise start empty and fill\n // on the next frame so the ring animates from 0 → value via CSS.\n const [dashOffset, setDashOffset] = useState(reduce ? targetOffset : circ);\n\n useEffect(() => {\n const id = requestAnimationFrame(() => setDashOffset(targetOffset));\n return () => cancelAnimationFrame(id);\n }, [targetOffset]);\n\n return (\n <div\n className=\"relative inline-flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={Math.round(pct)}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={label ?? 'Progress'}\n >\n <svg width={size} height={size} className=\"-rotate-90\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={c.border}\n strokeWidth={strokeWidth}\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={stroke}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circ}\n strokeDashoffset={dashOffset}\n style={{ transition: reduce ? 'none' : 'stroke-dashoffset 600ms ease' }}\n />\n </svg>\n <div className=\"absolute inset-0 flex flex-col items-center justify-center\">\n <span className=\"text-lg font-semibold text-text-primary\">{Math.round(pct)}%</span>\n {label ? <span className=\"text-[10px] text-text-secondary\">{label}</span> : null}\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// TrendBars — diverging inflow/outflow cashflow bars\n// ============================================================================\n\nexport interface TrendDatum {\n label: string;\n inflow: number;\n outflow: number;\n}\n\nexport function TrendBars({\n data,\n height = 240,\n valueFormatter,\n}: {\n data: TrendDatum[];\n height?: number;\n valueFormatter?: (v: number) => string;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const rows = data.filter((d) => Number.isFinite(d.inflow) && Number.isFinite(d.outflow));\n if (rows.length === 0) {\n return <p className=\"text-sm text-text-secondary\">No cashflow data.</p>;\n }\n // Diverging: inflow up (positive), outflow down (negative).\n const chartData = rows.map((d) => ({\n label: d.label,\n inflow: Math.abs(d.inflow),\n outflow: -Math.abs(d.outflow),\n }));\n\n return (\n <div style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <BarChart\n data={chartData}\n margin={{ top: 8, right: 8, bottom: 0, left: 8 }}\n stackOffset=\"sign\"\n >\n <XAxis\n dataKey=\"label\"\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={{ stroke: c.grid }}\n tickLine={false}\n />\n <YAxis\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={false}\n tickLine={false}\n width={44}\n tickFormatter={(v: number) =>\n valueFormatter ? valueFormatter(Math.abs(v)) : String(Math.abs(v))\n }\n />\n <ReferenceLine y={0} stroke={c.grid} />\n <Tooltip\n cursor={{ fill: c.border, opacity: 0.25 }}\n content={\n <ChartTooltip\n valueFormatter={(v) =>\n valueFormatter ? valueFormatter(Math.abs(v)) : String(Math.abs(v))\n }\n />\n }\n />\n <Bar\n dataKey=\"inflow\"\n name=\"Inflow\"\n fill={c.positive}\n radius={[4, 4, 0, 0]}\n isAnimationActive={!reduce}\n animationDuration={250}\n />\n <Bar\n dataKey=\"outflow\"\n name=\"Outflow\"\n fill={c.negative}\n radius={[0, 0, 4, 4]}\n isAnimationActive={!reduce}\n animationDuration={250}\n />\n </BarChart>\n </ResponsiveContainer>\n </div>\n );\n}\n\n// ============================================================================\n// MiniAreaChart — projection with optional dashed target line\n// ============================================================================\n\nexport interface AreaDatum {\n x: string | number;\n y: number;\n}\n\nexport function MiniAreaChart({\n data,\n target,\n tone = 'brand',\n height = 200,\n valueFormatter,\n}: {\n data: AreaDatum[];\n target?: number;\n tone?: VizTone;\n height?: number;\n valueFormatter?: (v: number) => string;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const stroke = c.tone(tone);\n const rows = data.filter((d) => Number.isFinite(d.y));\n const gradientId = `area-${useId().replace(/:/g, '')}`;\n if (rows.length < 2) {\n return <p className=\"text-sm text-text-secondary\">Not enough data to chart.</p>;\n }\n return (\n <div style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <AreaChart data={rows} margin={{ top: 8, right: 8, bottom: 0, left: 8 }}>\n <defs>\n <linearGradient id={gradientId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={stroke} stopOpacity={0.3} />\n <stop offset=\"100%\" stopColor={stroke} stopOpacity={0.02} />\n </linearGradient>\n </defs>\n <XAxis\n dataKey=\"x\"\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={{ stroke: c.grid }}\n tickLine={false}\n />\n <YAxis\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={false}\n tickLine={false}\n width={44}\n tickFormatter={(v: number) => (valueFormatter ? valueFormatter(v) : String(v))}\n />\n <Tooltip content={<ChartTooltip valueFormatter={valueFormatter} />} />\n {target !== undefined && Number.isFinite(target) ? (\n <ReferenceLine\n y={target}\n stroke={c.textSecondary}\n strokeDasharray=\"5 4\"\n label={{\n value: valueFormatter ? `Target ${valueFormatter(target)}` : `Target ${target}`,\n position: 'insideTopRight',\n fill: c.textSecondary,\n fontSize: 10,\n }}\n />\n ) : null}\n <Area\n type=\"monotone\"\n dataKey=\"y\"\n stroke={stroke}\n strokeWidth={2}\n fill={`url(#${gradientId})`}\n isAnimationActive={!reduce}\n animationDuration={250}\n dot={false}\n />\n </AreaChart>\n </ResponsiveContainer>\n </div>\n );\n}\n\n// ============================================================================\n// LifecycleStepper — horizontal proposal/rebalance lifecycle\n// ============================================================================\n\nconst NEGATIVE_TERMINAL = /reject|cancel|abandon|decline|fail/i;\n\nexport function LifecycleStepper({\n steps,\n current,\n className,\n}: {\n steps: string[];\n current: string;\n className?: string;\n}) {\n const isNegativeTerminal = NEGATIVE_TERMINAL.test(current);\n const currentIndex = steps.findIndex((s) => s.toLowerCase() === current.toLowerCase());\n\n return (\n <ol\n className={cn('flex w-full items-center overflow-x-auto', className)}\n aria-label=\"Lifecycle progress\"\n >\n {steps.map((step, i) => {\n const isLast = i === steps.length - 1;\n const done = currentIndex >= 0 && i < currentIndex;\n const active = currentIndex >= 0 && i === currentIndex && !isNegativeTerminal;\n const state = done ? 'done' : active ? 'active' : 'upcoming';\n return (\n <li\n key={step}\n className=\"flex min-w-fit flex-1 items-center\"\n aria-current={active ? 'step' : undefined}\n >\n <div className=\"flex flex-col items-center gap-1.5 px-1\">\n <span\n className={cn(\n 'flex size-7 items-center justify-center rounded-full border text-xs font-semibold transition-colors',\n state === 'done' &&\n 'border-transparent bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]',\n state === 'active' &&\n 'border-[var(--color-action-primary-border)] bg-[var(--color-action-primary-bg)]/15 text-[var(--color-action-primary-text)]',\n state === 'upcoming' && 'border-border-subtle bg-bg-sunken text-text-secondary'\n )}\n aria-hidden=\"true\"\n >\n {done ? '✓' : i + 1}\n </span>\n <span\n className={cn(\n 'whitespace-nowrap text-[11px]',\n active ? 'font-medium text-text-primary' : 'text-text-secondary'\n )}\n >\n {step}\n </span>\n </div>\n {!isLast ? (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'mx-1 h-0.5 flex-1 rounded-full',\n done ? 'bg-[var(--color-action-primary-bg)]' : 'bg-border-subtle'\n )}\n />\n ) : null}\n </li>\n );\n })}\n {isNegativeTerminal ? (\n <li className=\"ml-2 flex min-w-fit items-center gap-1.5\" aria-current=\"step\">\n <span className=\"mx-1 h-0.5 w-6 rounded-full bg-status-error-border\" aria-hidden=\"true\" />\n <div className=\"flex flex-col items-center gap-1.5 px-1\">\n <span\n className=\"flex size-7 items-center justify-center rounded-full border border-transparent bg-status-error text-xs font-semibold text-status-error-text\"\n aria-hidden=\"true\"\n >\n ✕\n </span>\n <span className=\"whitespace-nowrap text-[11px] font-medium text-status-error-text\">\n {current}\n </span>\n </div>\n </li>\n ) : null}\n </ol>\n );\n}\n\n// ============================================================================\n// StatTile — premium KPI tile\n// ============================================================================\n\nexport function StatTile({\n label,\n value,\n delta,\n deltaTone,\n deltaSuffix = '%',\n spark,\n sparkTone = 'brand',\n glow = false,\n icon,\n className,\n}: {\n label: string;\n value: string;\n /** Optional signed delta rendered as a chip (icon + sign + status colour). */\n delta?: number;\n /** Override the auto tone derived from the delta sign. */\n deltaTone?: 'positive' | 'negative' | 'neutral';\n deltaSuffix?: string;\n /** Optional inline sparkline series. */\n spark?: number[];\n sparkTone?: VizTone;\n /** Subtle emerald glow ring for hero tiles. */\n glow?: boolean;\n icon?: ReactNode;\n className?: string;\n}) {\n const positive = deltaTone ? deltaTone === 'positive' : (delta ?? 0) > 0;\n const negative = deltaTone ? deltaTone === 'negative' : (delta ?? 0) < 0;\n const deltaClass = positive\n ? 'text-status-success-text bg-status-success-bg'\n : negative\n ? 'text-status-error-text bg-status-error-bg'\n : 'text-text-secondary bg-bg-sunken';\n const sign = delta !== undefined && delta > 0 ? '+' : '';\n\n return (\n <div\n className={cn(\n 'group relative overflow-hidden rounded-xl border border-border-subtle bg-bg-surface p-4 transition-shadow',\n 'motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))]',\n glow && 'ring-1 ring-[var(--color-action-primary-border)]/40',\n className\n )}\n >\n {glow ? (\n <span\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute -right-8 -top-8 size-24 rounded-full bg-[var(--color-action-primary-bg)]/15 blur-2xl\"\n />\n ) : null}\n <div className=\"flex items-start justify-between gap-2\">\n <p className=\"text-xs text-text-secondary\">{label}</p>\n {icon ? <span className=\"text-text-secondary\">{icon}</span> : null}\n </div>\n <p className=\"mt-1 text-2xl font-semibold text-text-primary\">{value}</p>\n <div className=\"mt-2 flex items-center justify-between gap-2\">\n {delta !== undefined && Number.isFinite(delta) ? (\n <span\n className={cn(\n 'inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-xs font-medium',\n deltaClass\n )}\n >\n <span aria-hidden=\"true\">{positive ? '▲' : negative ? '▼' : '—'}</span>\n {sign}\n {delta.toFixed(1)}\n {deltaSuffix}\n </span>\n ) : (\n <span />\n )}\n {spark && spark.length > 1 ? (\n <div className=\"w-20 shrink-0\">\n <Sparkline data={spark} tone={sparkTone} height={28} />\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsCA,SAAS,EAAG,GAAG,GAA8B;AAC3C,QAAO,EAAQ,EAAK,EAAO,CAAC;;AAY9B,SAAS,IAAgC;AAEvC,QADI,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,aAAmB,KAC9E,OAAO,WAAW,mCAAmC,CAAC;;AAG/D,SAAgB,IAA4B;CAG1C,IAAM,CAAC,GAAS,KAAc,EAAkB,EAAqB;AAUrE,QARA,QAAgB;AACd,MAAI,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,WAAY;EAC9E,IAAM,IAAK,OAAO,WAAW,mCAAmC,EAC1D,KAAY,MAA2B,EAAW,EAAE,QAAQ;AAElE,SADA,EAAG,iBAAiB,UAAU,EAAS,QAC1B,EAAG,oBAAoB,UAAU,EAAS;IACtD,EAAE,CAAC,EAEC;;AAKT,IAAM,IAAmB,yBACnB,IAAc;AAUpB,IAAI,OAAO,WAAa,OAAe,CAAC,SAAS,eAAe,EAAiB,EAAE;CACjF,IAAM,IAAK,SAAS,cAAc,QAAQ;AAG1C,CAFA,EAAG,KAAK,GACR,EAAG,cAAc,GACjB,SAAS,KAAK,YAAY,EAAG;;AAY/B,IAAM,IA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,MAAc,cAAc,KAAS,KAAK,GACjE,IAAW,IAAY,MAAc,cAAc,KAAS,KAAK,GACjE,IAAa,IACf,kDACA,IACE,8CACA,oCACA,IAAO,MAAU,KAAA,KAAa,IAAQ,IAAI,MAAM;AAEtD,QACE,kBAAC,OAAD;EACE,WAAW,EACT,6GACA,gFACA,KAAQ,uDACR,EACD;YANH;GAQG,IACC,kBAAC,QAAD;IACE,eAAY;IACZ,WAAU;IACV,CAAA,GACA;GACJ,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD;KAAG,WAAU;eAA+B;KAAU,CAAA,EACrD,IAAO,kBAAC,QAAD;KAAM,WAAU;eAAuB;KAAY,CAAA,GAAG,KAC1D;;GACN,kBAAC,KAAD;IAAG,WAAU;cAAiD;IAAU,CAAA;GACxE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,MAAU,KAAA,KAAa,OAAO,SAAS,EAAM,GAC5C,kBAAC,QAAD;KACE,WAAW,EACT,mFACA,EACD;eAJH;MAME,kBAAC,QAAD;OAAM,eAAY;iBAAQ,IAAW,MAAM,IAAW,MAAM;OAAW,CAAA;MACtE;MACA,EAAM,QAAQ,EAAE;MAChB;MACI;SAEP,kBAAC,QAAD,EAAQ,CAAA,EAET,KAAS,EAAM,SAAS,IACvB,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MAAW,MAAM;MAAO,MAAM;MAAW,QAAQ;MAAM,CAAA;KACnD,CAAA,GACJ,KACA;;GACF"}
|
|
1
|
+
{"version":3,"file":"viz.js","names":[],"sources":["../../../src/brainyrich/components/viz.tsx"],"sourcesContent":["/**\n * BrainyRich data-viz + polish kit.\n * @module brainyrich/components/viz\n *\n * A tokenized, responsive, dark-mode-first visualization + motion kit built on\n * recharts (^2.15) with lightweight, dependency-free CSS motion. Every colour is read from the\n * platform's SEMANTIC CSS variables at runtime (see {@link useVizColors}) so\n * charts always track the active theme and the emerald BrainyRich brand\n * (`--color-action-primary-bg`). No raw hex/rgb literals live in this file.\n *\n * All chart components are wrapped in a recharts `<ResponsiveContainer>` so they\n * resize with their parent. Motion is tasteful (<=250ms) and disabled under\n * `prefers-reduced-motion`.\n *\n * Page agents: import from `#brainyrich/components/viz` (or the components\n * barrel). Pass values straight from the real `bra*` hooks — this kit only\n * renders; it never fabricates data.\n */\nimport { useEffect, useId, useMemo, useState, type CSSProperties, type ReactNode } from 'react';\nimport {\n Area,\n AreaChart,\n Bar,\n BarChart,\n Cell,\n Line,\n LineChart,\n Pie,\n PieChart,\n ReferenceLine,\n ResponsiveContainer,\n Tooltip,\n XAxis,\n YAxis,\n} from 'recharts';\nimport { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nfunction cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n\n// ============================================================================\n// Motion primitives (dependency-free, pure CSS — no animation library)\n// ============================================================================\n\n/**\n * SSR-safe `prefers-reduced-motion` hook. Returns `false` on the server and on\n * the first client render, then subscribes to the media query so all motion in\n * this kit is disabled the moment the user asks for reduced motion.\n */\nfunction prefersReducedMotion(): boolean {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return false;\n return window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n}\n\nexport function useReducedMotion(): boolean {\n // Read the current preference lazily at mount (SSR-safe: `false` on the\n // server), then only update via the media-query change listener.\n const [reduced, setReduced] = useState<boolean>(prefersReducedMotion);\n\n useEffect(() => {\n if (typeof window === 'undefined' || typeof window.matchMedia !== 'function') return;\n const mq = window.matchMedia('(prefers-reduced-motion: reduce)');\n const onChange = (e: MediaQueryListEvent) => setReduced(e.matches);\n mq.addEventListener('change', onChange);\n return () => mq.removeEventListener('change', onChange);\n }, []);\n\n return reduced;\n}\n\n// Enter animation (translateY + opacity) injected once as a real stylesheet so\n// the keyframes + `.br-fade-in` class exist before the first animated paint.\nconst FADE_IN_STYLE_ID = 'brainyrich-viz-motion';\nconst FADE_IN_CSS = `\n@keyframes br-fade-in {\n from { opacity: 0; transform: translateY(8px); }\n to { opacity: 1; transform: none; }\n}\n.br-fade-in {\n animation: br-fade-in 240ms var(--motion-easing-standard, ease-out) both;\n}\n`;\n\nif (typeof document !== 'undefined' && !document.getElementById(FADE_IN_STYLE_ID)) {\n const el = document.createElement('style');\n el.id = FADE_IN_STYLE_ID;\n el.textContent = FADE_IN_CSS;\n document.head.appendChild(el);\n}\n\n// ============================================================================\n// Token → colour resolution\n// ============================================================================\n//\n// recharts needs concrete colour strings (fills, stroke, gradient stops), so we\n// resolve each semantic CSS variable to its computed value off\n// `document.documentElement` and re-read whenever the theme attribute flips.\n// Consumers NEVER hard-code colours: they name a semantic token here.\n\nconst CORE_TOKENS = {\n brand: '--color-action-primary-bg',\n brandBorder: '--color-action-primary-border',\n grid: '--color-chart-grid',\n axis: '--color-chart-axis',\n positive: '--color-chart-positive',\n negative: '--color-chart-negative',\n success: '--color-status-success',\n error: '--color-status-error',\n warning: '--color-status-warning',\n info: '--color-status-info',\n teal: '--color-accent-teal',\n blue: '--color-accent-blue',\n purple: '--color-accent-purple',\n indigo: '--color-accent-indigo',\n textPrimary: '--color-text-primary',\n textSecondary: '--color-text-secondary',\n surface: '--color-bg-elevated',\n border: '--color-border-subtle',\n} as const;\n\ntype CoreToken = keyof typeof CORE_TOKENS;\n\n/** Ordered categorical palette — emerald brand first, then distinct chart hues. */\nconst PALETTE_VARS = [\n '--color-action-primary-bg',\n '--color-chart-2',\n '--color-chart-3',\n '--color-chart-4',\n '--color-chart-5',\n '--color-chart-6',\n '--color-chart-7',\n '--color-chart-8',\n '--color-chart-9',\n '--color-chart-10',\n '--color-chart-11',\n '--color-chart-12',\n];\n\nexport type VizColors = Record<CoreToken, string> & {\n /** Categorical palette (index 0 = emerald brand). */\n palette: string[];\n /** Resolve any semantic tone name to a concrete colour string. */\n tone: (tone?: VizTone) => string;\n};\n\n/** Named tones a datum may request; falls back to the categorical palette. */\nexport type VizTone =\n | 'brand'\n | 'primary'\n | 'success'\n | 'positive'\n | 'error'\n | 'negative'\n | 'warning'\n | 'info'\n | 'teal'\n | 'blue'\n | 'purple'\n | 'indigo'\n | 'neutral';\n\nfunction readVar(name: string): string {\n if (typeof window === 'undefined') return `var(${name})`;\n const v = getComputedStyle(document.documentElement).getPropertyValue(name).trim();\n return v || `var(${name})`;\n}\n\n/**\n * Resolve the semantic viz palette from CSS variables and keep it in sync with\n * the active theme. Returns concrete colour strings for use in recharts props.\n */\nexport function useVizColors(): VizColors {\n const [tick, setTick] = useState(0);\n\n useEffect(() => {\n if (typeof window === 'undefined') return;\n const rerender = () => setTick((t) => t + 1);\n const obs = new MutationObserver(rerender);\n obs.observe(document.documentElement, {\n attributes: true,\n attributeFilter: ['data-theme', 'class', 'style'],\n });\n return () => obs.disconnect();\n }, []);\n\n return useMemo(() => {\n void tick; // re-resolve whenever the theme attribute changes\n const core = Object.fromEntries(\n (Object.keys(CORE_TOKENS) as CoreToken[]).map((k) => [k, readVar(CORE_TOKENS[k])])\n ) as Record<CoreToken, string>;\n const palette = PALETTE_VARS.map(readVar);\n\n const tone = (t?: VizTone): string => {\n switch (t) {\n case 'brand':\n case 'primary':\n return core.brand;\n case 'success':\n case 'positive':\n return core.success;\n case 'error':\n case 'negative':\n return core.error;\n case 'warning':\n return core.warning;\n case 'info':\n return core.info;\n case 'teal':\n return core.teal;\n case 'blue':\n return core.blue;\n case 'purple':\n return core.purple;\n case 'indigo':\n return core.indigo;\n case 'neutral':\n return core.textSecondary;\n default:\n return core.brand;\n }\n };\n\n return { ...core, palette, tone };\n }, [tick]);\n}\n\n// ============================================================================\n// Shared chart tooltip (themed — recharts' default is light-only)\n// ============================================================================\n\ninterface TooltipEntry {\n name?: string | number;\n value?: string | number;\n color?: string;\n payload?: Record<string, unknown>;\n}\n\nfunction useTooltipStyles(): { wrapper: CSSProperties; label: CSSProperties } {\n const c = useVizColors();\n return {\n wrapper: {\n background: c.surface,\n border: `1px solid ${c.border}`,\n borderRadius: 10,\n padding: '8px 12px',\n color: c.textPrimary,\n fontSize: 12,\n boxShadow: 'var(--shadow-pop, 0 8px 24px rgba(0,0,0,0.35))',\n },\n label: { color: c.textSecondary, marginBottom: 4, fontSize: 11 },\n };\n}\n\nfunction ChartTooltip({\n active,\n payload,\n label,\n valueFormatter,\n}: {\n active?: boolean;\n payload?: TooltipEntry[];\n label?: string | number;\n valueFormatter?: (v: number) => string;\n}) {\n const styles = useTooltipStyles();\n if (!active || !payload || payload.length === 0) return null;\n return (\n <div style={styles.wrapper} role=\"tooltip\">\n {label !== undefined && label !== '' ? <div style={styles.label}>{label}</div> : null}\n {payload.map((entry, i) => {\n const raw = typeof entry.value === 'number' ? entry.value : Number(entry.value);\n const shown =\n valueFormatter && Number.isFinite(raw) ? valueFormatter(raw) : String(entry.value ?? '');\n return (\n <div key={i} className=\"flex items-center gap-2\">\n {entry.color ? (\n <span\n aria-hidden=\"true\"\n style={{\n width: 8,\n height: 8,\n borderRadius: 9999,\n background: entry.color,\n display: 'inline-block',\n }}\n />\n ) : null}\n {entry.name ? <span style={{ color: styles.label.color }}>{entry.name}:</span> : null}\n <span style={{ fontWeight: 600 }}>{shown}</span>\n </div>\n );\n })}\n </div>\n );\n}\n\n// ============================================================================\n// Motion helpers\n// ============================================================================\n\n/**\n * Staggered enter animation (translateY + opacity). Fully disabled under\n * `prefers-reduced-motion` (renders a plain element). Use `index` to stagger a\n * list/grid of cards.\n */\nexport function FadeIn({\n children,\n index = 0,\n delay = 0,\n className,\n as: Tag = 'div',\n}: {\n children: ReactNode;\n index?: number;\n delay?: number;\n className?: string;\n as?: 'div' | 'li' | 'section';\n}) {\n const reduce = useReducedMotion();\n if (reduce) {\n return <Tag className={className}>{children}</Tag>;\n }\n return (\n <Tag\n className={cn('br-fade-in', className)}\n style={{ animationDelay: `${delay + index * 0.04}s` }}\n >\n {children}\n </Tag>\n );\n}\n\n// ============================================================================\n// GlassCard — sanctioned glass/elevation surface with graceful fallback\n// ============================================================================\n\n/**\n * Floating/hero surface using the sanctioned glass tokens. Falls back to the\n * standard elevated surface when a glass token is absent (older brand builds).\n */\nexport function GlassCard({\n children,\n className,\n glow = false,\n}: {\n children: ReactNode;\n className?: string;\n /** Add a subtle emerald glow ring. */\n glow?: boolean;\n}) {\n return (\n <div\n className={cn(\n 'rounded-2xl border p-5',\n // Glass tokens with hard fallbacks to always-present semantic tokens.\n 'border-[var(--color-border-glass,var(--color-border-subtle))]',\n 'bg-[var(--color-surface-glass,var(--color-bg-elevated))]',\n 'shadow-[var(--shadow-float,var(--shadow-elevation-3))]',\n 'backdrop-blur-[var(--blur-glass,12px)]',\n glow && 'ring-1 ring-[var(--color-action-primary-border)]/40',\n className\n )}\n >\n {children}\n </div>\n );\n}\n\n// ============================================================================\n// DonutChart\n// ============================================================================\n\nexport interface DonutDatum {\n label: string;\n value: number;\n tone?: VizTone;\n}\n\nexport function DonutChart({\n data,\n centerLabel,\n centerValue,\n legend = true,\n height = 220,\n valueFormatter,\n}: {\n data: DonutDatum[];\n centerLabel?: string;\n centerValue?: string;\n legend?: boolean;\n height?: number;\n valueFormatter?: (v: number) => string;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const rows = data.filter((d) => Number.isFinite(d.value) && d.value > 0);\n\n if (rows.length === 0) {\n return <p className=\"text-sm text-text-secondary\">No data.</p>;\n }\n\n const colorFor = (d: DonutDatum, i: number) =>\n d.tone ? c.tone(d.tone) : c.palette[i % c.palette.length];\n\n return (\n <div className=\"flex flex-col items-center gap-4 sm:flex-row sm:items-center\">\n <div className=\"relative\" style={{ width: '100%', maxWidth: 260, height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <PieChart>\n <Pie\n data={rows}\n dataKey=\"value\"\n nameKey=\"label\"\n innerRadius=\"62%\"\n outerRadius=\"90%\"\n paddingAngle={2}\n stroke=\"transparent\"\n isAnimationActive={!reduce}\n animationDuration={250}\n >\n {rows.map((d, i) => (\n <Cell key={d.label} fill={colorFor(d, i)} />\n ))}\n </Pie>\n <Tooltip content={<ChartTooltip valueFormatter={valueFormatter} />} />\n </PieChart>\n </ResponsiveContainer>\n {centerValue || centerLabel ? (\n <div className=\"pointer-events-none absolute inset-0 flex flex-col items-center justify-center\">\n {centerValue ? (\n <span className=\"text-xl font-semibold text-text-primary\">{centerValue}</span>\n ) : null}\n {centerLabel ? (\n <span className=\"text-xs text-text-secondary\">{centerLabel}</span>\n ) : null}\n </div>\n ) : null}\n </div>\n {legend ? (\n <ul className=\"grid flex-1 grid-cols-1 gap-2 sm:grid-cols-2\" aria-label=\"Legend\">\n {rows.map((d, i) => (\n <li key={d.label} className=\"flex items-center gap-2 text-xs\">\n <span\n aria-hidden=\"true\"\n className=\"size-2.5 shrink-0 rounded-full\"\n style={{ background: colorFor(d, i) }}\n />\n <span className=\"truncate text-text-secondary\">{d.label}</span>\n <span className=\"ml-auto font-medium text-text-primary\">\n {valueFormatter ? valueFormatter(d.value) : d.value}\n </span>\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n );\n}\n\n// ============================================================================\n// Sparkline\n// ============================================================================\n\nexport function Sparkline({\n data,\n tone = 'brand',\n height = 40,\n className,\n}: {\n data: number[];\n tone?: VizTone;\n height?: number;\n className?: string;\n}) {\n const c = useVizColors();\n const stroke = c.tone(tone);\n const points = data.filter((n) => Number.isFinite(n));\n const gradientId = `spark-${useId().replace(/:/g, '')}`;\n if (points.length < 2) {\n return <div className={className} style={{ height }} aria-hidden=\"true\" />;\n }\n const chartData = points.map((y, x) => ({ x, y }));\n return (\n <div className={className} style={{ width: '100%', height }} aria-hidden=\"true\">\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <AreaChart data={chartData} margin={{ top: 2, right: 0, bottom: 0, left: 0 }}>\n <defs>\n <linearGradient id={gradientId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={stroke} stopOpacity={0.28} />\n <stop offset=\"100%\" stopColor={stroke} stopOpacity={0} />\n </linearGradient>\n </defs>\n <Area\n type=\"monotone\"\n dataKey=\"y\"\n stroke={stroke}\n strokeWidth={2}\n fill={`url(#${gradientId})`}\n isAnimationActive={false}\n dot={false}\n />\n </AreaChart>\n </ResponsiveContainer>\n </div>\n );\n}\n\n// ============================================================================\n// ProgressRing — clean SVG radial progress\n// ============================================================================\n\nexport function ProgressRing({\n value,\n label,\n tone = 'brand',\n size = 120,\n strokeWidth = 10,\n}: {\n value: number;\n label?: string;\n tone?: VizTone;\n size?: number;\n strokeWidth?: number;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const pct = Math.max(0, Math.min(100, Number.isFinite(value) ? value : 0));\n const r = (size - strokeWidth) / 2;\n const circ = 2 * Math.PI * r;\n const dash = (pct / 100) * circ;\n const stroke = c.tone(tone);\n const targetOffset = circ - dash;\n // Reduced motion renders filled immediately; otherwise start empty and fill\n // on the next frame so the ring animates from 0 → value via CSS.\n const [dashOffset, setDashOffset] = useState(reduce ? targetOffset : circ);\n\n useEffect(() => {\n const id = requestAnimationFrame(() => setDashOffset(targetOffset));\n return () => cancelAnimationFrame(id);\n }, [targetOffset]);\n\n return (\n <div\n className=\"relative inline-flex items-center justify-center\"\n style={{ width: size, height: size }}\n role=\"progressbar\"\n aria-valuenow={Math.round(pct)}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={label ?? 'Progress'}\n >\n <svg width={size} height={size} className=\"-rotate-90\">\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={c.border}\n strokeWidth={strokeWidth}\n />\n <circle\n cx={size / 2}\n cy={size / 2}\n r={r}\n fill=\"none\"\n stroke={stroke}\n strokeWidth={strokeWidth}\n strokeLinecap=\"round\"\n strokeDasharray={circ}\n strokeDashoffset={dashOffset}\n style={{ transition: reduce ? 'none' : 'stroke-dashoffset 600ms ease' }}\n />\n </svg>\n <div className=\"absolute inset-0 flex flex-col items-center justify-center\">\n <span className=\"text-lg font-semibold text-text-primary\">{Math.round(pct)}%</span>\n {label ? <span className=\"text-[10px] text-text-secondary\">{label}</span> : null}\n </div>\n </div>\n );\n}\n\n// ============================================================================\n// TrendBars — diverging inflow/outflow cashflow bars\n// ============================================================================\n\nexport interface TrendDatum {\n label: string;\n inflow: number;\n outflow: number;\n}\n\nexport function TrendBars({\n data,\n height = 240,\n valueFormatter,\n}: {\n data: TrendDatum[];\n height?: number;\n valueFormatter?: (v: number) => string;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const rows = data.filter((d) => Number.isFinite(d.inflow) && Number.isFinite(d.outflow));\n if (rows.length === 0) {\n return <p className=\"text-sm text-text-secondary\">No cashflow data.</p>;\n }\n // Diverging: inflow up (positive), outflow down (negative).\n const chartData = rows.map((d) => ({\n label: d.label,\n inflow: Math.abs(d.inflow),\n outflow: -Math.abs(d.outflow),\n }));\n\n return (\n <div style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <BarChart\n data={chartData}\n margin={{ top: 8, right: 8, bottom: 0, left: 8 }}\n stackOffset=\"sign\"\n >\n <XAxis\n dataKey=\"label\"\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={{ stroke: c.grid }}\n tickLine={false}\n />\n <YAxis\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={false}\n tickLine={false}\n width={44}\n tickFormatter={(v: number) =>\n valueFormatter ? valueFormatter(Math.abs(v)) : String(Math.abs(v))\n }\n />\n <ReferenceLine y={0} stroke={c.grid} />\n <Tooltip\n cursor={{ fill: c.border, opacity: 0.25 }}\n content={\n <ChartTooltip\n valueFormatter={(v) =>\n valueFormatter ? valueFormatter(Math.abs(v)) : String(Math.abs(v))\n }\n />\n }\n />\n <Bar\n dataKey=\"inflow\"\n name=\"Inflow\"\n fill={c.positive}\n radius={[4, 4, 0, 0]}\n isAnimationActive={!reduce}\n animationDuration={250}\n />\n <Bar\n dataKey=\"outflow\"\n name=\"Outflow\"\n fill={c.negative}\n radius={[0, 0, 4, 4]}\n isAnimationActive={!reduce}\n animationDuration={250}\n />\n </BarChart>\n </ResponsiveContainer>\n </div>\n );\n}\n\n// ============================================================================\n// MiniAreaChart — projection with optional dashed target line\n// ============================================================================\n\nexport interface AreaDatum {\n x: string | number;\n y: number;\n}\n\nexport function MiniAreaChart({\n data,\n target,\n tone = 'brand',\n height = 200,\n valueFormatter,\n}: {\n data: AreaDatum[];\n target?: number;\n tone?: VizTone;\n height?: number;\n valueFormatter?: (v: number) => string;\n}) {\n const c = useVizColors();\n const reduce = useReducedMotion();\n const stroke = c.tone(tone);\n const rows = data.filter((d) => Number.isFinite(d.y));\n const gradientId = `area-${useId().replace(/:/g, '')}`;\n if (rows.length < 2) {\n return <p className=\"text-sm text-text-secondary\">Not enough data to chart.</p>;\n }\n return (\n <div style={{ width: '100%', height }}>\n <ResponsiveContainer width=\"100%\" height=\"100%\">\n <AreaChart data={rows} margin={{ top: 8, right: 8, bottom: 0, left: 8 }}>\n <defs>\n <linearGradient id={gradientId} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n <stop offset=\"0%\" stopColor={stroke} stopOpacity={0.3} />\n <stop offset=\"100%\" stopColor={stroke} stopOpacity={0.02} />\n </linearGradient>\n </defs>\n <XAxis\n dataKey=\"x\"\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={{ stroke: c.grid }}\n tickLine={false}\n />\n <YAxis\n tick={{ fill: c.textSecondary, fontSize: 11 }}\n axisLine={false}\n tickLine={false}\n width={44}\n tickFormatter={(v: number) => (valueFormatter ? valueFormatter(v) : String(v))}\n />\n <Tooltip content={<ChartTooltip valueFormatter={valueFormatter} />} />\n {target !== undefined && Number.isFinite(target) ? (\n <ReferenceLine\n y={target}\n stroke={c.textSecondary}\n strokeDasharray=\"5 4\"\n label={{\n value: valueFormatter ? `Target ${valueFormatter(target)}` : `Target ${target}`,\n position: 'insideTopRight',\n fill: c.textSecondary,\n fontSize: 10,\n }}\n />\n ) : null}\n <Area\n type=\"monotone\"\n dataKey=\"y\"\n stroke={stroke}\n strokeWidth={2}\n fill={`url(#${gradientId})`}\n isAnimationActive={!reduce}\n animationDuration={250}\n dot={false}\n />\n </AreaChart>\n </ResponsiveContainer>\n </div>\n );\n}\n\n// ============================================================================\n// LifecycleStepper — horizontal proposal/rebalance lifecycle\n// ============================================================================\n\nconst NEGATIVE_TERMINAL = /reject|cancel|abandon|decline|fail/i;\n\nexport function LifecycleStepper({\n steps,\n current,\n className,\n}: {\n steps: string[];\n current: string;\n className?: string;\n}) {\n const isNegativeTerminal = NEGATIVE_TERMINAL.test(current);\n const currentIndex = steps.findIndex((s) => s.toLowerCase() === current.toLowerCase());\n\n return (\n <ol\n className={cn('flex w-full items-center overflow-x-auto', className)}\n aria-label=\"Lifecycle progress\"\n >\n {steps.map((step, i) => {\n const isLast = i === steps.length - 1;\n const done = currentIndex >= 0 && i < currentIndex;\n const active = currentIndex >= 0 && i === currentIndex && !isNegativeTerminal;\n const state = done ? 'done' : active ? 'active' : 'upcoming';\n return (\n <li\n key={step}\n className=\"flex min-w-fit flex-1 items-center\"\n aria-current={active ? 'step' : undefined}\n >\n <div className=\"flex flex-col items-center gap-1.5 px-1\">\n <span\n className={cn(\n 'flex size-7 items-center justify-center rounded-full border text-xs font-semibold transition-colors',\n state === 'done' &&\n 'border-transparent bg-[var(--color-action-primary-bg)] text-[var(--color-action-primary-text)]',\n state === 'active' &&\n 'border-[var(--color-action-primary-border)] bg-[var(--color-action-primary-bg)]/15 text-[var(--color-action-primary-text)]',\n state === 'upcoming' && 'border-border-subtle bg-bg-sunken text-text-secondary'\n )}\n aria-hidden=\"true\"\n >\n {done ? '✓' : i + 1}\n </span>\n <span\n className={cn(\n 'whitespace-nowrap text-[11px]',\n active ? 'font-medium text-text-primary' : 'text-text-secondary'\n )}\n >\n {step}\n </span>\n </div>\n {!isLast ? (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'mx-1 h-0.5 flex-1 rounded-full',\n done ? 'bg-[var(--color-action-primary-bg)]' : 'bg-border-subtle'\n )}\n />\n ) : null}\n </li>\n );\n })}\n {isNegativeTerminal ? (\n <li className=\"ml-2 flex min-w-fit items-center gap-1.5\" aria-current=\"step\">\n <span className=\"mx-1 h-0.5 w-6 rounded-full bg-status-error-border\" aria-hidden=\"true\" />\n <div className=\"flex flex-col items-center gap-1.5 px-1\">\n <span\n className=\"flex size-7 items-center justify-center rounded-full border border-transparent bg-status-error text-xs font-semibold text-status-error-text\"\n aria-hidden=\"true\"\n >\n ✕\n </span>\n <span className=\"whitespace-nowrap text-[11px] font-medium text-status-error-text\">\n {current}\n </span>\n </div>\n </li>\n ) : null}\n </ol>\n );\n}\n\n// ============================================================================\n// StatTile — premium KPI tile\n// ============================================================================\n\nexport function StatTile({\n label,\n value,\n delta,\n deltaTone,\n deltaSuffix = '%',\n spark,\n sparkTone = 'brand',\n glow = false,\n icon,\n className,\n}: {\n label: string;\n value: string;\n /** Optional signed delta rendered as a chip (icon + sign + status colour). */\n delta?: number;\n /** Override the auto tone derived from the delta sign. */\n deltaTone?: 'positive' | 'negative' | 'neutral';\n deltaSuffix?: string;\n /** Optional inline sparkline series. */\n spark?: number[];\n sparkTone?: VizTone;\n /** Subtle emerald glow ring for hero tiles. */\n glow?: boolean;\n icon?: ReactNode;\n className?: string;\n}) {\n const positive = deltaTone ? deltaTone === 'positive' : (delta ?? 0) > 0;\n const negative = deltaTone ? deltaTone === 'negative' : (delta ?? 0) < 0;\n const deltaClass = positive\n ? 'text-status-success-text bg-status-success-bg'\n : negative\n ? 'text-status-error-text bg-status-error-bg'\n : 'text-text-secondary bg-bg-sunken';\n const sign = delta !== undefined && delta > 0 ? '+' : '';\n\n return (\n <div\n className={cn(\n 'group relative overflow-hidden rounded-xl border border-border-subtle bg-bg-surface p-4 transition-shadow',\n 'motion-safe:hover:shadow-[var(--shadow-pop-hover,var(--shadow-elevation-2))]',\n glow && 'ring-1 ring-[var(--color-action-primary-border)]/40',\n className\n )}\n >\n {glow ? (\n <span\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute -right-8 -top-8 size-24 rounded-full bg-[var(--color-action-primary-bg)]/15 blur-2xl\"\n />\n ) : null}\n <div className=\"flex items-start justify-between gap-2\">\n <p className=\"text-xs text-text-secondary\">{label}</p>\n {icon ? <span className=\"text-text-secondary\">{icon}</span> : null}\n </div>\n <p className=\"mt-1 text-2xl font-semibold text-text-primary\">{value}</p>\n <div className=\"mt-2 flex items-center justify-between gap-2\">\n {delta !== undefined && Number.isFinite(delta) ? (\n <span\n className={cn(\n 'inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-xs font-medium',\n deltaClass\n )}\n >\n <span aria-hidden=\"true\">{positive ? '▲' : negative ? '▼' : '—'}</span>\n {sign}\n {delta.toFixed(1)}\n {deltaSuffix}\n </span>\n ) : (\n <span />\n )}\n {spark && spark.length > 1 ? (\n <div className=\"w-20 shrink-0\">\n <Sparkline data={spark} tone={sparkTone} height={28} />\n </div>\n ) : null}\n </div>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAsCA,SAAS,EAAG,GAAG,GAA8B;CAC3C,OAAO,EAAQ,EAAK,CAAM,CAAC;AAC7B;AAWA,SAAS,IAAgC;CAEvC,OADI,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,aAAmB,KAC9E,OAAO,WAAW,kCAAkC,EAAE;AAC/D;AAEA,SAAgB,IAA4B;CAG1C,IAAM,CAAC,GAAS,KAAc,EAAkB,CAAoB;CAUpE,OARA,QAAgB;EACd,IAAI,OAAO,SAAW,OAAe,OAAO,OAAO,cAAe,YAAY;EAC9E,IAAM,IAAK,OAAO,WAAW,kCAAkC,GACzD,KAAY,MAA2B,EAAW,EAAE,OAAO;EAEjE,OADA,EAAG,iBAAiB,UAAU,CAAQ,SACzB,EAAG,oBAAoB,UAAU,CAAQ;CACxD,GAAG,CAAC,CAAC,GAEE;AACT;AAIA,IAAM,IAAmB,yBACnB,IAAc;AAUpB,IAAI,OAAO,WAAa,OAAe,CAAC,SAAS,eAAe,CAAgB,GAAG;CACjF,IAAM,IAAK,SAA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eACb;IACG,CAAA,CACH;KACH;OACF,IACF;;AAER;AAMA,SAAgB,EAAS,EACvB,UACA,UACA,UACA,cACA,iBAAc,KACd,UACA,eAAY,SACZ,UAAO,IACP,SACA,gBAgBC;CACD,IAAM,IAAW,IAAY,MAAc,cAAc,KAAS,KAAK,GACjE,IAAW,IAAY,MAAc,cAAc,KAAS,KAAK,GACjE,IAAa,IACf,kDACA,IACE,8CACA,oCACA,IAAO,MAAU,KAAA,KAAa,IAAQ,IAAI,MAAM;CAEtD,OACE,kBAAC,OAAD;EACE,WAAW,EACT,6GACA,gFACA,KAAQ,uDACR,CACF;YANF;GAQG,IACC,kBAAC,QAAD;IACE,eAAY;IACZ,WAAU;GACX,CAAA,IACC;GACJ,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,KAAD;KAAG,WAAU;eAA+B;IAAS,CAAA,GACpD,IAAO,kBAAC,QAAD;KAAM,WAAU;eAAuB;IAAW,CAAA,IAAI,IAC3D;;GACL,kBAAC,KAAD;IAAG,WAAU;cAAiD;GAAS,CAAA;GACvE,kBAAC,OAAD;IAAK,WAAU;cAAf,CACG,MAAU,KAAA,KAAa,OAAO,SAAS,CAAK,IAC3C,kBAAC,QAAD;KACE,WAAW,EACT,mFACA,CACF;eAJF;MAME,kBAAC,QAAD;OAAM,eAAY;iBAAQ,IAAW,MAAM,IAAW,MAAM;MAAU,CAAA;MACrE;MACA,EAAM,QAAQ,CAAC;MACf;KACG;SAEN,kBAAC,QAAD,CAAO,CAAA,GAER,KAAS,EAAM,SAAS,IACvB,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,GAAD;MAAW,MAAM;MAAO,MAAM;MAAW,QAAQ;KAAK,CAAA;IACnD,CAAA,IACH,IACD;;EACF;;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBrainyRichAnalytics.js","names":[],"sources":["../../../src/brainyrich/hooks/useBrainyRichAnalytics.ts"],"sourcesContent":["/**\n * BrainyRich analytics helpers.\n *\n * Emits product-scoped events on the shared shell event bus. The app shell's\n * RybbitSink forwards allow-listed fact events to Rybbit Cloud for product\n * analytics, and the OTel sink forwards them to the SRE telemetry pipeline.\n */\n\nimport { useCallback, useEffect } from 'react';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\n\nexport type BrainyRichPageEvent =\n | 'brainyrich.dashboard.viewed'\n | 'brainyrich.accounts.viewed'\n | 'brainyrich.account.viewed'\n | 'brainyrich.family.viewed'\n | 'brainyrich.household.viewed'\n | 'brainyrich.goals.viewed'\n | 'brainyrich.goal.viewed'\n | 'brainyrich.portfolios.viewed'\n | 'brainyrich.portfolio.viewed'\n | 'brainyrich.investments.viewed'\n | 'brainyrich.risk.viewed'\n | 'brainyrich.tax.viewed'\n | 'brainyrich.reports.viewed'\n | 'brainyrich.analytics.viewed'\n | 'brainyrich.aiAssistant.viewed';\n\nexport function useBrainyRichAnalytics() {\n const bus = useEventBus();\n\n const emit = useCallback(\n (name: BrainyRichPageEvent, payload: Record<string, unknown> = {}) => {\n bus.emitCustom(name, payload);\n },\n [bus]\n );\n\n const trackPageView = useCallback(\n (name: BrainyRichPageEvent, payload: Record<string, unknown> = {}) => {\n emit(name, payload);\n },\n [emit]\n );\n\n return { emit, trackPageView };\n}\n\n/**\n * Emit a BrainyRich page-view event once per unique (name, id) tuple.\n */\nexport function useTrackBrainyRichPageView(\n name: BrainyRichPageEvent,\n payload: Record<string, unknown> = {}\n): void {\n const { trackPageView } = useBrainyRichAnalytics();\n\n useEffect(() => {\n trackPageView(name, payload);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [name, JSON.stringify(payload)]);\n}\n"],"mappings":";;;AA4BA,SAAgB,IAAyB;CACvC,IAAM,IAAM,
|
|
1
|
+
{"version":3,"file":"useBrainyRichAnalytics.js","names":[],"sources":["../../../src/brainyrich/hooks/useBrainyRichAnalytics.ts"],"sourcesContent":["/**\n * BrainyRich analytics helpers.\n *\n * Emits product-scoped events on the shared shell event bus. The app shell's\n * RybbitSink forwards allow-listed fact events to Rybbit Cloud for product\n * analytics, and the OTel sink forwards them to the SRE telemetry pipeline.\n */\n\nimport { useCallback, useEffect } from 'react';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\n\nexport type BrainyRichPageEvent =\n | 'brainyrich.dashboard.viewed'\n | 'brainyrich.accounts.viewed'\n | 'brainyrich.account.viewed'\n | 'brainyrich.family.viewed'\n | 'brainyrich.household.viewed'\n | 'brainyrich.goals.viewed'\n | 'brainyrich.goal.viewed'\n | 'brainyrich.portfolios.viewed'\n | 'brainyrich.portfolio.viewed'\n | 'brainyrich.investments.viewed'\n | 'brainyrich.risk.viewed'\n | 'brainyrich.tax.viewed'\n | 'brainyrich.reports.viewed'\n | 'brainyrich.analytics.viewed'\n | 'brainyrich.aiAssistant.viewed';\n\nexport function useBrainyRichAnalytics() {\n const bus = useEventBus();\n\n const emit = useCallback(\n (name: BrainyRichPageEvent, payload: Record<string, unknown> = {}) => {\n bus.emitCustom(name, payload);\n },\n [bus]\n );\n\n const trackPageView = useCallback(\n (name: BrainyRichPageEvent, payload: Record<string, unknown> = {}) => {\n emit(name, payload);\n },\n [emit]\n );\n\n return { emit, trackPageView };\n}\n\n/**\n * Emit a BrainyRich page-view event once per unique (name, id) tuple.\n */\nexport function useTrackBrainyRichPageView(\n name: BrainyRichPageEvent,\n payload: Record<string, unknown> = {}\n): void {\n const { trackPageView } = useBrainyRichAnalytics();\n\n useEffect(() => {\n trackPageView(name, payload);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [name, JSON.stringify(payload)]);\n}\n"],"mappings":";;;AA4BA,SAAgB,IAAyB;CACvC,IAAM,IAAM,EAAY,GAElB,IAAO,GACV,GAA2B,IAAmC,CAAC,MAAM;EACpE,EAAI,WAAW,GAAM,CAAO;CAC9B,GACA,CAAC,CAAG,CACN;CASA,OAAO;EAAE;EAAM,eAPO,GACnB,GAA2B,IAAmC,CAAC,MAAM;GACpE,EAAK,GAAM,CAAO;EACpB,GACA,CAAC,CAAI,CAGQ;CAAc;AAC/B;AAKA,SAAgB,EACd,GACA,IAAmC,CAAC,GAC9B;CACN,IAAM,EAAE,qBAAkB,EAAuB;CAEjD,QAAgB;EACd,EAAc,GAAM,CAAO;CAE7B,GAAG,CAAC,GAAM,KAAK,UAAU,CAAO,CAAC,CAAC;AACpC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Connection, BraNetWorthSummary, BraAccount, BraAccountStatus, BraPortfolio, BraPortfolioStatus, BraHolding, BraModelPortfolio, BraGoal, BraGoalStatus, BraGoalFunding, BraHousehold, BraHouseholdStatus, BraInsight, BraInsightSeverity, BraInsightStatus, BraTransaction, BraTransactionType, BraRebalanceProposal, BraRebalanceStatus, BraPortfolioRiskReport, BraRiskSummary, BraTaxLossReport, BraTaxLossThresholds, BraAdvisor, BraAdvisorRole, BraFirmReport, BraAdvisorBranding, BraUpsertAdvisorBrandingInput, BraClientPortalSummary, BraScheduledReport, BraReportRun, BraCreateScheduledReportInput, BraGenerateReportNowInput, BraMarketQuote, BraHoldingPriceRefreshResult, BraTradeInstruction, BraTradeInstructionStatus, BraCreateTradeInstructionInput, BraCreateAccountInput, BraUpdateAccountInput, BraCreatePortfolioInput, BraUpdatePortfolioInput, BraCreateHoldingInput, BraUpdateHoldingInput, BraCreateModelPortfolioInput, BraCreateGoalInput, BraUpdateGoalInput, BraLinkGoalFundingInput, BraCreateHouseholdInput, BraUpdateHouseholdInput, BraCreateInsightInput, BraCreateTransactionInput, BraCreateRebalanceProposalInput, PaginationInput } from '../types/bra';
|
|
2
|
-
|
|
1
|
+
import { Connection, BraNetWorthSummary, BraAccount, BraAccountStatus, BraPortfolio, BraPortfolioStatus, BraHolding, BraModelPortfolio, BraGoal, BraGoalStatus, BraGoalFunding, BraHousehold, BraHouseholdStatus, BraInsight, BraInsightSeverity, BraInsightStatus, BraTransaction, BraTransactionType, BraRebalanceProposal, BraRebalanceStatus, BraPortfolioRiskReport, BraRiskSummary, BraTaxLossReport, BraTaxLossThresholds, BraAdvisor, BraAdvisorRole, BraFirmReport, BraAdminFirmSummary, BraAdvisorBranding, BraUpsertAdvisorBrandingInput, BraClientPortalSummary, BraScheduledReport, BraReportRun, BraCreateScheduledReportInput, BraGenerateReportNowInput, BraMarketQuote, BraHoldingPriceRefreshResult, BraTradeInstruction, BraTradeInstructionStatus, BraCreateTradeInstructionInput, BraCreateAccountInput, BraUpdateAccountInput, BraCreatePortfolioInput, BraUpdatePortfolioInput, BraCreateHoldingInput, BraUpdateHoldingInput, BraCreateModelPortfolioInput, BraCreateGoalInput, BraUpdateGoalInput, BraLinkGoalFundingInput, BraCreateHouseholdInput, BraUpdateHouseholdInput, BraCreateInsightInput, BraCreateTransactionInput, BraCreateRebalanceProposalInput, PaginationInput } from '../types/bra';
|
|
3
2
|
export interface AccountFilters {
|
|
4
3
|
householdId?: string;
|
|
5
4
|
status?: BraAccountStatus;
|
|
@@ -2346,6 +2345,8 @@ export declare const useSetAdvisorRole: () => import('@tanstack/react-query').Us
|
|
|
2346
2345
|
}, unknown>;
|
|
2347
2346
|
/** Firm-wide aggregate AUM + per-advisor breakdown. FIRM_ADMIN only. */
|
|
2348
2347
|
export declare const useFirmReport: () => import('@tanstack/react-query').UseQueryResult<BraFirmReport, Error>;
|
|
2348
|
+
/** Admin firm supervision dashboard: AUM, advisors, and household status breakdown. FIRM_ADMIN only. */
|
|
2349
|
+
export declare const useAdminFirmSummary: () => import('@tanstack/react-query').UseQueryResult<BraAdminFirmSummary, Error>;
|
|
2349
2350
|
/** The calling advisor's own client-portal branding, or null if not yet configured. */
|
|
2350
2351
|
export declare const useMyAdvisorBranding: () => import('@tanstack/react-query').UseQueryResult<BraAdvisorBranding | null, Error>;
|
|
2351
2352
|
export declare const useUpsertMyAdvisorBranding: () => import('@tanstack/react-query').UseMutationResult<BraAdvisorBranding, unknown, BraUpsertAdvisorBrandingInput, unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBrainyRichApi.d.ts","sourceRoot":"","sources":["../../../src/brainyrich/hooks/useBrainyRichApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EAEjB,OAAO,EACP,aAAa,EACb,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,oBAAoB,EACpB,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,6BAA6B,EAC7B,sBAAsB,EACtB,kBAAkB,EAClB,YAAY,EACZ,6BAA6B,EAC7B,yBAAyB,EACzB,cAAc,EACd,4BAA4B,EAC5B,mBAAmB,EACnB,yBAAyB,EACzB,8BAA8B,EAC9B,qBAAqB,EACrB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,qBAAqB,EACrB,4BAA4B,EAC5B,kBAAkB,EAClB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,+BAA+B,EAC/B,eAAe,EAChB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"useBrainyRichApi.d.ts","sourceRoot":"","sources":["../../../src/brainyrich/hooks/useBrainyRichApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EAEjB,OAAO,EACP,aAAa,EACb,cAAc,EACd,YAAY,EACZ,kBAAkB,EAClB,UAAU,EACV,kBAAkB,EAClB,g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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBvD,CAAC;AAEF,mIAAmI;AACnI,eAAO,MAAM,oBAAoB,oHAuBhC,CAAC;AAEF,wIAAwI;AACxI,wBAAsB,oBAAoB,CACxC,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,IAAI,CAAC,CAqBf;AAED,eAAO,MAAM,uBAAuB,+FAOnC,CAAC;AAMF,oHAAoH;AACpH,eAAO,MAAM,cAAc,GAAI,QAAQ,MAAM,GAAG,SAAS,0EAgBxD,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,uBAAuB,iHA6BnC,CAAC;AAOF,0FAA0F;AAC1F,eAAO,MAAM,oBAAoB,GAAI,cAAc,MAAM,EAAE,SAAS,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB5F,CAAC;AAEF,eAAO,MAAM,yBAAyB,gIAsBrC,CAAC;AAEF,gIAAgI;AAChI,eAAO,MAAM,yBAAyB;QAQ5B,MAAM;YACF,OAAO,CAAC,yBAAyB,EAAE,cAAc,GAAG,WAAW,CAAC;WAsB7E,CAAC"}
|
|
@@ -95,6 +95,7 @@ var f = {
|
|
|
95
95
|
myAdvisorProfile: ["brainyrich", "my-advisor-profile"],
|
|
96
96
|
advisors: ["brainyrich", "advisors"],
|
|
97
97
|
firmReport: ["brainyrich", "firm-report"],
|
|
98
|
+
adminFirmSummary: ["brainyrich", "admin-firm-summary"],
|
|
98
99
|
myAdvisorBranding: ["brainyrich", "my-advisor-branding"],
|
|
99
100
|
clientPortalSummary: ["brainyrich", "client-portal-summary"],
|
|
100
101
|
scheduledReports: ["brainyrich", "scheduled-reports"],
|
|
@@ -1009,13 +1010,20 @@ var Be = (t = {}) => {
|
|
|
1009
1010
|
queryFn: async () => (await l("query BraFirmReport {\n braFirmReport {\n workspaceId asOf totalAdvisors totalHouseholds totalAum currency\n byAdvisor { advisorId displayName email role householdCount aum }\n }\n }", {}, t)).braFirmReport,
|
|
1010
1011
|
retry: !1
|
|
1011
1012
|
});
|
|
1012
|
-
},
|
|
1013
|
+
}, Ke = () => {
|
|
1014
|
+
let { apiGatewayUrl: t } = e();
|
|
1015
|
+
return a({
|
|
1016
|
+
queryKey: f.adminFirmSummary,
|
|
1017
|
+
queryFn: async () => (await l("query BraAdminFirmSummary {\n braAdminFirmSummary {\n workspaceId asOf totalAdvisors totalHouseholds totalAum currency\n byAdvisor { advisorId displayName email role householdCount aum }\n byHouseholdStatus { status count aum }\n }\n }", {}, t)).braAdminFirmSummary,
|
|
1018
|
+
retry: !1
|
|
1019
|
+
});
|
|
1020
|
+
}, Y = "\n id workspaceId advisorId firmName logoFileId primaryColor secondaryColor\n contactEmail disclaimer createdAt updatedAt\n", qe = () => {
|
|
1013
1021
|
let { apiGatewayUrl: t } = e();
|
|
1014
1022
|
return a({
|
|
1015
1023
|
queryKey: f.myAdvisorBranding,
|
|
1016
1024
|
queryFn: async () => (await l(`query BraMyAdvisorBranding { braMyAdvisorBranding { ${Y} } }`, {}, t)).braMyAdvisorBranding
|
|
1017
1025
|
});
|
|
1018
|
-
},
|
|
1026
|
+
}, Je = () => {
|
|
1019
1027
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
1020
1028
|
return i({
|
|
1021
1029
|
mutationFn: async (e) => (await u(`mutation BraUpsertMyAdvisorBranding($input: BraUpsertAdvisorBrandingInput!) {
|
|
@@ -1026,7 +1034,7 @@ var Be = (t = {}) => {
|
|
|
1026
1034
|
onSuccess: () => n.invalidateQueries({ queryKey: f.myAdvisorBranding })
|
|
1027
1035
|
})
|
|
1028
1036
|
});
|
|
1029
|
-
}, X = "\n id workspaceId advisorId householdId name frequency status lastRunAt nextRunAt createdAt updatedAt\n", Z = "\n id workspaceId scheduledReportId advisorId householdId status periodStart periodEnd\n errorMessage generatedAt notifiedAt createdAt\n",
|
|
1037
|
+
}, X = "\n id workspaceId advisorId householdId name frequency status lastRunAt nextRunAt createdAt updatedAt\n", Z = "\n id workspaceId scheduledReportId advisorId householdId status periodStart periodEnd\n errorMessage generatedAt notifiedAt createdAt\n", Ye = () => {
|
|
1030
1038
|
let { apiGatewayUrl: t } = e(), n = a({
|
|
1031
1039
|
queryKey: f.scheduledReports,
|
|
1032
1040
|
queryFn: async () => (await l(`query BraListScheduledReports { braListScheduledReports { ${X} } }`, {}, t)).braListScheduledReports
|
|
@@ -1035,7 +1043,7 @@ var Be = (t = {}) => {
|
|
|
1035
1043
|
...n,
|
|
1036
1044
|
data: n.data ?? []
|
|
1037
1045
|
};
|
|
1038
|
-
},
|
|
1046
|
+
}, Q = () => {
|
|
1039
1047
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
1040
1048
|
return i({
|
|
1041
1049
|
mutationFn: async (e) => (await u(`mutation BraCreateScheduledReport($input: BraCreateScheduledReportInput!) {
|
|
@@ -1083,26 +1091,26 @@ var Be = (t = {}) => {
|
|
|
1083
1091
|
})
|
|
1084
1092
|
});
|
|
1085
1093
|
};
|
|
1086
|
-
async function
|
|
1094
|
+
async function $e(e, t, n) {
|
|
1087
1095
|
let r = (await l("query BraReportRunPdf($id: ID!) { braReportRunPdf(id: $id) }", { id: t }, e)).braReportRunPdf, i = atob(r), a = new Uint8Array(i.length);
|
|
1088
1096
|
for (let e = 0; e < i.length; e += 1) a[e] = i.charCodeAt(e);
|
|
1089
1097
|
let o = new Blob([a], { type: "application/pdf" }), s = URL.createObjectURL(o), c = document.createElement("a");
|
|
1090
1098
|
c.href = s, c.download = n, document.body.appendChild(c), c.click(), c.remove(), URL.revokeObjectURL(s);
|
|
1091
1099
|
}
|
|
1092
|
-
var
|
|
1100
|
+
var et = () => {
|
|
1093
1101
|
let { apiGatewayUrl: t } = e();
|
|
1094
1102
|
return i({
|
|
1095
|
-
mutationFn: async (e) =>
|
|
1103
|
+
mutationFn: async (e) => $e(t, e.id, `brainyrich-report-${e.id}.pdf`),
|
|
1096
1104
|
...d({ success: "PDF downloaded" })
|
|
1097
1105
|
});
|
|
1098
|
-
},
|
|
1106
|
+
}, tt = (t) => {
|
|
1099
1107
|
let { apiGatewayUrl: n } = e();
|
|
1100
1108
|
return a({
|
|
1101
1109
|
queryKey: f.marketQuote(t ?? ""),
|
|
1102
1110
|
enabled: !1,
|
|
1103
1111
|
queryFn: async () => (await l("query BraMarketQuote($symbol: String!) {\n braMarketQuote(symbol: $symbol) { symbol price currency asOf source }\n }", { symbol: t }, n)).braMarketQuote
|
|
1104
1112
|
});
|
|
1105
|
-
}, $ = "\n id workspaceId portfolioId accountId symbol action quantity referencePrice priceSource\n priceAsOf status source rationale reviewedById reviewedAt createdAt updatedAt\n",
|
|
1113
|
+
}, $ = "\n id workspaceId portfolioId accountId symbol action quantity referencePrice priceSource\n priceAsOf status source rationale reviewedById reviewedAt createdAt updatedAt\n", nt = (t, n) => {
|
|
1106
1114
|
let { apiGatewayUrl: r } = e(), i = a({
|
|
1107
1115
|
queryKey: f.tradeInstructions(t, n),
|
|
1108
1116
|
queryFn: async () => (await l(`query BraListTradeInstructions($portfolioId: ID, $status: BraTradeInstructionStatus) {
|
|
@@ -1116,7 +1124,7 @@ var $e = () => {
|
|
|
1116
1124
|
...i,
|
|
1117
1125
|
data: i.data ?? []
|
|
1118
1126
|
};
|
|
1119
|
-
},
|
|
1127
|
+
}, rt = () => {
|
|
1120
1128
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
1121
1129
|
return i({
|
|
1122
1130
|
mutationFn: async (e) => (await u(`mutation BraCreateTradeInstruction($input: BraCreateTradeInstructionInput!) {
|
|
@@ -1129,7 +1137,7 @@ var $e = () => {
|
|
|
1129
1137
|
}
|
|
1130
1138
|
})
|
|
1131
1139
|
});
|
|
1132
|
-
},
|
|
1140
|
+
}, it = () => {
|
|
1133
1141
|
let { apiGatewayUrl: t } = e(), n = o();
|
|
1134
1142
|
return i({
|
|
1135
1143
|
mutationFn: async ({ id: e, status: n }) => (await u(`mutation BraReviewTradeInstruction($id: ID!, $status: BraTradeInstructionStatus!) {
|
|
@@ -1147,6 +1155,6 @@ var $e = () => {
|
|
|
1147
1155
|
});
|
|
1148
1156
|
};
|
|
1149
1157
|
//#endregion
|
|
1150
|
-
export { q as fetchAllAccounts, Re as fetchAllHoldings, re as useAccount, ne as useAccounts, _e as useAcknowledgeInsight, Ue as useAdvisors, Be as useAllAccounts, ze as useAllTransactions, oe as useArchiveAccount, V as useArchiveGoal, me as useArchiveHousehold, E as useArchivePortfolio, ie as useCreateAccount, z as useCreateGoal, O as useCreateHolding, fe as useCreateHousehold, ge as useCreateInsight, F as useCreateModelPortfolio, le as useCreatePortfolio, ke as useCreateRebalanceProposal,
|
|
1158
|
+
export { q as fetchAllAccounts, Re as fetchAllHoldings, re as useAccount, ne as useAccounts, _e as useAcknowledgeInsight, Ke as useAdminFirmSummary, Ue as useAdvisors, Be as useAllAccounts, ze as useAllTransactions, oe as useArchiveAccount, V as useArchiveGoal, me as useArchiveHousehold, E as useArchivePortfolio, ie as useCreateAccount, z as useCreateGoal, O as useCreateHolding, fe as useCreateHousehold, ge as useCreateInsight, F as useCreateModelPortfolio, le as useCreatePortfolio, ke as useCreateRebalanceProposal, Q as useCreateScheduledReport, rt as useCreateTradeInstruction, A as useDeleteHolding, ve as useDismissInsight, et as useDownloadReportRunPdf, He as useEnsureAdvisorProfile, Ge as useFirmReport, Qe as useGenerateReportNow, Se as useGenerateRiskInsights, L as useGoal, R as useGoalFundings, I as useGoals, Ee as useHarvestTaxLossInsights, D as useHoldings, de as useHousehold, ue as useHouseholds, he as useInsights, U as useLinkGoalFunding, tt as useMarketQuote, P as useModelPortfolio, N as useModelPortfolios, qe as useMyAdvisorBranding, Ve as useMyAdvisorProfile, te as useNetWorthSummary, je as usePagedAccounts, Ne as usePagedGoals, Pe as usePagedHouseholds, Fe as usePagedInsights, Me as usePagedPortfolios, Ie as usePagedTransactions, ce as usePortfolio, xe as usePortfolioRiskSignals, Ce as usePortfolioRiskSummary, se as usePortfolios, Oe as useRebalanceProposals, H as useRecalcGoalProjection, De as useRecordTransaction, Ze as useReportRuns, ye as useResolveInsight, it as useReviewTradeInstruction, Ye as useScheduledReports, We as useSetAdvisorRole, Xe as useSetScheduledReportStatus, Te as useTaxLossOpportunities, nt as useTradeInstructions, Ae as useTransitionRebalanceProposal, W as useUnlinkGoalFunding, ae as useUpdateAccount, B as useUpdateGoal, k as useUpdateHolding, pe as useUpdateHousehold, T as useUpdatePortfolio, Je as useUpsertMyAdvisorBranding };
|
|
1151
1159
|
|
|
1152
1160
|
//# sourceMappingURL=useBrainyRichApi.js.map
|