From ed8dda6a7ab6d37511e843b5242e90c3532b4c85 Mon Sep 17 00:00:00 2001
From: Pranav C <61551451+pranavxc@users.noreply.github.com>
Date: Tue, 3 Aug 2021 20:44:09 +0530
Subject: [PATCH] feat: Formula edit, delete and Swagger changes
Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
---
.../components/editColumn/formulaOptions.vue | 100 +++++++++++++++---
.../components/editVirtualColumn.vue | 42 +++++---
.../spreadsheet/components/fieldsMenu.vue | 2 +-
.../components/virtualCell/formulaCell.vue | 14 ++-
.../components/virtualHeaderCell.vue | 29 +++++
packages/nc-gui/package-lock.json | 5 +
packages/nc-gui/package.json | 1 +
packages/nocodb/src/__tests__/formula.test.ts | 26 ++---
.../nocodb/src/interface/XcDynamicChanges.ts | 2 +-
.../lib/dataMapper/lib/sql/BaseModelSql.ts | 6 +-
...er.ts => formulaQueryBuilderFromString.ts} | 11 +-
.../nocodb/src/lib/noco/NcProjectBuilder.ts | 2 +-
.../src/lib/noco/common/BaseApiBuilder.ts | 22 +++-
.../addErrorOnColumnDeleteInFormula.ts | 34 ++++++
.../noco/common/helpers/jsepTreeToFormula.ts | 43 ++++++++
.../helpers/updateColumnNameInFormula.ts | 37 +++++++
.../src/lib/noco/rest/RestApiBuilder.ts | 68 ++++++++++--
.../sqlMgr/code/routers/xc-ts/SwaggerXc.ts | 31 +++++-
18 files changed, 418 insertions(+), 57 deletions(-)
rename packages/nocodb/src/lib/dataMapper/lib/sql/{formulaQueryBuilder.ts => formulaQueryBuilderFromString.ts} (91%)
create mode 100644 packages/nocodb/src/lib/noco/common/helpers/addErrorOnColumnDeleteInFormula.ts
create mode 100644 packages/nocodb/src/lib/noco/common/helpers/jsepTreeToFormula.ts
create mode 100644 packages/nocodb/src/lib/noco/common/helpers/updateColumnNameInFormula.ts
diff --git a/packages/nc-gui/components/project/spreadsheet/components/editColumn/formulaOptions.vue b/packages/nc-gui/components/project/spreadsheet/components/editColumn/formulaOptions.vue
index 5a7f1afe59..3eb5015e9e 100644
--- a/packages/nc-gui/components/project/spreadsheet/components/editColumn/formulaOptions.vue
+++ b/packages/nc-gui/components/project/spreadsheet/components/editColumn/formulaOptions.vue
@@ -1,24 +1,36 @@
-
+
+
+
+