1
0
Fork 0
mirror of synced 2024-09-20 11:27:56 +12:00
budibase/packages/builder/src/components/userInterface/temporaryPanelStructure.js

473 lines
14 KiB
JavaScript
Raw Normal View History

2020-05-19 03:32:00 +12:00
import Input from "../common/Input.svelte"
import OptionSelect from "./OptionSelect.svelte"
import Checkbox from "../common/Checkbox.svelte"
import ModelSelect from "components/userInterface/ModelSelect.svelte"
2020-05-19 03:32:00 +12:00
import { all } from "./propertyCategories.js"
2020-05-05 03:07:04 +12:00
export default {
categories: [
{
2020-05-07 21:53:34 +12:00
name: "Basic",
isCategory: true,
children: [
{
_component: "@budibase/standard-components/embed",
icon: "ri-code-line",
name: "Embed",
description: "Embed content from 3rd party sources",
properties: {
design: {
...all,
},
settings: [{ label: "Embed", key: "embed", control: Input }],
},
},
{
2020-04-22 22:52:55 +12:00
_component: "@budibase/standard-components/container",
2020-05-07 21:53:34 +12:00
name: "Container",
description: "This component contains things within itself",
icon: "ri-layout-row-fill",
commonProps: {},
2020-05-07 21:53:34 +12:00
children: [],
properties: {
design: { ...all },
settings: [
{
key: "type",
label: "Type",
control: OptionSelect,
options: [
2020-06-25 03:16:01 +12:00
"article",
"aside",
"details",
"div",
"figure",
"figcaption",
"footer",
"header",
"main",
"mark",
"nav",
"paragraph",
"summary",
],
},
],
},
},
{
2020-05-07 21:53:34 +12:00
name: "Text",
description: "This is a simple text component",
icon: "ri-t-box-fill",
commonProps: {},
children: [
{
2020-05-07 21:53:34 +12:00
_component: "@budibase/standard-components/heading",
name: "Headline",
2020-04-24 00:22:41 +12:00
description: "A component for displaying heading text",
icon: "ri-heading",
2020-05-05 21:02:10 +12:00
properties: {
2020-05-19 03:32:00 +12:00
design: { ...all },
settings: [
{
key: "text",
label: "Text",
2020-05-19 03:32:00 +12:00
control: Input,
},
{
key: "type",
label: "Type",
control: OptionSelect,
options: ["h1", "h2", "h3", "h4", "h5", "h6"],
},
],
2020-04-22 22:52:55 +12:00
},
},
{
2020-05-07 21:53:34 +12:00
_component: "@budibase/standard-components/text",
name: "Paragraph",
2020-04-24 00:22:41 +12:00
description: "A component for displaying paragraph text.",
2020-05-19 03:32:00 +12:00
icon: "ri-paragraph",
properties: {
design: { ...all },
settings: [
{
label: "Text",
key: "text",
2020-05-19 03:32:00 +12:00
control: Input,
},
{
label: "Type",
key: "type",
control: OptionSelect,
options: [
"none",
"bold",
"strong",
"italic",
"emphasis",
"mark",
"small",
"del",
"ins",
"sub",
"sup",
],
},
],
2020-05-19 03:32:00 +12:00
},
},
],
},
2020-04-24 00:22:41 +12:00
{
2020-05-07 21:53:34 +12:00
name: "Input",
2020-04-24 00:22:41 +12:00
description: "These components handle user input.",
icon: "ri-edit-box-fill",
2020-04-24 00:22:41 +12:00
commonProps: {},
children: [
{
2020-05-05 04:13:57 +12:00
_component: "@budibase/standard-components/input",
2020-04-24 00:22:41 +12:00
name: "Textfield",
2020-05-19 03:32:00 +12:00
description:
"A textfield component that allows the user to input text.",
icon: "ri-edit-box-fill",
properties: {
design: { ...all },
settings: [
{ label: "Label", key: "label", control: Input },
{
label: "Type",
key: "type",
control: OptionSelect,
options: ["text", "password"],
},
],
},
2020-04-24 00:22:41 +12:00
},
{
_component: "@budibase/standard-components/checkbox",
name: "Checkbox",
description: "A selectable checkbox component",
icon: "ri-checkbox-fill",
properties: {
design: { ...all },
settings: [{ label: "Label", key: "label", control: Input }],
},
2020-04-24 00:22:41 +12:00
},
{
_component: "@budibase/standard-components/radiobutton",
name: "Radiobutton",
description: "A selectable radiobutton component",
2020-05-19 03:32:00 +12:00
icon: "ri-radio-button-line",
properties: {
design: { ...all },
settings: [{ label: "Label", key: "label", control: Input }],
},
2020-04-24 00:22:41 +12:00
},
{
_component: "@budibase/standard-components/select",
name: "Select",
2020-05-19 03:32:00 +12:00
description:
"A select component for choosing from different options",
icon: "ri-file-list-fill",
properties: {
design: { ...all },
2020-05-26 21:19:04 +12:00
settings: [],
},
2020-05-19 03:32:00 +12:00
},
],
2020-04-24 00:22:41 +12:00
},
{
2020-04-22 22:52:55 +12:00
_component: "@budibase/standard-components/button",
2020-05-19 03:32:00 +12:00
name: "Button",
description: "A basic html button that is ready for styling",
icon: "ri-radio-button-fill",
2020-05-07 21:53:34 +12:00
children: [],
properties: {
design: {
2020-05-26 21:19:04 +12:00
...all,
},
settings: [
{ label: "Text", key: "text", control: Input },
{
label: "Disabled",
key: "disabled",
2020-05-22 01:28:32 +12:00
valueKey: "checked",
control: Checkbox,
},
2020-05-26 21:19:04 +12:00
],
},
},
{
_component: "@budibase/standard-components/image",
name: "Image",
description: "A basic component for displaying images",
icon: "ri-image-fill",
children: [],
properties: {
design: { ...all },
2020-06-09 22:49:06 +12:00
settings: [{ label: "URL", key: "url", control: Input }],
},
},
{
2020-04-24 00:22:41 +12:00
_component: "@budibase/standard-components/icon",
2020-05-19 03:32:00 +12:00
name: "Icon",
description: "A basic component for displaying icons",
icon: "ri-sun-fill",
children: [],
2020-05-20 22:55:25 +12:00
properties: {
design: { ...all },
},
},
{
2020-04-24 00:22:41 +12:00
_component: "@budibase/standard-components/link",
2020-05-19 03:32:00 +12:00
name: "Link",
description: "A basic link component for internal and external links",
icon: "ri-link",
children: [],
2020-05-20 22:55:25 +12:00
properties: {
design: { ...all },
settings: [
{ label: "Text", key: "text", control: Input },
{ label: "Url", key: "url", control: Input },
{
label: "Open New Tab",
key: "openInNewTab",
2020-05-22 01:28:32 +12:00
valueKey: "checked",
2020-05-20 22:55:25 +12:00
control: Checkbox,
},
],
},
2020-05-19 03:32:00 +12:00
},
],
},
{
2020-05-07 21:53:34 +12:00
name: "Blocks",
isCategory: true,
children: [
{
2020-04-22 22:52:55 +12:00
_component: "@budibase/materialdesign-components/BasicCard",
2020-05-19 03:32:00 +12:00
name: "Card",
description:
"A basic card component that can contain content and actions.",
icon: "ri-layout-bottom-fill",
2020-05-07 21:53:34 +12:00
children: [],
properties: {
design: { ...all },
settings: [
{
label: "Heading",
key: "heading",
control: Input,
2020-06-03 01:22:35 +12:00
placeholder: "text",
},
{
label: "Subheading",
key: "subheading",
control: Input,
2020-06-03 01:22:35 +12:00
placeholder: "text",
},
{
label: "Content",
key: "content",
control: Input,
2020-06-03 01:22:35 +12:00
placeholder: "text",
},
{
label: "Image",
key: "imageUrl",
control: Input,
2020-06-03 01:22:35 +12:00
placeholder: "src",
},
2020-06-03 01:22:35 +12:00
],
},
},
{
2020-05-19 03:32:00 +12:00
name: "Login",
2020-06-03 03:46:37 +12:00
_component: "@budibase/standard-components/login",
2020-05-19 03:32:00 +12:00
description:
"A component that automatically generates a login screen for your app.",
icon: "ri-login-box-fill",
children: [],
properties: {
design: { ...all },
settings: [
{
label: "Name",
key: "name",
control: Input,
},
{
label: "Logo",
key: "logo",
control: Input,
},
],
},
},
{
2020-05-19 03:32:00 +12:00
name: "Table",
2020-06-03 03:46:37 +12:00
_component: "@budibase/standard-components/datatable",
2020-05-19 03:32:00 +12:00
description: "A component that generates a table from your data.",
icon: "ri-archive-drawer-fill",
properties: {
design: { ...all },
settings: [{ label: "Model", key: "model", control: ModelSelect }],
},
2020-05-19 03:32:00 +12:00
children: [],
},
{
2020-05-19 03:32:00 +12:00
name: "Form",
description: "A component that generates a form from your data.",
icon: "ri-file-edit-fill",
commonProps: {},
children: [
{
_component: "@budibase/standard-components/dataform",
name: "Form Basic",
icon: "ri-file-edit-fill",
properties: {
design: { ...all },
settings: [
{
label: "Model",
key: "model",
control: ModelSelect,
},
],
},
template: {
component: "@budibase/materialdesign-components/Form",
description: "Form for saving a record",
name: "@budibase/materialdesign-components/recordForm",
},
},
{
_component: "@budibase/standard-components/dataformwide",
name: "Form Wide",
icon: "ri-file-edit-fill",
properties: {
design: { ...all },
settings: [
{
label: "Model",
key: "model",
control: ModelSelect,
},
],
},
},
],
},
2020-05-08 09:15:09 +12:00
{
name: "Chart",
_component: "@budibase/standard-components/datachart",
description: "Shiny chart",
icon: "ri-bar-chart-fill",
properties: {
design: { ...all },
2020-06-04 07:35:30 +12:00
settings: [
{ label: "Model", key: "model", control: ModelSelect },
{
label: "Chart Type",
key: "type",
control: OptionSelect,
2020-06-04 07:38:46 +12:00
options: [
2020-06-04 07:44:35 +12:00
"column2d",
2020-06-04 07:38:46 +12:00
"column3d",
"line",
"area2d",
"bar2d",
"bar3d",
"pie2d",
"pie3d",
"doughnut2d",
"doughnut3d",
"pareto2d",
2020-06-04 07:44:35 +12:00
"pareto3d",
],
2020-06-04 07:35:30 +12:00
},
],
},
2020-05-08 09:15:09 +12:00
children: [],
},
{
name: "Data List",
2020-05-08 09:15:09 +12:00
_component: "@budibase/standard-components/datalist",
description: "Shiny list",
icon: "ri-file-list-fill",
properties: {
design: { ...all },
settings: [{ label: "Model", key: "model", control: ModelSelect }],
},
2020-05-08 09:15:09 +12:00
children: [],
},
2020-06-03 10:26:06 +12:00
{
2020-06-03 20:25:56 +12:00
name: "List",
2020-06-03 10:26:06 +12:00
_component: "@budibase/standard-components/list",
2020-07-02 00:19:14 +12:00
description: "Renders all children once per record, of a given model",
2020-06-03 10:26:06 +12:00
icon: "ri-file-list-fill",
properties: {
design: { ...all },
settings: [{ label: "Model", key: "model", control: ModelSelect }],
},
children: [],
},
2020-07-02 00:19:14 +12:00
{
name: "Record Detail",
_component: "@budibase/standard-components/recorddetail",
description: "Loads a record, using an id from the URL, which can be used with {{ context }}, in children",
icon: "ri-profile-line",
properties: {
design: { ...all },
settings: [{ label: "Model", key: "model", control: ModelSelect }],
},
children: [],
},
2020-05-11 21:28:06 +12:00
{
name: "Map",
_component: "@budibase/standard-components/datamap",
description: "Shiny map",
icon: "ri-map-pin-fill",
2020-05-19 03:32:00 +12:00
properties: { design: { ...all } },
2020-05-11 21:28:06 +12:00
children: [],
},
2020-05-07 21:53:34 +12:00
],
},
2020-05-28 00:21:13 +12:00
{
name: "Layouts",
isCategory: true,
children: [
{
_component: "##builtin/screenslot",
name: "Screenslot",
description:
"This component is a placeholder for the rendering of a screen within a page.",
icon: "ri-crop-2-fill",
properties: { design: { ...all } },
commonProps: {},
2020-05-28 00:21:13 +12:00
children: [],
},
{
name: "Nav Bar",
_component: "@budibase/standard-components/Navigation",
description:
"A component for handling the navigation within your app.",
icon: "ri-navigation-fill",
children: [],
2020-06-04 00:36:39 +12:00
properties: {
design: { ...all },
settings: [
{ label: "Logo URL", key: "logoUrl", control: Input },
{ label: "Title", key: "title", control: Input },
{ label: "Color", key: "color", control: Input },
2020-06-04 00:55:29 +12:00
{ label: "Background", key: "backgroundColor", control: Input },
],
2020-06-04 00:36:39 +12:00
},
2020-05-28 00:21:13 +12:00
},
],
},
2020-05-07 21:53:34 +12:00
],
2020-06-30 06:55:27 +12:00
}