Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • documentation/doc
  • PhilH/doc
  • louis.csn/doc
  • fabien4vo/doc
  • rngadam/doc
  • anastasia/doc
6 results
Show changes
Showing
with 447 additions and 142 deletions
...@@ -32,6 +32,7 @@ templates_path = [] ...@@ -32,6 +32,7 @@ templates_path = []
exclude_patterns = [] exclude_patterns = []
autosectionlabel_prefix_document = True
# -- Options for HTML output ------------------------------------------------- # -- Options for HTML output -------------------------------------------------
......
...@@ -23,8 +23,9 @@ This component uses the following mixins: ...@@ -23,8 +23,9 @@ This component uses the following mixins:
Please check their documentation to know more about their capabilities. Please check their documentation to know more about their capabilities.
Attributes
---------- Specific attributes
-------------------
``permission`` ``permission``
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
...@@ -35,10 +36,19 @@ Attributes ...@@ -35,10 +36,19 @@ Attributes
Displays the element if the user has not the specified right Displays the element if the user has not the specified right
Possible values: Possible values:
- `acl:Read <https://github.com/solid/web-access-control-spec#aclread>`__ - `acl:Read <https://github.com/solid/web-access-control-spec#aclread>`__
- `acl:Write <https://github.com/solid/web-access-control-spec#aclwrite>`__ - `acl:Write <https://github.com/solid/web-access-control-spec#aclwrite>`__
- `acl:Append <https://github.com/solid/web-access-control-spec#aclappend>`__ - `acl:Append <https://github.com/solid/web-access-control-spec#aclappend>`__
- `acl:Control <https://github.com/solid/web-access-control-spec#aclcontrol>`__ - `acl:Control <https://github.com/solid/web-access-control-spec#aclcontrol>`__
Mixin attributes
-----------------
**From store-mixin :**
.. include:: ../Mixins/store-mixin.rst
:start-line: 21
:end-before: Events
\ No newline at end of file
.. _sib-auth: .. _sib-auth:
sib-auth sib-auth
================ ========
Allows your users to login via a given OIDC provider. Allows your users to login via a given OIDC provider.
Installation Installation
-------------- --------------
Initialize ``sib-auth`` in your HTML file: Initialize ``sib-auth`` in your HTML file :
.. code:: html .. code:: html
...@@ -19,7 +19,7 @@ Installation ...@@ -19,7 +19,7 @@ Installation
</sib-auth> </sib-auth>
`You'll find here the detail of the attributes configuration. <https://github.com/IdentityModel/oidc-client-js/wiki#usermanager>`__ `You'll find here the detail of the attributes configuration. <https://github.com/IdentityModel/oidc-client-js/wiki#usermanager>`__
Set an OIDC provider to your server Set an OIDC provider to your server
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -90,7 +90,7 @@ Example: ...@@ -90,7 +90,7 @@ Example:
</sib-auth> </sib-auth>
Methods Methods
------------------ -------
``login`` ``login``
~~~~~~~~~ ~~~~~~~~~
......
...@@ -23,6 +23,27 @@ This component uses the following mixins: ...@@ -23,6 +23,27 @@ This component uses the following mixins:
Please check their documentation to know more about their capabilities. Please check their documentation to know more about their capabilities.
Mixin attributes
-----------------
**From list-mixin :**
.. include:: ../Mixins/list-mixin.rst
:start-line: 25
**From next-mixin :**
.. include:: ../Mixins/next-mixin.rst
:start-line: 21
**From store-mixin :**
.. include:: ../Mixins/store-mixin.rst
:start-line: 21
:end-before: Events
Events Events
------- -------
......
...@@ -21,8 +21,8 @@ This component uses the following mixin: ...@@ -21,8 +21,8 @@ This component uses the following mixin:
Please check their documentation to know more about its capabilities. Please check their documentation to know more about its capabilities.
Attributes Specific attributes
---------- -------------------
``data-src`` ``data-src``
~~~~~~~~~~~~ ~~~~~~~~~~~~
...@@ -32,13 +32,19 @@ Attributes ...@@ -32,13 +32,19 @@ Attributes
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
The text to display on the delete button. The text to display on the delete button.
``confirmation-message``
~~~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.13*
**Migrated to the validation mixin page in version 0.16**
Add this attribute to create a dialog box linked with the button of the solid-delete. Mixin attributes
Its value matches the message displayed in the dialog box. -----------------
**From next-mixin :**
.. include:: ../Mixins/next-mixin.rst
:start-line: 21
**From validation-mixin :**
.. include:: ../Mixins/validation-mixin.rst
:start-line: 17
Events Events
......
...@@ -29,7 +29,6 @@ Mixins ...@@ -29,7 +29,6 @@ Mixins
------ ------
This component uses the following mixins: This component uses the following mixins:
* :ref:`required-mixin <required-mixin>`
* :ref:`counter-mixin <counter-mixin>` * :ref:`counter-mixin <counter-mixin>`
* :ref:`federation-mixin <federation-mixin>` * :ref:`federation-mixin <federation-mixin>`
* :ref:`filter-mixin <filter-mixin>` * :ref:`filter-mixin <filter-mixin>`
...@@ -38,6 +37,8 @@ This component uses the following mixins: ...@@ -38,6 +37,8 @@ This component uses the following mixins:
* :ref:`list-mixin <list-mixin>` * :ref:`list-mixin <list-mixin>`
* :ref:`next-mixin <next-mixin>` * :ref:`next-mixin <next-mixin>`
* :ref:`paginate-mixin <paginate-mixin>` * :ref:`paginate-mixin <paginate-mixin>`
* :ref:`required-mixin <required-mixin>`
* :ref:`paginate-mixin <server-pagination-mixin>`
* :ref:`sorter-mixin <sorter-mixin>` * :ref:`sorter-mixin <sorter-mixin>`
* :ref:`store-mixin <store-mixin>` * :ref:`store-mixin <store-mixin>`
* :ref:`widget-mixin <widget-mixin>` * :ref:`widget-mixin <widget-mixin>`
...@@ -45,24 +46,88 @@ This component uses the following mixins: ...@@ -45,24 +46,88 @@ This component uses the following mixins:
Please check their documentation to know more about their capabilities. Please check their documentation to know more about their capabilities.
Attributes Specific attributes
---------- -------------------
``fields`` ``fields``
~~~~~~~~~~ ~~~~~~~~~~
By default, all displayed fields are direct children of List of fields displayed.
``<solid-display>``. Make sure you don’t give your set the same name as
a field as it would result in an infinite loop. By default, all displayed fields are direct children of ``<solid-display>``.
More details on its use below (in **widget-mixin attributes**).
``child-[field]`` ``child-[field]``
~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
add attribute ``[field]`` to all children. Add attribute ``[field]`` to all children.
Mixin attributes
-----------------
**From counter-mixin :**
.. include:: ../Mixins/counter-mixin.rst
:start-line: 17
**From filter-mixin :**
.. include:: ../Mixins/filter-mixin.rst
:start-line: 18
**From grouper-mixin :**
.. include:: ../Mixins/grouper-mixin.rst
:start-line: 18
**From highlighter-mixin :**
.. include:: ../Mixins/highlighter-mixin.rst
:start-line: 17
**From list-mixin :**
.. include:: ../Mixins/list-mixin.rst
:start-line: 25
**From next-mixin :**
.. include:: ../Mixins/next-mixin.rst
:start-line: 21
**From paginate-mixin :**
.. include:: ../Mixins/paginate-mixin.rst
:start-line: 17
**From required-mixin :**
.. include:: ../Mixins/required-mixin.rst
:start-line: 17
**From sorter-mixin :**
.. include:: ../Mixins/sorter-mixin.rst
:start-line: 17
**From store-mixin :**
.. include:: ../Mixins/store-mixin.rst
:start-line: 21
:end-before: Events
**From widget-mixin :**
.. include:: ../Mixins/widget-mixin.rst
:start-line: 18
Widgets Widgets
------- -------
By default, the widget used is ``<solid-display-div>``. Cf the
`Widget <https://docs.startinblox.com/import_documentation/Widgets/Reference.html>`__ page for more info. By default, the widget used is ``<solid-display-div>``. Cf the
:ref:`Widget <reference>` page for more info.
Events Events
......
...@@ -29,19 +29,24 @@ This component uses the following mixins: ...@@ -29,19 +29,24 @@ This component uses the following mixins:
Please check their documentation to know more about their capabilities. Please check their documentation to know more about their capabilities.
Attributes
---------- Specific attributes
-------------------
``fields`` ``fields``
~~~~~~~~~~ ~~~~~~~~~~
List of fields used to perform the search. List of fields used to perform the search.
More details on its use below (in **widget-mixin attributes**).
.. _label-field-sfs:
``label-[field]`` ``label-[field]``
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
When displaying a form, the default labels are the fields names of the model. When displaying a form, the default labels are the fields names of the model.
If you want something fancier, you can set this attribute. If you want something fancier, you can set this attribute.
i.e. ``label-username="Your name"`` i.e. ``label-username="Your name"``
.. _submit-button-sfs:
``submit-button`` ``submit-button``
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
*Available from version 0.13* *Available from version 0.13*
...@@ -49,12 +54,19 @@ Attributes ...@@ -49,12 +54,19 @@ Attributes
Text of the submit button to create in the search form. If the attribute is not defined, Text of the submit button to create in the search form. If the attribute is not defined,
no button will be added and the form will trigger the search on change. no button will be added and the form will trigger the search on change.
.. _class-submit-button-sfs:
``class-submit-button``
~~~~~~~~~~~~~~~~~~~~~~~
Define the ``class`` of the ``div`` containing the submit button.
.. _range-field-sfs:
``range-[field]`` ``range-[field]``
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
URL of a container which list the accepted values URL of a container which list the accepted values
for the field ``[field]``. It’s particularly useful with a dropdown for the field ``[field]``. It’s particularly useful with a dropdown or multipleselect
field. field.
.. _enum-field-sfs:
``enum-[field]`` ``enum-[field]``
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
*Available from version 0.13* *Available from version 0.13*
...@@ -70,6 +82,7 @@ Attributes ...@@ -70,6 +82,7 @@ Attributes
* ``enum-[field]="value1 = a, value2 = b, value3 = c"``: each value will be displayed * ``enum-[field]="value1 = a, value2 = b, value3 = c"``: each value will be displayed
and "a", "b", "c" will be loaded in value attribute. and "a", "b", "c" will be loaded in value attribute.
.. _start-value-field:
``start-value-[field]`` ``start-value-[field]``
~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.15* *Available from version 0.15*
...@@ -78,6 +91,7 @@ Attributes ...@@ -78,6 +91,7 @@ Attributes
Only usable with ``solid-form-rangedate`` and ``solid-form-rangenumber``. Only usable with ``solid-form-rangedate`` and ``solid-form-rangenumber``.
In ``solid-form-rangedate``, it can be defined to ``today``. In ``solid-form-rangedate``, it can be defined to ``today``.
.. _end-value-field:
``end-value-[field]`` ``end-value-[field]``
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.15* *Available from version 0.15*
...@@ -86,6 +100,7 @@ Attributes ...@@ -86,6 +100,7 @@ Attributes
Only usable with ``solid-form-rangedate`` and ``solid-form-rangenumber``. Only usable with ``solid-form-rangedate`` and ``solid-form-rangenumber``.
In ``solid-form-rangedate``, it can be defined to ``today``. In ``solid-form-rangedate``, it can be defined to ``today``.
.. _autocomplete-field-sfs:
``autocomplete-[field]`` ``autocomplete-[field]``
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.15* *Available from version 0.15*
...@@ -93,10 +108,81 @@ Attributes ...@@ -93,10 +108,81 @@ Attributes
Equal to the value ``off``, it cancels the automatic entry of values in the relevant ``[field]``. Equal to the value ``off``, it cancels the automatic entry of values in the relevant ``[field]``.
It can be added to ``inputs``, ``textarea`` and ``select``. It can be added to ``inputs``, ``textarea`` and ``select``.
.. _search-placeholder-field:
``search-placeholder-[field]``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.17*
Allows to modify "searchPlaceholder" displayed in the search bar (from SlimSelect plugin).
Its value by default is "Search" in English, "Rechercher" in French.
**It works only with the autocompletion feature.**
.. _search-text-field:
``search-text-[field]``
~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.17*
Allows to modify "searchText" displayed when no value is found (from SlimSelect plugin).
Its value by default is "No result" in English, "Aucun résultat" in French.
**It works only with the autocompletion feature.**
.. code:: html
<solid-form-search
id="filter-multiselectautocomp"
fields="skills"
widget-skills="solid-form-multipleselect-autocompletion-placeholder"
placeholder-skills="Please, pick a value"
search-text-skills="Nothing found"
search-placeholder-skills="Searching..."
></solid-form-search>
<solid-display
data-src="data/list/users.jsonld"
fields="username, skills"
multiple-skills
filtered-by="filter-multiselectautocomp"
></solid-display>
.. _auto-range-field:
``auto-range-[field]``
~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.17*
Dynamically populates a dropdown based on the values of the ``solid-display``(s) associated.
For each ``solid-display``, it will look for its ``field`` values, and add them to the dropdown.
Each value is displayed only once.
``field`` can target a ``container`` or a ``resource``.
In this example below, ``auto-range-skills ``attribute catches all skill values for all users in the ``data-src`` `data/list/users` and displays in the dropdown all skills once :
.. code:: html
<solid-form-search
id="filter-autorange"
fields="skills"
auto-range-skills
></solid-form-search>
<solid-display
data-src="data/list/users.jsonld"
fields="username, skills"
multiple-skills
filtered-by="filter-autorange"
></solid-display>
Mixin attributes
-----------------
**From widget-mixin :**
.. include:: ../Mixins/widget-mixin.rst
:start-line: 18
Widgets Widgets
------- -------
By default, the widget used is ``<solid-form-label-text>``. Cf the By default, the widget used is ``<solid-form-label-text>``. Cf the
`Widget Form <https://docs.startinblox.com/import_documentation/Widgets/form-widgets.html>`__ page for more info. :ref:`Widget <reference>` page for more info.
Events Events
......
...@@ -2,14 +2,31 @@ ...@@ -2,14 +2,31 @@
solid-form solid-form
========== ==========
Receives the URL of a ressource via its ``data-src`` attribute, and The `solid-form` component serves dual purposes: editing existing resources
displays a form to edit the resource. If given the URL of a container of and creating new resources within a container.
ressources, and displays a creation form to add a resource to the
container.
Editing a Resource
-------------------
The `solid-form` component receives the URL of a resource via its `data-src` attribute
and displays a form for editing the resource.
.. code:: html
<solid-form data-src="http://example.com/resource/123/"></solid-form>
Creating a Resource
-------------------
If provided with the URL of a container of resources, the `solid-form` component displays
a form for creating a new resource and adding it to the container.
.. code:: html .. code:: html
<solid-form data-src="http://server/todos/"></solid-form> <solid-form data-src="http://example.com/container/"></solid-form>
Mixins Mixins
------ ------
...@@ -20,50 +37,44 @@ This component uses the following mixins: ...@@ -20,50 +37,44 @@ This component uses the following mixins:
* :ref:`validation-mixin <validation-mixin>` * :ref:`validation-mixin <validation-mixin>`
* :ref:`widget-mixin <widget-mixin>` * :ref:`widget-mixin <widget-mixin>`
Please check their documentation to know more about their capabilities. Please refer to their documentation for more details about their capabilities.
Attributes
----------
``fields`` Specific attributes
~~~~~~~~~~ -------------------
List of the fields used to create the form (by default, all of them are used).
``label-[field]`` .. _autocomplete-field-sf:
~~~~~~~~~~~~~~~~~ ``autocomplete-[field]``
When displaying a form, the default labels are the fields names of the model. ~~~~~~~~~~~~~~~~~~~~~~~~
If you want something fancier, you can set this attribute. *Available from version 0.15*
i.e. ``label-username="Your name"``
``naked`` When set to ``off``, it disables the automatic entry of values in the specified ``[field]``.
~~~~~~~~~ This attribute can be added to ``inputs``, ``textarea`` and ``select``.
When the attribute is set, the submit button will be
removed. It’s particularly useful to prevent the nested forms to
display their own submit button.
``upload-url-[field]``
~~~~~~~~~~~~~~~~~~~~~~
URL to upload file for field ``[field]``, it
automatically set ``widget-[field]`` to ``solid-form-file`` if net defined.
It’s particularly useful with a dropdown field.
``submit-button`` .. _autosave:
~~~~~~~~~~~~~~~~~ ``autosave``
Text of the submit button of the form. ~~~~~~~~~~~~
*Available from version 0.16*
``range-[field]`` If this attribute is defined, each change in an input will trigger a request to update the resource.
~~~~~~~~~~~~~~~~~ This attribute works only when editing resources, not creating them.
URL of a container which list the accepted values
for the field ``[field]``. It’s particularly useful with a dropdown
field. .. _class-submit-button-sf:
``class-submit-button``
~~~~~~~~~~~~~~~~~~~~~~~
Define the ``class`` of the ``div`` containing the submit button.
.. _enum-field-sf:
``enum-[field]`` ``enum-[field]``
~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~
*Available from version 0.13* *Available from version 0.13*
List of values of your choice for the field ``[field]``. Specifies a list of values for the specified ``[field]``.
They have to be filled manually and must be separated by commas. These values must be be filled manually and separated by commas.
It’s particularly useful with a dropdown or radio field. This is particularly useful for dropdown or radio fields.
Two formats are possible: Two formats are possible:
* ``enum-[field]="value 1, value 2, value 3"`` : each value will be displayed * ``enum-[field]="value 1, value 2, value 3"`` : each value will be displayed
...@@ -72,90 +83,158 @@ Attributes ...@@ -72,90 +83,158 @@ Attributes
* ``enum-[field]="value1 = a, value2 = b, value3 = c"``: each value will be displayed * ``enum-[field]="value1 = a, value2 = b, value3 = c"``: each value will be displayed
and "a", "b", "c" will be loaded in value attribute. and "a", "b", "c" will be loaded in value attribute.
``fields``
~~~~~~~~~~
Specifies the list of fields used to create the form. By default, all fields are used.
More details can be found in the **widget-mixin attributes** section
.. _label-field-sf:
``label-[field]``
~~~~~~~~~~~~~~~~~
When displaying a form, the default labels are the field names of the model.
To customize a label, use this attribute, i.e. ``label-username="Your name"``
.. _max-field:
``max-[field]``
~~~~~~~~~~~~~~~
Specifies the maximum value for the specified ``[field]``.
This attribute works only with ``solid-form-number`` and ``solid-form-time`` widgets.
.. _maxlength-field:
``maxlength-[field]``
~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.16*
Specifies the maximum number of characters that can be typed for the specified ``[field]``.
This attribute works only with ``solid-form-text``, ``solid-form-email`` or ``solid-form-password`` and ``solid-form-textarea`` widgets.
.. _min-field:
``min-[field]``
~~~~~~~~~~~~~~~
Specifies the minimum value for the specified ``[field]``.
This attribute works only with ``solid-form-number`` and ``solid-form-time`` widgets.
.. _minlength-field:
``minlength-[field]``
~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.16*
Specifies the minimum number of characters that can be typed for the specified ``[field]``.
This attribute works only with ``solid-form-text``, ``solid-form-email`` or ``solid-form-password`` and ``solid-form-textarea`` widgets.
.. _naked:
``naked``
~~~~~~~~~
When set, this attribute removes the submit button. This is particularly useful to prevent the nested forms to
display their own submit button.
.. _order-asc-field:
.. _order-desc-field:
``order-asc-[field]`` or ``order-desc-[field]`` ``order-asc-[field]`` or ``order-desc-[field]``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name of the field used to order the range list ``[field]``. Specifies the field used to order the range list ``[field]``.
i.e. ``order-asc-users="username"``
.. _partial:
``partial`` ``partial``
~~~~~~~~~~~ ~~~~~~~~~~~
Add this attribute when the form does not include Use this attribute when the form does not include all the fields of the resource that you want to update.
all the fields of the resource to update. This indicates that only the provided fields should be updated, leaving the unspecified fields unchanged.
``min-[field]``
~~~~~~~~~~~~~~~
Add this attribute for the field ``[field]`` to define its minimum value.
It works only with ``solid-form-number`` and ``solid-form-time`` widgets.
``max-[field]``
~~~~~~~~~~~~~~~
Add this attribute for the field ``[field]`` to define its maximum value.
It works only with ``solid-form-number`` and ``solid-form-time`` widgets.
.. _pattern-field:
``pattern-[field]`` ``pattern-[field]``
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~
*Available from version 0.13* *Available from version 0.13*
Add this attribute for the field ``[field]`` to define a regular expression to check the input's value. ASpecifies a regular expression to validate the input's value for the specified ``[field]``.
It works only with a ``solid-form-text`` widget. This attribute works only with a ``solid-form-text`` widget.
``title-[field]``
.. _range-field-sf:
``range-[field]``
~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
*Available from version 0.13* Specifies the URL of a container that lists the accepted values for the specified ``[field]``.
This is particularly useful with a dropdown field.
Add this attribute for the field ``[field]`` to precise extra information about an element.
It works only with a ``solid-form-text`` widget.
``confirmation-message`` .. _required-field:
~~~~~~~~~~~~~~~~~~~~~~~~ ``required-[field]``
~~~~~~~~~~~~~~~~~~~~
Makes the specified ``[field]`` required by adding the ``required`` attribute to the input.
.. _step-field:
``step-[field]``
~~~~~~~~~~~~~~~~
*Available from version 0.16*
Specifies the stepping interval number for the specified ``[field]`` based on the ``min-[field]`` value. This attribute works with:
- ``solid-form-time`` widget : The value is given in seconds (default value is 60).
- ``solid-form-number`` widget : The default value is 1.
.. _submit-button-sf:
``submit-button``
~~~~~~~~~~~~~~~~~
Specifies the text of the form's submit button.
.. _title-field:
``title-[field]``
~~~~~~~~~~~~~~~~~
*Available from version 0.13* *Available from version 0.13*
**Migrated to the validation mixin page in version 0.16**
Add this attribute to create a dialog box linked with the submit button of the solid-form. Adds extra information about the specified ``[field]``.
Its value matches the message displayed in the dialog box. This attribute works only with a ``solid-form-text`` widget.
``autocomplete-[field]``
~~~~~~~~~~~~~~~~~~~~~~~~
*Available from version 0.15*
Equal to the value ``off``, it cancels the automatic entry of values in the relevant ``[field]``. .. _upload-url-field:
It can be added to ``inputs``, ``textarea`` and ``select``. ``upload-url-[field]``
~~~~~~~~~~~~~~~~~~~~~~
Specifies the URL to upload a file for the specified ``[field]``. This attribute automatically sets
``widget-[field]`` to ``solid-form-file`` if not defined.
This is particularly useful with a dropdown field.
``autosave``
~~~~~~~~~~~~
*Available from version 0.16*
If the attribute is defined, each change in an input will trigger a request to update the resource. Mixin attributes
This attribute works only when editing resources, not creating them. -----------------
**From next-mixin :**
``maxlength-[field]`` .. include:: ../Mixins/next-mixin.rst
~~~~~~~~~~~~~~~~~~~~~ :start-line: 21
*Available from version 0.16*
Add this attribute for the field ``[field]`` to define the maximum number of characters that can be typed. **From store-mixin :**
It works only with ``solid-form-text``, ``solid-form-email`` or ``solid-form-password`` and ``solid-form-textarea`` widgets.
``minlength-[field]`` .. include:: ../Mixins/store-mixin.rst
~~~~~~~~~~~~~~~~~~~~~ :start-line: 21
*Available from version 0.16* :end-before: Events
Add this attribute for the field ``[field]`` to define the minimum number of characters that can be typed. **From validation-mixin :**
It works only with ``solid-form-text``, ``solid-form-email`` or ``solid-form-password`` and ``solid-form-textarea`` widgets.
.. include:: ../Mixins/validation-mixin.rst
:start-line: 17
``step-[field]`` **From widget-mixin :**
~~~~~~~~~~~~~~~~
*Available from version 0.16* .. include:: ../Mixins/widget-mixin.rst
:start-line: 18
Add this attribute for the field ``[field]`` to define the stepping interval number to use as constraint validation. Its based on the ``min-[field]`` value.
It works with :
- ``solid-form-time`` widget : Its value is given in seconds (default value is 60).
- ``solid-form-number`` widget : Its default value is 1.
Widgets Widgets
------- -------
By default, the widget used is ``<solid-form-label-text>``. Cf the By default, the widget used is ``<solid-form-label-text>``. Cf the
`Widget <https://docs.startinblox.com/import_documentation/Widgets/Reference.html>`__ page for more info. :ref:`Widget <reference>` page for more info.
Events Events
...@@ -167,4 +246,4 @@ Events ...@@ -167,4 +246,4 @@ Events
``save`` ``save``
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
Triggered when the response of the submit has been received (successfull or not) Triggered when the response of the submit has been received successfully
...@@ -13,16 +13,6 @@ of fields needed to display the resources properly: ...@@ -13,16 +13,6 @@ of fields needed to display the resources properly:
respectively ``http://www.w3.org/2003/01/geo/wgs84_pos#lat`` and ``http://www.w3.org/2003/01/geo/wgs84_pos#lng``. respectively ``http://www.w3.org/2003/01/geo/wgs84_pos#lat`` and ``http://www.w3.org/2003/01/geo/wgs84_pos#lng``.
How to use
----------
The ``solid-map`` module needs to be imported independantly from the core, like following:
.. code:: html
<script type="module" src="https://unpkg.com/@startinblox/core/dist/components/solid-map.js"></script>
Mixins Mixins
------ ------
...@@ -40,8 +30,8 @@ This component uses the following mixins: ...@@ -40,8 +30,8 @@ This component uses the following mixins:
Please check their documentation to know more about their capabilities. Please check their documentation to know more about their capabilities.
Attributes Specific attributes
---------- -------------------
Like for ``solid-display``, fields can be displayed and filters or searching capabilities can be Like for ``solid-display``, fields can be displayed and filters or searching capabilities can be
added to interact with the list of data being displayed. added to interact with the list of data being displayed.
...@@ -50,12 +40,55 @@ added to interact with the list of data being displayed. ...@@ -50,12 +40,55 @@ added to interact with the list of data being displayed.
~~~~~~~~~~ ~~~~~~~~~~
List of the fields to display in a popup which opens when a marker is clicked. If the attribute is not defined, no popup will show up. List of the fields to display in a popup which opens when a marker is clicked. If the attribute is not defined, no popup will show up.
More details on its use below (in **widget-mixin attributes**).
``clustering`` ``clustering``
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~
*Available from version 0.16* *Available from version 0.16*
If this attribute is defined, markers spacially close are grouped in clusters. If this attribute is defined, markers spacially close are grouped in clusters.
Mixin attributes
-----------------
**From counter-mixin :**
.. include:: ../Mixins/counter-mixin.rst
:start-line: 17
**From filter-mixin :**
.. include:: ../Mixins/filter-mixin.rst
:start-line: 18
**From grouper-mixin :**
.. include:: ../Mixins/grouper-mixin.rst
:start-line: 18
**From list-mixin :**
.. include:: ../Mixins/list-mixin.rst
:start-line: 25
**From next-mixin :**
.. include:: ../Mixins/next-mixin.rst
:start-line: 21
**From store-mixin :**
.. include:: ../Mixins/store-mixin.rst
:start-line: 21
:end-before: Events
**From widget-mixin :**
.. include:: ../Mixins/widget-mixin.rst
:start-line: 18
Events Events
------- -------
......
...@@ -53,12 +53,13 @@ Displays a menu and handle the navigation for you. ...@@ -53,12 +53,13 @@ Displays a menu and handle the navigation for you.
- ``use-hash``: If you can't rewrite the URLs on your server, you - ``use-hash``: If you can't rewrite the URLs on your server, you
might want to set this attribute to use ``location.hash`` instead of might want to set this attribute to use ``location.hash`` instead of
``location.pathname`` as URLs. ``location.pathname`` as URLs.
- ``keep-url``: It freezes the URL of all the ``<solid-route>`` included. Usefull to freeze the URL when a pop-up is displayed.
``<solid-route>`` attributes: ``<solid-route>`` attributes:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ``use-id``: indicates that the route takes an id. - ``use-id``: indicates that the route takes an id.
- ``name``: The name of the route. Must match the id of the view - ``name``: The name of the route. Must match the ``data-view`` of the view
that is to be displayed. The same name is used as a url identifier as that is to be displayed. The same name is used as a url identifier as
well. well.
- ``rdf-type``: Can be used as an alternative of ``name``. The - ``rdf-type``: Can be used as an alternative of ``name``. The
...@@ -68,6 +69,12 @@ Displays a menu and handle the navigation for you. ...@@ -68,6 +69,12 @@ Displays a menu and handle the navigation for you.
``<solid-router>``. It is automatically added/removed by ``<solid-router>``. It is automatically added/removed by
``<solid-router>`` and should not be tinkered manually. ``<solid-router>`` and should not be tinkered manually.
``<div data-view=[name]>`` attributes:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ``view-title``: allows to change the ``title`` of the page when a user navigates to this view.
- ``view-description``: allows to change the ``<meta name="description">`` of the page when the user navigates to this view.
solid-link solid-link
---------- ----------
...@@ -78,7 +85,7 @@ solid-link ...@@ -78,7 +85,7 @@ solid-link
- ``data-src``: The resource you want to use in your view. Often - ``data-src``: The resource you want to use in your view. Often
used to show more details about this resource, by adding the used to show more details about this resource, by adding the
``bind-resource`` attribute to a component. ``bind-resources`` attribute to a component (more details about ``bind-resources`` below).
Example: Example:
...@@ -91,7 +98,7 @@ solid-analytics ...@@ -91,7 +98,7 @@ solid-analytics
Manage browsing statistics. Manage browsing statistics.
Sign in on a web analytics service and set ``<sib-analytics>`` inside Sign in on a web analytics service and set ``<solid-analytics>`` inside
``<body>``, at the begining for example. ``<body>``, at the begining for example.
``<solid-analytics>`` accepts the following attributes: ``<solid-analytics>`` accepts the following attributes:
...@@ -102,14 +109,14 @@ Sign in on a web analytics service and set ``<sib-analytics>`` inside ...@@ -102,14 +109,14 @@ Sign in on a web analytics service and set ``<sib-analytics>`` inside
necessary to specify the url attribute. necessary to specify the url attribute.
- ``id``: id of the website on the service. - ``id``: id of the website on the service.
Type ``'debug'`` allow to test sib-analytics. It will display the route Type ``'debug'`` allow to test solid-analytics. It will display the route
on the console each time a navigation is triggered. on the console each time a navigation is triggered.
Example : Example :
.. code:: html .. code:: html
<sib-analytics type="matomo" url="https://matomo.example.com/" id="1234"></sib-analytics> <solid-analytics type="matomo" url="https://matomo.example.com/" id="1234"></solid-analytics>
Interacting with the router Interacting with the router
--------------------------- ---------------------------
...@@ -144,17 +151,14 @@ accordingly. ...@@ -144,17 +151,14 @@ accordingly.
More informations about this in the :ref:`sib-auth documentation<bind-user>`. More informations about this in the :ref:`sib-auth documentation<bind-user>`.
Navigate with an event Navigate with an event
~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
To trigger a route change through javascript, you can trigger a To trigger a route change through javascript, you can trigger a
``requestNavigation`` event anywhere on the DOM. ``requestNavigation`` event anywhere on the DOM.
The detail part must have at least one of these two parameters: The detail part must have at least one of these two parameters:
* ``route``: the name of the route to activate * ``route``: the name of the route to activate
* ``resource``: a resource that will be * ``resource``: a resource that will be passed to all elements with the ``bind-resources`` attribute. If no route name is given, the router tries to find a route that has a ``rdf-type`` that matches the type of the resource.
passed to all elements with the ``bind-resources`` attribute. If no
route name is given, the router tries to find a route that has a
``rdf-type`` that matches the type of the resource.
Events Events
------ ------
......