forked from tsai/budibase
75 changed files with 4996 additions and 1679 deletions
@ -0,0 +1,75 @@ |
|||||
|
import { |
||||
|
isPlainObject, isArray, cloneDeep |
||||
|
} from "lodash/fp"; |
||||
|
import { |
||||
|
isRootComponent, getExactComponent |
||||
|
} from "./searchComponents"; |
||||
|
|
||||
|
export const rename = (pages, allComponents, oldname, newname) => { |
||||
|
|
||||
|
pages = cloneDeep(pages); |
||||
|
allComponents = cloneDeep(allComponents); |
||||
|
const changedComponents = []; |
||||
|
|
||||
|
const existingWithNewName = getExactComponent(allComponents, newname); |
||||
|
if(existingWithNewName) return { |
||||
|
allComponents, pages, error: "Component by that name already exists" |
||||
|
}; |
||||
|
|
||||
|
const traverseProps = (props) => { |
||||
|
let hasEdited = false; |
||||
|
if(props._component && props._component === oldname) { |
||||
|
props._component = newname; |
||||
|
hasEdited = true; |
||||
|
} |
||||
|
|
||||
|
for(let propName in props) { |
||||
|
const prop = props[propName]; |
||||
|
if(isPlainObject(prop) && prop._component) { |
||||
|
hasEdited = traverseProps(prop) || hasEdited; |
||||
|
} |
||||
|
if(isArray(prop)) { |
||||
|
for(let element of prop) { |
||||
|
hasEdited = traverseProps(element) || hasEdited; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return hasEdited; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
for(let component of allComponents) { |
||||
|
|
||||
|
if(isRootComponent(component)) { |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
let hasEdited = false; |
||||
|
|
||||
|
if(component.name === oldname) { |
||||
|
component.name = newname; |
||||
|
hasEdited = true; |
||||
|
} |
||||
|
|
||||
|
if(component.inherits === oldname) { |
||||
|
component.inherits = newname; |
||||
|
hasEdited = true; |
||||
|
} |
||||
|
|
||||
|
hasEdited = traverseProps(component.props) || hasEdited; |
||||
|
|
||||
|
if(hasEdited && component.name !== newname) |
||||
|
changedComponents.push(component.name); |
||||
|
} |
||||
|
|
||||
|
for(let pageName in pages) { |
||||
|
const page = pages[pageName]; |
||||
|
if(page.appBody === oldname) { |
||||
|
page.appBody = newname; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
return {allComponents, pages, changedComponents}; |
||||
|
|
||||
|
|
||||
|
} |
||||
@ -0,0 +1,79 @@ |
|||||
|
import { |
||||
|
searchAllComponents, |
||||
|
getExactComponent, |
||||
|
getAncestorProps |
||||
|
} from "../src/userInterface/pagesParsing/searchComponents"; |
||||
|
import { |
||||
|
rename |
||||
|
} from "../src/userInterface/pagesParsing/renameComponent"; |
||||
|
import { allComponents } from "./testData"; |
||||
|
|
||||
|
describe("rename component", () => { |
||||
|
it("should change the name of the component, duh", () => { |
||||
|
|
||||
|
const components = allComponents(); |
||||
|
|
||||
|
const result = rename({}, components, "PrimaryButton", "MainButton"); |
||||
|
|
||||
|
const newComponent = getExactComponent(result.allComponents, "MainButton"); |
||||
|
const oldComponent = getExactComponent(result.allComponents, "Primary"); |
||||
|
expect(oldComponent).toBeUndefined(); |
||||
|
expect(newComponent).toBeDefined(); |
||||
|
expect(newComponent.name).toBe("MainButton"); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
it("should chnge name on inherits", () => { |
||||
|
|
||||
|
const components = allComponents(); |
||||
|
|
||||
|
const result = rename({}, components, "common/SmallTextbox", "common/TinyTextbox"); |
||||
|
|
||||
|
const passwordTextbox = getExactComponent(result.allComponents, "common/PasswordBox"); |
||||
|
expect(passwordTextbox.inherits).toBe("common/TinyTextbox"); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
it("should change name of nested _components", () => { |
||||
|
const components = allComponents(); |
||||
|
const result = rename({}, components, "PrimaryButton", "MainButton"); |
||||
|
|
||||
|
const buttonGroup = getExactComponent(result.allComponents, "ButtonGroup"); |
||||
|
expect(buttonGroup.props.header._component).toBe("MainButton"); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
it("should change name of nested _components inside arrays", () => { |
||||
|
const components = allComponents(); |
||||
|
const result = rename({}, components, "PrimaryButton", "MainButton"); |
||||
|
|
||||
|
const buttonGroup = getExactComponent(result.allComponents, "ButtonGroup"); |
||||
|
expect(buttonGroup.props.children[0].control._component).toBe("MainButton"); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
|
||||
|
it("should change name of page appBody", () => { |
||||
|
const components = allComponents(); |
||||
|
const pages = { |
||||
|
main: { |
||||
|
appBody: "PrimaryButton" |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
const result = rename(pages, components, "PrimaryButton", "MainButton"); |
||||
|
expect(result.pages.main.appBody).toBe("MainButton"); |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
it("should return a list of changed components", () => { |
||||
|
const components = allComponents(); |
||||
|
const result = rename({}, components, "PrimaryButton", "MainButton"); |
||||
|
|
||||
|
expect(result.changedComponents).toEqual(["ButtonGroup"]); |
||||
|
|
||||
|
const result2 = rename({}, components, "common/SmallTextbox", "common/TinyTextBox"); |
||||
|
expect(result2.changedComponents).toEqual(["common/PasswordBox"]); |
||||
|
|
||||
|
}); |
||||
|
}) |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,175 +1,172 @@ |
|||||
{ |
[ |
||||
"levels": [ |
{ |
||||
{ |
"name": "owner", |
||||
"name": "owner", |
"permissions": [ |
||||
"permissions": [ |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/applications/1-{id}" |
||||
"nodeKey": "/applications/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/applications/1-{id}" |
||||
"nodeKey": "/applications/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/applications/1-{id}" |
||||
"nodeKey": "/applications/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/applications/1-{id}" |
||||
"nodeKey": "/applications/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/applications/1-{id}/users/8-{id}" |
||||
"nodeKey": "/applications/1-{id}/users/8-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/applications/1-{id}/users/8-{id}" |
||||
"nodeKey": "/applications/1-{id}/users/8-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/applications/1-{id}/users/8-{id}" |
||||
"nodeKey": "/applications/1-{id}/users/8-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/applications/1-{id}/users/8-{id}" |
||||
"nodeKey": "/applications/1-{id}/users/8-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
||||
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
||||
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
||||
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
||||
"nodeKey": "/applications/1-{id}/instances/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
||||
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
||||
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
||||
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
||||
"nodeKey": "/applications/1-{id}/versions/3-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
||||
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
||||
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
||||
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
||||
"nodeKey": "/applications/1-{id}/sessions/16-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/sessions/17-{id}" |
||||
"nodeKey": "/sessions/17-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/sessions/17-{id}" |
||||
"nodeKey": "/sessions/17-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/sessions/17-{id}" |
||||
"nodeKey": "/sessions/17-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/sessions/17-{id}" |
||||
"nodeKey": "/sessions/17-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/mastersessions_by_user" |
||||
"nodeKey": "/mastersessions_by_user" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/all_applications" |
||||
"nodeKey": "/all_applications" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/applications/1-{id}/allinstances" |
||||
"nodeKey": "/applications/1-{id}/allinstances" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/applications/1-{id}/sessions_by_user" |
||||
"nodeKey": "/applications/1-{id}/sessions_by_user" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/applications/1-{id}/user_name_lookup" |
||||
"nodeKey": "/applications/1-{id}/user_name_lookup" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/applications/1-{id}/all_versions" |
||||
"nodeKey": "/applications/1-{id}/all_versions" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/applications/1-{id}/instances/2-{id}/users_on_this_instance" |
||||
"nodeKey": "/applications/1-{id}/instances/2-{id}/users_on_this_instance" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/applications/1-{id}/versions/3-{id}/instances_for_this_version" |
||||
"nodeKey": "/applications/1-{id}/versions/3-{id}/instances_for_this_version" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read index", |
||||
"type": "read index", |
"nodeKey": "/applications/1-{id}/versions/3-{id}/instances_on_this_version" |
||||
"nodeKey": "/applications/1-{id}/versions/3-{id}/instances_on_this_version" |
}, |
||||
}, |
{ |
||||
{ |
"type": "write templates" |
||||
"type": "write templates" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create user" |
||||
"type": "create user" |
}, |
||||
}, |
{ |
||||
{ |
"type": "set password" |
||||
"type": "set password" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create temporary access" |
||||
"type": "create temporary access" |
}, |
||||
}, |
{ |
||||
{ |
"type": "enable or disable user" |
||||
"type": "enable or disable user" |
}, |
||||
}, |
{ |
||||
{ |
"type": "write access levels" |
||||
"type": "write access levels" |
}, |
||||
}, |
{ |
||||
{ |
"type": "list users" |
||||
"type": "list users" |
}, |
||||
}, |
{ |
||||
{ |
"type": "list access levels" |
||||
"type": "list access levels" |
}, |
||||
}, |
{ |
||||
{ |
"type": "manage index" |
||||
"type": "manage index" |
}, |
||||
}, |
{ |
||||
{ |
"type": "manage collection" |
||||
"type": "manage collection" |
}, |
||||
}, |
{ |
||||
{ |
"type": "set user access levels" |
||||
"type": "set user access levels" |
} |
||||
} |
] |
||||
] |
} |
||||
} |
] |
||||
], |
|
||||
"version": 0 |
|
||||
} |
|
||||
|
|||||
@ -1,21 +0,0 @@ |
|||||
{ |
|
||||
"name": "Main App Root", |
|
||||
"description": "", |
|
||||
"inherits": "@budibase/standard-components/nav", |
|
||||
"props": { |
|
||||
"items": [ |
|
||||
{ |
|
||||
"_component": "#items#array_element", |
|
||||
"title": "Applications", |
|
||||
"component": { |
|
||||
"_component": "" |
|
||||
} |
|
||||
} |
|
||||
] |
|
||||
}, |
|
||||
"tags": [ |
|
||||
"nav", |
|
||||
"navigation", |
|
||||
"sidebar" |
|
||||
] |
|
||||
} |
|
||||
@ -0,0 +1,65 @@ |
|||||
|
{ |
||||
|
"name": "apps/Application List Item", |
||||
|
"description": "", |
||||
|
"inherits": "@budibase/standard-components/panel", |
||||
|
"props": { |
||||
|
"border": "1px solid dimgray", |
||||
|
"borderRadius": "2px", |
||||
|
"color": "black", |
||||
|
"padding": "10px", |
||||
|
"margin": "20px", |
||||
|
"onClick": [ |
||||
|
{ |
||||
|
"##eventHandlerType": "Load Record", |
||||
|
"parameters": { |
||||
|
"recordKey": { |
||||
|
"##bbstate": "key", |
||||
|
"##bbsource": "context" |
||||
|
}, |
||||
|
"statePath": "currentApplication" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"component": { |
||||
|
"_component": "@budibase/standard-components/stackpanel", |
||||
|
"direction": "horizontal", |
||||
|
"children": [ |
||||
|
{ |
||||
|
"_component": "#children#array_element", |
||||
|
"control": { |
||||
|
"_component": "@budibase/standard-components/text", |
||||
|
"value": "", |
||||
|
"containerClass": "", |
||||
|
"font": "", |
||||
|
"color": "", |
||||
|
"textAlign": "inline", |
||||
|
"verticalAlign": "inline", |
||||
|
"display": "inline" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"width": "auto", |
||||
|
"height": "auto", |
||||
|
"containerClass": "", |
||||
|
"itemContainerClass": "", |
||||
|
"data": { |
||||
|
"##bbstate": "allApplications", |
||||
|
"##bbsource": "store" |
||||
|
}, |
||||
|
"dataItemComponent": { |
||||
|
"_component": "" |
||||
|
}, |
||||
|
"onLoad": [] |
||||
|
}, |
||||
|
"display": "", |
||||
|
"text": { |
||||
|
"##bbstate": "name", |
||||
|
"##bbstatefallback": "My App Name", |
||||
|
"##bbsource": "context" |
||||
|
} |
||||
|
}, |
||||
|
"tags": [ |
||||
|
"div", |
||||
|
"container" |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,210 @@ |
|||||
|
{ |
||||
|
"name": "Main App Screen", |
||||
|
"description": "", |
||||
|
"inherits": "@budibase/standard-components/stackpanel", |
||||
|
"props": { |
||||
|
"children": [ |
||||
|
{ |
||||
|
"_component": "#children#array_element", |
||||
|
"control": { |
||||
|
"_component": "apps/Create App List Item", |
||||
|
"text": "Create New", |
||||
|
"component": { |
||||
|
"_component": "" |
||||
|
}, |
||||
|
"containerClass": "", |
||||
|
"background": "", |
||||
|
"border": "1px solid black", |
||||
|
"borderRadius": "2px", |
||||
|
"font": "", |
||||
|
"color": "", |
||||
|
"padding": "10px", |
||||
|
"margin": "20px", |
||||
|
"hoverColor": "", |
||||
|
"hoverBackground": "gainsboro", |
||||
|
"height": "100px", |
||||
|
"width": "100px", |
||||
|
"onClick": [ |
||||
|
{ |
||||
|
"##eventHandlerType": "Get New Record", |
||||
|
"parameters": { |
||||
|
"collectionKey": "/applications", |
||||
|
"childRecordType": "application", |
||||
|
"statePath": "currentApplication" |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"onLoad": [ |
||||
|
{ |
||||
|
"##eventHandlerType": "List Records", |
||||
|
"parameters": { |
||||
|
"indexKey": "/all_applications", |
||||
|
"statePath": "allApplications" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"data": { |
||||
|
"##bbstate": "allApplications", |
||||
|
"##bbsource": "store" |
||||
|
}, |
||||
|
"dataItemComponent": { |
||||
|
"_component": "apps/Application List Item", |
||||
|
"text": "", |
||||
|
"component": { |
||||
|
"_component": "@budibase/standard-components/stackpanel", |
||||
|
"children": [ |
||||
|
{ |
||||
|
"_component": "#children#array_element", |
||||
|
"control": { |
||||
|
"_component": "@budibase/standard-components/text", |
||||
|
"value": "", |
||||
|
"containerClass": "", |
||||
|
"font": "", |
||||
|
"color": "", |
||||
|
"textAlign": "inline", |
||||
|
"verticalAlign": "inline", |
||||
|
"display": "inline" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"width": "auto", |
||||
|
"height": "auto", |
||||
|
"containerClass": "", |
||||
|
"itemContainerClass": "", |
||||
|
"data": { |
||||
|
"##bbstate": "" |
||||
|
}, |
||||
|
"dataItemComponent": { |
||||
|
"_component": "" |
||||
|
}, |
||||
|
"onLoad": [] |
||||
|
}, |
||||
|
"containerClass": "", |
||||
|
"background": "", |
||||
|
"border": "1px solid dimgray", |
||||
|
"borderRadius": "2px", |
||||
|
"font": "", |
||||
|
"color": "black", |
||||
|
"padding": "10px", |
||||
|
"margin": "20px", |
||||
|
"hoverColor": "", |
||||
|
"hoverBackground": "", |
||||
|
"height": "", |
||||
|
"width": "", |
||||
|
"onClick": [ |
||||
|
{ |
||||
|
"##eventHandlerType": "Load Record", |
||||
|
"parameters": { |
||||
|
"recordKey": { |
||||
|
"##bbstate": "key", |
||||
|
"##bbsource": "context" |
||||
|
}, |
||||
|
"statePath": "currentApp" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"display": "inline" |
||||
|
}, |
||||
|
"component": { |
||||
|
"_component": "@budibase/standard-components/stackpanel", |
||||
|
"direction": "horizontal", |
||||
|
"children": [ |
||||
|
{ |
||||
|
"_component": "#children#array_element", |
||||
|
"control": { |
||||
|
"_component": "@budibase/standard-components/text", |
||||
|
"value": "", |
||||
|
"containerClass": "", |
||||
|
"font": "", |
||||
|
"color": "", |
||||
|
"textAlign": "inline", |
||||
|
"verticalAlign": "inline", |
||||
|
"display": "inline" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"width": "auto", |
||||
|
"height": "auto", |
||||
|
"containerClass": "", |
||||
|
"itemContainerClass": "", |
||||
|
"data": { |
||||
|
"##bbstate": "allApplications", |
||||
|
"##bbsource": "store" |
||||
|
}, |
||||
|
"dataItemComponent": { |
||||
|
"_component": "apps/Application List Item", |
||||
|
"text": { |
||||
|
"##bbstate": "name", |
||||
|
"##bbstatefallback": "My App Name", |
||||
|
"##bbsource": "context" |
||||
|
}, |
||||
|
"component": { |
||||
|
"_component": "@budibase/standard-components/stackpanel", |
||||
|
"direction": "horizontal", |
||||
|
"children": [ |
||||
|
{ |
||||
|
"_component": "#children#array_element", |
||||
|
"control": { |
||||
|
"_component": "@budibase/standard-components/text", |
||||
|
"value": "", |
||||
|
"containerClass": "", |
||||
|
"font": "", |
||||
|
"color": "", |
||||
|
"textAlign": "inline", |
||||
|
"verticalAlign": "inline", |
||||
|
"display": "inline" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"width": "auto", |
||||
|
"height": "auto", |
||||
|
"containerClass": "", |
||||
|
"itemContainerClass": "", |
||||
|
"data": { |
||||
|
"##bbstate": "allApplications", |
||||
|
"##bbsource": "store" |
||||
|
}, |
||||
|
"dataItemComponent": { |
||||
|
"_component": "" |
||||
|
}, |
||||
|
"onLoad": [] |
||||
|
}, |
||||
|
"containerClass": "", |
||||
|
"background": "", |
||||
|
"border": "1px solid dimgray", |
||||
|
"borderRadius": "2px", |
||||
|
"font": "", |
||||
|
"color": "black", |
||||
|
"padding": "10px", |
||||
|
"margin": "20px", |
||||
|
"hoverColor": "", |
||||
|
"hoverBackground": "", |
||||
|
"height": "", |
||||
|
"width": "", |
||||
|
"onClick": [ |
||||
|
{ |
||||
|
"##eventHandlerType": "Load Record", |
||||
|
"parameters": { |
||||
|
"recordKey": { |
||||
|
"##bbstate": "key", |
||||
|
"##bbsource": "context" |
||||
|
}, |
||||
|
"statePath": "currentApplication" |
||||
|
} |
||||
|
} |
||||
|
], |
||||
|
"display": "" |
||||
|
}, |
||||
|
"onLoad": [] |
||||
|
} |
||||
|
}, |
||||
|
"tags": [ |
||||
|
"div", |
||||
|
"container", |
||||
|
"layout", |
||||
|
"panel" |
||||
|
] |
||||
|
} |
||||
@ -0,0 +1,30 @@ |
|||||
|
{ |
||||
|
"name": "apps/Create App List Item", |
||||
|
"description": "", |
||||
|
"inherits": "@budibase/standard-components/panel", |
||||
|
"props": { |
||||
|
"text": "Create New", |
||||
|
"padding": "10px", |
||||
|
"hoverColor": "", |
||||
|
"margin": "20px", |
||||
|
"border": "1px solid black", |
||||
|
"borderRadius": "2px", |
||||
|
"hoverBackground": "gainsboro", |
||||
|
"height": "100px", |
||||
|
"width": "100px", |
||||
|
"onClick": [ |
||||
|
{ |
||||
|
"##eventHandlerType": "Get New Record", |
||||
|
"parameters": { |
||||
|
"collectionKey": "/applications", |
||||
|
"childRecordType": "application", |
||||
|
"statePath": "currentApplication" |
||||
|
} |
||||
|
} |
||||
|
] |
||||
|
}, |
||||
|
"tags": [ |
||||
|
"div", |
||||
|
"container" |
||||
|
] |
||||
|
} |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,75 +1,72 @@ |
|||||
{ |
[ |
||||
"levels": [ |
{ |
||||
{ |
"name": "owner", |
||||
"name": "owner", |
"permissions": [ |
||||
"permissions": [ |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/customers/1-{id}" |
||||
"nodeKey": "/customers/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/customers/1-{id}" |
||||
"nodeKey": "/customers/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/customers/1-{id}" |
||||
"nodeKey": "/customers/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/customers/1-{id}" |
||||
"nodeKey": "/customers/1-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create record", |
||||
"type": "create record", |
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "update record", |
||||
"type": "update record", |
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "delete record", |
||||
"type": "delete record", |
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "read record", |
||||
"type": "read record", |
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}" |
}, |
||||
}, |
{ |
||||
{ |
"type": "write templates" |
||||
"type": "write templates" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create user" |
||||
"type": "create user" |
}, |
||||
}, |
{ |
||||
{ |
"type": "set password" |
||||
"type": "set password" |
}, |
||||
}, |
{ |
||||
{ |
"type": "create temporary access" |
||||
"type": "create temporary access" |
}, |
||||
}, |
{ |
||||
{ |
"type": "enable or disable user" |
||||
"type": "enable or disable user" |
}, |
||||
}, |
{ |
||||
{ |
"type": "write access levels" |
||||
"type": "write access levels" |
}, |
||||
}, |
{ |
||||
{ |
"type": "list users" |
||||
"type": "list users" |
}, |
||||
}, |
{ |
||||
{ |
"type": "list access levels" |
||||
"type": "list access levels" |
}, |
||||
}, |
{ |
||||
{ |
"type": "manage index" |
||||
"type": "manage index" |
}, |
||||
}, |
{ |
||||
{ |
"type": "set user access levels" |
||||
"type": "set user access levels" |
}, |
||||
}, |
{ |
||||
{ |
"type": "manage collection" |
||||
"type": "manage collection" |
} |
||||
} |
] |
||||
] |
} |
||||
} |
] |
||||
], |
|
||||
"version": 0 |
|
||||
} |
|
||||
|
|||||
@ -1,5 +1,5 @@ |
|||||
{ |
{ |
||||
"name": "/containers/two_columns", |
"name": "containers/two_columns_yes", |
||||
"description": "", |
"description": "", |
||||
"inherits": "@budibase/standard-components/grid", |
"inherits": "@budibase/standard-components/grid", |
||||
"props": { |
"props": { |
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,12 +1,13 @@ |
|||||
#current_component.svelte-1xqz9vm{height:100%;width:100%} |
#current_component.svelte-1xqz9vm{height:100%;width:100%} |
||||
|
.form-root.svelte-m9d6ue{display:grid;grid-template-columns:[label] auto [control] 1fr}.label.svelte-m9d6ue{grid-column-start:label;padding:5px 10px;vertical-align:middle}.control.svelte-m9d6ue{grid-column-start:control;padding:5px 10px}.overflow.svelte-m9d6ue{grid-column-start:overflow}.full-width.svelte-m9d6ue{width:100%} |
||||
.root.svelte-crnq0a{height:100%;display:grid;grid-template-columns:[left] 1fr [middle] auto [right] 1fr;grid-template-rows:[top] 1fr [center] auto [bottom] 1fr}.content.svelte-crnq0a{grid-column-start:middle;grid-row-start:center;width:400px}.logo-container.svelte-crnq0a{margin-bottom:20px |
.root.svelte-crnq0a{height:100%;display:grid;grid-template-columns:[left] 1fr [middle] auto [right] 1fr;grid-template-rows:[top] 1fr [center] auto [bottom] 1fr}.content.svelte-crnq0a{grid-column-start:middle;grid-row-start:center;width:400px}.logo-container.svelte-crnq0a{margin-bottom:20px |
||||
}.logo-container.svelte-crnq0a>img.svelte-crnq0a{max-width:100%}.login-button-container.svelte-crnq0a{text-align:right;margin-top:20px}.incorrect-details-panel.svelte-crnq0a{margin-top:30px;padding:10px;border-style:solid;border-width:1px;border-color:maroon;border-radius:1px;text-align:center;color:maroon;background-color:mistyrose}.form-root.svelte-crnq0a{display:grid;grid-template-columns:[label] auto [control] 1fr}.label.svelte-crnq0a{grid-column-start:label;padding:5px 10px;vertical-align:middle}.control.svelte-crnq0a{grid-column-start:control;padding:5px 10px}.default-input.svelte-crnq0a{font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;width:100%}.default-button.svelte-crnq0a{font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;color:#333;background-color:#f4f4f4;outline:none}.default-button.svelte-crnq0a:active{background-color:#ddd}.default-button.svelte-crnq0a:focus{border-color:#666} |
}.logo-container.svelte-crnq0a>img.svelte-crnq0a{max-width:100%}.login-button-container.svelte-crnq0a{text-align:right;margin-top:20px}.incorrect-details-panel.svelte-crnq0a{margin-top:30px;padding:10px;border-style:solid;border-width:1px;border-color:maroon;border-radius:1px;text-align:center;color:maroon;background-color:mistyrose}.form-root.svelte-crnq0a{display:grid;grid-template-columns:[label] auto [control] 1fr}.label.svelte-crnq0a{grid-column-start:label;padding:5px 10px;vertical-align:middle}.control.svelte-crnq0a{grid-column-start:control;padding:5px 10px}.default-input.svelte-crnq0a{font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;width:100%}.default-button.svelte-crnq0a{font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;color:#333;background-color:#f4f4f4;outline:none}.default-button.svelte-crnq0a:active{background-color:#ddd}.default-button.svelte-crnq0a:focus{border-color:#666} |
||||
.form-root.svelte-m9d6ue{display:grid;grid-template-columns:[label] auto [control] 1fr}.label.svelte-m9d6ue{grid-column-start:label;padding:5px 10px;vertical-align:middle}.control.svelte-m9d6ue{grid-column-start:control;padding:5px 10px}.overflow.svelte-m9d6ue{grid-column-start:overflow}.full-width.svelte-m9d6ue{width:100%} |
|
||||
.default.svelte-1ec4wqj{width:100%;font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;width:100%}.default.svelte-1ec4wqj:disabled{color:#ccc} |
|
||||
.root.svelte-10kw8to{display:grid} |
.root.svelte-10kw8to{display:grid} |
||||
.root.svelte-aihwli{height:100%;width:100%;grid-template-columns:[navbar] auto [content] 1fr;display:grid}.navbar.svelte-aihwli{grid-column:navbar;background:var(--navBarBackground);border:var(--navBarBorder);color:var(--navBarColor)}.navitem.svelte-aihwli{padding:10px 17px;cursor:pointer}.navitem.svelte-aihwli:hover{background:var(--itemHoverBackground);color:var(--itemHoverColor)}.navitem.selected.svelte-aihwli{background:var(--selectedItemBackground);border:var(--selectedItemBorder);color:var(--selectedItemColor)}.content.svelte-aihwli{grid-column:content} |
.default.svelte-1ec4wqj{width:100%;font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;width:100%}.default.svelte-1ec4wqj:disabled{color:#ccc} |
||||
.table-default.svelte-h8rqk6{width:100%;margin-bottom:1rem;color:#212529;border-collapse:collapse}.table-default.svelte-h8rqk6 .thead-default .th-default.svelte-h8rqk6{vertical-align:bottom;border-bottom:2px solid #dee2e6;font-weight:bold}.table-default.svelte-h8rqk6 .th-default.svelte-h8rqk6{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6;font-weight:normal}.th-default.svelte-h8rqk6{text-align:inherit}.table-default.svelte-h8rqk6 .tbody-default .tr-default.svelte-h8rqk6:hover{color:#212529;background-color:rgba(0,0,0,.075);cursor:pointer} |
.table-default.svelte-h8rqk6{width:100%;margin-bottom:1rem;color:#212529;border-collapse:collapse}.table-default.svelte-h8rqk6 .thead-default .th-default.svelte-h8rqk6{vertical-align:bottom;border-bottom:2px solid #dee2e6;font-weight:bold}.table-default.svelte-h8rqk6 .th-default.svelte-h8rqk6{padding:.75rem;vertical-align:top;border-top:1px solid #dee2e6;font-weight:normal}.th-default.svelte-h8rqk6{text-align:inherit}.table-default.svelte-h8rqk6 .tbody-default .tr-default.svelte-h8rqk6:hover{color:#212529;background-color:rgba(0,0,0,.075);cursor:pointer} |
||||
|
.root.svelte-aihwli{height:100%;width:100%;grid-template-columns:[navbar] auto [content] 1fr;display:grid}.navbar.svelte-aihwli{grid-column:navbar;background:var(--navBarBackground);border:var(--navBarBorder);color:var(--navBarColor)}.navitem.svelte-aihwli{padding:10px 17px;cursor:pointer}.navitem.svelte-aihwli:hover{background:var(--itemHoverBackground);color:var(--itemHoverColor)}.navitem.selected.svelte-aihwli{background:var(--selectedItemBackground);border:var(--selectedItemBorder);color:var(--selectedItemColor)}.content.svelte-aihwli{grid-column:content} |
||||
.horizontal.svelte-osi0db{display:inline-block}.vertical.svelte-osi0db{display:block} |
.horizontal.svelte-osi0db{display:inline-block}.vertical.svelte-osi0db{display:block} |
||||
|
.panel.svelte-6yfcjx:hover{background:var(--hoverBackground);color:var(--hoverColor)} |
||||
.default.svelte-1q8lga0{font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;color:#333;background-color:#f4f4f4;outline:none}.default.svelte-1q8lga0:active{background-color:#ddd}.default.svelte-1q8lga0:focus{border-color:#666} |
.default.svelte-1q8lga0{font-family:inherit;font-size:inherit;padding:0.4em;margin:0 0 0.5em 0;box-sizing:border-box;border:1px solid #ccc;border-radius:2px;color:#333;background-color:#f4f4f4;outline:none}.default.svelte-1q8lga0:active{background-color:#ddd}.default.svelte-1q8lga0:focus{border-color:#666} |
||||
|
|
||||
/*# sourceMappingURL=bundle.css.map */ |
/*# sourceMappingURL=bundle.css.map */ |
||||
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue