mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-05-02 10:13:57 +00:00
fixed run macro for collections
This commit is contained in:
@@ -166,7 +166,7 @@
|
|||||||
display,
|
display,
|
||||||
macroPreview,
|
macroPreview,
|
||||||
macroValues,
|
macroValues,
|
||||||
selectedCellsPublished
|
selectedCellsPublished()
|
||||||
);
|
);
|
||||||
// $: console.log('GRIDER', grider);
|
// $: console.log('GRIDER', grider);
|
||||||
// $: if (onChangeGrider) onChangeGrider(grider);
|
// $: if (onChangeGrider) onChangeGrider(grider);
|
||||||
@@ -237,6 +237,7 @@
|
|||||||
{dataPageAvailable}
|
{dataPageAvailable}
|
||||||
{loadRowCount}
|
{loadRowCount}
|
||||||
bind:loadedRows
|
bind:loadedRows
|
||||||
|
bind:selectedCellsPublished
|
||||||
frameSelection={!!macroPreview}
|
frameSelection={!!macroPreview}
|
||||||
{grider}
|
{grider}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -188,7 +188,7 @@
|
|||||||
<ReferenceManager {...$$props} {managerSize} />
|
<ReferenceManager {...$$props} {managerSize} />
|
||||||
</WidgetColumnBarItem>
|
</WidgetColumnBarItem>
|
||||||
|
|
||||||
<WidgetColumnBarItem title="Macros" name="macros" show={showMacros} collapsed>
|
<WidgetColumnBarItem title="Macros" name="macros" skip={!showMacros} collapsed>
|
||||||
<MacroManager {...$$props} {managerSize} />
|
<MacroManager {...$$props} {managerSize} />
|
||||||
</WidgetColumnBarItem>
|
</WidgetColumnBarItem>
|
||||||
</WidgetColumnBar>
|
</WidgetColumnBar>
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
TableFormViewDisplay,
|
TableFormViewDisplay,
|
||||||
CollectionGridDisplay,
|
CollectionGridDisplay,
|
||||||
changeSetContainsChanges,
|
changeSetContainsChanges,
|
||||||
|
runMacroOnChangeSet,
|
||||||
} from 'dbgate-datalib';
|
} from 'dbgate-datalib';
|
||||||
import { findEngineDriver } from 'dbgate-tools';
|
import { findEngineDriver } from 'dbgate-tools';
|
||||||
import { writable } from 'svelte/store';
|
import { writable } from 'svelte/store';
|
||||||
@@ -127,6 +128,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleRunMacro(macro, params, cells) {
|
||||||
|
const newChangeSet = runMacroOnChangeSet(macro, params, cells, $changeSetStore?.value, display);
|
||||||
|
if (newChangeSet) {
|
||||||
|
dispatchChangeSet({ type: 'set', value: newChangeSet });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
registerMenu({ command: 'collectionTable.save', tag: 'save' });
|
registerMenu({ command: 'collectionTable.save', tag: 'save' });
|
||||||
|
|
||||||
const collapsedLeftColumnStore = writable(false);
|
const collapsedLeftColumnStore = writable(false);
|
||||||
@@ -148,4 +156,7 @@
|
|||||||
gridCoreComponent={CollectionDataGridCore}
|
gridCoreComponent={CollectionDataGridCore}
|
||||||
jsonViewComponent={CollectionJsonView}
|
jsonViewComponent={CollectionJsonView}
|
||||||
isDynamicStructure
|
isDynamicStructure
|
||||||
|
showMacros
|
||||||
|
macroCondition={macro => macro.type == 'transformValue'}
|
||||||
|
onRunMacro={handleRunMacro}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user