md components - getting TestApp to work
This commit is contained in:
parent
8c10349eba
commit
3d156de687
|
@ -35,6 +35,7 @@
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@nx-js/compiler-util": "^2.0.0",
|
"@nx-js/compiler-util": "^2.0.0",
|
||||||
|
"bcryptjs": "^2.4.3",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"lunr": "^2.3.5",
|
"lunr": "^2.3.5",
|
||||||
"shortid": "^2.2.8",
|
"shortid": "^2.2.8",
|
||||||
|
|
|
@ -3,3 +3,4 @@ node_modules
|
||||||
yarn.lock
|
yarn.lock
|
||||||
package-lock.json
|
package-lock.json
|
||||||
dist/index.js
|
dist/index.js
|
||||||
|
public/*
|
|
@ -12,8 +12,9 @@
|
||||||
"publishdev": "yarn build && node ./scripts/publishDev.js"
|
"publishdev": "yarn build && node ./scripts/publishDev.js"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@budibase/client": "^0.0.15",
|
"@budibase/client": "^0.0.16",
|
||||||
"@nx-js/compiler-util": "^2.0.0",
|
"@nx-js/compiler-util": "^2.0.0",
|
||||||
|
"bcryptjs": "^2.4.3",
|
||||||
"fs-extra": "^8.1.0",
|
"fs-extra": "^8.1.0",
|
||||||
"lodash": "^4.17.15",
|
"lodash": "^4.17.15",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 12 KiB |
|
@ -1,3 +0,0 @@
|
||||||
#current_component.svelte-uuhis1{height:100%;width:100%}
|
|
||||||
|
|
||||||
/*# sourceMappingURL=bundle.css.map */
|
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"version": 3,
|
|
||||||
"file": "bundle.css",
|
|
||||||
"sources": [
|
|
||||||
"..\\src\\Test\\TestApp.svelte"
|
|
||||||
],
|
|
||||||
"sourcesContent": [
|
|
||||||
"<script>\r\nimport createApp from \"./createApp\";\r\nimport { props } from \"./props\";\r\n\r\nlet _bb;\r\n\r\nconst _appPromise = createApp();\r\n_appPromise.then(a => _bb = a);\r\n\r\nconst testProps = props.justAnH1;\r\n\r\nlet currentComponent;\r\n\r\n$: {\r\n if(_bb && currentComponent) {\r\n _bb.hydrateChildren(testProps._children, currentComponent);\r\n }\r\n}\r\n\r\n\r\n\r\n</script>\r\n\r\n{#await _appPromise}\r\nloading\r\n{:then _bb}\r\n\r\n<div id=\"current_component\" bind:this={currentComponent}>\r\n</div>\r\n\r\n{/await}\r\n\r\n\r\n<style>\r\n#current_component {\r\n height: 100%;\r\n width: 100%;\r\n}\r\n</style>\r\n\r\n"
|
|
||||||
],
|
|
||||||
"names": [],
|
|
||||||
"mappings": "AAkCA,kBAAkB,cAAC,CAAC,AAChB,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,AACf,CAAC"
|
|
||||||
}
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
||||||
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.
Before Width: | Height: | Size: 3.1 KiB |
|
@ -1,62 +0,0 @@
|
||||||
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;
|
|
||||||
}
|
|
|
@ -1,18 +0,0 @@
|
||||||
<!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>
|
|
|
@ -38,7 +38,10 @@ export default {
|
||||||
sourcemap: true,
|
sourcemap: true,
|
||||||
format: 'iife',
|
format: 'iife',
|
||||||
name: 'app',
|
name: 'app',
|
||||||
file: 'public/bundle.js'
|
file: 'public/bundle.js',
|
||||||
|
globals: {
|
||||||
|
"crypto": "crypto"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
svelte({
|
svelte({
|
||||||
|
@ -64,7 +67,8 @@ export default {
|
||||||
return importee === 'svelte'
|
return importee === 'svelte'
|
||||||
|| importee.startsWith('svelte/')
|
|| importee.startsWith('svelte/')
|
||||||
|| coreExternal.includes(importee);
|
|| coreExternal.includes(importee);
|
||||||
}
|
},
|
||||||
|
preferBuiltins: true
|
||||||
}),
|
}),
|
||||||
commonjs({
|
commonjs({
|
||||||
namedExports: {
|
namedExports: {
|
||||||
|
|
|
@ -13,7 +13,7 @@ let currentComponent;
|
||||||
|
|
||||||
$: {
|
$: {
|
||||||
if(_bb && currentComponent) {
|
if(_bb && currentComponent) {
|
||||||
_bb.hydrateChildren(testProps._children, currentComponent);
|
_bb.hydrateChildren([testProps], currentComponent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
import { createApp } from "@budibase/client/src/createApp";
|
import { createApp } from "@budibase/client/src/createApp";
|
||||||
import componentsJson from "../../components.json";
|
import components from "./testComponents";
|
||||||
import packageJson from "../../package.json";
|
import packageJson from "../../package.json";
|
||||||
|
|
||||||
export default async () => {
|
export default async () => {
|
||||||
|
|
||||||
const components = {...componentsJson};
|
|
||||||
delete components._lib;
|
delete components._lib;
|
||||||
|
|
||||||
|
const componentLibraries = {};
|
||||||
componentLibraries[packageJson.name] = components;
|
componentLibraries[packageJson.name] = components;
|
||||||
|
|
||||||
const appDef = {hierarchy:{}, actions:{}};
|
const appDef = {hierarchy:{}, actions:{}};
|
||||||
|
|
|
@ -3,6 +3,7 @@ export const props = {
|
||||||
|
|
||||||
justAnH1 : {
|
justAnH1 : {
|
||||||
_component:"@budibase/materialdesign-components/h1",
|
_component:"@budibase/materialdesign-components/h1",
|
||||||
|
_children: [],
|
||||||
text: "This is a Header"
|
text: "This is a Header"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
import h1 from "../H1.svelte";
|
||||||
|
|
||||||
|
export default {h1};
|
|
@ -1 +1,2 @@
|
||||||
export {default as h1} from "./H1.svelte";
|
export {default as h1} from "./H1.svelte";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue