diff --git a/docs/package-lock.json b/docs/package-lock.json index dc2158d91..2b96560f2 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "MIT", "dependencies": { - "@alephdata/followthemoney": "^3.2.1", + "@alephdata/followthemoney": "^3.5.1", "@astrojs/markdown-component": "^1.0.2", "astro": "^1.4.3", "astro-theme-docs": "github:alephdata/astro-theme-docs", @@ -22,9 +22,9 @@ } }, "node_modules/@alephdata/followthemoney": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@alephdata/followthemoney/-/followthemoney-3.2.1.tgz", - "integrity": "sha512-V78AUXBWwK9vMKzwUaZRE3PUg5O0pHMg2zL5kJtsl6U+7LfXBRd4dJR8GyeRbRddU1It4wjmK/PgR4NHdsGOHg==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@alephdata/followthemoney/-/followthemoney-3.5.1.tgz", + "integrity": "sha512-V8WO/Hq6AbMJtYfVzNzljWzt3zDXKW3Xm2fMlNhYfw8FrvTRLR3nLfTSMqkeZJEJ5AKjHblef+yBQN/5fnOeCA==", "dependencies": { "uuid": "~9.0.0" }, @@ -7261,9 +7261,9 @@ }, "dependencies": { "@alephdata/followthemoney": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@alephdata/followthemoney/-/followthemoney-3.2.1.tgz", - "integrity": "sha512-V78AUXBWwK9vMKzwUaZRE3PUg5O0pHMg2zL5kJtsl6U+7LfXBRd4dJR8GyeRbRddU1It4wjmK/PgR4NHdsGOHg==", + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/@alephdata/followthemoney/-/followthemoney-3.5.1.tgz", + "integrity": "sha512-V8WO/Hq6AbMJtYfVzNzljWzt3zDXKW3Xm2fMlNhYfw8FrvTRLR3nLfTSMqkeZJEJ5AKjHblef+yBQN/5fnOeCA==", "requires": { "uuid": "~9.0.0" } diff --git a/docs/package.json b/docs/package.json index 60ce0a2b4..3b0451d87 100644 --- a/docs/package.json +++ b/docs/package.json @@ -15,7 +15,7 @@ "author": "", "license": "MIT", "dependencies": { - "@alephdata/followthemoney": "^3.2.1", + "@alephdata/followthemoney": "^3.5.1", "@astrojs/markdown-component": "^1.0.2", "astro": "^1.4.3", "astro-theme-docs": "github:alephdata/astro-theme-docs", diff --git a/docs/src/components/explorer/DeprecatedIndicator.astro b/docs/src/components/explorer/DeprecatedIndicator.astro new file mode 100644 index 000000000..a9bddd120 --- /dev/null +++ b/docs/src/components/explorer/DeprecatedIndicator.astro @@ -0,0 +1,30 @@ +--- +import { Popover } from 'astro-theme-docs/components'; +const { message } = Astro.props; +--- + + + + + Deprecated +

+ {message} +

+
diff --git a/docs/src/components/explorer/SchemaProperties.astro b/docs/src/components/explorer/SchemaProperties.astro index 228a372ae..df76f083f 100644 --- a/docs/src/components/explorer/SchemaProperties.astro +++ b/docs/src/components/explorer/SchemaProperties.astro @@ -3,18 +3,17 @@ import PropertyType from '@components/explorer/PropertyType.astro'; import SchemaLink from '@components/explorer/SchemaLink.astro'; import IndexTable from '@components/explorer/IndexTable.astro'; import PropertyIndicator from '@components/explorer/PropertyIndicator.astro'; +import DeprecatedIndicator from '@components/explorer/DeprecatedIndicator.astro'; const { schema, ...rest } = Astro.props; const isFeatured = (property) => property.schema.featured.includes(property.name); - const isRequired = (property) => property.schema.required.includes(property.name); - const isHidden = (property) => property.hidden; - const isInherited = (property) => property.schema.name !== schema.name; +const isDeprecated = (property) => property.deprecated; const properties = Array.from(schema.getProperties().values()) .sort((a, b) => a.name.localeCompare(b.name)) @@ -82,6 +81,9 @@ const properties = Array.from(schema.getProperties().values()) {isFeatured(prop) && } {isRequired(prop) && } {isHidden(prop) && } + {isDeprecated(prop) && ( + + )} {prop.label} diff --git a/docs/src/components/explorer/SchemataIndexTable.astro b/docs/src/components/explorer/SchemataIndexTable.astro index 3e3d8dcbd..1c019779b 100644 --- a/docs/src/components/explorer/SchemataIndexTable.astro +++ b/docs/src/components/explorer/SchemataIndexTable.astro @@ -3,6 +3,7 @@ import { model } from '@util/ftm'; import IndexTable from '@components/explorer/IndexTable.astro'; import SchemaLink from '@components/explorer/SchemaLink.astro'; import BooleanValue from '@components/explorer/BooleanValue.astro'; +import DeprecatedIndicator from '@components/explorer/DeprecatedIndicator.astro'; const schemata = Object.values(model.schemata).sort((a, b) => a.label.localeCompare(b.label) @@ -23,6 +24,9 @@ const schemata = Object.values(model.schemata).sort((a, b) => {schema.name} + {schema.deprecated && ( + + )} {schema.label} diff --git a/docs/src/pages/explorer/schemata/[name].astro b/docs/src/pages/explorer/schemata/[name].astro index 09d2c9f93..3266ade43 100644 --- a/docs/src/pages/explorer/schemata/[name].astro +++ b/docs/src/pages/explorer/schemata/[name].astro @@ -1,6 +1,6 @@ --- import { model } from '@util/ftm'; -import { Stack, TocNav } from 'astro-theme-docs/components'; +import { Stack, TocNav, Callout } from 'astro-theme-docs/components'; import ExplorerLayout from '@layouts/ExplorerLayout.astro'; import SchemaPageHeader from '@components/page/SchemaPageHeader.astro'; import SchemaInheritance from '@components/explorer/SchemaInheritance.astro'; @@ -29,6 +29,14 @@ const headings = [ + { + schema.deprecated && ( + + This schema is deprecated and will be removed in a future version of + the FollowTheMoney model. + + ) + }