92 lines
110 KiB
Plaintext
92 lines
110 KiB
Plaintext
{
|
|
"version": 3,
|
|
"file": "bundle.css",
|
|
"sources": [
|
|
"..\\..\\builder\\src\\App.svelte",
|
|
"..\\..\\builder\\src\\NoPackage.svelte",
|
|
"..\\..\\builder\\src\\PackageRoot.svelte",
|
|
"..\\..\\builder\\src\\common\\IconButton.svelte",
|
|
"..\\..\\builder\\src\\BackendRoot.svelte",
|
|
"..\\..\\builder\\src\\common\\Button.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\UserInterfaceRoot.svelte",
|
|
"..\\..\\builder\\src\\common\\ComingSoon.svelte",
|
|
"..\\..\\builder\\src\\actionsAndTriggers\\ActionsAndTriggersRoot.svelte",
|
|
"..\\..\\builder\\src\\database\\DatabaseRoot.svelte",
|
|
"..\\..\\builder\\src\\accessLevels\\AccessLevelsRoot.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\PagesList.svelte",
|
|
"..\\..\\builder\\src\\nav\\BackendNav.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\EditComponent.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\ComponentsHierarchy.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\NewComponent.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\SettingsView.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\CurrentItemPreview.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\PageView.svelte",
|
|
"..\\..\\builder\\src\\common\\ButtonGroup.svelte",
|
|
"..\\..\\builder\\src\\actionsAndTriggers\\Triggers.svelte",
|
|
"..\\..\\builder\\src\\database\\HierarchyRow.svelte",
|
|
"..\\..\\builder\\src\\actionsAndTriggers\\Actions.svelte",
|
|
"..\\..\\builder\\src\\database\\RecordView.svelte",
|
|
"..\\..\\builder\\src\\database\\ActionsHeader.svelte",
|
|
"..\\..\\builder\\src\\common\\DropdownButton.svelte",
|
|
"..\\..\\builder\\src\\database\\IndexView.svelte",
|
|
"..\\..\\builder\\src\\nav\\NavItem.svelte",
|
|
"..\\..\\builder\\src\\nav\\HierarchyRow.svelte",
|
|
"..\\..\\builder\\src\\common\\Textbox.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\PropsView.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\ComponentSearch.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\ComponentInstanceEditor.svelte",
|
|
"..\\..\\builder\\src\\actionsAndTriggers\\ActionView.svelte",
|
|
"..\\..\\builder\\src\\common\\CodeArea.svelte",
|
|
"..\\..\\builder\\src\\common\\Checkbox.svelte",
|
|
"..\\..\\builder\\src\\common\\ErrorsBox.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\ComponentPropSelector.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\PropControl.svelte",
|
|
"..\\..\\builder\\src\\common\\ValuesList.svelte",
|
|
"..\\..\\builder\\src\\userInterface\\PropArraySelector.svelte"
|
|
],
|
|
"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 IconButton from \"./common/IconButton.svelte\";\nimport { store } from \"./builderStore\";\nimport UserInterfaceRoot from \"./userInterface/UserInterfaceRoot.svelte\";\nimport BackendRoot from \"./BackendRoot.svelte\";\nimport { fade } from \"svelte/transition\";\n\n</script>\n\n<div class=\"root\">\n\n <div class=\"top-nav\">\n <IconButton icon=\"home\" \n color=\"var(--slate)\"\n hoverColor=\"var(--secondary75)\"/>\n <span class:active={$store.isBackend}\n class=\"topnavitem\"\n on:click={store.showBackend}>\n Backend\n </span>\n <span class:active={!$store.isBackend}\n class=\"topnavitem\"\n on:click={store.showFrontend}>\n Frontend\n </span>\n </div>\n\n <div class=\"content\">\n {#if $store.isBackend}\n <div in:fade out:fade>\n <BackendRoot />\n </div>\n {:else}\n <div in:fade out:fade>\n <UserInterfaceRoot />\n </div>\n {/if}\n </div>\n\n</div>\n\n<style>\n\n.root {\n height:100%;\n width:100%;\n display: flex;\n flex-direction: column;\n}\n\n.top-nav {\n flex: 0 0 auto;\n height:25px;\n background: white;\n border-style:solid;\n border-width: 0px 0px 1px 0px;\n border-color: var(--lightslate);\n padding: 5px;\n width: 100%;\n}\n\n.content {\n flex: 1 1 auto;\n width: 100%;\n height: 100px;\n}\n\n.content > div {\n height:100%;\n width:100%;\n}\n\n.topnavitem {\n cursor: pointer;\n color: var(--slate);\n padding: 0px 15px;\n}\n\n.topnavitem:hover {\n color: var(--secondary75);\n}\n\n.active {\n color: var(--secondary100);\n}\n\n\n</style>",
|
|
"<script>\nimport getIcon from \"./icon\";\n\nexport let size = 18;\nexport let icon = \"\";\nexport let style = \"\";\nexport let color = \"var(--secondary100)\";\nexport let hoverColor = \"var(--secondary75)\";\nexport let attributes = {};\n\n$: borderClass = grouped \n ? \"\"\n : \"border-normal\";\n\nlet currentAttributes = [];\nconst addAttributes = (node, attributes) => {\n\n const add = (_attributes) => {\n const attrs = [];\n for(let attr in _attributes) {\n node.setAttribute(attr, _attributes[attr]);\n attrs.push(\"uk-toggle\")\n }\n currentAttributes = attrs;\n }\n\n add(attributes);\n\n return {\n // should implement update method\n update(attributes) {\n for(let attr of currentAttributes) {\n node.removeAttribute(attr)\n }\n add(attributes);\n },\n destroy() {}\n }\n}\n\n</script>\n\n<button style=\"{style}{style ? \";\" : \"\"} color:{color}; --hovercolor:{hoverColor}\"\n on:click\n use:addAttributes={attributes}>\n {@html getIcon(icon, size)}\n</button>\n\n\n<style>\n\nbutton {\n border-style: none;\n background-color: rgba(0,0,0,0);\n cursor: pointer;\n outline:none;\n}\n\nbutton:hover {\n color: var(--hovercolor);\n}\n\nbutton:active {\n outline:none;\n}\n\n</style>",
|
|
"<script>\n\nimport BackendNav from \"./nav/BackendNav.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 <div class=\"nav\">\n <BackendNav />\n </div>\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 {/if}\n </div>\n</div>\n\n\n\n<style>\n\n.root {\n height: 100%;\n display: flex;\n}\n\n\n.content {\n flex: 1 1 auto;\n height: 100%;\n background-color: var(--white);\n margin:0;\n}\n\n.nav {\n flex: 0 1 auto;\n width: 300px;\n height: 100%;\n}\n\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 ComponentsHierarchy from \"./ComponentsHierarchy.svelte\";\nimport PagesList from \"./PagesList.svelte\"\nimport EditComponent from \"./EditComponent.svelte\";\nimport { store } from \"../builderStore\";\nimport getIcon from \"../common/icon\";\nimport { isComponent } from \"./pagesParsing/searchComponents\";\nimport IconButton from \"../common/IconButton.svelte\";\nimport Modal from \"../common/Modal.svelte\";\nimport NewComponent from \"./NewComponent.svelte\";\nimport CurrentItemPreview from \"./CurrentItemPreview.svelte\";\nimport SettingsView from \"./SettingsView.svelte\";\nimport PageView from \"./PageView.svelte\";\n\nlet newComponentPicker; \nconst newComponent = () => {\n newComponentPicker.show();\n}\n\nlet settingsView;\nconst settings = () => {\n settingsView.show();\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=\"settings\" \n size=\"14\"\n on:click={settings}/>\n <IconButton icon=\"plus\" \n on:click={newComponent}/>\n </div>\n </div>\n <div class=\"nav-items-container\">\n <ComponentsHierarchy components={$store.derivedComponents}/>\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>\n {#if $store.currentFrontEndItem}\n {#if isComponent($store.currentFrontEndItem)}\n <CurrentItemPreview />\n {:else}\n <PageView />\n {/if}\n {/if} \n </div>\n\n {#if $store.currentFrontEndItem && isComponent($store.currentFrontEndItem)}\n <div class=\"properties-pane\">\n <EditComponent />\n </div>\n {/if}\n\n</div>\n\n\n<NewComponent bind:this={newComponentPicker}/>\n<SettingsView bind:this={settingsView} />\n\n\n<style>\n\n.root {\n display: grid;\n grid-template-columns: [uiNav] 250px [preview] auto [properties] 300px;\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.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>\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>\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 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=\"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\n\n<style>\n.root {\n height: 100%;\n position: relative;\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</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>\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.currentPageName === \"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.currentPageName === \"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 { store } from \"../builderStore\";\nimport HierarchyRow from \"./HierarchyRow.svelte\";\nimport DropdownButton from \"../common/DropdownButton.svelte\";\nimport {hierarchy as hierarchyFunctions} from \"../../../core/src\";\nimport NavItem from \"./NavItem.svelte\";\n\nconst defaultNewChildActions = [\n {\n label:\"New Root Index\", \n onclick: store.newRootIndex\n }, \n {\n label:\"New Root Record\", \n onclick: store.newRootRecord\n }\n];\n\nlet newChildActions = defaultNewChildActions;\n\nconst setActiveNav = (name) => () => {\n store.setActiveNav(name);\n}\n\n\nstore.subscribe(db => {\n if(!db.currentNode || hierarchyFunctions.isIndex(db.currentNode)) {\n newChildActions = defaultNewChildActions;\n } else {\n newChildActions = [\n {label:\"New Root Record\", \n onclick: store.newRootRecord},\n {label: `New Child Record of ${db.currentNode.name}`, \n onclick: store.newChildRecord},\n {label:\"New Root Index\", \n onclick: store.newRootIndex},\n {label: `New Index on ${db.currentNode.name}`, \n onclick: store.newChildIndex}\n ];\n }\n});\n\n</script>\n\n<div class=\"root\">\n <div class=\"items-root\">\n <div class=\"hierarchy\">\n <div class=\"hierarchy-title-row\">\n <div class=\"hierarchy-title\">Database</div>\n <DropdownButton iconName=\"plus\" actions={newChildActions} />\n </div>\n\n {#each $store.hierarchy.children as record}\n <HierarchyRow node={record}\n type=\"record\" />\n {/each}\n\n {#each $store.hierarchy.indexes as index}\n <HierarchyRow node={index}\n type=\"index\" />\n {/each}\n\n </div>\n\n <NavItem name=\"actions\" label=\"Actions and Triggers\"/>\n <NavItem name=\"access levels\" label=\"User Levels\"/>\n <div class=\"space-filler\"></div>\n </div>\n</div>\n\n<style>\n\n.root {\n height: 100%;\n background-color: var(--primary10);\n}\n\n.items-root {\n display: flex;\n flex-direction: column;\n max-height: 100%;\n height: 10px;\n}\n\n\n.hierarchy {\n flex: 1 1 auto;\n}\n\n\n.hierarchy-title-row {\n padding: 15px 7px;\n font-size: 12pt;\n display: flex;\n font-weight: bold;\n}\n\n.hierarchy-title {\n flex: auto 1 1;\n}\n\n\n\n.space-filler {\n flex: 1 1 auto;\n}\n\n\n</style>",
|
|
"<script>\n\nimport PropsView from \"./PropsView.svelte\";\nimport { store } from \"../builderStore\";\nimport { isRootComponent } from \"./pagesParsing/searchComponents\";\nimport IconButton from \"../common/IconButton.svelte\";\nimport Textbox from \"../common/Textbox.svelte\";\nimport UIkit from \"uikit\";\nimport { pipe } from \"../common/core\";\nimport {\n getComponentInfo\n} from \"./pagesParsing/createProps\";\nimport Button from \"../common/Button.svelte\";\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\nimport ComponentInstanceEditor from \"./ComponentInstanceEditor.svelte\";\n\nimport { \n cloneDeep, \n join,\n split,\n map,\n keys,\n isUndefined,\n last\n} from \"lodash/fp\";\nimport { assign } from \"lodash\";\n\nlet component;\nlet name = \"\";\nlet description = \"\";\nlet tagsString = \"\";\nlet nameInvalid = \"\";\nlet componentDetailsExpanded = false;\nlet componentInfo;\nlet modalElement\nlet propsValidationErrors = [];\nlet editingComponentInstance;\nlet editingComponentInstancePropName=\"\";\nlet allComponents;\n\n$: shortName = last(name.split(\"/\"));\n\nstore.subscribe(s => {\n component = s.currentFrontEndItem;\n if(!component) return;\n name = component.name;\n description = component.description;\n tagsString = join(\", \")(component.tags);\n componentInfo = s.currentComponentInfo;\n componentDetailsExpanded = s.currentComponentIsNew;\n allComponents = s.allComponents;\n});\n\nconst save = () => {\n\n if(!validate()) return;\n\n component.name = name;\n component.description = description;\n component.tags = pipe(tagsString, [\n split(\",\"),\n map(s => s.trim())\n ]);\n\n store.saveDerivedComponent(component);\n}\n\nconst deleteComponent = () => {\n showDialog();\n}\n\nconst confirmDeleteComponent = () => {\n store.deleteDerivedComponent(component.name);\n hideDialog();\n}\n\nconst onPropsValidate = result => {\n propsValidationErrors = result;\n}\n\nconst updateComponent = doChange => {\n const newComponent = cloneDeep(component);\n doChange(newComponent);\n component = newComponent;\n componentInfo = getComponentInfo(allComponents, newComponent);\n}\n\nconst onPropsChanged = newProps => {\n updateComponent(newComponent => \n assign(newComponent.props, newProps));\n \n}\n\nconst validate = () => {\n const fieldInvalid = (field, err) => \n errors[field] = err;\n const fieldValid = field => \n errors[field] && delete errors[field];\n\n if(!name) nameInvalid = \"component name i not supplied\";\n else nameInvalid = \"\";\n\n return (!nameInvalid && propsValidationErrors.length === 0);\n}\n\nconst hideDialog = () => {\n UIkit.modal(modalElement).hide();\n}\n\nconst showDialog = () => {\n UIkit.modal(modalElement).show();\n}\n\nconst onEditComponentProp = (propName, arrayIndex, arrayPropName) => {\n\n editingComponentInstance = isUndefined(arrayIndex) \n ? component.props[propName]\n : component.props[propName][arrayIndex][arrayPropName];\n editingComponentInstancePropName = isUndefined(arrayIndex)\n ? propName\n : `${propName}[${arrayIndex}].${arrayPropName}`;\n}\n\nconst componentInstanceCancelEdit = () => {\n editingComponentInstance = null;\n editingComponentInstancePropName = \"\";\n}\n\nconst componentInstancePropsChanged = (instanceProps) => {\n updateComponent(newComponent => \n newComponent.props[editingComponentInstancePropName] = instanceProps);\n}\n\n</script>\n\n<div class=\"root\">\n\n <div class=\"title\">\n <div>{shortName}</div>\n <div>\n <IconButton icon=\"save\" \n on:click={save} \n color=\"var(--primary100)\"\n hoverColor=\"red\"/>\n <IconButton icon=\"trash\" \n on:click={deleteComponent} \n color=\"var(--primary100)\"\n hoverColor=\"red\"/>\n </div>\n </div>\n\n {#if editingComponentInstance}\n <ComponentInstanceEditor onGoBack={componentInstanceCancelEdit}\n propertyName={editingComponentInstancePropName}\n instanceProps={editingComponentInstance}\n onPropsChanged={componentInstancePropsChanged}/>\n {:else}\n <div>\n\n <div class=\"section-header padding\" on:click={() => componentDetailsExpanded = !componentDetailsExpanded}>\n <span style=\"margin-right: 7px\">Component Details</span>\n <IconButton icon={componentDetailsExpanded ? \"chevron-down\" : \"chevron-right\"}/>\n </div>\n\n {#if componentDetailsExpanded}\n <div class=\"padding\">\n <Textbox label=\"Name\" \n infoText=\"use forward slash to store in subfolders\"\n bind:text={name}\n disabled={!$store.currentComponentIsNew}\n hasError={!!nameInvalid}/>\n <div class=\"info-text\"></div>\n <Textbox label=\"Description\"\n bind:text={description}/>\n <Textbox label=\"Tags\" \n infoText=\"comma separated\"\n bind:text={tagsString}/>\n \n </div>\n {/if}\n\n <div class=\"section-header padding\">\n <span>Properties</span>\n </div>\n\n \n <PropsView onValidate={onPropsValidate}\n {componentInfo}\n {onPropsChanged}\n {onEditComponentProp}/>\n \n\n </div>\n {/if}\n\n</div>\n\n\n<div bind:this={modalElement} uk-modal>\n <div class=\"uk-modal-dialog\">\n\n <div class=\"uk-modal-header\">\n Delete {component.name} ? \n </div>\n\n <div class=\"uk-modal-body\">\n Are you sure you want to delete this component ?\n </div>\n\n <div class=\"uk-modal-footer\">\n <ButtonGroup>\n <Button grouped \n on:click={confirmDeleteComponent}>\n OK\n </Button>\n <Button grouped \n on:click={hideDialog} \n color=\"secondary\" >\n Cancel\n </Button>\n </ButtonGroup>\n </div>\n\n </div>\n\n</div>\n\n<style>\n\n.root {\n height: 100%;\n border-style: solid;\n border-color: var(--lightslate);\n border-width: 0px 0px 0px 1px;\n}\n\n.padding {\n padding: 0px 5px 0px 10px;\n}\n\n.title {\n background-color: white;\n padding: 3px;\n display: grid;\n grid-template-columns: [name] 1fr [actions] auto;\n}\n\n.title > div:nth-child(1) {\n grid-column-start: name;\n color: var(--secondary100);\n}\n\n.title > div:nth-child(2) {\n grid-column-start: actions;\n}\n\n.section-header {\n font-style: italic; \n color: var(--slate);\n border-style: solid;\n border-color: var(--lightslate);\n border-width: 0px 0px 1px 0px;\n}\n\n.section-header {\n vertical-align: middle;\n margin-top: 20px;\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 includes\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\nlet pathPartsThisLevel;\nlet componentsThisLevel;\nlet subfolders;\n\nlet expandedFolders = [];\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: includes(folderName)(expandedFolders),\n path: thisLevel + \"/\" + folderName\n });\n}\n\nconst subComponents = (subfolder) => pipe(components, [\n filter(c => isInSubfolder(subfolder, c))\n ]);\n\nconst expandFolder = folder => {\n const expandedFolder = {...folder};\n if(expandedFolder.isExpanded) {\n expandedFolder.isExpanded = false;\n expandedFolders = filter(f => f.name !== folder.name)(expandedFolders);\n } else {\n expandedFolder.isExpanded = true;\n expandedFolders.push(folder.name);\n }\n const newFolders = [...subfolders];\n newFolders.splice(\n newFolders.indexOf(folder),\n 1,\n expandedFolder);\n subfolders = newFolders;\n \n}\n\nconst isComponentSelected = (current,c) =>\n current \n && current.name === c.name\n\nconst isFolderSelected = (current, folder) => \n isInSubfolder(current, folder)\n\n\n\n$: {\n pathPartsThisLevel = !thisLevel \n ? 1\n : normalizedName(thisLevel).split(\"/\").length + 1;\n\n componentsThisLevel = \n pipe(components, [\n filter(isOnThisLevel),\n map(c => ({component:c, title:lastPartOfName(c)})),\n sortBy(\"title\")\n ]);\n\n subfolders = \n pipe(components, [\n filter(notOnThisLevel),\n sortBy(\"name\"),\n map(subFolder),\n uniqWith((f1,f2) => f1.path === f2.path)\n ]);\n}\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\n\r\nimport ComponentSearch from \"./ComponentSearch.svelte\";\r\nimport { store } from \"../builderStore\";\r\nimport PropsView from \"./PropsView.svelte\";\r\nimport Textbox from \"../common/Textbox.svelte\";\r\nimport Button from \"../common/Button.svelte\";\r\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\r\nimport { pipe } from \"../common/core\";\r\nimport UIkit from \"uikit\";\r\nimport {\r\n getNewComponentInfo\r\n} from \"./pagesParsing/createProps\";\r\nimport { isRootComponent } from \"./pagesParsing/searchComponents\";\r\n\r\nimport { \r\n cloneDeep, \r\n join,\r\n split,\r\n map,\r\n keys,\r\n isUndefined\r\n} from \"lodash/fp\";\r\nimport { assign } from \"lodash\";\r\n\r\n\r\n\r\nlet modalElement;\r\nlet allComponents;\r\n\r\nstore.subscribe(s => {\r\n allComponents = s.allComponents;\r\n})\r\n\r\nexport const close = () => {\r\n UIkit.modal(modalElement).hide();\r\n}\r\n\r\nexport const show = () => {\r\n UIkit.modal(modalElement).show();\r\n}\r\n\r\nconst onComponentChosen = (c) => {\r\n store.createDerivedComponent(c.name);\r\n close();\r\n}\r\n\r\n</script>\r\n\r\n<div bind:this={modalElement} id=\"new-component-modal\" uk-modal>\r\n <div class=\"uk-modal-dialog\">\r\n\r\n <div class=\"uk-modal-header\">\r\n <h1>New Component</h1>\r\n </div>\r\n\r\n <div class=\"uk-modal-body\">\r\n <ComponentSearch onComponentChosen={onComponentChosen} />\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<style>\r\nh1 {\r\n font-size:1.2em;\r\n}\r\n\r\n</style>",
|
|
"<script>\r\n\r\nimport { store } from \"../builderStore\";\r\nimport Textbox from \"../common/Textbox.svelte\";\r\nimport Button from \"../common/Button.svelte\";\r\nimport IconButton from \"../common/IconButton.svelte\";\r\nimport { libraryDependencies } from \"./pagesParsing/findDependencies\";\r\nimport UIkit from \"uikit\";\r\n\r\nlet addNewLib = \"\";\r\nlet addNewStylesheet = \"\";\r\nlet addComponentError = \"\";\r\nlet modalElement;\r\nlet allComponents;\r\n\r\nstore.subscribe(s => {\r\n allComponents = s.allComponents;\r\n})\r\n\r\nconst removeLibrary = lib => {\r\n const dependencies = libraryDependencies(allComponents, lib);\r\n if(dependencies.length > 0) return;\r\n store.removeComponentLibrary(lib);\r\n}\r\n\r\nconst addLib = () => {\r\n store.addComponentLibrary(addNewLib)\r\n .then(() => {\r\n addNewLib = \"\";\r\n }); \r\n}\r\n\r\nconst removeStylesheet = stylesheet => {\r\n store.removeStylesheet(stylesheet);\r\n}\r\n\r\nconst addStylesheet = () => {\r\n if(addNewStylesheet)\r\n store.addStylesheet(addNewStylesheet);\r\n}\r\n\r\nexport const close = () => {\r\n UIkit.modal(modalElement).hide();\r\n}\r\n\r\nexport const show = () => {\r\n UIkit.modal(modalElement).show();\r\n}\r\n\r\n</script>\r\n\r\n<div bind:this={modalElement} id=\"new-component-modal\" uk-modal>\r\n <div class=\"uk-modal-dialog\">\r\n\r\n <div class=\"uk-modal-header header\">\r\n <div>Settings</div>\r\n <div>\r\n <IconButton icon=\"x\"\r\n on:click={close}/>\r\n </div>\r\n </div>\r\n\r\n <div class=\"uk-modal-body uk-form-horizontal\">\r\n\r\n <div class=\"section-container\">\r\n <p>Component Libraries\r\n <span>\r\n <input bind:value={addNewLib} /> \r\n <Button color=\"primary-outline\"\r\n on:click={addLib}>Add</Button>\r\n </span>\r\n </p>\r\n {#each $store.pages.componentLibraries as lib}\r\n <div>\r\n <span class=\"row-text\">{lib}</span>\r\n <IconButton icon=\"x\" \r\n on:click={() => removeLibrary(lib)}/>\r\n </div>\r\n {/each}\r\n </div>\r\n \r\n\r\n <div class=\"section-container\">\r\n <p>Stylesheets\r\n <span>\r\n <input bind:value={addNewStylesheet} /> \r\n <Button color=\"primary-outline\"\r\n on:click={addStylesheet} >Add</Button>\r\n </span>\r\n </p>\r\n {#each $store.pages.stylesheets as stylesheet}\r\n <div>\r\n <span class=\"row-text\">{stylesheet}</span>\r\n <IconButton icon=\"x\" \r\n on:click={() => removeStylesheet(stylesheet)}/>\r\n </div>\r\n {/each}\r\n </div>\r\n\r\n \r\n </div>\r\n </div>\r\n</div>\r\n\r\n<style>\r\n\r\n.section-container {\r\n padding: 15px;\r\n border-style: dotted;\r\n border-width: 1px;\r\n border-color: var(--lightslate);\r\n border-radius: 2px;\r\n}\r\n\r\n.section-container:nth-child(1) {\r\n margin-bottom: 15px;\r\n}\r\n\r\n.row-text {\r\n margin-right: 15px;\r\n color: var(--primary100);\r\n}\r\n\r\ninput {\r\n margin-right: 15px;\r\n}\r\n\r\np > span {\r\n margin-left: 30px;\r\n}\r\n\r\n.header {\r\n display: grid;\r\n grid-template-columns: [title] 1fr [icon] auto;\r\n}\r\n\r\n.header > div:nth-child(1) {\r\n grid-column-start: title;\r\n}\r\n\r\n.header > div:nth-child(2) {\r\n grid-column-start: icon;\r\n}\r\n\r\n</style>",
|
|
"<script>\nimport { store } from \"../builderStore\";\nimport { makeLibraryUrl } from \"../builderStore/loadComponentLibraries\";\nimport {\n last,\n split,\n map,\n join\n} from \"lodash/fp\";\nimport { pipe } from \"../common/core\";\nimport { splitName } from \"./pagesParsing/splitRootComponentName\"\nimport { afterUpdate } from 'svelte';\nimport { getRootComponent } from \"./pagesParsing/getRootComponent\";\n\nif(!window.budibaseIframeConnector) {\n window.budibaseIframeConnector = {\n initialiseComponent(props, htmlElement) {\n const rootComponent = getRootComponent(\n props._component, allComponents);\n\n const {componentName, libName} = splitName(\n rootComponent.name);\n\n new (libraries[libName][componentName])({\n target: htmlElement,\n props: {...props, _app: window.budibaseIframeConnector}\n });\n }\n }\n}\n\nlet component;\nlet stylesheetLinks = \"\";\nlet componentHtml = \"\";\nlet props;\nlet componentLibraryUrl = \"\";\nlet rootComponentName = \"\";\nlet iframe;\nlet libraries;\nlet allComponents;\n\n\nstore.subscribe(s => {\n const {componentName, libName} = splitName(\n s.currentComponentInfo.rootComponent.name);\n\n rootComponentName = componentName;\n props = s.currentComponentInfo.fullProps;\n component = s.libraries[libName][componentName];\n stylesheetLinks = pipe(s.pages.stylesheets, [\n map(s => `<link rel=\"stylesheet\" href=\"${s}\"/>`),\n join(\"\\n\")\n ]);\n componentLibraryUrl = makeLibraryUrl(s.appname, libName);\n libraries = s.libraries;\n allComponents = s.allComponents;\n});\n\n/*\nafterUpdate(() => {\n if(iframe) iframeLoaded();\n});\n*/\n\nconst iframeLoaded = () => {\n setTimeout(() => {\n iframe.style.height = (iframe.contentWindow.document.body.scrollHeight + 1).toString() + \"px\";\n iframe.style.width = (iframe.contentWindow.document.body.scrollWidth + 1).toString() + \"px\";\n }, 100);\n}\n\n</script>\n\n<div class=\"component-preview\" >\n <div class=\"component-container\">\n <iframe bind:this={iframe}\n on:load={iframeLoaded}\n title=\"componentPreview\"\n srcdoc={\n`<html>\n \n<head>\n ${stylesheetLinks}\n <script>\n \n import('${componentLibraryUrl}')\n .then(module => {\n const componentClass = module['${rootComponentName}'];\n const instance = new componentClass({\n target: document.body,\n props: {...${JSON.stringify(props)}, _app: window.parent.budibaseIframeConnector}\n }) ;\n })\n \n </script>\n</head>\n<body>\n</body>\n</html>`}>\n </iframe>\n </div>\n</div>\n\n<style>\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 height:100%;\n}\n\n.component-container {\n grid-row-start: middle;\n grid-column-start: middle;\n}\n\n</style>",
|
|
"<script>\n\nimport Textbox from \"../common/Textbox.svelte\";\nimport Dropdown from \"../common/Dropdown.svelte\";\nimport Button from \"../common/Button.svelte\";\nimport { store } from \"../builderStore\";\nimport { isRootComponent } from \"./pagesParsing/searchComponents\";\nimport {\n filter,\n find\n} from \"lodash/fp\";\n\nlet entryComponent;\nlet title = \"\";\nlet components = [];\n\nstore.subscribe(s => {\n title = s.currentFrontEndItem.index.title;\n components = filter(s => !isRootComponent(s))(s.allComponents);\n entryComponent = find(c => c.name === s.currentFrontEndItem.appBody)(components);\n});\n\nconst save = () => {\n const page = {\n index: {\n title\n },\n appBody: entryComponent.name,\n }\n store.savePage(page);\n}\n\n</script>\n\n<div class=\"root\">\n\n <h3>{$store.currentPageName}</h3>\n\n <form class=\"uk-form-horizontal\">\n <Textbox bind:text={title} label=\"Title\" />\n <div class=\"help-text\">The title of your page, displayed in the bowser tab</div>\n <Dropdown label=\"App Entry Component\"\n options={components}\n bind:selected={entryComponent}\n textMember={(v) => v.name} />\n\n <div class=\"help-text\">The component that will be loaded into the body of the page</div>\n <div style=\"margin-top: 20px\"></div>\n <Button on:click={save}>Save</Button>\n </form>\n\n</div>\n\n<style>\n.root {\n padding: 15px;\n}\n.help-text {\n color: var(--slate);\n font-size: 10pt;\n}\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 {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>\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 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 actionsArray = [];\nstore.subscribe(s => {\n actionsArray = pipe(s.actions, [\n keys,\n map(k => s.actions[k])\n ]);\n});\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 actionsArray}\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 actionsArray 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 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 allFields={record.fields} \n store={$store}/>\n </Modal>\n {/if}\n\n <h4>\n Indexes \n </h4>\n\n {#each record.indexes as index}\n <div class=\"index-container\">\n <div class=\"index-name\">\n {index.name}\n <span style=\"margin-left: 7px\" on:click={() => editIndex(index)}>{@html getIcon(\"edit\")}</span>\n </div>\n <div class=\"index-field-row\">\n <span class=\"index-label\">records indexed: </span> \n <span>{getIndexAllowedRecords(index)}</span>\n <span class=\"index-label\" style=\"margin-left: 15px\">type:</span> \n <span>{index.indexType}</span>\n </div>\n <div class=\"index-field-row\">\n <span class=\"index-label\">map:</span>\n <code class=\"index-mapfilter\">{index.map}</code>\n </div>\n {#if index.filter}\n <div class=\"index-field-row\">\n <span class=\"index-label\">filter:</span>\n <code class=\"index-mapfilter\">{index.filter}</code>\n </div>\n {/if}\n </div>\n {:else}\n (no indexes added)\n {/each}\n\n</div>\n\n\n<style>\n\n.root {\n height: 100%;\n padding: 15px;\n}\n\n.fields-table {\n margin:10px;\n border-collapse:collapse;\n}\n\n.add-field-button {\n margin-left:15px;\n cursor:pointer;\n}\n\n.edit-button {\n cursor:pointer;\n color: var(--white);\n}\n\n.edit-button:hover {\n color: var(--secondary75);\n}\n\nth {\n text-align: left;\n}\n\ntd {\n padding: 5px 30px 5px 0px;\n margin:0;\n \n}\n\nthead > tr {\n border-width: 0px 0px 1px 0px;\n border-style: solid;\n border-color: var(--secondary75);\n margin-bottom: 20px;\n}\n\ntbody > tr {\n border-width: 0px 0px 1px 0px;\n border-style: solid;\n border-color: var(--primary10);\n}\n\ntbody > tr:hover {\n background-color: var(--primary10);\n}\n\ntbody > tr:hover .edit-button {\n color: var(--secondary75);\n}\n\n.index-container {\n border-style: solid;\n border-width: 0 0 1px 0;\n border-color: var(--secondary25);\n padding: 10px;\n margin-bottom: 5px;\n}\n\n.index-label {\n color: var(--slate);\n}\n\n.index-name {\n font-weight: bold;\n color: var(--primary100);\n}\n\n.index-container code {\n margin: 0;\n display: inline;\n background-color: var(--primary10);\n color: var(--secondary100);\n padding:3px;\n}\n\n.index-field-row {\n margin-top: 7px;\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>",
|
|
"<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>\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 {store} from \"../builderStore\";\nimport getIcon from \"../common/icon\";\n\nexport let name = \"\";\nexport let label = \"\";\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=\"nav-item {navActive}\" on:click={setActive}>\n {label}\n</div>\n\n\n<style>\n\n.nav-item {\n padding: 7px;\n font-size: 12pt;\n font-weight: bold;\n cursor: pointer;\n flex: 0 0 auto;\n}\n\n.nav-item:hover {\n background-color: var(--primary10);\n}\n\n.active {\n background-color: var(--primary10);\n}\n\n</style>",
|
|
"<script>\n\nimport {store} from \"../builderStore\";\nimport {cloneDeep} from \"lodash\";\nimport getIcon from \"../common/icon\";\nexport let level = 0;\nexport let node;\nexport let type;\n\nlet navActive = \"\";\n$:icon = type===\"index\" ? \"list\" : \"file\";\n\nstore.subscribe(s => {\n if(s.currentNode)\n navActive = (s.activeNav === \"database\" && node.nodeId === s.currentNode.nodeId \n ? \"active\" : \"\")\n});\n\n</script>\n\n<div class=\"root\">\n <div class=\"title {navActive}\" on:click={() => store.selectExistingNode(node.nodeId)} style=\"padding-left: {20 + (level * 20)}px\">\n {@html getIcon(icon, 12)} <span style=\"margin-left: 5px\">{node.name}</span>\n </div>\n {#if node.children}\n {#each node.children as child}\n <svelte:self node={child} \n level={level+1}\n type=\"record\"/>\n {/each}\n {/if}\n {#if node.indexes}\n {#each node.indexes as index}\n <svelte:self node={index} \n level={level+1}\n type=\"index\"/>\n {/each}\n {/if}\n</div>\n\n\n<style>\n\n.root { \n display: block;\n font-size: 12pt;\n width: 100%;\n cursor: pointer;\n}\n\n.title {\n padding-top: 5px;\n padding-right: 5px;\n padding-bottom: 5px;\n color: var(--secondary100);\n}\n\n.title:hover {\n background-color: var(--secondary10);\n}\n\n.active {\n background-color: var(--primary10);\n}\n\n</style>",
|
|
"<script>\r\nexport let text = \"\";\r\nexport let label = \"\";\r\nexport let width = \"medium\";\r\nexport let size = \"small\";\r\nexport let margin = true;\r\nexport let infoText = \"\";\r\nexport let hasError = false;\r\nexport let disabled = false;\r\n</script>\r\n\r\n<div class:uk-margin={margin}>\r\n <label class=\"uk-form-label\">{label}</label>\r\n <div class=\"uk-form-controls\">\r\n <input class=\"uk-input uk-form-width-{width} uk-form-{size}\"\r\n class:uk-form-danger={hasError}\r\n on:change\r\n bind:value={text} \r\n {disabled}>\r\n </div>\r\n {#if infoText}\r\n <div class=\"info-text\">{infoText}</div>\r\n {/if}\r\n</div>\r\n\r\n<style>\r\n.info-text {\r\n font-size: 0.8em;\r\n color: var(--slate);\r\n}\r\n</style>\r\n\r\n",
|
|
"<script>\n\nimport {\n keys,\n map,\n some,\n includes,\n cloneDeep,\n isEqual,\n sortBy,\n filter,\n difference\n} from \"lodash/fp\";\nimport { pipe } from \"../common/core\";\nimport { \n getComponentInfo ,\n getInstanceProps\n} from \"./pagesParsing/createProps\";\nimport { getExactComponent } from \"./pagesParsing/searchComponents\";\nimport Checkbox from \"../common/Checkbox.svelte\";\nimport Textbox from \"../common/Textbox.svelte\";\nimport Dropdown from \"../common/Dropdown.svelte\";\nimport { validateProps } from \"./pagesParsing/validateProps\";\nimport ComponentPropSelector from \"./ComponentPropSelector.svelte\";\nimport PropControl from \"./PropControl.svelte\";\nimport IconButton from \"../common/IconButton.svelte\";\n\nexport let shouldValidate = true;\nexport let onValidate = () => {};\nexport let componentInfo;\nexport let instanceProps = null;\nexport let onPropsChanged = () => {};\nexport let onEditComponentProp = () => {};\n\nlet errors = [];\nlet props = {};\nlet propsDefinitions = [];\nlet inheritedPropsDefinitions = [];\nlet inheritedExpanded = false;\nlet isInstance = false;\n\nconst isPropInherited = name => \n includes(name)(componentInfo.inheritedProps);\n\n$: {\n if(componentInfo)\n {\n isInstance = !!instanceProps;\n props = isInstance \n ? getInstanceProps(componentInfo, instanceProps)\n : cloneDeep(componentInfo.fullProps);\n\n propsDefinitions = pipe(componentInfo.propsDefinition, [\n keys,\n filter(k => !isPropInherited(k)),\n map(k => ({...componentInfo.propsDefinition[k], ____name:k})),\n sortBy(\"____name\")\n ]);\n\n inheritedPropsDefinitions = pipe(componentInfo.propsDefinition, [\n keys,\n filter(k => isPropInherited(k)),\n map(k => ({...componentInfo.propsDefinition[k], ____name:k})),\n sortBy(\"____name\")\n ]);\n }\n}\n\n\nlet setProp = (name, value) => {\n const newProps = cloneDeep(props);\n\n let finalProps = isInstance ? newProps : cloneDeep(componentInfo.component.props);\n\n if(!isInstance) {\n const nowSet = [];\n for(let p of componentInfo.unsetProps) {\n if(!isEqual(newProps[p])(componentInfo.rootDefaultProps[p])) {\n finalProps[p] = newProps[p];\n nowSet.push(p);\n }\n }\n componentInfo.unsetProps = difference(nowSet)(componentInfo.unsetProps);\n }\n\n newProps[name] = value;\n finalProps[name] = value;\n props = newProps;\n if(validate(finalProps))\n onPropsChanged(finalProps);\n \n}\n \nconst validate = (finalProps) => {\n errors = validateProps(componentInfo.propsDefinition, finalProps, [], false);\n onValidate(errors);\n return errors.length === 0;\n}\n\nconst fieldHasError = (propName) => \n some(e => e.propName === propName)(errors);\n\nconst onEditComponent = (propName) => (arrayIndex, arrayPropName) => {\n onEditComponentProp(propName, arrayIndex, arrayPropName);\n}\n\n</script>\n\n<div class=\"root\">\n\n <form class=\"uk-form-stacked\">\n {#each propsDefinitions as propDef, index}\n \n <PropControl {setProp}\n {fieldHasError}\n {propDef}\n {props}\n {index}\n onEditComponent={onEditComponent(propDef.____name)}\n disabled={false} />\n \n {/each}\n\n {#if inheritedPropsDefinitions.length > 0}\n <div class=\"inherited-title padding\">\n <div>Inherited</div>\n <div>\n <IconButton icon={inheritedExpanded ? \"chevron-down\" : \"chevron-right\"}\n on:click={() => inheritedExpanded = !inheritedExpanded}/>\n </div>\n </div>\n {/if}\n\n {#if inheritedExpanded}\n {#each inheritedPropsDefinitions as propDef, index}\n \n <PropControl {setProp}\n {fieldHasError}\n {propDef}\n {props}\n {index}\n disabled={true} />\n \n {/each}\n {/if}\n </form>\n\n\n \n\n</div>\n\n\n<style>\n\n.root {\n font-size:10pt;\n}\n\n.padding {\n padding: 0 10px;\n}\n\n.inherited-title {\n margin-top: 40px;\n display: grid;\n grid-template-columns: [name] 1fr [actions] auto;\n border-style: solid;\n border-width: 0px 0px 1px 0px;\n border-color: var(--lightslate);\n font-style: italic;\n}\n\n.inherited-title > div:nth-child(1) {\n grid-column-start: name;\n color: var(--slate);\n}\n\n.inherited-title > div:nth-child(2) {\n grid-column-start: actions;\n color: var(--secondary100);\n}\n\n</style>",
|
|
"<script>\r\n\r\nimport { searchAllComponents } from \"./pagesParsing/searchComponents\";\r\nimport { store } from \"../builderStore\";\r\n\r\nexport let onComponentChosen = () => {};\r\n\r\nlet allComponents = [];\r\nlet phrase = \"\";\r\n\r\nstore.subscribe(s => {\r\n allComponents = s.allComponents;\r\n});\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 <form class=\"uk-search uk-search-large\">\r\n <span uk-search-icon></span>\r\n <input class=\"uk-search-input\" \r\n type=\"search\" \r\n placeholder=\"Based on component...\" \r\n bind:value={phrase}>\r\n </form>\r\n\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\n\r\nimport PropsView from \"./PropsView.svelte\";\r\nimport IconButton from \"../common/IconButton.svelte\";\r\nimport { getComponentInfo } from \"./pagesParsing/createProps\";\r\nimport { store } from \"../builderStore\";\r\nimport { \r\n cloneDeep,\r\n isUndefined\r\n} from \"lodash/fp\";\r\nimport { fade, slide } from 'svelte/transition';\r\n\r\nexport let propertyName = \"\";\r\nexport let onGoBack = () => {};\r\nexport let instanceProps = {};\r\nexport let onPropsChanged = () => {};\r\n\r\n\r\nlet editingSubComponentName;\r\nlet editingSubComponentProps;\r\nlet allComponents;\r\n\r\nstore.subscribe(s => {\r\n allComponents = s.allComponents;\r\n})\r\n\r\n$: componentInfo = getComponentInfo(\r\n allComponents, instanceProps._component);\r\n\r\nconst onSubComponentGoBack = () => {\r\n editingSubComponentName = null;\r\n editingSubComponentProps = null;\r\n}\r\n\r\nconst onEditComponentProp = (propName, arrayIndex, arrayPropName) => {\r\n editingSubComponentName = isUndefined(arrayIndex)\r\n ? propName\r\n : `${propName}[${arrayIndex}].${arrayPropName}`;\r\n editingSubComponentProps = isUndefined(arrayIndex)\r\n ? instanceProps[propName]\r\n : instanceProps[propName][arrayIndex][arrayPropName];\r\n};\r\n\r\n\r\nconst onSubComponentPropsChanged = (subProps) => {\r\n const newProps = cloneDeep(instanceProps);\r\n newProps[editingSubComponentName] = subProps;\r\n instanceProps = newProps;\r\n onPropsChanged(newProps);\r\n}\r\n\r\n\r\nconst propsChanged = newProps => {\r\n instanceProps = newProps;\r\n onPropsChanged(newProps);\r\n}\r\n\r\n</script>\r\n\r\n<div>\r\n\r\n <div class=\"title\">\r\n <IconButton icon=\"chevron-left\"\r\n on:click={onGoBack}/>\r\n <span>{propertyName}</span>\r\n </div>\r\n\r\n {#if editingSubComponentName}\r\n <div in:slide={{delay: 250, duration: 300}}\r\n out:fade>\r\n <svelte:self onPropsChanged={onSubComponentPropsChanged}\r\n onGoBack={onSubComponentGoBack}\r\n instanceProps={editingSubComponentProps}\r\n propertyName={editingSubComponentName} />\r\n </div>\r\n {:else}\r\n <PropsView {instanceProps}\r\n {componentInfo}\r\n onPropsChanged={propsChanged}\r\n {onEditComponentProp} />\r\n {/if}\r\n \r\n\r\n \r\n\r\n</div>\r\n\r\n<style>\r\n.title {\r\n padding:3px;\r\n background-color: white;\r\n color: var(--secondary100);\r\n border-style:solid;\r\n border-width: 1px 0 0 0;\r\n border-color: var(--lightslate);\r\n}\r\n\r\n.title > span {\r\n margin-left: 10px;\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>",
|
|
"<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>\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\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\nimport {\r\n last\r\n} from \"lodash/fp\";\r\nimport IconButton from \"../common/IconButton.svelte\";\r\nimport ComponentSearch from \"./ComponentSearch.svelte\";\r\nimport Button from \"../common/Button.svelte\";\r\nimport ButtonGroup from \"../common/ButtonGroup.svelte\";\r\nimport UIkit from \"uikit\";\r\nimport {\r\n getComponentInfo\r\n} from \"./pagesParsing/createProps\";\r\nimport { store } from \"../builderStore\";\r\n\r\nconst emptyProps = () => ({_component:\"\"})\r\n\r\nexport let props = emptyProps();\r\nexport let onValueChanged = () => {};\r\nexport let onComponentChosen = () => {};\r\nexport let onEdit = () => {};\r\nexport let label = \"\";\r\nexport let disabled = false;\r\n\r\nconst CHOOSE_COMPONENT = \"choose_component\";\r\nconst CLEAR_COMPONENT = \"clear_component\";\r\n\r\nlet allComponents;\r\nlet modalElement;\r\nlet modalAction;\r\n\r\nstore.subscribe(s => {\r\n allComponents = s.allComponents;\r\n});\r\n\r\n$: componentSelected = props._component.length > 0;\r\n$: shortName = last(props._component.split(\"/\"));\r\n\r\nconst chooseComponent = () => {\r\n modalAction = CHOOSE_COMPONENT;\r\n showDialog();\r\n}\r\n\r\nconst clearComponent = () => {\r\n modalAction = CLEAR_COMPONENT;\r\n showDialog();\r\n}\r\n\r\nconst componentChosen = (component) => {\r\n const componentInfo = getComponentInfo(allComponents, component.name);\r\n props = componentInfo.fullProps;\r\n onValueChanged(props);\r\n onComponentChosen();\r\n hideDialog();\r\n}\r\n\r\nconst hideDialog = () => {\r\n UIkit.modal(modalElement).hide();\r\n}\r\n\r\nconst showDialog = () => {\r\n UIkit.modal(modalElement).show();\r\n}\r\n\r\nconst confirmClearComponent = () => {\r\n props = emptyProps();\r\n onValueChanged(emptyProps());\r\n hideDialog();\r\n}\r\n\r\n</script>\r\n\r\n\r\n<label class=\"uk-form-label\">{label}</label>\r\n<div class=\"root uk-form-controls\">\r\n <div class:selectedname={componentSelected}>\r\n {componentSelected ? shortName : \"(none)\"}\r\n </div>\r\n <div>\r\n {#if !disabled && componentSelected}\r\n <IconButton icon=\"edit\" \r\n on:click={onEdit}/>\r\n\r\n <IconButton icon=\"trash\" \r\n on:click={clearComponent} />\r\n {:else if !disabled && !componentSelected}\r\n <IconButton icon=\"plus\" \r\n on:click={chooseComponent} />\r\n {/if}\r\n \r\n </div>\r\n</div>\r\n\r\n<div bind:this={modalElement} uk-modal>\r\n <div class=\"uk-modal-dialog\">\r\n\r\n {#if modalAction === CHOOSE_COMPONENT}\r\n <div class=\"uk-modal-body\">\r\n <ComponentSearch onComponentChosen={componentChosen} />\r\n </div>\r\n {:else if modalAction === CLEAR_COMPONENT}\r\n <div class=\"uk-modal-body\">\r\n Clear this component ?\r\n </div>\r\n <div class=\"uk-modal-footer\">\r\n <ButtonGroup>\r\n <Button grouped \r\n on:click={hideDialog} \r\n color=\"secondary\" >Cancel</Button>\r\n <Button grouped \r\n on:click={confirmClearComponent}>OK</Button>\r\n </ButtonGroup>\r\n </div>\r\n {/if}\r\n\r\n </div>\r\n\r\n</div>\r\n\r\n<style>\r\n\r\n.root {\r\n display: grid;\r\n grid-template-columns: [name] 1fr [actions] auto;\r\n}\r\n\r\n.root > div:nth-child(1) {\r\n grid-column-start: name;\r\n color: var(--secondary50);\r\n}\r\n\r\n.root > div:nth-child(2) {\r\n grid-column-start: actions;\r\n}\r\n\r\n.selectedname {\r\n font-weight: bold;\r\n color: var(--secondary);\r\n}\r\n\r\n</style>",
|
|
"<script>\r\n\r\nimport Checkbox from \"../common/Checkbox.svelte\";\r\nimport Textbox from \"../common/Textbox.svelte\";\r\nimport Dropdown from \"../common/Dropdown.svelte\";\r\nimport ComponentPropSelector from \"./ComponentPropSelector.svelte\";\r\nimport PropArraySelector from \"./PropArraySelector.svelte\";\r\n\r\nexport let errors = [];\r\nexport let setProp = () => {};\r\nexport let fieldHasError =() => {};\r\nexport let propDef = {};\r\nexport let props = {};\r\nexport let disabled;\r\nexport let index;\r\nexport let onEditComponent = () => {};\r\n\r\n$: isOdd = (index % 2 !== 0);\r\n\r\nconst setComponentProp = (props) => {\r\n setProp(propDef.____name, props);\r\n}\r\n\r\n</script>\r\n\r\n\r\n<div class=\"root\" >\r\n\r\n\r\n {#if propDef.type === \"bool\"}\r\n <Checkbox label={propDef.____name} \r\n checked={props[propDef.____name]} \r\n on:change={ev => setProp(propDef.____name, ev.target.checked)}\r\n hasError={fieldHasError(propDef.____name)} />\r\n {:else if propDef.type === \"options\"}\r\n <Dropdown label={propDef.____name}\r\n selected={props[propDef.____name]} \r\n options={propDef.options}\r\n on:change={ev => setProp(propDef.____name, ev.target.value)}\r\n hasError={fieldHasError(propDef.____name)}/>\r\n {:else if propDef.type === \"component\"}\r\n <ComponentPropSelector label={propDef.____name}\r\n props={props[propDef.____name]}\r\n {disabled}\r\n onEdit={onEditComponent}\r\n onComponentChosen={onEditComponent}\r\n onValueChanged={setComponentProp}/>\r\n {:else if propDef.type === \"array\"}\r\n <PropArraySelector parentProps={props}\r\n {propDef}\r\n onValueChanged={setComponentProp}\r\n onEditComponentProp={onEditComponent}/>\r\n {:else}\r\n <Textbox label={propDef.____name}\r\n text={props[propDef.____name]}\r\n on:change={ev => setProp(propDef.____name, ev.target.value)}\r\n margin={false}\r\n hasError={fieldHasError(propDef.____name)}\r\n {disabled}/>\r\n {/if} \r\n\r\n</div>\r\n\r\n<style>\r\n\r\n.root {\r\n padding: 3px 5px 7px 10px;\r\n border-style: dotted;\r\n border-width: 0 0 1px 0;\r\n border-color: var(--primary25);\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>",
|
|
"<script>\r\nimport IconButton from \"../common/IconButton.svelte\";\r\nimport {\r\n createArrayElementProps\r\n} from \"./pagesParsing/createProps\";\r\nimport PropControl from \"./PropControl.svelte\";\r\nimport {\r\n some,\r\n cloneDeep,\r\n} from \"lodash/fp\";\r\nimport { validateProps } from \"./pagesParsing/validateProps\";\r\n\r\nexport let parentProps;\r\nexport let propDef;\r\nexport let onValueChanged;\r\nexport let onValidate = () => {};\r\nexport let onEditComponentProp = () => {};\r\n\r\nlet value = [];\r\nlet elementDefinitionArray;\r\nlet label = \"\";\r\nlet elementErrors = {};\r\n\r\n$: {\r\n const elArray = [];\r\n for(let elProp in propDef.elementDefinition) {\r\n if(elProp === \"_component\") continue;\r\n elArray.push({\r\n ...propDef.elementDefinition[elProp],\r\n ____name: elProp\r\n });\r\n }\r\n elementDefinitionArray = elArray;\r\n label = propDef.____name;\r\n value = parentProps[propDef.____name];\r\n}\r\n\r\nconst addElement = () => {\r\n const newElement = createArrayElementProps(\r\n propDef.____name, \r\n propDef.elementDefinition).props;\r\n\r\n value = [...value, newElement];\r\n onValueChanged(value);\r\n}\r\n\r\nconst validate = (index, elementProps) => {\r\n elementErrors[index] = validateProps(\r\n propDef.elementDefinition, elementProps, [], true);\r\n onValidate(elementErrors[index]);\r\n return elementErrors[index].length === 0;\r\n}\r\n\r\nconst setProp = (index) => (name, propValue) => {\r\n const newValue = cloneDeep(value);\r\n const newProps = cloneDeep(newValue[index]);\r\n newProps[name] = propValue;\r\n newValue[index] = newProps;\r\n value = newValue;\r\n\r\n if(validate(index, newProps))\r\n onValueChanged(newValue);\r\n \r\n}\r\n\r\nlet fieldHasError = index => propName => \r\n some(e => e.propName === propName)(elementErrors[index]);\r\n\r\nconst onEditComponent = (index, propName) => () => {\r\n onEditComponentProp(index, propName);\r\n}\r\n\r\n</script>\r\n\r\n<div class=\"root\">\r\n <div>\r\n {label}\r\n </div>\r\n\r\n <div class=\"item-container\">\r\n {#each value as item, index}\r\n \r\n <div class=\"item-inner-container\">\r\n {#each elementDefinitionArray as propDef}\r\n <PropControl setProp={setProp(index)}\r\n fieldHasError={fieldHasError(index)}\r\n {propDef}\r\n props={item}\r\n {index}\r\n onEditComponent={onEditComponent(index, propDef.____name)}\r\n disabled={false} />\r\n {/each}\r\n </div>\r\n \r\n {/each}\r\n\r\n <div class=\"addelement-container\"\r\n on:click={addElement}>\r\n <IconButton icon=\"plus\" \r\n size=\"12\"/>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n\r\n<style>\r\n\r\n.addelement-container {\r\n cursor: pointer;\r\n padding: 3px 0px;\r\n text-align: center;\r\n}\r\n\r\n.addelement-container:hover {\r\n background-color: var(--primary25);\r\n}\r\n\r\n\r\n.item-container {\r\n padding-left: 3px;\r\n background: var(--secondary10);\r\n}\r\n\r\n</style>"
|
|
],
|
|
"names": [],
|
|
"mappings": "AAgCC,IAAI,cAAC,CAAC,AACL,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,CACX,WAAW,CAAE,MAA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