diff --git a/source/import_documentation/mixins.rst b/source/import_documentation/mixins.rst new file mode 100644 index 0000000000000000000000000000000000000000..3c8f191840efeb4387e318f0d2285138a6875ae2 --- /dev/null +++ b/source/import_documentation/mixins.rst @@ -0,0 +1,92 @@ +Features +######### +We call "mixins" features for SIB components. Basicly they provide attribute to it. + +List +===== + + [Description] + + Attributes available: + -------------------- + + +------------+-----------------+---------+----------------------------------------+ + | Name | expected | Default | Description | + +=======+=====================+=========+=========================================+ + | order-by | | | | + +-----------+-----------------+---------+-----------------------------------------+ + | counter | | | | + +-----------+-----------------+---------+-----------------------------------------+ + + + Used in components: + ------------------- + + * link to `Sib-Display <SiB-Display>`__ + * link to `Sib-Form <SiB-Form>`__ + +Store +===== + + [Description] + + Attributes available: + -------------------- + + +------------+-----------------+---------+----------------------------------------+ + | Name | expected | Default | Description | + +=======+=====================+=========+=========================================+ + | nested-field | | | | + +-----------+-----------------+---------+-----------------------------------------+ + | | | | | + +-----------+-----------------+---------+-----------------------------------------+ + + + Used in components: + ------------------- + + * link to `Sib-Display <SiB-Display>`__ + * link to `Sib-Form <SiB-Form>`__ + +Events +###### + + Some event are available on specific wiget. You'll find corresponding events for your components in its documentation. + + +------------+-----------------+---------+----------------------------------------+ + | Event name | Parameters | Fired by | Fired when | + +=======+=====================+=========+=========================================+ + | `resourceSelect` | `{detail:{resource}}` | `sib-display`, `sib-calendar`, `sib-map` | The user clicks an child in the list, with the resource as a detail of the event. | + +-----------+-----------------+---------+-----------------------------------------+ + | `populate` | `{detail:{resource}}` | `sib-display`, `sib-form`, `sib-calendar`, `sib-map` | The component got and displayed all its datas. | + +-----------+-----------------+---------+-----------------------------------------+ + | `save` | `{detail:{resource}}` | `sib-form` | The form has saved successfully. | + +-----------+-----------------+---------+-----------------------------------------+ + + + Examples + ======== + + Populate + -------- + Use to do something if and when the element is generated. + + .. code:: js + + element.addEventListener("populate", event => { + // Do something when the element is generated. + }) + + + Save + ---- + Use to do something when a form is successfully saved. + + .. code:: js + + form.addEventListener("save", event => { + // Do something when the form has been successfully saved. + }); + + + diff --git a/source/index.rst b/source/index.rst index 61cd6a67ae2989d91e788701f13f308dc41449df..71f7b71fa23d6410767132a13010ed291bee7262 100644 --- a/source/index.rst +++ b/source/index.rst @@ -21,7 +21,8 @@ Welcome to Startinblox's documentation! import_documentation/install-sib-server import_documentation/develop-sib-ldp-packages import_documentation/server-architecture - import_documentation/core-framework-architecture + +.. import_documentation/core-framework-architecture .. import_documentation/component-architecture @@ -48,6 +49,13 @@ Welcome to Startinblox's documentation! import_documentation/Components/SiB-Map import_documentation/Components/SiB-Ac-Checker import_documentation/Components/SiB-Widget + + .. toctree:: + :maxdepth: 2 + :caption: Mixins: + + import_documentation/Components/mixins + .. toctree:: :maxdepth: 2