From e81ef7460c286665afcae7f5905e0026e1c04128 Mon Sep 17 00:00:00 2001 From: Rene Pot Date: Thu, 5 Oct 2023 17:46:02 +0200 Subject: [PATCH 1/5] docs: fix links --- docs/advanced/offline/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/advanced/offline/README.md b/docs/advanced/offline/README.md index 15afd54c4..6cfa9a90d 100644 --- a/docs/advanced/offline/README.md +++ b/docs/advanced/offline/README.md @@ -2,9 +2,9 @@ !> **WARNING** These features are considered **experimental** and are **subject to breaking changes outside of the normal release cycle.** -The app platform provides some support for PWA features, including a `manifest.json` file for installability and service worker which can provide offline caching. In addition to those features, the app runtime provides support for ["cacheable sections"](advanced/offline/CacheableSections), which are sections of an app that can be individually cached on-demand. The [`useCacheableSection` hook](advanced/offline/CacheableSections#usecacheablesection-api) and the [`CacheableSection` component](advanced/offline/CacheableSections#cacheablesection-api) provide the controls for the section and the wrapper for the section, respectively. The [`useCachedSections` hook](advanced/offline/CacheableSections#usecachedsections-api) returns a list of sections that are stored in the cache and a function that can delete them. +The app platform provides some support for PWA features, including a `manifest.json` file for installability and service worker which can provide offline caching. In addition to those features, the app runtime provides support for ["cacheable sections"](./CacheableSections.md), which are sections of an app that can be individually cached on-demand. The [`useCacheableSection` hook](./CacheableSections.md#usecacheablesection-api) and the [`CacheableSection` component](./CacheableSections.md#cacheablesection-api) provide the controls for the section and the wrapper for the section, respectively. The [`useCachedSections` hook](./CacheableSections.md#usecachedsections-api) returns a list of sections that are stored in the cache and a function that can delete them. -An important tool for offline-capable apps is the [`useDhis2ConnectionStatus` hook](advanced/offline/useDhis2ConnectionStatus.md), which can be used to determine whether or not the app can connect to the DHIS2 server. There is also a [`useOnlineStatus` hook](advanced/offline/useOnlineStatus.md) which returns whether or not the client is connected to the internet, but `useDhis2ConnectionStatus` is probably the one you want to use. On instances where DHIS2 is deployed locally in an environment without internet, `useOnlineStatus` can cause problems, because it will always return `false` even though the app can communicate with the DHIS2 server and therefore function just fine. `useDhis2ConnectionStatus` was created to address this problem. +An important tool for offline-capable apps is the [`useDhis2ConnectionStatus` hook](./useDhis2ConnectionStatus.md), which can be used to determine whether or not the app can connect to the DHIS2 server. There is also a [`useOnlineStatus` hook](./useOnlineStatus.md) which returns whether or not the client is connected to the internet, but `useDhis2ConnectionStatus` is probably the one you want to use. On instances where DHIS2 is deployed locally in an environment without internet, `useOnlineStatus` can cause problems, because it will always return `false` even though the app can communicate with the DHIS2 server and therefore function just fine. `useDhis2ConnectionStatus` was created to address this problem. ## Examples From ae6ca99946af4543cfc6efaf45931ab680104ee4 Mon Sep 17 00:00:00 2001 From: Rene Pot Date: Fri, 6 Oct 2023 15:14:48 +0200 Subject: [PATCH 2/5] docs: fix links --- docs/advanced/offline/useOnlineStatus.md | 2 +- docs/components/DataMutation.md | 30 +++++++++++----------- docs/components/DataQuery.md | 32 ++++++++++++------------ docs/components/README.md | 6 ++--- docs/hooks/README.md | 14 +++++------ docs/hooks/useConfig.md | 4 +-- docs/hooks/useDataEngine.md | 4 +-- docs/hooks/useDataMutation.md | 32 ++++++++++++------------ docs/hooks/useDataQuery.md | 32 ++++++++++++------------ 9 files changed, 78 insertions(+), 78 deletions(-) diff --git a/docs/advanced/offline/useOnlineStatus.md b/docs/advanced/offline/useOnlineStatus.md index 366a797fc..8491b5904 100644 --- a/docs/advanced/offline/useOnlineStatus.md +++ b/docs/advanced/offline/useOnlineStatus.md @@ -1,6 +1,6 @@ # useOnlineStatus -!> This hook only detects whether or not you're connected to the internet, which could be problematic for DHIS2 instances that are hosted locally or offline, where what really matters is whether or not you can communicate with the DHIS2 server. The [`useDhis2ConnectionStatus` hook](advanced/offline/useDhis2ConnectionStatus) is usually better for that reason, and is therefore recommended. +!> This hook only detects whether or not you're connected to the internet, which could be problematic for DHIS2 instances that are hosted locally or offline, where what really matters is whether or not you can communicate with the DHIS2 server. The [`useDhis2ConnectionStatus` hook](./useDhis2ConnectionStatus.md) is usually better for that reason, and is therefore recommended. The `useOnlineStatus` returns whether the client is online or offline. It debounces the returned values by default to prevent rapid changes of any UI elements that depend on the online status. diff --git a/docs/components/DataMutation.md b/docs/components/DataMutation.md index fa8dc8f2c..914f02c0c 100644 --- a/docs/components/DataMutation.md +++ b/docs/components/DataMutation.md @@ -1,6 +1,6 @@ # DataMutation Component -A thin wrapper around the [useDataMutation](hooks/useDataMutation.md) hook +A thin wrapper around the [useDataMutation](../hooks/useDataMutation.md) hook ## Basic Usage @@ -19,13 +19,13 @@ return ( ## Input Props -| Name | Type | Required | Description | -| :------------: | :-----------------------------: | :----------: | ----------------------------------------------------------------------------------------------------------------------------- | -| **mutation** | [_Mutation_](types/Mutation.md) | **required** | The Mutation definition describing the requested operation | -| **variables** | _Object_ | | Variables to be passed to the dynamic portions of the mutation | -| **onComplete** | _Function_ | | Callback function to be called on successfull completion of the mutation. Called with the response data as the only argument. | -| **onError** | _Function_ | | Callback function to be called on failure of the mutation. Called with the error instance as the only argument. | -| **lazy** | _boolean_ | | If false, run the mutation immediately after the component mounts.
_**Default**: `true`_ | +| Name | Type | Required | Description | +| :------------: | :--------------------------------: | :----------: | ----------------------------------------------------------------------------------------------------------------------------- | +| **mutation** | [_Mutation_](../types/Mutation.md) | **required** | The Mutation definition describing the requested operation | +| **variables** | _Object_ | | Variables to be passed to the dynamic portions of the mutation | +| **onComplete** | _Function_ | | Callback function to be called on successfull completion of the mutation. Called with the response data as the only argument. | +| **onError** | _Function_ | | Callback function to be called on failure of the mutation. Called with the error instance as the only argument. | +| **lazy** | _boolean_ | | If false, run the mutation immediately after the component mounts.
_**Default**: `true`_ | ## Render Function Props @@ -34,13 +34,13 @@ The render function is called whenever the state of the mutation changes. It is 1. `mutate` - a function which can be called to trigger the mutation (for instance in an onClick callback) 2. `state` - an object containing the following properties: -| Name | Type | Description | -| :---------: | :-------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **called** | _boolean_ | **true** if the mutation has been triggered through a call to the `mutate` function or on component mount with `lazy: false` | -| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | -| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | -| **data** | _MutationResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | -| **engine** | [_Data Engine_](advanced/DataEngine) | A reference to the DataEngine instance | +| Name | Type | Description | +| :---------: | :----------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **called** | _boolean_ | **true** if the mutation has been triggered through a call to the `mutate` function or on component mount with `lazy: false` | +| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | +| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | +| **data** | _MutationResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | +| **engine** | [_Data Engine_](../advanced/DataEngine.md) | A reference to the DataEngine instance | ## Example diff --git a/docs/components/DataQuery.md b/docs/components/DataQuery.md index 5f1b49a14..a5a741d25 100644 --- a/docs/components/DataQuery.md +++ b/docs/components/DataQuery.md @@ -1,6 +1,6 @@ # DataQuery Component -A thin wrapper around the [useDataQuery](hooks/useDataQuery.md) hook +A thin wrapper around the [useDataQuery](../hooks/useDataQuery.md) hook ## Basic Usage @@ -19,24 +19,24 @@ return ( ## Input Props -| Name | Type | Required | Description | -| :------------: | :-----------------------: | :----------: | -------------------------------------------------------------------------------------------------------------------------- | -| **query** | [_Query_](types/Query.md) | **required** | The Query definition describing the requested data | -| **variables** | _Object_ | | Variables to be passed to the dynamic portions of the query | -| **onComplete** | _Function_ | | Callback function to be called on successfull completion of the query. Called with the response data as the only argument. | -| **onError** | _Function_ | | Callback function to be called on failure of the query. Called with the error instance as the only argument. | -| **lazy** | _boolean_ | | If true, wait until `refetch` is called before fetching data.
_**Default**: `false`_ | +| Name | Type | Required | Description | +| :------------: | :--------------------------: | :----------: | -------------------------------------------------------------------------------------------------------------------------- | +| **query** | [_Query_](../types/Query.md) | **required** | The Query definition describing the requested data | +| **variables** | _Object_ | | Variables to be passed to the dynamic portions of the query | +| **onComplete** | _Function_ | | Callback function to be called on successfull completion of the query. Called with the response data as the only argument. | +| **onError** | _Function_ | | Callback function to be called on failure of the query. Called with the error instance as the only argument. | +| **lazy** | _boolean_ | | If true, wait until `refetch` is called before fetching data.
_**Default**: `false`_ | ## Render Function Props -| Name | Type | Description | -| :---------: | :----------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **called** | _boolean_ | **true** if the data request has been initiated with either `lazy: false` or `refetch()` at least once | -| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | -| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | -| **data** | _QueryResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | -| **refetch** | _Function_ | This function can be called to refetch the data. Any in-flight HTTP requests will automatically be aborted. | -| **engine** | [_Data Engine_](advanced/DataEngine) | A reference to the DataEngine instance | +| Name | Type | Description | +| :---------: | :----------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **called** | _boolean_ | **true** if the data request has been initiated with either `lazy: false` or `refetch()` at least once | +| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | +| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | +| **data** | _QueryResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | +| **refetch** | _Function_ | This function can be called to refetch the data. Any in-flight HTTP requests will automatically be aborted. | +| **engine** | [_Data Engine_](../advanced/DataEngine.md) | A reference to the DataEngine instance | ## Example diff --git a/docs/components/README.md b/docs/components/README.md index 3deab07b0..f790d06a4 100644 --- a/docs/components/README.md +++ b/docs/components/README.md @@ -1,6 +1,6 @@ # React Components -As an alternative to [React Hooks](hooks/), the DHIS2 Application Runtime support render-prop React components. The following Components are supported: +As an alternative to [React Hooks](../hooks/README.md), the DHIS2 Application Runtime support render-prop React components. The following Components are supported: -- [**DataQuery**](components/DataQuery) - a data fetching Component wrapper around the [useDataQuery](hooks/useDataQuery) hook. -- [**DataMutation**](components/DataMutation) - a Component wrapper around the [useDataMutation](hooks/useDataMutation) hook. +- [**DataQuery**](./DataQuery.md) - a data fetching Component wrapper around the [useDataQuery](../hooks/useDataQuery.md) hook. +- [**DataMutation**](./DataMutation.md) - a Component wrapper around the [useDataMutation](../hooks/useDataMutation.md) hook. diff --git a/docs/hooks/README.md b/docs/hooks/README.md index d27c5d037..bde9780a2 100644 --- a/docs/hooks/README.md +++ b/docs/hooks/README.md @@ -2,11 +2,11 @@ The DHIS2 Application Runtime supports [React Hooks](https://reactjs.org/docs/hooks-intro.html) (introduced in React 16.8). The following hooks are supported: -- [**useConfig**](hooks/useConfig) - Access the raw application configuration object -- [**useDataQuery**](hooks/useDataQuery) - Fetch data from the DHIS2 Core server API without worrying about HTTP requests! -- [**useDataMutation**](hooks/useDataMutation) - Mutate resources in the DHIS2 Core server API without worrying about HTTP requests! -- [**useDataEngine**](hooks/useDataEngine) _(Advanced)_ - Access the underlying [Data Engine](advanced/DataEngine) instance -- [**useAlert**](hooks/useAlert) - Add an alert to the central alerts-context -- [**useAlerts**](hooks/useAlert) - Read the alerts from the alerts-context +- [**useConfig**](./useConfig.md) - Access the raw application configuration object +- [**useDataQuery**](./useDataQuery.md) - Fetch data from the DHIS2 Core server API without worrying about HTTP requests! +- [**useDataMutation**](./useDataMutation.md) - Mutate resources in the DHIS2 Core server API without worrying about HTTP requests! +- [**useDataEngine**](./useDataEngine.md) _(Advanced)_ - Access the underlying [Data Engine](../advanced/DataEngine.md) instance +- [**useAlert**](./useAlert.md) - Add an alert to the central alerts-context +- [**useAlerts**](./useAlerts.md) - Read the alerts from the alerts-context -While these Hooks are incredibly powerful and usually preferable, some [Components](components/) are also provided which conveniently wrap their corresponding Hooks. +While these Hooks are incredibly powerful and usually preferable, some [Components](../components/README.md) are also provided which conveniently wrap their corresponding Hooks. diff --git a/docs/hooks/useConfig.md b/docs/hooks/useConfig.md index 93e39d61b..0c8aefc62 100644 --- a/docs/hooks/useConfig.md +++ b/docs/hooks/useConfig.md @@ -1,6 +1,6 @@ # useConfig Hook -Access the application configuration passed to the top-level [Provider](provider.md) +Access the application configuration passed to the top-level [Provider](../provider.md) ## Basic Usage: @@ -17,7 +17,7 @@ _None_ ## Output -This hook returns an object of type [Config](types/Config.md). +This hook returns an object of type [Config](../types/Config.md). ## Example diff --git a/docs/hooks/useDataEngine.md b/docs/hooks/useDataEngine.md index bbd2c1fc5..d22582392 100644 --- a/docs/hooks/useDataEngine.md +++ b/docs/hooks/useDataEngine.md @@ -1,6 +1,6 @@ # useDataEngine hook -Get access to the [Data Engine](advanced/DataEngine) instance for non-React contexts. +Get access to the [Data Engine](../advanced/DataEngine.md) instance for non-React contexts. ## Basic Usage: @@ -19,4 +19,4 @@ engine.mutate(mutation, { }) ``` -> See [Using with Redux](advanced/redux) for an advanced example +> See [Using with Redux](../advanced/redux.md) for an advanced example diff --git a/docs/hooks/useDataMutation.md b/docs/hooks/useDataMutation.md index 69b322626..0cc049419 100644 --- a/docs/hooks/useDataMutation.md +++ b/docs/hooks/useDataMutation.md @@ -16,25 +16,25 @@ const [mutate, { called, loading, error, data }] = useDataMutation( ## Input -| Name | Type | Required | Description | -| :--------------------: | :-----------------------------: | :----------: | ----------------------------------------------------------------------------------------------------------------------------- | -| **mutation** | [_Mutation_](types/Mutation.md) | **required** | The Mutation definition describing the requested action | -| **options** | _Object_ | | An optional set of query options | -| **options.variables** | _Object_ | | Variables to be passed to the dynamic portions of the mutation | -| **options.onComplete** | _Function_ | | Callback function to be called on successfull completion of the mutation. Called with the response data as the only argument. | -| **options.onError** | _Function_ | | Callback function to be called on failure of the mutation. Called with the error instance as the only argument. | -| **options.lazy** | _boolean_ | | If false, run the mutation immediately after the component mounts.
_**Default**: `true`_ | +| Name | Type | Required | Description | +| :--------------------: | :--------------------------------: | :----------: | ----------------------------------------------------------------------------------------------------------------------------- | +| **mutation** | [_Mutation_](../types/Mutation.md) | **required** | The Mutation definition describing the requested action | +| **options** | _Object_ | | An optional set of query options | +| **options.variables** | _Object_ | | Variables to be passed to the dynamic portions of the mutation | +| **options.onComplete** | _Function_ | | Callback function to be called on successfull completion of the mutation. Called with the response data as the only argument. | +| **options.onError** | _Function_ | | Callback function to be called on failure of the mutation. Called with the error instance as the only argument. | +| **options.lazy** | _boolean_ | | If false, run the mutation immediately after the component mounts.
_**Default**: `true`_ | ## Output -| Name | Type | Description | -| :---------: | :----------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **mutate** | _Function_ | This function can be called to execute the mutation. Any in-flight HTTP requests will automatically be aborted. | -| **called** | _boolean_ | **true** if the mutation has been triggered by a call to the `mutate` function or on component mount with `lazy: false` | -| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | -| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | -| **data** | _QueryResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | -| **engine** | [_Data Engine_](advanced/DataEngine) | A reference to the DataEngine instance | +| Name | Type | Description | +| :---------: | :----------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **mutate** | _Function_ | This function can be called to execute the mutation. Any in-flight HTTP requests will automatically be aborted. | +| **called** | _boolean_ | **true** if the mutation has been triggered by a call to the `mutate` function or on component mount with `lazy: false` | +| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | +| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | +| **data** | _QueryResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | +| **engine** | [_Data Engine_](../advanced/DataEngine.md) | A reference to the DataEngine instance | ## Example diff --git a/docs/hooks/useDataQuery.md b/docs/hooks/useDataQuery.md index dd6b4a161..b5478d546 100644 --- a/docs/hooks/useDataQuery.md +++ b/docs/hooks/useDataQuery.md @@ -13,25 +13,25 @@ const { loading, error, data, refetch } = useDataQuery(query, options) ## Input -| Name | Type | Required | Description | -| :--------------------: | :--------------------: | :----------: | --------------------------------------------------------------------------------------------------------------------------- | -| **query** | [_Query_](types/Query) | **required** | The Query definition describing the requested data | -| **options** | _Object_ | | An optional set of query options | -| **options.variables** | _Object_ | | Variables to be passed to the dynamic portions of the query (can also be passed via the refetch function, see Output below) | -| **options.onComplete** | _Function_ | | Callback function to be called on successfull completion of the query. Called with the response data as the only argument. | -| **options.onError** | _Function_ | | Callback function to be called on failure of the query. Called with the error instance as the only argument. | -| **options.lazy** | _boolean_ | | If true, wait until `refetch` is called before fetching data.
_**Default**: `false`_ | +| Name | Type | Required | Description | +| :--------------------: | :--------------------------: | :----------: | --------------------------------------------------------------------------------------------------------------------------- | +| **query** | [_Query_](../types/Query.md) | **required** | The Query definition describing the requested data | +| **options** | _Object_ | | An optional set of query options | +| **options.variables** | _Object_ | | Variables to be passed to the dynamic portions of the query (can also be passed via the refetch function, see Output below) | +| **options.onComplete** | _Function_ | | Callback function to be called on successfull completion of the query. Called with the response data as the only argument. | +| **options.onError** | _Function_ | | Callback function to be called on failure of the query. Called with the error instance as the only argument. | +| **options.lazy** | _boolean_ | | If true, wait until `refetch` is called before fetching data.
_**Default**: `false`_ | ## Output -| Name | Type | Description | -| :---------: | :----------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **called** | _boolean_ | **true** if the data request has been initiated with either `lazy: false` or `refetch()` at least once | -| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | -| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | -| **data** | _QueryResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | -| **refetch** | _Function_ | This function can be called to refetch the data and can accept variables (see Examples below). Any in-flight HTTP requests will automatically be aborted. | -| **engine** | [_Data Engine_](advanced/DataEngine) | A reference to the DataEngine instance | +| Name | Type | Description | +| :---------: | :----------------------------------------: | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **called** | _boolean_ | **true** if the data request has been initiated with either `lazy: false` or `refetch()` at least once | +| **loading** | _boolean_ | **true** if the data is not yet available and no error has yet been encountered | +| **error** | _Error_
or
_undefined_ | **undefined** if no error has occurred, otherwise the Error which was thrown | +| **data** | _QueryResult_
or
_undefined_ | **undefined** if the data is loading or an error has occurred, otherwise a map from the name of each **QueryDefinition** defined in the **Query** to the resulting data for that query | +| **refetch** | _Function_ | This function can be called to refetch the data and can accept variables (see Examples below). Any in-flight HTTP requests will automatically be aborted. | +| **engine** | [_Data Engine_](../advanced/DataEngine.md) | A reference to the DataEngine instance | ## Examples From 86ffa2393ae54190c03dfb6e038e56bf10e5fde3 Mon Sep 17 00:00:00 2001 From: Rene Pot Date: Fri, 6 Oct 2023 15:19:29 +0200 Subject: [PATCH 3/5] docs: fix more links --- docs/provider.md | 6 +++--- docs/types/Config.md | 4 ++-- docs/types/Mutation.md | 2 +- docs/types/Query.md | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/provider.md b/docs/provider.md index 706abebc9..516167da2 100644 --- a/docs/provider.md +++ b/docs/provider.md @@ -2,9 +2,9 @@ ## Input Props -| Name | Type | Description | -| :--------: | :-------------------------: | ----------------------------- | -| **config** | [_Config_](types/Config.md) | The application configuration | +| Name | Type | Description | +| :--------: | :---------------------------: | ----------------------------- | +| **config** | [_Config_](./types/Config.md) | The application configuration | ## Example diff --git a/docs/types/Config.md b/docs/types/Config.md index 8d0c221ac..85c0b42ec 100644 --- a/docs/types/Config.md +++ b/docs/types/Config.md @@ -1,8 +1,8 @@ # Config Type The Application Config type is a required input to the top-level -[Provider](provider), and can be accessed from within an application -with the [useConfig](hooks/useConfig) hook. +[Provider](../provider.md), and can be accessed from within an application +with the [useConfig](../hooks/useConfig.md) hook. | Property | Type | Description | | :------------: | :------: | --------------------------------------------------------------------------------------------------------------- | diff --git a/docs/types/Mutation.md b/docs/types/Mutation.md index 4067e997d..78b057ad0 100644 --- a/docs/types/Mutation.md +++ b/docs/types/Mutation.md @@ -1,6 +1,6 @@ # Mutation -The Mutation type is used to define declarative data mutations. It is required input for the [useDataMutation](hooks/useDataMutation.md) hook, [DataMutation](components/DataMutation.md) component, and [DataEngine.mutate](advanced/DataEngine) method. +The Mutation type is used to define declarative data mutations. It is required input for the [useDataMutation](../hooks/useDataMutation.md) hook, [DataMutation](../components/DataMutation.md) component, and [DataEngine.mutate](../advanced/DataEngine.md) method. A mutation defines a destructive operation performed on a collection or instance of a particular resource. diff --git a/docs/types/Query.md b/docs/types/Query.md index 4698021db..4952c33b2 100644 --- a/docs/types/Query.md +++ b/docs/types/Query.md @@ -1,6 +1,6 @@ # Data Queries -The Query type is used to define declarative data requests. It is required input for the [useDataQuery](hooks/useDataQuery.md) hook and [DataQuery](components/DataQuery.md) component. +The Query type is used to define declarative data requests. It is required input for the [useDataQuery](../hooks/useDataQuery.md) hook and [DataQuery](../components/DataQuery.md) component. ## Query From ac5aa44e5b0820af7849632926777f06d4190393 Mon Sep 17 00:00:00 2001 From: Rene Pot Date: Mon, 16 Oct 2023 09:02:41 +0200 Subject: [PATCH 4/5] docs: fix link to playground --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 4fc98a0dd..4f640356a 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ A query REPL platform application is also available at `./examples/query-playgro Running `yarn build` at root will automatically update the example app's copy, and running `yarn start` will build the runtime and then start the example. -A [`DHIS2 App Platform`](https://platform.dhis2.nu) example is available at [./examples/query-playground](./examples/query-playground). This is a full, deployable DHIS2 application and a live standalone version is available at [runtime.dhis2.nu/playground](https://runtime.dhis2.nu/playground) +A [`DHIS2 App Platform`](https://platform.dhis2.nu) example is available at [./examples/query-playground](./examples/query-playground). This is a full, deployable DHIS2 application and a live standalone version is available at [every play instance](https://play.dhis2.org), such as the `dev` instance [play.dhis2.org/dev](https://play.dhis2.org/dev/api/apps/query-playground/index.html). ## Release From 14bce7bce51d54835bab2839f2b3bb65c36597fc Mon Sep 17 00:00:00 2001 From: Rene Pot Date: Wed, 8 Nov 2023 22:22:22 +0100 Subject: [PATCH 5/5] docs: change docs build --- docs/index.html | 18 ++++++++++++++++++ package.json | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 docs/index.html diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 000000000..4fb409912 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,18 @@ + + + + + Redirecting to Developer Portal + + +

Redirecting to Developer Portal...

+ + + + diff --git a/package.json b/package.json index 22786c650..8093f3ff4 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "test": "yarn test:services && yarn test:runtime", "format": "d2-style apply js --all --no-stage && d2-style apply text --all --no-stage", "start": "yarn build && cd examples/query-playground && yarn start", - "docs:build": "d2-utils-docsite build ./docs -o ./dist && yarn build:playground", + "docs:build": "mkdir -p dist && cp docs/index.html dist/ && yarn build:playground", "docs:serve": "d2-utils-docsite serve ./docs -o ./dist", "lint": "d2-style check js && d2-style check text" },