Skip to content

Commit

Permalink
first batch of essentials for ytp 2.3 related updates
Browse files Browse the repository at this point in the history
  • Loading branch information
miljan-aleksic committed Feb 13, 2025
1 parent 6f15ffb commit 66318d3
Show file tree
Hide file tree
Showing 636 changed files with 7,447 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .vitepress/sidebar.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import ZooEssentialsSidebar from '../src/essentials-for-zoo/sidebar.json';
import YOOthemeProEssentialsSidebar from '../src/essentials-for-yootheme-pro/sidebar.json';
import YOOthemeProEssentialsV22Sidebar from '../src/essentials-for-yootheme-pro/v2.2/sidebar.json';

export default {
'/essentials-for-zoo/': ZooEssentialsSidebar,
'/essentials-for-yootheme-pro/': YOOthemeProEssentialsSidebar,
'/essentials-for-yootheme-pro/v2.2/': YOOthemeProEssentialsV22Sidebar,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
## CSV Action {#csv}

<div class="tm-resource-icon">
<!--@include: ../assets/action-csv.svg-->
</div>

The **CSV Action** creates and deletes records from a local [CSV](https://en.wikipedia.org/wiki/Comma-separated_values) or [TSV](https://en.wikipedia.org/wiki/Tab-separated_values) file. Use it to store data or log submissions.

::: warning Pre-formatted CSV File
This action won't create or format the file by itself, you must provide a path to a pre-existing and pre-formatted file. The file can be as basic as a list of column headers separated by commas set in the very first line, as for example `Name,Comment,Date`.
:::

### Create/Update Record {#csv-record-upsert}

Creates a CSV file record.

| Setting | Description | Required | Dynamic |
| --- | --- | :---: | :---: |
| *File* | The path to the file where the data will be appended. | &#x2713; |
| *Delimeter* | The character used to separate columns data, defaults to a comma (`,`). |
| *Enclosure* | The character used to enclose columns data, defaults to a double-quote (`"`). |
<!--@include: ./common-action-settings.md-->

<!--@include: ./common-action-content-mapping.md-->

### Delete Record {#csv-record-delete}

Deletes a CSV file record.

| Setting | Description | Required | Dynamic |
| --- | --- | :---: | :---: |
| *File* | The path to the file where the data will be appended. | &#x2713; |
| *Delimeter* | The character used to separate columns data, defaults to a comma (`,`). |
| *Enclosure* | The character used to enclose columns data, defaults to a double-quote (`"`). |
| *Column* | The column that will identify the record to be deleted. | &#x2713; |
| *Value* | The value that will identify the record to be deleted. | &#x2713; | &#x2713; |
<!--@include: ./common-action-settings.md-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
## Database Action {#database}

<div class="tm-resource-icon">
<!--@include: ../assets/action-database.svg-->
</div>

The **Database Action** creates, updates and deletes records from a local or external database table. Use it to store data or log submissions.

### Create/Update Record {#database-record-upsert}

Creates or updates a database table record.

| Setting | Description | Required | Dynamic |
| --- | --- | :---: | :---: |
| *Database* | The name of the database to which to connect. | &#x2713; |
| *Custom Connection* | Allows overriding the system default database connection. |
| -- *Host* | The server host IP or address to which to connect, e.g. `127.0.0.1`. | &#x2713; |
| -- *Port* | The port to use for the connection, e.g. `3306`. | &#x2713; |
| -- *Creds* | The username & password which to use for the connection. | &#x2713; |
| *Table* | The name of the database Table to which to connect. | &#x2713; |
| *Update Record* | Should a record be updated instead of created. |
| -- *Associative Key* | The table column key that will be used to associate the record. | &#x2713; |
| -- *Associative Value* | The table column value that will be used to associate the record. | &#x2713; | &#x2713; |
| *Content* | The mapping configuration of the submission data to the table columns. | &#x2713; | &#x2713; |
<!--@include: ./common-action-settings.md-->

<!--@include: ./common-action-content-mapping.md-->

When the Update Record setting is enabled the submitted data will override an existing table record determined by the association configuration. If no associated record is found, a new record will be created instead.

![SaveToDatabase Action Update](./assets/actions/action-database-update.webp)

An example to understand the association is to think of a _Users Table_ with an _ID_ column as its primary key. In such a scenario, the submission data should contain the _user_id_ value representing the user row being updated, the _Associative Key_ should be set as _ID_, and the _Associative Value_ mapped to the Form Submission _user_id_.

### Delete Record {#database-record-delete}

Deletes a database table record.

| Setting | Description | Required | Dynamic |
| --- | --- | :---: | :---: |
| *Database* | The name of the database to which to connect. | &#x2713; |
| *Custom Connection* | Allows overriding the system default database connection. |
| -- *Host* | The server host IP or address to which to connect, e.g. `127.0.0.1`. | &#x2713; |
| -- *Port* | The port to use for the connection, e.g. `3306`. | &#x2713; |
| -- *Creds* | The username & password which to use for the connection. | &#x2713; |
| *Table* | The name of the database Table to which to connect. | &#x2713; |
<!--@include: ./common-action-settings.md-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Google Sheets Action {#google-sheets}

<div class="tm-resource-icon">
<!--@include: ../assets/action-google-sheets.svg-->
</div>

The **Google Sheets Action** creates and deletes records from [Google Sheets](https://workspace.google.com/products/sheets/) spreadsheets. Use it to store data or log submissions.

### Create Record {#google-sheets-record-upsert}

Creates a spreadsheet record.

| Setting | Description | Required | Dynamic |
| --- | --- | :---: | :---: |
| *Account* | The Google account used to connect to Google Drive via OAuth. | &#x2713; |
| *Spreadsheet* | The Google Drive Spreadsheet to which to connect. | &#x2713; |
| *Sheet* | The Spreadsheet Sheet to use as the data destination, defaults to the first sheet. |
| *Value Input Option* | Defines how the data will be interpreted when saved to the spreadsheet. _Raw_, the values will be stored as-is, or _User Entered_, the values will be parsed as if were typed into the UI. |
<!--@include: ./common-action-settings.md-->

<!--@include: ./common-action-content-mapping.md-->

### Delete Record {#google-sheets-record-delete}

Deletes a spreadsheet record.

| Setting | Description | Required | Dynamic |
| --- | --- | :---: | :---: |
| *Account* | The Google account used to connect to Google Drive via OAuth. | &#x2713; |
| *Spreadsheet* | The Google Drive Spreadsheet to which to connect. | &#x2713; |
| *Sheet* | The Spreadsheet Sheet to use as the data destination, defaults to the first sheet. |
| *Column* | The column that will identify the record to be deleted. | &#x2713; |
| *Value* | The value that will identify the record to be deleted. | &#x2713; | &#x2713; |
<!--@include: ./common-action-settings.md-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Webhook Action {#webhook}

<div class="tm-resource-icon">
<!--@include: ../assets/action-webhook.svg-->
</div>

The **Webhook Action** triggers an HTTP request to a third-party service. If the validation fails, no further actions will be executed.

| Setting | Description | Required | Dynamic |
| --- | --- | :---: | :---: |
| *URL* | The URL to send the request to. | &#x2713; | &#x2713; |
| *Method* | The HTTP method to send the request with, `GET`, `POST`, `PUT`, `PATCH`, or `DELETE`. Defaults to `POST`. | &#x2713; | &#x2713; |
| *Format* | The format of the data that will be sent in the request, `JSON`, `XML`, `RAW` or `Form-Data`. Defaults to `JSON`. | | &#x2713; |
| *Body* | The body content that will be sent in the request when the format is `json\|xml\|raw` and the method is not `GET`. | &#x2713; | &#x2713; |
| *Data* | The data that will be sent in the request when the request method is `GET` or the format is `Form-Data`. | &#x2713; | &#x2713; |
<!--@include: ./common-action-settings.md-->
7 changes: 4 additions & 3 deletions src/essentials-for-yootheme-pro/addons/forms/actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ Actions are multi-instance functions that will run sequentially, after a form ha
<!--@include: ./_partials/action-acymailing.md-->
<!--@include: ./_partials/action-airtable.md-->
<!--@include: ./_partials/action-alter.md-->
<!--@include: ./_partials/action-csv.md-->
<!--@include: ./_partials/action-database.md-->
<!--@include: ./_partials/action-download.md-->
<!--@include: ./_partials/action-email.md-->
<!--@include: ./_partials/action-google-sheets.md-->
<!--@include: ./_partials/action-mailchimp.md-->
<!--@include: ./_partials/action-message.md-->
<!--@include: ./_partials/action-redirect.md-->
<!--@include: ./_partials/action-validate.md-->
<!--@include: ./_partials/action-save-csv.md-->
<!--@include: ./_partials/action-save-database.md-->
<!--@include: ./_partials/action-save-google-sheet.md-->
<!--@include: ./_partials/action-webhook.md-->
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "antdesign",
"title": "Ant Design",
"description": "The abstract trees of the Ant Design SVG icons.",
"groups": [
"filled",
"outlined"
],
"version": "4.3.0",
"release": "August, 2023",
"license": "MIT",
"url": "https://github.com/ant-design/ant-design-icons",
"icons": 639
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace ZOOlanders\YOOessentials\Icon;

return [
'extend' => [
IconLoader::class => function (IconLoader $loader, $app) {
$loader->registerCollections('~yooessentials/modules/icon-collections/*/*.json');
},
],
];
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "bootstrap",
"title": "Bootstrap",
"description": "Official Bootstrap SVG icon library with over 2.000 icons.",
"groups": [
"filled"
],
"version": "1.11.3",
"release": "January, 2024",
"license": "MIT",
"url": "https://icons.getbootstrap.com",
"icons": 2051
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "boxicons",
"title": "Boxicons",
"description": "High Quality Web Icons Set.",
"groups": [
"regular",
"solid",
"logos"
],
"version": "2.1.4",
"release": "September, 2022",
"license": "MIT",
"url": "https://boxicons.com",
"icons": 1634
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "coreui",
"title": "CoreUI",
"description": "Simply beautiful open source icons.",
"groups": [
"brand"
],
"version": "3.0.1",
"release": "March, 2023",
"license": "MIT",
"url": "https://icons.coreui.io",
"icons": 1386
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "fa6",
"title": "Font Awesome 6",
"description": "Icons and social logos by Font Awesome, the web's most popular icon set.",
"groups": [
"regular",
"solid",
"brands"
],
"version": "6.6.0",
"release": "July, 2024",
"license": "CC BY 4.0",
"url": "https://fontawesome.com",
"icons": 2050
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "feather",
"title": "Feather",
"description": "Simply beautiful open source icons.",
"version": "4.29.0",
"release": "March, 2022",
"license": "MIT",
"url": "https://feathericons.com",
"icons": 287
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 66318d3

Please sign in to comment.