@burdenoff/microfe-ecoimpacthub 2026.1203.4 → 2026.1205.2
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/ecoimpacthub/components/AiInsightsPanel.d.ts +3 -0
- package/dist/ecoimpacthub/components/AiInsightsPanel.js +79 -87
- package/dist/ecoimpacthub/components/AiInsightsPanel.js.map +1 -1
- package/dist/ecoimpacthub/components/EcoDiscussion.js +7 -9
- package/dist/ecoimpacthub/components/EcoDiscussion.js.map +1 -1
- package/dist/ecoimpacthub/components/EcoTags.js +0 -1
- package/dist/ecoimpacthub/components/EcoTags.js.map +1 -1
- package/dist/ecoimpacthub/components/EvidenceUpload.js +0 -1
- package/dist/ecoimpacthub/components/EvidenceUpload.js.map +1 -1
- package/dist/ecoimpacthub/components/FileLink.js +0 -1
- package/dist/ecoimpacthub/components/FileLink.js.map +1 -1
- package/dist/ecoimpacthub/components/ai/AiAnomalyPanel.js +9 -10
- package/dist/ecoimpacthub/components/ai/AiAnomalyPanel.js.map +1 -1
- package/dist/ecoimpacthub/components/ai/AiThresholdSuggest.js +3 -4
- package/dist/ecoimpacthub/components/ai/AiThresholdSuggest.js.map +1 -1
- package/dist/ecoimpacthub/components/ai/AiTriageDialog.js +8 -9
- package/dist/ecoimpacthub/components/ai/AiTriageDialog.js.map +1 -1
- package/dist/ecoimpacthub/field/useFieldQueue.js +0 -1
- package/dist/ecoimpacthub/field/useFieldQueue.js.map +1 -1
- package/dist/ecoimpacthub/hooks/useEcoAiMonitoring.js +0 -1
- package/dist/ecoimpacthub/hooks/useEcoAiMonitoring.js.map +1 -1
- package/dist/ecoimpacthub/hooks/useEcoAiOperations.js +0 -1
- package/dist/ecoimpacthub/hooks/useEcoAiOperations.js.map +1 -1
- package/dist/ecoimpacthub/hooks/useEcoComments.js +0 -1
- package/dist/ecoimpacthub/hooks/useEcoComments.js.map +1 -1
- package/dist/ecoimpacthub/hooks/useEcoFiles.js +0 -1
- package/dist/ecoimpacthub/hooks/useEcoFiles.js.map +1 -1
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.d.ts +5 -1
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.js +128 -105
- package/dist/ecoimpacthub/hooks/useEcoImpactHubApi.js.map +1 -1
- package/dist/ecoimpacthub/hooks/useEcoPlatformModulesApi.d.ts +9 -1
- package/dist/ecoimpacthub/hooks/useEcoPlatformModulesApi.js +5 -6
- package/dist/ecoimpacthub/hooks/useEcoPlatformModulesApi.js.map +1 -1
- package/dist/ecoimpacthub/hooks/useEcoTags.js +0 -1
- package/dist/ecoimpacthub/hooks/useEcoTags.js.map +1 -1
- package/dist/ecoimpacthub/pages/DashboardPage.d.ts +6 -3
- package/dist/ecoimpacthub/pages/DashboardPage.js +263 -292
- package/dist/ecoimpacthub/pages/DashboardPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js +0 -1
- package/dist/ecoimpacthub/pages/_shared/EvidenceThumb.js.map +1 -1
- package/dist/ecoimpacthub/pages/ai/AiOperationsPage.js +126 -128
- package/dist/ecoimpacthub/pages/ai/AiOperationsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js +12 -13
- package/dist/ecoimpacthub/pages/carbon/CarbonPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/circularity/CircularityPage.js +11 -12
- package/dist/ecoimpacthub/pages/circularity/CircularityPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/compliance/CompliancePage.js +70 -71
- package/dist/ecoimpacthub/pages/compliance/CompliancePage.js.map +1 -1
- package/dist/ecoimpacthub/pages/credits/CreditsPage.js +140 -141
- package/dist/ecoimpacthub/pages/credits/CreditsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/dashboardKpis.d.ts +35 -0
- package/dist/ecoimpacthub/pages/dashboardKpis.js +60 -0
- package/dist/ecoimpacthub/pages/dashboardKpis.js.map +1 -0
- package/dist/ecoimpacthub/pages/ehs/EhsPage.js +467 -468
- package/dist/ecoimpacthub/pages/ehs/EhsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/energy/EnergyPage.js +414 -415
- package/dist/ecoimpacthub/pages/energy/EnergyPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/grants/DonorPortalPage.js +0 -1
- package/dist/ecoimpacthub/pages/grants/DonorPortalPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/grants/GrantDetailPage.js +11 -13
- package/dist/ecoimpacthub/pages/grants/GrantDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/grants/GrantsPage.js +28 -30
- package/dist/ecoimpacthub/pages/grants/GrantsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js +16 -18
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js +16 -18
- package/dist/ecoimpacthub/pages/habitat/HabitatProjectsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/StewardshipPage.js +17 -18
- package/dist/ecoimpacthub/pages/habitat/StewardshipPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/habitat/stewardship.js +0 -1
- package/dist/ecoimpacthub/pages/habitat/stewardship.js.map +1 -1
- package/dist/ecoimpacthub/pages/metrics/MetricDetailDialog.js +0 -1
- package/dist/ecoimpacthub/pages/metrics/MetricDetailDialog.js.map +1 -1
- package/dist/ecoimpacthub/pages/metrics/MetricsPage.js +11 -12
- package/dist/ecoimpacthub/pages/metrics/MetricsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/mobile/FieldQueuePanel.js +0 -1
- package/dist/ecoimpacthub/pages/mobile/FieldQueuePanel.js.map +1 -1
- package/dist/ecoimpacthub/pages/mobile/MobileDashboardPage.js +14 -16
- package/dist/ecoimpacthub/pages/mobile/MobileDashboardPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/mobile/MobileRecordObservationPage.js +4 -6
- package/dist/ecoimpacthub/pages/mobile/MobileRecordObservationPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/mobile/MobileShell.js +0 -2
- package/dist/ecoimpacthub/pages/mobile/MobileShell.js.map +1 -1
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js +118 -120
- package/dist/ecoimpacthub/pages/monitoring/MonitoringPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js +25 -27
- package/dist/ecoimpacthub/pages/observations/ObservationsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/products/ProductFootprintPage.js +5 -6
- package/dist/ecoimpacthub/pages/products/ProductFootprintPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js +26 -28
- package/dist/ecoimpacthub/pages/reports/ReportDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js +22 -24
- package/dist/ecoimpacthub/pages/reports/ReportsPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/satellite/SatellitePage.js +120 -121
- package/dist/ecoimpacthub/pages/satellite/SatellitePage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js +274 -277
- package/dist/ecoimpacthub/pages/sites/SiteDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/sites/SitesPage.js +99 -101
- package/dist/ecoimpacthub/pages/sites/SitesPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js +31 -33
- package/dist/ecoimpacthub/pages/species/SpeciesDetailPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js +20 -22
- package/dist/ecoimpacthub/pages/species/SpeciesPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/suppliers/SuppliersPage.js +12 -13
- package/dist/ecoimpacthub/pages/suppliers/SuppliersPage.js.map +1 -1
- package/dist/ecoimpacthub/pages/telemetry/TelemetryPage.js +14 -15
- package/dist/ecoimpacthub/pages/telemetry/TelemetryPage.js.map +1 -1
- package/dist/ecoimpacthub/types/index.d.ts +30 -0
- package/dist/ecoimpacthub/utils/cn.js +2 -2
- package/dist/generated/wspace-types.d.ts +132863 -10029
- package/dist/index.js +0 -1
- package/package.json +4 -1
- package/dist/_virtual/_rolldown/runtime.js +0 -19
- package/dist/ecoimpacthub/components/ai/index.js +0 -5
- package/dist/ecoimpacthub/context/index.js +0 -1
- package/dist/ecoimpacthub/hooks/index.js +0 -12
- package/dist/ecoimpacthub/index.js +0 -12
- package/dist/ecoimpacthub/services/index.js +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +0 -19
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/d3-array/dist/d3-array.js +0 -204
- package/dist/node_modules/d3-array/dist/d3-array.js.map +0 -1
- package/dist/node_modules/d3-color/dist/d3-color.js +0 -388
- package/dist/node_modules/d3-color/dist/d3-color.js.map +0 -1
- package/dist/node_modules/d3-format/dist/d3-format.js +0 -186
- package/dist/node_modules/d3-format/dist/d3-format.js.map +0 -1
- package/dist/node_modules/d3-interpolate/dist/d3-interpolate.js +0 -185
- package/dist/node_modules/d3-interpolate/dist/d3-interpolate.js.map +0 -1
- package/dist/node_modules/d3-path/dist/d3-path.js +0 -90
- package/dist/node_modules/d3-path/dist/d3-path.js.map +0 -1
- package/dist/node_modules/d3-scale/dist/d3-scale.js +0 -622
- package/dist/node_modules/d3-scale/dist/d3-scale.js.map +0 -1
- package/dist/node_modules/d3-shape/dist/d3-shape.js +0 -901
- package/dist/node_modules/d3-shape/dist/d3-shape.js.map +0 -1
- package/dist/node_modules/d3-time/dist/d3-time.js +0 -241
- package/dist/node_modules/d3-time/dist/d3-time.js.map +0 -1
- package/dist/node_modules/d3-time-format/dist/d3-time-format.js +0 -545
- package/dist/node_modules/d3-time-format/dist/d3-time-format.js.map +0 -1
- package/dist/node_modules/decimal.js-light/decimal.js +0 -381
- package/dist/node_modules/decimal.js-light/decimal.js.map +0 -1
- package/dist/node_modules/eventemitter3/index.js +0 -94
- package/dist/node_modules/eventemitter3/index.js.map +0 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +0 -297
- package/dist/node_modules/fast-equals/dist/es/index.js.map +0 -1
- package/dist/node_modules/lodash/_DataView.js +0 -11
- package/dist/node_modules/lodash/_DataView.js.map +0 -1
- package/dist/node_modules/lodash/_Hash.js +0 -22
- package/dist/node_modules/lodash/_Hash.js.map +0 -1
- package/dist/node_modules/lodash/_ListCache.js +0 -22
- package/dist/node_modules/lodash/_ListCache.js.map +0 -1
- package/dist/node_modules/lodash/_Map.js +0 -11
- package/dist/node_modules/lodash/_Map.js.map +0 -1
- package/dist/node_modules/lodash/_MapCache.js +0 -22
- package/dist/node_modules/lodash/_MapCache.js.map +0 -1
- package/dist/node_modules/lodash/_Promise.js +0 -11
- package/dist/node_modules/lodash/_Promise.js.map +0 -1
- package/dist/node_modules/lodash/_Set.js +0 -11
- package/dist/node_modules/lodash/_Set.js.map +0 -1
- package/dist/node_modules/lodash/_SetCache.js +0 -17
- package/dist/node_modules/lodash/_SetCache.js.map +0 -1
- package/dist/node_modules/lodash/_Stack.js +0 -20
- package/dist/node_modules/lodash/_Stack.js.map +0 -1
- package/dist/node_modules/lodash/_Symbol.js +0 -10
- package/dist/node_modules/lodash/_Symbol.js.map +0 -1
- package/dist/node_modules/lodash/_Uint8Array.js +0 -10
- package/dist/node_modules/lodash/_Uint8Array.js.map +0 -1
- package/dist/node_modules/lodash/_WeakMap.js +0 -11
- package/dist/node_modules/lodash/_WeakMap.js.map +0 -1
- package/dist/node_modules/lodash/_apply.js +0 -18
- package/dist/node_modules/lodash/_apply.js.map +0 -1
- package/dist/node_modules/lodash/_arrayEvery.js +0 -13
- package/dist/node_modules/lodash/_arrayEvery.js.map +0 -1
- package/dist/node_modules/lodash/_arrayFilter.js +0 -16
- package/dist/node_modules/lodash/_arrayFilter.js.map +0 -1
- package/dist/node_modules/lodash/_arrayIncludes.js +0 -14
- package/dist/node_modules/lodash/_arrayIncludes.js.map +0 -1
- package/dist/node_modules/lodash/_arrayIncludesWith.js +0 -13
- package/dist/node_modules/lodash/_arrayIncludesWith.js.map +0 -1
- package/dist/node_modules/lodash/_arrayLikeKeys.js +0 -21
- package/dist/node_modules/lodash/_arrayLikeKeys.js.map +0 -1
- package/dist/node_modules/lodash/_arrayMap.js +0 -13
- package/dist/node_modules/lodash/_arrayMap.js.map +0 -1
- package/dist/node_modules/lodash/_arrayPush.js +0 -13
- package/dist/node_modules/lodash/_arrayPush.js.map +0 -1
- package/dist/node_modules/lodash/_arraySome.js +0 -13
- package/dist/node_modules/lodash/_arraySome.js.map +0 -1
- package/dist/node_modules/lodash/_asciiToArray.js +0 -12
- package/dist/node_modules/lodash/_asciiToArray.js.map +0 -1
- package/dist/node_modules/lodash/_assocIndexOf.js +0 -15
- package/dist/node_modules/lodash/_assocIndexOf.js.map +0 -1
- package/dist/node_modules/lodash/_baseAssignValue.js +0 -19
- package/dist/node_modules/lodash/_baseAssignValue.js.map +0 -1
- package/dist/node_modules/lodash/_baseEach.js +0 -12
- package/dist/node_modules/lodash/_baseEach.js.map +0 -1
- package/dist/node_modules/lodash/_baseEvery.js +0 -17
- package/dist/node_modules/lodash/_baseEvery.js.map +0 -1
- package/dist/node_modules/lodash/_baseExtremum.js +0 -18
- package/dist/node_modules/lodash/_baseExtremum.js.map +0 -1
- package/dist/node_modules/lodash/_baseFindIndex.js +0 -13
- package/dist/node_modules/lodash/_baseFindIndex.js.map +0 -1
- package/dist/node_modules/lodash/_baseFlatten.js +0 -20
- package/dist/node_modules/lodash/_baseFlatten.js.map +0 -1
- package/dist/node_modules/lodash/_baseFor.js +0 -10
- package/dist/node_modules/lodash/_baseFor.js.map +0 -1
- package/dist/node_modules/lodash/_baseForOwn.js +0 -15
- package/dist/node_modules/lodash/_baseForOwn.js.map +0 -1
- package/dist/node_modules/lodash/_baseGet.js +0 -17
- package/dist/node_modules/lodash/_baseGet.js.map +0 -1
- package/dist/node_modules/lodash/_baseGetAllKeys.js +0 -16
- package/dist/node_modules/lodash/_baseGetAllKeys.js.map +0 -1
- package/dist/node_modules/lodash/_baseGetTag.js +0 -16
- package/dist/node_modules/lodash/_baseGetTag.js.map +0 -1
- package/dist/node_modules/lodash/_baseGt.js +0 -12
- package/dist/node_modules/lodash/_baseGt.js.map +0 -1
- package/dist/node_modules/lodash/_baseHasIn.js +0 -12
- package/dist/node_modules/lodash/_baseHasIn.js.map +0 -1
- package/dist/node_modules/lodash/_baseIndexOf.js +0 -16
- package/dist/node_modules/lodash/_baseIndexOf.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsArguments.js +0 -15
- package/dist/node_modules/lodash/_baseIsArguments.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsEqual.js +0 -15
- package/dist/node_modules/lodash/_baseIsEqual.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsEqualDeep.js +0 -36
- package/dist/node_modules/lodash/_baseIsEqualDeep.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsMatch.js +0 -32
- package/dist/node_modules/lodash/_baseIsMatch.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsNaN.js +0 -12
- package/dist/node_modules/lodash/_baseIsNaN.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsNative.js +0 -17
- package/dist/node_modules/lodash/_baseIsNative.js.map +0 -1
- package/dist/node_modules/lodash/_baseIsTypedArray.js +0 -17
- package/dist/node_modules/lodash/_baseIsTypedArray.js.map +0 -1
- package/dist/node_modules/lodash/_baseIteratee.js +0 -18
- package/dist/node_modules/lodash/_baseIteratee.js.map +0 -1
- package/dist/node_modules/lodash/_baseKeys.js +0 -18
- package/dist/node_modules/lodash/_baseKeys.js.map +0 -1
- package/dist/node_modules/lodash/_baseLt.js +0 -12
- package/dist/node_modules/lodash/_baseLt.js.map +0 -1
- package/dist/node_modules/lodash/_baseMap.js +0 -18
- package/dist/node_modules/lodash/_baseMap.js.map +0 -1
- package/dist/node_modules/lodash/_baseMatches.js +0 -19
- package/dist/node_modules/lodash/_baseMatches.js.map +0 -1
- package/dist/node_modules/lodash/_baseMatchesProperty.js +0 -23
- package/dist/node_modules/lodash/_baseMatchesProperty.js.map +0 -1
- package/dist/node_modules/lodash/_baseOrderBy.js +0 -38
- package/dist/node_modules/lodash/_baseOrderBy.js.map +0 -1
- package/dist/node_modules/lodash/_baseProperty.js +0 -14
- package/dist/node_modules/lodash/_baseProperty.js.map +0 -1
- package/dist/node_modules/lodash/_basePropertyDeep.js +0 -16
- package/dist/node_modules/lodash/_basePropertyDeep.js.map +0 -1
- package/dist/node_modules/lodash/_baseRange.js +0 -14
- package/dist/node_modules/lodash/_baseRange.js.map +0 -1
- package/dist/node_modules/lodash/_baseRest.js +0 -16
- package/dist/node_modules/lodash/_baseRest.js.map +0 -1
- package/dist/node_modules/lodash/_baseSetToString.js +0 -20
- package/dist/node_modules/lodash/_baseSetToString.js.map +0 -1
- package/dist/node_modules/lodash/_baseSlice.js +0 -15
- package/dist/node_modules/lodash/_baseSlice.js.map +0 -1
- package/dist/node_modules/lodash/_baseSome.js +0 -17
- package/dist/node_modules/lodash/_baseSome.js.map +0 -1
- package/dist/node_modules/lodash/_baseSortBy.js +0 -14
- package/dist/node_modules/lodash/_baseSortBy.js.map +0 -1
- package/dist/node_modules/lodash/_baseTimes.js +0 -13
- package/dist/node_modules/lodash/_baseTimes.js.map +0 -1
- package/dist/node_modules/lodash/_baseToString.js +0 -21
- package/dist/node_modules/lodash/_baseToString.js.map +0 -1
- package/dist/node_modules/lodash/_baseTrim.js +0 -14
- package/dist/node_modules/lodash/_baseTrim.js.map +0 -1
- package/dist/node_modules/lodash/_baseUnary.js +0 -14
- package/dist/node_modules/lodash/_baseUnary.js.map +0 -1
- package/dist/node_modules/lodash/_baseUniq.js +0 -33
- package/dist/node_modules/lodash/_baseUniq.js.map +0 -1
- package/dist/node_modules/lodash/_cacheHas.js +0 -12
- package/dist/node_modules/lodash/_cacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_castPath.js +0 -17
- package/dist/node_modules/lodash/_castPath.js.map +0 -1
- package/dist/node_modules/lodash/_castSlice.js +0 -15
- package/dist/node_modules/lodash/_castSlice.js.map +0 -1
- package/dist/node_modules/lodash/_compareAscending.js +0 -19
- package/dist/node_modules/lodash/_compareAscending.js.map +0 -1
- package/dist/node_modules/lodash/_compareMultiple.js +0 -18
- package/dist/node_modules/lodash/_compareMultiple.js.map +0 -1
- package/dist/node_modules/lodash/_coreJsData.js +0 -10
- package/dist/node_modules/lodash/_coreJsData.js.map +0 -1
- package/dist/node_modules/lodash/_createBaseEach.js +0 -19
- package/dist/node_modules/lodash/_createBaseEach.js.map +0 -1
- package/dist/node_modules/lodash/_createBaseFor.js +0 -18
- package/dist/node_modules/lodash/_createBaseFor.js.map +0 -1
- package/dist/node_modules/lodash/_createCaseFirst.js +0 -21
- package/dist/node_modules/lodash/_createCaseFirst.js.map +0 -1
- package/dist/node_modules/lodash/_createFind.js +0 -26
- package/dist/node_modules/lodash/_createFind.js.map +0 -1
- package/dist/node_modules/lodash/_createRange.js +0 -18
- package/dist/node_modules/lodash/_createRange.js.map +0 -1
- package/dist/node_modules/lodash/_createSet.js +0 -15
- package/dist/node_modules/lodash/_createSet.js.map +0 -1
- package/dist/node_modules/lodash/_defineProperty.js +0 -16
- package/dist/node_modules/lodash/_defineProperty.js.map +0 -1
- package/dist/node_modules/lodash/_equalArrays.js +0 -41
- package/dist/node_modules/lodash/_equalArrays.js.map +0 -1
- package/dist/node_modules/lodash/_equalByTag.js +0 -41
- package/dist/node_modules/lodash/_equalByTag.js.map +0 -1
- package/dist/node_modules/lodash/_equalObjects.js +0 -38
- package/dist/node_modules/lodash/_equalObjects.js.map +0 -1
- package/dist/node_modules/lodash/_freeGlobal.js +0 -9
- package/dist/node_modules/lodash/_freeGlobal.js.map +0 -1
- package/dist/node_modules/lodash/_getAllKeys.js +0 -16
- package/dist/node_modules/lodash/_getAllKeys.js.map +0 -1
- package/dist/node_modules/lodash/_getMapData.js +0 -15
- package/dist/node_modules/lodash/_getMapData.js.map +0 -1
- package/dist/node_modules/lodash/_getMatchData.js +0 -23
- package/dist/node_modules/lodash/_getMatchData.js.map +0 -1
- package/dist/node_modules/lodash/_getNative.js +0 -16
- package/dist/node_modules/lodash/_getNative.js.map +0 -1
- package/dist/node_modules/lodash/_getPrototype.js +0 -10
- package/dist/node_modules/lodash/_getPrototype.js.map +0 -1
- package/dist/node_modules/lodash/_getRawTag.js +0 -20
- package/dist/node_modules/lodash/_getRawTag.js.map +0 -1
- package/dist/node_modules/lodash/_getSymbols.js +0 -16
- package/dist/node_modules/lodash/_getSymbols.js.map +0 -1
- package/dist/node_modules/lodash/_getTag.js +0 -27
- package/dist/node_modules/lodash/_getTag.js.map +0 -1
- package/dist/node_modules/lodash/_getValue.js +0 -12
- package/dist/node_modules/lodash/_getValue.js.map +0 -1
- package/dist/node_modules/lodash/_hasPath.js +0 -25
- package/dist/node_modules/lodash/_hasPath.js.map +0 -1
- package/dist/node_modules/lodash/_hasUnicode.js +0 -13
- package/dist/node_modules/lodash/_hasUnicode.js.map +0 -1
- package/dist/node_modules/lodash/_hashClear.js +0 -14
- package/dist/node_modules/lodash/_hashClear.js.map +0 -1
- package/dist/node_modules/lodash/_hashDelete.js +0 -13
- package/dist/node_modules/lodash/_hashDelete.js.map +0 -1
- package/dist/node_modules/lodash/_hashGet.js +0 -19
- package/dist/node_modules/lodash/_hashGet.js.map +0 -1
- package/dist/node_modules/lodash/_hashHas.js +0 -15
- package/dist/node_modules/lodash/_hashHas.js.map +0 -1
- package/dist/node_modules/lodash/_hashSet.js +0 -15
- package/dist/node_modules/lodash/_hashSet.js.map +0 -1
- package/dist/node_modules/lodash/_isFlattenable.js +0 -16
- package/dist/node_modules/lodash/_isFlattenable.js.map +0 -1
- package/dist/node_modules/lodash/_isIndex.js +0 -14
- package/dist/node_modules/lodash/_isIndex.js.map +0 -1
- package/dist/node_modules/lodash/_isIterateeCall.js +0 -19
- package/dist/node_modules/lodash/_isIterateeCall.js.map +0 -1
- package/dist/node_modules/lodash/_isKey.js +0 -17
- package/dist/node_modules/lodash/_isKey.js.map +0 -1
- package/dist/node_modules/lodash/_isKeyable.js +0 -13
- package/dist/node_modules/lodash/_isKeyable.js.map +0 -1
- package/dist/node_modules/lodash/_isMasked.js +0 -17
- package/dist/node_modules/lodash/_isMasked.js.map +0 -1
- package/dist/node_modules/lodash/_isPrototype.js +0 -14
- package/dist/node_modules/lodash/_isPrototype.js.map +0 -1
- package/dist/node_modules/lodash/_isStrictComparable.js +0 -14
- package/dist/node_modules/lodash/_isStrictComparable.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheClear.js +0 -12
- package/dist/node_modules/lodash/_listCacheClear.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheDelete.js +0 -15
- package/dist/node_modules/lodash/_listCacheDelete.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheGet.js +0 -15
- package/dist/node_modules/lodash/_listCacheGet.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheHas.js +0 -14
- package/dist/node_modules/lodash/_listCacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_listCacheSet.js +0 -15
- package/dist/node_modules/lodash/_listCacheSet.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheClear.js +0 -20
- package/dist/node_modules/lodash/_mapCacheClear.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheDelete.js +0 -15
- package/dist/node_modules/lodash/_mapCacheDelete.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheGet.js +0 -14
- package/dist/node_modules/lodash/_mapCacheGet.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheHas.js +0 -14
- package/dist/node_modules/lodash/_mapCacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_mapCacheSet.js +0 -15
- package/dist/node_modules/lodash/_mapCacheSet.js.map +0 -1
- package/dist/node_modules/lodash/_mapToArray.js +0 -15
- package/dist/node_modules/lodash/_mapToArray.js.map +0 -1
- package/dist/node_modules/lodash/_matchesStrictComparable.js +0 -14
- package/dist/node_modules/lodash/_matchesStrictComparable.js.map +0 -1
- package/dist/node_modules/lodash/_memoizeCapped.js +0 -17
- package/dist/node_modules/lodash/_memoizeCapped.js.map +0 -1
- package/dist/node_modules/lodash/_nativeCreate.js +0 -10
- package/dist/node_modules/lodash/_nativeCreate.js.map +0 -1
- package/dist/node_modules/lodash/_nativeKeys.js +0 -10
- package/dist/node_modules/lodash/_nativeKeys.js.map +0 -1
- package/dist/node_modules/lodash/_nodeUtil.js +0 -15
- package/dist/node_modules/lodash/_nodeUtil.js.map +0 -1
- package/dist/node_modules/lodash/_objectToString.js +0 -13
- package/dist/node_modules/lodash/_objectToString.js.map +0 -1
- package/dist/node_modules/lodash/_overArg.js +0 -14
- package/dist/node_modules/lodash/_overArg.js.map +0 -1
- package/dist/node_modules/lodash/_overRest.js +0 -19
- package/dist/node_modules/lodash/_overRest.js.map +0 -1
- package/dist/node_modules/lodash/_root.js +0 -11
- package/dist/node_modules/lodash/_root.js.map +0 -1
- package/dist/node_modules/lodash/_setCacheAdd.js +0 -12
- package/dist/node_modules/lodash/_setCacheAdd.js.map +0 -1
- package/dist/node_modules/lodash/_setCacheHas.js +0 -12
- package/dist/node_modules/lodash/_setCacheHas.js.map +0 -1
- package/dist/node_modules/lodash/_setToArray.js +0 -15
- package/dist/node_modules/lodash/_setToArray.js.map +0 -1
- package/dist/node_modules/lodash/_setToString.js +0 -12
- package/dist/node_modules/lodash/_setToString.js.map +0 -1
- package/dist/node_modules/lodash/_shortOut.js +0 -20
- package/dist/node_modules/lodash/_shortOut.js.map +0 -1
- package/dist/node_modules/lodash/_stackClear.js +0 -14
- package/dist/node_modules/lodash/_stackClear.js.map +0 -1
- package/dist/node_modules/lodash/_stackDelete.js +0 -13
- package/dist/node_modules/lodash/_stackDelete.js.map +0 -1
- package/dist/node_modules/lodash/_stackGet.js +0 -12
- package/dist/node_modules/lodash/_stackGet.js.map +0 -1
- package/dist/node_modules/lodash/_stackHas.js +0 -12
- package/dist/node_modules/lodash/_stackHas.js.map +0 -1
- package/dist/node_modules/lodash/_stackSet.js +0 -22
- package/dist/node_modules/lodash/_stackSet.js.map +0 -1
- package/dist/node_modules/lodash/_strictIndexOf.js +0 -13
- package/dist/node_modules/lodash/_strictIndexOf.js.map +0 -1
- package/dist/node_modules/lodash/_stringToArray.js +0 -16
- package/dist/node_modules/lodash/_stringToArray.js.map +0 -1
- package/dist/node_modules/lodash/_stringToPath.js +0 -16
- package/dist/node_modules/lodash/_stringToPath.js.map +0 -1
- package/dist/node_modules/lodash/_toKey.js +0 -16
- package/dist/node_modules/lodash/_toKey.js.map +0 -1
- package/dist/node_modules/lodash/_toSource.js +0 -21
- package/dist/node_modules/lodash/_toSource.js.map +0 -1
- package/dist/node_modules/lodash/_trimmedEndIndex.js +0 -14
- package/dist/node_modules/lodash/_trimmedEndIndex.js.map +0 -1
- package/dist/node_modules/lodash/_unicodeToArray.js +0 -23
- package/dist/node_modules/lodash/_unicodeToArray.js.map +0 -1
- package/dist/node_modules/lodash/constant.js +0 -14
- package/dist/node_modules/lodash/constant.js.map +0 -1
- package/dist/node_modules/lodash/debounce.js +0 -56
- package/dist/node_modules/lodash/debounce.js.map +0 -1
- package/dist/node_modules/lodash/eq.js +0 -12
- package/dist/node_modules/lodash/eq.js.map +0 -1
- package/dist/node_modules/lodash/every.js +0 -19
- package/dist/node_modules/lodash/every.js.map +0 -1
- package/dist/node_modules/lodash/find.js +0 -11
- package/dist/node_modules/lodash/find.js.map +0 -1
- package/dist/node_modules/lodash/findIndex.js +0 -19
- package/dist/node_modules/lodash/findIndex.js.map +0 -1
- package/dist/node_modules/lodash/flatMap.js +0 -15
- package/dist/node_modules/lodash/flatMap.js.map +0 -1
- package/dist/node_modules/lodash/get.js +0 -15
- package/dist/node_modules/lodash/get.js.map +0 -1
- package/dist/node_modules/lodash/hasIn.js +0 -15
- package/dist/node_modules/lodash/hasIn.js.map +0 -1
- package/dist/node_modules/lodash/identity.js +0 -12
- package/dist/node_modules/lodash/identity.js.map +0 -1
- package/dist/node_modules/lodash/isArguments.js +0 -16
- package/dist/node_modules/lodash/isArguments.js.map +0 -1
- package/dist/node_modules/lodash/isArray.js +0 -9
- package/dist/node_modules/lodash/isArray.js.map +0 -1
- package/dist/node_modules/lodash/isArrayLike.js +0 -15
- package/dist/node_modules/lodash/isArrayLike.js.map +0 -1
- package/dist/node_modules/lodash/isBoolean.js +0 -15
- package/dist/node_modules/lodash/isBoolean.js.map +0 -1
- package/dist/node_modules/lodash/isBuffer.js +0 -12
- package/dist/node_modules/lodash/isBuffer.js.map +0 -1
- package/dist/node_modules/lodash/isEqual.js +0 -14
- package/dist/node_modules/lodash/isEqual.js.map +0 -1
- package/dist/node_modules/lodash/isFunction.js +0 -17
- package/dist/node_modules/lodash/isFunction.js.map +0 -1
- package/dist/node_modules/lodash/isLength.js +0 -12
- package/dist/node_modules/lodash/isLength.js.map +0 -1
- package/dist/node_modules/lodash/isNaN.js +0 -14
- package/dist/node_modules/lodash/isNaN.js.map +0 -1
- package/dist/node_modules/lodash/isNil.js +0 -12
- package/dist/node_modules/lodash/isNil.js.map +0 -1
- package/dist/node_modules/lodash/isNumber.js +0 -15
- package/dist/node_modules/lodash/isNumber.js.map +0 -1
- package/dist/node_modules/lodash/isObject.js +0 -13
- package/dist/node_modules/lodash/isObject.js.map +0 -1
- package/dist/node_modules/lodash/isObjectLike.js +0 -12
- package/dist/node_modules/lodash/isObjectLike.js.map +0 -1
- package/dist/node_modules/lodash/isPlainObject.js +0 -20
- package/dist/node_modules/lodash/isPlainObject.js.map +0 -1
- package/dist/node_modules/lodash/isString.js +0 -16
- package/dist/node_modules/lodash/isString.js.map +0 -1
- package/dist/node_modules/lodash/isSymbol.js +0 -15
- package/dist/node_modules/lodash/isSymbol.js.map +0 -1
- package/dist/node_modules/lodash/isTypedArray.js +0 -13
- package/dist/node_modules/lodash/isTypedArray.js.map +0 -1
- package/dist/node_modules/lodash/keys.js +0 -16
- package/dist/node_modules/lodash/keys.js.map +0 -1
- package/dist/node_modules/lodash/last.js +0 -13
- package/dist/node_modules/lodash/last.js.map +0 -1
- package/dist/node_modules/lodash/map.js +0 -17
- package/dist/node_modules/lodash/map.js.map +0 -1
- package/dist/node_modules/lodash/mapValues.js +0 -19
- package/dist/node_modules/lodash/mapValues.js.map +0 -1
- package/dist/node_modules/lodash/max.js +0 -16
- package/dist/node_modules/lodash/max.js.map +0 -1
- package/dist/node_modules/lodash/memoize.js +0 -21
- package/dist/node_modules/lodash/memoize.js.map +0 -1
- package/dist/node_modules/lodash/min.js +0 -16
- package/dist/node_modules/lodash/min.js.map +0 -1
- package/dist/node_modules/lodash/noop.js +0 -10
- package/dist/node_modules/lodash/noop.js.map +0 -1
- package/dist/node_modules/lodash/now.js +0 -13
- package/dist/node_modules/lodash/now.js.map +0 -1
- package/dist/node_modules/lodash/property.js +0 -17
- package/dist/node_modules/lodash/property.js.map +0 -1
- package/dist/node_modules/lodash/range.js +0 -10
- package/dist/node_modules/lodash/range.js.map +0 -1
- package/dist/node_modules/lodash/some.js +0 -19
- package/dist/node_modules/lodash/some.js.map +0 -1
- package/dist/node_modules/lodash/sortBy.js +0 -18
- package/dist/node_modules/lodash/sortBy.js.map +0 -1
- package/dist/node_modules/lodash/stubArray.js +0 -12
- package/dist/node_modules/lodash/stubArray.js.map +0 -1
- package/dist/node_modules/lodash/stubFalse.js +0 -12
- package/dist/node_modules/lodash/stubFalse.js.map +0 -1
- package/dist/node_modules/lodash/throttle.js +0 -21
- package/dist/node_modules/lodash/throttle.js.map +0 -1
- package/dist/node_modules/lodash/toFinite.js +0 -14
- package/dist/node_modules/lodash/toFinite.js.map +0 -1
- package/dist/node_modules/lodash/toInteger.js +0 -15
- package/dist/node_modules/lodash/toInteger.js.map +0 -1
- package/dist/node_modules/lodash/toNumber.js +0 -25
- package/dist/node_modules/lodash/toNumber.js.map +0 -1
- package/dist/node_modules/lodash/toString.js +0 -14
- package/dist/node_modules/lodash/toString.js.map +0 -1
- package/dist/node_modules/lodash/uniqBy.js +0 -15
- package/dist/node_modules/lodash/uniqBy.js.map +0 -1
- package/dist/node_modules/lodash/upperFirst.js +0 -10
- package/dist/node_modules/lodash/upperFirst.js.map +0 -1
- package/dist/node_modules/object-assign/index.js +0 -40
- package/dist/node_modules/object-assign/index.js.map +0 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +0 -45
- package/dist/node_modules/prop-types/checkPropTypes.js.map +0 -1
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -48
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js.map +0 -1
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -272
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js.map +0 -1
- package/dist/node_modules/prop-types/index.js +0 -15
- package/dist/node_modules/prop-types/index.js.map +0 -1
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -9
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js.map +0 -1
- package/dist/node_modules/prop-types/lib/has.js +0 -9
- package/dist/node_modules/prop-types/lib/has.js.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +0 -83
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +0 -63
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +0 -11
- package/dist/node_modules/prop-types/node_modules/react-is/index.js.map +0 -1
- package/dist/node_modules/react-is/cjs/react-is.development.js +0 -86
- package/dist/node_modules/react-is/cjs/react-is.development.js.map +0 -1
- package/dist/node_modules/react-is/cjs/react-is.production.min.js +0 -64
- package/dist/node_modules/react-is/cjs/react-is.production.min.js.map +0 -1
- package/dist/node_modules/react-is/index.js +0 -11
- package/dist/node_modules/react-is/index.js.map +0 -1
- package/dist/node_modules/react-smooth/es6/Animate.js +0 -366
- package/dist/node_modules/react-smooth/es6/Animate.js.map +0 -1
- package/dist/node_modules/react-smooth/es6/AnimateManager.js +0 -70
- package/dist/node_modules/react-smooth/es6/AnimateManager.js.map +0 -1
- package/dist/node_modules/react-smooth/es6/configUpdate.js +0 -172
- package/dist/node_modules/react-smooth/es6/configUpdate.js.map +0 -1
- package/dist/node_modules/react-smooth/es6/easing.js +0 -151
- package/dist/node_modules/react-smooth/es6/easing.js.map +0 -1
- package/dist/node_modules/react-smooth/es6/index.js +0 -8
- package/dist/node_modules/react-smooth/es6/index.js.map +0 -1
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js +0 -13
- package/dist/node_modules/react-smooth/es6/setRafTimeout.js.map +0 -1
- package/dist/node_modules/react-smooth/es6/util.js +0 -93
- package/dist/node_modules/react-smooth/es6/util.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/Area.js +0 -434
- package/dist/node_modules/recharts/es6/cartesian/Area.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/Bar.js +0 -386
- package/dist/node_modules/recharts/es6/cartesian/Bar.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/Brush.js +0 -498
- package/dist/node_modules/recharts/es6/cartesian/Brush.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js +0 -331
- package/dist/node_modules/recharts/es6/cartesian/CartesianAxis.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js +0 -304
- package/dist/node_modules/recharts/es6/cartesian/CartesianGrid.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js +0 -242
- package/dist/node_modules/recharts/es6/cartesian/ErrorBar.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/Line.js +0 -472
- package/dist/node_modules/recharts/es6/cartesian/Line.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js +0 -172
- package/dist/node_modules/recharts/es6/cartesian/ReferenceArea.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js +0 -177
- package/dist/node_modules/recharts/es6/cartesian/ReferenceDot.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js +0 -253
- package/dist/node_modules/recharts/es6/cartesian/ReferenceLine.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/Scatter.js +0 -367
- package/dist/node_modules/recharts/es6/cartesian/Scatter.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js +0 -143
- package/dist/node_modules/recharts/es6/cartesian/XAxis.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js +0 -142
- package/dist/node_modules/recharts/es6/cartesian/YAxis.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/ZAxis.js +0 -102
- package/dist/node_modules/recharts/es6/cartesian/ZAxis.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js +0 -17
- package/dist/node_modules/recharts/es6/cartesian/getEquidistantTicks.js.map +0 -1
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js +0 -120
- package/dist/node_modules/recharts/es6/cartesian/getTicks.js.map +0 -1
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js +0 -98
- package/dist/node_modules/recharts/es6/chart/AccessibilityManager.js.map +0 -1
- package/dist/node_modules/recharts/es6/chart/BarChart.js +0 -23
- package/dist/node_modules/recharts/es6/chart/BarChart.js.map +0 -1
- package/dist/node_modules/recharts/es6/chart/ComposedChart.js +0 -37
- package/dist/node_modules/recharts/es6/chart/ComposedChart.js.map +0 -1
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js +0 -1246
- package/dist/node_modules/recharts/es6/chart/generateCategoricalChart.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/Cell.js +0 -8
- package/dist/node_modules/recharts/es6/component/Cell.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/Cursor.js +0 -92
- package/dist/node_modules/recharts/es6/component/Cursor.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js +0 -236
- package/dist/node_modules/recharts/es6/component/DefaultLegendContent.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js +0 -170
- package/dist/node_modules/recharts/es6/component/DefaultTooltipContent.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/Label.js +0 -352
- package/dist/node_modules/recharts/es6/component/Label.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/LabelList.js +0 -165
- package/dist/node_modules/recharts/es6/component/LabelList.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/Legend.js +0 -237
- package/dist/node_modules/recharts/es6/component/Legend.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js +0 -186
- package/dist/node_modules/recharts/es6/component/ResponsiveContainer.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/Text.js +0 -222
- package/dist/node_modules/recharts/es6/component/Text.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/Tooltip.js +0 -181
- package/dist/node_modules/recharts/es6/component/Tooltip.js.map +0 -1
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js +0 -197
- package/dist/node_modules/recharts/es6/component/TooltipBoundingBox.js.map +0 -1
- package/dist/node_modules/recharts/es6/container/Layer.js +0 -39
- package/dist/node_modules/recharts/es6/container/Layer.js.map +0 -1
- package/dist/node_modules/recharts/es6/container/Surface.js +0 -59
- package/dist/node_modules/recharts/es6/container/Surface.js.map +0 -1
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js +0 -57
- package/dist/node_modules/recharts/es6/context/chartLayoutContext.js.map +0 -1
- package/dist/node_modules/recharts/es6/shape/Cross.js +0 -111
- package/dist/node_modules/recharts/es6/shape/Cross.js.map +0 -1
- package/dist/node_modules/recharts/es6/shape/Curve.js +0 -125
- package/dist/node_modules/recharts/es6/shape/Curve.js.map +0 -1
- package/dist/node_modules/recharts/es6/shape/Dot.js +0 -26
- package/dist/node_modules/recharts/es6/shape/Dot.js.map +0 -1
- package/dist/node_modules/recharts/es6/shape/Rectangle.js +0 -204
- package/dist/node_modules/recharts/es6/shape/Rectangle.js.map +0 -1
- package/dist/node_modules/recharts/es6/shape/Sector.js +0 -191
- package/dist/node_modules/recharts/es6/shape/Sector.js.map +0 -1
- package/dist/node_modules/recharts/es6/shape/Symbols.js +0 -135
- package/dist/node_modules/recharts/es6/shape/Symbols.js.map +0 -1
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js +0 -174
- package/dist/node_modules/recharts/es6/shape/Trapezoid.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js +0 -180
- package/dist/node_modules/recharts/es6/util/ActiveShapeUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/BarUtils.js +0 -111
- package/dist/node_modules/recharts/es6/util/BarUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js +0 -233
- package/dist/node_modules/recharts/es6/util/CartesianUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/ChartUtils.js +0 -557
- package/dist/node_modules/recharts/es6/util/ChartUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js +0 -69
- package/dist/node_modules/recharts/es6/util/CssPrefixUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/DOMUtils.js +0 -107
- package/dist/node_modules/recharts/es6/util/DOMUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/DataUtils.js +0 -66
- package/dist/node_modules/recharts/es6/util/DataUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js +0 -57
- package/dist/node_modules/recharts/es6/util/DetectReferenceElementsDomain.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/Events.js +0 -6
- package/dist/node_modules/recharts/es6/util/Events.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/Global.js +0 -20
- package/dist/node_modules/recharts/es6/util/Global.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js +0 -8
- package/dist/node_modules/recharts/es6/util/IfOverflowMatches.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/LogUtils.js +0 -16
- package/dist/node_modules/recharts/es6/util/LogUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/PolarUtils.js +0 -115
- package/dist/node_modules/recharts/es6/util/PolarUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +0 -136
- package/dist/node_modules/recharts/es6/util/ReactUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js +0 -180
- package/dist/node_modules/recharts/es6/util/ReduceCSSCalc.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/ScatterUtils.js +0 -47
- package/dist/node_modules/recharts/es6/util/ScatterUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js +0 -9
- package/dist/node_modules/recharts/es6/util/ShallowEqual.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/TickUtils.js +0 -31
- package/dist/node_modules/recharts/es6/util/TickUtils.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js +0 -24
- package/dist/node_modules/recharts/es6/util/calculateViewBox.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js +0 -24
- package/dist/node_modules/recharts/es6/util/cursor/getCursorPoints.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js +0 -15
- package/dist/node_modules/recharts/es6/util/cursor/getCursorRectangle.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js +0 -16
- package/dist/node_modules/recharts/es6/util/cursor/getRadialCursorPoints.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js +0 -11
- package/dist/node_modules/recharts/es6/util/getEveryNthWithCondition.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/getLegendProps.js +0 -87
- package/dist/node_modules/recharts/es6/util/getLegendProps.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js +0 -12
- package/dist/node_modules/recharts/es6/util/isDomainSpecifiedByUser.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js +0 -11
- package/dist/node_modules/recharts/es6/util/payload/getUniqPayload.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js +0 -86
- package/dist/node_modules/recharts/es6/util/tooltip/translate.js.map +0 -1
- package/dist/node_modules/recharts/es6/util/types.js +0 -42
- package/dist/node_modules/recharts/es6/util/types.js.map +0 -1
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js +0 -131
- package/dist/node_modules/recharts-scale/es6/getNiceTickValues.js.map +0 -1
- package/dist/node_modules/recharts-scale/es6/index.js +0 -1
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js +0 -31
- package/dist/node_modules/recharts-scale/es6/util/arithmetic.js.map +0 -1
- package/dist/node_modules/recharts-scale/es6/util/utils.js +0 -78
- package/dist/node_modules/recharts-scale/es6/util/utils.js.map +0 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +0 -1778
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +0 -1
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +0 -12
- package/dist/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +0 -1
- package/dist/node_modules/victory-vendor/es/d3-scale.js +0 -36
- package/dist/node_modules/victory-vendor/es/d3-scale.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEcoAiOperations.js","names":["AI_CALL","useEcoAiReportReadiness","useEcoImpactHub","useQuery","reportId","ecoQuery","apiGatewayUrl","useEcoAiDraftReportLineItems","qc","useQueryClient","useMutation","data","useEcoAiLoopSettings","useEcoUpdateAiLoopSettings","useEcoAiRunEnvironmentalSweep","input"],"sources":["../../../src/ecoimpacthub/hooks/useEcoAiOperations.ts"],"sourcesContent":["/**\n * AI ESG report assembly & autonomous environmental loop hooks\n * (BOFF-3701, BOFF-3719, BOFF-3730).\n * @module ecoimpacthub/hooks\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useEcoImpactHub } from '../context';\nimport { ecoQuery } from './ecoTransport';\nimport type {\n EcoAiEnvironmentalSweepResult,\n EcoAiLoopSettings,\n EcoAiReportDraftResult,\n EcoAiReportReadiness,\n} from '../types';\n\nconst AI_CALL = { suppressGlobalErrorEvent: true } as const;\n\nexport const useEcoAiReportReadiness = (reportId: string | undefined) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: ['ecoimpacthub', 'ai', 'report-readiness', reportId ?? ''],\n enabled: Boolean(reportId),\n queryFn: async () => {\n const result = await ecoQuery<{ ecoAiReportReadiness: EcoAiReportReadiness }>(\n `query EcoAiReportReadiness($reportId: ID!) {\n ecoAiReportReadiness(reportId: $reportId) {\n reportId framework totalDisclosures coveredCount missingCount coveragePct\n readyToPublish draftCarbonWarnings\n disclosures {\n disclosureCode label category sourceKind covered lineItemId\n citesDraftCarbonEntry sourceRecordCount gapReason\n }\n }\n }`,\n { reportId },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiReportReadiness;\n },\n });\n};\n\nexport const useEcoAiDraftReportLineItems = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationKey: ['ecoimpacthub', 'ai', 'draft-report-line-items'],\n mutationFn: async (reportId: string) => {\n const result = await ecoQuery<{ ecoAiDraftReportLineItems: EcoAiReportDraftResult }>(\n `mutation EcoAiDraftReportLineItems($input: EcoAiDraftReportLineItemsInput!) {\n ecoAiDraftReportLineItems(input: $input) {\n reportId framework agentRunId engine draftedCount draftCarbonWarnings\n skippedDisclosures { disclosureCode label reason }\n lineItems {\n id workspaceId reportId carbonEntryId sourceMeasurementId sourceMetricId\n disclosureCode label value unit category aiDrafted agentRunId aiRationale\n createdAt updatedAt\n }\n }\n }`,\n { input: { reportId } },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiDraftReportLineItems;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'reports'] });\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'report', data.reportId] });\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'ai', 'report-readiness', data.reportId] });\n },\n });\n};\n\nexport const useEcoAiLoopSettings = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: ['ecoimpacthub', 'ai', 'loop-settings'],\n queryFn: async () => {\n const result = await ecoQuery<{ ecoAiLoopSettings: EcoAiLoopSettings }>(\n `query EcoAiLoopSettings {\n ecoAiLoopSettings {\n id workspaceId enabled cadenceCron maxCreditsPerRun\n dormantDaysThreshold lastRunAt lastRunStatus lastCorrelationId\n }\n }`,\n {},\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiLoopSettings;\n },\n });\n};\n\nexport const useEcoUpdateAiLoopSettings = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationKey: ['ecoimpacthub', 'ai', 'update-loop-settings'],\n mutationFn: async (input: {\n enabled?: boolean;\n cadenceCron?: string;\n maxCreditsPerRun?: number;\n dormantDaysThreshold?: number;\n }) => {\n const result = await ecoQuery<{ ecoUpdateAiLoopSettings: EcoAiLoopSettings }>(\n `mutation EcoUpdateAiLoopSettings($input: EcoUpdateAiLoopSettingsInput!) {\n ecoUpdateAiLoopSettings(input: $input) {\n id workspaceId enabled cadenceCron maxCreditsPerRun\n dormantDaysThreshold lastRunAt lastRunStatus lastCorrelationId\n }\n }`,\n { input },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoUpdateAiLoopSettings;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'ai', 'loop-settings'] });\n },\n });\n};\n\nexport const useEcoAiRunEnvironmentalSweep = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationKey: ['ecoimpacthub', 'ai', 'run-environmental-sweep'],\n mutationFn: async (input?: {\n trigger?: string;\n correlationId?: string;\n forceRun?: boolean;\n }) => {\n const result = await ecoQuery<{ ecoAiRunEnvironmentalSweep: EcoAiEnvironmentalSweepResult }>(\n `mutation EcoAiRunEnvironmentalSweep($input: EcoAiRunEnvironmentalSweepInput) {\n ecoAiRunEnvironmentalSweep(input: $input) {\n status workspaceId correlationId trigger agentRunId engine\n creditsUsed maxCreditsPerRun anomalyCount sensorGapCount\n reportGapCount targetDriftCount staleDraftCount overdueHabitatCount\n notificationSent haltedReason ranAt\n findings {\n category severity entityId title detail recommendedAction citationPath\n }\n }\n }`,\n { input: input ?? { trigger: 'interactive', forceRun: true } },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiRunEnvironmentalSweep;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'ai', 'loop-settings'] });\n },\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEcoAiOperations.js","names":["AI_CALL","useEcoAiReportReadiness","useEcoImpactHub","useQuery","reportId","ecoQuery","apiGatewayUrl","useEcoAiDraftReportLineItems","qc","useQueryClient","useMutation","data","useEcoAiLoopSettings","useEcoUpdateAiLoopSettings","useEcoAiRunEnvironmentalSweep","input"],"sources":["../../../src/ecoimpacthub/hooks/useEcoAiOperations.ts"],"sourcesContent":["/**\n * AI ESG report assembly & autonomous environmental loop hooks\n * (BOFF-3701, BOFF-3719, BOFF-3730).\n * @module ecoimpacthub/hooks\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\nimport { useEcoImpactHub } from '../context';\nimport { ecoQuery } from './ecoTransport';\nimport type {\n EcoAiEnvironmentalSweepResult,\n EcoAiLoopSettings,\n EcoAiReportDraftResult,\n EcoAiReportReadiness,\n} from '../types';\n\nconst AI_CALL = { suppressGlobalErrorEvent: true } as const;\n\nexport const useEcoAiReportReadiness = (reportId: string | undefined) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: ['ecoimpacthub', 'ai', 'report-readiness', reportId ?? ''],\n enabled: Boolean(reportId),\n queryFn: async () => {\n const result = await ecoQuery<{ ecoAiReportReadiness: EcoAiReportReadiness }>(\n `query EcoAiReportReadiness($reportId: ID!) {\n ecoAiReportReadiness(reportId: $reportId) {\n reportId framework totalDisclosures coveredCount missingCount coveragePct\n readyToPublish draftCarbonWarnings\n disclosures {\n disclosureCode label category sourceKind covered lineItemId\n citesDraftCarbonEntry sourceRecordCount gapReason\n }\n }\n }`,\n { reportId },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiReportReadiness;\n },\n });\n};\n\nexport const useEcoAiDraftReportLineItems = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationKey: ['ecoimpacthub', 'ai', 'draft-report-line-items'],\n mutationFn: async (reportId: string) => {\n const result = await ecoQuery<{ ecoAiDraftReportLineItems: EcoAiReportDraftResult }>(\n `mutation EcoAiDraftReportLineItems($input: EcoAiDraftReportLineItemsInput!) {\n ecoAiDraftReportLineItems(input: $input) {\n reportId framework agentRunId engine draftedCount draftCarbonWarnings\n skippedDisclosures { disclosureCode label reason }\n lineItems {\n id workspaceId reportId carbonEntryId sourceMeasurementId sourceMetricId\n disclosureCode label value unit category aiDrafted agentRunId aiRationale\n createdAt updatedAt\n }\n }\n }`,\n { input: { reportId } },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiDraftReportLineItems;\n },\n onSuccess: (data) => {\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'reports'] });\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'report', data.reportId] });\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'ai', 'report-readiness', data.reportId] });\n },\n });\n};\n\nexport const useEcoAiLoopSettings = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: ['ecoimpacthub', 'ai', 'loop-settings'],\n queryFn: async () => {\n const result = await ecoQuery<{ ecoAiLoopSettings: EcoAiLoopSettings }>(\n `query EcoAiLoopSettings {\n ecoAiLoopSettings {\n id workspaceId enabled cadenceCron maxCreditsPerRun\n dormantDaysThreshold lastRunAt lastRunStatus lastCorrelationId\n }\n }`,\n {},\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiLoopSettings;\n },\n });\n};\n\nexport const useEcoUpdateAiLoopSettings = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationKey: ['ecoimpacthub', 'ai', 'update-loop-settings'],\n mutationFn: async (input: {\n enabled?: boolean;\n cadenceCron?: string;\n maxCreditsPerRun?: number;\n dormantDaysThreshold?: number;\n }) => {\n const result = await ecoQuery<{ ecoUpdateAiLoopSettings: EcoAiLoopSettings }>(\n `mutation EcoUpdateAiLoopSettings($input: EcoUpdateAiLoopSettingsInput!) {\n ecoUpdateAiLoopSettings(input: $input) {\n id workspaceId enabled cadenceCron maxCreditsPerRun\n dormantDaysThreshold lastRunAt lastRunStatus lastCorrelationId\n }\n }`,\n { input },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoUpdateAiLoopSettings;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'ai', 'loop-settings'] });\n },\n });\n};\n\nexport const useEcoAiRunEnvironmentalSweep = () => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationKey: ['ecoimpacthub', 'ai', 'run-environmental-sweep'],\n mutationFn: async (input?: {\n trigger?: string;\n correlationId?: string;\n forceRun?: boolean;\n }) => {\n const result = await ecoQuery<{ ecoAiRunEnvironmentalSweep: EcoAiEnvironmentalSweepResult }>(\n `mutation EcoAiRunEnvironmentalSweep($input: EcoAiRunEnvironmentalSweepInput) {\n ecoAiRunEnvironmentalSweep(input: $input) {\n status workspaceId correlationId trigger agentRunId engine\n creditsUsed maxCreditsPerRun anomalyCount sensorGapCount\n reportGapCount targetDriftCount staleDraftCount overdueHabitatCount\n notificationSent haltedReason ranAt\n findings {\n category severity entityId title detail recommendedAction citationPath\n }\n }\n }`,\n { input: input ?? { trigger: 'interactive', forceRun: true } },\n apiGatewayUrl,\n AI_CALL\n );\n return result.ecoAiRunEnvironmentalSweep;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: ['ecoimpacthub', 'ai', 'loop-settings'] });\n },\n });\n};\n"],"mappings":";;;;AAgBA,IAAMA,IAAU,EAAE,0BAA0B,GAAK,GAEpCC,KAA2B,MAAiC;CACvE,IAAM,EAAE,qBAAkBC,EAAgB;CAC1C,OAAOC,EAAS;EACd,UAAU;GAAC;GAAgB;GAAM;GAAoBC,KAAY;EAAE;EACnE,SAAS,EAAQA;EACjB,SAAS,aAgBA,MAfcC,EACnB,4bAUA,EAAE,YAAS,GACXC,GACAN,CACF,EAAA,CACc;CAElB,CAAC;AACH,GAEaO,UAAqC;CAChD,IAAM,EAAE,qBAAkBL,EAAgB,GACpCM,IAAKC,EAAe;CAC1B,OAAOC,EAAY;EACjB,aAAa;GAAC;GAAgB;GAAM;EAAyB;EAC7D,YAAY,OAAO,OAiBV,MAhBcL,EACnB,8iBAWA,EAAE,OAAO,EAAE,YAAS,EAAE,GACtBC,GACAN,CACF,EAAA,CACc;EAEhB,YAAY,MAAS;GAGnB,AAFAQ,EAAG,kBAAkB,EAAE,UAAU,CAAC,gBAAgB,SAAS,EAAE,CAAC,GAC9DA,EAAG,kBAAkB,EAAE,UAAU;IAAC;IAAgB;IAAUG,EAAK;GAAQ,EAAE,CAAC,GAC5EH,EAAG,kBAAkB,EAAE,UAAU;IAAC;IAAgB;IAAM;IAAoBG,EAAK;GAAQ,EAAE,CAAC;EAC9F;CACF,CAAC;AACH,GAEaC,UAA6B;CACxC,IAAM,EAAE,qBAAkBV,EAAgB;CAC1C,OAAOC,EAAS;EACd,UAAU;GAAC;GAAgB;GAAM;EAAe;EAChD,SAAS,aAYA,MAXcE,EACnB,iOAMA,CAAC,GACDC,GACAN,CACF,EAAA,CACc;CAElB,CAAC;AACH,GAEaa,UAAmC;CAC9C,IAAM,EAAE,qBAAkBX,EAAgB,GACpCM,IAAKC,EAAe;CAC1B,OAAOC,EAAY;EACjB,aAAa;GAAC;GAAgB;GAAM;EAAsB;EAC1D,YAAY,OAAO,OAiBV,MAXcL,EACnB,sSAMA,EAAE,SAAM,GACRC,GACAN,CACF,EAAA,CACc;EAEhB,iBAAiB;GACf,EAAG,kBAAkB,EAAE,UAAU;IAAC;IAAgB;IAAM;GAAe,EAAE,CAAC;EAC5E;CACF,CAAC;AACH,GAEac,UAAsC;CACjD,IAAM,EAAE,qBAAkBZ,EAAgB,GACpCM,IAAKC,EAAe;CAC1B,OAAOC,EAAY;EACjB,aAAa;GAAC;GAAgB;GAAM;EAAyB;EAC7D,YAAY,OAAO,OAqBV,MAhBcL,EACnB,8iBAWA,EAAE,OAAOU,KAAS;GAAE,SAAS;GAAe,UAAU;EAAK,EAAE,GAC7DT,GACAN,CACF,EAAA,CACc;EAEhB,iBAAiB;GACf,EAAG,kBAAkB,EAAE,UAAU;IAAC;IAAgB;IAAM;GAAe,EAAE,CAAC;EAC5E;CACF,CAAC;AACH"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useEcoImpactHub as e } from "../context/EcoImpactHubContext.js";
|
|
2
|
-
import "../context/index.js";
|
|
3
2
|
import { wspaceFetch as t } from "./useEcoFiles.js";
|
|
4
3
|
import { useMutation as n, useQuery as r, useQueryClient as i } from "@tanstack/react-query";
|
|
5
4
|
// src/ecoimpacthub/hooks/useEcoComments.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEcoComments.js","names":["commentsKey","entityType","entityId","useEcoComments","useEcoImpactHub","useQuery","data","wspaceFetch","apiGatewayUrl","roots","c","a","b","useEcoCreateComment","qc","useQueryClient","useMutation"],"sources":["../../../src/ecoimpacthub/hooks/useEcoComments.ts"],"sourcesContent":["/**\n * EcoImpactHub — wspace-conversations-svc EntityComment REUSE hooks (Integration B).\n * @module ecoimpacthub/hooks/useEcoComments\n *\n * Adds a discussion surface to eco entities WITHOUT any eco-svc change by\n * reusing the generic EntityComment API composed into the WORKSPACE supergraph.\n * Comments attach to any entity by `(entityType, entityId)`:\n * - `getEntityComments(input): EntityCommentConnection!`\n * - `createEntityComment(input): EntityComment!`\n *\n * Transport reuses `wspaceFetch` from `useEcoFiles` (workspace gateway +\n * workspace token). Lives in a separate file; `useEcoImpactHubApi.ts` is\n * untouched.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useEcoImpactHub } from '../context';\nimport { wspaceFetch } from './useEcoFiles';\n\nexport interface EcoComment {\n id: string;\n authorId: string;\n authorType: string;\n content: {\n text: string | null;\n markdown: string | null;\n };\n createdAt: string;\n edited: boolean;\n parentCommentId: string | null;\n replyCount: number;\n}\n\nconst commentsKey = (entityType: string, entityId: string) =>\n ['ecoimpacthub', 'comments', entityType, entityId] as const;\n\n/** Top-level (root) comments for an eco entity, oldest first. */\nexport const useEcoComments = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: commentsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{\n getEntityComments: { items: EcoComment[]; total: number };\n }>(\n `query EcoGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n total\n items {\n id\n authorId\n authorType\n content { text markdown }\n createdAt\n edited\n parentCommentId\n replyCount\n }\n }\n }`,\n {\n input: {\n entityType,\n entityId,\n take: 100,\n parentCommentId: null,\n },\n },\n apiGatewayUrl\n );\n // Render root comments oldest-first (server order is not guaranteed).\n const roots = data.getEntityComments.items.filter((c) => !c.parentCommentId);\n roots.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());\n return { items: roots, total: data.getEntityComments.total };\n },\n });\n};\n\nexport const useEcoCreateComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (text: string) => {\n const data = await wspaceFetch<{ createEntityComment: { id: string } }>(\n `mutation EcoCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }`,\n {\n input: {\n entityType,\n entityId,\n content: { text },\n },\n },\n apiGatewayUrl\n );\n return data.createEntityComment;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) });\n },\n });\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useEcoComments.js","names":["commentsKey","entityType","entityId","useEcoComments","useEcoImpactHub","useQuery","data","wspaceFetch","apiGatewayUrl","roots","c","a","b","useEcoCreateComment","qc","useQueryClient","useMutation"],"sources":["../../../src/ecoimpacthub/hooks/useEcoComments.ts"],"sourcesContent":["/**\n * EcoImpactHub — wspace-conversations-svc EntityComment REUSE hooks (Integration B).\n * @module ecoimpacthub/hooks/useEcoComments\n *\n * Adds a discussion surface to eco entities WITHOUT any eco-svc change by\n * reusing the generic EntityComment API composed into the WORKSPACE supergraph.\n * Comments attach to any entity by `(entityType, entityId)`:\n * - `getEntityComments(input): EntityCommentConnection!`\n * - `createEntityComment(input): EntityComment!`\n *\n * Transport reuses `wspaceFetch` from `useEcoFiles` (workspace gateway +\n * workspace token). Lives in a separate file; `useEcoImpactHubApi.ts` is\n * untouched.\n */\n\nimport { useMutation, useQuery, useQueryClient } from '@tanstack/react-query';\n\nimport { useEcoImpactHub } from '../context';\nimport { wspaceFetch } from './useEcoFiles';\n\nexport interface EcoComment {\n id: string;\n authorId: string;\n authorType: string;\n content: {\n text: string | null;\n markdown: string | null;\n };\n createdAt: string;\n edited: boolean;\n parentCommentId: string | null;\n replyCount: number;\n}\n\nconst commentsKey = (entityType: string, entityId: string) =>\n ['ecoimpacthub', 'comments', entityType, entityId] as const;\n\n/** Top-level (root) comments for an eco entity, oldest first. */\nexport const useEcoComments = (entityType: string, entityId: string | undefined) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: commentsKey(entityType, entityId ?? ''),\n enabled: Boolean(entityId),\n queryFn: async () => {\n const data = await wspaceFetch<{\n getEntityComments: { items: EcoComment[]; total: number };\n }>(\n `query EcoGetEntityComments($input: GetCommentsInput!) {\n getEntityComments(input: $input) {\n total\n items {\n id\n authorId\n authorType\n content { text markdown }\n createdAt\n edited\n parentCommentId\n replyCount\n }\n }\n }`,\n {\n input: {\n entityType,\n entityId,\n take: 100,\n parentCommentId: null,\n },\n },\n apiGatewayUrl\n );\n // Render root comments oldest-first (server order is not guaranteed).\n const roots = data.getEntityComments.items.filter((c) => !c.parentCommentId);\n roots.sort((a, b) => new Date(a.createdAt).getTime() - new Date(b.createdAt).getTime());\n return { items: roots, total: data.getEntityComments.total };\n },\n });\n};\n\nexport const useEcoCreateComment = (entityType: string, entityId: string) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const qc = useQueryClient();\n return useMutation({\n mutationFn: async (text: string) => {\n const data = await wspaceFetch<{ createEntityComment: { id: string } }>(\n `mutation EcoCreateEntityComment($input: CreateEntityCommentInput!) {\n createEntityComment(input: $input) { id }\n }`,\n {\n input: {\n entityType,\n entityId,\n content: { text },\n },\n },\n apiGatewayUrl\n );\n return data.createEntityComment;\n },\n onSuccess: () => {\n qc.invalidateQueries({ queryKey: commentsKey(entityType, entityId) });\n },\n });\n};\n"],"mappings":";;;;AAkCA,IAAMA,KAAe,GAAoB,MACvC;CAAC;CAAgB;CAAYC;CAAYC;AAAQ,GAGtCC,KAAkB,GAAoB,MAAiC;CAClF,IAAM,EAAE,qBAAkBC,EAAgB;CAC1C,OAAOC,EAAS;EACd,UAAUL,EAAYC,GAAYC,KAAY,EAAE;EAChD,SAAS,EAAQA;EACjB,SAAS,YAAY;GACnB,IAAMI,IAAO,MAAMC,EAGjB,6YAeA,EACE,OAAO;IACL;IACA;IACA,MAAM;IACN,iBAAiB;GACnB,EACF,GACAC,CACF,GAEMC,IAAQH,EAAK,kBAAkB,MAAM,QAAQ,MAAM,CAACI,EAAE,eAAe;GAE3E,OADAD,EAAM,MAAM,GAAG,MAAM,IAAI,KAAKE,EAAE,SAAS,CAAC,CAAC,QAAQ,IAAI,IAAI,KAAKC,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,GAC/E;IAAE,OAAOH;IAAO,OAAOH,EAAK,kBAAkB;GAAM;EAC7D;CACF,CAAC;AACH,GAEaO,KAAuB,GAAoB,MAAqB;CAC3E,IAAM,EAAE,qBAAkBT,EAAgB,GACpCU,IAAKC,EAAe;CAC1B,OAAOC,EAAY;EACjB,YAAY,OAAO,OAcV,MAbYT,EACjB,wIAGA,EACE,OAAO;GACL;GACA;GACA,SAAS,EAAE,QAAK;EAClB,EACF,GACAC,CACF,EAAA,CACY;EAEd,iBAAiB;GACf,EAAG,kBAAkB,EAAE,UAAUR,EAAYC,GAAYC,CAAQ,EAAE,CAAC;EACtE;CACF,CAAC;AACH"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useEcoImpactHub as e } from "../context/EcoImpactHubContext.js";
|
|
2
|
-
import "../context/index.js";
|
|
3
2
|
import { useCallback as t, useState as n } from "react";
|
|
4
3
|
import { useQuery as r } from "@tanstack/react-query";
|
|
5
4
|
import { graphqlFetch as i } from "@burdenoff/fe-libs/shared/graphql";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEcoFiles.js","names":["clearGraphqlReadCaches","g","wspaceFetch","response","graphqlFetch","query","putWithProgress","xhr","url","contentType","event","onProgress","resolve","reject","body","uploadEcoFile","source","dotIndex","fileName","extension","mimeType","initiated","apiGatewayUrl","sessionId","uploadUrl","completed","useEcoFileUpload","useEcoImpactHub","isUploading","setIsUploading","useState","progress","setProgress","error","setError","reset","useCallback","file","err","message","useEcoFile","useQuery","id"],"sources":["../../../src/ecoimpacthub/hooks/useEcoFiles.ts"],"sourcesContent":["/**\n * EcoImpactHub — wspace-files-svc REUSE hooks (Integration A).\n * @module ecoimpacthub/hooks/useEcoFiles\n *\n * Reuses the platform file store (`wspace-files-svc`) WITHOUT any eco-svc\n * change: the eco schema already exposes `EcoObservation.evidenceFileId` /\n * `EcoReport.fileId`; this module lets the UI actually produce a `fileId` via\n * the canonical 3-step upload flow composed into the WORKSPACE supergraph:\n * 1. `initiateUpload(input)` → `{ uploadUrl, session { id } }`\n * 2. HTTP `PUT` the bytes to the returned signed `uploadUrl`\n * 3. `completeUpload(input: { sessionId })` → `{ fileId }`\n * plus `getFile(id)` to resolve an existing evidence/report file's name + URL.\n *\n * Transport mirrors `useEcoImpactHubApi` exactly — `graphqlFetch({ gateway:\n * 'workspace', workspaceToken: true })` — so no ApolloProvider is required.\n * These hooks live in a SEPARATE file by design; `useEcoImpactHubApi.ts` is\n * left untouched.\n */\n\nimport { useCallback, useState } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useEcoImpactHub } from '../context';\n\n// ============================================================================\n// Shared workspace-gateway transport (reused by the comments + tags hooks too)\n// ============================================================================\n\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache. After a write we drop those caches so the invalidation refetch that\n * follows reads fresh data (same remedy `useEcoImpactHubApi` applies).\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 if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// ============================================================================\n// File upload (initiate → PUT → complete)\n// ============================================================================\n\nexport interface UploadedEcoFile {\n fileId: string;\n fileName: string;\n}\n\n/** `PUT` the blob to the signed URL, reporting byte-progress via `onProgress`. */\nfunction putWithProgress(\n url: string,\n body: Blob,\n contentType: string,\n onProgress: (percent: number) => void\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('PUT', url);\n xhr.setRequestHeader('Content-Type', contentType);\n xhr.upload.onprogress = (event) => {\n if (event.lengthComputable) {\n onProgress(Math.round((event.loaded / event.total) * 100));\n }\n };\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve();\n } else {\n reject(new Error(`File storage rejected the upload (HTTP ${xhr.status}).`));\n }\n };\n xhr.onerror = () => reject(new Error('Network error while uploading the file.'));\n xhr.onabort = () => reject(new Error('The upload was cancelled.'));\n xhr.send(body);\n });\n}\n\nexport interface EcoFileUploadSource {\n body: Blob;\n fileName: string;\n /** Falls back to the blob's own type, then `application/octet-stream`. */\n mimeType?: string;\n}\n\n/**\n * Run the platform 3-step upload (initiate → signed PUT → complete) for a blob\n * and resolve to `{ fileId, fileName }`. Usable outside React, which the\n * offline field queue needs: it uploads queued evidence photos on reconnect.\n */\nexport async function uploadEcoFile(\n source: EcoFileUploadSource,\n apiGatewayUrl?: string,\n onProgress: (percent: number) => void = () => undefined\n): Promise<UploadedEcoFile> {\n const { body, fileName } = source;\n const dotIndex = fileName.lastIndexOf('.');\n const extension = dotIndex > -1 ? fileName.slice(dotIndex + 1) : '';\n const mimeType = source.mimeType || body.type || 'application/octet-stream';\n\n // 1. initiate\n const initiated = await wspaceFetch<{\n initiateUpload: { uploadUrl: string | null; session: { id: string } };\n }>(\n `mutation EcoInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }`,\n {\n input: {\n fileName,\n extension,\n mimeType,\n fileSize: String(body.size),\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n\n const { uploadUrl } = initiated.initiateUpload;\n const sessionId = initiated.initiateUpload.session.id;\n if (!uploadUrl) {\n throw new Error('The file service did not return an upload URL.');\n }\n\n // 2. PUT the bytes\n await putWithProgress(uploadUrl, body, mimeType, onProgress);\n\n // 3. complete\n const completed = await wspaceFetch<{\n completeUpload: { fileId: string; file: { id: string; name: string } | null };\n }>(\n `mutation EcoCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }`,\n { input: { sessionId } },\n apiGatewayUrl\n );\n\n onProgress(100);\n return {\n fileId: completed.completeUpload.fileId,\n fileName: completed.completeUpload.file?.name ?? fileName,\n };\n}\n\nexport interface UseEcoFileUploadResult {\n upload: (file: File) => Promise<UploadedEcoFile>;\n isUploading: boolean;\n /** 0–100 byte-progress of the signed-URL PUT. */\n progress: number;\n error: string | null;\n reset: () => void;\n}\n\n/**\n * Imperative upload hook: `await upload(file)` runs the platform 3-step flow and\n * resolves to `{ fileId, fileName }`. `fileId` is what the eco mutations accept\n * (`ecoRecordObservation.evidenceFileId`, `ecoPublishReport.fileId`).\n */\nexport const useEcoFileUpload = (): UseEcoFileUploadResult => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const [isUploading, setIsUploading] = useState(false);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState<string | null>(null);\n\n const reset = useCallback(() => {\n setIsUploading(false);\n setProgress(0);\n setError(null);\n }, []);\n\n const upload = useCallback(\n async (file: File): Promise<UploadedEcoFile> => {\n setIsUploading(true);\n setProgress(0);\n setError(null);\n try {\n return await uploadEcoFile(\n { body: file, fileName: file.name, mimeType: file.type },\n apiGatewayUrl,\n setProgress\n );\n } catch (err) {\n const message = err instanceof Error ? err.message : 'The file could not be uploaded.';\n setError(message);\n throw err instanceof Error ? err : new Error(message);\n } finally {\n setIsUploading(false);\n }\n },\n [apiGatewayUrl]\n );\n\n return { upload, isUploading, progress, error, reset };\n};\n\n// ============================================================================\n// Resolve an existing file (name + download URL) for rendering evidence links\n// ============================================================================\n\nexport interface EcoFileMeta {\n id: string;\n name: string;\n downloadUrl: string | null;\n mimeType: string;\n size: string;\n}\n\nexport const useEcoFile = (id: string | null | undefined) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: ['ecoimpacthub', 'file', id ?? ''],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFile: EcoFileMeta | null }>(\n `query EcoGetFile($id: ID!) {\n getFile(id: $id) {\n id\n name\n downloadUrl\n mimeType\n size\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.getFile;\n },\n });\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"useEcoFiles.js","names":["clearGraphqlReadCaches","g","wspaceFetch","response","graphqlFetch","query","putWithProgress","xhr","url","contentType","event","onProgress","resolve","reject","body","uploadEcoFile","source","dotIndex","fileName","extension","mimeType","initiated","apiGatewayUrl","sessionId","uploadUrl","completed","useEcoFileUpload","useEcoImpactHub","isUploading","setIsUploading","useState","progress","setProgress","error","setError","reset","useCallback","file","err","message","useEcoFile","useQuery","id"],"sources":["../../../src/ecoimpacthub/hooks/useEcoFiles.ts"],"sourcesContent":["/**\n * EcoImpactHub — wspace-files-svc REUSE hooks (Integration A).\n * @module ecoimpacthub/hooks/useEcoFiles\n *\n * Reuses the platform file store (`wspace-files-svc`) WITHOUT any eco-svc\n * change: the eco schema already exposes `EcoObservation.evidenceFileId` /\n * `EcoReport.fileId`; this module lets the UI actually produce a `fileId` via\n * the canonical 3-step upload flow composed into the WORKSPACE supergraph:\n * 1. `initiateUpload(input)` → `{ uploadUrl, session { id } }`\n * 2. HTTP `PUT` the bytes to the returned signed `uploadUrl`\n * 3. `completeUpload(input: { sessionId })` → `{ fileId }`\n * plus `getFile(id)` to resolve an existing evidence/report file's name + URL.\n *\n * Transport mirrors `useEcoImpactHubApi` exactly — `graphqlFetch({ gateway:\n * 'workspace', workspaceToken: true })` — so no ApolloProvider is required.\n * These hooks live in a SEPARATE file by design; `useEcoImpactHubApi.ts` is\n * left untouched.\n */\n\nimport { useCallback, useState } from 'react';\nimport { useQuery } from '@tanstack/react-query';\nimport { graphqlFetch } from '@burdenoff/fe-libs/shared/graphql';\n\nimport { useEcoImpactHub } from '../context';\n\n// ============================================================================\n// Shared workspace-gateway transport (reused by the comments + tags hooks too)\n// ============================================================================\n\ntype GraphqlReadCacheGlobals = {\n __graphqlFetchResponseCache?: { clear: () => void };\n __graphqlFetchPendingResponses?: { clear: () => void };\n __boffGraphQLResponseCache?: { clear: () => void };\n};\n\n/**\n * fe-libs `graphqlFetch` coalesces `query` responses in a short-lived in-memory\n * cache. After a write we drop those caches so the invalidation refetch that\n * follows reads fresh data (same remedy `useEcoImpactHubApi` applies).\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 if (/^\\s*mutation\\b/.test(query)) {\n clearGraphqlReadCaches();\n }\n return response.data;\n};\n\n// ============================================================================\n// File upload (initiate → PUT → complete)\n// ============================================================================\n\nexport interface UploadedEcoFile {\n fileId: string;\n fileName: string;\n}\n\n/** `PUT` the blob to the signed URL, reporting byte-progress via `onProgress`. */\nfunction putWithProgress(\n url: string,\n body: Blob,\n contentType: string,\n onProgress: (percent: number) => void\n): Promise<void> {\n return new Promise<void>((resolve, reject) => {\n const xhr = new XMLHttpRequest();\n xhr.open('PUT', url);\n xhr.setRequestHeader('Content-Type', contentType);\n xhr.upload.onprogress = (event) => {\n if (event.lengthComputable) {\n onProgress(Math.round((event.loaded / event.total) * 100));\n }\n };\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve();\n } else {\n reject(new Error(`File storage rejected the upload (HTTP ${xhr.status}).`));\n }\n };\n xhr.onerror = () => reject(new Error('Network error while uploading the file.'));\n xhr.onabort = () => reject(new Error('The upload was cancelled.'));\n xhr.send(body);\n });\n}\n\nexport interface EcoFileUploadSource {\n body: Blob;\n fileName: string;\n /** Falls back to the blob's own type, then `application/octet-stream`. */\n mimeType?: string;\n}\n\n/**\n * Run the platform 3-step upload (initiate → signed PUT → complete) for a blob\n * and resolve to `{ fileId, fileName }`. Usable outside React, which the\n * offline field queue needs: it uploads queued evidence photos on reconnect.\n */\nexport async function uploadEcoFile(\n source: EcoFileUploadSource,\n apiGatewayUrl?: string,\n onProgress: (percent: number) => void = () => undefined\n): Promise<UploadedEcoFile> {\n const { body, fileName } = source;\n const dotIndex = fileName.lastIndexOf('.');\n const extension = dotIndex > -1 ? fileName.slice(dotIndex + 1) : '';\n const mimeType = source.mimeType || body.type || 'application/octet-stream';\n\n // 1. initiate\n const initiated = await wspaceFetch<{\n initiateUpload: { uploadUrl: string | null; session: { id: string } };\n }>(\n `mutation EcoInitiateUpload($input: InitiateUploadInput!) {\n initiateUpload(input: $input) {\n uploadUrl\n session { id }\n }\n }`,\n {\n input: {\n fileName,\n extension,\n mimeType,\n fileSize: String(body.size),\n visibility: 'WORKSPACE',\n },\n },\n apiGatewayUrl\n );\n\n const { uploadUrl } = initiated.initiateUpload;\n const sessionId = initiated.initiateUpload.session.id;\n if (!uploadUrl) {\n throw new Error('The file service did not return an upload URL.');\n }\n\n // 2. PUT the bytes\n await putWithProgress(uploadUrl, body, mimeType, onProgress);\n\n // 3. complete\n const completed = await wspaceFetch<{\n completeUpload: { fileId: string; file: { id: string; name: string } | null };\n }>(\n `mutation EcoCompleteUpload($input: CompleteUploadInput!) {\n completeUpload(input: $input) {\n fileId\n file { id name }\n }\n }`,\n { input: { sessionId } },\n apiGatewayUrl\n );\n\n onProgress(100);\n return {\n fileId: completed.completeUpload.fileId,\n fileName: completed.completeUpload.file?.name ?? fileName,\n };\n}\n\nexport interface UseEcoFileUploadResult {\n upload: (file: File) => Promise<UploadedEcoFile>;\n isUploading: boolean;\n /** 0–100 byte-progress of the signed-URL PUT. */\n progress: number;\n error: string | null;\n reset: () => void;\n}\n\n/**\n * Imperative upload hook: `await upload(file)` runs the platform 3-step flow and\n * resolves to `{ fileId, fileName }`. `fileId` is what the eco mutations accept\n * (`ecoRecordObservation.evidenceFileId`, `ecoPublishReport.fileId`).\n */\nexport const useEcoFileUpload = (): UseEcoFileUploadResult => {\n const { apiGatewayUrl } = useEcoImpactHub();\n const [isUploading, setIsUploading] = useState(false);\n const [progress, setProgress] = useState(0);\n const [error, setError] = useState<string | null>(null);\n\n const reset = useCallback(() => {\n setIsUploading(false);\n setProgress(0);\n setError(null);\n }, []);\n\n const upload = useCallback(\n async (file: File): Promise<UploadedEcoFile> => {\n setIsUploading(true);\n setProgress(0);\n setError(null);\n try {\n return await uploadEcoFile(\n { body: file, fileName: file.name, mimeType: file.type },\n apiGatewayUrl,\n setProgress\n );\n } catch (err) {\n const message = err instanceof Error ? err.message : 'The file could not be uploaded.';\n setError(message);\n throw err instanceof Error ? err : new Error(message);\n } finally {\n setIsUploading(false);\n }\n },\n [apiGatewayUrl]\n );\n\n return { upload, isUploading, progress, error, reset };\n};\n\n// ============================================================================\n// Resolve an existing file (name + download URL) for rendering evidence links\n// ============================================================================\n\nexport interface EcoFileMeta {\n id: string;\n name: string;\n downloadUrl: string | null;\n mimeType: string;\n size: string;\n}\n\nexport const useEcoFile = (id: string | null | undefined) => {\n const { apiGatewayUrl } = useEcoImpactHub();\n return useQuery({\n queryKey: ['ecoimpacthub', 'file', id ?? ''],\n enabled: Boolean(id),\n queryFn: async () => {\n const data = await wspaceFetch<{ getFile: EcoFileMeta | null }>(\n `query EcoGetFile($id: ID!) {\n getFile(id: $id) {\n id\n name\n downloadUrl\n mimeType\n size\n }\n }`,\n { id },\n apiGatewayUrl\n );\n return data.getFile;\n },\n });\n};\n"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EcoConnection, EcoSite, EcoSiteStatus, EcoSiteType, EcoSensor, EcoSensorKind, EcoSensorStatus, EcoMeasurement, EcoAlertThreshold, EcoSpecies, EcoTaxonGroup, EcoConservationStatus, EcoObservation, EcoHabitatProject, EcoHabitatProjectStatus, EcoRestorationActivity, EcoEmissionFactor, EcoEmissionScope, EcoCarbonEntry, EcoCarbonEntryStatus, EcoReductionTarget, EcoReductionTargetStatus, EcoReport, EcoReportStatus, EcoReportLineItem, EcoCreateSiteInput, EcoUpdateSiteInput, EcoCreateSensorInput, EcoRecordMeasurementInput, EcoCreateThresholdInput, EcoCreateSpeciesInput, EcoUpdateSpeciesInput, EcoRecordObservationInput, EcoCreateHabitatProjectInput, EcoLogRestorationActivityInput, EcoCreateEmissionFactorInput, EcoRecordCarbonEntryInput, EcoCreateReductionTargetInput, EcoCreateReportInput, EcoAddReportLineItemInput, EcoRejectReportInput, EcoAiDraftBatch, EcoAiDraftCarbonEntriesInput, EcoAiFactorSuggestion, EcoAiSuggestEmissionFactorInput, EcoEnergyAsset, EcoEnergyAssetKind, EcoEnergyAssetStatus, EcoEnergyReading, EcoEnergyReadingImportResult, EcoEnergyReadingSource, EcoEnergyGridBaseline, EcoEnergyMixDashboard, EcoCreateEnergyAssetInput, EcoUpdateEnergyAssetInput, EcoRecordEnergyReadingInput, EcoSetEnergyGridBaselineInput, EcoMetric, EcoMetricRollup, EcoRisk, EcoRiskCategory, EcoRiskStatus, EcoAudit, EcoAuditType, EcoAuditStatus, EcoIncident, EcoIncidentSeverity, EcoIncidentStatus, EcoCorrectiveAction, EcoCorrectiveActionStatus, EcoEhsPermit, EcoEhsPermitType, EcoEhsPermitStatus, EcoCreateRiskInput, EcoUpdateRiskInput, EcoCreateAuditInput, EcoUpdateAuditInput, EcoCreateIncidentInput, EcoUpdateIncidentInput, EcoCreateCorrectiveActionInput, EcoUpdateCorrectiveActionInput, EcoCreateEhsPermitInput, EcoUpdateEhsPermitInput, PaginationInput, EcoWasteStream, EcoWasteRecord, EcoWasteRoute, EcoWasteDiversionSummary, EcoMaterialLoop, EcoMaterialLoopFlow, EcoMaterialLoopStage, EcoMaterialLoopSummary, EcoCreateWasteStreamInput, EcoUpdateWasteStreamInput, EcoRecordWasteInput, EcoCreateMaterialLoopInput, EcoUpdateMaterialLoopInput, EcoRecordMaterialLoopFlowInput, EcoGrant, EcoGrantFunder, EcoGrantMilestone, EcoGrantStatus, EcoGrantMilestoneStatus, EcoDonorPortalLinkResult, EcoCreateGrantFunderInput, EcoUpdateGrantFunderInput, EcoCreateGrantInput, EcoUpdateGrantInput, EcoCreateGrantMilestoneInput, EcoUpdateGrantMilestoneInput, EcoCreditMethodology, EcoCreditMethodologyStatus, EcoCreditVintage, EcoCreditVintageStatus, EcoCarbonCredit, EcoCarbonCreditStatus, EcoCreditRetirement, EcoCreditPortfolioSummary, EcoCreateCreditMethodologyInput, EcoCreateCreditVintageInput, EcoIssueCarbonCreditsInput, EcoTransferCarbonCreditInput, EcoRetireCarbonCreditsInput, EcoComplianceObligation, EcoObligationStatus, EcoPermit, EcoPermitStatus, EcoDeadline, EcoCreateObligationInput, EcoUpdateObligationInput, EcoCreatePermitInput, EcoUpdatePermitInput, EcoCreateDeadlineInput, EcoUpdateDeadlineInput } from '../types';
|
|
1
|
+
import { EcoConnection, EcoHabitatProjectCounts, EcoSensorCounts, EcoSiteCounts, EcoSpeciesCounts, EcoSite, EcoSiteStatus, EcoSiteType, EcoSensor, EcoSensorKind, EcoSensorStatus, EcoMeasurement, EcoAlertThreshold, EcoSpecies, EcoTaxonGroup, EcoConservationStatus, EcoObservation, EcoHabitatProject, EcoHabitatProjectStatus, EcoRestorationActivity, EcoEmissionFactor, EcoEmissionScope, EcoCarbonEntry, EcoCarbonEntryStatus, EcoReductionTarget, EcoReductionTargetStatus, EcoReport, EcoReportStatus, EcoReportLineItem, EcoCreateSiteInput, EcoUpdateSiteInput, EcoCreateSensorInput, EcoRecordMeasurementInput, EcoCreateThresholdInput, EcoCreateSpeciesInput, EcoUpdateSpeciesInput, EcoRecordObservationInput, EcoCreateHabitatProjectInput, EcoLogRestorationActivityInput, EcoCreateEmissionFactorInput, EcoRecordCarbonEntryInput, EcoCreateReductionTargetInput, EcoCreateReportInput, EcoAddReportLineItemInput, EcoRejectReportInput, EcoAiDraftBatch, EcoAiDraftCarbonEntriesInput, EcoAiFactorSuggestion, EcoAiSuggestEmissionFactorInput, EcoEnergyAsset, EcoEnergyAssetKind, EcoEnergyAssetStatus, EcoEnergyReading, EcoEnergyReadingImportResult, EcoEnergyReadingSource, EcoEnergyGridBaseline, EcoEnergyMixDashboard, EcoCreateEnergyAssetInput, EcoUpdateEnergyAssetInput, EcoRecordEnergyReadingInput, EcoSetEnergyGridBaselineInput, EcoMetric, EcoMetricRollup, EcoRisk, EcoRiskCategory, EcoRiskStatus, EcoAudit, EcoAuditType, EcoAuditStatus, EcoIncident, EcoIncidentSeverity, EcoIncidentStatus, EcoCorrectiveAction, EcoCorrectiveActionStatus, EcoEhsPermit, EcoEhsPermitType, EcoEhsPermitStatus, EcoCreateRiskInput, EcoUpdateRiskInput, EcoCreateAuditInput, EcoUpdateAuditInput, EcoCreateIncidentInput, EcoUpdateIncidentInput, EcoCreateCorrectiveActionInput, EcoUpdateCorrectiveActionInput, EcoCreateEhsPermitInput, EcoUpdateEhsPermitInput, PaginationInput, EcoWasteStream, EcoWasteRecord, EcoWasteRoute, EcoWasteDiversionSummary, EcoMaterialLoop, EcoMaterialLoopFlow, EcoMaterialLoopStage, EcoMaterialLoopSummary, EcoCreateWasteStreamInput, EcoUpdateWasteStreamInput, EcoRecordWasteInput, EcoCreateMaterialLoopInput, EcoUpdateMaterialLoopInput, EcoRecordMaterialLoopFlowInput, EcoGrant, EcoGrantFunder, EcoGrantMilestone, EcoGrantStatus, EcoGrantMilestoneStatus, EcoDonorPortalLinkResult, EcoCreateGrantFunderInput, EcoUpdateGrantFunderInput, EcoCreateGrantInput, EcoUpdateGrantInput, EcoCreateGrantMilestoneInput, EcoUpdateGrantMilestoneInput, EcoCreditMethodology, EcoCreditMethodologyStatus, EcoCreditVintage, EcoCreditVintageStatus, EcoCarbonCredit, EcoCarbonCreditStatus, EcoCreditRetirement, EcoCreditPortfolioSummary, EcoCreateCreditMethodologyInput, EcoCreateCreditVintageInput, EcoIssueCarbonCreditsInput, EcoTransferCarbonCreditInput, EcoRetireCarbonCreditsInput, EcoComplianceObligation, EcoObligationStatus, EcoPermit, EcoPermitStatus, EcoDeadline, EcoCreateObligationInput, EcoUpdateObligationInput, EcoCreatePermitInput, EcoUpdatePermitInput, EcoCreateDeadlineInput, EcoUpdateDeadlineInput } from '../types';
|
|
2
2
|
/** Filter set shared by the metrics library list and the rollup view. */
|
|
3
3
|
export interface EcoMetricFilters {
|
|
4
4
|
category?: string;
|
|
@@ -69,6 +69,10 @@ export interface ObservationFilters {
|
|
|
69
69
|
export declare const useEcoObservations: (filters?: ObservationFilters) => import('@tanstack/react-query').UseQueryResult<EcoConnection<EcoObservation>, Error>;
|
|
70
70
|
export declare const useEcoRecordObservation: () => import('@tanstack/react-query').UseMutationResult<EcoObservation, Error, EcoRecordObservationInput, unknown>;
|
|
71
71
|
export declare const useEcoHabitatProjects: (status?: EcoHabitatProjectStatus) => import('@tanstack/react-query').UseQueryResult<EcoConnection<EcoHabitatProject>, Error>;
|
|
72
|
+
export declare const useEcoSiteCounts: () => import('@tanstack/react-query').UseQueryResult<EcoSiteCounts, Error>;
|
|
73
|
+
export declare const useEcoSensorCounts: () => import('@tanstack/react-query').UseQueryResult<EcoSensorCounts, Error>;
|
|
74
|
+
export declare const useEcoSpeciesCounts: () => import('@tanstack/react-query').UseQueryResult<EcoSpeciesCounts, Error>;
|
|
75
|
+
export declare const useEcoHabitatProjectCounts: () => import('@tanstack/react-query').UseQueryResult<EcoHabitatProjectCounts, Error>;
|
|
72
76
|
export declare const useEcoHabitatProject: (id: string | undefined) => import('@tanstack/react-query').UseQueryResult<EcoHabitatProject | null, Error>;
|
|
73
77
|
export declare const useEcoCreateHabitatProject: () => import('@tanstack/react-query').UseMutationResult<EcoHabitatProject, Error, EcoCreateHabitatProjectInput, unknown>;
|
|
74
78
|
export declare const useEcoTransitionHabitatProject: () => import('@tanstack/react-query').UseMutationResult<EcoHabitatProject, Error, {
|