Skip to content

Commit

Permalink
Chore/fix UI components dynamic export (#2936)
Browse files Browse the repository at this point in the history
  • Loading branch information
j8seangel authored Nov 26, 2024
2 parents 345709a + e73cf39 commit dffd197
Show file tree
Hide file tree
Showing 27 changed files with 111 additions and 72 deletions.
2 changes: 1 addition & 1 deletion apps/fourwings-explorer/features/map/map-sources.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import {
DEFAULT_CONTEXT_SOURCE_LAYER,
ExtendedStyle,
HeatmapLayerMeta,
isMergedAnimatedGenerator,
TEMPORALGRID_SOURCE_LAYER_INTERACTIVE,
} from '@globalfishingwatch/layer-composer'
import { isMergedAnimatedGenerator } from '@globalfishingwatch/dataviews-client/resolve-dataviews-generators'
import { useMemoCompare } from '@globalfishingwatch/react-hooks'
import { TimeseriesFeatureProps } from '@globalfishingwatch/fourwings-aggregate'
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ import {
getDatasetConfigsByDatasetType,
_getLegacyResources,
} from '@globalfishingwatch/dataviews-client'
import { getGeneratorConfig } from '@globalfishingwatch/dataviews-client/resolve-dataviews-generators'
import {
BasemapGeneratorConfig,
BasemapType,
GeneratorType,
getGeneratorConfig,
} from '@globalfishingwatch/layer-composer'
import { AsyncReducerStatus } from 'utils/async-slice'
import { selectDatasets, selectDatasetsStatus } from 'features/datasets/datasets.slice'
Expand Down
7 changes: 5 additions & 2 deletions apps/vessel-history/features/map/map.selectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ import { GFWApiClient } from 'http-client/http-client'
import { ApiEvent } from '@globalfishingwatch/api-types'
import { SymbolLayerSpecification } from '@globalfishingwatch/maplibre-gl'
import { UrlDataviewInstance } from '@globalfishingwatch/dataviews-client'
import { getDataviewsGeneratorConfigs } from '@globalfishingwatch/dataviews-client/resolve-dataviews-generators'
import { GeneratorType, GlGeneratorConfig } from '@globalfishingwatch/layer-composer'
import {
GeneratorType,
getDataviewsGeneratorConfigs,
GlGeneratorConfig,
} from '@globalfishingwatch/layer-composer'
import {
selectDataviewsForResourceQuerying,
selectDefaultBasemapGenerator,
Expand Down
6 changes: 3 additions & 3 deletions libs/api-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/api-client",
"version": "6.0.3",
"version": "6.0.5",
"description": "",
"author": "satellitestudio <[email protected]>",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
Expand All @@ -12,8 +12,8 @@
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/pbf-decoders": "^3.0.3",
"@globalfishingwatch/api-types": "^8.0.3",
"@globalfishingwatch/pbf-decoders": "^3.0.5",
"file-saver": "2.x",
"lodash": "4.x",
"react": "18.x"
Expand Down
2 changes: 1 addition & 1 deletion libs/api-types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/api-types",
"version": "8.0.1",
"version": "8.0.3",
"description": "Typescript definitions for API responses",
"author": "satellitestudio <[email protected]>",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
Expand Down
4 changes: 2 additions & 2 deletions libs/data-transforms/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "@globalfishingwatch/data-transforms",
"version": "3.0.3",
"version": "3.0.5",
"license": "MIT",
"description": "Utils to decode various data formats",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/api-types": "^8.0.3",
"@tmcw/togeojson": "5.x",
"@turf/bbox": "7.x",
"@turf/helpers": "7.x",
Expand Down
4 changes: 2 additions & 2 deletions libs/datasets-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/datasets-client",
"version": "3.0.1",
"version": "3.0.3",
"description": "",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
"license": "MIT",
Expand All @@ -11,7 +11,7 @@
"url": "git+https://github.com/GlobalFishingWatch/frontend.git"
},
"dependencies": {
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/api-types": "^8.0.3",
"d3-scale": "4.x"
}
}
13 changes: 6 additions & 7 deletions libs/dataviews-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/dataviews-client",
"version": "17.0.1",
"version": "17.0.7",
"description": "",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
"license": "MIT",
Expand All @@ -11,12 +11,11 @@
"url": "git+https://github.com/GlobalFishingWatch/frontend.git"
},
"dependencies": {
"@globalfishingwatch/api-client": "^6.0.3",
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/data-transforms": "^3.0.3",
"@globalfishingwatch/datasets-client": "^3.0.1",
"@globalfishingwatch/fourwings-aggregate": "^6.0.1",
"@globalfishingwatch/layer-composer": "^12.0.1",
"@globalfishingwatch/api-client": "^6.0.5",
"@globalfishingwatch/api-types": "^8.0.3",
"@globalfishingwatch/data-transforms": "^3.0.5",
"@globalfishingwatch/datasets-client": "^3.0.3",
"@globalfishingwatch/fourwings-aggregate": "^6.0.3",
"@reduxjs/toolkit": "*",
"geojson": "0.x",
"lodash": "4.x",
Expand Down
1 change: 0 additions & 1 deletion libs/dataviews-client/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from './resolve-dataviews'
// export * from './resolve-dataviews-generators'
export * from './resources'
export * from './url-workspace'
14 changes: 8 additions & 6 deletions libs/dataviews-client/src/url-workspace/migrations.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,21 @@ export const AIS_LEGACY_FISHING_EFFORT_DATASETS_DICT = {
}

export const AIS_LEGACY_VESSELS_DATASETS_DICT = {
'public-global-other-vessels:v20201001': 'public-global-vessel-identity:v20231026',
'public-global-carrier-vessels:v20201001': 'public-global-vessel-identity:v20231026',
'public-global-all-vessels:v20201001': 'public-global-vessel-identity:v20231026',
'public-global-fishing-vessels:v20201001': 'public-global-vessel-identity:v20231026',
'public-global-support-vessels:v20201001': 'public-global-vessel-identity:v20231026',
'private-global-other-vessels:v20201001': 'public-global-vessel-identity:v20231026',
'public-global-other-vessels:v20201001': 'public-global-vessel-identity:v3.0',
'public-global-carrier-vessels:v20201001': 'public-global-vessel-identity:v3.0',
'public-global-all-vessels:v20201001': 'public-global-vessel-identity:v3.0',
'public-global-fishing-vessels:v20201001': 'public-global-vessel-identity:v3.0',
'public-global-support-vessels:v20201001': 'public-global-vessel-identity:v3.0',
'private-global-other-vessels:v20201001': 'public-global-vessel-identity:v3.0',
'public-global-carriers-tracks:v20201001': 'public-global-all-tracks:v20231026',
'public-global-fishing-longliner-tracks:v20201001': 'public-global-all-tracks:v20231026',
'public-global-support-tracks:v20201001': 'public-global-all-tracks:v20231026',
'public-global-fishing-tracks:v20201001': 'public-global-all-tracks:v20231026',
'public-global-presence-tracks:v20201001': 'public-global-all-tracks:v20231026',
'public-global-all-tracks:v20201001': 'public-global-all-tracks:v20231026',
'private-global-presence-tracks:v20201001': 'public-global-all-tracks:v20231026',
'public-global-vessel-identity:v20231026': 'public-global-vessel-identity:v3.0',
'public-global-all-tracks:v20231026': 'public-global-all-tracks:v3.0',
}

export const VMS_LEGACY_VESSELS_DATASETS_DICT = {
Expand Down
10 changes: 5 additions & 5 deletions libs/deck-layer-composer/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "@globalfishingwatch/deck-layer-composer",
"version": "0.1.1",
"version": "0.1.13",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-client": "^6.0.3",
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/deck-layers": "^0.1.1",
"@globalfishingwatch/api-client": "^6.0.5",
"@globalfishingwatch/api-types": "^8.0.3",
"@globalfishingwatch/deck-layers": "^0.1.7",
"@globalfishingwatch/dataviews-client": "^16.x",
"@globalfishingwatch/layer-composer": "^12.0.1",
"@globalfishingwatch/layer-composer": "^12.0.3",
"jotai": "2.x",
"lodash": "4.x",
"luxon": "3.x",
Expand Down
8 changes: 4 additions & 4 deletions libs/deck-layers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/deck-layers",
"version": "0.1.1",
"version": "0.1.7",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
Expand All @@ -13,9 +13,9 @@
"@deck.gl/mesh-layers": "^9.0.35",
"@deck.gl/react": "^9.0.35",
"@math.gl/core": "4.x",
"@globalfishingwatch/api-client": "^6.0.3",
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/deck-loaders": "^0.1.1",
"@globalfishingwatch/api-client": "^6.0.5",
"@globalfishingwatch/api-types": "^8.0.3",
"@globalfishingwatch/deck-loaders": "^0.1.3",
"@globalfishingwatch/dataviews-client": "^16.x",
"@loaders.gl/core": "4.x",
"@loaders.gl/mvt": "4.x",
Expand Down
4 changes: 2 additions & 2 deletions libs/deck-loaders/package.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"name": "@globalfishingwatch/deck-loaders",
"version": "0.1.1",
"version": "0.1.3",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/api-types": "^8.0.3",
"@loaders.gl/loader-utils": "^4.x",
"luxon": "3.x",
"pbf": "3.x"
Expand Down
6 changes: 3 additions & 3 deletions libs/features-aggregate/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@globalfishingwatch/features-aggregate",
"version": "2.0.2",
"version": "2.0.8",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/layer-composer": "^12.0.1",
"@globalfishingwatch/fourwings-aggregate": "^6.0.1",
"@globalfishingwatch/layer-composer": "^12.0.3",
"@globalfishingwatch/fourwings-aggregate": "^6.0.3",
"lodash": "4.x",
"luxon": "3.x"
}
Expand Down
2 changes: 1 addition & 1 deletion libs/fourwings-aggregate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/fourwings-aggregate",
"version": "6.0.1",
"version": "6.0.3",
"description": "Logic to turn fourwings tiles or cells into meaningful values for the frontend",
"main": "./index.cjs",
"module": "./index.js",
Expand Down
8 changes: 4 additions & 4 deletions libs/layer-composer/package.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"name": "@globalfishingwatch/layer-composer",
"version": "12.0.1",
"version": "12.0.3",
"description": "",
"author": "satellitestudio <[email protected]>",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/data-transforms": "^3.0.3",
"@globalfishingwatch/fourwings-aggregate": "^6.0.1",
"@globalfishingwatch/api-types": "^8.0.3",
"@globalfishingwatch/data-transforms": "^3.0.5",
"@globalfishingwatch/fourwings-aggregate": "^6.0.3",
"@globalfishingwatch/maplibre-gl": "^3.5.1-gfw.2",
"@turf/great-circle": "7.x",
"@turf/length": "7.x",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,11 @@ import {
isActivityDataview,
isDetectionsDataview,
isTrackDataview,
pickTrackResource,
resolveDataviewDatasetResource,
resolveDataviewDatasetResources,
UrlDataviewInstance,
} from './resolve-dataviews'
import { pickTrackResource } from './resources'
import {
setGeneratorConfigCircleRadius,
setGeneratorConfigPolygonColor,
setGeneratorConfigTimeFilter,
} from './dataviews.config'
} from '@globalfishingwatch/dataviews-client'

const MULTILAYER_SEPARATOR = '__'
const MERGED_ACTIVITY_ANIMATED_HEATMAP_GENERATOR_ID = 'mergedActivityHeatmap'
Expand Down Expand Up @@ -628,3 +623,14 @@ export function getDataviewsGeneratorConfigs(
})
return generatorsConfig
}
function setGeneratorConfigCircleRadius(arg0: { dataset: Dataset; generator: any }) {
throw new Error('Function not implemented.')
}

function setGeneratorConfigTimeFilter(arg0: { dataset: Dataset; generator: any }) {
throw new Error('Function not implemented.')
}

function setGeneratorConfigPolygonColor(arg0: { dataset: Dataset; generator: any }) {
throw new Error('Function not implemented.')
}
3 changes: 2 additions & 1 deletion libs/layer-composer/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './config'
export * from './dataviews/resolve-dataviews-generators'
export * from './generators'
export * from './generators/heatmap/util/time-chunks'
export * from './generators/types'
Expand All @@ -8,4 +9,4 @@ export * from './transforms/sort/sort'
export * from './types'
export * from './react-hooks/use-layer-composer'
export * from './react-hooks/use-map-interaction'
export * from './react-hooks/use-map-legend'
export * from './react-hooks/use-map-legend'
2 changes: 1 addition & 1 deletion libs/ocean-areas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/ocean-areas",
"version": "2.0.1",
"version": "2.0.3",
"main": "./index.cjs",
"module": "./index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion libs/pbf-decoders/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/pbf-decoders",
"version": "3.0.3",
"version": "3.0.5",
"main": "./index.cjs",
"module": "./index.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions libs/react-hooks/package.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"name": "@globalfishingwatch/react-hooks",
"version": "17.0.1",
"version": "17.0.9",
"description": "set of react hooks to easily use pure js libraries",
"author": "satellitestudio <[email protected]>",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-client": "^6.0.3",
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/api-client": "^6.0.5",
"@globalfishingwatch/api-types": "^8.0.3",
"@globalfishingwatch/dataviews-client": "^16.0.0",
"@globalfishingwatch/fourwings-aggregate": "^6.0.1",
"@globalfishingwatch/layer-composer": "^12.0.1",
"@globalfishingwatch/fourwings-aggregate": "^6.0.3",
"@globalfishingwatch/layer-composer": "^12.0.3",
"@globalfishingwatch/maplibre-gl": "^3.5.1-gfw.2",
"@mapbox/tilebelt": "1.x",
"lodash": "4.x",
Expand Down
10 changes: 5 additions & 5 deletions libs/timebar/package.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "@globalfishingwatch/timebar",
"version": "5.0.2",
"version": "5.0.14",
"description": "GFW timebar",
"author": "satellitestudio <[email protected]>",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/dataviews-client": "^17.0.1",
"@globalfishingwatch/deck-loaders": "^0.1.1",
"@globalfishingwatch/ui-components": "^14.0.7",
"@globalfishingwatch/api-types": "^8.0.3",
"@globalfishingwatch/dataviews-client": "^17.0.7",
"@globalfishingwatch/deck-loaders": "^0.1.3",
"@globalfishingwatch/ui-components": "^14.0.9",
"classnames": "2.x",
"d3-array": "3.x",
"d3-scale": "4.x",
Expand Down
4 changes: 2 additions & 2 deletions libs/ui-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@globalfishingwatch/ui-components",
"version": "14.0.7",
"version": "14.0.9",
"description": "Set of react components to consume on the gfw ecosystem",
"author": "satellitestudio <[email protected]>",
"homepage": "https://github.com/GlobalFishingWatch/frontend#readme",
Expand All @@ -15,7 +15,7 @@
"main": "./index.cjs",
"module": "./index.js",
"dependencies": {
"@globalfishingwatch/api-types": "^8.0.1",
"@globalfishingwatch/api-types": "^8.0.3",
"countryflag": "5.x",
"d3-format": "3.x",
"d3-geo": "3.x",
Expand Down
3 changes: 2 additions & 1 deletion libs/ui-components/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
const nrwlConfig = require('@nx/react/plugins/bundle-rollup')
const svgr = require('@svgr/rollup')
const dynamicImportVars = require('@rollup/plugin-dynamic-import-vars')
const pkg = require('./package.json')

module.exports = (config) => {
nrwlConfig(config)
return {
...config,
plugins: [...config.plugins, svgr()],
plugins: [...config.plugins, svgr(), dynamicImportVars()],
external: Object.keys(pkg.dependencies || {}),
}
}
Loading

0 comments on commit dffd197

Please sign in to comment.