diff --git a/package-lock.json b/package-lock.json index 261e701b..b87a5daf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "lodash": "^4.17.21", "react": "^18.2.0", "react-redux": "^8.1.3", - "terraso-backend": "github:techmatters/terraso-backend#b2eca72c", + "terraso-backend": "github:techmatters/terraso-backend#e88a347", "uuid": "^9.0.1" }, "devDependencies": { @@ -13430,7 +13430,7 @@ }, "node_modules/terraso-backend": { "version": "0.1.0", - "resolved": "git+ssh://git@github.com/techmatters/terraso-backend.git#b2eca72cb149b7f234864857ddbf20b1b5e3b165" + "resolved": "git+ssh://git@github.com/techmatters/terraso-backend.git#e88a3477d475de68cc1d923faecd271986bc24ad" }, "node_modules/test-exclude": { "version": "6.0.0", diff --git a/package.json b/package.json index 82fc1401..576cecc1 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "lodash": "^4.17.21", "react": "^18.2.0", "react-redux": "^8.1.3", - "terraso-backend": "github:techmatters/terraso-backend#b2eca72c", + "terraso-backend": "github:techmatters/terraso-backend#e88a347", "uuid": "^9.0.1" }, "scripts": { diff --git a/src/soilId/soilIdFragments.ts b/src/soilId/soilIdFragments.ts index fee15095..8692d668 100644 --- a/src/soilId/soilIdFragments.ts +++ b/src/soilId/soilIdFragments.ts @@ -99,10 +99,13 @@ export const depthDependentSoilData = /* GraphQL */ ` } texture rockFragmentVolume + clayPercent colorHueSubstep colorHue colorValue colorChroma + colorPhotoSoilCondition + colorPhotoLightingCondition conductivity conductivityTest conductivityUnit diff --git a/src/soilId/soilIdTypes.ts b/src/soilId/soilIdTypes.ts index 82a6a1a4..99b9f038 100644 --- a/src/soilId/soilIdTypes.ts +++ b/src/soilId/soilIdTypes.ts @@ -22,8 +22,13 @@ import type { ProjectSoilSettingsNode, SoilDataDepthIntervalNode, SoilDataNode, + SoilIdDepthDependentSoilDataColorChromaChoices, + SoilIdDepthDependentSoilDataColorHueChoices, + SoilIdDepthDependentSoilDataColorHueSubstepChoices, + SoilIdDepthDependentSoilDataColorValueChoices, SoilIdDepthDependentSoilDataRockFragmentVolumeChoices, SoilIdDepthDependentSoilDataTextureChoices, + SoilIdSoilDataSurfaceCracksSelectChoices, } from 'terraso-client-shared/graphqlSchema/graphql'; export const soilPitMethods = [ @@ -87,5 +92,58 @@ export const textures = [ 'SILT_LOAM', ] as const satisfies readonly SoilTexture[]; +export type SoilColorValue = SoilIdDepthDependentSoilDataColorValueChoices; +export const colorValues = [ + 'VALUE_2_5', + 'VALUE_3', + 'VALUE_4', + 'VALUE_5', + 'VALUE_6', + 'VALUE_7', + 'VALUE_8', + 'VALUE_8_5', + 'VALUE_9', + 'VALUE_9_5', +] as const satisfies readonly SoilColorValue[]; + +export type SoilColorChroma = SoilIdDepthDependentSoilDataColorChromaChoices; +export const colorChromas = [ + 'CHROMA_1', + 'CHROMA_2', + 'CHROMA_3', + 'CHROMA_4', + 'CHROMA_5', + 'CHROMA_6', + 'CHROMA_7', + 'CHROMA_8', +] as const satisfies readonly SoilColorChroma[]; + +export type SoilColorHue = SoilIdDepthDependentSoilDataColorHueChoices; +export const colorHues = [ + 'B', + 'BG', + 'G', + 'GY', + 'R', + 'Y', + 'YR', +] as const satisfies readonly SoilColorHue[]; + +export type SoilColorHueSubstep = + SoilIdDepthDependentSoilDataColorHueSubstepChoices; +export const colorHueSubsteps = [ + 'SUBSTEP_2_5', + 'SUBSTEP_5', + 'SUBSTEP_7_5', + 'SUBSTEP_10', +] as const satisfies readonly SoilColorHueSubstep[]; + export type RockFragmentVolume = SoilIdDepthDependentSoilDataRockFragmentVolumeChoices; + +export type SurfaceCracks = SoilIdSoilDataSurfaceCracksSelectChoices; +export const surfaceCracks = [ + 'NO_CRACKING', + 'SURFACE_CRACKING_ONLY', + 'DEEP_VERTICAL_CRACKS', +] as const satisfies readonly SurfaceCracks[]; diff --git a/src/store/store.ts b/src/store/store.ts index c2cbe5b7..a16df929 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -60,6 +60,7 @@ export type StateFromStoreFactory ToolkitStore> = export type DispatchFromStoreFactory ToolkitStore> = ReturnType['dispatch']; +// TODO: why doesn't the returned store type include the reducers from S? const createStoreFactory = (reducers: ReducersMapObject) => { return (intialState?: Partial) => configureStore({