- {trigger.eventName} |
- {trigger.actionName} |
- {trigger.condition} |
- {trigger.optionsCreator} |
+ {trigger.eventName} |
+ {trigger.actionName} |
+ {trigger.condition} |
+ {trigger.optionsCreator} |
onTriggerEdit(trigger)}>{@html getIcon("edit")}
onTriggerDelete(trigger)}>{@html getIcon("trash")}
@@ -74,7 +74,17 @@ let triggerEditingFinished = (trigger) => {
.edit-button {
cursor:pointer;
- color: var(--white);
+ color: var(--secondary25);
+}
+
+.title {
+ margin: 3rem 0rem 0rem 0rem;
+ font-weight: 700;
+}
+
+.table-content {
+ font-weight: 500;
+ font-size: .9rem;
}
tr:hover .edit-button {
diff --git a/packages/builder/src/assets/lato-latin-ext.woff2 b/packages/builder/src/assets/lato-latin-ext.woff2
deleted file mode 100644
index 0a0ee5eaed..0000000000
Binary files a/packages/builder/src/assets/lato-latin-ext.woff2 and /dev/null differ
diff --git a/packages/builder/src/assets/lato-latin.woff2 b/packages/builder/src/assets/lato-latin.woff2
deleted file mode 100644
index 6904b6649f..0000000000
Binary files a/packages/builder/src/assets/lato-latin.woff2 and /dev/null differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-300.woff b/packages/builder/src/assets/roboto-v20-latin-ext_latin-300.woff
new file mode 100644
index 0000000000..72f1207930
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-300.woff differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-300.woff2 b/packages/builder/src/assets/roboto-v20-latin-ext_latin-300.woff2
new file mode 100644
index 0000000000..05fda6ab5c
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-300.woff2 differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-500.woff b/packages/builder/src/assets/roboto-v20-latin-ext_latin-500.woff
new file mode 100644
index 0000000000..fb70b7e915
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-500.woff differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-500.woff2 b/packages/builder/src/assets/roboto-v20-latin-ext_latin-500.woff2
new file mode 100644
index 0000000000..96981bc870
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-500.woff2 differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-700.woff b/packages/builder/src/assets/roboto-v20-latin-ext_latin-700.woff
new file mode 100644
index 0000000000..d023f3de32
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-700.woff differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-700.woff2 b/packages/builder/src/assets/roboto-v20-latin-ext_latin-700.woff2
new file mode 100644
index 0000000000..fd49210352
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-700.woff2 differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-900.woff b/packages/builder/src/assets/roboto-v20-latin-ext_latin-900.woff
new file mode 100644
index 0000000000..397450501b
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-900.woff differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-900.woff2 b/packages/builder/src/assets/roboto-v20-latin-ext_latin-900.woff2
new file mode 100644
index 0000000000..5cd76971f1
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-900.woff2 differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-regular.woff b/packages/builder/src/assets/roboto-v20-latin-ext_latin-regular.woff
new file mode 100644
index 0000000000..f9849dfbee
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-regular.woff differ
diff --git a/packages/builder/src/assets/roboto-v20-latin-ext_latin-regular.woff2 b/packages/builder/src/assets/roboto-v20-latin-ext_latin-regular.woff2
new file mode 100644
index 0000000000..1f7dd5b890
Binary files /dev/null and b/packages/builder/src/assets/roboto-v20-latin-ext_latin-regular.woff2 differ
diff --git a/packages/builder/src/builderStore/api.js b/packages/builder/src/builderStore/api.js
index b9fb1c5c3e..cf7732c021 100644
--- a/packages/builder/src/builderStore/api.js
+++ b/packages/builder/src/builderStore/api.js
@@ -1,5 +1,3 @@
-import { isUndefined } from "lodash/fp";
-
const apiCall = (method) => (url, body) =>
fetch(url, {
method: method,
diff --git a/packages/builder/src/builderStore/loadComponentLibraries.js b/packages/builder/src/builderStore/loadComponentLibraries.js
index 42f7cdad84..9e69711d8e 100644
--- a/packages/builder/src/builderStore/loadComponentLibraries.js
+++ b/packages/builder/src/builderStore/loadComponentLibraries.js
@@ -11,6 +11,17 @@ export const loadLibs = async (appName, appPackage) => {
return allLibraries;
}
+export const loadLibUrls = (appName, appPackage) => {
+
+ const allLibraries = [];
+ for(let lib of appPackage.pages.componentLibraries) {
+ const libUrl = makeLibraryUrl(appName, lib);
+ allLibraries.push({libName:lib, importPath:libUrl});
+ }
+
+ return allLibraries;
+}
+
export const loadLib = async (appName, lib, allLibs) => {
allLibs[lib] = await import(makeLibraryUrl(appName, lib));
return allLibs;
diff --git a/packages/builder/src/builderStore/store.js b/packages/builder/src/builderStore/store.js
index 6c960ff2a7..9a2c342cb2 100644
--- a/packages/builder/src/builderStore/store.js
+++ b/packages/builder/src/builderStore/store.js
@@ -1,26 +1,14 @@
import {
hierarchy as hierarchyFunctions,
- common
} from "../../../core/src";
import {
- filter,
- cloneDeep,
- sortBy,
- map,
- last,
- keys,
- concat,
- find,
- isEmpty,
- groupBy,
- reduce
+ filter, cloneDeep, sortBy,
+ map, last, keys, concat,
+ find, isEmpty, reduce
} from "lodash/fp";
import {
- pipe,
- getNode,
- validate,
- constructHierarchy,
- templateApi
+ pipe, getNode, validate,
+ constructHierarchy, templateApi
} from "../common/core";
import {writable} from "svelte/store";
import { defaultPagesObject } from "../userInterface/pagesParsing/defaultPagesObject"
@@ -28,10 +16,9 @@ import { buildPropsHierarchy } from "../userInterface/pagesParsing/buildPropsHie
import api from "./api";
import { isRootComponent } from "../userInterface/pagesParsing/searchComponents";
import {
- getComponentInfo,
- getNewComponentInfo
+ getComponentInfo, getNewComponentInfo
} from "../userInterface/pagesParsing/createProps";
-import { loadLibs } from "./loadComponentLibraries";
+import { loadLibs, loadLibUrls } from "./loadComponentLibraries";
let appname = "";
@@ -121,6 +108,7 @@ const initialise = (store, initial) => async () => {
.then(r => r.json());
initial.libraries = await loadLibs(appname, pkg);
+ initial.loadLibraryUrls = () => loadLibUrls(appname, pkg);
initial.appname = appname;
initial.pages = pkg.pages;
initial.hasAppPackage = true;
diff --git a/packages/builder/src/common/Button.svelte b/packages/builder/src/common/Button.svelte
index 6254a9f4bf..fd54140bac 100644
--- a/packages/builder/src/common/Button.svelte
+++ b/packages/builder/src/common/Button.svelte
@@ -27,8 +27,10 @@ $: borderClass = grouped
button {
border-style: solid;
- padding: 7px 15px;
+ padding: 7.5px 15px;
cursor:pointer;
+ margin:5px;
+ border-radius: 5px;
}
/* ---- PRIMARY ----*/
diff --git a/packages/builder/src/common/CodeArea.svelte b/packages/builder/src/common/CodeArea.svelte
index 80e3abe026..af60b9b34d 100644
--- a/packages/builder/src/common/CodeArea.svelte
+++ b/packages/builder/src/common/CodeArea.svelte
@@ -11,11 +11,14 @@ export let label = "";
textarea {
padding:3px;
- background: var(--darkslate);
+ margin-top:5px;
+ margin-bottom:10px;
+ background: var(--lightslate);
color: var(--white);
font-family: 'Courier New', Courier, monospace;
width:95%;
height:100px;
+ border-radius: 5px;
}
\ No newline at end of file
diff --git a/packages/builder/src/common/DropdownButton.svelte b/packages/builder/src/common/DropdownButton.svelte
index 61808a74b2..9953aaa8cf 100644
--- a/packages/builder/src/common/DropdownButton.svelte
+++ b/packages/builder/src/common/DropdownButton.svelte
@@ -46,7 +46,7 @@ let isDroppedDown = false;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
font-weight: normal;
- border-style:solid;
+ border-style: solid;
border-width: 1px;
border-color: var(--secondary10);
}
diff --git a/packages/builder/src/common/Modal.svelte b/packages/builder/src/common/Modal.svelte
index 0cb081abf4..2c9c019acf 100644
--- a/packages/builder/src/common/Modal.svelte
+++ b/packages/builder/src/common/Modal.svelte
@@ -34,4 +34,8 @@ $: {
\ No newline at end of file
diff --git a/packages/builder/src/common/binding.js b/packages/builder/src/common/binding.js
new file mode 100644
index 0000000000..704e79091c
--- /dev/null
+++ b/packages/builder/src/common/binding.js
@@ -0,0 +1,25 @@
+import {
+ isString
+} from "lodash/fp";
+
+export const BB_STATE_BINDINGPATH = "##bbstate";
+export const BB_STATE_FALLBACK = "##bbstatefallback";
+
+export const isBinding = value =>
+ !isString(value)
+ && value
+ && isString(value[BB_STATE_BINDINGPATH])
+ && value[BB_STATE_BINDINGPATH].length > 0;
+
+export const setBinding = ({path, fallback}, binding={} ) => {
+ if(isNonEmptyString(path)) binding[BB_STATE_BINDINGPATH] = path;
+ if(isNonEmptyString(fallback)) binding[BB_STATE_FALLBACK] = fallback;
+ return binding
+}
+
+export const getBinding = binding => ({
+ path: binding[BB_STATE_BINDINGPATH] || "",
+ fallback: binding[BB_STATE_FALLBACK] || ""
+});
+
+const isNonEmptyString = s => isString(s) && s.length > 0;
\ No newline at end of file
diff --git a/packages/builder/src/common/eventHandlers.js b/packages/builder/src/common/eventHandlers.js
new file mode 100644
index 0000000000..e396b7376f
--- /dev/null
+++ b/packages/builder/src/common/eventHandlers.js
@@ -0,0 +1 @@
+export const EVENT_TYPE_MEMBER_NAME = "##eventHandlerType";
\ No newline at end of file
diff --git a/packages/builder/src/common/icon.js b/packages/builder/src/common/icon.js
index 007ee9155a..4ccfc11203 100644
--- a/packages/builder/src/common/icon.js
+++ b/packages/builder/src/common/icon.js
@@ -1,3 +1,3 @@
import feather from "feather-icons";
-const getIcon = (icon, size) => feather.icons[icon].toSvg({height:size||"24", width:size||"24"});
+const getIcon = (icon, size) => feather.icons[icon].toSvg({height:size||"16", width:size||"16"});
export default getIcon;
\ No newline at end of file
diff --git a/packages/builder/src/database/ActionsHeader.svelte b/packages/builder/src/database/ActionsHeader.svelte
index 138c3b2c4f..7292afc75b 100644
--- a/packages/builder/src/database/ActionsHeader.svelte
+++ b/packages/builder/src/database/ActionsHeader.svelte
@@ -30,7 +30,7 @@ const deleteCurrentNode = () => {
{#if !$store.currentNodeIsNew}
- |