mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-04-18 15:50:27 +08:00
docs: Add Json schema to blocks, and tranform events from schemas.
This commit is contained in:
parent
dafa6b3b31
commit
b17c07bb66
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Alert
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Alert/Alert.json
|
||||
init_property_values:
|
||||
message: Alerts help to highlight important information.
|
||||
description_content: |
|
||||
@ -33,11 +36,11 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Alert/Alert.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
event_description: |
|
||||
###### onClose
|
||||
Called when Alert close button is clicked.
|
||||
###### afterClose
|
||||
Called after Alert has been closed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Alert/Alert.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Basic Alert
|
||||
properties: '{"message": "Basic Alert"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Anchor
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Anchor/Anchor.json
|
||||
description_content: |
|
||||
Anchor link block. Creates a clickable icon and/ or text.
|
||||
default_properties:
|
||||
@ -31,9 +34,11 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Anchor/Anchor.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
event_description: |
|
||||
###### onClick
|
||||
Called when Anchor is clicked.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Anchor/Anchor.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Basic Anchor
|
||||
properties: '{"title": "Basic Anchor"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Avatar
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Avatar/Avatar.json
|
||||
description_content: |
|
||||
Avatars can be used to represent people or objects. It supports images, Icons, or letters.
|
||||
default_properties:
|
||||
@ -31,9 +34,11 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Avatar/Avatar.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
event_description: |
|
||||
###### onClick
|
||||
Called when Avatar is clicked.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Avatar/Avatar.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Basic Avatar
|
||||
properties: '{"color": "#456789"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Breadcrumb
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Breadcrumb/Breadcrumb.json
|
||||
init_state_values:
|
||||
__type_block.properties.list: string[]
|
||||
__string_arr_block.properties.list:
|
||||
@ -36,9 +39,11 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Breadcrumb/Breadcrumb.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
event_description: |
|
||||
###### onClick
|
||||
Triggered when breadcrumb item is clicked. Provides clicked link and index as args.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Breadcrumb/Breadcrumb.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Basic Breadcrumb
|
||||
properties: '{"list": ["Page One","Page Two"]}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Button
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Button/Button.json
|
||||
description_content: |
|
||||
Button block.
|
||||
default_properties:
|
||||
@ -31,9 +34,11 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Button/Button.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
event_description: |
|
||||
###### onClick
|
||||
Called when the button is clicked.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Button/Button.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Basic button
|
||||
properties: '{"title": "Click me"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: DangerousHtml
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksBasic/src/blocks/DangerousHtml/DangerousHtml.json
|
||||
init_property_values:
|
||||
html: <a href="https://lowdefy.com">Lowdefy Website</a>
|
||||
description_content: |
|
||||
@ -37,6 +40,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksBasic/src/blocks/DangerousHtml/DangerousHtml.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksBasic/src/blocks/DangerousHtml/DangerousHtml.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic DangerousHtml
|
||||
properties: '{"html": "<div style=\"background: #123456; padding: 10px;\"><h1 style=\"color: white;\">A simple white title box</h1></div>"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: DangerousMarkdown
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/DangerousMarkdown/DangerousMarkdown.json
|
||||
init_property_values:
|
||||
content: |
|
||||
## Some Html content:
|
||||
@ -42,6 +45,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/DangerousMarkdown/DangerousMarkdown.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/DangerousMarkdown/DangerousMarkdown.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: DangerousMarkdown headings
|
||||
properties: '{"DOMPurifyOptions": {"ADD_TAGS": ["iframe"]}, "content": "# Markdown with an iframe: \n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/7N7GWdlQJlU\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Descriptions
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Descriptions/Descriptions.json
|
||||
init_state_values:
|
||||
__type_block.properties.column: number
|
||||
__type_block.properties.items: object[]
|
||||
@ -45,6 +48,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Descriptions/Descriptions.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Descriptions/Descriptions.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic descriptions
|
||||
properties: '{"items": {"Location": "South Africa", "Temperature": 22, "Date": "2021-02-02"}}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Divider
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Divider/Divider.json
|
||||
description_content: |
|
||||
A divider line. Can be used horizontally or vertically.
|
||||
default_properties:
|
||||
@ -31,6 +34,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Divider/Divider.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Divider/Divider.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic divider
|
||||
properties: '{"title": "A Divider Title"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Html
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksBasic/src/blocks/Html/Html.json
|
||||
init_property_values:
|
||||
html: <a href="https://lowdefy.com">Lowdefy Website</a>
|
||||
description_content: |
|
||||
@ -35,6 +38,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksBasic/src/blocks/Html/Html.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksBasic/src/blocks/Html/Html.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic Html
|
||||
properties: '{"html": "<div style=\"background: #123456; padding: 10px;\"><h1 style=\"color: white;\">A simple white title box</h1></div>"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Icon
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Icon/Icon.json
|
||||
description_content: |
|
||||
A Icon component. Render Ant Design and other icons
|
||||
default_properties:
|
||||
@ -31,6 +34,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Icon/Icon.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Icon/Icon.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic icon
|
||||
properties: '{"name": "ThunderboltFilled", "color": "orange", "size": 30}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Markdown
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/Markdown/Markdown.json
|
||||
init_property_values:
|
||||
content: |
|
||||
### Welcome to Lowdefy
|
||||
@ -40,6 +43,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/Markdown/Markdown.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/Markdown/Markdown.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Markdown headings
|
||||
properties: '{"content": "# h1 Heading \n## h2 Heading \n### h3 Heading \n#### h4 Heading \n##### h5 Heading \n###### h6 Heading"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: MarkdownWithCode
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/MarkdownWithCode/MarkdownWithCode.json
|
||||
init_property_values:
|
||||
content: |
|
||||
### Some JS Math:
|
||||
@ -55,6 +58,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/MarkdownWithCode/MarkdownWithCode.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksMarkdown/src/blocks/MarkdownWithCode/MarkdownWithCode.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Markdown headings
|
||||
properties: '{"content": "# h1 Heading \n## h2 Heading \n### h3 Heading \n#### h4 Heading \n##### h5 Heading \n###### h6 Heading"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Menu
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Menu/Menu.json
|
||||
description_content: |
|
||||
A menu block used to display page links.
|
||||
default_properties:
|
||||
@ -31,6 +34,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Menu/Menu.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Menu/Menu.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic menu
|
||||
properties: '{}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Paragraph
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Paragraph/Paragraph.json
|
||||
init_state_values:
|
||||
__type_block.properties.copyable: boolean
|
||||
__type_block.properties.ellipsis: boolean
|
||||
@ -38,6 +41,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Paragraph/Paragraph.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Paragraph/Paragraph.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic paragraph
|
||||
properties: '{"content": "Lowdefy simplifies creating software that helps manage internal data - think web apps, admin panels, BI dashboards, CRUD and workflow apps. Within most companies the need exist to connect to a variety of data sources and execute actions on such data. This must be done without compromising data security while respecting complex data integrity rules."}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Progress
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Progress/Progress.json
|
||||
init_property_values:
|
||||
percent: 30
|
||||
description_content: |
|
||||
@ -33,6 +36,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Progress/Progress.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Progress/Progress.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic progress
|
||||
properties: '{"percent": 60, "strokeColor": "#fcb900", "status": "active"}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Skeleton
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Skeleton/Skeleton.json
|
||||
description_content: |
|
||||
Skeleton block to use as a loading place holder.
|
||||
default_properties:
|
||||
@ -31,6 +34,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Skeleton/Skeleton.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Skeleton/Skeleton.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic skeleton
|
||||
properties: '{}'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Statistic
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Statistic/Statistic.json
|
||||
init_state_values:
|
||||
__type_block.properties.value: number
|
||||
__number_block.properties.value: 33.3
|
||||
@ -34,6 +37,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Statistic/Statistic.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Statistic/Statistic.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic statistic
|
||||
properties: '{ "value": 99.5, "prefixIcon": "AlertTwoTone" }'
|
||||
|
@ -17,6 +17,9 @@ _ref:
|
||||
vars:
|
||||
block_type: Title
|
||||
category: display
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Title/Title.json
|
||||
init_state_values:
|
||||
__type_block.properties.value: number
|
||||
__number_block.properties.value: 33.3
|
||||
@ -36,6 +39,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Title/Title.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Title/Title.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
examples:
|
||||
- title: Basic title
|
||||
properties: '{ "content": "Display this title." }'
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: AutoComplete
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/AutoComplete/AutoComplete.json
|
||||
init_property_values:
|
||||
options:
|
||||
- one
|
||||
@ -38,12 +41,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/AutoComplete/AutoComplete.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
###### onPressEnter
|
||||
Triggered when enter is pressed while block is focused.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/AutoComplete/AutoComplete.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Autocomplete input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: ButtonSelector
|
||||
value_type: any
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/ButtonSelector/ButtonSelector.json
|
||||
init_state_values:
|
||||
__type_block.properties.options: object[]
|
||||
__object_arr_block.properties.options:
|
||||
@ -46,10 +49,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/ButtonSelector/ButtonSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/ButtonSelector/ButtonSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: ButtonSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: CheckboxSelector
|
||||
value_type: any[]
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/CheckboxSelector/CheckboxSelector.json
|
||||
init_state_values:
|
||||
__type_block.properties.options: object[]
|
||||
__object_arr_block.properties.options:
|
||||
@ -47,10 +50,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/CheckboxSelector/CheckboxSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/CheckboxSelector/CheckboxSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: CheckboxSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: ChromeColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ChromeColorSelector/ChromeColorSelector.json
|
||||
description_content: |
|
||||
A color selector component similar to the chrome developer tools color selector.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ChromeColorSelector/ChromeColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ChromeColorSelector/ChromeColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: ChromeColorSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: CircleColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/CircleColorSelector/CircleColorSelector.json
|
||||
description_content: |
|
||||
A color selector component which displays the colors in circles.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/CircleColorSelector/CircleColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/CircleColorSelector/CircleColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: CircleColorSelector input
|
||||
|
@ -1,42 +0,0 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
_ref:
|
||||
path: templates/blocks/template.yaml.njk
|
||||
vars:
|
||||
block_type: ColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
description_content: |
|
||||
A color selector component.
|
||||
default_properties:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ColorSelector/ColorSelector.json
|
||||
transformer: templates/blocks/defaultValueTransformer.js
|
||||
properties_getter:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ColorSelector/ColorSelector.json
|
||||
transformer: templates/blocks/propertiesGetterTransformer.js
|
||||
properties_form:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ColorSelector/ColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
|
||||
examples:
|
||||
- title: ColorSelector input
|
||||
properties: '{"defaultColor": "#123456", "width": 170}'
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: ColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ColorSelector/ColorSelector.json
|
||||
description_content: |
|
||||
A color selector component.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ColorSelector/ColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/ColorSelector/ColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: ColorSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: CompactColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/CompactColorSelector/CompactColorSelector.json
|
||||
description_content: |
|
||||
A compact color selector component.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/CompactColorSelector/CompactColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/CompactColorSelector/CompactColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: CompactColorSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: DateRangeSelector
|
||||
value_type: date[]
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateRangeSelector/DateRangeSelector.json
|
||||
description_content: |
|
||||
The `DateRangeSelector` block allows the user to choose a start date and an end date for a date range. The selected range is saved as an array with two date elements, the start and end dates.
|
||||
|
||||
@ -34,10 +37,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateRangeSelector/DateRangeSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateRangeSelector/DateRangeSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: DateRangeSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: DateSelector
|
||||
value_type: date
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateSelector/DateSelector.json
|
||||
description_content: |
|
||||
The `DateSelector` block allows a user to select a date from a calender.
|
||||
|
||||
@ -34,10 +37,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateSelector/DateSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateSelector/DateSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: DateSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: DateTimeSelector
|
||||
value_type: date
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateTimeSelector/DateTimeSelector.json
|
||||
description_content: |
|
||||
The `DateTimeSelector` block allows a user to select a date and a time from a calender.
|
||||
|
||||
@ -36,10 +39,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateTimeSelector/DateTimeSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/DateTimeSelector/DateTimeSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: DateTimeSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: GithubColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/GithubColorSelector/GithubColorSelector.json
|
||||
description_content: |
|
||||
A color selector component similar to the Github color selector.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/GithubColorSelector/GithubColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/GithubColorSelector/GithubColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: GithubColorSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: MonthSelector
|
||||
value_type: date
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/MonthSelector/MonthSelector.json
|
||||
description_content: |
|
||||
The `MonthSelector` block allows a user to select a month. The value is a date object, with day and time values of midnight on the first day of the month GMT.
|
||||
|
||||
@ -34,10 +37,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/MonthSelector/MonthSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/MonthSelector/MonthSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: MonthSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: MultipleSelector
|
||||
value_type: any[]
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/MultipleSelector/MultipleSelector.json
|
||||
init_state_values:
|
||||
__type_block.properties.options: object[]
|
||||
__object_arr_block.properties.options:
|
||||
@ -47,10 +50,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/MultipleSelector/MultipleSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/MultipleSelector/MultipleSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: MultipleSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: NumberInput
|
||||
value_type: number
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/NumberInput/NumberInput.json
|
||||
description_content: |
|
||||
The `NumberInput` allows a user to input a number.
|
||||
default_properties:
|
||||
@ -32,12 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/NumberInput/NumberInput.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
###### onPressEnter
|
||||
Triggered when enter is pressed while block is focused.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/NumberInput/NumberInput.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Number input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: Pagination
|
||||
value_type: object
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Pagination/Pagination.json
|
||||
init_property_values:
|
||||
pageSizeOptions: [10, 20, 30, 40]
|
||||
init_state_values:
|
||||
@ -41,12 +44,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Pagination/Pagination.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onSizeChange
|
||||
Triggered when page size is changed.
|
||||
###### onChange
|
||||
Triggered when current page is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Pagination/Pagination.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Pagination input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: ParagraphInput
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/ParagraphInput/ParagraphInput.json
|
||||
init_state_values:
|
||||
__type_block.properties.copyable: boolean
|
||||
__type_block.properties.ellipsis: boolean
|
||||
@ -40,14 +43,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/ParagraphInput/ParagraphInput.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
###### onCopy
|
||||
Trigger action when copy text is clicked.
|
||||
###### onExpand
|
||||
Trigger action when ellipse expand is clicked.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/ParagraphInput/ParagraphInput.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: ParagraphInput input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: RadioSelector
|
||||
value_type: any
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/RadioSelector/RadioSelector.json
|
||||
init_state_values:
|
||||
__type_block.properties.options: object[]
|
||||
__object_arr_block.properties.options:
|
||||
@ -47,10 +50,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/RadioSelector/RadioSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/RadioSelector/RadioSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: RadioSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: RatingSlider
|
||||
value_type: number
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/RatingSlider/RatingSlider.json
|
||||
description_content: |
|
||||
The `RatingSlider` block allows a user to choose a numerical value on a slider input. It is typically used for scores or ratings. It has the option to have a "Not Applicable" checkbox, which leaves the value as null.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/RatingSlider/RatingSlider.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/RatingSlider/RatingSlider.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: RatingSlider input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: S3UploadButton
|
||||
value_type: object
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/S3UploadButton/S3UploadButton.json
|
||||
description_content: |
|
||||
The `S3UploadButton` block allows a user to to upload a file to AWS S3.
|
||||
|
||||
@ -36,10 +39,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/S3UploadButton/S3UploadButton.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/S3UploadButton/S3UploadButton.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: S3UploadButtonBlock
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: Selector
|
||||
value_type: any
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Selector/Selector.json
|
||||
init_state_values:
|
||||
__type_block.properties.options: object[]
|
||||
__object_arr_block.properties.options:
|
||||
@ -47,10 +50,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Selector/Selector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Selector/Selector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Selector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: SliderColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/SliderColorSelector/SliderColorSelector.json
|
||||
description_content: |
|
||||
A slider color selector component.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/SliderColorSelector/SliderColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/SliderColorSelector/SliderColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: SliderColorSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: SwatchesColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/SwatchesColorSelector/SwatchesColorSelector.json
|
||||
description_content: |
|
||||
A swatches color selector component.
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/SwatchesColorSelector/SwatchesColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/SwatchesColorSelector/SwatchesColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: SwatchesColorSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: Switch
|
||||
value_type: boolean
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Switch/Switch.json
|
||||
description_content: |
|
||||
The `Switch` block is an on/off input. It has a boolean value (true/false).
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Switch/Switch.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/Switch/Switch.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Switch input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: TextArea
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TextArea/TextArea.json
|
||||
init_state_values:
|
||||
__type_block.properties.autoSize: boolean
|
||||
__boolean_block.properties.autoSize: true
|
||||
@ -35,12 +38,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TextArea/TextArea.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
###### onPressEnter
|
||||
Triggered when enter is pressed while block is focused.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TextArea/TextArea.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: TextArea input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: TextInput
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TextInput/TextInput.json
|
||||
description_content: |
|
||||
The `TextInput` block is a single line text input.
|
||||
default_properties:
|
||||
@ -32,12 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TextInput/TextInput.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
###### onPressEnter
|
||||
Triggered when enter is pressed while block is focused.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TextInput/TextInput.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Text input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: TitleInput
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TitleInput/TitleInput.json
|
||||
init_state_values:
|
||||
__type_block.properties.copyable: boolean
|
||||
__type_block.properties.ellipsis: boolean
|
||||
@ -40,14 +43,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TitleInput/TitleInput.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
###### onCopy
|
||||
Trigger action when copy text is clicked.
|
||||
###### onExpand
|
||||
Trigger action when ellipse expand is clicked.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/TitleInput/TitleInput.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: Title input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: TwitterColorSelector
|
||||
value_type: string
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/TwitterColorSelector/TwitterColorSelector.json
|
||||
description_content: |
|
||||
A color selector component similar to the twitter color selector..
|
||||
default_properties:
|
||||
@ -32,10 +35,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/TwitterColorSelector/TwitterColorSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Trigger action when title is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksColorSelectors/src/blocks/TwitterColorSelector/TwitterColorSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: TwitterColorSelector input
|
||||
|
@ -18,6 +18,9 @@ _ref:
|
||||
block_type: WeekSelector
|
||||
value_type: date
|
||||
category: input
|
||||
schema:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/WeekSelector/WeekSelector.json
|
||||
description_content: |
|
||||
The `WeekSelector` block allows a user to select a week. The value is a date object, with day and time values of midnight on the first monday of the week GMT.
|
||||
|
||||
@ -34,10 +37,10 @@ _ref:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/WeekSelector/WeekSelector.json
|
||||
transformer: templates/blocks/propertiesFormTransformer.js
|
||||
|
||||
event_description: |
|
||||
###### onChange
|
||||
Triggered when value is changed.
|
||||
schema_definition:
|
||||
_ref:
|
||||
path: ../blocks/blocksAntd/src/blocks/WeekSelector/WeekSelector.json
|
||||
transformer: templates/blocks/schemaTransformer.js
|
||||
|
||||
examples:
|
||||
- title: WeekSelector input
|
||||
|
42
packages/docs/templates/blocks/schema.yaml.njk
vendored
Normal file
42
packages/docs/templates/blocks/schema.yaml.njk
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
# Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
id: schema_definition
|
||||
type: Box
|
||||
layout:
|
||||
contentGutter: 16
|
||||
blocks:
|
||||
- id: schema_divider_start
|
||||
type: Divider
|
||||
properties:
|
||||
title: '{{ block_type }} JSON Schema Definition'
|
||||
- id: schema_yaml
|
||||
type: MarkdownWithCode
|
||||
properties:
|
||||
content:
|
||||
_nunjucks:
|
||||
template: |
|
||||
{% raw %}
|
||||
```yaml
|
||||
type: object
|
||||
properties:
|
||||
{{ schema | safe | indent(2) }}
|
||||
```
|
||||
{% endraw %}
|
||||
on:
|
||||
schema:
|
||||
_yaml.stringify:
|
||||
- _var: schema_definition.schema
|
||||
- id: schema_divider_end
|
||||
type: Divider
|
25
packages/docs/templates/blocks/schemaTransformer.js
vendored
Normal file
25
packages/docs/templates/blocks/schemaTransformer.js
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
Copyright 2020-2021 Lowdefy, Inc
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
const reviver = (key, value) => {
|
||||
if (key !== 'docs') {
|
||||
return value;
|
||||
}
|
||||
};
|
||||
|
||||
const transformer = (obj) => JSON.parse(JSON.stringify(obj), reviver);
|
||||
|
||||
module.exports = transformer;
|
50
packages/docs/templates/blocks/template.yaml.njk
vendored
50
packages/docs/templates/blocks/template.yaml.njk
vendored
@ -231,6 +231,22 @@ blocks:
|
||||
title: 'style:'
|
||||
- key: events
|
||||
title: 'events:'
|
||||
disabled:
|
||||
_not:
|
||||
_get:
|
||||
key: '0.events'
|
||||
from:
|
||||
_mql.aggregate:
|
||||
on:
|
||||
- events:
|
||||
_get:
|
||||
key: schema.events.properties
|
||||
from:
|
||||
_var: schema
|
||||
pipeline:
|
||||
- $project:
|
||||
events:
|
||||
$objectToArray: $events
|
||||
- key: required
|
||||
title: 'required:'
|
||||
disabled:
|
||||
@ -255,8 +271,32 @@ blocks:
|
||||
- id: event_description
|
||||
type: Markdown
|
||||
properties:
|
||||
content:
|
||||
_var: event_description
|
||||
content:
|
||||
_nunjucks:
|
||||
template: |
|
||||
{% raw %}
|
||||
{% for event in events %}
|
||||
##### {{ event.k }}:
|
||||
{{ event.v.description }}
|
||||
{% endfor %}
|
||||
{% endraw %}
|
||||
on:
|
||||
_get:
|
||||
key: '0'
|
||||
from:
|
||||
_mql.aggregate:
|
||||
on:
|
||||
- events:
|
||||
_get:
|
||||
key: schema.events.properties
|
||||
from:
|
||||
_var: schema
|
||||
pipeline:
|
||||
- $project:
|
||||
events:
|
||||
$objectToArray: $events
|
||||
|
||||
|
||||
required:
|
||||
blocks:
|
||||
- id: block.required
|
||||
@ -289,3 +329,9 @@ blocks:
|
||||
block_type: {{ block_type }}
|
||||
examples:
|
||||
_var: examples
|
||||
- _ref:
|
||||
path: templates/blocks/schema.yaml.njk
|
||||
vars:
|
||||
block_type: {{ block_type }}
|
||||
schema_definition:
|
||||
_var: schema_definition
|
||||
|
Loading…
x
Reference in New Issue
Block a user