bootstrap components started...
This commit is contained in:
parent
70572a5ee1
commit
f787633fc7
|
@ -0,0 +1,5 @@
|
||||||
|
.DS_Store
|
||||||
|
node_modules
|
||||||
|
yarn.lock
|
||||||
|
package-lock.json
|
||||||
|
dist/index.js
|
|
@ -0,0 +1,33 @@
|
||||||
|
*Psst — looking for an app template? Go here --> [sveltejs/template](https://github.com/sveltejs/template)*
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# component-template
|
||||||
|
|
||||||
|
A base for building shareable Svelte components. Clone it with [degit](https://github.com/Rich-Harris/degit):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
npx degit sveltejs/component-template my-new-component
|
||||||
|
cd my-new-component
|
||||||
|
npm install # or yarn
|
||||||
|
```
|
||||||
|
|
||||||
|
Your component's source code lives in `src/index.html`.
|
||||||
|
|
||||||
|
TODO
|
||||||
|
|
||||||
|
* [ ] some firm opinions about the best way to test components
|
||||||
|
* [ ] update `degit` so that it automates some of the setup work
|
||||||
|
|
||||||
|
|
||||||
|
## Setting up
|
||||||
|
|
||||||
|
* Run `npm init` (or `yarn init`)
|
||||||
|
* Replace this README with your own
|
||||||
|
|
||||||
|
|
||||||
|
## Consuming components
|
||||||
|
|
||||||
|
Your package.json has a `"svelte"` field pointing to `src/index.html`, which allows Svelte apps to import the source code directly, if they are using a bundler plugin like [rollup-plugin-svelte](https://github.com/rollup/rollup-plugin-svelte) or [svelte-loader](https://github.com/sveltejs/svelte-loader) (where [`resolve.mainFields`](https://webpack.js.org/configuration/resolve/#resolve-mainfields) in your webpack config includes `"svelte"`). **This is recommended.**
|
||||||
|
|
||||||
|
For everyone else, `npm run build` will bundle your component's source code into a plain JavaScript module (`index.mjs`) and a UMD script (`index.js`). This will happen automatically when you publish your component to npm, courtesy of the `prepublishOnly` hook in package.json.
|
|
@ -0,0 +1,255 @@
|
||||||
|
{
|
||||||
|
"_lib": "./dist/index.js",
|
||||||
|
"_generators": {
|
||||||
|
"_lib": "./dist/generators.js",
|
||||||
|
"app": {
|
||||||
|
"name": "App",
|
||||||
|
"description": "Generate app based on your backend"
|
||||||
|
},
|
||||||
|
"forms": {
|
||||||
|
"name": "Forms",
|
||||||
|
"description": "Generate forms, based on your records"
|
||||||
|
},
|
||||||
|
"buttons": {
|
||||||
|
"name": "Buttons",
|
||||||
|
"description": "Generate some styled buttons"
|
||||||
|
},
|
||||||
|
"headers": {
|
||||||
|
"name": "Headers",
|
||||||
|
"description": "Generate some styled headings"
|
||||||
|
},
|
||||||
|
"nav": {
|
||||||
|
"name": "Nav bar",
|
||||||
|
"description": "Generate a nav bar, based n your root records"
|
||||||
|
},
|
||||||
|
"indexTables": {
|
||||||
|
"name": "Nav bar",
|
||||||
|
"description": "Generate a table based on an index"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"button" : {
|
||||||
|
"importPath": "button",
|
||||||
|
"name": "Button",
|
||||||
|
"description": "an html <button />",
|
||||||
|
"props": {
|
||||||
|
"contentText": { "type": "string", "default": "Button" },
|
||||||
|
"contentComponent": "component",
|
||||||
|
"className": {"type": "string", "default": "default"},
|
||||||
|
"disabled": "bool",
|
||||||
|
"onClick": "event",
|
||||||
|
"background": "string",
|
||||||
|
"color": "string",
|
||||||
|
"border": "string",
|
||||||
|
"padding": "string",
|
||||||
|
"hoverColor": "string",
|
||||||
|
"hoverBackground": "string",
|
||||||
|
"hoverBorder": "string"
|
||||||
|
},
|
||||||
|
"tags": ["button"]
|
||||||
|
},
|
||||||
|
"login" : {
|
||||||
|
"importPath": "Login",
|
||||||
|
"name": "Login Control",
|
||||||
|
"description": "A control that accepts username, password an also handles password resets",
|
||||||
|
"props" : {
|
||||||
|
"logo": "asset",
|
||||||
|
"loginRedirect": "string",
|
||||||
|
"usernameLabel": {"type":"string", "default": "Username"},
|
||||||
|
"passwordLabel": {"type":"string", "default": "Password"},
|
||||||
|
"loginButtonLabel": {"type":"string", "default": "Login"},
|
||||||
|
"buttonClass": "string",
|
||||||
|
"inputClass": "string"
|
||||||
|
},
|
||||||
|
"tags": ["login", "credentials", "password", "logon"]
|
||||||
|
},
|
||||||
|
"form" : {
|
||||||
|
"importPath": "Form",
|
||||||
|
"name": "Form",
|
||||||
|
"description": "A form - allgned fields with labels",
|
||||||
|
"props" : {
|
||||||
|
"containerClass": "string",
|
||||||
|
"formControls": {
|
||||||
|
"type":"array",
|
||||||
|
"elementDefinition": {
|
||||||
|
"label": "string",
|
||||||
|
"control":"component"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": ["form"]
|
||||||
|
},
|
||||||
|
"textbox" : {
|
||||||
|
"importPath": "Textbox",
|
||||||
|
"name": "Textbox",
|
||||||
|
"description": "An input type=text or password",
|
||||||
|
"props" : {
|
||||||
|
"value": "string",
|
||||||
|
"hideValue": "bool",
|
||||||
|
"className": {"type": "string", "default": "default"}
|
||||||
|
},
|
||||||
|
"tags": ["form"]
|
||||||
|
},
|
||||||
|
"stackpanel": {
|
||||||
|
"importPath": "StackPanel",
|
||||||
|
"name": "StackPanel",
|
||||||
|
"description": "Layout elements in a stack, either horizontally or vertically",
|
||||||
|
"props" : {
|
||||||
|
"direction": {
|
||||||
|
"type": "options",
|
||||||
|
"options": ["horizontal", "vertical"],
|
||||||
|
"default":"horizontal"
|
||||||
|
},
|
||||||
|
"children": {
|
||||||
|
"type":"array",
|
||||||
|
"elementDefinition": {
|
||||||
|
"control":"component"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": {"type":"string","default":"auto"},
|
||||||
|
"height": {"type":"string","default":"auto"},
|
||||||
|
"containerClass":"string",
|
||||||
|
"itemContainerClass":"string",
|
||||||
|
"data": "state",
|
||||||
|
"dataItemComponent": "component",
|
||||||
|
"onLoad": "event"
|
||||||
|
},
|
||||||
|
"tags": ["div", "container", "layout", "panel"]
|
||||||
|
},
|
||||||
|
"grid": {
|
||||||
|
"importPath": "Grid",
|
||||||
|
"name": "Grid",
|
||||||
|
"description": "CSS Grid layout ",
|
||||||
|
"props" : {
|
||||||
|
"gridTemplateRows": "string",
|
||||||
|
"gridTemplateColumns": "string",
|
||||||
|
"children": {
|
||||||
|
"type":"array",
|
||||||
|
"elementDefinition": {
|
||||||
|
"control":"component",
|
||||||
|
"gridColumn":"string",
|
||||||
|
"gridRow":"string",
|
||||||
|
"gridColumnStart":"string",
|
||||||
|
"gridColumnEnd":"string",
|
||||||
|
"gridRowStart":"string",
|
||||||
|
"gridRowEnd":"string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"width": {"type":"string","default":"auto"},
|
||||||
|
"height": {"type":"string","default":"auto"},
|
||||||
|
"containerClass":"string",
|
||||||
|
"itemContainerClass":"string"
|
||||||
|
},
|
||||||
|
"tags": ["div", "container", "layout", "panel", "grid"]
|
||||||
|
},
|
||||||
|
"text": {
|
||||||
|
"importPath": "Text",
|
||||||
|
"name": "Text",
|
||||||
|
"description": "stylable block of text",
|
||||||
|
"props" : {
|
||||||
|
"value": "string",
|
||||||
|
"containerClass": "string",
|
||||||
|
"font": "string",
|
||||||
|
"color": "string",
|
||||||
|
"textAlign": {
|
||||||
|
"type": "options",
|
||||||
|
"default":"inline",
|
||||||
|
"options": [
|
||||||
|
"left", "center", "right"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"verticalAlign": {
|
||||||
|
"type": "options",
|
||||||
|
"default":"inline",
|
||||||
|
"options": [
|
||||||
|
"top", "middle", "bottom"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"display": {
|
||||||
|
"type": "options",
|
||||||
|
"default":"inline",
|
||||||
|
"options": [
|
||||||
|
"inline", "block", "inline-block"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": ["div", "container"]
|
||||||
|
},
|
||||||
|
"panel": {
|
||||||
|
"importPath": "Panel",
|
||||||
|
"name": "Panel",
|
||||||
|
"description": "A stylable div with a component inside",
|
||||||
|
"props" : {
|
||||||
|
"text": "string",
|
||||||
|
"component": "component",
|
||||||
|
"containerClass": "string",
|
||||||
|
"background": "string",
|
||||||
|
"border": "string",
|
||||||
|
"borderRadius":"string",
|
||||||
|
"font": "string",
|
||||||
|
"color": "string",
|
||||||
|
"padding": "string",
|
||||||
|
"margin": "string",
|
||||||
|
"hoverColor": "string",
|
||||||
|
"hoverBackground": "string",
|
||||||
|
"height":"string",
|
||||||
|
"width":"string",
|
||||||
|
"onClick": "event",
|
||||||
|
"display": {
|
||||||
|
"type": "options",
|
||||||
|
"default":"inline",
|
||||||
|
"options": [
|
||||||
|
"inline", "block", "inline-block"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tags": ["div", "container"]
|
||||||
|
},
|
||||||
|
"nav": {
|
||||||
|
"importPath": "Nav",
|
||||||
|
"name": "Nav",
|
||||||
|
"description": "A nav - a side bar of buttons that control the currently active component",
|
||||||
|
"props" : {
|
||||||
|
"navBarBackground": {"type" :"string", "default":"silver"},
|
||||||
|
"navBarBorder": "string",
|
||||||
|
"navBarColor": {"type" :"string", "default":"black"},
|
||||||
|
"selectedItemBackground": {"type" :"string", "default":"white"},
|
||||||
|
"selectedItemColor": {"type" :"string", "default":"black"},
|
||||||
|
"selectedItemBorder": "string",
|
||||||
|
"itemHoverBackground": {"type" :"string", "default":"gainsboro"},
|
||||||
|
"itemHoverColor": {"type" :"string", "default":"black"},
|
||||||
|
"items": {
|
||||||
|
"type": "array",
|
||||||
|
"elementDefinition" : {
|
||||||
|
"title": "string",
|
||||||
|
"component": "component"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"selectedItem":"string",
|
||||||
|
"hideNavBar":"bool"
|
||||||
|
|
||||||
|
},
|
||||||
|
"tags": ["nav", "navigation", "sidebar"]
|
||||||
|
},
|
||||||
|
"table": {
|
||||||
|
"importPath": "Table",
|
||||||
|
"name": "Table",
|
||||||
|
"description": "An HTML table",
|
||||||
|
"props" : {
|
||||||
|
"data": "state",
|
||||||
|
"columns": {
|
||||||
|
"type": "array",
|
||||||
|
"elementDefinition" : {
|
||||||
|
"title": "string",
|
||||||
|
"value": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"onRowClick":"event",
|
||||||
|
"tableClass": {"type":"string", "default":"table-default"},
|
||||||
|
"theadClass": {"type":"string", "default":"thead-default"},
|
||||||
|
"tbodyClass": {"type":"string", "default":"tbody-default"},
|
||||||
|
"trClass": {"type":"string", "default":"tr-default"},
|
||||||
|
"thClass": {"type":"string", "default":"th-default"}
|
||||||
|
},
|
||||||
|
"tags": ["table"]
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
|
||||||
|
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VuZXJhdG9ycy5qcyIsInNvdXJjZXMiOltdLCJzb3VyY2VzQ29udGVudCI6W10sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIifQ==
|
|
@ -0,0 +1,36 @@
|
||||||
|
{
|
||||||
|
"name": "@budibase/bootstrap-components",
|
||||||
|
"svelte": "src/index.svelte",
|
||||||
|
"main": "dist/index.js",
|
||||||
|
"module": "dist/index.js",
|
||||||
|
"scripts": {
|
||||||
|
"build": "rollup -c && rollup -c rollup.generatorsconfig.js",
|
||||||
|
"prepublishOnly": "npm run build",
|
||||||
|
"testbuild": "rollup -w -c rollup.testconfig.js",
|
||||||
|
"dev": "run-p start:dev testbuild",
|
||||||
|
"start:dev": "sirv public --single --dev",
|
||||||
|
"publishdev": "yarn build && node ./scripts/publishDev.js"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@budibase/client": "^0.0.11",
|
||||||
|
"fs-extra": "^8.1.0",
|
||||||
|
"lodash": "^4.17.15",
|
||||||
|
"npm-run-all": "^4.1.5",
|
||||||
|
"rollup": "^1.11.0",
|
||||||
|
"rollup-plugin-commonjs": "^10.0.2",
|
||||||
|
"rollup-plugin-json": "^4.0.0",
|
||||||
|
"rollup-plugin-livereload": "^1.0.1",
|
||||||
|
"rollup-plugin-node-resolve": "^5.0.0",
|
||||||
|
"rollup-plugin-svelte": "^5.0.0",
|
||||||
|
"rollup-plugin-terser": "^5.1.1",
|
||||||
|
"shortid": "^2.2.15",
|
||||||
|
"sirv-cli": "^0.4.4",
|
||||||
|
"svelte": "^3.12.1"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"svelte"
|
||||||
|
],
|
||||||
|
"version": "0.0.11",
|
||||||
|
"license": "MIT",
|
||||||
|
"gitHead": "115189f72a850bfb52b65ec61d932531bf327072"
|
||||||
|
}
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
|
@ -0,0 +1,13 @@
|
||||||
|
#current_component.svelte-1xqz9vm{height:100%;width:100%}
|
||||||
|
.root.svelte-10kw8to{display:grid}
|
||||||
|
.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}
|
||||||
|
.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-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}
|
||||||
|
.panel.svelte-6yfcjx:hover{background:var(--hoverBackground);color:var(--hoverColor)}
|
||||||
|
.horizontal.svelte-osi0db{display:inline-block}.vertical.svelte-osi0db{display:block}
|
||||||
|
.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}
|
||||||
|
.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 */
|
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"version": 3,
|
||||||
|
"file": "bundle.css",
|
||||||
|
"sources": [
|
||||||
|
"..\\src\\Test\\TestApp.svelte",
|
||||||
|
"..\\src\\Grid.svelte",
|
||||||
|
"..\\src\\Login.svelte",
|
||||||
|
"..\\src\\Form.svelte",
|
||||||
|
"..\\src\\Nav.svelte",
|
||||||
|
"..\\src\\Textbox.svelte",
|
||||||
|
"..\\src\\Panel.svelte",
|
||||||
|
"..\\src\\StackPanel.svelte",
|
||||||
|
"..\\src\\Table.svelte",
|
||||||
|
"..\\src\\Button.svelte"
|
||||||
|
],
|
||||||
|
"sourcesContent": [
|
||||||
|
"<script>\nimport createApp from \"./createApp\";\nimport { props } from \"./props\";\n\nlet _bb;\n\nconst _appPromise = createApp();\n_appPromise.then(a => _bb = a);\n\nconst testProps = props.hiddenNav;\n\nlet currentComponent;\n\n$: {\n if(_bb && currentComponent) {\n _bb.initialiseComponent(testProps, currentComponent);\n }\n}\n\n\n\n</script>\n\n{#await _appPromise}\nloading\n{:then _bb}\n\n<div id=\"current_component\" bind:this={currentComponent}>\n</div>\n\n{/await}\n\n\n<style>\n#current_component {\n height: 100%;\n width: 100%;\n}\n</style>\n\n",
|
||||||
|
"<script>\r\nimport { onMount } from 'svelte'\r\nimport {buildStyle} from \"./buildStyle\";\r\n\r\nexport let gridTemplateRows =\"\";\r\nexport let gridTemplateColumns =\"\";\r\nexport let children = [];\r\nexport let width = \"auto\";\r\nexport let height = \"auto\";\r\nexport let containerClass=\"\";\r\nexport let itemContainerClass=\"\";\r\n\r\n/*\"gridColumnStart\":\"string\",\r\n\"gridColumnEnd\":\"string\",\r\n\"gridRowStart\":\"string\",\r\n\"gridRowEnd\":\"string\"*/\r\n\r\n\r\nexport let _bb;\r\n\r\nlet style=\"\";\r\nlet htmlElements = {};\r\n\r\n$ : {\r\n if(_bb && htmlElements) {\r\n for(let el in htmlElements) {\r\n _bb.initialiseComponent(\r\n children[el].control,\r\n htmlElements[el]\r\n );\r\n }\r\n }\r\n}\r\n\r\nconst childStyle = child => \r\n buildStyle({\r\n \"grid-column-start\": child.gridColumnStart,\r\n \"grid-column-end\": child.gridColumnEnd,\r\n \"grid-column\": child.gridColumn,\r\n \"grid-row-start\": child.gridRowStart,\r\n \"grid-row-end\": child.gridRowStart,\r\n \"grid-row\": child.gridRow,\r\n });\r\n\r\n</script>\r\n\r\n<div class=\"root {containerClass}\"\r\n style=\"width: {width}; height: {height}; grid-template-columns: {gridTemplateColumns}; grid-template-rows: {gridTemplateRows};\">\r\n {#each children as child, index}\r\n <div class=\"{itemContainerClass}\"\r\n style={childStyle(child)}\r\n bind:this={htmlElements[index]}>\r\n </div>\r\n {/each}\r\n</div>\r\n\r\n<style>\r\n\r\n.root {\r\n display: grid;\r\n}\r\n\r\n</style>",
|
||||||
|
"<script>\n\nimport Textbox from \"./Textbox.svelte\";\nimport Form from \"./Form.svelte\";\nimport Button from \"./Button.svelte\";\n\nexport let usernameLabel = \"Username\";\nexport let passwordLabel = \"Password\";\nexport let loginButtonLabel = \"Login\";\nexport let loginRedirect = \"\";\nexport let logo = \"\";\nexport let buttonClass = \"\";\nexport let inputClass=\"\"\n\nexport let _bb;\n\nlet username = \"\";\nlet password = \"\";\nlet busy = false;\nlet incorrect = false;\nlet _logo = \"\";\nlet _buttonClass = \"\";\nlet _inputClass = \"\";\n\n$: {\n _logo = _bb.relativeUrl(logo);\n _buttonClass = buttonClass || \"default-button\";\n _inputClass = inputClass || \"default-input\";\n}\n\nconst login = () => {\n busy = true;\n _bb.api.post(\"/api/authenticate\", {username, password})\n .then(r => {\n busy = false;\n if(r.status === 200) {\n return r.json();\n } else {\n incorrect = true;\n return;\n }\n })\n .then(user => {\n if(user) {\n localStorage.setItem(\"budibase:user\", user);\n location.reload();\n }\n })\n}\n\n</script>\n\n<div class=\"root\">\n\n <div class=\"content\">\n\n {#if _logo}\n <div class=\"logo-container\">\n <img src={_logo} alt=\"logo\"/>\n </div>\n {/if}\n\n <div class=\"form-root\">\n <div class=\"label\">\n {usernameLabel}\n </div>\n <div class=\"control\">\n <input bind:value={username} type=\"text\" class={_inputClass}/>\n </div>\n <div class=\"label\">\n {passwordLabel}\n </div>\n <div class=\"control\">\n <input bind:value={password} type=\"password\" class={_inputClass}/>\n </div>\n </div>\n\n <div class=\"login-button-container\">\n <button disabled={busy} \n on:click={login}\n class={_buttonClass}>\n {loginButtonLabel}\n </button>\n </div>\n\n {#if incorrect}\n <div class=\"incorrect-details-panel\">\n Incorrect username or password\n </div>\n {/if}\n\n </div>\n\n</div>\n\n<style>\n\n.root {\n height: 100%;\n display:grid;\n grid-template-columns: [left] 1fr [middle] auto [right] 1fr;\n grid-template-rows: [top] 1fr [center] auto [bottom] 1fr;\n}\n\n.content {\n grid-column-start: middle;\n grid-row-start: center;\n width: 400px;\n}\n\n.logo-container {\n margin-bottom: 20px\n}\n\n.logo-container > img {\n max-width: 100%;\n}\n\n.login-button-container {\n text-align: right;\n margin-top: 20px;\n}\n\n.incorrect-details-panel {\n margin-top: 30px;\n padding: 10px;\n border-style: solid;\n border-width: 1px;\n border-color: maroon;\n border-radius: 1px;\n text-align: center;\n color: maroon;\n background-color: mistyrose;\n}\n\n.form-root {\n display: grid;\n grid-template-columns: [label] auto [control] 1fr; /* [overflow] auto;*/\n}\n\n.label {\n grid-column-start: label;\n padding: 5px 10px;\n vertical-align: middle;\n}\n.control {\n grid-column-start: control;\n padding: 5px 10px;\n}\n\n.default-input {\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tpadding: 0.4em;\n\tmargin: 0 0 0.5em 0;\n\tbox-sizing: border-box;\n\tborder: 1px solid #ccc;\n border-radius: 2px;\n width: 100%;\n}\n\n.default-button {\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tpadding: 0.4em;\n\tmargin: 0 0 0.5em 0;\n\tbox-sizing: border-box;\n\tborder: 1px solid #ccc;\n\tborder-radius: 2px;\n\tcolor: #333;\n\tbackground-color: #f4f4f4;\n\toutline: none;\n}\n\n.default-button:active {\n\tbackground-color: #ddd;\n}\n\n.default-button:focus {\n\tborder-color: #666;\n}\n\n</style>",
|
||||||
|
"<script>\nexport let containerClass = \"\";\nexport let formControls = [];\n\nexport let _bb;\n\nlet htmlElements = {};\nlet labels = {};\n\n$ : {\n let cIndex = 0;\n for(let c of formControls) {\n labels[cIndex] = c.label;\n cIndex++;\n }\n\n if(_bb && htmlElements) {\n for(let el in htmlElements) {\n _bb.initialiseComponent(\n formControls[el].control,\n htmlElements[el]\n );\n }\n }\n}\n\n</script>\n\n<div class=\"form-root {containerClass}\">\n {#each formControls as child, index}\n <div class=\"label\">{labels[index]}</div>\n <div class=\"control\"\n bind:this={htmlElements[index]}>\n </div>\n {/each}\n</div>\n\n<style>\n.form-root {\n display: grid;\n grid-template-columns: [label] auto [control] 1fr; /* [overflow] auto;*/\n}\n\n.label {\n grid-column-start: label;\n padding: 5px 10px;\n vertical-align: middle;\n}\n.control {\n grid-column-start: control;\n padding: 5px 10px;\n}\n.overflow {\n grid-column-start: overflow;\n}\n.full-width {\n width: 100%;\n}\n</style>",
|
||||||
|
"<script>\r\nimport cssVars from \"./cssVars\";\r\n\r\nexport let navBarBackground = \"\";\r\nexport let navBarBorder=\"\";\r\nexport let navBarColor=\"\";\r\nexport let selectedItemBackground=\"\";\r\nexport let selectedItemColor=\"\";\r\nexport let selectedItemBorder=\"\";\r\nexport let itemHoverBackground=\"\";\r\nexport let itemHoverColor=\"\";\r\nexport let items = [];\r\nexport let hideNavBar=false;\r\nexport let selectedItem=\"\";\r\n\r\nexport let _bb;\r\n\r\nlet selectedIndex = -1;\r\nlet styleVars={};\r\nlet components = {};\r\nlet componentElements = {}\r\n\r\n\r\nconst hasComponentElements = () => \r\n Object.getOwnPropertyNames(componentElements).length > 0;\r\n\r\n$: {\r\n styleVars = {\r\n navBarBackground, navBarBorder,\r\n navBarColor, selectedItemBackground,\r\n selectedItemColor, selectedItemBorder,\r\n itemHoverBackground, itemHoverColor\r\n };\r\n\r\n if(items && items.length > 0 && hasComponentElements()) {\r\n const currentSelectedItem = selectedIndex > 0\r\n ? items[selectedIndex].title\r\n : \"\";\r\n if(selectedItem && currentSelectedItem !== selectedItem) {\r\n let i=0;\r\n for(let item of items) {\r\n if(item.title === selectedItem) {\r\n onSelectItem(i)();\r\n }\r\n i++;\r\n }\r\n } else if(!currentSelectedItem) {\r\n onSelectItem(0);\r\n }\r\n }\r\n}\r\n\r\nconst onSelectItem = (index) => () => {\r\n selectedIndex = index;\r\n if(!components[index]) {\r\n const comp = _bb.initialiseComponent(\r\n items[index].component, componentElements[index]);\r\n components[index] = comp; \r\n }\r\n}\r\n\r\n\r\n</script>\r\n\r\n<div class=\"root\" use:cssVars={styleVars}>\r\n {#if !hideNavBar}\r\n <div class=\"navbar\">\r\n {#each items as navItem, index}\r\n <div class=\"navitem\"\r\n on:click={onSelectItem(index)}\r\n class:selected={selectedIndex === index}>\r\n {navItem.title}\r\n </div>\r\n {/each}\r\n </div>\r\n {/if}\r\n {#each items as navItem, index}\r\n\r\n <div class=\"content\"\r\n bind:this={componentElements[index]}>\r\n </div>\r\n {/each}\r\n</div>\r\n\r\n<style>\r\n\r\n.root {\r\n height: 100%;\r\n width:100%;\r\n grid-template-columns: [navbar] auto [content] 1fr;\r\n display: grid;\r\n}\r\n\r\n.navbar {\r\n grid-column: navbar;\r\n background: var(--navBarBackground);\r\n border: var(--navBarBorder);\r\n color: var(--navBarColor);\r\n}\r\n\r\n.navitem {\r\n padding: 10px 17px;\r\n cursor: pointer;\r\n}\r\n\r\n.navitem:hover {\r\n background: var(--itemHoverBackground);\r\n color: var(--itemHoverColor);\r\n}\r\n\r\n.navitem.selected {\r\n background: var(--selectedItemBackground);\r\n border: var(--selectedItemBorder);\r\n color: var(--selectedItemColor);\r\n}\r\n\r\n.content {\r\n grid-column: content;\r\n}\r\n\r\n</style>\r\n\r\n",
|
||||||
|
"<script>\n\nexport let value=\"\";\nexport let hideValue = false;\nexport let className = \"default\";\n\nexport let _bb;\n\nlet actualValue = \"\";\n$: {\n\tif(_bb && value._isstate) {\n\t\t_bb.store.subscribe(s => {\n\t\t\tactualValue = _bb.store.getValue(s, value);\n\t\t});\n\t}\n}\n\nconst onchange = (ev) => {\n\tif(_bb && value._isstate) {\n\t\t_bb.store.setValue(value, ev.target.value);\n\t} else if(!value._isstate) {\n\t\tactualValue = ev.target.value;\n\t}\n}\n\n</script>\n\n{#if hideValue}\n<input class={className} \n\t type=\"password\" \n\t value={actualValue} on:change/>\n{:else}\n<input class={className} type=\"text\" value={actualValue}/>\n{/if}\n\n<style>\n.default {\n width: 100%;\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tpadding: 0.4em;\n\tmargin: 0 0 0.5em 0;\n\tbox-sizing: border-box;\n\tborder: 1px solid #ccc;\n border-radius: 2px;\n width: 100%;\n}\n\n.default:disabled {\n\tcolor: #ccc;\n}\n\n</style>",
|
||||||
|
"<script>\r\nimport {buildStyle} from \"./buildStyle\";\r\nimport cssVars from \"./cssVars\";\r\n\r\nexport let component=\"\";\r\nexport let text=\"\";\r\nexport let containerClass=\"\";\r\nexport let background=\"\";\r\nexport let border=\"\";\r\nexport let borderRadius=\"\";\r\nexport let font=\"\";\r\nexport let display=\"\";\r\nexport let textAlign=\"\";\r\nexport let color=\"\";\r\nexport let padding=\"\";\r\nexport let margin=\"\";\r\nexport let hoverBackground=\"\";\r\nexport let hoverColor=\"\";\r\nexport let onClick;\r\nexport let height;\r\nexport let width;\r\n\r\nexport let _bb;\r\n\r\nlet styleVars;\r\nlet style=\"\";\r\nlet componentElement;\r\n\r\n$: {\r\n style=buildStyle({\r\n border, background, font, margin,\r\n padding, display, color, height, width,\r\n \"text-align\": textAlign,\r\n \"border-radius\":borderRadius,\r\n cursor: onClick ? \"pointer\" : \"none\"\r\n });\r\n\r\n if(_bb && component) {\r\n _bb.initialiseComponent(component, componentElement);\r\n }\r\n\r\n styleVars = {\r\n hoverBackground:hoverBackground || background, \r\n hoverColor:hoverColor || color\r\n }\r\n}\r\n\r\nconst clickHandler = () => {\r\n if(onClick) onClick();\r\n}\r\n\r\n</script>\r\n\r\n<div class=\"{containerClass} panel\" \r\n style={style}\r\n use:cssVars={styleVars}\r\n this:bind={componentElement}\r\n on:click={clickHandler}>\r\n {component && component._component ? \"\" : text}\r\n</div>\r\n\r\n<style>\r\n\r\n.panel:hover {\r\n background: var(--hoverBackground);\r\n color: var(--hoverColor);\r\n\r\n}\r\n\r\n</style>\r\n",
|
||||||
|
"<script>\n\nimport { emptyProps } from \"./emptyProps\";\n\nexport let direction = \"horizontal\";\nexport let children = [];\nexport let width = \"auto\";\nexport let height = \"auto\";\nexport let containerClass=\"\";\nexport let itemContainerClass=\"\";\nexport let onLoad;\n\nexport let data=[];\nexport let dataItemComponent;\n\nexport let _bb;\n\nlet staticHtmlElements = {};\nlet staticComponents = {};\nlet dataBoundElements = {};\nlet dataBoundComponents = {};\n\nlet onLoadCalled = false;\n\nconst hasDataBoundComponents = () => \n Object.getOwnPropertyNames(dataBoundComponents).length > 0;\n\nconst hasData = () => \n Array.isArray(data) && data.length > 0;\n\nconst hasStaticComponents = () => {\n return Object.getOwnPropertyNames(staticComponents).length > 0;\n}\n\n$: {\n\n if(staticHtmlElements) {\n if(hasStaticComponents()) {\n for(let c in staticComponents) {\n staticComponents[c].$destroy();\n }\n staticComponents = {};\n }\n\n for(let el in staticHtmlElements) {\n staticComponents[el] = _bb.initialiseComponent(\n children[el].control,\n staticHtmlElements[el]\n );\n }\n }\n \n\n if(hasDataBoundComponents()) {\n for(let c in dataBoundComponents) {\n dataBoundComponents[c].$destroy();\n }\n dataBoundComponents = {};\n }\n\n if(hasData()) {\n let index = 0;\n for(let d in dataBoundElements) {\n _bb.initialiseComponent(\n dataItemComponent,\n dataBoundElements[d],\n data[parseInt(d)]\n );\n }\n }\n\n if(!onLoadCalled && onLoad && !onLoad.isPlaceholder) {\n onLoad();\n onLoadCalled = true;\n }\n}\n\n\n</script>\n\n<div class=\"root {containerClass}\"\n style=\"width: {width}; height: {height}\">\n\n {#if children}\n {#each children as child, index}\n <div class={direction}>\n <div class=\"{itemContainerClass}\"\n bind:this={staticHtmlElements[index]}>\n </div>\n </div>\n {/each}\n {/if}\n\n {#if data && data.length > 0}\n {#each data as child, index}\n <div class={direction}>\n <div class=\"{itemContainerClass}\"\n bind:this={dataBoundElements[index]}>\n </div>\n </div>\n {/each}\n {/if}\n</div>\n\n<style>\n\n.horizontal {\n display:inline-block;\n}\n\n.vertical {\n display: block;\n}\n\n</style>",
|
||||||
|
"<script>\r\n\r\nexport let columns=[];\r\nexport let data=\"\";\r\nexport let tableClass=\"\";\r\nexport let theadClass=\"\";\r\nexport let tbodyClass=\"\";\r\nexport let trClass=\"\";\r\nexport let thClass=\"\";\r\nexport let onRowClick;\r\n\r\nexport let _bb;\r\n\r\nconst rowClickHandler = (row) => () => {\r\n onRowClick(row);\r\n}\r\n\r\n</script>\r\n\r\n <table class={tableClass}>\r\n <thead class={theadClass}>\r\n <tr class={trClass}>\r\n {#each columns as col}\r\n <th class={thClass}>{col.title}</th>\r\n {/each}\r\n </tr>\r\n </thead>\r\n <tbody class={tbodyClass}>\r\n {#each data as row}\r\n <tr class={trClass}\r\n on:click={rowClickHandler(row)} >\r\n {#each columns as col}\r\n <th class={thClass}>{_bb.getStateOrValue(col.value, row)}</th>\r\n {/each}\r\n </tr>\r\n {/each}\r\n </tbody>\r\n</table> \r\n\r\n<style>\r\n\r\n.table-default {\r\n width: 100%;\r\n margin-bottom: 1rem;\r\n color: #212529;\r\n border-collapse: collapse;\r\n}\r\n\r\n.table-default .thead-default .th-default {\r\n vertical-align: bottom;\r\n border-bottom: 2px solid #dee2e6;\r\n font-weight: bold;\r\n}\r\n\r\n.table-default .th-default {\r\n padding: .75rem;\r\n vertical-align: top;\r\n border-top: 1px solid #dee2e6;\r\n font-weight: normal;\r\n}\r\n\r\n.th-default {\r\n text-align: inherit;\r\n}\r\n\r\n.table-default .tbody-default .tr-default:hover {\r\n color: #212529;\r\n background-color: rgba(0,0,0,.075);\r\n cursor: pointer;\r\n}\r\n\r\n</style>",
|
||||||
|
"<script>\nexport let className = \"default\";\nexport let disabled = false;\nexport let contentText;\nexport let contentComponent;\nexport let onClick = () => {};\n\nexport let _bb;\nlet contentComponentContainer;\n\n$:{\n\tif(_bb && contentComponentContainer && contentComponent._component)\n\t\t_bb.initialiseComponent(contentComponent, contentComponentContainer);\n}\n\n\nconst clickHandler = () => {\n\tif(onClick) onClick();\n}\n\n</script>\n\n\n<button class={className} {disabled} on:click={clickHandler}>\n {#if contentComponent && contentComponent._component}\n\t<div bind:this={contentComponentContainer}>\n\t</div>\n {:else if contentText}\n {contentText}\n {:else}\n <slot />\n {/if}\n</button>\n\n\n<style>\n\n.default {\n\tfont-family: inherit;\n\tfont-size: inherit;\n\tpadding: 0.4em;\n\tmargin: 0 0 0.5em 0;\n\tbox-sizing: border-box;\n\tborder: 1px solid #ccc;\n\tborder-radius: 2px;\n\tcolor: #333;\n\tbackground-color: #f4f4f4;\n\toutline: none;\n}\n\n.default:active {\n\tbackground-color: #ddd;\n}\n\n.default:focus {\n\tborder-color: #666;\n}\n\n</style>"
|
||||||
|
],
|
||||||
|
"names": [],
|
||||||
|
"mappings": "AAkCA,kBAAkB,eAAC,CAAC,AAChB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,AACf,CAAC;ACqBD,KAAK,eAAC,CAAC,AACH,OAAO,CAAE,IAAI,AACjB,CAAC;ACqCD,KAAK,cAAC,CAAC,AACH,MAAM,CAAE,IAAI,CACZ,QAAQ,IAAI,CACZ,qBAAqB,CAAE,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,CAC3D,kBAAkB,CAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,AAC5D,CAAC,AAED,QAAQ,cAAC,CAAC,AACN,iBAAiB,CAAE,MAAM,CACzB,cAAc,CAAE,MAAM,CACtB,KAAK,CAAE,KAAK,AAChB,CAAC,AAED,eAAe,cAAC,CAAC,AACb,aAAa,CAAE,IAAI;AACvB,CAAC,AAED,6BAAe,CAAG,GAAG,cAAC,CAAC,AACnB,SAAS,CAAE,IAAI,AACnB,CAAC,AAED,uBAAuB,cAAC,CAAC,AACrB,UAAU,CAAE,KAAK,CACjB,UAAU,CAAE,IAAI,AACpB,CAAC,AAED,wBAAwB,cAAC,CAAC,AACtB,UAAU,CAAE,IAAI,CAChB,OAAO,CAAE,IAAI,CACb,YAAY,CAAE,KAAK,CACnB,YAAY,CAAE,GAAG,CACjB,YAAY,CAAE,MAAM,CACpB,aAAa,CAAE,GAAG,CAClB,UAAU,CAAE,MAAM,CAClB,KAAK,CAAE,MAAM,CACb,gBAAgB,CAAE,SAAS,AAC/B,CAAC,AAED,UAAU,cAAC,CAAC,AACR,OAAO,CAAE,IAAI,CACb,qBAAqB,CAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,AACrD,CAAC,AAED,MAAM,cAAC,CAAC,AACJ,iBAAiB,CAAE,KAAK,CACxB,OAAO,CAAE,GAAG,CAAC,IAAI,CACjB,cAAc,CAAE,MAAM,AAC1B,CAAC,AACD,QAAQ,cAAC,CAAC,AACN,iBAAiB,CAAE,OAAO,CAC1B,OAAO,CAAE,GAAG,CAAC,IAAI,AACrB,CAAC,AAED,cAAc,cAAC,CAAC,AACf,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,OAAO,CAClB,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACnB,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CACnB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,IAAI,AACf,CAAC,AAED,eAAe,cAAC,CAAC,AAChB,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,OAAO,CAClB,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACnB,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CACtB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,IAAI,CACX,gBAAgB,CAAE,OAAO,CACzB,OAAO,CAAE,IAAI,AACd,CAAC,AAED,6BAAe,OAAO,AAAC,CAAC,AACvB,gBAAgB,CAAE,IAAI,AACvB,CAAC,AAED,6BAAe,MAAM,AAAC,CAAC,AACtB,YAAY,CAAE,IAAI,AACnB,CAAC;AC9ID,UAAU,cAAC,CAAC,AACR,OAAO,CAAE,IAAI,CACb,qBAAqB,CAAE,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,AACrD,CAAC,AAED,MAAM,cAAC,CAAC,AACJ,iBAAiB,CAAE,KAAK,CACxB,OAAO,CAAE,GAAG,CAAC,IAAI,CACjB,cAAc,CAAE,MAAM,AAC1B,CAAC,AACD,QAAQ,cAAC,CAAC,AACN,iBAAiB,CAAE,OAAO,CAC1B,OAAO,CAAE,GAAG,CAAC,IAAI,AACrB,CAAC,AACD,SAAS,cAAC,CAAC,AACP,iBAAiB,CAAE,QAAQ,AAC/B,CAAC,AACD,WAAW,cAAC,CAAC,AACT,KAAK,CAAE,IAAI,AACf,CAAC;AC6BD,KAAK,cAAC,CAAC,AACH,MAAM,CAAE,IAAI,CACZ,MAAM,IAAI,CACV,qBAAqB,CAAE,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,GAAG,CAClD,OAAO,CAAE,IAAI,AACjB,CAAC,AAED,OAAO,cAAC,CAAC,AACL,WAAW,CAAE,MAAM,CACnB,UAAU,CAAE,IAAI,kBAAkB,CAAC,CACnC,MAAM,CAAE,IAAI,cAAc,CAAC,CAC3B,KAAK,CAAE,IAAI,aAAa,CAAC,AAC7B,CAAC,AAED,QAAQ,cAAC,CAAC,AACN,OAAO,CAAE,IAAI,CAAC,IAAI,CAClB,MAAM,CAAE,OAAO,AACnB,CAAC,AAED,sBAAQ,MAAM,AAAC,CAAC,AACZ,UAAU,CAAE,IAAI,qBAAqB,CAAC,CACtC,KAAK,CAAE,IAAI,gBAAgB,CAAC,AAChC,CAAC,AAED,QAAQ,SAAS,cAAC,CAAC,AACf,UAAU,CAAE,IAAI,wBAAwB,CAAC,CACzC,MAAM,CAAE,IAAI,oBAAoB,CAAC,CACjC,KAAK,CAAE,IAAI,mBAAmB,CAAC,AACnC,CAAC,AAED,QAAQ,cAAC,CAAC,AACN,WAAW,CAAE,OAAO,AACxB,CAAC;AClFD,QAAQ,eAAC,CAAC,AACN,KAAK,CAAE,IAAI,CACd,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,OAAO,CAClB,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACnB,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CACnB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,IAAI,AACf,CAAC,AAED,uBAAQ,SAAS,AAAC,CAAC,AAClB,KAAK,CAAE,IAAI,AACZ,CAAC;ACaD,oBAAM,MAAM,AAAC,CAAC,AACV,UAAU,CAAE,IAAI,iBAAiB,CAAC,CAClC,KAAK,CAAE,IAAI,YAAY,CAAC,AAE5B,CAAC;ACuCD,WAAW,cAAC,CAAC,AACT,QAAQ,YAAY,AACxB,CAAC,AAED,SAAS,cAAC,CAAC,AACP,OAAO,CAAE,KAAK,AAClB,CAAC;ACvED,cAAc,cAAC,CAAC,AACZ,KAAK,CAAE,IAAI,CACX,aAAa,CAAE,IAAI,CACnB,KAAK,CAAE,OAAO,CACd,eAAe,CAAE,QAAQ,AAC7B,CAAC,AAED,4BAAc,CAAC,cAAc,CAAC,WAAW,cAAC,CAAC,AACvC,cAAc,CAAE,MAAM,CACtB,aAAa,CAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAChC,WAAW,CAAE,IAAI,AACrB,CAAC,AAED,4BAAc,CAAC,WAAW,cAAC,CAAC,AACxB,OAAO,CAAE,MAAM,CACf,cAAc,CAAE,GAAG,CACnB,UAAU,CAAE,GAAG,CAAC,KAAK,CAAC,OAAO,CAC7B,WAAW,CAAE,MAAM,AACvB,CAAC,AAED,WAAW,cAAC,CAAC,AACT,UAAU,CAAE,OAAO,AACvB,CAAC,AAED,4BAAc,CAAC,cAAc,CAAC,yBAAW,MAAM,AAAC,CAAC,AAC7C,KAAK,CAAE,OAAO,CACd,gBAAgB,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAClC,MAAM,CAAE,OAAO,AACnB,CAAC;AChCD,QAAQ,eAAC,CAAC,AACT,WAAW,CAAE,OAAO,CACpB,SAAS,CAAE,OAAO,CAClB,OAAO,CAAE,KAAK,CACd,MAAM,CAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CACnB,UAAU,CAAE,UAAU,CACtB,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,CACtB,aAAa,CAAE,GAAG,CAClB,KAAK,CAAE,IAAI,CACX,gBAAgB,CAAE,OAAO,CACzB,OAAO,CAAE,IAAI,AACd,CAAC,AAED,uBAAQ,OAAO,AAAC,CAAC,AAChB,gBAAgB,CAAE,IAAI,AACvB,CAAC,AAED,uBAAQ,MAAM,AAAC,CAAC,AACf,YAAY,CAAE,IAAI,AACnB,CAAC"
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -0,0 +1 @@
|
||||||
|
window['##BUDIBASE_APPDEFINITION##'] = {"hierarchy":{"name":"root","type":"root","children":[{"name":"customer","type":"record","fields":[{"name":"name","type":"string","typeOptions":{"maxLength":1000,"values":null,"allowDeclaredValuesOnly":false},"label":"name","getInitialValue":"default","getUndefinedValue":"default"}],"children":[{"name":"invoiceyooo","type":"record","fields":[{"name":"amount","type":"number","typeOptions":{"minValue":99999999999,"maxValue":99999999999,"decimalPlaces":2},"label":"amount","getInitialValue":"default","getUndefinedValue":"default"}],"children":[],"validationRules":[],"nodeId":2,"indexes":[],"allidsShardFactor":1,"collectionName":"invoices","isSingle":false}],"validationRules":[],"nodeId":1,"indexes":[{"name":"customer_invoices","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[2],"nodeId":5}],"allidsShardFactor":64,"collectionName":"customers","isSingle":false}],"pathMaps":[],"indexes":[{"name":"Yeo index","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[1],"nodeId":4},{"name":"everyones_invoices","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[2],"nodeId":6}],"nodeId":0},"componentLibraries":["budibase-standard-components"],"appRootPath":"/testApp2","props":{}}
|
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
|
@ -0,0 +1,62 @@
|
||||||
|
html, body {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: #333;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: rgb(0,100,200);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:visited {
|
||||||
|
color: rgb(0,80,160);
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, button, select, textarea {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:disabled {
|
||||||
|
color: #ccc;
|
||||||
|
}
|
||||||
|
|
||||||
|
input[type="range"] {
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
color: #333;
|
||||||
|
background-color: #f4f4f4;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:active {
|
||||||
|
background-color: #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:focus {
|
||||||
|
border-color: #666;
|
||||||
|
}
|
|
@ -0,0 +1,18 @@
|
||||||
|
<!doctype html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset='utf8'>
|
||||||
|
<meta name='viewport' content='width=device-width'>
|
||||||
|
|
||||||
|
<title>Svelte app</title>
|
||||||
|
|
||||||
|
<link rel='icon' type='image/png' href='/favicon.png'>
|
||||||
|
<link rel='stylesheet' href='/global.css'>
|
||||||
|
<link rel='stylesheet' href='/bundle.css'>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<script src='/bundle.js'></script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
import svelte from 'rollup-plugin-svelte';
|
||||||
|
import resolve from 'rollup-plugin-node-resolve';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'src/index.js',
|
||||||
|
output: [
|
||||||
|
{
|
||||||
|
file: "dist/index.js",
|
||||||
|
format: 'esm',
|
||||||
|
name:"budibaseStandardComponents",
|
||||||
|
sourcemap: "inline"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
svelte({
|
||||||
|
hydratable:true
|
||||||
|
}),
|
||||||
|
resolve()
|
||||||
|
]
|
||||||
|
};
|
|
@ -0,0 +1,16 @@
|
||||||
|
import resolve from 'rollup-plugin-node-resolve';
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'src/generators.js',
|
||||||
|
output: [
|
||||||
|
{
|
||||||
|
file: "dist/generators.js",
|
||||||
|
format: 'esm',
|
||||||
|
name:"budibaseStandardComponents",
|
||||||
|
sourcemap: "inline"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
plugins: [
|
||||||
|
resolve()
|
||||||
|
]
|
||||||
|
};
|
|
@ -0,0 +1,89 @@
|
||||||
|
import svelte from 'rollup-plugin-svelte';
|
||||||
|
import resolve from 'rollup-plugin-node-resolve';
|
||||||
|
import commonjs from 'rollup-plugin-commonjs';
|
||||||
|
import livereload from 'rollup-plugin-livereload';
|
||||||
|
import { terser } from 'rollup-plugin-terser';
|
||||||
|
import json from 'rollup-plugin-json';
|
||||||
|
|
||||||
|
const production = !process.env.ROLLUP_WATCH;
|
||||||
|
|
||||||
|
const lodash_fp_exports = [
|
||||||
|
"find", "isUndefined", "split",
|
||||||
|
"last", "union", "reduce", "isObject",
|
||||||
|
"cloneDeep", "some", "isArray", "map",
|
||||||
|
"filter", "keys", "isFunction", "isEmpty",
|
||||||
|
"countBy", "join", "includes", "flatten",
|
||||||
|
"constant", "first", "intersection", "take",
|
||||||
|
"has", "mapValues", "isString", "isBoolean",
|
||||||
|
"isNull", "isNumber", "isObjectLike", "isDate",
|
||||||
|
"clone", "values", "keyBy", "isNaN",
|
||||||
|
"isInteger", "toNumber"];
|
||||||
|
|
||||||
|
const lodash_exports = [
|
||||||
|
"flow", "head",
|
||||||
|
"tail", "findIndex", "startsWith",
|
||||||
|
"dropRight", "takeRight",
|
||||||
|
"trim", "split", "replace",
|
||||||
|
"merge", "assign"];
|
||||||
|
|
||||||
|
const coreExternal = [
|
||||||
|
"lodash", "lodash/fp", "date-fns",
|
||||||
|
"lunr", "safe-buffer", "shortid",
|
||||||
|
"@nx-js/compiler-util"
|
||||||
|
];
|
||||||
|
|
||||||
|
export default {
|
||||||
|
input: 'src/Test/testMain.js',
|
||||||
|
output: {
|
||||||
|
sourcemap: true,
|
||||||
|
format: 'iife',
|
||||||
|
name: 'app',
|
||||||
|
file: 'public/bundle.js'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
svelte({
|
||||||
|
// enable run-time checks when not in production
|
||||||
|
dev: !production,
|
||||||
|
// we'll extract any component CSS out into
|
||||||
|
// a separate file — better for performance
|
||||||
|
css: css => {
|
||||||
|
css.write('public/bundle.css');
|
||||||
|
},
|
||||||
|
|
||||||
|
hydratable:true
|
||||||
|
}),
|
||||||
|
|
||||||
|
// If you have external dependencies installed from
|
||||||
|
// npm, you'll most likely need these plugins. In
|
||||||
|
// some cases you'll need additional configuration —
|
||||||
|
// consult the documentation for details:
|
||||||
|
// https://github.com/rollup/rollup-plugin-commonjs
|
||||||
|
resolve({
|
||||||
|
browser: true,
|
||||||
|
dedupe: importee => {
|
||||||
|
return importee === 'svelte'
|
||||||
|
|| importee.startsWith('svelte/')
|
||||||
|
|| coreExternal.includes(importee);
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
commonjs({
|
||||||
|
namedExports: {
|
||||||
|
"lodash/fp": lodash_fp_exports,
|
||||||
|
"lodash":lodash_exports,
|
||||||
|
"shortid": ["generate"]
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
json(),
|
||||||
|
|
||||||
|
// Watch the `public` directory and refresh the
|
||||||
|
// browser on changes when not in production
|
||||||
|
!production && livereload('public'),
|
||||||
|
|
||||||
|
// If we're building for production (npm run build
|
||||||
|
// instead of npm run dev), minify
|
||||||
|
production && terser()
|
||||||
|
],
|
||||||
|
watch: {
|
||||||
|
clearScreen: false
|
||||||
|
}
|
||||||
|
};
|
|
@ -0,0 +1,61 @@
|
||||||
|
const { readdir, stat, copyFile } = require("fs-extra");
|
||||||
|
const { constants } = require("fs");
|
||||||
|
const { join, basename } = require("path");
|
||||||
|
|
||||||
|
const packagesFolder = "..";
|
||||||
|
|
||||||
|
const jsFile = dir => join(dir, "index.js");
|
||||||
|
const generatorsFile = dir => join(dir, "generators.js");
|
||||||
|
const jsMapFile = dir => join(dir, "index.js.map");
|
||||||
|
const sourceJs = jsFile("dist");
|
||||||
|
const sourceJsMap = jsMapFile("dist");
|
||||||
|
const componentsFile = "components.json";
|
||||||
|
const sourceGenerators = generatorsFile("dist");
|
||||||
|
|
||||||
|
const appPackages = join(packagesFolder, "server", "appPackages");
|
||||||
|
|
||||||
|
const publicMain = appName => join(appPackages, appName, "public", "main", "lib", "node_modules", "@budibase", "bootstrap-components");
|
||||||
|
const publicUnauth = appName => join(appPackages, appName, "public", "unauthenticated", "lib", "node_modules", "@budibase", "bootstrap-components");
|
||||||
|
const nodeModulesDist = appName => join(appPackages, appName, "node_modules", "@budibase", "bootstrap-components", "dist");
|
||||||
|
const nodeModules = appName => join(appPackages, appName, "node_modules", "@budibase", "bootstrap-components");
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
|
||||||
|
const apps = await readdir(appPackages);
|
||||||
|
|
||||||
|
const copySource = file => async toDir => {
|
||||||
|
const dest = join(toDir, basename(file));
|
||||||
|
try {
|
||||||
|
await copyFile(file, dest, constants.COPYFILE_FICLONE);
|
||||||
|
console.log(`COPIED ${file} to ${dest}`);
|
||||||
|
} catch(e) {
|
||||||
|
console.log(`COPY FAILED ${file} to ${dest}: ${e}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const copySourceJs = copySource(sourceJs);
|
||||||
|
const copySourceJsMap = copySource(sourceJsMap);
|
||||||
|
const copyGenerators = copySource(sourceGenerators);
|
||||||
|
const copyComponentsJson = copySource(componentsFile);
|
||||||
|
|
||||||
|
|
||||||
|
for(let app of apps) {
|
||||||
|
if(!(await stat(join(appPackages, app))).isDirectory()) continue;
|
||||||
|
|
||||||
|
await copySourceJs(nodeModulesDist(app));
|
||||||
|
await copySourceJsMap(nodeModulesDist(app));
|
||||||
|
await copyGenerators(nodeModulesDist(app));
|
||||||
|
|
||||||
|
await copyComponentsJson(nodeModules(app));
|
||||||
|
|
||||||
|
await copySourceJs(join(publicMain(app), "dist"));
|
||||||
|
await copySourceJsMap(join(publicMain(app), "dist"));
|
||||||
|
await copyGenerators(join(publicMain(app), "dist"));
|
||||||
|
|
||||||
|
|
||||||
|
await copySourceJs(join(publicUnauth(app), "dist"));
|
||||||
|
await copySourceJsMap(join(publicUnauth(app), "dist"));
|
||||||
|
await copyGenerators(join(publicUnauth(app), "dist"));
|
||||||
|
}
|
||||||
|
|
||||||
|
})();
|
|
@ -0,0 +1,128 @@
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export let items = [];
|
||||||
|
export let hideNavBar=false;
|
||||||
|
export let selectedItem="";
|
||||||
|
export let orientation="horizontal"; // horizontal, verical
|
||||||
|
export let alignment="left"; // start, center, end
|
||||||
|
export let pills=false;
|
||||||
|
export let fill=false;
|
||||||
|
export let _bb;
|
||||||
|
|
||||||
|
let selectedIndex = -1;
|
||||||
|
let styleVars={};
|
||||||
|
let components = {};
|
||||||
|
let componentElements = {}
|
||||||
|
let orientationClass="";
|
||||||
|
let navClasses="";
|
||||||
|
|
||||||
|
const hasComponentElements = () =>
|
||||||
|
Object.getOwnPropertyNames(componentElements).length > 0;
|
||||||
|
|
||||||
|
$: {
|
||||||
|
|
||||||
|
let _navClasses = "";
|
||||||
|
|
||||||
|
if(orientation === "vertical") {
|
||||||
|
_navClasses += " flex-column";
|
||||||
|
} else {
|
||||||
|
_navClasses += ` justify-content-${alignment}`;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(pills)
|
||||||
|
_navClasses += " nav-pills";
|
||||||
|
|
||||||
|
if(fill)
|
||||||
|
_navClasses += " nav-fill nav-justified";
|
||||||
|
|
||||||
|
navClasses = _navClasses;
|
||||||
|
|
||||||
|
if(items && items.length > 0 && hasComponentElements()) {
|
||||||
|
const currentSelectedItem = selectedIndex > 0
|
||||||
|
? items[selectedIndex].title
|
||||||
|
: "";
|
||||||
|
if(selectedItem && currentSelectedItem !== selectedItem) {
|
||||||
|
let i=0;
|
||||||
|
for(let item of items) {
|
||||||
|
if(item.title === selectedItem) {
|
||||||
|
onSelectItem(i)();
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
} else if(!currentSelectedItem) {
|
||||||
|
onSelectItem(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const onSelectItem = (index) => () => {
|
||||||
|
selectedIndex = index;
|
||||||
|
if(!components[index]) {
|
||||||
|
const comp = _bb.initialiseComponent(
|
||||||
|
items[index].component, componentElements[index]);
|
||||||
|
components[index] = comp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="root">
|
||||||
|
{#if !hideNavBar}
|
||||||
|
<nav class="nav {navClasses}">
|
||||||
|
{#each items as navItem, index}
|
||||||
|
<div class="nav-item"
|
||||||
|
on:click={onSelectItem(index)}
|
||||||
|
class:disabled={navItem.disabled}
|
||||||
|
class:active={selectedIndex === index}>
|
||||||
|
{navItem.title}
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</nav>
|
||||||
|
{/if}
|
||||||
|
{#each items as navItem, index}
|
||||||
|
|
||||||
|
<div class="content"
|
||||||
|
bind:this={componentElements[index]}>
|
||||||
|
</div>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
.root {
|
||||||
|
height: 100%;
|
||||||
|
width:100%;
|
||||||
|
grid-template-columns: [navbar] auto [content] 1fr;
|
||||||
|
display: grid;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar {
|
||||||
|
grid-column: navbar;
|
||||||
|
background: var(--navBarBackground);
|
||||||
|
border: var(--navBarBorder);
|
||||||
|
color: var(--navBarColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navitem {
|
||||||
|
padding: 10px 17px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navitem:hover {
|
||||||
|
background: var(--itemHoverBackground);
|
||||||
|
color: var(--itemHoverColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
.navitem.selected {
|
||||||
|
background: var(--selectedItemBackground);
|
||||||
|
border: var(--selectedItemBorder);
|
||||||
|
color: var(--selectedItemColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
.content {
|
||||||
|
grid-column: content;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
<script>
|
||||||
|
import createApp from "./createApp";
|
||||||
|
import { props } from "./props";
|
||||||
|
|
||||||
|
let _bb;
|
||||||
|
|
||||||
|
const _appPromise = createApp();
|
||||||
|
_appPromise.then(a => _bb = a);
|
||||||
|
|
||||||
|
const testProps = props.hiddenNav;
|
||||||
|
|
||||||
|
let currentComponent;
|
||||||
|
|
||||||
|
$: {
|
||||||
|
if(_bb && currentComponent) {
|
||||||
|
_bb.initialiseComponent(testProps, currentComponent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{#await _appPromise}
|
||||||
|
loading
|
||||||
|
{:then _bb}
|
||||||
|
|
||||||
|
<div id="current_component" bind:this={currentComponent}>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/await}
|
||||||
|
|
||||||
|
|
||||||
|
<style>
|
||||||
|
#current_component {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
import { writable } from "svelte/store";
|
||||||
|
import Login from "../Login.svelte";
|
||||||
|
import Grid from "../Grid.svelte";
|
||||||
|
import Form from "../Form.svelte";
|
||||||
|
import Textbox from "../Textbox.svelte";
|
||||||
|
import Text from "../Text.svelte";
|
||||||
|
import Nav from "../Nav.svelte";
|
||||||
|
import Panel from "../Panel.svelte";
|
||||||
|
import StackPanel from "../StackPanel.svelte";
|
||||||
|
import Table from "../Table.svelte";
|
||||||
|
import Button from "../Button.svelte";
|
||||||
|
import { createApp } from "@budibase/client/src/createApp";
|
||||||
|
|
||||||
|
export default async () => {
|
||||||
|
|
||||||
|
const componentLibraries = {
|
||||||
|
components : {
|
||||||
|
login : Login,
|
||||||
|
grid : Grid,
|
||||||
|
form : Form,
|
||||||
|
textbox : Textbox,
|
||||||
|
text: Text,
|
||||||
|
nav: Nav,
|
||||||
|
panel: Panel,
|
||||||
|
table: Table,
|
||||||
|
stackpanel: StackPanel,
|
||||||
|
button: Button
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const appDef = {hierarchy:{}, actions:{}};
|
||||||
|
const user = {name:"yeo", permissions:[]};
|
||||||
|
|
||||||
|
var app = createApp(componentLibraries, appDef, user);
|
||||||
|
app.store.update(s => {
|
||||||
|
s.people = [
|
||||||
|
{name:"bob", address: "123 Main Street", status: "Open"},
|
||||||
|
{name:"poppy", address: "456 Side Road", status: "Closed"},
|
||||||
|
{name:"Oscar", address: "678 Dodgy Alley", status: "Open"},
|
||||||
|
];
|
||||||
|
return s;
|
||||||
|
})
|
||||||
|
|
||||||
|
return app;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,253 @@
|
||||||
|
|
||||||
|
export const props = {
|
||||||
|
|
||||||
|
login: { _component:"components/login" },
|
||||||
|
|
||||||
|
form: {
|
||||||
|
_component: "components/form",
|
||||||
|
formControls: [
|
||||||
|
{
|
||||||
|
control: {
|
||||||
|
_component: "components/textbox"
|
||||||
|
},
|
||||||
|
label:"First Name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
control: {
|
||||||
|
_component: "components/textbox"
|
||||||
|
},
|
||||||
|
label:"Last Name"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
nav: {
|
||||||
|
_component: "components/nav",
|
||||||
|
navBarBackground: "red",
|
||||||
|
navBarBorder: "1px solid maroon",
|
||||||
|
navBarColor: "black",
|
||||||
|
selectedItemBackground: "maroon",
|
||||||
|
selectedItemColor: "white",
|
||||||
|
selectedItemBorder: "green",
|
||||||
|
itemHoverBackground: "yellow",
|
||||||
|
itemHoverColor: "pink",
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
title: "People",
|
||||||
|
component: {
|
||||||
|
_component: "components/panel",
|
||||||
|
text:"People Panel",
|
||||||
|
padding: "40px",
|
||||||
|
border: "2px solid pink",
|
||||||
|
background: "mistyrose"
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Animals",
|
||||||
|
component: {
|
||||||
|
_component: "components/panel",
|
||||||
|
text:"Animals Panel",
|
||||||
|
padding: "40px",
|
||||||
|
border: "2px solid green",
|
||||||
|
background: "azure"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
|
||||||
|
table: {
|
||||||
|
_component:"components/table",
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: {
|
||||||
|
"##bbstate":"NameColumnName",
|
||||||
|
"##bbsource":"store",
|
||||||
|
"##bbstatefallback": "Name"
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
"##bbstate":"name",
|
||||||
|
"##bbsource":"context"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Address",
|
||||||
|
value: {
|
||||||
|
"##bbstate":"address",
|
||||||
|
"##bbsource":"context"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Status",
|
||||||
|
value: {
|
||||||
|
"##bbstate":"status",
|
||||||
|
"##bbsource":"context"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
data: {
|
||||||
|
"##bbstate":"people"
|
||||||
|
},
|
||||||
|
onRowClick: [
|
||||||
|
{
|
||||||
|
"##eventHandlerType": "Set State",
|
||||||
|
parameters: {
|
||||||
|
path: "NameColumnName",
|
||||||
|
value: {
|
||||||
|
"##bbstate":"name",
|
||||||
|
"##bbsource":"context",
|
||||||
|
"##bbstatefallback": "balls to that"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
tableClass: "table-default",
|
||||||
|
theadClass: "thead-default",
|
||||||
|
tbodyClass: "tbody-default",
|
||||||
|
trClass: "tr-default",
|
||||||
|
thClass: "th-default"
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
grid: {
|
||||||
|
_component: "components/grid",
|
||||||
|
gridTemplateColumns: "[left] auto [center] auto [right] auto",
|
||||||
|
gridTemplateRows: "[top] auto [middle] auto [bottom] auto",
|
||||||
|
children : [
|
||||||
|
{
|
||||||
|
control: {
|
||||||
|
_component: "components/text",
|
||||||
|
value: "1",
|
||||||
|
background: "blue",
|
||||||
|
textAlign:"center",
|
||||||
|
color: "white"
|
||||||
|
},
|
||||||
|
gridColumn: "left",
|
||||||
|
gridRow: "top"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
control: {
|
||||||
|
_component: "components/text",
|
||||||
|
value: "2",
|
||||||
|
background: "red",
|
||||||
|
textAlign:"center",
|
||||||
|
color: "white",
|
||||||
|
padding: "10px"
|
||||||
|
},
|
||||||
|
gridColumn: "center",
|
||||||
|
gridRow: "middle"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
control: {
|
||||||
|
_component: "components/text",
|
||||||
|
value: "3",
|
||||||
|
background: "yellow",
|
||||||
|
textAlign:"center",
|
||||||
|
color: "black"
|
||||||
|
},
|
||||||
|
gridColumn: "right",
|
||||||
|
gridRow: "bottom"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
boundStackPanel: {
|
||||||
|
_component: "components/stackpanel",
|
||||||
|
direction: "horizontal",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
control: {
|
||||||
|
_component: "components/text",
|
||||||
|
value: "STATIC"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
data: {
|
||||||
|
"##bbstate":"people"
|
||||||
|
},
|
||||||
|
dataItemComponent: {
|
||||||
|
_component: "components/panel",
|
||||||
|
text: {
|
||||||
|
"##bbstate":"name",
|
||||||
|
"##bbsource":"context",
|
||||||
|
"##bbstatefallback": "balls to that"
|
||||||
|
},
|
||||||
|
padding: "10px",
|
||||||
|
border: "5px solid black",
|
||||||
|
margin: "10px",
|
||||||
|
hoverColor: "white",
|
||||||
|
hoverBackground: "black",
|
||||||
|
height:"200px",
|
||||||
|
weight:"200px"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
hiddenNav: {
|
||||||
|
_component: "components/stackpanel",
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
control:{
|
||||||
|
_component: "components/button",
|
||||||
|
contentText: "Peep",
|
||||||
|
onClick: [
|
||||||
|
{
|
||||||
|
"##eventHandlerType": "Set State",
|
||||||
|
parameters: {
|
||||||
|
path: "selected",
|
||||||
|
value: "People"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
control:{
|
||||||
|
_component: "components/button",
|
||||||
|
contentText: "Ani",
|
||||||
|
onClick: [
|
||||||
|
{
|
||||||
|
"##eventHandlerType": "Set State",
|
||||||
|
parameters: {
|
||||||
|
path: "selected",
|
||||||
|
value: "Animals"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
control: {
|
||||||
|
_component: "components/nav",
|
||||||
|
hideNavBar: true,
|
||||||
|
selectedItem: {
|
||||||
|
"##bbstate":"selected",
|
||||||
|
"##bbsource":"store",
|
||||||
|
"##bbstatefallback": "Animals"
|
||||||
|
},
|
||||||
|
items: [
|
||||||
|
{
|
||||||
|
title: "People",
|
||||||
|
component: {
|
||||||
|
_component: "components/panel",
|
||||||
|
text:"People Panel",
|
||||||
|
padding: "40px",
|
||||||
|
border: "2px solid pink",
|
||||||
|
background: "mistyrose"
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Animals",
|
||||||
|
component: {
|
||||||
|
_component: "components/panel",
|
||||||
|
text:"Animals Panel",
|
||||||
|
padding: "40px",
|
||||||
|
border: "2px solid green",
|
||||||
|
background: "azure"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
import App from './TestApp.svelte';
|
||||||
|
|
||||||
|
const app = new App({
|
||||||
|
target: document.body,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default app;
|
|
@ -0,0 +1,9 @@
|
||||||
|
export const buildStyle = (styles) => {
|
||||||
|
let str = "";
|
||||||
|
for(let s in styles) {
|
||||||
|
if(styles[s]) {
|
||||||
|
str += `${s}: ${styles[s]}; `
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
// https://github.com/kaisermann/svelte-css-vars
|
||||||
|
|
||||||
|
export default (node, props) => {
|
||||||
|
Object.entries(props).forEach(([key, value]) => {
|
||||||
|
node.style.setProperty(`--${key}`, value);
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
update(new_props) {
|
||||||
|
Object.entries(new_props).forEach(([key, value]) => {
|
||||||
|
node.style.setProperty(`--${key}`, value);
|
||||||
|
delete props[key];
|
||||||
|
});
|
||||||
|
|
||||||
|
Object.keys(props).forEach(name =>
|
||||||
|
node.style.removeProperty(`--${name}`),
|
||||||
|
);
|
||||||
|
props = new_props;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1 @@
|
||||||
|
export const emptyProps = () => ({_component:""});
|
|
@ -0,0 +1 @@
|
||||||
|
/*export { app } from "./generators/appGenerator";*/
|
|
@ -0,0 +1,18 @@
|
||||||
|
export const buttons = () => [
|
||||||
|
{
|
||||||
|
name: "common/Primary Button",
|
||||||
|
description: "Bootstrap primary button ",
|
||||||
|
inherits: "@budibase/standard-components/button",
|
||||||
|
props: {
|
||||||
|
className: "btn btn-primary"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "common/Secondary Button",
|
||||||
|
description: "Bootstrap primary button",
|
||||||
|
inherits: "@budibase/standard-components/button",
|
||||||
|
props: {
|
||||||
|
className: "btn btn-primary"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,15 @@
|
||||||
|
export const getRecordPath = (record) => {
|
||||||
|
|
||||||
|
const parts = [];
|
||||||
|
|
||||||
|
const add = (current) => {
|
||||||
|
parts.push(current.name);
|
||||||
|
if(current.parent().type === "root") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
add(current.parent());
|
||||||
|
}
|
||||||
|
|
||||||
|
return parts.reverse().join("/");
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
import { getRecordPath } from "./getRecordPath";
|
||||||
|
|
||||||
|
export const indexTables = ({indexes, helpers}) =>
|
||||||
|
indexes.map(i => indexTable(i, helpers));
|
||||||
|
|
||||||
|
export const indexTableProps = (index, helpers) => ({
|
||||||
|
data: {
|
||||||
|
"##bbstate":index.nodeKey(),
|
||||||
|
"##bbsource":"store"
|
||||||
|
},
|
||||||
|
tableClass: "table table-hover",
|
||||||
|
theadClass: "thead-dark",
|
||||||
|
columns: helpers.indexSchema(index).map(column)
|
||||||
|
});
|
||||||
|
|
||||||
|
export const getIndexTableName = (index) =>
|
||||||
|
`${getRecordPath}/${index.name} Table`
|
||||||
|
|
||||||
|
const indexTable = (index, helpers) => ({
|
||||||
|
name: getIndexTableName(index),
|
||||||
|
inherits: "@budibase/standard-components/table",
|
||||||
|
props: indexTableProps(index, helpers)
|
||||||
|
});
|
||||||
|
|
||||||
|
const column = (col) => ({
|
||||||
|
title: col.name,
|
||||||
|
value: {
|
||||||
|
"##bbstate": col.name,
|
||||||
|
"##bbsource":"context"
|
||||||
|
}
|
||||||
|
})
|
|
@ -0,0 +1,27 @@
|
||||||
|
import {indexTables, getIndexTableName} from "./indexTablesGenerator";
|
||||||
|
|
||||||
|
export const nav = ({records, indexes, helpers}) => [
|
||||||
|
{
|
||||||
|
name: "Application Root",
|
||||||
|
inherits: "@budibase/bootstrap-components/nav",
|
||||||
|
props: {
|
||||||
|
items: indexes
|
||||||
|
.filter(i => i.parent().type === "root")
|
||||||
|
.map(navItem),
|
||||||
|
orientation: "horizontal",
|
||||||
|
alignment: "center",
|
||||||
|
fill: true,
|
||||||
|
pills: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
...indexTables({records, indexes, helpers})
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
export const navItem = (index) => ({
|
||||||
|
title: index.name,
|
||||||
|
component : {
|
||||||
|
_component: getIndexTableName(index)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
import {getIndexTableName} from "./indexTablesGenerator";
|
||||||
|
|
||||||
|
export const rootContent = ({indexes, records, helpers}) =>
|
||||||
|
record.filter(r => r.parent().type === "root")
|
||||||
|
.map(r =>({
|
||||||
|
record,
|
||||||
|
index:findIndexForRecord(indexes, r)
|
||||||
|
}))
|
||||||
|
.filter(r => r.index)
|
||||||
|
.map(component)
|
||||||
|
|
||||||
|
|
||||||
|
const findIndexForRecord = (indexes, record) => {
|
||||||
|
const forRecord = indexes.filter(i => i.allowedRecordNodeIds.includes(record.nodeId));
|
||||||
|
if(forRecord.length === 0) return;
|
||||||
|
if(forRecord.length === 1) return forRecord[0];
|
||||||
|
const noMap = forRecord.filter(i => !i.filter || !i.filter.trim());
|
||||||
|
if(noMap.length === 0) forRecord[0];
|
||||||
|
return noMap[0];
|
||||||
|
}
|
||||||
|
|
||||||
|
const component = (recordAndIndex) => {
|
||||||
|
_component: ""
|
||||||
|
}
|
|
@ -0,0 +1,2 @@
|
||||||
|
/*export {default as button} from "./Button.svelte";*/
|
||||||
|
|
|
@ -13,16 +13,16 @@ import { setState, setStateFromBinding } from "./state/setState";
|
||||||
import { trimSlash } from "./common/trimSlash";
|
import { trimSlash } from "./common/trimSlash";
|
||||||
import { isBound } from "./state/isState";
|
import { isBound } from "./state/isState";
|
||||||
|
|
||||||
|
|
||||||
export const createApp = (componentLibraries, appDefinition, user) => {
|
export const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
|
|
||||||
const initialiseComponent = (parentContext) => (props, htmlElement, context) => {
|
const initialiseComponent = (parentContext, hydrate) => (props, htmlElement, context) => {
|
||||||
|
|
||||||
const {componentName, libName} = splitName(props._component);
|
const {componentName, libName} = splitName(props._component);
|
||||||
|
|
||||||
if(!componentName || !libName) return;
|
if(!componentName || !libName) return;
|
||||||
|
|
||||||
const {initialProps, bind, boundProps} = setupBinding(store, props, coreApi, context, appDefinition.appRootPath);
|
const {initialProps, bind, boundProps} = setupBinding(
|
||||||
|
store, props, coreApi, context || parentContext, appDefinition.appRootPath);
|
||||||
|
|
||||||
const bindings = {};
|
const bindings = {};
|
||||||
if(boundProps && boundProps.length > 0) {
|
if(boundProps && boundProps.length > 0) {
|
||||||
|
@ -43,7 +43,7 @@ export const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
const component = new (componentLibraries[libName][componentName])({
|
const component = new (componentLibraries[libName][componentName])({
|
||||||
target: htmlElement,
|
target: htmlElement,
|
||||||
props: componentProps,
|
props: componentProps,
|
||||||
hydrate:true
|
hydrate: hydrate
|
||||||
});
|
});
|
||||||
|
|
||||||
bind(component);
|
bind(component);
|
||||||
|
@ -93,7 +93,8 @@ export const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const bb = (bindings, context) => ({
|
const bb = (bindings, context) => ({
|
||||||
initialiseComponent: initialiseComponent(context),
|
initialiseComponent: initialiseComponent(context, true),
|
||||||
|
appendComponent: initialiseComponent(context, false),
|
||||||
store,
|
store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
|
|
|
@ -20365,13 +20365,14 @@ var app = (function (exports) {
|
||||||
|
|
||||||
const createApp = (componentLibraries, appDefinition, user) => {
|
const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
|
|
||||||
const initialiseComponent = (parentContext) => (props, htmlElement, context) => {
|
const initialiseComponent = (parentContext, hydrate) => (props, htmlElement, context) => {
|
||||||
|
|
||||||
const {componentName, libName} = splitName(props._component);
|
const {componentName, libName} = splitName(props._component);
|
||||||
|
|
||||||
if(!componentName || !libName) return;
|
if(!componentName || !libName) return;
|
||||||
|
|
||||||
const {initialProps, bind, boundProps} = setupBinding(store, props, coreApi, context, appDefinition.appRootPath);
|
const {initialProps, bind, boundProps} = setupBinding(
|
||||||
|
store, props, coreApi, context || parentContext, appDefinition.appRootPath);
|
||||||
|
|
||||||
const bindings = {};
|
const bindings = {};
|
||||||
if(boundProps && boundProps.length > 0) {
|
if(boundProps && boundProps.length > 0) {
|
||||||
|
@ -20392,7 +20393,7 @@ var app = (function (exports) {
|
||||||
const component = new (componentLibraries[libName][componentName])({
|
const component = new (componentLibraries[libName][componentName])({
|
||||||
target: htmlElement,
|
target: htmlElement,
|
||||||
props: componentProps,
|
props: componentProps,
|
||||||
hydrate:true
|
hydrate: hydrate
|
||||||
});
|
});
|
||||||
|
|
||||||
bind(component);
|
bind(component);
|
||||||
|
@ -20442,7 +20443,8 @@ var app = (function (exports) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const bb = (bindings, context) => ({
|
const bb = (bindings, context) => ({
|
||||||
initialiseComponent: initialiseComponent(context),
|
initialiseComponent: initialiseComponent(context, true),
|
||||||
|
appendComponent: initialiseComponent(context, false),
|
||||||
store,
|
store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20365,13 +20365,14 @@ var app = (function (exports) {
|
||||||
|
|
||||||
const createApp = (componentLibraries, appDefinition, user) => {
|
const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
|
|
||||||
const initialiseComponent = (parentContext) => (props, htmlElement, context) => {
|
const initialiseComponent = (parentContext, hydrate) => (props, htmlElement, context) => {
|
||||||
|
|
||||||
const {componentName, libName} = splitName(props._component);
|
const {componentName, libName} = splitName(props._component);
|
||||||
|
|
||||||
if(!componentName || !libName) return;
|
if(!componentName || !libName) return;
|
||||||
|
|
||||||
const {initialProps, bind, boundProps} = setupBinding(store, props, coreApi, context, appDefinition.appRootPath);
|
const {initialProps, bind, boundProps} = setupBinding(
|
||||||
|
store, props, coreApi, context || parentContext, appDefinition.appRootPath);
|
||||||
|
|
||||||
const bindings = {};
|
const bindings = {};
|
||||||
if(boundProps && boundProps.length > 0) {
|
if(boundProps && boundProps.length > 0) {
|
||||||
|
@ -20392,7 +20393,7 @@ var app = (function (exports) {
|
||||||
const component = new (componentLibraries[libName][componentName])({
|
const component = new (componentLibraries[libName][componentName])({
|
||||||
target: htmlElement,
|
target: htmlElement,
|
||||||
props: componentProps,
|
props: componentProps,
|
||||||
hydrate:true
|
hydrate: hydrate
|
||||||
});
|
});
|
||||||
|
|
||||||
bind(component);
|
bind(component);
|
||||||
|
@ -20442,7 +20443,8 @@ var app = (function (exports) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const bb = (bindings, context) => ({
|
const bb = (bindings, context) => ({
|
||||||
initialiseComponent: initialiseComponent(context),
|
initialiseComponent: initialiseComponent(context, true),
|
||||||
|
appendComponent: initialiseComponent(context, false),
|
||||||
store,
|
store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20365,13 +20365,14 @@ var app = (function (exports) {
|
||||||
|
|
||||||
const createApp = (componentLibraries, appDefinition, user) => {
|
const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
|
|
||||||
const initialiseComponent = (parentContext) => (props, htmlElement, context) => {
|
const initialiseComponent = (parentContext, hydrate) => (props, htmlElement, context) => {
|
||||||
|
|
||||||
const {componentName, libName} = splitName(props._component);
|
const {componentName, libName} = splitName(props._component);
|
||||||
|
|
||||||
if(!componentName || !libName) return;
|
if(!componentName || !libName) return;
|
||||||
|
|
||||||
const {initialProps, bind, boundProps} = setupBinding(store, props, coreApi, context, appDefinition.appRootPath);
|
const {initialProps, bind, boundProps} = setupBinding(
|
||||||
|
store, props, coreApi, context || parentContext, appDefinition.appRootPath);
|
||||||
|
|
||||||
const bindings = {};
|
const bindings = {};
|
||||||
if(boundProps && boundProps.length > 0) {
|
if(boundProps && boundProps.length > 0) {
|
||||||
|
@ -20392,7 +20393,7 @@ var app = (function (exports) {
|
||||||
const component = new (componentLibraries[libName][componentName])({
|
const component = new (componentLibraries[libName][componentName])({
|
||||||
target: htmlElement,
|
target: htmlElement,
|
||||||
props: componentProps,
|
props: componentProps,
|
||||||
hydrate:true
|
hydrate: hydrate
|
||||||
});
|
});
|
||||||
|
|
||||||
bind(component);
|
bind(component);
|
||||||
|
@ -20442,7 +20443,8 @@ var app = (function (exports) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const bb = (bindings, context) => ({
|
const bb = (bindings, context) => ({
|
||||||
initialiseComponent: initialiseComponent(context),
|
initialiseComponent: initialiseComponent(context, true),
|
||||||
|
appendComponent: initialiseComponent(context, false),
|
||||||
store,
|
store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -20365,13 +20365,14 @@ var app = (function (exports) {
|
||||||
|
|
||||||
const createApp = (componentLibraries, appDefinition, user) => {
|
const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
|
|
||||||
const initialiseComponent = (parentContext) => (props, htmlElement, context) => {
|
const initialiseComponent = (parentContext, hydrate) => (props, htmlElement, context) => {
|
||||||
|
|
||||||
const {componentName, libName} = splitName(props._component);
|
const {componentName, libName} = splitName(props._component);
|
||||||
|
|
||||||
if(!componentName || !libName) return;
|
if(!componentName || !libName) return;
|
||||||
|
|
||||||
const {initialProps, bind, boundProps} = setupBinding(store, props, coreApi, context, appDefinition.appRootPath);
|
const {initialProps, bind, boundProps} = setupBinding(
|
||||||
|
store, props, coreApi, context || parentContext, appDefinition.appRootPath);
|
||||||
|
|
||||||
const bindings = {};
|
const bindings = {};
|
||||||
if(boundProps && boundProps.length > 0) {
|
if(boundProps && boundProps.length > 0) {
|
||||||
|
@ -20392,7 +20393,7 @@ var app = (function (exports) {
|
||||||
const component = new (componentLibraries[libName][componentName])({
|
const component = new (componentLibraries[libName][componentName])({
|
||||||
target: htmlElement,
|
target: htmlElement,
|
||||||
props: componentProps,
|
props: componentProps,
|
||||||
hydrate:true
|
hydrate: hydrate
|
||||||
});
|
});
|
||||||
|
|
||||||
bind(component);
|
bind(component);
|
||||||
|
@ -20442,7 +20443,8 @@ var app = (function (exports) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const bb = (bindings, context) => ({
|
const bb = (bindings, context) => ({
|
||||||
initialiseComponent: initialiseComponent(context),
|
initialiseComponent: initialiseComponent(context, true),
|
||||||
|
appendComponent: initialiseComponent(context, false),
|
||||||
store,
|
store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,78 +0,0 @@
|
||||||
builder/*
|
|
||||||
.data/
|
|
||||||
.temp/
|
|
||||||
packages/server/runtime_apps/
|
|
||||||
|
|
||||||
# Logs
|
|
||||||
logs
|
|
||||||
*.log
|
|
||||||
npm-debug.log*
|
|
||||||
yarn-debug.log*
|
|
||||||
yarn-error.log*
|
|
||||||
|
|
||||||
# Runtime data
|
|
||||||
pids
|
|
||||||
*.pid
|
|
||||||
*.seed
|
|
||||||
*.pid.lock
|
|
||||||
|
|
||||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
|
||||||
lib-cov
|
|
||||||
|
|
||||||
# Coverage directory used by tools like istanbul
|
|
||||||
coverage
|
|
||||||
|
|
||||||
# nyc test coverage
|
|
||||||
.nyc_output
|
|
||||||
|
|
||||||
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
|
||||||
.grunt
|
|
||||||
|
|
||||||
# Bower dependency directory (https://bower.io/)
|
|
||||||
bower_components
|
|
||||||
|
|
||||||
# node-waf configuration
|
|
||||||
.lock-wscript
|
|
||||||
|
|
||||||
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
|
||||||
build/Release
|
|
||||||
|
|
||||||
# Dependency directories
|
|
||||||
node_modules/
|
|
||||||
jspm_packages/
|
|
||||||
|
|
||||||
# TypeScript v1 declaration files
|
|
||||||
typings/
|
|
||||||
|
|
||||||
# Optional npm cache directory
|
|
||||||
.npm
|
|
||||||
|
|
||||||
# Optional eslint cache
|
|
||||||
.eslintcache
|
|
||||||
|
|
||||||
# Optional REPL history
|
|
||||||
.node_repl_history
|
|
||||||
|
|
||||||
# Output of 'npm pack'
|
|
||||||
*.tgz
|
|
||||||
|
|
||||||
# Yarn Integrity file
|
|
||||||
.yarn-integrity
|
|
||||||
|
|
||||||
# dotenv environment variables file
|
|
||||||
.env
|
|
||||||
|
|
||||||
# parcel-bundler cache (https://parceljs.org/)
|
|
||||||
.cache
|
|
||||||
|
|
||||||
# next.js build output
|
|
||||||
.next
|
|
||||||
|
|
||||||
# nuxt.js build output
|
|
||||||
.nuxt
|
|
||||||
|
|
||||||
# vuepress build output
|
|
||||||
.vuepress/dist
|
|
||||||
|
|
||||||
# Serverless directories
|
|
||||||
.serverless
|
|
|
@ -1,5 +1,4 @@
|
||||||
{
|
{
|
||||||
"version": 0,
|
|
||||||
"levels": [
|
"levels": [
|
||||||
{
|
{
|
||||||
"name": "owner",
|
"name": "owner",
|
||||||
|
@ -21,20 +20,8 @@
|
||||||
"nodeKey": "/customers/1-{id}"
|
"nodeKey": "/customers/1-{id}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "create record",
|
"type": "read index",
|
||||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}"
|
"nodeKey": "/all_customers"
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "update record",
|
|
||||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "delete record",
|
|
||||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "read record",
|
|
||||||
"nodeKey": "/customers/1-{id}/invoices/2-{id}"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "write templates"
|
"type": "write templates"
|
||||||
|
@ -64,12 +51,14 @@
|
||||||
"type": "manage index"
|
"type": "manage index"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "set user access levels"
|
"type": "manage collection"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"type": "manage collection"
|
"type": "set user access levels"
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"default": false
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"version": 1
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,60 +11,35 @@
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"typeOptions": {
|
"typeOptions": {
|
||||||
"maxLength": 1000,
|
"maxLength": null,
|
||||||
"values": null,
|
"values": null,
|
||||||
"allowDeclaredValuesOnly": false
|
"allowDeclaredValuesOnly": false
|
||||||
},
|
},
|
||||||
"label": "name",
|
"label": "Name",
|
||||||
|
"getInitialValue": "default",
|
||||||
|
"getUndefinedValue": "default"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "enquiry",
|
||||||
|
"type": "string",
|
||||||
|
"typeOptions": {
|
||||||
|
"maxLength": null,
|
||||||
|
"values": [
|
||||||
|
"Google",
|
||||||
|
"Facebook",
|
||||||
|
"Word of Mouth"
|
||||||
|
],
|
||||||
|
"allowDeclaredValuesOnly": true
|
||||||
|
},
|
||||||
|
"label": "Enquiry Source",
|
||||||
"getInitialValue": "default",
|
"getInitialValue": "default",
|
||||||
"getUndefinedValue": "default"
|
"getUndefinedValue": "default"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"children": [
|
"children": [],
|
||||||
{
|
|
||||||
"name": "invoiceyooo",
|
|
||||||
"type": "record",
|
|
||||||
"fields": [
|
|
||||||
{
|
|
||||||
"name": "amount",
|
|
||||||
"type": "number",
|
|
||||||
"typeOptions": {
|
|
||||||
"minValue": 99999999999,
|
|
||||||
"maxValue": 99999999999,
|
|
||||||
"decimalPlaces": 2
|
|
||||||
},
|
|
||||||
"label": "amount",
|
|
||||||
"getInitialValue": "default",
|
|
||||||
"getUndefinedValue": "default"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"children": [],
|
|
||||||
"validationRules": [],
|
|
||||||
"nodeId": 2,
|
|
||||||
"indexes": [],
|
|
||||||
"allidsShardFactor": 1,
|
|
||||||
"collectionName": "invoices",
|
|
||||||
"isSingle": false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"validationRules": [],
|
"validationRules": [],
|
||||||
"nodeId": 1,
|
"nodeId": 1,
|
||||||
"indexes": [
|
"indexes": [],
|
||||||
{
|
|
||||||
"name": "customer_invoices",
|
|
||||||
"type": "index",
|
|
||||||
"map": "return {...record};",
|
|
||||||
"filter": "",
|
|
||||||
"indexType": "ancestor",
|
|
||||||
"getShardName": "",
|
|
||||||
"getSortKey": "record.id",
|
|
||||||
"aggregateGroups": [],
|
|
||||||
"allowedRecordNodeIds": [
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"nodeId": 5
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"allidsShardFactor": 64,
|
"allidsShardFactor": 64,
|
||||||
"collectionName": "customers",
|
"collectionName": "customers",
|
||||||
"isSingle": false
|
"isSingle": false
|
||||||
|
@ -73,7 +48,7 @@
|
||||||
"pathMaps": [],
|
"pathMaps": [],
|
||||||
"indexes": [
|
"indexes": [
|
||||||
{
|
{
|
||||||
"name": "Yeo index",
|
"name": "all_customers",
|
||||||
"type": "index",
|
"type": "index",
|
||||||
"map": "return {...record};",
|
"map": "return {...record};",
|
||||||
"filter": "",
|
"filter": "",
|
||||||
|
@ -84,111 +59,15 @@
|
||||||
"allowedRecordNodeIds": [
|
"allowedRecordNodeIds": [
|
||||||
1
|
1
|
||||||
],
|
],
|
||||||
"nodeId": 4
|
"nodeId": 2
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "everyones_invoices",
|
|
||||||
"type": "index",
|
|
||||||
"map": "return {...record};",
|
|
||||||
"filter": "",
|
|
||||||
"indexType": "ancestor",
|
|
||||||
"getShardName": "",
|
|
||||||
"getSortKey": "record.id",
|
|
||||||
"aggregateGroups": [],
|
|
||||||
"allowedRecordNodeIds": [
|
|
||||||
2
|
|
||||||
],
|
|
||||||
"nodeId": 6
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"nodeId": 0
|
"nodeId": 0
|
||||||
},
|
},
|
||||||
"triggers": [
|
"triggers": [],
|
||||||
{
|
"actions": {},
|
||||||
"actionName": "output_to_file",
|
|
||||||
"eventName": "authApi:createUser:onComplete",
|
|
||||||
"optionsCreator": "return { filename:'tempaccess' + context.user.name, content:context.result.tempCode };",
|
|
||||||
"condition": "!context.password"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"actionName": "output_to_file",
|
|
||||||
"eventName": "authApi:createTemporaryAccess:onComplete",
|
|
||||||
"optionsCreator": "return { filename:'tempaccess' + context.userName, content:context.result };",
|
|
||||||
"condition": ""
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"actions": {
|
|
||||||
"undefined": [
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
[
|
|
||||||
{
|
|
||||||
"name": "output_to_file",
|
|
||||||
"behaviourSource": "main",
|
|
||||||
"behaviourName": "outputToFile",
|
|
||||||
"initialOptions": {}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"props": {
|
"props": {
|
||||||
"main": {
|
"main": {},
|
||||||
"_component": "@budibase/standard-components/button",
|
"unauthenticated": {}
|
||||||
"contentText": "Button",
|
|
||||||
"contentComponent": {
|
|
||||||
"_component": ""
|
|
||||||
},
|
|
||||||
"className": "default",
|
|
||||||
"disabled": false,
|
|
||||||
"onClick": [],
|
|
||||||
"background": "##f2f2f2",
|
|
||||||
"color": "#5F6368",
|
|
||||||
"border": "1px solid #EEE",
|
|
||||||
"padding": "5px 7px",
|
|
||||||
"hoverColor": "black",
|
|
||||||
"hoverBackground": "#cccccc",
|
|
||||||
"hoverBorder": ""
|
|
||||||
},
|
|
||||||
"unauthenticated": {
|
|
||||||
"_component": "@budibase/standard-components/button",
|
|
||||||
"contentText": "Button",
|
|
||||||
"contentComponent": {
|
|
||||||
"_component": ""
|
|
||||||
},
|
|
||||||
"className": "default",
|
|
||||||
"disabled": false,
|
|
||||||
"onClick": [],
|
|
||||||
"background": "##f2f2f2",
|
|
||||||
"color": "#5F6368",
|
|
||||||
"border": "1px solid #EEE",
|
|
||||||
"padding": "5px 7px",
|
|
||||||
"hoverColor": "black",
|
|
||||||
"hoverBackground": "#cccccc",
|
|
||||||
"hoverBorder": ""
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Application Root",
|
|
||||||
"inherits": "@budibase/standard-components/nav",
|
|
||||||
"props": {
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"title": "Yeo index",
|
|
||||||
"component": {
|
|
||||||
"_component": "tables/Yeo index Table"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "everyones_invoices",
|
|
||||||
"component": {
|
|
||||||
"_component": "tables/everyones_invoices Table"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
"name": "Yeo button",
|
|
||||||
"description": "aye so it it",
|
|
||||||
"inherits": "@budibase/standard-components/button",
|
|
||||||
"props": {
|
|
||||||
"background": "red",
|
|
||||||
"hoverBackground": "blue",
|
|
||||||
"color": "white",
|
|
||||||
"border": "solid 5px green",
|
|
||||||
"hoverBorder": "solid 10px yellow",
|
|
||||||
"hoverColor": "purple"
|
|
||||||
},
|
|
||||||
"tags": [
|
|
||||||
"button"
|
|
||||||
]
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"name": "common/H1",
|
|
||||||
"description": "Header 1",
|
|
||||||
"inherits": "@budibase/standard-components/text",
|
|
||||||
"props": {
|
|
||||||
"font": "20pt"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"name": "common/H2",
|
|
||||||
"description": "Header 2",
|
|
||||||
"inherits": "@budibase/standard-components/text",
|
|
||||||
"props": {
|
|
||||||
"font": "15pt"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"name": "common/H3",
|
|
||||||
"description": "Header 3",
|
|
||||||
"inherits": "@budibase/standard-components/text",
|
|
||||||
"props": {
|
|
||||||
"font": "12pt bold"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,8 +0,0 @@
|
||||||
{
|
|
||||||
"name": "common/H4",
|
|
||||||
"description": "Header 4",
|
|
||||||
"inherits": "@budibase/standard-components/text",
|
|
||||||
"props": {
|
|
||||||
"font": "10pt bold"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
{
|
|
||||||
"name": "customer Form",
|
|
||||||
"description": "All fields on record '/customers/1-{id}' ",
|
|
||||||
"inherits": "@budibase/standard-components/stackpanel",
|
|
||||||
"props": {
|
|
||||||
"direction": "vertical",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "common/H1",
|
|
||||||
"value": "Edit customer"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/form",
|
|
||||||
"formControls": [
|
|
||||||
{
|
|
||||||
"label": "name",
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/textbox",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "currentcustomer.name",
|
|
||||||
"##bbsource": "store"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/stackpanel",
|
|
||||||
"direction": "horizontal",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/panel",
|
|
||||||
"padding": "20px",
|
|
||||||
"component": {
|
|
||||||
"_component": "common/Primary Button",
|
|
||||||
"contentText": "Save customer",
|
|
||||||
"onClick": [
|
|
||||||
{
|
|
||||||
"##eventHandlerType": "Save Record",
|
|
||||||
"parameters": {
|
|
||||||
"statePath": "currentcustomer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/panel",
|
|
||||||
"padding": "20px",
|
|
||||||
"component": {
|
|
||||||
"_component": "common/Secondary Button",
|
|
||||||
"contentText": "Cancel",
|
|
||||||
"onClick": [
|
|
||||||
{
|
|
||||||
"##eventHandlerType": "Save Record",
|
|
||||||
"parameters": {
|
|
||||||
"statePath": "currentcustomer"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,77 +0,0 @@
|
||||||
{
|
|
||||||
"name": "invoiceyooo Form",
|
|
||||||
"description": "All fields on record '/customers/1-{id}/invoices/2-{id}' ",
|
|
||||||
"inherits": "@budibase/standard-components/stackpanel",
|
|
||||||
"props": {
|
|
||||||
"direction": "vertical",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "common/H1",
|
|
||||||
"value": "Edit invoiceyooo"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/form",
|
|
||||||
"formControls": [
|
|
||||||
{
|
|
||||||
"label": "amount",
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/textbox",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "currentinvoiceyooo.amount",
|
|
||||||
"##bbsource": "store"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/stackpanel",
|
|
||||||
"direction": "horizontal",
|
|
||||||
"children": [
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/panel",
|
|
||||||
"padding": "20px",
|
|
||||||
"component": {
|
|
||||||
"_component": "common/Primary Button",
|
|
||||||
"contentText": "Save invoiceyooo",
|
|
||||||
"onClick": [
|
|
||||||
{
|
|
||||||
"##eventHandlerType": "Save Record",
|
|
||||||
"parameters": {
|
|
||||||
"statePath": "currentinvoiceyooo"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"control": {
|
|
||||||
"_component": "@budibase/standard-components/panel",
|
|
||||||
"padding": "20px",
|
|
||||||
"component": {
|
|
||||||
"_component": "common/Secondary Button",
|
|
||||||
"contentText": "Cancel",
|
|
||||||
"onClick": [
|
|
||||||
{
|
|
||||||
"##eventHandlerType": "Save Record",
|
|
||||||
"parameters": {
|
|
||||||
"statePath": "currentinvoiceyooo"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
"name": "tables/Yeo index Table",
|
|
||||||
"inherits": "@budibase/standard-components/table",
|
|
||||||
"props": {
|
|
||||||
"data": {
|
|
||||||
"##bbstate": "/Yeo index",
|
|
||||||
"##bbsource": "store"
|
|
||||||
},
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"title": "id",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "id",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "isNew",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "isNew",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "key",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "key",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "name",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "name",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "type",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "type",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "sortKey",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "sortKey",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,54 +0,0 @@
|
||||||
{
|
|
||||||
"name": "tables/everyones_invoices Table",
|
|
||||||
"inherits": "@budibase/standard-components/table",
|
|
||||||
"props": {
|
|
||||||
"data": {
|
|
||||||
"##bbstate": "/everyones_invoices",
|
|
||||||
"##bbsource": "store"
|
|
||||||
},
|
|
||||||
"columns": [
|
|
||||||
{
|
|
||||||
"title": "amount",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "amount",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "id",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "id",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "isNew",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "isNew",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "key",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "key",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "type",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "type",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"title": "sortKey",
|
|
||||||
"value": {
|
|
||||||
"##bbstate": "sortKey",
|
|
||||||
"##bbsource": "context"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
"textbox" : {
|
|
||||||
"path": "./textbox",
|
|
||||||
"name": "Textbox",
|
|
||||||
"description": "A text input, with a label",
|
|
||||||
"props": {
|
|
||||||
"label": "string",
|
|
||||||
"content": "component"
|
|
||||||
},
|
|
||||||
"tags": ["textbox", "input", "text"]
|
|
||||||
},
|
|
||||||
"button" : {
|
|
||||||
"path": "./button",
|
|
||||||
"name": "Button",
|
|
||||||
"description": "a button",
|
|
||||||
"props": {
|
|
||||||
"contentText": "string",
|
|
||||||
"contentComponent": "component",
|
|
||||||
"class": "string"
|
|
||||||
},
|
|
||||||
"tags": ["button"]
|
|
||||||
}
|
|
||||||
}
|
|
Binary file not shown.
|
@ -1,11 +0,0 @@
|
||||||
{
|
|
||||||
"textbox" : {
|
|
||||||
"path": "./textbox",
|
|
||||||
"name": "Textbox",
|
|
||||||
"description": "A text input, with a label",
|
|
||||||
"props": {
|
|
||||||
"label": "string"
|
|
||||||
},
|
|
||||||
"tags": ["textboxt", "input", "text"]
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"name": "testApp2",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"requires": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@budibase/standard-components": {
|
||||||
|
"version": "0.0.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@budibase/standard-components/-/standard-components-0.0.10.tgz",
|
||||||
|
"integrity": "sha512-MoM01oGpzA4ipTbJkGMSoqe3cBWv9R28zvLOU+0XxQJrLGOFz6DH/5f0gC0s70wXGSGEoEeLXulUqsp1LgeReA=="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,15 +1,13 @@
|
||||||
{
|
{
|
||||||
"name": "testapp2",
|
"name": "testApp2",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "plugins.js",
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
"author": "",
|
"author": "",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@budibase/client": "file:../../../client",
|
"@budibase/standard-components": "^0.0.10"
|
||||||
"@budibase/standard-components": "file:../../../standard-components"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
{
|
{
|
||||||
"main": {
|
"main": {
|
||||||
"index": {
|
"index": {},
|
||||||
"title": "main yeo"
|
"appBody": ""
|
||||||
},
|
|
||||||
"appBody": "common/Prim Button"
|
|
||||||
},
|
},
|
||||||
"unauthenticated": {
|
"unauthenticated": {
|
||||||
"index": {
|
"index": {},
|
||||||
"title": "main"
|
"appBody": ""
|
||||||
},
|
|
||||||
"appBody": "common/Secondary Button"
|
|
||||||
},
|
},
|
||||||
"componentLibraries": [
|
"componentLibraries": [
|
||||||
"@budibase/standard-components"
|
"@budibase/standard-components"
|
||||||
],
|
],
|
||||||
"stylesheets": []
|
"stylesheets": [
|
||||||
|
"https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,2 @@
|
||||||
const fs = require("fs");
|
|
||||||
|
|
||||||
module.exports = (config) => ({
|
module.exports = (config) => ({})
|
||||||
main: {
|
|
||||||
outputToFile : async ({filename, content}) => {
|
|
||||||
await new Promise((resolve,reject) => {
|
|
||||||
fs.writeFile(`./tests/.data/${filename}`, content, {encoding:"utf8"}, err => {
|
|
||||||
if(err) reject();
|
|
||||||
else resolve(err);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
|
@ -0,0 +1 @@
|
||||||
|
whats the craic big lawd ?
|
|
@ -1 +0,0 @@
|
||||||
console.log("test app 1 - main");
|
|
|
@ -20365,13 +20365,14 @@ var app = (function (exports) {
|
||||||
|
|
||||||
const createApp = (componentLibraries, appDefinition, user) => {
|
const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
|
|
||||||
const initialiseComponent = (parentContext) => (props, htmlElement, context) => {
|
const initialiseComponent = (parentContext, hydrate) => (props, htmlElement, context) => {
|
||||||
|
|
||||||
const {componentName, libName} = splitName(props._component);
|
const {componentName, libName} = splitName(props._component);
|
||||||
|
|
||||||
if(!componentName || !libName) return;
|
if(!componentName || !libName) return;
|
||||||
|
|
||||||
const {initialProps, bind, boundProps} = setupBinding(store, props, coreApi, context, appDefinition.appRootPath);
|
const {initialProps, bind, boundProps} = setupBinding(
|
||||||
|
store, props, coreApi, context || parentContext, appDefinition.appRootPath);
|
||||||
|
|
||||||
const bindings = {};
|
const bindings = {};
|
||||||
if(boundProps && boundProps.length > 0) {
|
if(boundProps && boundProps.length > 0) {
|
||||||
|
@ -20392,7 +20393,7 @@ var app = (function (exports) {
|
||||||
const component = new (componentLibraries[libName][componentName])({
|
const component = new (componentLibraries[libName][componentName])({
|
||||||
target: htmlElement,
|
target: htmlElement,
|
||||||
props: componentProps,
|
props: componentProps,
|
||||||
hydrate:true
|
hydrate: hydrate
|
||||||
});
|
});
|
||||||
|
|
||||||
bind(component);
|
bind(component);
|
||||||
|
@ -20442,7 +20443,8 @@ var app = (function (exports) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const bb = (bindings, context) => ({
|
const bb = (bindings, context) => ({
|
||||||
initialiseComponent: initialiseComponent(context),
|
initialiseComponent: initialiseComponent(context, true),
|
||||||
|
appendComponent: initialiseComponent(context, false),
|
||||||
store,
|
store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
window['##BUDIBASE_APPDEFINITION##'] = {"hierarchy":{"name":"root","type":"root","children":[{"name":"customer","type":"record","fields":[{"name":"name","type":"string","typeOptions":{"maxLength":1000,"values":null,"allowDeclaredValuesOnly":false},"label":"name","getInitialValue":"default","getUndefinedValue":"default"}],"children":[{"name":"invoiceyooo","type":"record","fields":[{"name":"amount","type":"number","typeOptions":{"minValue":99999999999,"maxValue":99999999999,"decimalPlaces":2},"label":"amount","getInitialValue":"default","getUndefinedValue":"default"}],"children":[],"validationRules":[],"nodeId":2,"indexes":[],"allidsShardFactor":1,"collectionName":"invoices","isSingle":false}],"validationRules":[],"nodeId":1,"indexes":[{"name":"customer_invoices","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[2],"nodeId":5}],"allidsShardFactor":64,"collectionName":"customers","isSingle":false}],"pathMaps":[],"indexes":[{"name":"Yeo index","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[1],"nodeId":4},{"name":"everyones_invoices","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[2],"nodeId":6}],"nodeId":0},"componentLibraries":[{"importPath":"/lib/node_modules/@budibase/standard-components/dist/index.js","libName":"@budibase/standard-components"}],"appRootPath":"/testApp2","props":{"_component":"@budibase/standard-components/button","contentText":"Button","contentComponent":{"_component":""},"className":"default","disabled":false,"onClick":[],"background":"##f2f2f2","color":"#5F6368","border":"1px solid #EEE","padding":"5px 7px","hoverColor":"black","hoverBackground":"#cccccc","hoverBorder":""}}
|
window['##BUDIBASE_APPDEFINITION##'] = {"hierarchy":{"name":"root","type":"root","children":[{"name":"customer","type":"record","fields":[{"name":"name","type":"string","typeOptions":{"maxLength":null,"values":null,"allowDeclaredValuesOnly":false},"label":"Name","getInitialValue":"default","getUndefinedValue":"default"},{"name":"enquiry","type":"string","typeOptions":{"maxLength":null,"values":["Google","Facebook","Word of Mouth"],"allowDeclaredValuesOnly":true},"label":"Enquiry Source","getInitialValue":"default","getUndefinedValue":"default"}],"children":[],"validationRules":[],"nodeId":1,"indexes":[],"allidsShardFactor":64,"collectionName":"customers","isSingle":false}],"pathMaps":[],"indexes":[{"name":"all_customers","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[1],"nodeId":2}],"nodeId":0},"componentLibraries":[{"importPath":"/lib/node_modules/@budibase/standard-components/dist/index.js","libName":"@budibase/standard-components"}],"appRootPath":"/testApp2","props":{}}
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset='utf8'>
|
<meta charset='utf8'>
|
||||||
<meta name='viewport' content='width=device-width'>
|
<meta name='viewport' content='width=device-width'>
|
||||||
|
|
||||||
<title>main yeo</title>
|
<title>Budibase App</title>
|
||||||
<link rel='icon' type='image/png' href='/testApp2//_shared/favicon.png'>
|
<link rel='icon' type='image/png' href='/testApp2//_shared/favicon.png'>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css'>
|
||||||
|
|
||||||
<script src='/testApp2/clientAppDefinition.js'></script>
|
<script src='/testApp2/clientAppDefinition.js'></script>
|
||||||
<script src='/testApp2/budibase-client.js'></script>
|
<script src='/testApp2/budibase-client.js'></script>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
console.log("test app 1 - unauthenticated");
|
|
|
@ -20365,13 +20365,14 @@ var app = (function (exports) {
|
||||||
|
|
||||||
const createApp = (componentLibraries, appDefinition, user) => {
|
const createApp = (componentLibraries, appDefinition, user) => {
|
||||||
|
|
||||||
const initialiseComponent = (parentContext) => (props, htmlElement, context) => {
|
const initialiseComponent = (parentContext, hydrate) => (props, htmlElement, context) => {
|
||||||
|
|
||||||
const {componentName, libName} = splitName(props._component);
|
const {componentName, libName} = splitName(props._component);
|
||||||
|
|
||||||
if(!componentName || !libName) return;
|
if(!componentName || !libName) return;
|
||||||
|
|
||||||
const {initialProps, bind, boundProps} = setupBinding(store, props, coreApi, context, appDefinition.appRootPath);
|
const {initialProps, bind, boundProps} = setupBinding(
|
||||||
|
store, props, coreApi, context || parentContext, appDefinition.appRootPath);
|
||||||
|
|
||||||
const bindings = {};
|
const bindings = {};
|
||||||
if(boundProps && boundProps.length > 0) {
|
if(boundProps && boundProps.length > 0) {
|
||||||
|
@ -20392,7 +20393,7 @@ var app = (function (exports) {
|
||||||
const component = new (componentLibraries[libName][componentName])({
|
const component = new (componentLibraries[libName][componentName])({
|
||||||
target: htmlElement,
|
target: htmlElement,
|
||||||
props: componentProps,
|
props: componentProps,
|
||||||
hydrate:true
|
hydrate: hydrate
|
||||||
});
|
});
|
||||||
|
|
||||||
bind(component);
|
bind(component);
|
||||||
|
@ -20442,7 +20443,8 @@ var app = (function (exports) {
|
||||||
};
|
};
|
||||||
|
|
||||||
const bb = (bindings, context) => ({
|
const bb = (bindings, context) => ({
|
||||||
initialiseComponent: initialiseComponent(context),
|
initialiseComponent: initialiseComponent(context, true),
|
||||||
|
appendComponent: initialiseComponent(context, false),
|
||||||
store,
|
store,
|
||||||
relativeUrl,
|
relativeUrl,
|
||||||
api,
|
api,
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
||||||
window['##BUDIBASE_APPDEFINITION##'] = {"hierarchy":{"name":"root","type":"root","children":[{"name":"customer","type":"record","fields":[{"name":"name","type":"string","typeOptions":{"maxLength":1000,"values":null,"allowDeclaredValuesOnly":false},"label":"name","getInitialValue":"default","getUndefinedValue":"default"}],"children":[{"name":"invoiceyooo","type":"record","fields":[{"name":"amount","type":"number","typeOptions":{"minValue":99999999999,"maxValue":99999999999,"decimalPlaces":2},"label":"amount","getInitialValue":"default","getUndefinedValue":"default"}],"children":[],"validationRules":[],"nodeId":2,"indexes":[],"allidsShardFactor":1,"collectionName":"invoices","isSingle":false}],"validationRules":[],"nodeId":1,"indexes":[{"name":"customer_invoices","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[2],"nodeId":5}],"allidsShardFactor":64,"collectionName":"customers","isSingle":false}],"pathMaps":[],"indexes":[{"name":"Yeo index","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[1],"nodeId":4},{"name":"everyones_invoices","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[2],"nodeId":6}],"nodeId":0},"componentLibraries":[{"importPath":"/lib/node_modules/@budibase/standard-components/dist/index.js","libName":"@budibase/standard-components"}],"appRootPath":"/testApp2","props":{"_component":"@budibase/standard-components/button","contentText":"Button","contentComponent":{"_component":""},"className":"default","disabled":false,"onClick":[],"background":"##f2f2f2","color":"#5F6368","border":"1px solid #EEE","padding":"5px 7px","hoverColor":"black","hoverBackground":"#cccccc","hoverBorder":""}}
|
window['##BUDIBASE_APPDEFINITION##'] = {"hierarchy":{"name":"root","type":"root","children":[{"name":"customer","type":"record","fields":[{"name":"name","type":"string","typeOptions":{"maxLength":null,"values":null,"allowDeclaredValuesOnly":false},"label":"Name","getInitialValue":"default","getUndefinedValue":"default"},{"name":"enquiry","type":"string","typeOptions":{"maxLength":null,"values":["Google","Facebook","Word of Mouth"],"allowDeclaredValuesOnly":true},"label":"Enquiry Source","getInitialValue":"default","getUndefinedValue":"default"}],"children":[],"validationRules":[],"nodeId":1,"indexes":[],"allidsShardFactor":64,"collectionName":"customers","isSingle":false}],"pathMaps":[],"indexes":[{"name":"all_customers","type":"index","map":"return {...record};","filter":"","indexType":"ancestor","getShardName":"","getSortKey":"record.id","aggregateGroups":[],"allowedRecordNodeIds":[1],"nodeId":2}],"nodeId":0},"componentLibraries":[{"importPath":"/lib/node_modules/@budibase/standard-components/dist/index.js","libName":"@budibase/standard-components"}],"appRootPath":"/testApp2","props":{}}
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset='utf8'>
|
<meta charset='utf8'>
|
||||||
<meta name='viewport' content='width=device-width'>
|
<meta name='viewport' content='width=device-width'>
|
||||||
|
|
||||||
<title>main</title>
|
<title>Budibase App</title>
|
||||||
<link rel='icon' type='image/png' href='/testApp2//_shared/favicon.png'>
|
<link rel='icon' type='image/png' href='/testApp2//_shared/favicon.png'>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
@ -14,6 +14,7 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<link rel='stylesheet' href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css'>
|
||||||
|
|
||||||
<script src='/testApp2/clientAppDefinition.js'></script>
|
<script src='/testApp2/clientAppDefinition.js'></script>
|
||||||
<script src='/testApp2/budibase-client.js'></script>
|
<script src='/testApp2/budibase-client.js'></script>
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,53 +0,0 @@
|
||||||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
||||||
# yarn lockfile v1
|
|
||||||
|
|
||||||
|
|
||||||
"@budibase/client@file:../../../client":
|
|
||||||
version "0.0.3"
|
|
||||||
dependencies:
|
|
||||||
"@nx-js/compiler-util" "^2.0.0"
|
|
||||||
date-fns "^1.29.0"
|
|
||||||
lodash "^4.17.15"
|
|
||||||
lunr "^2.3.5"
|
|
||||||
shortid "^2.2.8"
|
|
||||||
svelte "^3.9.2"
|
|
||||||
|
|
||||||
"@budibase/standard-components@file:../../../standard-components":
|
|
||||||
version "0.0.5"
|
|
||||||
|
|
||||||
"@nx-js/compiler-util@^2.0.0":
|
|
||||||
version "2.0.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/@nx-js/compiler-util/-/compiler-util-2.0.0.tgz#c74c12165fa2f017a292bb79af007e8fce0af297"
|
|
||||||
integrity sha512-AxSQbwj9zqt8DYPZ6LwZdytqnwfiOEdcFdq4l8sdjkZmU2clTht7RDLCI8xvkp7KqgcNaOGlTeCM55TULWruyQ==
|
|
||||||
|
|
||||||
date-fns@^1.29.0:
|
|
||||||
version "1.30.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c"
|
|
||||||
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==
|
|
||||||
|
|
||||||
lodash@^4.17.15:
|
|
||||||
version "4.17.15"
|
|
||||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
|
|
||||||
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
|
|
||||||
|
|
||||||
lunr@^2.3.5:
|
|
||||||
version "2.3.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.6.tgz#f278beee7ffd56ad86e6e478ce02ab2b98c78dd5"
|
|
||||||
integrity sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q==
|
|
||||||
|
|
||||||
nanoid@^2.1.0:
|
|
||||||
version "2.1.0"
|
|
||||||
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-2.1.0.tgz#3de3dbd68cfb2f3bd52550e2bfd439cf75040eb2"
|
|
||||||
integrity sha512-g5WwS+p6Cm+zQhO2YOpRbQThZVnNb7DDq74h8YDCLfAGynrEOrbx2E16dc8ciENiP1va5sqaAruqn2sN+xpkWg==
|
|
||||||
|
|
||||||
shortid@^2.2.8:
|
|
||||||
version "2.2.15"
|
|
||||||
resolved "https://registry.yarnpkg.com/shortid/-/shortid-2.2.15.tgz#2b902eaa93a69b11120373cd42a1f1fe4437c122"
|
|
||||||
integrity sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==
|
|
||||||
dependencies:
|
|
||||||
nanoid "^2.1.0"
|
|
||||||
|
|
||||||
svelte@^3.9.2:
|
|
||||||
version "3.12.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/svelte/-/svelte-3.12.1.tgz#ddfacd43272ac3255907c682b74ee7d3d8b06b0c"
|
|
||||||
integrity sha512-t29WJNjHIqfrdMcVXqIyRfgLEaNz7MihKXTpb8qHlbzvf0WyOOIhIlwIGvl6ahJ9+9CLJwz0sjhFNAmPgo8BHg==
|
|
File diff suppressed because one or more lines are too long
|
@ -1,35 +1,35 @@
|
||||||
main.svelte-15fmzor{height:100%;width:100%;font-family:"Roboto", Helvetica, Arial, sans-serif}
|
main.svelte-15fmzor{height:100%;width:100%;font-family:"Roboto", Helvetica, Arial, sans-serif}
|
||||||
.root.svelte-y7jhgd{height:100%;width:100%;display:flex;flex-direction:column}.top-nav.svelte-y7jhgd{flex:0 0 auto;height:25px;background:white;padding:5px;width:100%}.content.svelte-y7jhgd{flex:1 1 auto;width:100%;height:100px}.content.svelte-y7jhgd>div.svelte-y7jhgd{height:100%;width:100%}.topnavitem.svelte-y7jhgd{cursor:pointer;color:var(--secondary50);padding:0px 15px;font-weight:600;font-size:.9rem}.topnavitem.svelte-y7jhgd:hover{color:var(--secondary75);font-weight:600}.active.svelte-y7jhgd{color:var(--primary100);font-weight:900}
|
|
||||||
.root.svelte-e4n7zy{position:fixed;margin:0 auto;text-align:center;top:20%;width:100%}.inner.svelte-e4n7zy{display:inline-block;margin:auto}.logo.svelte-e4n7zy{width:300px;margin-bottom:40px}.root.svelte-e4n7zy .option{width:250px}.app-link.svelte-e4n7zy{margin-top:10px;display:block}
|
.root.svelte-e4n7zy{position:fixed;margin:0 auto;text-align:center;top:20%;width:100%}.inner.svelte-e4n7zy{display:inline-block;margin:auto}.logo.svelte-e4n7zy{width:300px;margin-bottom:40px}.root.svelte-e4n7zy .option{width:250px}.app-link.svelte-e4n7zy{margin-top:10px;display:block}
|
||||||
|
.root.svelte-y7jhgd{height:100%;width:100%;display:flex;flex-direction:column}.top-nav.svelte-y7jhgd{flex:0 0 auto;height:25px;background:white;padding:5px;width:100%}.content.svelte-y7jhgd{flex:1 1 auto;width:100%;height:100px}.content.svelte-y7jhgd>div.svelte-y7jhgd{height:100%;width:100%}.topnavitem.svelte-y7jhgd{cursor:pointer;color:var(--secondary50);padding:0px 15px;font-weight:600;font-size:.9rem}.topnavitem.svelte-y7jhgd:hover{color:var(--secondary75);font-weight:600}.active.svelte-y7jhgd{color:var(--primary100);font-weight:900}
|
||||||
button.svelte-bxuckr{border-style:none;background-color:rgba(0,0,0,0);cursor:pointer;outline:none}button.svelte-bxuckr:hover{color:var(--hovercolor)}button.svelte-bxuckr:active{outline:none}
|
button.svelte-bxuckr{border-style:none;background-color:rgba(0,0,0,0);cursor:pointer;outline:none}button.svelte-bxuckr:hover{color:var(--hovercolor)}button.svelte-bxuckr:active{outline:none}
|
||||||
.root.svelte-q8uz1n{height:100%;display:flex}.content.svelte-q8uz1n{flex:1 1 auto;height:100%;background-color:var(--white);margin:0}.nav.svelte-q8uz1n{flex:0 1 auto;width:300px;height:100%}
|
.root.svelte-q8uz1n{height:100%;display:flex}.content.svelte-q8uz1n{flex:1 1 auto;height:100%;background-color:var(--white);margin:0}.nav.svelte-q8uz1n{flex:0 1 auto;width:300px;height:100%}
|
||||||
.root.svelte-rjo9m0{display:grid;grid-template-columns:[uiNav] 250px [preview] auto [properties] 300px;height:100%;width:100%;overflow-y:auto}.ui-nav.svelte-rjo9m0{grid-column-start:uiNav;background-color:var(--secondary5);height:100%}.properties-pane.svelte-rjo9m0{grid-column-start:properties;background-color:var(--secondary5);height:100%;overflow-y:hidden}.pages-list-container.svelte-rjo9m0{padding-top:2rem}.components-nav-header.svelte-rjo9m0{font-size:.9rem}.nav-group-header.svelte-rjo9m0{font-size:.9rem;padding-left:1rem}.nav-items-container.svelte-rjo9m0{padding:1rem 1rem 0rem 1rem}.nav-group-header.svelte-rjo9m0{display:grid;grid-template-columns:[icon] auto [title] 1fr [button] auto;padding:2rem 1rem 0rem 1rem;font-size:.9rem;font-weight:bold}.nav-group-header.svelte-rjo9m0>div.svelte-rjo9m0:nth-child(1){padding:0rem .5rem 0rem 0rem;vertical-align:bottom;grid-column-start:icon;margin-right:5px}.nav-group-header.svelte-rjo9m0>span.svelte-rjo9m0:nth-child(2){margin-left:5px;vertical-align:bottom;grid-column-start:title;margin-top:auto}.nav-group-header.svelte-rjo9m0>div.svelte-rjo9m0:nth-child(3){vertical-align:bottom;grid-column-start:button;cursor:pointer;color:var(--primary75)}.nav-group-header.svelte-rjo9m0>div.svelte-rjo9m0:nth-child(3):hover{color:var(--primary75)}
|
|
||||||
.border-normal.svelte-vnon4v{border-radius:var(--borderradiusall)}.border-left.svelte-vnon4v{border-radius:var(--borderradius) 0 0 var(--borderradius)}.border-right.svelte-vnon4v{border-radius:0 var(--borderradius) var(--borderradius) 0}.border-middle.svelte-vnon4v{border-radius:0}button.svelte-vnon4v{border-style:solid;padding:7.5px 15px;cursor:pointer;margin:5px;border-radius:5px}.primary.svelte-vnon4v{background-color:var(--primary100);border-color:var(--primary100);color:var(--white)}.primary.svelte-vnon4v:hover{background-color:var(--primary75);border-color:var(--primary75)}.primary.svelte-vnon4v:active{background-color:var(--primarydark);border-color:var(--primarydark)}.primary-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--primary100);color:var(--primary100)}.primary-outline.svelte-vnon4v:hover{background-color:var(--primary10)}.primary-outline.svelte-vnon4v:pressed{background-color:var(--primary25)}.secondary.svelte-vnon4v{background-color:var(--secondary100);border-color:var(--secondary100);color:var(--white)}.secondary.svelte-vnon4v:hover{background-color:var(--secondary75);border-color:var(--secondary75)}.secondary.svelte-vnon4v:pressed{background-color:var(--secondarydark);border-color:var(--secondarydark)}.secondary-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--secondary100);color:var(--secondary100)}.secondary-outline.svelte-vnon4v:hover{background-color:var(--secondary10)}.secondary-outline.svelte-vnon4v:pressed{background-color:var(--secondary25)}.success.svelte-vnon4v{background-color:var(--success100);border-color:var(--success100);color:var(--white)}.success.svelte-vnon4v:hover{background-color:var(--success75);border-color:var(--success75)}.success.svelte-vnon4v:pressed{background-color:var(--successdark);border-color:var(--successdark)}.success-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--success100);color:var(--success100)}.success-outline.svelte-vnon4v:hover{background-color:var(--success10)}.success-outline.svelte-vnon4v:pressed{background-color:var(--success25)}.deletion.svelte-vnon4v{background-color:var(--deletion100);border-color:var(--deletion100);color:var(--white)}.deletion.svelte-vnon4v:hover{background-color:var(--deletion75);border-color:var(--deletion75)}.deletion.svelte-vnon4v:pressed{background-color:var(--deletiondark);border-color:var(--deletiondark)}.deletion-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--deletion100);color:var(--deletion100)}.deletion-outline.svelte-vnon4v:hover{background-color:var(--deletion10)}.deletion-outline.svelte-vnon4v:pressed{background-color:var(--deletion25)}
|
.border-normal.svelte-vnon4v{border-radius:var(--borderradiusall)}.border-left.svelte-vnon4v{border-radius:var(--borderradius) 0 0 var(--borderradius)}.border-right.svelte-vnon4v{border-radius:0 var(--borderradius) var(--borderradius) 0}.border-middle.svelte-vnon4v{border-radius:0}button.svelte-vnon4v{border-style:solid;padding:7.5px 15px;cursor:pointer;margin:5px;border-radius:5px}.primary.svelte-vnon4v{background-color:var(--primary100);border-color:var(--primary100);color:var(--white)}.primary.svelte-vnon4v:hover{background-color:var(--primary75);border-color:var(--primary75)}.primary.svelte-vnon4v:active{background-color:var(--primarydark);border-color:var(--primarydark)}.primary-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--primary100);color:var(--primary100)}.primary-outline.svelte-vnon4v:hover{background-color:var(--primary10)}.primary-outline.svelte-vnon4v:pressed{background-color:var(--primary25)}.secondary.svelte-vnon4v{background-color:var(--secondary100);border-color:var(--secondary100);color:var(--white)}.secondary.svelte-vnon4v:hover{background-color:var(--secondary75);border-color:var(--secondary75)}.secondary.svelte-vnon4v:pressed{background-color:var(--secondarydark);border-color:var(--secondarydark)}.secondary-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--secondary100);color:var(--secondary100)}.secondary-outline.svelte-vnon4v:hover{background-color:var(--secondary10)}.secondary-outline.svelte-vnon4v:pressed{background-color:var(--secondary25)}.success.svelte-vnon4v{background-color:var(--success100);border-color:var(--success100);color:var(--white)}.success.svelte-vnon4v:hover{background-color:var(--success75);border-color:var(--success75)}.success.svelte-vnon4v:pressed{background-color:var(--successdark);border-color:var(--successdark)}.success-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--success100);color:var(--success100)}.success-outline.svelte-vnon4v:hover{background-color:var(--success10)}.success-outline.svelte-vnon4v:pressed{background-color:var(--success25)}.deletion.svelte-vnon4v{background-color:var(--deletion100);border-color:var(--deletion100);color:var(--white)}.deletion.svelte-vnon4v:hover{background-color:var(--deletion75);border-color:var(--deletion75)}.deletion.svelte-vnon4v:pressed{background-color:var(--deletiondark);border-color:var(--deletiondark)}.deletion-outline.svelte-vnon4v{background-color:var(--white);border-color:var(--deletion100);color:var(--deletion100)}.deletion-outline.svelte-vnon4v:hover{background-color:var(--deletion10)}.deletion-outline.svelte-vnon4v:pressed{background-color:var(--deletion25)}
|
||||||
|
.root.svelte-rjo9m0{display:grid;grid-template-columns:[uiNav] 250px [preview] auto [properties] 300px;height:100%;width:100%;overflow-y:auto}.ui-nav.svelte-rjo9m0{grid-column-start:uiNav;background-color:var(--secondary5);height:100%}.properties-pane.svelte-rjo9m0{grid-column-start:properties;background-color:var(--secondary5);height:100%;overflow-y:hidden}.pages-list-container.svelte-rjo9m0{padding-top:2rem}.components-nav-header.svelte-rjo9m0{font-size:.9rem}.nav-group-header.svelte-rjo9m0{font-size:.9rem;padding-left:1rem}.nav-items-container.svelte-rjo9m0{padding:1rem 1rem 0rem 1rem}.nav-group-header.svelte-rjo9m0{display:grid;grid-template-columns:[icon] auto [title] 1fr [button] auto;padding:2rem 1rem 0rem 1rem;font-size:.9rem;font-weight:bold}.nav-group-header.svelte-rjo9m0>div.svelte-rjo9m0:nth-child(1){padding:0rem .5rem 0rem 0rem;vertical-align:bottom;grid-column-start:icon;margin-right:5px}.nav-group-header.svelte-rjo9m0>span.svelte-rjo9m0:nth-child(2){margin-left:5px;vertical-align:bottom;grid-column-start:title;margin-top:auto}.nav-group-header.svelte-rjo9m0>div.svelte-rjo9m0:nth-child(3){vertical-align:bottom;grid-column-start:button;cursor:pointer;color:var(--primary75)}.nav-group-header.svelte-rjo9m0>div.svelte-rjo9m0:nth-child(3):hover{color:var(--primary75)}
|
||||||
h4.svelte-sqtlby{margin-top:20px}
|
h4.svelte-sqtlby{margin-top:20px}
|
||||||
.items-root.svelte-19lmivt{display:flex;flex-direction:column;max-height:100%;height:100%;background-color:var(--secondary5)}.nav-group-header.svelte-19lmivt{display:grid;grid-template-columns:[icon] auto [title] 1fr [button] auto;padding:2rem 1rem 0rem 1rem;font-size:.9rem;font-weight:bold}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(1){padding:0rem .7rem 0rem 0rem;vertical-align:bottom;grid-column-start:icon;margin-right:5px}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(2){margin-left:5px;vertical-align:bottom;grid-column-start:title;margin-top:auto}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(3){vertical-align:bottom;grid-column-start:button;cursor:pointer;color:var(--primary75)}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(3):hover{color:var(--primary75)}.hierarchy-title.svelte-19lmivt{flex:auto 1 1}.hierarchy.svelte-19lmivt{display:flex;flex-direction:column;flex:1 0 auto;height:100px}.hierarchy-items-container.svelte-19lmivt{flex:1 1 auto;overflow-y:auto}
|
|
||||||
.root.svelte-nd1yft{height:100%;position:relative;padding:1.5rem}
|
|
||||||
.root.svelte-apja7r{height:100%;position:relative}.actions-header.svelte-apja7r{flex:0 1 auto}.node-view.svelte-apja7r{overflow-y:auto;flex:1 1 auto}
|
.root.svelte-apja7r{height:100%;position:relative}.actions-header.svelte-apja7r{flex:0 1 auto}.node-view.svelte-apja7r{overflow-y:auto;flex:1 1 auto}
|
||||||
|
.root.svelte-nd1yft{height:100%;position:relative;padding:1.5rem}
|
||||||
.root.svelte-wfv60d{height:100%;position:relative;padding:1.5rem}.actions-header.svelte-wfv60d{flex:0 1 auto}.node-view.svelte-wfv60d{overflow-y:auto;flex:1 1 auto}
|
.root.svelte-wfv60d{height:100%;position:relative;padding:1.5rem}.actions-header.svelte-wfv60d{flex:0 1 auto}.node-view.svelte-wfv60d{overflow-y:auto;flex:1 1 auto}
|
||||||
|
.items-root.svelte-19lmivt{display:flex;flex-direction:column;max-height:100%;height:100%;background-color:var(--secondary5)}.nav-group-header.svelte-19lmivt{display:grid;grid-template-columns:[icon] auto [title] 1fr [button] auto;padding:2rem 1rem 0rem 1rem;font-size:.9rem;font-weight:bold}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(1){padding:0rem .7rem 0rem 0rem;vertical-align:bottom;grid-column-start:icon;margin-right:5px}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(2){margin-left:5px;vertical-align:bottom;grid-column-start:title;margin-top:auto}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(3){vertical-align:bottom;grid-column-start:button;cursor:pointer;color:var(--primary75)}.nav-group-header.svelte-19lmivt>div.svelte-19lmivt:nth-child(3):hover{color:var(--primary75)}.hierarchy-title.svelte-19lmivt{flex:auto 1 1}.hierarchy.svelte-19lmivt{display:flex;flex-direction:column;flex:1 0 auto;height:100px}.hierarchy-items-container.svelte-19lmivt{flex:1 1 auto;overflow-y:auto}
|
||||||
.root.svelte-1r2dipt{color:var(--secondary50);font-size:.9rem;font-weight:bold}.hierarchy-item.svelte-1r2dipt{cursor:pointer;padding:5px 0px}.hierarchy-item.svelte-1r2dipt:hover{color:var(--secondary)}.component.svelte-1r2dipt{margin-left:5px}.currentfolder.svelte-1r2dipt{color:var(--secondary100)}.selected.svelte-1r2dipt{color:var(--primary100);font-weight:bold}.title.svelte-1r2dipt{margin-left:10px}
|
.root.svelte-1r2dipt{color:var(--secondary50);font-size:.9rem;font-weight:bold}.hierarchy-item.svelte-1r2dipt{cursor:pointer;padding:5px 0px}.hierarchy-item.svelte-1r2dipt:hover{color:var(--secondary)}.component.svelte-1r2dipt{margin-left:5px}.currentfolder.svelte-1r2dipt{color:var(--secondary100)}.selected.svelte-1r2dipt{color:var(--primary100);font-weight:bold}.title.svelte-1r2dipt{margin-left:10px}
|
||||||
.root.svelte-117bbrk{padding-bottom:10px;padding-left:10px;font-size:.9rem;color:var(--secondary50);font-weight:bold}.hierarchy-item.svelte-117bbrk{cursor:pointer;padding:5px 0px}.hierarchy-item.svelte-117bbrk:hover{color:var(--secondary100)}.component.svelte-117bbrk{margin-left:5px}.selected.svelte-117bbrk{color:var(--primary100);font-weight:bold}.title.svelte-117bbrk{margin-left:10px}
|
|
||||||
h1.svelte-16jkjx9{font-size:1.2em}
|
|
||||||
.uk-modal-dialog.svelte-vwwrf9{border-radius:.3rem}
|
.uk-modal-dialog.svelte-vwwrf9{border-radius:.3rem}
|
||||||
.section-container.svelte-yk1mmr{padding:15px;border-style:dotted;border-width:1px;border-color:var(--lightslate);border-radius:2px}.section-container.svelte-yk1mmr:nth-child(1){margin-bottom:15px}.row-text.svelte-yk1mmr{margin-right:15px;color:var(--primary100)}input.svelte-yk1mmr{margin-right:15px}p.svelte-yk1mmr>span.svelte-yk1mmr{margin-left:30px}.header.svelte-yk1mmr{display:grid;grid-template-columns:[title] 1fr [icon] auto}.header.svelte-yk1mmr>div.svelte-yk1mmr:nth-child(1){grid-column-start:title}.header.svelte-yk1mmr>div.svelte-yk1mmr:nth-child(2){grid-column-start:icon}
|
|
||||||
.component-container.svelte-teqoiq{grid-row-start:middle;grid-column-start:middle;position:relative;overflow:hidden;padding-top:56.25%;margin:auto}.component-container.svelte-teqoiq iframe.svelte-teqoiq{border:0;height:100%;left:0;position:absolute;top:0;width:100%}
|
|
||||||
.root.svelte-1ersoxu{padding:15px}.help-text.svelte-1ersoxu{color:var(--slate);font-size:10pt}
|
.root.svelte-1ersoxu{padding:15px}.help-text.svelte-1ersoxu{color:var(--slate);font-size:10pt}
|
||||||
|
.root.svelte-117bbrk{padding-bottom:10px;padding-left:10px;font-size:.9rem;color:var(--secondary50);font-weight:bold}.hierarchy-item.svelte-117bbrk{cursor:pointer;padding:5px 0px}.hierarchy-item.svelte-117bbrk:hover{color:var(--secondary100)}.component.svelte-117bbrk{margin-left:5px}.selected.svelte-117bbrk{color:var(--primary100);font-weight:bold}.title.svelte-117bbrk{margin-left:10px}
|
||||||
|
.component-container.svelte-teqoiq{grid-row-start:middle;grid-column-start:middle;position:relative;overflow:hidden;padding-top:56.25%;margin:auto}.component-container.svelte-teqoiq iframe.svelte-teqoiq{border:0;height:100%;left:0;position:absolute;top:0;width:100%}
|
||||||
|
.section-container.svelte-yk1mmr{padding:15px;border-style:dotted;border-width:1px;border-color:var(--lightslate);border-radius:2px}.section-container.svelte-yk1mmr:nth-child(1){margin-bottom:15px}.row-text.svelte-yk1mmr{margin-right:15px;color:var(--primary100)}input.svelte-yk1mmr{margin-right:15px}p.svelte-yk1mmr>span.svelte-yk1mmr{margin-left:30px}.header.svelte-yk1mmr{display:grid;grid-template-columns:[title] 1fr [icon] auto}.header.svelte-yk1mmr>div.svelte-yk1mmr:nth-child(1){grid-column-start:title}.header.svelte-yk1mmr>div.svelte-yk1mmr:nth-child(2){grid-column-start:icon}
|
||||||
|
h1.svelte-16jkjx9{font-size:1.2em}
|
||||||
.root.svelte-1abif7s{height:100%;display:flex;flex-direction:column}.padding.svelte-1abif7s{padding:1rem 1rem 0rem 1rem}.info-text.svelte-1abif7s{color:var(--secondary100);font-size:.8rem !important;font-weight:bold}.title.svelte-1abif7s{padding:2rem 1rem 1rem 1rem;display:grid;grid-template-columns:[name] 1fr [actions] auto;color:var(--secondary100);font-size:.9rem;font-weight:bold}.title.svelte-1abif7s>div.svelte-1abif7s:nth-child(1){grid-column-start:name;color:var(--secondary100)}.title.svelte-1abif7s>div.svelte-1abif7s:nth-child(2){grid-column-start:actions}.section-header.svelte-1abif7s{display:grid;grid-template-columns:[name] 1fr [actions] auto;color:var(--secondary50);font-size:.9rem;font-weight:bold;vertical-align:middle}.component-props-container.svelte-1abif7s{flex:1 1 auto;overflow-y:auto}
|
.root.svelte-1abif7s{height:100%;display:flex;flex-direction:column}.padding.svelte-1abif7s{padding:1rem 1rem 0rem 1rem}.info-text.svelte-1abif7s{color:var(--secondary100);font-size:.8rem !important;font-weight:bold}.title.svelte-1abif7s{padding:2rem 1rem 1rem 1rem;display:grid;grid-template-columns:[name] 1fr [actions] auto;color:var(--secondary100);font-size:.9rem;font-weight:bold}.title.svelte-1abif7s>div.svelte-1abif7s:nth-child(1){grid-column-start:name;color:var(--secondary100)}.title.svelte-1abif7s>div.svelte-1abif7s:nth-child(2){grid-column-start:actions}.section-header.svelte-1abif7s{display:grid;grid-template-columns:[name] 1fr [actions] auto;color:var(--secondary50);font-size:.9rem;font-weight:bold;vertical-align:middle}.component-props-container.svelte-1abif7s{flex:1 1 auto;overflow-y:auto}
|
||||||
.root.svelte-17ju2r{display:block;font-size:.9rem;width:100%;cursor:pointer;color:var(--secondary50);font-weight:500}.title.svelte-17ju2r{padding-top:.5rem;padding-right:.5rem}.title.svelte-17ju2r:hover{background-color:var(--secondary10)}.active.svelte-17ju2r{background-color:var(--primary10)}
|
.root.svelte-ehsf0i{display:block;font-size:.9rem;width:100%;cursor:pointer;font-weight:bold}.title.svelte-ehsf0i{font:var(--fontblack);padding-top:10px;padding-right:5px;padding-bottom:10px;color:var(--secondary100)}.title.svelte-ehsf0i:hover{background-color:var(--secondary10)}
|
||||||
.nav-item.svelte-1i5jqm7{padding:1.5rem 1rem 0rem 1rem;font-size:.9rem;font-weight:bold;cursor:pointer;flex:0 0 auto}.nav-item.svelte-1i5jqm7:hover{background-color:var(--primary10)}.active.svelte-1i5jqm7{background-color:var(--primary10)}
|
.root.svelte-18xd5y3{height:100%;padding:2rem}.settings-title.svelte-18xd5y3{font-weight:700}.title.svelte-18xd5y3{margin:3rem 0rem 0rem 0rem;font-weight:700}.recordkey.svelte-18xd5y3{font-size:14px;font-weight:600;color:var(--primary100)}.fields-table.svelte-18xd5y3{margin:1rem 1rem 0rem 0rem;border-collapse:collapse}.add-field-button.svelte-18xd5y3{cursor:pointer}.edit-button.svelte-18xd5y3{cursor:pointer;color:var(--secondary25)}.edit-button.svelte-18xd5y3:hover{cursor:pointer;color:var(--secondary75)}th.svelte-18xd5y3{text-align:left}td.svelte-18xd5y3{padding:1rem 5rem 1rem 0rem;margin:0;font-size:14px;font-weight:500}.field-label.svelte-18xd5y3{font-size:14px;font-weight:500}thead.svelte-18xd5y3>tr.svelte-18xd5y3{border-width:0px 0px 1px 0px;border-style:solid;border-color:var(--secondary75);margin-bottom:20px}tbody.svelte-18xd5y3>tr.svelte-18xd5y3{border-width:0px 0px 1px 0px;border-style:solid;border-color:var(--primary10)}tbody.svelte-18xd5y3>tr.svelte-18xd5y3:hover{background-color:var(--primary10)}tbody.svelte-18xd5y3>tr:hover .edit-button.svelte-18xd5y3{color:var(--secondary75)}.index-container.svelte-18xd5y3{border-style:solid;border-width:0 0 1px 0;border-color:var(--secondary25);padding:10px;margin-bottom:5px}.index-label.svelte-18xd5y3{color:var(--slate)}.index-name.svelte-18xd5y3{font-weight:bold;color:var(--primary100)}.index-container.svelte-18xd5y3 code.svelte-18xd5y3{margin:0;display:inline;background-color:var(--primary10);color:var(--secondary100);padding:3px}.index-field-row.svelte-18xd5y3{margin:1rem 0rem 0rem 0rem}.no-indexes.svelte-18xd5y3{margin:1rem 0rem 0rem 0rem;font-family:var(--fontnormal);font-size:14px}
|
||||||
|
.root.svelte-pq2tmv{height:100%;padding:15px}.allowed-records.svelte-pq2tmv{margin:20px 0px}.allowed-records.svelte-pq2tmv>span.svelte-pq2tmv{margin-right:30px}
|
||||||
.dropdown-background.svelte-11ifkop{position:fixed;top:0;left:0;width:100vw;height:100vh}.root.svelte-11ifkop{cursor:pointer;z-index:1}.dropdown-content.svelte-11ifkop{position:absolute;background-color:var(--white);min-width:160px;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);z-index:1;font-weight:normal;border-style:solid;border-width:1px;border-color:var(--secondary10)}.dropdown-content.svelte-11ifkop:not(:focus){display:none}.action-row.svelte-11ifkop{padding:7px 10px;cursor:pointer}.action-row.svelte-11ifkop:hover{background-color:var(--primary100);color:var(--white)}
|
.dropdown-background.svelte-11ifkop{position:fixed;top:0;left:0;width:100vw;height:100vh}.root.svelte-11ifkop{cursor:pointer;z-index:1}.dropdown-content.svelte-11ifkop{position:absolute;background-color:var(--white);min-width:160px;box-shadow:0px 8px 16px 0px rgba(0,0,0,0.2);z-index:1;font-weight:normal;border-style:solid;border-width:1px;border-color:var(--secondary10)}.dropdown-content.svelte-11ifkop:not(:focus){display:none}.action-row.svelte-11ifkop{padding:7px 10px;cursor:pointer}.action-row.svelte-11ifkop:hover{background-color:var(--primary100);color:var(--white)}
|
||||||
.root.svelte-x3bf9z{display:flex}.root.svelte-x3bf9z:last-child{border-radius:0 var(--borderradius) var(--borderradius) 0}.root.svelte-x3bf9z:first-child{border-radius:var(--borderradius) 0 0 var(--borderradius)}.root.svelte-x3bf9z:not(:first-child):not(:last-child){border-radius:0}
|
.root.svelte-x3bf9z{display:flex}.root.svelte-x3bf9z:last-child{border-radius:0 var(--borderradius) var(--borderradius) 0}.root.svelte-x3bf9z:first-child{border-radius:var(--borderradius) 0 0 var(--borderradius)}.root.svelte-x3bf9z:not(:first-child):not(:last-child){border-radius:0}
|
||||||
.root.svelte-18xd5y3{height:100%;padding:2rem}.settings-title.svelte-18xd5y3{font-weight:700}.title.svelte-18xd5y3{margin:3rem 0rem 0rem 0rem;font-weight:700}.recordkey.svelte-18xd5y3{font-size:14px;font-weight:600;color:var(--primary100)}.fields-table.svelte-18xd5y3{margin:1rem 1rem 0rem 0rem;border-collapse:collapse}.add-field-button.svelte-18xd5y3{cursor:pointer}.edit-button.svelte-18xd5y3{cursor:pointer;color:var(--secondary25)}.edit-button.svelte-18xd5y3:hover{cursor:pointer;color:var(--secondary75)}th.svelte-18xd5y3{text-align:left}td.svelte-18xd5y3{padding:1rem 5rem 1rem 0rem;margin:0;font-size:14px;font-weight:500}.field-label.svelte-18xd5y3{font-size:14px;font-weight:500}thead.svelte-18xd5y3>tr.svelte-18xd5y3{border-width:0px 0px 1px 0px;border-style:solid;border-color:var(--secondary75);margin-bottom:20px}tbody.svelte-18xd5y3>tr.svelte-18xd5y3{border-width:0px 0px 1px 0px;border-style:solid;border-color:var(--primary10)}tbody.svelte-18xd5y3>tr.svelte-18xd5y3:hover{background-color:var(--primary10)}tbody.svelte-18xd5y3>tr:hover .edit-button.svelte-18xd5y3{color:var(--secondary75)}.index-container.svelte-18xd5y3{border-style:solid;border-width:0 0 1px 0;border-color:var(--secondary25);padding:10px;margin-bottom:5px}.index-label.svelte-18xd5y3{color:var(--slate)}.index-name.svelte-18xd5y3{font-weight:bold;color:var(--primary100)}.index-container.svelte-18xd5y3 code.svelte-18xd5y3{margin:0;display:inline;background-color:var(--primary10);color:var(--secondary100);padding:3px}.index-field-row.svelte-18xd5y3{margin:1rem 0rem 0rem 0rem}.no-indexes.svelte-18xd5y3{margin:1rem 0rem 0rem 0rem;font-family:var(--fontnormal);font-size:14px}
|
|
||||||
.root.svelte-ehsf0i{display:block;font-size:.9rem;width:100%;cursor:pointer;font-weight:bold}.title.svelte-ehsf0i{font:var(--fontblack);padding-top:10px;padding-right:5px;padding-bottom:10px;color:var(--secondary100)}.title.svelte-ehsf0i:hover{background-color:var(--secondary10)}
|
|
||||||
.root.svelte-wgyofl{padding:1.5rem;width:100%;align-items:right}
|
.root.svelte-wgyofl{padding:1.5rem;width:100%;align-items:right}
|
||||||
.root.svelte-pq2tmv{height:100%;padding:15px}.allowed-records.svelte-pq2tmv{margin:20px 0px}.allowed-records.svelte-pq2tmv>span.svelte-pq2tmv{margin-right:30px}
|
|
||||||
.edit-button.svelte-zm41av{cursor:pointer;color:var(--secondary25)}.title.svelte-zm41av{margin:3rem 0rem 0rem 0rem;font-weight:700}.table-content.svelte-zm41av{font-weight:500;font-size:.9rem}tr.svelte-zm41av:hover .edit-button.svelte-zm41av{color:var(--secondary75)}
|
|
||||||
.edit-button.svelte-lhfdtn{cursor:pointer;color:var(--secondary25)}tr.svelte-lhfdtn:hover .edit-button.svelte-lhfdtn{color:var(--secondary75)}.title.svelte-lhfdtn{margin:3rem 0rem 0rem 0rem;font-weight:700}.table-content.svelte-lhfdtn{font-weight:500;font-size:.9rem}
|
.edit-button.svelte-lhfdtn{cursor:pointer;color:var(--secondary25)}tr.svelte-lhfdtn:hover .edit-button.svelte-lhfdtn{color:var(--secondary75)}.title.svelte-lhfdtn{margin:3rem 0rem 0rem 0rem;font-weight:700}.table-content.svelte-lhfdtn{font-weight:500;font-size:.9rem}
|
||||||
.library-header.svelte-chhyel{font-size:1.1em;border-color:var(--primary25);border-width:1px 0px;border-style:solid;background-color:var(--primary10);padding:5px 0}.library-container.svelte-chhyel{padding:0 0 10px 10px}.inner-header.svelte-chhyel{font-size:0.9em;font-weight:bold;margin-top:7px;margin-bottom:3px}.component.svelte-chhyel{padding:2px 0px;cursor:pointer}.component.svelte-chhyel:hover{background-color:var(--lightslate)}.component.svelte-chhyel>.name.svelte-chhyel{color:var(--secondary100);display:inline-block}.component.svelte-chhyel>.description.svelte-chhyel{font-size:0.8em;color:var(--secondary75);display:inline-block;margin-left:10px}
|
.edit-button.svelte-zm41av{cursor:pointer;color:var(--secondary25)}.title.svelte-zm41av{margin:3rem 0rem 0rem 0rem;font-weight:700}.table-content.svelte-zm41av{font-weight:500;font-size:.9rem}tr.svelte-zm41av:hover .edit-button.svelte-zm41av{color:var(--secondary75)}
|
||||||
|
.nav-item.svelte-1i5jqm7{padding:1.5rem 1rem 0rem 1rem;font-size:.9rem;font-weight:bold;cursor:pointer;flex:0 0 auto}.nav-item.svelte-1i5jqm7:hover{background-color:var(--primary10)}.active.svelte-1i5jqm7{background-color:var(--primary10)}
|
||||||
|
.root.svelte-17ju2r{display:block;font-size:.9rem;width:100%;cursor:pointer;color:var(--secondary50);font-weight:500}.title.svelte-17ju2r{padding-top:.5rem;padding-right:.5rem}.title.svelte-17ju2r:hover{background-color:var(--secondary10)}.active.svelte-17ju2r{background-color:var(--primary10)}
|
||||||
.info-text.svelte-1gx0gkl{font-size:0.7rem;color:var(--secondary50)}
|
.info-text.svelte-1gx0gkl{font-size:0.7rem;color:var(--secondary50)}
|
||||||
|
.library-header.svelte-chhyel{font-size:1.1em;border-color:var(--primary25);border-width:1px 0px;border-style:solid;background-color:var(--primary10);padding:5px 0}.library-container.svelte-chhyel{padding:0 0 10px 10px}.inner-header.svelte-chhyel{font-size:0.9em;font-weight:bold;margin-top:7px;margin-bottom:3px}.component.svelte-chhyel{padding:2px 0px;cursor:pointer}.component.svelte-chhyel:hover{background-color:var(--lightslate)}.component.svelte-chhyel>.name.svelte-chhyel{color:var(--secondary100);display:inline-block}.component.svelte-chhyel>.description.svelte-chhyel{font-size:0.8em;color:var(--secondary75);display:inline-block;margin-left:10px}
|
||||||
.root.svelte-47ohpz{font-size:10pt}.padding.svelte-47ohpz{padding:0 10px}.inherited-title.svelte-47ohpz{padding:1rem 1rem 1rem 1rem;display:grid;grid-template-columns:[name] 1fr [actions] auto;color:var(--secondary100);font-size:.9rem;font-weight:bold}.inherited-title.svelte-47ohpz>div.svelte-47ohpz:nth-child(1){grid-column-start:name;color:var(--secondary50)}.inherited-title.svelte-47ohpz>div.svelte-47ohpz:nth-child(2){grid-column-start:actions;color:var(--secondary100)}
|
.root.svelte-47ohpz{font-size:10pt}.padding.svelte-47ohpz{padding:0 10px}.inherited-title.svelte-47ohpz{padding:1rem 1rem 1rem 1rem;display:grid;grid-template-columns:[name] 1fr [actions] auto;color:var(--secondary100);font-size:.9rem;font-weight:bold}.inherited-title.svelte-47ohpz>div.svelte-47ohpz:nth-child(1){grid-column-start:name;color:var(--secondary50)}.inherited-title.svelte-47ohpz>div.svelte-47ohpz:nth-child(2){grid-column-start:actions;color:var(--secondary100)}
|
||||||
.component.svelte-3sgo90{padding:5px 0}.component.svelte-3sgo90 .title.svelte-3sgo90{width:300px
|
.component.svelte-3sgo90{padding:5px 0}.component.svelte-3sgo90 .title.svelte-3sgo90{width:300px
|
||||||
}.component.svelte-3sgo90>.description.svelte-3sgo90{font-size:0.8em;color:var(--secondary75)}.button-container.svelte-3sgo90{text-align:right;margin-top:20px}.error.svelte-3sgo90{font-size:10pt;color:red}
|
}.component.svelte-3sgo90>.description.svelte-3sgo90{font-size:0.8em;color:var(--secondary75)}.button-container.svelte-3sgo90{text-align:right;margin-top:20px}.error.svelte-3sgo90{font-size:10pt;color:red}
|
||||||
|
@ -38,12 +38,12 @@ textarea.svelte-di7k4b{padding:3px;margin-top:5px;margin-bottom:10px;background:
|
||||||
.error-container.svelte-ole1mk{padding:10px;border-style:solid;border-color:var(--deletion100);border-radius:var(--borderradiusall);background:var(--deletion75)}.error-row.svelte-ole1mk{padding:5px 0px}
|
.error-container.svelte-ole1mk{padding:10px;border-style:solid;border-color:var(--deletion100);border-radius:var(--borderradiusall);background:var(--deletion75)}.error-row.svelte-ole1mk{padding:5px 0px}
|
||||||
.root.svelte-16sjty9{padding:2rem;border-radius:2rem}.uk-grid-small.svelte-16sjty9{padding:1rem}.option-container.svelte-16sjty9{border-style:dotted;border-width:1px;border-color:var(--primary75);padding:3px;margin-right:5px}
|
.root.svelte-16sjty9{padding:2rem;border-radius:2rem}.uk-grid-small.svelte-16sjty9{padding:1rem}.option-container.svelte-16sjty9{border-style:dotted;border-width:1px;border-color:var(--primary75);padding:3px;margin-right:5px}
|
||||||
input.svelte-9fre0g{margin-right:7px}
|
input.svelte-9fre0g{margin-right:7px}
|
||||||
.root.svelte-ogh8o0{display:grid;grid-template-columns:[name] 1fr [actions] auto}.root.svelte-ogh8o0>div.svelte-ogh8o0:nth-child(1){grid-column-start:name;color:var(--secondary50)}.root.svelte-ogh8o0>div.svelte-ogh8o0:nth-child(2){grid-column-start:actions}.selectedname.svelte-ogh8o0{font-weight:bold;color:var(--secondary)}
|
|
||||||
.root.svelte-1v0yya9{padding:1rem 1rem 0rem 1rem}.prop-label.svelte-1v0yya9{font-size:0.8rem;color:var(--secondary100);font-weight:bold}
|
.root.svelte-1v0yya9{padding:1rem 1rem 0rem 1rem}.prop-label.svelte-1v0yya9{font-size:0.8rem;color:var(--secondary100);font-weight:bold}
|
||||||
|
.root.svelte-ogh8o0{display:grid;grid-template-columns:[name] 1fr [actions] auto}.root.svelte-ogh8o0>div.svelte-ogh8o0:nth-child(1){grid-column-start:name;color:var(--secondary50)}.root.svelte-ogh8o0>div.svelte-ogh8o0:nth-child(2){grid-column-start:actions}.selectedname.svelte-ogh8o0{font-weight:bold;color:var(--secondary)}
|
||||||
textarea.svelte-1kv2xk7{width:300px;height:200px}
|
textarea.svelte-1kv2xk7{width:300px;height:200px}
|
||||||
.addelement-container.svelte-r1ft9p{cursor:pointer;padding:3px 0px;text-align:center}.addelement-container.svelte-r1ft9p:hover{background-color:var(--primary25);margin-top:5px}.control-container.svelte-r1ft9p{padding-left:3px;background:var(--secondary10)}.separator.svelte-r1ft9p{width:60%;margin:10px auto;border-style:solid;border-width:1px 0 0 0;border-color:var(--primary25)}
|
.addelement-container.svelte-r1ft9p{cursor:pointer;padding:3px 0px;text-align:center}.addelement-container.svelte-r1ft9p:hover{background-color:var(--primary25);margin-top:5px}.control-container.svelte-r1ft9p{padding-left:3px;background:var(--secondary10)}.separator.svelte-r1ft9p{width:60%;margin:10px auto;border-style:solid;border-width:1px 0 0 0;border-color:var(--primary25)}
|
||||||
.addelement-container.svelte-199q8jr{cursor:pointer;padding:3px 0px;text-align:center}.addelement-container.svelte-199q8jr:hover{background-color:var(--primary25)}.item-container.svelte-199q8jr{padding-left:3px;background:var(--secondary10)}
|
|
||||||
.unbound-container.svelte-jubmd5{display:flex;margin:.5rem 0rem .5rem 0rem}.unbound-container.svelte-jubmd5>.svelte-jubmd5:nth-child(1){width:auto;flex:1 0 auto;font-size:0.8rem;color:var(--secondary100);border-radius:.2rem}.bound-header.svelte-jubmd5{display:flex}.bound-header.svelte-jubmd5>div.svelte-jubmd5:nth-child(1){flex:1 0 auto;width:30px;color:var(--secondary50);padding-left:5px}.binding-prop-label.svelte-jubmd5{color:var(--secondary50)}
|
.unbound-container.svelte-jubmd5{display:flex;margin:.5rem 0rem .5rem 0rem}.unbound-container.svelte-jubmd5>.svelte-jubmd5:nth-child(1){width:auto;flex:1 0 auto;font-size:0.8rem;color:var(--secondary100);border-radius:.2rem}.bound-header.svelte-jubmd5{display:flex}.bound-header.svelte-jubmd5>div.svelte-jubmd5:nth-child(1){flex:1 0 auto;width:30px;color:var(--secondary50);padding-left:5px}.binding-prop-label.svelte-jubmd5{color:var(--secondary50)}
|
||||||
|
.addelement-container.svelte-199q8jr{cursor:pointer;padding:3px 0px;text-align:center}.addelement-container.svelte-199q8jr:hover{background-color:var(--primary25)}.item-container.svelte-199q8jr{padding-left:3px;background:var(--secondary10)}
|
||||||
.type-selector-container.svelte-1b6pj9u{display:flex}.type-selector.svelte-1b6pj9u{border-color:var(--primary50);border-radius:2px;width:50px;flex:1 0 auto}
|
.type-selector-container.svelte-1b6pj9u{display:flex}.type-selector.svelte-1b6pj9u{border-color:var(--primary50);border-radius:2px;width:50px;flex:1 0 auto}
|
||||||
|
|
||||||
/*# sourceMappingURL=bundle.css.map */
|
/*# sourceMappingURL=bundle.css.map */
|
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
|
@ -251,5 +251,23 @@
|
||||||
"thClass": {"type":"string", "default":"th-default"}
|
"thClass": {"type":"string", "default":"th-default"}
|
||||||
},
|
},
|
||||||
"tags": ["table"]
|
"tags": ["table"]
|
||||||
|
},
|
||||||
|
"div": {
|
||||||
|
"importPath": "Div",
|
||||||
|
"name": "Div",
|
||||||
|
"description": "An HTML div tag",
|
||||||
|
"props" : {
|
||||||
|
"children": {
|
||||||
|
"type":"array",
|
||||||
|
"elementDefinition": {
|
||||||
|
"component":"component"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"className":"string",
|
||||||
|
"data": "state",
|
||||||
|
"dataItemComponent": "component",
|
||||||
|
"onLoad": "event"
|
||||||
|
},
|
||||||
|
"tags": ["div", "container", "layout"]
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
<script>
|
||||||
|
|
||||||
|
export let children = [];
|
||||||
|
export let className="";
|
||||||
|
export let data=[];
|
||||||
|
export let dataItemComponent;
|
||||||
|
export let onLoad;
|
||||||
|
|
||||||
|
export let _bb;
|
||||||
|
|
||||||
|
let rootDiv;
|
||||||
|
let staticComponentsApplied=false;
|
||||||
|
let dataBoundComponents = [];
|
||||||
|
let previousData;
|
||||||
|
let onLoadCalled = false;
|
||||||
|
|
||||||
|
const hasData = () =>
|
||||||
|
Array.isArray(data) && data.length > 0;
|
||||||
|
|
||||||
|
$: {
|
||||||
|
|
||||||
|
if(children && children.length > 0 && !staticComponentsApplied) {
|
||||||
|
for(let child of children) {
|
||||||
|
_bb.appendComponent(
|
||||||
|
child.control,
|
||||||
|
rootDiv);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(previousData !== data) {
|
||||||
|
|
||||||
|
for(let c of dataBoundComponents) {
|
||||||
|
dataBoundComponents[c].$destroy();
|
||||||
|
}
|
||||||
|
dataBoundComponents = [];
|
||||||
|
|
||||||
|
|
||||||
|
if(hasData()) {
|
||||||
|
let index = 0;
|
||||||
|
for(let dataItem of data) {
|
||||||
|
_bb.appendComponent(
|
||||||
|
dataItemComponent,
|
||||||
|
rootDiv,
|
||||||
|
dataItem
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!onLoadCalled && onLoad && !onLoad.isPlaceholder) {
|
||||||
|
_bb.call(onLoad);
|
||||||
|
onLoadCalled = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="{className}" bind:this={rootDiv}>
|
||||||
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue