From 4119fd5cf82e6f37d48ded4e03d7f80a8c31db1d Mon Sep 17 00:00:00 2001
From: Manon Bourgognon <manon.bourgognon@epitech.eu>
Date: Tue, 3 Nov 2020 14:41:52 +0100
Subject: [PATCH] Add intro and attributes list for the core

---
 .../Components/Solid-Form-Search.rst          |   1 +
 .../Components/Solid-Form.rst                 |   5 +
 .../Mixins/widget-mixin.rst                   |   2 +-
 .../import_documentation/attributes-list.rst  | 227 ++++++++++++++++++
 .../introduction-framework-documentation.rst  |  22 ++
 source/index.rst                              |   7 +
 6 files changed, 263 insertions(+), 1 deletion(-)
 create mode 100644 source/import_documentation/attributes-list.rst
 create mode 100644 source/import_documentation/introduction-framework-documentation.rst

diff --git a/source/import_documentation/Components/Solid-Form-Search.rst b/source/import_documentation/Components/Solid-Form-Search.rst
index a27ad13..3713eb9 100644
--- a/source/import_documentation/Components/Solid-Form-Search.rst
+++ b/source/import_documentation/Components/Solid-Form-Search.rst
@@ -62,6 +62,7 @@ Attributes
    Two formats are possible:
       * ``enum-xyz="value1, value2, value3"`` : each value will be displayed 
       and loaded in value attribute
+      
       * ``enum-xyz="value1 = a, value2 = b, value3 = c"``: each value will be displayed 
       and "a", "b", "c" will be loaded in value attribute.
 
diff --git a/source/import_documentation/Components/Solid-Form.rst b/source/import_documentation/Components/Solid-Form.rst
index f3d920c..f572ca6 100644
--- a/source/import_documentation/Components/Solid-Form.rst
+++ b/source/import_documentation/Components/Solid-Form.rst
@@ -24,6 +24,10 @@ Please check their documentation to know more about their capabilities.
 Attributes
 ----------
 
+``fields``
+~~~~~~~~~~
+   List of the fields used to create the form (by default, all of them are used).
+
 ``label-xyz``
 ~~~~~~~~~~~~~
    When displaying a form, the default labels are the fields names of the model.
@@ -61,6 +65,7 @@ Attributes
    Two formats are possible:
       * ``enum-xyz="value 1, value 2, value 3"`` : each value will be displayed 
       and loaded in value attribute
+      
       * ``enum-xyz="value1 = a, value2 = b, value3 = c"``: each value will be displayed 
       and "a", "b", "c" will be loaded in value attribute.
 
diff --git a/source/import_documentation/Mixins/widget-mixin.rst b/source/import_documentation/Mixins/widget-mixin.rst
index 83c8c52..565742b 100644
--- a/source/import_documentation/Mixins/widget-mixin.rst
+++ b/source/import_documentation/Mixins/widget-mixin.rst
@@ -87,7 +87,7 @@ Attributes
 
 ``action-[field]``
 ~~~~~~~~~~~~~~~~~~
-
+    Displays a link inside a ``<solid-link>`` tag with ``src`` for the ``data-src`` attribute
 
 ``label-[field]``
 ~~~~~~~~~~~~~~~~~
diff --git a/source/import_documentation/attributes-list.rst b/source/import_documentation/attributes-list.rst
new file mode 100644
index 0000000..eb64e4f
--- /dev/null
+++ b/source/import_documentation/attributes-list.rst
@@ -0,0 +1,227 @@
+List of attributes (core framework)
+===================================
+
+``action-[field]``
+~~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``child-xyz``
+~~~~~~~~~~~~~
+   * :ref:`solid-display <solid-display>`
+
+``class-[field]``
+~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``confirmation-message``
+~~~~~~~~~~~~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``counter-template``
+~~~~~~~~~~~~~~~~~~~~
+   * :ref:`counter-mixin <counter-mixin>`
+
+``data-src``
+~~~~~~~~~~~~
+   * :ref:`solid-display <solid-display>`
+   * :ref:`solid-form <solid-form>`
+   * :ref:`solid-form-search <solid-form-search>`
+   * :ref:`solid-delete <solid-delete>`
+   * :ref:`solid-calendar <solid-calendar>`
+   * :ref:`solid-map <solid-map>`
+   * :ref:`solid-ac-checker <solid-ac-checker>`
+   * :ref:`store-mixin <store-mixin>`
+
+``data-label``
+~~~~~~~~~~~~~~
+   * :ref:`solid-delete <solid-delete>`
+   * :ref:`solid-lang <solid-lang>`
+
+``default-context``
+~~~~~~~~~~~~~~~~~~~
+   * :ref:`store-mixin <store-mixin>`
+
+``default-[field]``
+~~~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``default-widget``
+~~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``editable-[field]``
+~~~~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``empty-value``
+~~~~~~~~~~~~~~~
+   * :ref:`list-mixin <list-mixin>`
+
+``empty-widget``
+~~~~~~~~~~~~~~~~
+   * :ref:`list-mixin <list-mixin>`
+
+``enum-xyz``
+~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+   * :ref:`solid-form-search <solid-form-search>`
+
+``extra-context``
+~~~~~~~~~~~~~~~~~
+   * :ref:`store-mixin <store-mixin>`
+
+``fields``
+~~~~~~~~~~
+   * :ref:`solid-display <solid-display>`
+   * :ref:`solid-form <solid-form>`
+   * :ref:`solid-form-search <solid-form-search>`
+   * :ref:`solid-map <solid-map>`
+   * :ref:`widget-mixin <widget-mixin>`
+
+``filtered-by``
+~~~~~~~~~~~~~~~
+   * :ref:`filter-mixin <filter-mixin>`
+
+``group-by``
+~~~~~~~~~~~~
+   * :ref:`grouper-mixin <grouper-mixin>`
+
+``group-by-widget``
+~~~~~~~~~~~~~~~~~~~
+   * :ref:`grouper-mixin <grouper-mixin>`
+
+``group-class``
+~~~~~~~~~~~~~~~
+   * :ref:`grouper-mixin <grouper-mixin>`
+
+``hightlight-[field]``
+~~~~~~~~~~~~~~~~~~~~~~
+   * :ref:`highlighter-mixin <highlighter-mixin>`
+
+``label-[field]``
+~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``label-xyz``
+~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`   
+   * :ref:`solid-form-search <solid-form-search>`
+
+``lang``
+~~~~~~~~
+   * :ref:`solid-lang <solid-lang>`
+
+``loader-id``
+~~~~~~~~~~~~~
+   * :ref:`store-mixin <store-mixin>`
+
+``max-xyz``
+~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``min-xyz``
+~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``multiple-[field]``
+~~~~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``naked``
+~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``name``
+~~~~~~~~~
+   * :ref:`solid-widget <solid-widget>`
+
+``nested-[field]``
+~~~~~~~~~~~~~~~~~~
+   * :ref:`store-mixin <store-mixin>`
+
+``next``
+~~~~~~~~
+   * :ref:`next-mixin <next-mixin>`
+
+``no-permission``
+~~~~~~~~~~~~~~~~~
+   * :ref:`solid-ac-checker <solid-ac-checker>`
+
+``order-asc``
+~~~~~~~~~~~~~
+   * :ref:`sorter-mixin <sorter-mixin>`
+
+``order-asc-xyz``
+~~~~~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+
+``order-by-random``
+~~~~~~~~~~~~~~~~~~~
+   * :ref:`sorter-mixin <sorter-mixin>`
+
+``order-desc``
+~~~~~~~~~~~~~~
+   * :ref:`sorter-mixin <sorter-mixin>`
+
+``order-desc-xyz``
+~~~~~~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``paginate-by``
+~~~~~~~~~~~~~~~
+   * :ref:`paginate-mixin <paginate-mixin>`
+
+``paginate-loop``
+~~~~~~~~~~~~~~~~~
+   * :ref:`paginate-mixin <paginate-mixin>`
+
+``partial``
+~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``pattern-xyz``
+~~~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``permission``
+~~~~~~~~~~~~~~
+   * :ref:`solid-ac-checker <solid-ac-checker>`
+
+``placeholder-[field]``
+~~~~~~~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``range-xyz``
+~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+   * :ref:`solid-form-search <solid-form-search>`
+
+``required-xyz``
+~~~~~~~~~~~~~~~~
+   * :ref:`required-mixin <required-mixin>`
+
+``(search-fields)`` deprecated
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+   * :ref:`filter-mixin <filter-mixin>`
+
+``submit-button``
+~~~~~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+   * :ref:`solid-form-search <solid-form-search>`
+
+``title-xyz``
+~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``upload-url-xyz``
+~~~~~~~~~~~~~~~~~~
+   * :ref:`solid-form <solid-form>`
+
+``value-[field]``
+~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
+
+``widget-[field]``
+~~~~~~~~~~~~~~~~~~
+   * :ref:`widget-mixin <widget-mixin>`
diff --git a/source/import_documentation/introduction-framework-documentation.rst b/source/import_documentation/introduction-framework-documentation.rst
new file mode 100644
index 0000000..dbff593
--- /dev/null
+++ b/source/import_documentation/introduction-framework-documentation.rst
@@ -0,0 +1,22 @@
+Introduction of the framework documentation
+============================================
+
+In the following sections, the framework's components are detailed.
+
+Base components belong to the core of the framework.
+For each component, the functioning and the minimum content are introduced (and examples are related).
+Then, the accepted mixins, attributes and widgets by the component are listed.
+Finally, events are listed.
+
+As a reminder, components have their own attributes, they can also use attributes of mixins and custom widgets to display data.
+
+The next section is about extend components, they don’t belong to the core of the framework but they remain very used and useful.
+
+In the mixin section, each one has :
+   * a description of its function,
+   * a list of components able to use it,
+   * a list of its attributes (and events if existing).
+
+Then, the widget section presents the API to create widgets and give examples about how to create and use them.
+
+The last section concerns Javascript API.
\ No newline at end of file
diff --git a/source/index.rst b/source/index.rst
index 23a1705..7120500 100644
--- a/source/index.rst
+++ b/source/index.rst
@@ -21,6 +21,13 @@ Welcome to Startinblox's documentation
    import_documentation/server-architecture
    import_documentation/frequent-errors
 
+.. toctree::
+   :maxdepth: 2
+   :caption: Introduction to the core documentation:
+
+   import_documentation/introduction-framework-documentation
+   import_documentation/attributes-list
+
 .. toctree::
    :maxdepth: 2
    :caption: Base components:
-- 
GitLab