commit
b9c42c640b
|
@ -63,7 +63,7 @@
|
|||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@budibase/bbui": "^1.32.0",
|
||||
"@budibase/bbui": "^1.33.0",
|
||||
"@budibase/client": "^0.1.19",
|
||||
"@budibase/colorpicker": "^1.0.1",
|
||||
"@sentry/browser": "5.19.1",
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
<Button secondary small on:click={eventsModal.show}>Define Actions</Button>
|
||||
|
||||
<Modal bind:this={eventsModal} maxWidth="100vw" hideCloseButton>
|
||||
<Modal bind:this={eventsModal} maxWidth="100vw" hideCloseButton padding="0">
|
||||
<EventEditorModal
|
||||
event={value}
|
||||
eventType={name}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script>
|
||||
import { Select, Label } from "@budibase/bbui"
|
||||
import { DataList, Label } from "@budibase/bbui"
|
||||
import { store } from "builderStore"
|
||||
|
||||
export let parameters
|
||||
|
@ -7,12 +7,12 @@
|
|||
|
||||
<div class="root">
|
||||
<Label size="m" color="dark">Screen</Label>
|
||||
<Select secondary bind:value={parameters.url}>
|
||||
<DataList secondary bind:value={parameters.url}>
|
||||
<option value="" />
|
||||
{#each $store.screens as screen}
|
||||
<option value={screen.route}>{screen.props._instanceName}</option>
|
||||
{/each}
|
||||
</Select>
|
||||
</DataList>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
@ -688,9 +688,10 @@
|
|||
lodash "^4.17.13"
|
||||
to-fast-properties "^2.0.0"
|
||||
|
||||
"@budibase/bbui@^1.32.0":
|
||||
version "1.32.0"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.32.0.tgz#4b099e51cf8aebfc963a763bb9687994a2ee26a8"
|
||||
"@budibase/bbui@^1.33.0":
|
||||
version "1.33.0"
|
||||
resolved "https://registry.yarnpkg.com/@budibase/bbui/-/bbui-1.33.0.tgz#216b24dd815f45880e9795e66b04848329b0390f"
|
||||
integrity sha512-Rrt5eLbea014TIfAbT40kP0D0AWNUi8Q0kDr3UZO6Aq4UXgjc0f53ZuJ7Kb66YRDWrqiucjf1FtvOUs3/YaD6g==
|
||||
dependencies:
|
||||
sirv-cli "^0.4.6"
|
||||
svelte-flatpickr "^2.4.0"
|
||||
|
|
|
@ -47,6 +47,7 @@ export const bbFactory = ({
|
|||
setBinding: setBindableComponentProp(treeNode),
|
||||
api,
|
||||
parent,
|
||||
store: store.getStore(treeNode.contextStoreKey),
|
||||
// these parameters are populated by screenRouter
|
||||
routeParams: () => store.getState()["##routeParams"],
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ const contextStoreKey = (dataProviderId, childIndex) =>
|
|||
`${dataProviderId}${childIndex >= 0 ? ":" + childIndex : ""}`
|
||||
|
||||
// creates a store for a datacontext (e.g. each item in a list component)
|
||||
// overrides store if already exists
|
||||
const create = (data, dataProviderId, childIndex, parentContextStoreId) => {
|
||||
const key = contextStoreKey(dataProviderId, childIndex)
|
||||
const state = { data }
|
||||
|
@ -22,14 +23,13 @@ const create = (data, dataProviderId, childIndex, parentContextStoreId) => {
|
|||
? contextStores[parentContextStoreId].state
|
||||
: rootState
|
||||
|
||||
if (!contextStores[key]) {
|
||||
contextStores[key] = {
|
||||
store: writable(state),
|
||||
subscriberCount: 0,
|
||||
state,
|
||||
parentContextStoreId,
|
||||
}
|
||||
}
|
||||
|
||||
return key
|
||||
}
|
||||
|
||||
|
@ -94,6 +94,9 @@ const set = (value, dataProviderId, childIndex) =>
|
|||
const getState = contextStoreKey =>
|
||||
contextStoreKey ? contextStores[contextStoreKey].state : rootState
|
||||
|
||||
const getStore = contextStoreKey =>
|
||||
contextStoreKey ? contextStores[contextStoreKey] : rootStore
|
||||
|
||||
export default {
|
||||
subscribe,
|
||||
update,
|
||||
|
@ -101,4 +104,5 @@ export default {
|
|||
getState,
|
||||
create,
|
||||
contextStoreKey,
|
||||
getStore,
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue