windmill-components 1.79.0 → 1.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ArgInput.svelte +3 -0
- package/components/ArgInput.svelte.d.ts +1 -0
- package/components/DisplayResult.svelte +18 -15
- package/components/SchemaEditor.svelte +15 -10
- package/components/SettingSection.svelte +1 -1
- package/components/Toggle.svelte +5 -2
- package/components/Toggle.svelte.d.ts +1 -0
- package/components/apps/components/buttons/AppButton.svelte +33 -40
- package/components/apps/components/buttons/AppButton.svelte.d.ts +2 -1
- package/components/apps/components/buttons/AppForm.svelte +22 -15
- package/components/apps/components/buttons/AppForm.svelte.d.ts +1 -1
- package/components/apps/components/buttons/AppFormButton.svelte +32 -24
- package/components/apps/components/buttons/AppFormButton.svelte.d.ts +1 -3
- package/components/apps/components/display/AppBarChart.svelte +2 -2
- package/components/apps/components/display/AppBarChart.svelte.d.ts +1 -1
- package/components/apps/components/display/AppDisplayComponent.svelte +2 -2
- package/components/apps/components/display/AppDisplayComponent.svelte.d.ts +1 -1
- package/components/apps/components/display/AppHtml.svelte +10 -2
- package/components/apps/components/display/AppHtml.svelte.d.ts +1 -1
- package/components/apps/components/display/AppIcon.svelte +4 -1
- package/components/apps/components/display/AppIcon.svelte.d.ts +1 -1
- package/components/apps/components/display/AppImage.svelte +28 -15
- package/components/apps/components/display/AppImage.svelte.d.ts +1 -1
- package/components/apps/components/display/AppMap.svelte.d.ts +1 -1
- package/components/apps/components/display/AppPdf.svelte +3 -2
- package/components/apps/components/display/AppPdf.svelte.d.ts +1 -1
- package/components/apps/components/display/AppPieChart.svelte +2 -2
- package/components/apps/components/display/AppPieChart.svelte.d.ts +1 -1
- package/components/apps/components/display/AppScatterChart.svelte +2 -2
- package/components/apps/components/display/AppScatterChart.svelte.d.ts +1 -1
- package/components/apps/components/display/AppText.svelte +35 -22
- package/components/apps/components/display/AppText.svelte.d.ts +1 -1
- package/components/apps/components/display/AppTimeseries.svelte +2 -2
- package/components/apps/components/display/AppTimeseries.svelte.d.ts +1 -1
- package/components/apps/components/display/PlotlyHtml.svelte +2 -2
- package/components/apps/components/display/VegaLiteHtml.svelte +2 -2
- package/components/apps/components/display/table/AppAggridTable.svelte +1 -1
- package/components/apps/components/display/table/AppTable.svelte +28 -12
- package/components/apps/components/display/table/AppTable.svelte.d.ts +1 -1
- package/components/apps/components/helpers/HiddenComponent.svelte +6 -3
- package/components/apps/components/helpers/HiddenComponent.svelte.d.ts +1 -1
- package/components/apps/components/helpers/InputValue.svelte +9 -9
- package/components/apps/components/helpers/Loader.svelte +18 -0
- package/components/apps/components/helpers/Loader.svelte.d.ts +18 -0
- package/components/apps/components/helpers/NonRunnableComponent.svelte +1 -12
- package/components/apps/components/helpers/ResolveConfig.svelte +29 -0
- package/components/apps/components/helpers/ResolveConfig.svelte.d.ts +21 -0
- package/components/apps/components/helpers/RunnableComponent.svelte +114 -89
- package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +13 -3
- package/components/apps/components/helpers/RunnableWrapper.svelte +48 -9
- package/components/apps/components/helpers/RunnableWrapper.svelte.d.ts +26 -2
- package/components/apps/components/inputs/AppCheckbox.svelte +1 -1
- package/components/apps/components/inputs/AppCheckbox.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppDateInput.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppFileInput.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppMultiSelect.svelte +0 -1
- package/components/apps/components/inputs/AppMultiSelect.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppNumberInput.svelte +1 -1
- package/components/apps/components/inputs/AppNumberInput.svelte.d.ts +1 -3
- package/components/apps/components/inputs/AppRangeInput.svelte +7 -1
- package/components/apps/components/inputs/AppRangeInput.svelte.d.ts +2 -1
- package/components/apps/components/inputs/AppSelect.svelte +8 -3
- package/components/apps/components/inputs/AppSelect.svelte.d.ts +1 -1
- package/components/apps/components/inputs/AppSliderInputs.svelte +7 -1
- package/components/apps/components/inputs/AppSliderInputs.svelte.d.ts +2 -1
- package/components/apps/components/inputs/AppTextInput.svelte +4 -4
- package/components/apps/components/inputs/AppTextInput.svelte.d.ts +1 -3
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte +17 -19
- package/components/apps/components/inputs/currency/AppCurrencyInput.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppContainer.svelte +7 -4
- package/components/apps/components/layout/AppContainer.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppDivider.svelte +4 -1
- package/components/apps/components/layout/AppDivider.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppDrawer.svelte +7 -4
- package/components/apps/components/layout/AppDrawer.svelte.d.ts +1 -1
- package/components/apps/components/layout/AppSplitpanes.svelte +34 -21
- package/components/apps/components/layout/AppSplitpanes.svelte.d.ts +1 -3
- package/components/apps/components/layout/AppTabs.svelte +17 -34
- package/components/apps/components/layout/AppTabs.svelte.d.ts +1 -2
- package/components/apps/editor/AppEditor.svelte +3 -1
- package/components/apps/editor/AppEditorHeader.svelte +2 -3
- package/components/apps/editor/AppPreview.svelte +10 -15
- package/components/apps/editor/ComponentHeader.svelte +10 -8
- package/components/apps/editor/ComponentHeader.svelte.d.ts +0 -1
- package/components/apps/editor/GridEditor.svelte +21 -50
- package/components/apps/editor/GridEditor.svelte.d.ts +0 -2
- package/components/apps/editor/RecomputeAllComponents.svelte +13 -2
- package/components/apps/editor/SettingsPanel.svelte +103 -40
- package/components/apps/editor/SubGridEditor.svelte +32 -41
- package/components/apps/editor/SubGridEditor.svelte.d.ts +1 -2
- package/components/apps/editor/appUtils.d.ts +49 -7
- package/components/apps/editor/appUtils.js +133 -37
- package/components/apps/editor/component/Component.svelte +21 -10
- package/components/apps/editor/component/Component.svelte.d.ts +1 -2
- package/components/apps/editor/component/ComponentNavigation.svelte +17 -11
- package/components/apps/editor/component/components.d.ts +1550 -17
- package/components/apps/editor/component/components.js +295 -325
- package/components/apps/editor/component/default-codes.d.ts +1 -1
- package/components/apps/editor/component/default-codes.js +25 -25
- package/components/apps/editor/componentsPanel/ComponentList.svelte +18 -3
- package/components/apps/editor/componentsPanel/CssProperty.svelte +5 -3
- package/components/apps/editor/componentsPanel/CssProperty.svelte.d.ts +3 -1
- package/components/apps/editor/componentsPanel/CssSettings.svelte +48 -90
- package/components/apps/editor/componentsPanel/ListItem.svelte +3 -0
- package/components/apps/editor/componentsPanel/ListItem.svelte.d.ts +2 -0
- package/components/apps/editor/inlineScriptsPanel/EmptyInlineScript.svelte +1 -1
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +146 -130
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte.d.ts +2 -1
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte +31 -3
- package/components/apps/editor/inlineScriptsPanel/InlineScriptEditorPanel.svelte.d.ts +1 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanel.svelte +42 -76
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte +67 -17
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelList.svelte.d.ts +1 -3
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte +27 -0
- package/components/apps/editor/inlineScriptsPanel/InlineScriptsPanelWithTable.svelte.d.ts +17 -0
- package/components/apps/editor/inlineScriptsPanel/utils.d.ts +2 -0
- package/components/apps/editor/inlineScriptsPanel/utils.js +6 -5
- package/components/apps/editor/settingsPanel/AlignmentEditor.svelte +10 -2
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte +37 -31
- package/components/apps/editor/settingsPanel/ArrayStaticInputEditor.svelte.d.ts +4 -104
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte +90 -54
- package/components/apps/editor/settingsPanel/ComponentPanel.svelte.d.ts +5 -3
- package/components/apps/editor/settingsPanel/GridTab.svelte +0 -1
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte +99 -80
- package/components/apps/editor/settingsPanel/InputsSpecEditor.svelte.d.ts +8 -0
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte +25 -2
- package/components/apps/editor/settingsPanel/InputsSpecsEditor.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte +52 -0
- package/components/apps/editor/settingsPanel/OneOfInputSpecsEditor.svelte.d.ts +28 -0
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte +70 -26
- package/components/apps/editor/settingsPanel/SelectedRunnable.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte +7 -5
- package/components/apps/editor/settingsPanel/SubTypeEditor.svelte.d.ts +3 -2
- package/components/apps/editor/settingsPanel/TableActions.svelte +8 -63
- package/components/apps/editor/settingsPanel/inputEditor/ColorInput.svelte.d.ts +2 -4
- package/components/apps/editor/settingsPanel/inputEditor/ConnectedInputEditor.svelte +3 -1
- package/components/apps/editor/settingsPanel/inputEditor/IconSelectInput.svelte.d.ts +2 -4
- package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte +5 -5
- package/components/apps/editor/settingsPanel/inputEditor/RunnableInputEditor.svelte.d.ts +2 -0
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte +47 -31
- package/components/apps/editor/settingsPanel/inputEditor/StaticInputEditor.svelte.d.ts +8 -2
- package/components/apps/editor/settingsPanel/inputEditor/TabSelectInput.svelte +46 -0
- package/components/apps/editor/settingsPanel/inputEditor/TabSelectInput.svelte.d.ts +20 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +7 -0
- package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte +20 -70
- package/components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte.d.ts +1 -0
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte +14 -8
- package/components/apps/editor/settingsPanel/triggerLists/ComponentTriggerList.svelte.d.ts +5 -1
- package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte +85 -27
- package/components/apps/editor/settingsPanel/triggerLists/TriggerBadgesList.svelte.d.ts +4 -6
- package/components/apps/gridUtils.js +1 -1
- package/components/apps/inputType.d.ts +12 -16
- package/components/apps/rx.d.ts +2 -0
- package/components/apps/rx.js +8 -2
- package/components/apps/svelte-grid/Grid.svelte +0 -4
- package/components/apps/svelte-grid/Grid.svelte.d.ts +1 -1
- package/components/apps/svelte-grid/MoveResize.svelte +24 -30
- package/components/apps/svelte-grid/MoveResize.svelte.d.ts +0 -4
- package/components/apps/svelte-grid/types.d.ts +1 -7
- package/components/apps/svelte-grid/utils/helper.js +6 -10
- package/components/apps/types.d.ts +21 -22
- package/components/apps/utils.d.ts +2 -2
- package/components/apps/utils.js +13 -11
- package/components/common/skeleton/Skeleton.svelte +1 -1
- package/components/flows/flowStateUtils.js +8 -1
- package/package.json +7 -4
- package/components/apps/editor/GridPanel.svelte +0 -31
- package/components/apps/editor/GridPanel.svelte.d.ts +0 -18
- package/components/apps/editor/componentsPanel/componentStaticValues.d.ts +0 -12
- package/components/apps/editor/componentsPanel/componentStaticValues.js +0 -25
package/components/apps/editor/settingsPanel/triggerLists/BackgroundScriptTriggerList.svelte
CHANGED
|
@@ -1,81 +1,31 @@
|
|
|
1
|
-
<script>import
|
|
2
|
-
import
|
|
3
|
-
import { getContext } from 'svelte';
|
|
1
|
+
<script>import Toggle from '../../../../Toggle.svelte';
|
|
2
|
+
import Tooltip from '../../../../Tooltip.svelte';
|
|
4
3
|
import TriggerBadgesList from './TriggerBadgesList.svelte';
|
|
5
4
|
import { getDependencies } from './triggerListUtils';
|
|
6
5
|
export let fields;
|
|
7
6
|
export let autoRefresh = false;
|
|
8
7
|
export let id;
|
|
9
8
|
export let inlineScript;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function applyConnection() {
|
|
13
|
-
if (!$connectingInput.opened && $connectingInput.input !== undefined && addingDependency) {
|
|
14
|
-
if ($connectingInput.input.connection) {
|
|
15
|
-
const x = {
|
|
16
|
-
id: $connectingInput.input.connection.componentId,
|
|
17
|
-
key: $connectingInput.input.connection.path
|
|
18
|
-
};
|
|
19
|
-
if (!inlineScript) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
if (inlineScript.refreshOn?.find((y) => y.id === x.id && y.key === x.key)) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
if (!inlineScript.refreshOn) {
|
|
26
|
-
inlineScript.refreshOn = [x];
|
|
27
|
-
}
|
|
28
|
-
else {
|
|
29
|
-
inlineScript.refreshOn.push(x);
|
|
30
|
-
}
|
|
31
|
-
inlineScript = JSON.parse(JSON.stringify(inlineScript));
|
|
32
|
-
addingDependency = false;
|
|
33
|
-
}
|
|
34
|
-
$connectingInput = {
|
|
35
|
-
opened: false,
|
|
36
|
-
input: undefined,
|
|
37
|
-
hoveredComponent: undefined
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
$: $connectingInput && applyConnection();
|
|
9
|
+
export let doNotRecomputeOnInputChanged = false;
|
|
10
|
+
$: dependencies = getDependencies(fields);
|
|
42
11
|
</script>
|
|
43
12
|
|
|
13
|
+
{#if inlineScript.language !== 'frontend'}
|
|
14
|
+
<div class="flex items-center px-1">
|
|
15
|
+
<Toggle
|
|
16
|
+
size="xs"
|
|
17
|
+
color="red"
|
|
18
|
+
bind:checked={doNotRecomputeOnInputChanged}
|
|
19
|
+
options={{ right: 'do NOT recompute on input changes' }}
|
|
20
|
+
/>
|
|
21
|
+
<Tooltip>If not toggled, whenever an input is changed, the script will be re-run.</Tooltip>
|
|
22
|
+
</div>
|
|
23
|
+
{/if}
|
|
24
|
+
|
|
44
25
|
<TriggerBadgesList
|
|
26
|
+
bind:inlineScript
|
|
45
27
|
{id}
|
|
46
|
-
inputDependencies={
|
|
47
|
-
frontendDependencies={inlineScript?.language === 'frontend'
|
|
48
|
-
? inlineScript?.refreshOn?.map((x) => `${x.id} - ${x.key}`) ?? undefined
|
|
49
|
-
: undefined}
|
|
28
|
+
inputDependencies={dependencies}
|
|
50
29
|
onLoad={autoRefresh}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if (inlineScript) {
|
|
54
|
-
inlineScript.refreshOn?.splice(index, 1)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
inlineScript = JSON.parse(JSON.stringify(inlineScript))
|
|
58
|
-
}}
|
|
59
|
-
>
|
|
60
|
-
{#if inlineScript?.language === 'frontend'}
|
|
61
|
-
<Button
|
|
62
|
-
variant="border"
|
|
63
|
-
size="xs"
|
|
64
|
-
color="light"
|
|
65
|
-
btnClasses="!px-1 !py-0.5"
|
|
66
|
-
on:click={() => {
|
|
67
|
-
addingDependency = true
|
|
68
|
-
$connectingInput = {
|
|
69
|
-
opened: true,
|
|
70
|
-
input: undefined,
|
|
71
|
-
hoveredComponent: undefined
|
|
72
|
-
}
|
|
73
|
-
}}
|
|
74
|
-
>
|
|
75
|
-
<div class="flex flex-row gap-1 items-center">
|
|
76
|
-
Add dependency
|
|
77
|
-
<Plus size={14} />
|
|
78
|
-
</div>
|
|
79
|
-
</Button>
|
|
80
|
-
{/if}
|
|
81
|
-
</TriggerBadgesList>
|
|
30
|
+
{doNotRecomputeOnInputChanged}
|
|
31
|
+
/>
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
<script>import { getContext } from 'svelte';
|
|
2
|
-
import { findGridItem } from '../../appUtils';
|
|
3
2
|
import TriggerBadgesList from './TriggerBadgesList.svelte';
|
|
4
3
|
import { getDependencies } from './triggerListUtils';
|
|
5
|
-
const { selectedComponent
|
|
4
|
+
const { selectedComponent } = getContext('AppViewerContext');
|
|
6
5
|
export let fields;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
export let appComponent;
|
|
7
|
+
export let runnable;
|
|
8
|
+
export let doNotRecomputeOnInputChanged = false;
|
|
9
|
+
const onClick = ['buttoncomponent', 'formbuttoncomponent', 'formcomponent'].includes(appComponent.type);
|
|
10
|
+
$: onLoad =
|
|
11
|
+
!onClick ||
|
|
12
|
+
(appComponent?.configuration?.triggerOnAppLoad != undefined &&
|
|
13
|
+
appComponent.configuration.triggerOnAppLoad.type == 'static' &&
|
|
14
|
+
appComponent.configuration.triggerOnAppLoad.value);
|
|
11
15
|
</script>
|
|
12
16
|
|
|
13
17
|
<TriggerBadgesList
|
|
14
|
-
inputDependencies={getDependencies(fields)}
|
|
15
|
-
|
|
18
|
+
inputDependencies={onClick ? [] : getDependencies(fields)}
|
|
19
|
+
bind:inlineScript={runnable.inlineScript}
|
|
20
|
+
{onLoad}
|
|
21
|
+
{doNotRecomputeOnInputChanged}
|
|
16
22
|
id={$selectedComponent}
|
|
17
23
|
{onClick}
|
|
18
24
|
/>
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
-
import type { ConnectedAppInput, RowAppInput, StaticAppInput, UserAppInput } from '../../../inputType';
|
|
2
|
+
import type { ConnectedAppInput, RowAppInput, RunnableByName, StaticAppInput, UserAppInput } from '../../../inputType';
|
|
3
|
+
import type { AppComponent } from '../../component';
|
|
3
4
|
declare const __propDef: {
|
|
4
5
|
props: {
|
|
5
6
|
fields: Record<string, StaticAppInput | ConnectedAppInput | RowAppInput | UserAppInput>;
|
|
7
|
+
appComponent: AppComponent;
|
|
8
|
+
runnable: RunnableByName;
|
|
9
|
+
doNotRecomputeOnInputChanged?: boolean | undefined;
|
|
6
10
|
};
|
|
7
11
|
events: {
|
|
8
12
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
<script>import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
<script>import { Button } from '../../../../common';
|
|
2
|
+
import { classNames } from '../../../../../utils';
|
|
3
|
+
import { Plus, X } from 'lucide-svelte';
|
|
4
|
+
import { getContext } from 'svelte';
|
|
4
5
|
import { getAllRecomputeIdsForComponent } from '../../appUtils';
|
|
5
6
|
export let inputDependencies = [];
|
|
6
|
-
export let
|
|
7
|
+
export let inlineScript;
|
|
7
8
|
export let onClick = false;
|
|
8
9
|
export let onLoad = false;
|
|
9
10
|
export let id = undefined;
|
|
11
|
+
export let doNotRecomputeOnInputChanged = false;
|
|
10
12
|
const colors = {
|
|
11
13
|
red: 'text-red-800 border-red-600 bg-red-100',
|
|
12
14
|
green: 'text-green-800 border-green-600 bg-green-100',
|
|
@@ -14,17 +16,52 @@ const colors = {
|
|
|
14
16
|
blue: 'text-blue-800 border-blue-600 bg-blue-100'
|
|
15
17
|
};
|
|
16
18
|
let badgeClass = 'inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium border';
|
|
17
|
-
const
|
|
18
|
-
const {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
19
|
+
const { app, worldStore } = getContext('AppViewerContext');
|
|
20
|
+
const { connectingInput } = getContext('AppViewerContext');
|
|
21
|
+
let addingDependency = false;
|
|
22
|
+
function applyConnection() {
|
|
23
|
+
if (!$connectingInput.opened && $connectingInput.input !== undefined && addingDependency) {
|
|
24
|
+
if ($connectingInput.input.connection) {
|
|
25
|
+
const x = {
|
|
26
|
+
id: $connectingInput.input.connection.componentId,
|
|
27
|
+
key: $connectingInput.input.connection.path
|
|
28
|
+
};
|
|
29
|
+
if (!inlineScript) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (inlineScript.refreshOn?.find((y) => y.id === x.id && y.key === x.key)) {
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
if (!inlineScript.refreshOn) {
|
|
36
|
+
inlineScript.refreshOn = [x];
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
inlineScript.refreshOn.push(x);
|
|
40
|
+
}
|
|
41
|
+
inlineScript = JSON.parse(JSON.stringify(inlineScript));
|
|
42
|
+
addingDependency = false;
|
|
43
|
+
}
|
|
44
|
+
$connectingInput = {
|
|
45
|
+
opened: false,
|
|
46
|
+
input: undefined,
|
|
47
|
+
hoveredComponent: undefined
|
|
48
|
+
};
|
|
49
|
+
$app = $app;
|
|
50
|
+
$worldStore = $worldStore;
|
|
26
51
|
}
|
|
27
52
|
}
|
|
53
|
+
$: frontendDependencies =
|
|
54
|
+
inlineScript?.language === 'frontend'
|
|
55
|
+
? inlineScript?.refreshOn?.map((x) => `${x.id} - ${x.key}`) ?? []
|
|
56
|
+
: undefined;
|
|
57
|
+
$: $connectingInput && applyConnection();
|
|
58
|
+
$: recomputedBadges = getAllRecomputeIdsForComponent($app, id);
|
|
59
|
+
function deleteDep(index) {
|
|
60
|
+
if (inlineScript) {
|
|
61
|
+
inlineScript.refreshOn?.splice(index, 1);
|
|
62
|
+
}
|
|
63
|
+
inlineScript = inlineScript;
|
|
64
|
+
}
|
|
28
65
|
</script>
|
|
29
66
|
|
|
30
67
|
<div class="flex w-full flex-col items-start gap-2 mt-2 mb-1">
|
|
@@ -33,28 +70,29 @@ $: if ($app && $selectedComponent && id) {
|
|
|
33
70
|
This script has no triggers. It will never run.
|
|
34
71
|
</p>
|
|
35
72
|
{:else}
|
|
36
|
-
<div class="text-sm font-semibold text-
|
|
73
|
+
<div class="text-sm font-semibold text-gray-800 ">Triggered by</div>
|
|
37
74
|
|
|
38
75
|
{#if onLoad || onClick}
|
|
39
76
|
<div class="w-full">
|
|
40
|
-
<div class="text-xs font-semibold text-slate-800 mb-1">
|
|
77
|
+
<div class="text-xs font-semibold text-slate-800 mb-1">Events</div>
|
|
41
78
|
<div class="flex flex-row gap-2 flex-wrap">
|
|
42
79
|
{#if onLoad}
|
|
43
|
-
<span class={classNames(badgeClass, colors['green'])}>
|
|
80
|
+
<span class={classNames(badgeClass, colors['green'])}>Start</span>
|
|
81
|
+
<span class={classNames(badgeClass, colors['green'])}>Refresh</span>
|
|
44
82
|
{/if}
|
|
45
83
|
{#if onClick}
|
|
46
|
-
<span class={classNames(badgeClass, colors['green'])}>
|
|
84
|
+
<span class={classNames(badgeClass, colors['green'])}>Click</span>
|
|
47
85
|
{/if}
|
|
48
86
|
</div>
|
|
49
87
|
</div>
|
|
50
88
|
{/if}
|
|
51
|
-
{#if inputDependencies.length > 0}
|
|
89
|
+
{#if inputDependencies.length > 0 && !doNotRecomputeOnInputChanged}
|
|
52
90
|
<div class="w-full">
|
|
53
|
-
<div class="flex justify-between items-center mb-
|
|
54
|
-
<div class="text-xs font-semibold text-slate-800
|
|
91
|
+
<div class="flex justify-between items-center mb-1">
|
|
92
|
+
<div class="text-xs font-semibold text-slate-800">Change on values</div>
|
|
55
93
|
</div>
|
|
56
94
|
<div class="flex flex-row gap-2 flex-wrap">
|
|
57
|
-
{#each inputDependencies as label
|
|
95
|
+
{#each inputDependencies as label}
|
|
58
96
|
<span class={classNames(badgeClass, colors['blue'])}>
|
|
59
97
|
{label}
|
|
60
98
|
</span>
|
|
@@ -65,7 +103,7 @@ $: if ($app && $selectedComponent && id) {
|
|
|
65
103
|
|
|
66
104
|
{#if recomputedBadges?.length > 0}
|
|
67
105
|
<div class="w-full">
|
|
68
|
-
<div class="text-xs font-semibold text-slate-800 mb-1">
|
|
106
|
+
<div class="text-xs font-semibold text-slate-800 mb-1">Computation of</div>
|
|
69
107
|
<div class="flex flex-row gap-2 flex-wrap">
|
|
70
108
|
{#each recomputedBadges as badge}
|
|
71
109
|
<span class={classNames(badgeClass, colors['indigo'])}>{badge}</span>
|
|
@@ -74,18 +112,38 @@ $: if ($app && $selectedComponent && id) {
|
|
|
74
112
|
</div>
|
|
75
113
|
{/if}
|
|
76
114
|
{/if}
|
|
77
|
-
{#if frontendDependencies}
|
|
115
|
+
{#if frontendDependencies && !doNotRecomputeOnInputChanged}
|
|
78
116
|
<div class="w-full">
|
|
79
|
-
<div class="flex justify-between items-center
|
|
80
|
-
<div class="text-xs font-semibold text-slate-800 mb-1">
|
|
81
|
-
|
|
117
|
+
<div class="flex justify-between items-center">
|
|
118
|
+
<div class="text-xs font-semibold text-slate-800 mb-1">Change on values</div>
|
|
119
|
+
{#if inlineScript?.language === 'frontend'}
|
|
120
|
+
<Button
|
|
121
|
+
variant="border"
|
|
122
|
+
size="xs"
|
|
123
|
+
color="light"
|
|
124
|
+
btnClasses="!px-1 !py-0.5"
|
|
125
|
+
on:click={() => {
|
|
126
|
+
addingDependency = true
|
|
127
|
+
$connectingInput = {
|
|
128
|
+
opened: true,
|
|
129
|
+
input: undefined,
|
|
130
|
+
hoveredComponent: undefined
|
|
131
|
+
}
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
<div class="flex flex-row gap-1 items-center">
|
|
135
|
+
Add dependency
|
|
136
|
+
<Plus size={14} />
|
|
137
|
+
</div>
|
|
138
|
+
</Button>
|
|
139
|
+
{/if}
|
|
82
140
|
</div>
|
|
83
141
|
<div class="flex flex-row gap-2 flex-wrap">
|
|
84
142
|
{#each frontendDependencies as label, index}
|
|
85
143
|
<span class={classNames(badgeClass, colors['red'])}>
|
|
86
144
|
{label}
|
|
87
145
|
<button
|
|
88
|
-
on:click={() =>
|
|
146
|
+
on:click={() => deleteDep(index)}
|
|
89
147
|
class="bg-red-300 cursor-pointer hover:bg-red-400 ml-1 rounded-md"
|
|
90
148
|
>
|
|
91
149
|
<X size={18} class="p-0.5" />
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { InlineScript } from '../../../types';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
inputDependencies?: string[] | undefined;
|
|
5
|
-
|
|
6
|
+
inlineScript: InlineScript | undefined;
|
|
6
7
|
onClick?: boolean | undefined;
|
|
7
8
|
onLoad?: boolean | undefined;
|
|
8
9
|
id?: string | undefined;
|
|
10
|
+
doNotRecomputeOnInputChanged?: boolean | undefined;
|
|
9
11
|
};
|
|
10
12
|
events: {
|
|
11
|
-
delete: CustomEvent<any>;
|
|
12
|
-
} & {
|
|
13
13
|
[evt: string]: CustomEvent<any>;
|
|
14
14
|
};
|
|
15
|
-
slots: {
|
|
16
|
-
default: {};
|
|
17
|
-
};
|
|
15
|
+
slots: {};
|
|
18
16
|
};
|
|
19
17
|
export type TriggerBadgesListProps = typeof __propDef.props;
|
|
20
18
|
export type TriggerBadgesListEvents = typeof __propDef.events;
|
|
@@ -10,7 +10,7 @@ const columnConfiguration = [
|
|
|
10
10
|
];
|
|
11
11
|
const gridColumns = columnConfiguration.map((value) => value[1]);
|
|
12
12
|
function toggleFixed(component) {
|
|
13
|
-
const nValue = !component[gridColumns[0]]
|
|
13
|
+
const nValue = !(component[gridColumns[0]]?.fixed ?? false);
|
|
14
14
|
gridColumns.forEach((column) => {
|
|
15
15
|
component[column].fixed = nValue;
|
|
16
16
|
});
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ReadFileAs } from '../common/fileInput/model';
|
|
2
|
-
import type { staticValues } from './editor/componentsPanel/componentStaticValues';
|
|
3
2
|
import type { InlineScript } from './types';
|
|
4
|
-
export type InputType = 'text' | 'textarea' | 'template' | 'number' | 'boolean' | 'select' | 'icon-select' | 'color' | 'date' | 'time' | 'datetime' | 'object' | 'array' | 'any' | 'labeledresource';
|
|
3
|
+
export type InputType = 'text' | 'textarea' | 'template' | 'number' | 'boolean' | 'select' | 'icon-select' | 'color' | 'date' | 'time' | 'datetime' | 'object' | 'array' | 'any' | 'labeledresource' | 'tab-select';
|
|
5
4
|
export type InputConnection = {
|
|
6
5
|
componentId: string;
|
|
7
6
|
path: string;
|
|
@@ -40,7 +39,7 @@ export type RunnableByPath = {
|
|
|
40
39
|
runType: 'script' | 'flow' | 'hubscript';
|
|
41
40
|
type: 'runnableByPath';
|
|
42
41
|
};
|
|
43
|
-
type RunnableByName = {
|
|
42
|
+
export type RunnableByName = {
|
|
44
43
|
name: string;
|
|
45
44
|
inlineScript: InlineScript | undefined;
|
|
46
45
|
type: 'runnableByName';
|
|
@@ -48,9 +47,13 @@ type RunnableByName = {
|
|
|
48
47
|
export type Runnable = RunnableByPath | RunnableByName | undefined;
|
|
49
48
|
export type ResultInput = {
|
|
50
49
|
runnable: Runnable;
|
|
50
|
+
transformer?: InlineScript & {
|
|
51
|
+
language: 'frontend';
|
|
52
|
+
};
|
|
51
53
|
fields: Record<string, StaticAppInput | ConnectedAppInput | RowAppInput | UserAppInput>;
|
|
52
54
|
type: 'runnable';
|
|
53
55
|
value?: any;
|
|
56
|
+
doNotRecomputeOnInputChanged?: boolean;
|
|
54
57
|
};
|
|
55
58
|
type AppInputSpec<T extends InputType, U, V extends InputType = never> = (StaticInput<U> | ConnectedInput | UserInput<U> | RowInput | EvalInput | UploadInput | ResultInput | TemplateInput) & InputConfiguration<T, V>;
|
|
56
59
|
type InputConfiguration<T extends InputType, V extends InputType> = {
|
|
@@ -72,20 +75,13 @@ type InputConfiguration<T extends InputType, V extends InputType> = {
|
|
|
72
75
|
convertTo?: ReadFileAs;
|
|
73
76
|
};
|
|
74
77
|
};
|
|
75
|
-
type StaticOptions = {
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
export type StaticOptions = {
|
|
79
|
+
selectOptions: readonly string[] | readonly {
|
|
80
|
+
value: string;
|
|
81
|
+
label: string;
|
|
82
|
+
}[];
|
|
80
83
|
};
|
|
81
|
-
export type AppInput = AppInputSpec<'text', string> | AppInputSpec<'textarea', string> | AppInputSpec<'template', string> | AppInputSpec<'number', number> | AppInputSpec<'boolean', boolean> | AppInputSpec<'date', string> | AppInputSpec<'time', string> | AppInputSpec<'datetime', string> | AppInputSpec<'any', any> | AppInputSpec<'object', Record<string | number, any>> | AppInputSpec<'object', string> | (AppInputSpec<'select', string> &
|
|
82
|
-
/**
|
|
83
|
-
* One of the keys of `staticValues` from `lib/components/apps/editor/componentsPanel/componentStaticValues`
|
|
84
|
-
*/
|
|
85
|
-
optionValuesKey: keyof typeof staticValues;
|
|
86
|
-
}) | (AppInputSpec<'select', string> & StaticOptions) | AppInputSpec<'icon-select', string> | AppInputSpec<'color', string> | AppInputSpec<'array', string[], 'text'> | AppInputSpec<'array', string[], 'textarea'> | AppInputSpec<'array', number[], 'number'> | AppInputSpec<'array', boolean[], 'boolean'> | AppInputSpec<'array', string[], 'date'> | AppInputSpec<'array', string[], 'time'> | AppInputSpec<'array', string[], 'datetime'> | AppInputSpec<'array', object[], 'object'> | (AppInputSpec<'array', string[], 'select'> & {
|
|
87
|
-
optionValuesKey: keyof typeof staticValues;
|
|
88
|
-
}) | (AppInputSpec<'array', string[], 'select'> & StaticOptions) | AppInputSpec<'array', object[], 'labeledresource'> | AppInputSpec<'labeledresource', object>;
|
|
84
|
+
export type AppInput = AppInputSpec<'text', string> | AppInputSpec<'textarea', string> | AppInputSpec<'template', string> | AppInputSpec<'number', number> | AppInputSpec<'boolean', boolean> | AppInputSpec<'date', string> | AppInputSpec<'time', string> | AppInputSpec<'datetime', string> | AppInputSpec<'any', any> | AppInputSpec<'object', Record<string | number, any>> | AppInputSpec<'object', string> | (AppInputSpec<'select', string> & StaticOptions) | AppInputSpec<'icon-select', string> | AppInputSpec<'color', string> | AppInputSpec<'array', string[], 'text'> | AppInputSpec<'array', string[], 'textarea'> | AppInputSpec<'array', number[], 'number'> | AppInputSpec<'array', boolean[], 'boolean'> | AppInputSpec<'array', string[], 'date'> | AppInputSpec<'array', string[], 'time'> | AppInputSpec<'array', string[], 'datetime'> | AppInputSpec<'array', object[], 'object'> | (AppInputSpec<'array', string[], 'select'> & StaticOptions) | AppInputSpec<'array', object[], 'labeledresource'> | AppInputSpec<'labeledresource', object> | AppInputSpec<'array', object[], 'tab-select'>;
|
|
89
85
|
export type RowAppInput = Extract<AppInput, {
|
|
90
86
|
type: 'row';
|
|
91
87
|
}>;
|
package/components/apps/rx.d.ts
CHANGED
|
@@ -19,6 +19,8 @@ export type World = {
|
|
|
19
19
|
connect: <T>(inputSpec: AppInput, next: (x: T) => void, id?: string) => Input<T>;
|
|
20
20
|
stateId: Writable<number>;
|
|
21
21
|
newOutput: <T>(id: string, name: string, previousValue: T) => Output<T>;
|
|
22
|
+
initializedOutputs: number;
|
|
23
|
+
initialized: boolean;
|
|
22
24
|
};
|
|
23
25
|
export declare function buildWorld(context: Record<string, any>): Writable<World>;
|
|
24
26
|
export declare function buildObservableWorld(): {
|
package/components/apps/rx.js
CHANGED
|
@@ -24,7 +24,14 @@ export function buildWorld(context) {
|
|
|
24
24
|
return o;
|
|
25
25
|
}
|
|
26
26
|
stateId.update((x) => x + 1);
|
|
27
|
-
writableWorld = writable({
|
|
27
|
+
writableWorld = writable({
|
|
28
|
+
outputsById,
|
|
29
|
+
connect: newWorld.connect,
|
|
30
|
+
stateId,
|
|
31
|
+
newOutput,
|
|
32
|
+
initializedOutputs: 0,
|
|
33
|
+
initialized: false
|
|
34
|
+
});
|
|
28
35
|
return writableWorld;
|
|
29
36
|
}
|
|
30
37
|
export function buildObservableWorld() {
|
|
@@ -47,7 +54,6 @@ export function buildObservableWorld() {
|
|
|
47
54
|
};
|
|
48
55
|
}
|
|
49
56
|
const { componentId, path } = connection;
|
|
50
|
-
console.log('connection', connection);
|
|
51
57
|
const input = cachedInput(next, `${componentId}-${path}-${id}`);
|
|
52
58
|
const [p] = path ? path.split('.')[0].split('[') : [undefined];
|
|
53
59
|
let obs = observables[`${componentId}.${p}`];
|
|
@@ -125,8 +125,6 @@ const handleRepaint = ({ detail }) => {
|
|
|
125
125
|
on:pointerup={pointerup}
|
|
126
126
|
onTop={item.id == onTopId}
|
|
127
127
|
id={item.id}
|
|
128
|
-
resizable={item[getComputedCols] && item[getComputedCols].resizable}
|
|
129
|
-
draggable={item[getComputedCols] && item[getComputedCols].draggable}
|
|
130
128
|
{xPerPx}
|
|
131
129
|
{yPerPx}
|
|
132
130
|
width={Math.min(getComputedCols, item[getComputedCols] && item[getComputedCols].w) *
|
|
@@ -136,8 +134,6 @@ const handleRepaint = ({ detail }) => {
|
|
|
136
134
|
top={(item[getComputedCols] && item[getComputedCols].y) * yPerPx + gapY}
|
|
137
135
|
left={(item[getComputedCols] && item[getComputedCols].x) * xPerPx + gapX}
|
|
138
136
|
item={item[getComputedCols]}
|
|
139
|
-
min={item[getComputedCols] && item[getComputedCols].min}
|
|
140
|
-
max={item[getComputedCols] && item[getComputedCols].max}
|
|
141
137
|
cols={getComputedCols}
|
|
142
138
|
{gapX}
|
|
143
139
|
{gapY}
|
|
@@ -11,7 +11,7 @@ declare class __sveltets_Render<T> {
|
|
|
11
11
|
throttleResize?: number | undefined;
|
|
12
12
|
onTopId?: string | undefined;
|
|
13
13
|
containerWidth?: number | undefined;
|
|
14
|
-
scroller?: undefined;
|
|
14
|
+
scroller?: HTMLElement | undefined;
|
|
15
15
|
sensor?: number | undefined;
|
|
16
16
|
parentWidth?: number | undefined;
|
|
17
17
|
};
|
|
@@ -5,8 +5,6 @@ export let width;
|
|
|
5
5
|
export let height;
|
|
6
6
|
export let left;
|
|
7
7
|
export let top;
|
|
8
|
-
export let resizable;
|
|
9
|
-
export let draggable;
|
|
10
8
|
export let id;
|
|
11
9
|
export let container;
|
|
12
10
|
export let xPerPx;
|
|
@@ -14,8 +12,6 @@ export let yPerPx;
|
|
|
14
12
|
export let gapX;
|
|
15
13
|
export let gapY;
|
|
16
14
|
export let item;
|
|
17
|
-
export let max;
|
|
18
|
-
export let min;
|
|
19
15
|
export let cols;
|
|
20
16
|
export let nativeContainer;
|
|
21
17
|
export let onTop;
|
|
@@ -112,19 +108,23 @@ function computeRect(target) {
|
|
|
112
108
|
rect = irect;
|
|
113
109
|
}
|
|
114
110
|
}
|
|
111
|
+
let dragClosure = undefined;
|
|
115
112
|
const pointerdown = ({ clientX, clientY, target }) => {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
113
|
+
dragClosure = () => {
|
|
114
|
+
dragClosure = undefined;
|
|
115
|
+
initX = clientX;
|
|
116
|
+
initY = clientY;
|
|
117
|
+
capturePos = { x: left, y: top };
|
|
118
|
+
shadow = { x: item.x, y: item.y, w: item.w, h: item.h };
|
|
119
|
+
newSize = { width, height };
|
|
120
|
+
containerFrame = getContainerFrame(container);
|
|
121
|
+
scrollElement = getScroller(container);
|
|
122
|
+
cordDiff = { x: 0, y: 0 };
|
|
123
|
+
active = true;
|
|
124
|
+
trans = false;
|
|
125
|
+
computeRect(target);
|
|
126
|
+
_scrollTop = scrollElement.scrollTop;
|
|
127
|
+
};
|
|
128
128
|
window.addEventListener('pointermove', pointermove);
|
|
129
129
|
window.addEventListener('pointerup', pointerup);
|
|
130
130
|
};
|
|
@@ -146,13 +146,11 @@ const update = () => {
|
|
|
146
146
|
if (shadow) {
|
|
147
147
|
shadow.x = Math.max(Math.min(gridX, cols - shadow.w), 0);
|
|
148
148
|
shadow.y = Math.max(gridY, 0);
|
|
149
|
-
if (max.y) {
|
|
150
|
-
shadow.y = Math.min(shadow.y, max.y);
|
|
151
|
-
}
|
|
152
149
|
}
|
|
153
150
|
repaint(undefined, false);
|
|
154
151
|
};
|
|
155
152
|
const pointermove = (event) => {
|
|
153
|
+
dragClosure && dragClosure();
|
|
156
154
|
event.preventDefault();
|
|
157
155
|
event.stopPropagation();
|
|
158
156
|
event.stopImmediatePropagation();
|
|
@@ -183,6 +181,7 @@ const pointermove = (event) => {
|
|
|
183
181
|
}
|
|
184
182
|
};
|
|
185
183
|
const pointerup = (e) => {
|
|
184
|
+
dragClosure = undefined;
|
|
186
185
|
stopAutoscroll();
|
|
187
186
|
window.removeEventListener('pointerdown', pointerdown);
|
|
188
187
|
window.removeEventListener('pointermove', pointermove);
|
|
@@ -214,13 +213,9 @@ const resizePointerMove = ({ pageX, pageY }) => {
|
|
|
214
213
|
newSize.height = initSize.height + pageY - resizeInitPos.y;
|
|
215
214
|
// Get max col number
|
|
216
215
|
let maxWidth = cols - shadow.x;
|
|
217
|
-
maxWidth =
|
|
216
|
+
maxWidth = maxWidth;
|
|
218
217
|
// Limit bound
|
|
219
|
-
newSize.width = Math.
|
|
220
|
-
newSize.height = Math.max(newSize.height, min.h * yPerPx - gapY * 2);
|
|
221
|
-
if (max.h) {
|
|
222
|
-
newSize.height = Math.min(newSize.height, max.h * yPerPx - gapY * 2);
|
|
223
|
-
}
|
|
218
|
+
newSize.width = Math.min(newSize.width, maxWidth * xPerPx - gapX * 2);
|
|
224
219
|
// Limit col & row
|
|
225
220
|
shadow.w = Math.round((newSize.width + gapX * 2) / xPerPx);
|
|
226
221
|
shadow.h = Math.round((newSize.height + gapY * 2) / yPerPx);
|
|
@@ -235,9 +230,10 @@ const resizePointerUp = (e) => {
|
|
|
235
230
|
};
|
|
236
231
|
</script>
|
|
237
232
|
|
|
233
|
+
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
238
234
|
<div
|
|
239
|
-
draggable=
|
|
240
|
-
on:pointerdown={
|
|
235
|
+
draggable="false"
|
|
236
|
+
on:pointerdown|stopPropagation|preventDefault={pointerdown}
|
|
241
237
|
class="svlt-grid-item"
|
|
242
238
|
class:svlt-grid-active={active || (trans && rect)}
|
|
243
239
|
style="width: {active ? newSize.width : width}px; height:{active
|
|
@@ -250,9 +246,7 @@ const resizePointerUp = (e) => {
|
|
|
250
246
|
: `transition: transform 0.1s, opacity 0.1s; transform: translate(${left}px, ${top}px); `} "
|
|
251
247
|
>
|
|
252
248
|
<slot movePointerDown={pointerdown} {resizePointerDown} />
|
|
253
|
-
|
|
254
|
-
<div class="svlt-grid-resizer" on:pointerdown={resizePointerDown} />
|
|
255
|
-
{/if}
|
|
249
|
+
<div class="svlt-grid-resizer" on:pointerdown={resizePointerDown} />
|
|
256
250
|
</div>
|
|
257
251
|
|
|
258
252
|
{#if (active || trans) && shadow}
|
|
@@ -6,8 +6,6 @@ declare const __propDef: {
|
|
|
6
6
|
height: any;
|
|
7
7
|
left: any;
|
|
8
8
|
top: any;
|
|
9
|
-
resizable: any;
|
|
10
|
-
draggable: any;
|
|
11
9
|
id: any;
|
|
12
10
|
container: any;
|
|
13
11
|
xPerPx: any;
|
|
@@ -15,8 +13,6 @@ declare const __propDef: {
|
|
|
15
13
|
gapX: any;
|
|
16
14
|
gapY: any;
|
|
17
15
|
item: any;
|
|
18
|
-
max: any;
|
|
19
|
-
min: any;
|
|
20
16
|
cols: any;
|
|
21
17
|
nativeContainer: any;
|
|
22
18
|
onTop: any;
|
|
@@ -9,13 +9,7 @@ export interface Positon {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
interface ItemLayout extends Size, Positon {
|
|
12
|
-
fixed
|
|
13
|
-
resizable?: boolean
|
|
14
|
-
draggable?: boolean
|
|
15
|
-
customDragger?: boolean
|
|
16
|
-
customResizer?: boolean
|
|
17
|
-
min?: Size
|
|
18
|
-
max?: Size
|
|
12
|
+
fixed: boolean
|
|
19
13
|
}
|
|
20
14
|
|
|
21
15
|
export type FilledItem<T> = { [width: number]: Required<ItemLayout>; data: T; id: string }
|