mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 14:46:01 +00:00
macro detail view
This commit is contained in:
32
packages/web/src/freetable/macros.js
Normal file
32
packages/web/src/freetable/macros.js
Normal file
@@ -0,0 +1,32 @@
|
||||
const macros = [
|
||||
{
|
||||
title: 'Remove diacritics',
|
||||
name: 'removeDiacritics',
|
||||
group: 'text',
|
||||
description: 'Removes diacritics from selected cells',
|
||||
type: 'transformValue',
|
||||
code: `value => modules.diacritics.remove(value)`,
|
||||
},
|
||||
{
|
||||
title: 'Search & replace text',
|
||||
name: 'stringReplace',
|
||||
group: 'text',
|
||||
description: 'Search & replace text or regular expression',
|
||||
type: 'transformValue',
|
||||
args: [
|
||||
{
|
||||
type: 'text',
|
||||
label: 'Find',
|
||||
name: 'find',
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
label: 'Replace with',
|
||||
name: 'replace',
|
||||
},
|
||||
],
|
||||
code: `value => value ? value.toString().replace(args.find, args.replace) : value`,
|
||||
},
|
||||
];
|
||||
|
||||
export default macros;
|
||||
Reference in New Issue
Block a user