From 33b772eaf46127905421d0f88e8da88536ff1683 Mon Sep 17 00:00:00 2001 From: Matthieu Fesselier <matthieu.fesselier@gmail.com> Date: Thu, 11 Jun 2020 17:37:26 +0200 Subject: [PATCH] fix presentation --- .../Components/SiB-Display.rst | 2 +- source/import_documentation/Store-doc.rst | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/source/import_documentation/Components/SiB-Display.rst b/source/import_documentation/Components/SiB-Display.rst index 9b7172d..4c8be35 100644 --- a/source/import_documentation/Components/SiB-Display.rst +++ b/source/import_documentation/Components/SiB-Display.rst @@ -22,7 +22,7 @@ Mixins This component uses the following mixins: -- `counter-mixin <../Mixins/counter-mixin>`__ +- `counter-mixin <import_documentation/Mixins/counter-mixin>`__ - `federation-mixin <federation-mixin>`__ - `filter-mixin <filter-mixin>`__ - `grouper-mixin <grouper-mixin>`__ diff --git a/source/import_documentation/Store-doc.rst b/source/import_documentation/Store-doc.rst index ea9b329..5f3b137 100644 --- a/source/import_documentation/Store-doc.rst +++ b/source/import_documentation/Store-doc.rst @@ -19,10 +19,12 @@ API Reference Fetch and cache the data for a resource **parameters** + * ``id: string``: uri of the resource * ``context: object`` (optional): used to expand the ``id`` and to access the resource predicates from a compact form **returns** + * ``resource: Proxy`` @@ -32,9 +34,11 @@ Fetch and cache the data for a resource Synchronously returns a resource from the cache. **parameters** + * ``id: string``: uri of the resource **returns** + * ``resource: Proxy``: or ``null`` if the resource is not in cache @@ -44,10 +48,12 @@ Synchronously returns a resource from the cache. Send a POST request to create a resource in a container. When the request succeed, the resource is cleared from the cache, and the components showing it are notified. **parameters** + * ``resource: object``: values of the resource to create * ``id: string``: uri of the container **returns** + * ``resourceId: string``: id of the created resource @@ -57,10 +63,12 @@ Send a POST request to create a resource in a container. When the request succee Send a PUT request to edit a resource. When the request succeed, the resource is cleared from the cache, and the components showing it are notified. **parameters** + * ``resource: object``: new values of the resource to edit * ``id: string``: uri of the resource **returns** + * ``resourceId: string``: id of the edited resource @@ -70,10 +78,12 @@ Send a PUT request to edit a resource. When the request succeed, the resource is Send a PATCH request to edit a resource. When the request succeed, the resource is cleared from the cache, and the components showing it are notified. **parameters** + * ``resource: object``: new values of the resource to edit * ``id: string``: uri of the resource **returns** + * ``resourceId: string``: id of the edited resource @@ -83,10 +93,12 @@ Send a PATCH request to edit a resource. When the request succeed, the resource Send a DELETE request to delete a resource. When the request succeed, the resource is cleared from the cache, and the components showing it are notified. **parameters** + * ``id: string``: uri of the resource to delete * ``context: object`` (optional): used to expand the id if needed **returns** + * ``resourceId: string``: id of the deleted resource @@ -96,6 +108,7 @@ Send a DELETE request to delete a resource. When the request succeed, the resour Make a resource listen another one. When a change is detected on a resource, all the resources which are listening are removed from the cache, and the component showing them are notified to re-render their content. **parameters** + * ``resourceToUpdate``: resource which needs to be updated when another one change * ``resourceToListen``: resource on which listen for changes @@ -106,6 +119,7 @@ Make a resource listen another one. When a change is detected on a resource, all Manually remove a resource from the cache **parameters** + * ``id``: uri of the resource to remove from the cache @@ -114,5 +128,6 @@ Store reactivity The store is reactive. It means that any change you make on a resource in your app will be reflected in the interface automatically. However, there are some limitations: -* If you make some changes on a resource which is in a virtual container, other virtual containers including this resource may not be updated. (ie: POST on circles/1/members does not update users/admin/circles/) -* If a resource a multi nested field is displayed in a component, it may not be updated. (ie: in a `sib-display`, I display `nestedResource.user.name` from `resource`, changing `user` will not update the display) \ No newline at end of file + +* If you make some changes on a resource which is in a virtual container, other virtual containers including this resource may not be updated. (ie: POST on ``circles/1/members`` does not update ``users/admin/circles/``) +* If a resource a multi nested field is displayed in a component, it may not be updated. (ie: in a ``sib-display``, I display ``nestedResource.user.name`` from ``resource``, changing ``user`` will not update the display) \ No newline at end of file -- GitLab