Files
sqlpage--sqlpage/examples/official-site/sqlpage/migrations/63_modal.sql
T
wehub-resource-sync d718c5a372
CI / compile_and_lint (push) Failing after 0s
CI / docker_build (linux/amd64, -linux-amd64-duckdb, duckdb) (push) Failing after 0s
CI / docker_build (linux/arm64, -linux-arm64, minimal) (push) Failing after 2s
CI / docker_build (linux/arm64, -linux-arm64-duckdb, duckdb) (push) Failing after 1s
CI / docker_build (linux/amd64, minimal) (push) Failing after 1s
CI / test (, sqlite, sqlite::memory:) (push) Has been skipped
CI / test (mssql, mssql, mssql://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / test (mysql, mysql, mysql://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / test (oracle, oracle, Driver=Oracle 21 ODBC driver;Dbq=//127.0.0.1:1521/FREEPDB1;Uid=root;Pwd=Password123!) (push) Has been skipped
CI / test (postgres, odbc, Driver=PostgreSQL Unicode;Server=127.0.0.1;Port=5432;Database=sqlpage;UID=root;PWD=Password123!, true) (push) Has been skipped
CI / test (postgres, postgres, postgres://root:Password123!@127.0.0.1/sqlpage) (push) Has been skipped
CI / playwright (push) Has been skipped
CI / docker_build (linux/arm/v7, -linux-arm-v7, minimal) (push) Failing after 0s
CI / hurl_examples (push) Failing after 8s
deploy website / deploy_official_site (push) Failing after 1s
CI / hurl (${{ matrix.example }}) (push) Has been skipped
CI / docker_push (duckdb) (push) Has been cancelled
CI / docker_push (minimal) (push) Has been cancelled
CI / windows_test (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:31:57 +08:00

85 lines
4.4 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
INSERT INTO component(name, icon, description, introduced_in_version) VALUES
('modal', 'app-window', '
Defines the a temporary popup box displayed on top of a webpages content.
Useful for displaying additional information, help, or collect data from users.
Modals are closed by default, and can be opened by clicking on a button or link targeting their ID.', '0.36.0');
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'modal', * FROM (VALUES
('title','Description of the modal box.','TEXT',TRUE,FALSE),
('close','The text to display in the Close button.','TEXT',TRUE,TRUE),
('contents','A paragraph of text to display, without any formatting, without having to make additional queries.','TEXT',FALSE,TRUE),
('contents_md','Rich text in the markdown format. Among others, this allows you to write bold text using **bold**, italics using *italics*, and links using [text](https://example.com).','TEXT',FALSE,TRUE),
('scrollable','Create a scrollable modal that allows scroll the modal body.','BOOLEAN',TRUE,TRUE),
('class','Class attribute added to the container in HTML. It can be used to apply custom styling to this item through css.','TEXT',TRUE,TRUE),
('id','ID attribute added to the container in HTML. It can be used to target this item through css or for displaying this item.','TEXT',TRUE,FALSE),
('large','Indicates that the modal box has an increased width.','BOOLEAN',TRUE,TRUE),
('small','Indicates that the modal box has a reduced width.','BOOLEAN',TRUE,TRUE),
('embed','Embed remote content in an iframe.','TEXT',TRUE,TRUE),
('embed_mode','Use "iframe" to display embedded content within an iframe.','TEXT',TRUE,TRUE),
('height','Height of the embedded content.','INTEGER',TRUE,TRUE),
('allow','For embedded content, this attribute specifies the features or permissions that can be used.','TEXT',TRUE,TRUE),
('sandbox','For embedded content, this attribute specifies the security restrictions on the loaded content.','TEXT',TRUE,TRUE),
('style','Applies CSS styles to the embedded content.','TEXT',TRUE,TRUE)
) x;
INSERT INTO example(component, description, properties) VALUES
('modal',
'This example shows how to create a modal box that displays a paragraph of text. The modal window is opened with the help of a button.',
json('[
{"component": "modal","id": "my_modal","title": "A modal box","close": "Close"},
{"contents":"I''m a modal window, and I allow you to display additional information or help for the user."},
{"component": "button"},
{"title":"Open a simple modal","link":"#my_modal"}
]')
),
('modal',
'Example of modal form content',
json('[
{
"component":"modal",
"id":"my_embed_form_modal",
"title":"Embeded form content",
"large":true,
"embed":"/examples/form.sql?_sqlpage_embed"
},
{"component": "button"},
{"title":"Open a modal with a form","link":"#my_embed_form_modal"}
]')
),
('modal',
'A popup modal that contains a chart generated by a separate SQL file. The modal is triggered by links inside a datagrid.',
json('[
{
"component":"modal",
"id":"my_embed_chart_modal",
"title":"Embeded chart content",
"close":"Close",
"embed":"/examples/chart.sql?_sqlpage_embed"
},
{"component": "datagrid"},
{"title":"Chart", "color":"blue", "description":"Revenue", "link":"#my_embed_chart_modal"},
{"title":"Form", "color":"green", "description":"Fill info", "link":"#my_embed_form_modal"},
]')
),
('modal',
'Example of modal video content',
json('[
{
"component":"modal",
"id":"my_embed_video_modal",
"title":"Embeded video content",
"close":"Close",
"embed":"https://www.youtube.com/embed/mXdgmSdaXkg",
"allow":"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share",
"embed_mode":"iframe",
"height":"350"
},
{"component": "text", "contents_md": "Open a [modal with a video](#my_embed_video_modal)"}
]')
);
INSERT INTO parameter(component, name, description, type, top_level, optional) SELECT 'button', * FROM (VALUES
('modal','Display the modal window corresponding to the specified ID.','TEXT',FALSE,TRUE)
) x;