budibase/packages/server/builder/bundle.css.map

68 lines
67 KiB
Plaintext
Raw Normal View History

2019-07-15 07:59:46 +02:00
{
"version": 3,
"file": "bundle.css",
"sources": [
"..\\..\\builder\\src\\App.svelte",
2019-08-04 23:21:16 +02:00
"..\\..\\builder\\src\\NoPackage.svelte",
"..\\..\\builder\\src\\PackageRoot.svelte",
"..\\..\\builder\\src\\common\\ComingSoon.svelte",
"..\\..\\builder\\src\\common\\Button.svelte",
2019-07-30 09:31:07 +02:00
"..\\..\\builder\\src\\nav\\Nav.svelte",
"..\\..\\builder\\src\\database\\DatabaseRoot.svelte",
"..\\..\\builder\\src\\actionsAndTriggers\\ActionsAndTriggersRoot.svelte",
2019-08-04 23:21:16 +02:00
"..\\..\\builder\\src\\userInterface\\UserInterfaceRoot.svelte",
2019-07-15 07:59:46 +02:00
"..\\..\\builder\\src\\accessLevels\\AccessLevelsRoot.svelte",
"..\\..\\builder\\src\\database\\HierarchyRow.svelte",
"..\\..\\builder\\src\\database\\RecordView.svelte",
"..\\..\\builder\\src\\nav\\NavItem.svelte",
2019-08-04 23:21:16 +02:00
"..\\..\\builder\\src\\database\\ActionsHeader.svelte",
"..\\..\\builder\\src\\common\\DropdownButton.svelte",
"..\\..\\builder\\src\\common\\ButtonGroup.svelte",
"..\\..\\builder\\src\\database\\IndexView.svelte",
2019-08-04 23:21:16 +02:00
"..\\..\\builder\\src\\actionsAndTriggers\\Actions.svelte",
"..\\..\\builder\\src\\actionsAndTriggers\\Triggers.svelte",
"..\\..\\builder\\src\\common\\IconButton.svelte",
"..\\..\\builder\\src\\userInterface\\PropsView.svelte",
2019-08-04 23:21:16 +02:00
"..\\..\\builder\\src\\userInterface\\PagesList.svelte",
"..\\..\\builder\\src\\userInterface\\ComponentsHierarchy.svelte",
"..\\..\\builder\\src\\common\\ErrorsBox.svelte",
"..\\..\\builder\\src\\common\\CodeArea.svelte",
"..\\..\\builder\\src\\actionsAndTriggers\\ActionView.svelte",
"..\\..\\builder\\src\\common\\Checkbox.svelte",
"..\\..\\builder\\src\\userInterface\\ComponentSearch.svelte",
"..\\..\\builder\\src\\common\\ValuesList.svelte"
2019-07-15 07:59:46 +02:00
],
"sourcesContent": [
"<script>\n\t\n\timport NoPackage from \"./NoPackage.svelte\";\n\timport PackageRoot from \"./PackageRoot.svelte\";\n\timport {store, initialise} from \"./builderStore\";\n\timport { onMount } from 'svelte';\n\t\n\tlet init = initialise();\n\n</script>\n\n<main>\n\n\t{#await init}\n\t\n\t\t<h1>loading</h1>\n\n\t{:then result}\n\t\t{#if $store.hasAppPackage}\n\t\t<PackageRoot />\n\t\t{/if}\n\n\t\t{#if !$store.hasAppPackage}\n\t\t<NoPackage />\n\t\t{/if}\n\n\t{:catch err}\n\t\t<h1 style=\"color:red\">{err}</h1>\n\t{/await}\n</main>\n\n<style>\n\tmain {\n\t\theight: 100%;\n\t\twidth: 100%;\n\t\tfont-family: \"Lato\", Helvetica, Arial, sans-serif;\n\t}\n</style>",
"<script>\n\nimport Button from \"./common/Button.svelte\"\nimport { store } from \"./builderStore\";\n\nlet errors = [];\n\n</script>\n\n<div class=\"root\">\n <div class=\"inner\">\n <img src=\"/_builder/assets/budibase-logo.png\" class=\"logo\" alt=\"budibase logo\"/>\n <div>\n \n <div>\n <h4 style=\"margin-bottom: 20px\">Choose an Application</h4>\n {#each $store.apps as app}\n <a href={`#/${app}`} class=\"app-link\">{app}</a>\n {/each}\n </div>\n </div>\n </div>\n</div>\n\n<style>\n\n.root {\n position: fixed;\n margin: 0 auto;\n text-align: center;\n top: 20%;\n /*color: #333333;\n background-color: #fdfdfd;*/\n width:100%;\n}\n\n.inner {\n display:inline-block;\n margin: auto;\n}\n\n.logo {\n width: 300px;\n margin-bottom: 40px;\n}\n\n.root :global(.option) {\n width:250px;\n}\n\n.app-link {\n margin-top: 10px;\n display: block;\n}\n\n</style>",
"<script>\n\nimport Nav from \"./nav/Nav.svelte\";\nimport Database from \"./database/DatabaseRoot.svelte\" ;\nimport UserInterface from \"./userInterface/UserInterfaceRoot.svelte\" ;\nimport ActionsAndTriggers from \"./actionsAndTriggers/ActionsAndTriggersRoot.svelte\" ;\nimport AccessLevels from \"./accessLevels/AccessLevelsRoot.svelte\" ;\nimport ComingSoon from \"./common/ComingSoon.svelte\";\n\nimport {store} from \"./builderStore\";\n\nexport let navWidth = \"50px\";\n\n\n</script>\n\n<div class=\"root\">\n <Nav width={navWidth} />\n <div class=\"content\" \n style=\"width: calc(100% - {navWidth}); left: {navWidth}\"> \n {#if $store.activeNav === \"database\"}\n <Database />\n {:else if $store.activeNav === \"actions\"}\n <ActionsAndTriggers />\n {:else if $store.activeNav === \"access levels\"}\n <AccessLevels />\n {:else if $store.activeNav === \"user interface\"}\n <UserInterface />\n {/if}\n </div>\n</div>\n\n\n\n<style>\n\t.root {\n height: 100%;\n\t}\n \n\n .content {\n position: fixed;\n height: 100%;\n background-color: var(--white);\n margin:0;\n }\n\n\n</style>",
2019-08-04 23:21:16 +02:00
"<script>\r\n\r\nexport let name = \"\";\r\n\r\n</script>\r\n\r\n<div>\r\n <h4>Coming Sometime: {name}</h4>\r\n</div>\r\n\r\n<style>\r\n\r\nh4 {\r\n margin-top: 20px;\r\n}\r\n\r\n</style>",
"<script>\r\n\r\nexport let color = \"primary\";\r\nexport let className = \"\";\r\nexport let style = \"\";\r\nexport let groupPosition = \"\";\r\nexport let grouped = false;\r\n\r\n$: borderClass = grouped \r\n ? \"\"\r\n : \"border-normal\";\r\n\r\n</script>\r\n\r\n<button class=\"{color} {className} {borderClass} {grouped ? \"grouped\" : \"\"}\" \r\n style=\"{style}\"\r\n on:click>\r\n <slot/>\r\n</button>\r\n\r\n<style>\r\n\r\n.border-normal { border-radius: var(--borderradiusall); }\r\n.border-left { border-radius: var(--borderradius) 0 0 var(--borderradius); }\r\n.border-right { border-radius: 0 var(--borderradius) var(--borderradius) 0; }\r\n.border-middle { border-radius: 0; }\r\n\r\nbutton { \r\n border-style: solid; \r\n padding: 7px 15px;\r\n cursor:pointer;\r\n}\r\n\r\n/* ---- PRIMARY ----*/\r\n.primary {\r\n background-color: var(--primary100);\r\n border-color: var(--primary100);\r\n color: var(--white);\r\n}\r\n\r\n.primary:hover {\r\n background-color: var(--primary75);\r\n border-color: var(--primary75);\r\n}\r\n\r\n.primary:active {\r\n background-color: var(--primarydark);\r\n border-color: var(--primarydark);\r\n}\r\n\r\n.primary-outline {\r\n background-color: var(--white);\r\n border-color: var(--primary100);\r\n color: var(--primary100);\r\n}\r\n\r\n.primary-outline:hover {\r\n background-color: var(--primary10);\r\n}\r\n\r\n.primary-outline:pressed {\r\n background-color: var(--primary25);\r\n}\r\n\r\n/* ---- secondary ----*/\r\n\r\n.secondary {\r\n background-color: var(--secondary100);\r\n border-color: var(--secondary100);\r\n color: var(--white);\r\n}\r\n\r\n.secondary:hover {\r\n background-color: var(--secondary75);\r\n border-color: var(--secondary75);\r\n}\r\n\r\n.secondary:pressed {\r\n background-color: var(--secondarydark);\r\n border-color: var(--secondarydark);\r\n}\r\n\r\n.secondary-outline {\r\n background-color: var(--white);\r\n border-color: var(--secondary100);\r\n color: var(--secondary100);\r\n}\r\n\r\n.secondary-outline:hover {\r\n background-color: var(--secondary10);\r\n}\r\n\r\n.secondary-outline:pressed {\r\n background-color: var(--secondary25);\r\n}\r\n\r\n\r\n/* ---- success ----*/\r\n.success {\r\n background-color: var(--success100);\r\n border-color: var(--success100);\r\n color: var(--white);\r\n}\r\n\r\n.success:hover {\r\n background-color: var(--success75);\r\n border-color: var(--success75);\r\n}\r\n\r\n.success:pressed {\r\n background-color: var(--successdark);\r\n border-color: var(--successdark);\r\n}\r\n\r\n.success-outline {\r\n background-color: var(--white);\r\n border-color: var(--success100);\r\n color: var(--success100);\r\n}\r\n\r\n.success-outline:hover {\r\n background-color: var(--success10);\r\n}\r\n\r\n.success-outline:pressed {\r\n background-color: var(--success25);\r\n}\r\n\r\n/* ---- deletion ----*/\r\n.deletion {\r\n background-color: var(--deletion100);\r\n border-color: var(--deletion100);\r\n color: var(--white);\r\n}\r\n\r\n.deletion:hover {\r\n background-color: var(--deletion75);\r\n border-color: var(--deletion75);\r\n}\r\n\r\n.deletion:pressed {\r\n background-color: var(--deletiondark);\r\n border-color: var(--deletiondark);\r\n}\r\n\r\n.deletion-outline {\r\n background-color: var(--white);\r\n border-color: var(--deletion100);\r\n color: var(--deletion100);\r\n}\r\n\r\n.deletion-outline:hover {\r\n background-color: var(--deletion10);\r\n}\r\n\r\n.deletion-outline:pressed {\r\n background-color: var(--deletion25);\r\n}\r\n\r\n\r\n</style>",
"<script>\n\nimport NavItem from \"./NavItem.svelte\";\n\nexport let width=50;\n\n</script>\n\n<nav class=\"nav\"\n style=\"width: {width};\">\n <img src=\"/_builder/assets/budibase-logo-only.png\" class=\"logo\" alt=\"budibase logo\"/>\n <NavItem name=\"database\" label=\"Database\" icon=\"database\" />\n <NavItem name=\"actions\" label=\"Actions\" icon=\"zap\" />\n <NavItem name=\"access levels\" label=\"Access Levels\" icon=\"user\" />\n <NavItem name=\"user interface\" label=\"User Interface\" icon=\"monitor\"/>\n</nav>\n\n\n\n<style>\n\n.nav {\n height: 100%;\n position: fixed;\n left: 0px;\n background-color: var(--secondary100);\n color: var(--darkslate);\n}\n\n.nav > img {\n width:100%;\n margin-bottom: 30px;\n margin-top: 5px;\n margin-left:0px;\n}\n\n</style>",
"<script>\n\nimport HierarchyRow from \"./HierarchyRow.svelte\";\nimport RecordView from \"./RecordView.svelte\";\nimport IndexView from \"./IndexView.svelte\";\nimport ActionsHeader from \"./ActionsHeader.svelte\";\nimport {store} from \"../builderStore\";\nimport getIcon from \"../common/icon\";\nimport DropdownButton from \"../common/DropdownButton.svelte\";\nimport {hierarchy as hierarchyFunctions} from \"../../../core/src\";\n\nconst hierarchyWidth = \"200px\";\n\nconst defaultNewIndexActions = [{\n label:\"New Root Index\", \n onclick: store.newRootIndex\n}];\n\nconst defaultNewRecordActions = [{\n label:\"New Root Record\", \n onclick: store.newRootRecord\n}];\n\nlet newIndexActions = defaultNewIndexActions;\nlet newRecordActions = defaultNewRecordActions;\n\nstore.subscribe(db => {\n if(!db.currentNode || hierarchyFunctions.isIndex(db.currentNode)) {\n newRecordActions = defaultNewRecordActions;\n newIndexActions = defaultNewIndexActions;\n } else {\n newRecordActions = [\n ...defaultNewRecordActions,\n {label: `New Child Record of ${db.currentNode.name}`, \n onclick: store.newChildRecord}\n ];\n\n newIndexActions = [\n ...defaultNewIndexActions,\n {label: `New Index on ${db.currentNode.name}`, \n onclick: store.newChildIndex}\n ];\n }\n});\n\n\n</script>\n\n<div class=\"root\">\n <div class=\"hierarchy\" style=\"width: {hierarchyWidth}\">\n <div class=\"hierarchy-title-row\">\n <div class=\"hierarchy-title\">Records</div>\n <DropdownButton iconName=\"plus\" actions={newRecordActions} />\n </div>\n {#each $store.hierarchy.children as record}\n <HierarchyRow node={record} />\n {/each}\n\n <div class=\"hierarchy-title-row\" style=\"margin-top: 20px\">\n <div class=\"hierarchy-title\">Indexes</div>\n <DropdownButton iconName=\"plus\" actions={newIndexActions} />\n </div>\n {#each $store.hierarchy.indexes as index}\n <HierarchyRow node={index} />\n {/each}\n </div>\n <div class=\"node-container\">\n <div class=\"actions-header\">\n {#if $store.currentNode}\n <ActionsHeader left={hierarchyWidth}/>\n {/if}\n </div>\n <div class=\"node-view\">\n {#if !$store.currentNode}\n <h1 style=\"margin-left: 100px\">:)</h1>\n {:else if $store.currentNode.type === \"record\"}\n <RecordView />\n {:else}\n <IndexView />\n {/if}\n </div>\n </div>\n</div>\n\n\n<style>\n.root {\n display: flex;\n height: 100%;\n position: relative;\n}\n\n.hierarchy {\n flex: 0 1 auto;\n background-color: var(--primary10);\n overflow-y: auto;\n height: 100%;\n}\n\n.node-container {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n}\n\n.actions-header {\n flex: 0 1 auto;\n}\n\n.node-view {\n overflow-y: auto;\n flex: 1 1 auto;\n}\n\n.hierarchy-title-row {\n padding: 15px 7px;\n /*background-color: var(--secondary75);\n color: var(--white);*/\n font-size: 11pt;\n display: flex;\n font-weight: bold;\n}\n\n.hierarchy-title {\n flex: auto 1 1;\n}\n\n\n</style>",
"<script>\n\nimport getIcon from \"../common/icon\";\nimport {store} from \"../builderStore\";\nimport Button from \"../common/Button.svelte\";\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\nimport Actions from \"./Actions.svelte\";\nimport Triggers from \"./Triggers.svelte\";\nimport {getNewAction, getNewTrigger} from \"../common/core\";\n\nlet editingAction = null;\nlet editingActionIsNew = true;\nlet editingTrigger = null;\nlet editingTriggerIsNew = true;\n\nlet getDefaultOptionsHtml = defaultOptions => \n pipe(defaultOptions, [\n keys,\n map(k => `<span style=\"color:var(--slate)\">${k}: </span>${JSON.parse(typeOptions[k])}`),\n join(\"<br>\")\n ]);\n\nlet onActionEdit = (action) => {\n editingAction = action;\n editingActionIsNew = false;\n}\n\nlet newAction = () => {\n editingAction = getNewAction();\n editingActionIsNew = true;\n}\n\nlet onActionDelete = (action) => {\n store.deleteAction(action);\n}\n\nlet deleteTrigger = () => {}\n\nlet editTrigger = (trigger) => {\n editingTrigger = trigger;\n editingTriggerIsNew = false;\n}\n\nlet newTrigger = () => {\n editingTrigger = getNewTrigger();\n editingTriggerIsNew = true;\n}\n\nlet onActionSave = action => {\n store.saveAction(\n action, \n editingActionIsNew, \n editingAction);\n\n editingAction = null;\n}\n\nlet onActionCancel = () => {\n editingAction = null;\n}\n\nlet onTriggerSave = trigger => {\n store.saveTrigger(\n trigger, \n editingTriggerIsNew, \n editingTrigger);\n\n editingTrigger = null;\n}\n\nlet onTriggerCancel = () => {\n editingTrigger = null;\n}\n\nlet onTriggerEdit = (trigger) => {\n editingTrigger = trigger;\n editingTriggerIsNew = false;\n}\n\n\nlet onTriggerDelete = (trigger) => {\n store.deleteTrigger(trigger);\n}\n\n</script>\n\n<div class=\"root\">\n\n<ButtonGroup>\n <Button color=\"secondary\" \n grouped\n on:click={newAction}>Create New Action</Button>\n <Button color=\"secondary\" \n grouped\n on:click={newTrigger}>Create New Trigger</Button>\n</ButtonGroup>\n\n<Actions {editingActionIsNew} {editingAction} \n {onActionEdit} {onActionDelete} {onActionSave}\n {onActionCancel} />\n\n<Triggers {editingTriggerIsNew} {editingTrigger} \n {onTriggerEdit} {onTriggerDelete} {onTriggerSave}\n {onTriggerCancel} />\n\n</div>\n\n<style>\n\n.root {\n padding: 10px;\n}\n\n\n</style>",
"<script>\n\nimport ComponentsHierarchy from \"./ComponentsHierarchy.svelte\";\nimport PagesList from \"./PagesList.svelte\"\nimport PropsView from \"./PropsView.svelte\";\nimport { store } from \"../builderStore\";\nimport getIcon from \"../common/icon\";\nimport { isRootComponent } from \"./pagesParsing/searchComponents\";\nimport IconButton from \"../common/IconButton.svelte\";\nimport Modal from \"../common/Modal.svelte\";\nimport NewComponent from \"./NewComponent.svelte\";\n\nlet isCreatingNewComponent = false;\nconst newComponent = () => {\n isCreatingNewComponent = true;\n}\n\n</script>\n\n<div class=\"root\">\n \n <div class=\"ui-nav\">\n\n <div class=\"components-list-container\">\n <div class=\"nav-group-header\">\n <div>{@html getIcon(\"sidebar\",\"18\")}</div>\n <span>COMPONENTS</span>\n <div>\n <IconButton icon=\"plus\" \n on:click={newComponent} />\n </div>\n </div>\n <div class=\"nav-items-container\">\n <ComponentsHierarchy components={$store.allComponents}/>\n </div>\n </div>\n\n <div class=\"pages-list-container\">\n <div class=\"nav-group-header\">\n <div>{@html getIcon(\"grid\",\"18\")}</div>\n <span>PAGES</span>\n </div>\n <div class=\"nav-items-container\">\n <PagesList />\n </div>\n </div>\n\n </div>\n\n <div class=\"component-preview\">\n {#if $store.currentFrontEndItem}\n <div class=\"component-container\">\n <h1>{$store.currentFrontEndItem.name}</h1>\n </div>\n {/if} \n </div>\n\n <div class=\"properties-pane\">\n {#if $store.currentFrontEndItem && !isRootComponent($store.currentFrontEndItem)}\n <PropsView allComponents={$store.allComponents}\n props={$store.currentFrontEndItem.props}/>\n {/if}\n </div>\n\n</div>\n\n\n<NewComponent {isCreatingNewComponent}/>\n\n\n<style>\n\n.root {\n display: grid;\n grid-template-columns: [uiNav] 250px [preview] auto [properties] 250px;\n height: 100%;\n width: 100%;\n}\n\n.ui-nav {\n grid-column-start: uiNav;\n background-color: var(--primary10);\n height: 100%;\n}\n\n.component-preview {\n display: grid;\n grid-template-rows: [top] 1fr [middle] auto [bottom] 1fr;\n grid-template-columns: [left] 1fr [middle] auto [right] 1fr;\n grid-column-start: preview;\n}\n\n.component-container {\n grid-row-start: middle;\n grid-column-start: middle;\n}\n\n.properties-pane {\n grid-column-start: properties;\n background-color: var(--primary10);\n height: 100%;\n}\n\n.pages-list-container {\n padding-top: 20px;\n}\n\n.nav-group-header {\n font-size: 10pt;\n padding-left: 10px;\n}\n\n.nav-items-container {\n padding-top: 10px;\n}\n\n.nav-group-header {\n display:grid;\n grid-template-columns: [icon] auto [title] 1fr [button] auto;\n padding: 10px 2px 0px 7px;\n}\n\n.nav-group-header>div:nth-child(1) {\n padding:0px 7px 0px 0px;\n vertical-align: bottom;\n grid-column-start: icon;\n margin-right: 5px;\n}\n\n.nav-group-header>span:nth-child(2) {\n margin-left:5px;\n vertical-align: bottom;\n grid-column-start: title;\n margin-top:auto;\n}\n\n.nav-group-header>div:nth-child(3) {\n vertical-align: bottom;\n grid-column-start: button;\n cursor: pointer;\n color: var(--slate);\n}\n\n.nav-group-header>div:nth-child(3):hover {\n color: var(--primary75); \n}\n\n</style>",
"<script>\n\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\nimport Button from \"../common/Button.svelte\";\nimport {store} from \"../builderStore\";\nimport {generateFullPermissions, getNewAccessLevel} from \"../common/core\";\nimport getIcon from \"../common/icon\";\nimport AccessLevelView from \"./AccessLevelView.svelte\";\nimport Modal from \"../common/Modal.svelte\";\n\nlet editingLevel = null;\nlet editingLevelIsNew = false;\n$: isEditing = (editingLevel !== null); \n\nlet allPermissions = [];\nstore.subscribe(db => {\n allPermissions = generateFullPermissions(db.hierarchy, db.actions);\n})\n\nlet onLevelEdit = (level) => {\n editingLevel = level;\n editingLevelIsNew = false;\n};\n\nlet onLevelCancel = () => {\n editingAction = null;\n};\n\nlet onLevelDelete = (level) => {\n store.deleteLevel(level);\n};\n\n\nlet createNewLevel = () => {\n editingLevelIsNew = true;\n editingLevel = getNewAccessLevel();\n}\n\nlet onEditingFinished = (level) => {\n if(level) {\n store.saveLevel(level, editingLevelIsNew, editingLevel);\n }\n editingLevel = null;\n}\n\nconst getPermissionsString = perms => {\n return `${perms.length} / ${allPermissions.length}`;\n}\n\n</script>\n\n<div class=\"root\">\n\n<ButtonGroup>\n <Button grouped color=\"secondary\" on:click={createNewLevel}>Create New Access Level</Button>\n</ButtonGroup>\n\n{#if $store.accessLevels}\n<table class=\"fields-table uk-table uk-table-small\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Permissions</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#each $store.accessLevels as level}\n <tr>\n <td >{level.name}</td>\n <td >{getPermissionsString(level.permissions)}</td>\n <td class=\"edit-button\">\n <span on:click={() => onLevelEdit(level)}>{@html getIcon(\"edit\")}</span>\n <span on:click={() => onLevelDelete(level)}>{@html getIcon(\"trash\")}</span>\n </td>\n </tr>\n {/each}\n </tbody>\n</table>\n{:else}\n(no actions added)\n{/if}\n\n\n<Modal bind:isOpen={isEditing}>\n {#if isEditing}\n <AccessLevelView level={editingLevel}\n allPermissions={allPermissions}\n onFinished={onEditingFinished}\n isNew={editingLevelIsNew}\n allLevels={$store.accessLevels}\n hierarchy={$store.hierarchy}\n actions={$store.actions} />\n {/if} \n</Modal>\n\n\n</div>\n\n<style>\n\n.root {\n padding:10px;\n}\n\n.edit-button {\n cursor:pointer;\n color: var(--white);\n}\n\ntr:hover .edit-button {\n color: var(--secondary75);\n}\n\n\n</style>",
"<script>\n\nimport {store} from \"../builderStore\";\nimport {cloneDeep} from \"lodash\";\nexport let level = 0;\nexport let node;\n\n</script>\n\n<div class=\"root\">\n <div class=\"title\" on:click={() => store.selectExistingNode(node.nodeId)} style=\"padding-left: {20 + (level * 20)}px\">\n {node.name}\n </div>\n {#if node.children}\n {#each node.children as child}\n <svelte:self node={child} \n level={level+1}/>\n {/each}\n {/if}\n</div>\n\n\n<style>\n\n.root { \n display: block;\n font-size: 13pt;\n width: 100%;\n cursor: pointer;\n}\n\n.title {\n font: var(--bodytext);\n padding-top: 10px;\n padding-right: 5px;\n padding-bottom: 10px;\n color: var(--secondary100);\n}\n\n.title:hover {\n background-color: var(--secondary10);\n}\n\n</style>",
"<script>\n\nimport Textbox from \"../common/Textbox.svelte\";\nimport Button from \"../common/Button.svelte\";\nimport getIcon from \"../common/icon\";\nimport FieldView from \"./FieldView.svelte\";\nimport Modal from \"../common/Modal.svelte\";\nimport {map, join, filter, some, \n find, keys, isDate} from \"lodash/fp\";\nimport { store } from \"../builderStore\";\nimport {common, hierarchy as h} from \"../../../core/src\";\nimport {templateApi, pipe, validate} from \"../common/core\";\n\nlet record;\nlet getIndexAllowedRecords;\nlet editingField = false;\nlet fieldToEdit;\nlet isNewField = false;\nlet newField;\nlet editField;\nlet deleteField;\nlet onFinishedFieldEdit;\nlet editIndex;\n\nstore.subscribe($store => {\n record = $store.currentNode;\n const flattened = h.getFlattenedHierarchy($store.hierarchy);\n getIndexAllowedRecords = index => \n pipe(index.allowedRecordNodeIds, [\n filter(id => some(n => n.nodeId === id)(flattened)),\n map(id => find(n => n.nodeId === id)\n (flattened).name),\n join(\", \")\n ]);\n\n newField = () => {\n isNewField = true;\n fieldToEdit = templateApi($store.hierarchy).getNewField(\"string\");\n editingField = true;\n }\n\n onFinishedFieldEdit = (field) => {\n if(field) {\n store.saveField(field);\n }\n editingField = false;\n }\n\n editField = (field) => {\n isNewField = false;\n fieldToEdit = field;\n editingField = true;\n }\n\n deleteField = (field) => {\n store.deleteField(field);\n }\n\n editIndex = index => {\n store.selectExistingNode(index.nodeId);\n }\n\n})\n\nlet getTypeOptionsValueText = value => {\n if(value === Number.MAX_SAFE_INTEGER\n || value === Number.MIN_SAFE_INTEGER\n || new Date(value).getTime() === new Date(8640000000000000).getTime()\n || new Date(value).getTime() === new Date(-8640000000000000).getTime()) return \"(any)\";\n \n if(value === null) return \"(not set)\";\n return value;\n}\n\nlet getTypeOptions = typeOptions => \n pipe(typeOptions, [\n keys,\n map(k => `<span style=\"color:var(--slate)\">${k}: </span>${getTypeOptionsValueText(typeOptions[k])}`),\n join(\"<br>\")\n ]);\n\n\n</script>\n\n<div class=\"root\">\n\n <form class=\"uk-form-horizontal\">\n \n <Textbox label=\"Name\" bind:text={record.name} />\n <div>{record.nodeKey()}</div>\n {#if !record.isSingle}\n <Textbox label=\"Collection Name\" bind:text={record.collectionName} />\n <Textbox label=\"Shard Factor\" bind:text={record.allidsShardFactor} />\n {/if}\n\n </form>\n <h4>\n Fields <span class=\"add-field-button\" on:click={newField}>{@html getIcon(\"plus\")}</span>\n </h4>\n\n {#if record.fields.length > 0}\n <table class=\"fields-table uk-table\">\n <thead>\n <tr>\n <th>Name</th>\n <th>Type</th>\n <th>Options</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#each record.fields as field}\n <tr>\n <td >\n <div>{field.label}</div>\n <div style=\"font-size: 0.7em; color: var(--slate)\">{field.name}</div>\n </td>\n <td >{field.type}</td>\n <td >{@html getTypeOptions(field.typeOptions)}</td>\n <td>\n <span class=\"edit-button\" on:click={() => editField(field)}>{@html getIcon(\"edit\")}</span>\n <span class=\"edit-button\" on:click={() => deleteField(field)}>{@html getIcon(\"trash\")}</span>\n </td>\n </tr>\n {/each}\n </tbody>\n </table>\n {:else}\n (no fields added)\n {/if}\n\n {#if editingField}\n <Modal bind:isOpen={editingField}>\n <FieldView field={fieldToEdit} \n onFinished={onFinishedFieldEdit}\n
"<script>\n\nimport {store} from \"../builderStore\";\nimport getIcon from \"../common/icon\";\n\nexport let name = \"\";\nexport let label = \"\";\nexport let icon = \"\";\n\nlet navActive = \"\";\n\nstore.subscribe(db => {\n navActive = (db.activeNav === name ? \"active\" : \"\")\n});\n\nconst setActive = () => \n store.setActiveNav(name);\n\n</script>\n\n<div class=\"{navActive}\">\n <div class=\"nav-item\" \n on:click={setActive}>\n <div class=\"inner\">\n <div class=\"icon\">{@html getIcon(icon)}</div>\n </div>\n </div>\n</div>\n\n\n<style>\n\n.nav-item {\n padding: 0px 5px;\n display: block;\n padding: 10px;\n color: var(--slate);\n cursor: pointer;\n}\n\n.inner {\n padding: 0px 20px 10px 0px;\n display: inline-block;\n width:100%;\n}\n\n.nav-item:hover {\n background-color: var(--primary25);\n}\n\n.icon {\n font-size:0.9em; \n display: inline-block; \n position: relative;\n top: 5px;\n margin-right:5px;\n width:100%;\n}\n\n.active > div {\n background-color: var(--primary10);\n color: var(--secondary100);\n}\n\n.active>div:hover {\n background-color: var(--slate);\n color: var(--secondary100);\n}\n\n.active {\n background-color: white; \n}\n\n\n</style>",
"<script>\nimport Button from \"../common/Button.svelte\";\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\nimport {store} from \"../builderStore\";\nimport Modal from \"../common/Modal.svelte\";\nimport ErrorsBox from \"../common/ErrorsBox.svelte\";\n\nexport let left;\nlet confirmDelete = false;\nconst openConfirmDelete = () => {\n confirmDelete = true;\n}\n\nconst deleteCurrentNode = () => {\n confirmDelete = false;\n store.deleteCurrentNode();\n}\n\n</script>\n\n<div class=\"root\" style=\"left: {left}\">\n\n <ButtonGroup>\n <Button color=\"secondary\" grouped on:click={store.saveCurrentNode}>\n {#if $store.currentNodeIsNew}\n Create\n {:else}\n Update\n {/if}\n </Button>\n\n {#if !$store.currentNodeIsNew}\n <Button color=\"secondary\" grouped on:click={openConfirmDelete}>\n Delete\n </Button>\n {/if}\n </ButtonGroup>\n\n {#if !!$store.errors && $store.errors.length > 0}\n <div style=\"width: 500px\">\n <ErrorsBox errors={$store.errors}/>\n </div>\n {/if}\n \n <Modal bind:isOpen={confirmDelete}>\n <div style=\"margin: 10px 0px 20px 0px\">Are you sure you want to delete {$store.currentNode.name} ?</div>\n <div style=\"float:right\">\n <Button color=\"primary\" on:click={deleteCurrentNode}>Yes</Button>\n <Button color=\"secondary\" on:click={() => confirmDelete = false}>No</Button>\n </div>\n </Modal>\n</div>\n\n<style>\n\n.root {\n padding:5px;\n top:0;\n width:100%;\n}\n\n</style>",
2019-08-04 23:21:16 +02:00
"<script>\r\n\r\nimport getIcon from \"./icon\";\r\nexport let iconName;\r\nexport let actions = []; // [ {label: \"Action Name\", onclick: () => {...} } ]\r\nlet isDroppedDown = false;\r\n\r\n</script>\r\n\r\n\r\n<div class=\"root\" on:click={() => isDroppedDown = !isDroppedDown}>\r\n {@html getIcon(iconName)}\r\n \r\n <div class=\"dropdown-background\" on:click|stopPropagation={() => isDroppedDown = false} style=\"display: {isDroppedDown ? 'block' : 'none'}\"></div>\r\n\r\n <div class=\"dropdown-content\" style=\"display: {isDroppedDown ? 'inline-block' : 'none'}\">\r\n {#each actions as action}\r\n <div class=\"action-row\" on:click={action.onclick}>\r\n {action.label}\r\n </div>\r\n {/each}\r\n </div>\r\n \r\n</div>\r\n\r\n\r\n<style>\r\n\r\n.dropdown-background {\r\n position: fixed;\r\n top:0;\r\n left:0;\r\n width:100vw;\r\n height:100vh;\r\n}\r\n\r\n.root {\r\n cursor: pointer;\r\n z-index: 1;\r\n}\r\n\r\n.dropdown-content {\r\n position: absolute;\r\n background-color: var(--white);\r\n min-width: 160px;\r\n box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);\r\n z-index: 1;\r\n font-weight: normal;\r\n border-style:solid;\r\n border-width: 1px;\r\n border-color: var(--secondary10);\r\n}\r\n\r\n.dropdown-content:not(:focus) {\r\n display: none;\r\n}\r\n\r\n.action-row {\r\n padding: 7px 10px;\r\n cursor:pointer;\r\n}\r\n\r\n.action-row:hover {\r\n background-color: var(--primary100);\r\n color:var(--white);\r\n}\r\n\r\n</style>",
"<script>\r\nexport let style=\"\";\r\n</script>\r\n\r\n<div class=\"root\" style={style}>\r\n <slot />\r\n</div>\r\n\r\n<style>\r\n\r\n.root {\r\n display: flex;\r\n}\r\n\r\n.root:last-child {\r\n border-radius: 0 var(--borderradius) var(--borderradius) 0;\r\n}\r\n\r\n.root:first-child {\r\n border-radius: var(--borderradius) 0 0 var(--borderradius); \r\n}\r\n\r\n.root:not(:first-child):not(:last-child) {\r\n border-radius: 0;\r\n}\r\n\r\n</style>",
"<script>\n\nimport Textbox from \"../common/Textbox.svelte\";\nimport CodeArea from \"../common/CodeArea.svelte\";\nimport Button from \"../common/Button.svelte\";\nimport Dropdown from \"../common/Dropdown.svelte\";\nimport {store} from \"../builderStore\";\nimport {filter, some, map} from \"lodash/fp\";\nimport {hierarchy as hierarchyFunctions, common} from \"../../../core/src\";\n\nconst pipe = common.$;\n\nlet index;\nlet indexableRecords = [];\n\nstore.subscribe($store => {\n index = $store.currentNode;\n indexableRecords = pipe($store.hierarchy,[\n hierarchyFunctions.getFlattenedHierarchy,\n filter(hierarchyFunctions.isDecendant(index.parent())),\n filter(hierarchyFunctions.isRecord),\n map(n => ({\n node:n,\n isallowed: some(id => n.nodeId === id)(index.allowedRecordNodeIds)\n }))\n ]);\n});\n\nconst toggleAllowedRecord = record => {\n if(record.isallowed) {\n index.allowedRecordNodeIds = filter(id => id !== record.node.nodeId)\n (index.allowedRecordNodeIds);\n } else {\n index.allowedRecordNodeIds.push(record.node.nodeId);\n }\n};\n\n</script>\n\n<form class=\"uk-form-horizontal root\">\n <Textbox bind:text={index.name} label=\"Name\"/>\n \n <div class=\"allowed-records\">\n <div>Records to Index</div>\n {#each indexableRecords as rec}\n <input type=\"checkbox\" checked={rec.isallowed} on:change={() => toggleAllowedRecord(rec)}/>\n <span>{rec.node.name}</span>\n {/each}\n </div>\n\n\n <Dropdown label=\"Index Type\" bind:selected={index.indexType} options={[\"ancestor\", \"reference\"]} />\n\n <CodeArea bind:text={index.map} label=\"Map (javascript)\"/>\n <CodeArea bind:text={index.filter} label=\"Filter (javascript expression)\"/>\n <CodeArea bind:text={index.getShardName} label=\"Shard Name (javascript expression)\"/>\n\n \n</form>\n\n<style>\n\n.root {\n height: 100%;\n padding: 15px;\n}\n\n.allowed-records {\n margin: 20px 0px;\n}\n\n.allowed-records > span {\n margin-right:30px;\n}\n\n</style>",
"<script>\n\nimport getIcon from \"../common/icon\";\nimport {store} from \"../builderStore\";\nimport Button from \"../common/Button.svelte\";\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\nimport ActionView from \"./ActionView.svelte\";\nimport Modal from \"../common/Modal.svelte\";\nimport {pipe} from \"../common/core\";\nimport {keys, map, join} from \"lodash/fp\";\n\nexport let editingActionIsNew = false;\nexport let editingAction = null;\nexport let onActionEdit = (action) => {};\nexport let onActionDelete = (action) => {};\nexport let onActionSave = (action) => {};\nexport let onActionCancel = () => {};\n\n$: isEditing = (editingAction !== null); \n\nlet getDefaultOptionsHtml = defaultOptions => \n pipe(defaultOptions, [\n keys,\n map(k => `<span style=\"color:var(--slate)\">${k}: </span>${JSON.stringify(defaultOptions[k])}`),\n join(\"<br>\")\n ]);\n\n\nlet actionEditingFinished = (action) => {\n \n if(action) {\n onActionSave(action)\n } else {\n onActionCancel();\n }\n}\n\n</script>\n\n<h3>Actions</h3>\n\n{#if $store.actions}\n<table class=\"fields-table uk-table uk-table-small\">\n <thead>\n <tr>\n <th>Description</th>\n <th>Behaviour Source</th>\n <th>Behaviour Name</th>\n <th>Default Options</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#each $store.actions as action}\n <tr>\n <td >{action.name}</td>\n <td >{action.behaviourSource}</td>\n <td >{action.behaviourName}</td>\n <td >{@html getDefaultOptionsHtml(action.initialOptions)}</td>\n <td class=\"edit-button\">\n <span on:click={() => onActionEdit(action)}>{@html getIcon(\"edit\")}</span>\n <span on:click={() => onActionDelete(action)}>{@html getIcon(\"trash\")}</span>\n </td>\n </tr>\n {/each}\n </tbody>\n</table>\n{:else}\n(no actions added)\n{/if}\n\n\n<Modal bind:isOpen={isEditing}>\n {#if isEditing}\n <ActionView action={editingAction}\n allActions={$store.actions}\n onFinished={actionEditingFinished}\n isNew={editingActionIsNew}/>\n {/if} \n</Modal>\n\n\n<style>\n\n.edit-button {\n cursor:pointer;\n color: var(--white);\n}\n\ntr:hover .edit-button {\n color: var(--secondary75);\n}\n\n\n</style>",
"<script>\n\nimport {store} from \"../builderStore\";\nimport getIcon from \"../common/icon\";\nimport Button from \"../common/Button.svelte\";\nimport Modal from \"../common/Modal.svelte\";\nimport TriggerView from \"./TriggerView.svelte\";\n\n\nexport let editingTrigger = null;\nexport let editingTriggerIsNew = true;\nexport let onTriggerEdit = (trigger) => {};\nexport let onTriggerDelete = (trigger) => {};\nexport let onTriggerSave = (trigger) => {};\nexport let onTriggerCancel = () => {};\n\n$: isEditing = (editingTrigger !== null); \n\nlet triggerEditingFinished = (trigger) => {\n \n if(trigger) {\n onTriggerSave(trigger)\n } else {\n onTriggerCancel();\n }\n}\n\n</script>\n\n<h3>Triggers</h3>\n\n{#if $store.triggers}\n<table class=\"fields-table uk-table uk-table-small\">\n <thead>\n <tr>\n <th>Event</th>\n <th>Action</th>\n <th>Condition</th>\n <th>Create Options</th>\n <th></th>\n </tr>\n </thead>\n <tbody>\n {#each $store.triggers as trigger}\n <tr>\n <td >{trigger.eventName}</td>\n <td >{trigger.actionName}</td>\n <td >{trigger.condition}</td>\n <td >{trigger.optionsCreator}</td>\n <td class=\"edit-button\">\n <span on:click={() => onTriggerEdit(trigger)}>{@html getIcon(\"edit\")}</span>\n <span on:click={() => onTriggerDelete(trigger)}>{@html getIcon(\"trash\")}</span>\n </td>\n </tr>\n {/each}\n </tbody>\n</table>\n{:else}\n(no triggers added)\n{/if}\n\n\n<Modal bind:isOpen={isEditing}>\n {#if isEditing}\n <TriggerView trigger={editingTrigger}\n allActions={$store.actions}\n allTriggers={$store.triggers}\n onFinished={triggerEditingFinished}\n isNew={editingTriggerIsNew}/>\n {/if} \n</Modal>\n\n<style>\n\n.edit-button {\n cursor:pointer;\n color: var(--white);\n}\n\ntr:hover .edit-button {\n color: var(--secondary75);\n}\n\n</style>",
"<script>\r\nimport getIcon from \"./icon\";\r\n\r\nexport let size = 18;\r\nexport let icon = \"\";\r\nexport let style = \"\";\r\nexport let color = \"\";\r\nexport let hoverColor = \"\";\r\n\r\n$: borderClass = grouped \r\n ? \"\"\r\n : \"border-normal\";\r\n\r\n</script>\r\n\r\n<button style=\"{style} color:{color}\"\r\n on:click>\r\n {@html getIcon(icon, size)}\r\n</button>\r\n\r\n\r\n<style>\r\n\r\nbutton {\r\n border-style: none;\r\n background-color: rgba(0,0,0,0);\r\n cursor: pointer;\r\n}\r\n\r\n</style>",
"<script>\n\nimport {\n keys,\n map,\n} from \"lodash/fp\";\nimport {\n pipe\n} from \"../common/core\";\nimport { \n createPropDefinitionForDerived\n} from \"./pagesParsing/createProps\";\nimport {\n getExactComponent\n} from \"./pagesParsing/searchComponents\";\nimport Checkbox from \"../common/Checkbox.svelte\";\nimport Textbox from \"../common/Textbox.svelte\";\nimport Dropdown from \"../common/Dropdown.svelte\";\n\nexport let props;\nexport let allComponents;\n\nlet propsDefinition = createPropDefinitionForDerived(allComponents, props._component);\n\nlet fields = pipe(propsDefinition,[\n keys,\n map(k => propsDefinition[k])\n]);\n\nlet component = getExactComponent(allComponents, props._component);\n\nlet setProp = (name) => (ev) => \n props[name] = ev.target.checked !== undefined \n ? ev.target.checked\n : ev.target.value;\n\n</script>\n\n<div class=\"root\">\n\n <div class=\"title\">{component.name}</div>\n <div class=\"component-description\">{component.description || \"\"}</div>\n {#each propsDefinition as propDef}\n <form class=\"uk-form-horizontal prop-row \">\n {#if propDef.type === \"bool\"}\n <Checkbox label={propDef.name} \n checked={props[propDef.name]} \n on:change={setProp(propDef.name)} />\n {:else if propDef.type === \"options\"}\n <Dropdown label={propDef.name}\n selected={props[propDef.name]} \n options={propDef.options}\n on:change={setProp(propDef.name)}/>\n {:else}\n <Textbox label={propDef.name}\n bind:text={props[propDef.name]} />\n {/if} \n </form>\n {/each}\n \n\n</div>\n\n\n<style>\n\n.root {\n padding: 10px;\n font-size:10pt;\n}\n\n.title {\n font: var(--smallheavybodytext);\n}\n\n.prop-row {\n padding: 7px 3px;\n}\n\n.component-description {\n font: var(--lightbodytext); \n}\n\n</style>",
"<script>\nimport { store } from \"../builderStore\";\nimport getIcon from \"../common/icon\";\n\nconst getPage = (s, name) => {\n const props = s.pages[name];\n return ({name, props});\n}\n\n</script>\n\n<div class=\"root\">\n <div class=\"hierarchy-item component\" class:selected={$store.currentFrontEndItem && $store.currentFrontEndItem.name === \"main\"}\n on:click|stopPropagation={() => store.setCurrentPage(\"main\")}>\n <span>{@html getIcon(\"circle\", \"7\")}</span>\n <span class=\"title\">Main</span>\n </div>\n\n <div class=\"hierarchy-item component\" class:selected={$store.currentFrontEndItem && $store.currentFrontEndItem.name === \"unauthenticated\"}\n on:click|stopPropagation={() => store.setCurrentPage(\"unauthenticated\")}>\n <span>{@html getIcon(\"circle\", \"7\")}</span>\n <span class=\"title\">Login</span>\n </div>\n\n</div>\n\n<style>\n\n.root {\n padding-bottom: 10px;\n padding-left: 10px;\n font-size: 16px;\n color: var(--secondary50);\n}\n\n.hierarchy-item {\n cursor: pointer;\n padding: 5px 0px;\n}\n\n.hierarchy-item:hover {\n color: var(--secondary75);\n}\n\n.component {\n margin-left: 5px;\n}\n\n.selected {\n color: var(--primary100);\n}\n\n\n.title {\n margin-left: 10px;\n}\n\n</style>",
"<script>\n\nimport { \n last, \n sortBy, \n filter, \n map,\n uniqWith,\n isEqual,\n trimCharsStart,\n trimChars,\n join\n} from \"lodash/fp\";\n\nimport { pipe } from \"../common/core\";\nimport getIcon from \"../common/icon\";\nimport { store } from \"../builderStore\";\n\nexport let components = []\nexport let thisLevel = \"\";\n\nconst joinPath = join(\"/\");\n\nconst normalizedName = name => pipe(name, [\n trimCharsStart(\"./\"),\n trimCharsStart(\"~/\"),\n trimCharsStart(\"../\"),\n trimChars(\" \")\n ]);\n\n\nconst isOnThisLevel = (c) => \n normalizedName(c.name).split(\"/\").length === pathPartsThisLevel\n &&\n (!thisLevel || normalizedName(c.name).startsWith(normalizedName(thisLevel)));\n\nconst notOnThisLevel = (c) => !isOnThisLevel(c);\n\nconst isInSubfolder = (subfolder, c) => \n normalizedName(c.name).startsWith(\n trimCharsStart(\"/\")(\n joinPath([thisLevel, subfolder])));\n\nconst isOnNextLevel = (c) => \n normalizedName(c.name).split(\"/\").length === pathPartsThisLevel + 1\n\nconst lastPartOfName = (c) => \n last(c.name.split(\"/\"))\n\nconst subFolder = (c) => {\n const cname = normalizedName(c.name);\n const folderName = cname.substring(thisLevel.length, cname.length).split(\"/\")[0];\n\n return ({\n name: folderName,\n isExpanded: false,\n path: thisLevel + \"/\" + folderName\n });\n}\n\nlet pathPartsThisLevel = !thisLevel \n ? 1\n : normalizedName(thisLevel).split(\"/\").length + 1;\n\nlet componentsThisLevel = \n pipe(components, [\n filter(isOnThisLevel),\n map(c => ({component:c, title:lastPartOfName(c)})),\n sortBy(\"title\")\n ]);\n\nlet subfolders = \n pipe(components, [\n filter(notOnThisLevel),\n sortBy(\"name\"),\n map(subFolder),\n uniqWith((f1,f2) => f1.path === f2.path)\n ]);\n\nconst subComponents = (subfolder) => pipe(components, [\n filter(c => isInSubfolder(subfolder, c))\n ]);\n\nconst expandFolder = folder => {\n const expandedFolder = {...folder};\n expandedFolder.isExpanded = !expandedFolder.isExpanded;\n const newFolders = [...subfolders];\n newFolders.splice(\n newFolders.indexOf(folder),\n 1,\n expandedFolder);\n subfolders = newFolders;\n}\n\nconst isComponentSelected = (current,c) =>\n current \n && current.name === c.name\n\nconst isFolderSelected = (current, folder) => \n isInSubfolder(current, folder)\n\n</script>\n\n<div class=\"root\" style={`padding-left: calc(10px * ${pathPartsThisLevel})`}>\n \n {#each subfolders as folder}\n <div class=\"hierarchy-item folder\"\n on:click|stopPropagation={() => expandFolder(folder)}>\n <span>{@html getIcon(folder.isExpanded ? \"chevron-down\" : \"chevron-right\", \"16\")}</span>\n <span class=\"title\" class:currentfolder={$store.currentFrontEndItem && isInSubfolder(folder.name, $store.currentFrontEndItem)}>{folder.name}</span>\n {#if folder.isExpanded}\n <svelte:self components={subComponents(folder.name)} \n thisLevel={folder.path} />\n {/if}\n </div>\n {/each}\n\n {#each componentsThisLevel as component}\n <div class=\"hierarchy-item component\" class:selected={isComponentSelected($store.currentFrontEndItem, component.component)}\n on:click|stopPropagation={() => store.setCurrentComponent(component.component)}>\n <span>{@html getIcon(\"circle\", \"7\")}</span>\n <span class=\"title\">{component.title}</span>\n </div>\n {/each}\n\n</div>\n\n<style>\n\n.root {\n color: var(--secondary50);\n}\n\n.hierarchy-item {\n cursor: pointer;\n padding: 5px 0px;\n}\n\n.hierarchy-item:hover {\n color: var(--secondary75);\n}\n\n.component {\n margin-left: 5px;\n}\n\n.currentfolder {\n color: var(--secondary100);\n}\n\n.selected {\n color: var(--primary100);\n}\n\n.title {\n margin-left: 10px;\n}\n\n\n</style>",
"<script>\r\nexport let errors = [];\r\n\r\n$:hasErrors = errors.length > 0;\r\n</script>\r\n\r\n{#if hasErrors}\r\n<div class=\"error-container\">\r\n {#each errors as error}\r\n <div class=\"error-row\">{error.field ? `${error.field}: ` : \"\"}{error.error}</div>\r\n {/each}\r\n</div>\r\n{/if}\r\n\r\n<style>\r\n\r\n.error-container {\r\n padding:10px;\r\n border-style: solid;\r\n border-color: var(--deletion100);\r\n border-radius: var(--borderradiusall);\r\n background: var(--deletion75);\r\n}\r\n\r\n.error-row {\r\n padding: 5px 0px;\r\n}\r\n\r\n</style>",
"<script>\r\n// todo: use https://ace.c9.io\r\nexport let text = \"\";\r\nexport let label = \"\";\r\n</script>\r\n\r\n<div>{label}</div>\r\n<textarea class=\"uk-textarea\" bind:value={text}></textarea>\r\n\r\n<style>\r\n\r\ntextarea {\r\n padding:3px;\r\n background: var(--darkslate);\r\n color: var(--white);\r\n font-family: 'Courier New', Courier, monospace;\r\n width:95%;\r\n height:100px;\r\n}\r\n\r\n</style>",
"<script>\n\nimport Textbox from \"../common/Textbox.svelte\";\nimport Button from \"../common/Button.svelte\";\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\nimport {cloneDeep, filter, keys,\nmap, isUndefined} from \"lodash/fp\";\nimport ErrorsBox from \"../common/ErrorsBox.svelte\";\nimport {validateActions, pipe} from \"../common/core\";\nimport getIcon from \"../common/icon\";\n\nexport let action;\nexport let onFinished = (action) => {};\nexport let allActions;\nexport let isNew = true;\n\nlet optKey = \"\";\nlet optValue = \"\";\n\nlet clonedAction = cloneDeep(action); \nlet initialOptions = pipe(action.initialOptions, [\n keys,\n map(k => ({key:k, value:action.initialOptions[k]}))\n]);\nlet errors = [];\n\nconst addNewOption = () => {\n\n if(optKey && optValue && isUndefined(clonedAction.initialOptions[optKey])) {\n clonedAction.initialOptions[optKey] = optValue;\n initialOptions = [...initialOptions, {\n key:optKey, value: optValue\n }];\n optKey = \"\";\n optValue = \"\";\n }\n}\n\nconst removeOption = (opt) => {\n if(opt) {\n delete clonedAction.initialOptions[opt.key]\n initialOptions = pipe(initialOptions, [\n filter(o => o.key !== opt.key)\n ]);\n }\n}\n\nconst save = () => {\n\n const newActionsList = [\n ...pipe(allActions ,[filter(a => a !== action)]),\n clonedAction]\n\n errors = pipe(newActionsList ,[\n validateActions,\n map(e => e.error)\n ]);\n\n if(errors.length === 0)\n onFinished(clonedAction);\n}\n\nconst cancel = () => {\n onFinished();\n}\n\n</script>\n\n<div class=\"root\">\n\n <ErrorsBox {errors} />\n\n <form class=\"uk-form-horizontal\">\n\n <Textbox label=\"Name\" bind:text={clonedAction.name} />\n <Textbox label=\"Behaviour Source\" bind:text={clonedAction.behaviourSource} />\n <Textbox label=\"Behaviour\" bind:text={clonedAction.behaviourName} />\n\n </form>\n\n <div class=\" uk-form-stacked\" style=\"margin-bottom: 20px\">\n <label class=\"uk-form-label\">Default Options</label>\n <div class=\"uk-grid-small\" uk-grid>\n <input class=\"uk-input uk-width-1-4\" placeholder=\"key\" bind:value={optKey} > \n <input class=\"uk-input uk-width-1-4\" placeholder=\"value\" bind:value={optValue} > \n <Button color=\"primary-outline uk-width-1-4\" on:click={addNewOption}>Add</Button>\n </div>\n <div style=\"margin-top: 10px\">\n {#each initialOptions as option}\n <span class=\"option-container\">{option.key} : {option.value} <span style=\"font-size:10pt; cursor: pointer\" on:click={() => removeOption(option)}>{@html getIcon(\"trash-2\")}</span></span>\n {/each}\n </div>\n </div>\n\n <ButtonGroup>\n <Button color=\"primary\" grouped on:click={save}>Save</Button>\n <Button color=\"secondary\" grouped on:click={cancel}>Cancel</Button>\n </ButtonGroup>\n\n \n</div>\n\n\n<style>\n\n.root {\n padding: 10px;\n}\n\n.option-container {\n border-style: dotted;\n border-width: 1px;\n border-color: var(--primary75);\n padding: 3px;\n margin-right: 5px;\n}\n\n</style>",
2019-07-15 07:59:46 +02:00
"<script>\r\n\r\nexport let checked=false;\r\nexport let label=\"\";\r\n\r\n</script>\r\n\r\n<input class=\"uk-checkbox\" type=\"checkbox\" bind:checked on:change />{label}\r\n\r\n<style>\r\n\r\ninput {\r\n margin-right:7px;\r\n}\r\n\r\n</style>",
"<script>\r\n\r\nimport { searchAllComponents } from \"./pagesParsing/searchComponents\";\r\n\r\nexport let allComponents = [];\r\nexport let onComponentChosen = () => {};\r\n\r\nlet phrase = \"\";\r\n\r\n$: filteredComponents = \r\n !phrase \r\n ? [] \r\n : searchAllComponents(allComponents, phrase);\r\n\r\n</script>\r\n\r\n<div class=\"root\">\r\n\r\n <input class=\"uk-input\" bind:value={phrase}>\r\n <div>\r\n {#each filteredComponents as component}\r\n <div class=\"component\" on:click={() => onComponentChosen(component)}>\r\n <div class=\"title\">{component.name}</div>\r\n <div class=\"description\">{component.description}</div>\r\n </div>\r\n {/each}\r\n </div>\r\n\r\n</div>\r\n\r\n<style>\r\n\r\n.component {\r\n padding:5px;\r\n border-style: solid;\r\n border-width: 0 0 1px 0;\r\n border-color: var(--lightslate);\r\n cursor: pointer;\r\n}\r\n\r\n.component:hover {\r\n background-color: var(--primary10);\r\n}\r\n\r\n.component > .title {\r\n font-size: 13pt;\r\n color: var(--secondary100);\r\n}\r\n\r\n.component > .description {\r\n font-size: 10pt;\r\n color: var(--primary75);\r\n font-style: italic;\r\n}\r\n\r\n</style>",
"<script>\r\nimport {join} from \"lodash/fp\";\r\n\r\nexport let values;\r\nexport let label;\r\n\r\nconst inputChanged = ev => {\r\n try {\r\n values = ev.target.value.split(\"\\n\");\r\n } catch(_) {\r\n values = [];\r\n }\r\n}\r\n\r\n$: valuesText = join(\"\\n\")(values);\r\n\r\n\r\n</script>\r\n\r\n\r\n<div class=\"uk-margin\">\r\n <label class=\"uk-form-label\">{label}</label>\r\n <div class=\"uk-form-controls\">\r\n <textarea value={valuesText} on:change={inputChanged} ></textarea>\r\n </div>\r\n</div>\r\n\r\n<style>\r\n\r\ntextarea {\r\n width:300px;\r\n height:200px;\r\n}\r\n\r\n</style>"
2019-07-15 07:59:46 +02:00
],
"names": [],
"mappings": "AAgCC,IAAI,cAAC,CAAC,AACL,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,CAAC,UAAU,AAClD,CAAC;ACVF,KAAK,cAAC,CAAC,AACH,QAAQ,CAAE,KAAK,CACf,MAAM,CAAE,CAAC,CAAC,IAAI,CACd,UAAU,CAAE,MAAM,CAClB,GAAG,CAAE,GAAG,CAGR,MAAM,IAAI,AACd,CAAC,AAED,MAAM,cAAC,CAAC,AACJ,QAAQ,YAAY,CACpB,MAAM,CAAE,IAAI,AAChB,CAAC,AAED,KAAK,cAAC,CAAC,AACH,KAAK,CAAE,KAAK,CACZ,aAAa,CAAE,IAAI,AACvB,CAAC,AAED,mBAAK,CAAC,AAAQ,OAAO,AAAE,CAAC,AACpB,MAAM,KAAK,AACf,CAAC,AAED,SAAS,cAAC,CAAC,AACP,UAAU,CAAE,IAAI,CAChB,OAAO,CAAE,KAAK,AAClB,CAAC;AClBA,KAAK,cAAC,CAAC,AACJ,MAAM,CAAE,IAAI,AACf,CAAC,AAG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