From bbc34aed63340a08885e9c7ab6ab06ffd484dc0a Mon Sep 17 00:00:00 2001 From: RuriRyan <2413490+RuriRyan@users.noreply.github.com> Date: Fri, 23 Dec 2022 10:09:27 +0100 Subject: [PATCH 001/122] Adds helm chart Initial work was done by https://github.com/one-acre-fund/oaf-public-charts/tree/main/charts/nocodb The changes include mostly fixes and the addition of missing features. --- charts/nocodb/.gitignore | 2 + charts/nocodb/.helmignore | 23 +++++ charts/nocodb/Chart.yaml | 12 +++ charts/nocodb/templates/NOTES.txt | 22 +++++ charts/nocodb/templates/_helpers.tpl | 82 ++++++++++++++++ charts/nocodb/templates/configmap.yaml | 13 +++ charts/nocodb/templates/deployment.yaml | 73 ++++++++++++++ charts/nocodb/templates/hpa.yaml | 28 ++++++ charts/nocodb/templates/ingress.yaml | 61 ++++++++++++ charts/nocodb/templates/pvc.yaml | 14 +++ charts/nocodb/templates/secret.yaml | 13 +++ charts/nocodb/templates/service.yaml | 15 +++ charts/nocodb/templates/serviceaccount.yaml | 12 +++ .../templates/tests/test-connection.yaml | 15 +++ charts/nocodb/values.yaml | 98 +++++++++++++++++++ 15 files changed, 483 insertions(+) create mode 100644 charts/nocodb/.gitignore create mode 100644 charts/nocodb/.helmignore create mode 100644 charts/nocodb/Chart.yaml create mode 100644 charts/nocodb/templates/NOTES.txt create mode 100644 charts/nocodb/templates/_helpers.tpl create mode 100644 charts/nocodb/templates/configmap.yaml create mode 100644 charts/nocodb/templates/deployment.yaml create mode 100644 charts/nocodb/templates/hpa.yaml create mode 100644 charts/nocodb/templates/ingress.yaml create mode 100644 charts/nocodb/templates/pvc.yaml create mode 100644 charts/nocodb/templates/secret.yaml create mode 100644 charts/nocodb/templates/service.yaml create mode 100644 charts/nocodb/templates/serviceaccount.yaml create mode 100644 charts/nocodb/templates/tests/test-connection.yaml create mode 100644 charts/nocodb/values.yaml diff --git a/charts/nocodb/.gitignore b/charts/nocodb/.gitignore new file mode 100644 index 0000000000..f791801bca --- /dev/null +++ b/charts/nocodb/.gitignore @@ -0,0 +1,2 @@ +charts/ +Chart.lock diff --git a/charts/nocodb/.helmignore b/charts/nocodb/.helmignore new file mode 100644 index 0000000000..0e8a0eb36f --- /dev/null +++ b/charts/nocodb/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/nocodb/Chart.yaml b/charts/nocodb/Chart.yaml new file mode 100644 index 0000000000..db58bf049b --- /dev/null +++ b/charts/nocodb/Chart.yaml @@ -0,0 +1,12 @@ +apiVersion: v2 +appVersion: 0.100.2 +dependencies: +- condition: postgresql.enabled + name: postgresql + repository: https://charts.bitnami.com/bitnami + version: ~11.6.6 +description: A Helm chart for Kubernetes +maintainers: [] +name: nocodb +type: application +version: 0.3.0 diff --git a/charts/nocodb/templates/NOTES.txt b/charts/nocodb/templates/NOTES.txt new file mode 100644 index 0000000000..0594ffd042 --- /dev/null +++ b/charts/nocodb/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "nocodb.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "nocodb.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "nocodb.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "nocodb.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} diff --git a/charts/nocodb/templates/_helpers.tpl b/charts/nocodb/templates/_helpers.tpl new file mode 100644 index 0000000000..6a5723a0df --- /dev/null +++ b/charts/nocodb/templates/_helpers.tpl @@ -0,0 +1,82 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "nocodb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "nocodb.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "nocodb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "nocodb.labels" -}} +helm.sh/chart: {{ include "nocodb.chart" . }} +{{ include "nocodb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "nocodb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "nocodb.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "nocodb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "nocodb.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{- define "postgresHost" -}} +{{- printf "%s-postgresql" .Release.Name }} +{{- end }} + +{{- define "postgresDatabase" -}} +{{- .Values.postgresql.auth.database }} +{{- end }} + +{{- define "postgresUsername" -}} +{{- .Values.postgresql.auth.username }} +{{- end }} + +{{- define "postgresPassword" -}} +{{- .Values.postgresql.auth.password }} +{{- end }} + +{{- define "databaseUri" -}} +{{- printf "pg://%s:5432?u=%s&p=%s&d=%s" (include "postgresHost" .) (include "postgresUsername" .) (include "postgresPassword" .) (include "postgresDatabase" .) }} +{{- end }} diff --git a/charts/nocodb/templates/configmap.yaml b/charts/nocodb/templates/configmap.yaml new file mode 100644 index 0000000000..ef83a94612 --- /dev/null +++ b/charts/nocodb/templates/configmap.yaml @@ -0,0 +1,13 @@ +{{- if .Values.extraEnvs }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "nocodb.fullname" . }} + labels: + {{- include "nocodb.labels" . | nindent 4 }} +data: +{{- range $key, $value := .Values.extraEnvs }} + {{ $key }}: |- + {{- $value | nindent 4 }} +{{- end }} +{{- end }} diff --git a/charts/nocodb/templates/deployment.yaml b/charts/nocodb/templates/deployment.yaml new file mode 100644 index 0000000000..582d365df8 --- /dev/null +++ b/charts/nocodb/templates/deployment.yaml @@ -0,0 +1,73 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "nocodb.fullname" . }} + labels: + {{- include "nocodb.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "nocodb.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "nocodb.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "nocodb.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + volumeMounts: + - name: {{ include "nocodb.fullname" . }} + mountPath: /usr/app/data + envFrom: + - configMapRef: + name: {{ include "nocodb.fullname" . }} + - secretRef: + name: {{ include "nocodb.fullname" . }} + ports: + - name: http + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: / + port: http + readinessProbe: + httpGet: + path: / + port: http + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + volumes: + - name: {{ include "nocodb.fullname" . }} + persistentVolumeClaim: + claimName: {{ include "nocodb.fullname" . }} diff --git a/charts/nocodb/templates/hpa.yaml b/charts/nocodb/templates/hpa.yaml new file mode 100644 index 0000000000..d09679632c --- /dev/null +++ b/charts/nocodb/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "nocodb.fullname" . }} + labels: + {{- include "nocodb.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "nocodb.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/nocodb/templates/ingress.yaml b/charts/nocodb/templates/ingress.yaml new file mode 100644 index 0000000000..86dd9bc2f8 --- /dev/null +++ b/charts/nocodb/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "nocodb.fullname" . -}} +{{- $svcPort := .Values.ingress.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "nocodb.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/charts/nocodb/templates/pvc.yaml b/charts/nocodb/templates/pvc.yaml new file mode 100644 index 0000000000..67656c01d1 --- /dev/null +++ b/charts/nocodb/templates/pvc.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: {{ include "nocodb.fullname" . }} + labels: + {{- include "nocodb.selectorLabels" . | nindent 8 }} +spec: + accessModes: + - ReadWriteMany + resources: + requests: + storage: {{ .Values.storage.size }} + storageClassName: {{ .Values.storage.storageClassName }} + volumeMode: Filesystem diff --git a/charts/nocodb/templates/secret.yaml b/charts/nocodb/templates/secret.yaml new file mode 100644 index 0000000000..85dd6743aa --- /dev/null +++ b/charts/nocodb/templates/secret.yaml @@ -0,0 +1,13 @@ +{{- if .Values.extraSecretEnvs }} +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "nocodb.fullname" . }} + labels: + {{- include "nocodb.labels" . | nindent 4 }} +data: + NC_DB: {{ include "databaseUri" . | b64enc}} +{{- range $key, $value := .Values.extraSecretEnvs }} + {{ $key }}: '{{ $value | b64enc }}' +{{- end }} +{{- end }} diff --git a/charts/nocodb/templates/service.yaml b/charts/nocodb/templates/service.yaml new file mode 100644 index 0000000000..92d484d6bf --- /dev/null +++ b/charts/nocodb/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "nocodb.fullname" . }} + labels: + {{- include "nocodb.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "nocodb.selectorLabels" . | nindent 4 }} diff --git a/charts/nocodb/templates/serviceaccount.yaml b/charts/nocodb/templates/serviceaccount.yaml new file mode 100644 index 0000000000..e61ce26515 --- /dev/null +++ b/charts/nocodb/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "nocodb.serviceAccountName" . }} + labels: + {{- include "nocodb.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/nocodb/templates/tests/test-connection.yaml b/charts/nocodb/templates/tests/test-connection.yaml new file mode 100644 index 0000000000..528686c6e7 --- /dev/null +++ b/charts/nocodb/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "nocodb.fullname" . }}-test-connection" + labels: + {{- include "nocodb.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "nocodb.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/nocodb/values.yaml b/charts/nocodb/values.yaml new file mode 100644 index 0000000000..5d7bf7887e --- /dev/null +++ b/charts/nocodb/values.yaml @@ -0,0 +1,98 @@ +# Default values for nocodb. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +image: + repository: nocodb/nocodb + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: false + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 8080 + +ingress: + enabled: false + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: [] + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +extraEnvs: + NC_PUBLIC_URL: https:/nocodb.local.org + +extraSecretEnvs: + NC_AUTH_JWT_SECRET: secretString + +storage: + size: 3Gi + storageClassName: "" + +postgresql: + enabled: false + auth: + database: nocodb + username: nocodb + password: secretPass + persistence: + size: 8Gi From 49e546d511ca9132f4d5c97993654f044f255571 Mon Sep 17 00:00:00 2001 From: navi Date: Tue, 3 Jan 2023 13:50:45 +0000 Subject: [PATCH 002/122] New translations en.json (Czech) --- packages/nc-gui/lang/cs.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/nc-gui/lang/cs.json b/packages/nc-gui/lang/cs.json index 42f6953620..0e78d66d35 100644 --- a/packages/nc-gui/lang/cs.json +++ b/packages/nc-gui/lang/cs.json @@ -57,9 +57,9 @@ "reference": "Reference", "function": "Funkce", "confirm": "Potvrdit", - "generate": "Generate", + "generate": "Generovat", "copy": "Kopírovat", - "misc": "Miscellaneous", + "misc": "Ostatní", "lock": "Uzamknout", "unlock": "Odemknout", "credentials": "Přihlašovací údaje", @@ -113,7 +113,7 @@ "orgLevelCreator": "Organization Level Creator", "orgLevelViewer": "Organization Level Viewer" }, - "sqlVIew": "SQL View" + "sqlVIew": "SQL pohled" }, "datatype": { "ID": "ID", @@ -188,16 +188,16 @@ "metaOperations": "Metadata Operations", "audit": "Audit", "auditLogs": "Audit Log", - "sqlMigrations": "SQL Migrations", + "sqlMigrations": "SQL migrace", "dbCredentials": "Database Credentials", "advancedParameters": "SSL & Advanced parameters", - "headCreateProject": "Create Project | NocoDB", - "headLogin": "Log In | NocoDB", - "resetPassword": "Reset your password", - "teamAndSettings": "Team & Settings", + "headCreateProject": "Vytvořit projekt | NocoDB", + "headLogin": "Přihlásit se | NocoDB", + "resetPassword": "Obnovit heslo", + "teamAndSettings": "Tým a nastavení", "apiDocs": "API Docs", "importFromAirtable": "Import From Airtable", - "generateToken": "Generate Token", + "generateToken": "Generovat token", "APIsAndSupport": "APIs & Support", "helpCenter": "Help center", "swaggerDocumentation": "Swagger Documentation", From 6ef17339cf9c0dccf9d551c55206eb75b5f2cb6b Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 5 Jan 2023 14:10:21 +0530 Subject: [PATCH 003/122] fix(gui): cell copy-paste if condition correction re #4758 Signed-off-by: Pranav C --- packages/nc-gui/composables/useMultiSelect/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/nc-gui/composables/useMultiSelect/index.ts b/packages/nc-gui/composables/useMultiSelect/index.ts index 104b7888b9..7ac874e192 100644 --- a/packages/nc-gui/composables/useMultiSelect/index.ts +++ b/packages/nc-gui/composables/useMultiSelect/index.ts @@ -267,7 +267,8 @@ export function useMultiSelect( // copy - ctrl/cmd +c case 67: // set clipboard context only if single cell selected - if (selectedRange.isSingleCell() && rowObj.row[columnObj.title!]) { + // or if selected range is empty + if ((selectedRange.isSingleCell() || selectedRange.isEmpty()) && rowObj.row[columnObj.title!]) { clipboardContext = { value: rowObj.row[columnObj.title!], uidt: columnObj.uidt as UITypes, From 27d05c65bb2b18f16b9dc255f30be8642471e731 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 5 Jan 2023 15:30:49 +0530 Subject: [PATCH 004/122] fix(gui): assign click event handler to button re #4760 Signed-off-by: Pranav C --- packages/nc-gui/components/cell/Json.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/cell/Json.vue b/packages/nc-gui/components/cell/Json.vue index 8d8d6b9831..2432c7ee7a 100644 --- a/packages/nc-gui/components/cell/Json.vue +++ b/packages/nc-gui/components/cell/Json.vue @@ -134,8 +134,8 @@ useSelectedCellKeyupListener(active, (e) => {
Cancel
- -
Save
+ +
Save
From 25129c23fbe2a24990fd6925632c25a972841e60 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 5 Jan 2023 17:52:41 +0530 Subject: [PATCH 005/122] fix(gui): stop mouse event propagation from json cell to avoid unexpected behaviour re #4760 Signed-off-by: Pranav C --- packages/nc-gui/components/cell/Json.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/cell/Json.vue b/packages/nc-gui/components/cell/Json.vue index 2432c7ee7a..b4176d0d64 100644 --- a/packages/nc-gui/components/cell/Json.vue +++ b/packages/nc-gui/components/cell/Json.vue @@ -123,8 +123,8 @@ useSelectedCellKeyupListener(active, (e) => {
-
+
diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue index 26578fd027..7ba8adbc50 100644 --- a/packages/nc-gui/components/smartsheet/Kanban.vue +++ b/packages/nc-gui/components/smartsheet/Kanban.vue @@ -13,6 +13,7 @@ import { MetaInj, OpenNewRecordFormHookInj, inject, + isLTAR, onBeforeMount, onBeforeUnmount, provide, @@ -472,35 +473,40 @@ watch(view, async (nextView) => { :key="`record-${record.row.id}-${col.id}`" class="flex flex-col rounded-lg w-full" > - -
-
- - +
+ +
+
+ + +
-
- -
- - + +
+ + +
From dd58f98752cd7bdb4aee36daefdf5c76551d58fa Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 13:43:35 +0800 Subject: [PATCH 043/122] fix(nocodb): project_id would be correct after the upgrader --- .../lib/meta/helpers/extractProjectIdAndAuthenticate.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/packages/nocodb/src/lib/meta/helpers/extractProjectIdAndAuthenticate.ts b/packages/nocodb/src/lib/meta/helpers/extractProjectIdAndAuthenticate.ts index 1071291bec..3ca2d2a139 100644 --- a/packages/nocodb/src/lib/meta/helpers/extractProjectIdAndAuthenticate.ts +++ b/packages/nocodb/src/lib/meta/helpers/extractProjectIdAndAuthenticate.ts @@ -73,14 +73,7 @@ export default async (req, res, next) => { const column = await Column.get({ colId: params.columnId }); req.ncProjectId = column?.project_id; } else if (params.filterId) { - const filter = await Filter.get(params.filterId).then(async (f) => { - if (f.fk_view_id) { - return await View.get(f.fk_view_id); - } else if (f.fk_hook_id) { - return await Hook.get(f.fk_hook_id); - } - return await Column.get({ colId: filter.fk_column_id }); - }); + const filter = await Filter.get(params.filterId); req.ncProjectId = filter?.project_id; } else if (params.filterParentId) { const filter = await Filter.get(params.filterParentId); From 74d6bb335e898d5d79056737bf4816767ca6805a Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 13:45:47 +0800 Subject: [PATCH 044/122] feat(nocodb): include base_id in ncFilterUpgrader --- packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts b/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts index 09eb667432..1515f88b8b 100644 --- a/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts +++ b/packages/nocodb/src/lib/version-upgrader/ncFilterUpgrader.ts @@ -26,7 +26,7 @@ export default async function ({ ncMeta }: NcUpgraderCtx) { null, null, MetaTable.FILTER_EXP, - { project_id: model.project_id }, + { base_id: model.base_id, project_id: model.project_id }, filter.id ); } From 83ce692f0b690f60d054ad3d0910ce6c88cea7ef Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 15:58:24 +0800 Subject: [PATCH 045/122] fix(workflows): use softprops/action-gh-release@v1 instead --- .github/workflows/release-executables.yml | 84 ++++------------------- 1 file changed, 13 insertions(+), 71 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index fff82b1e69..3388645b31 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -107,46 +107,17 @@ jobs: mv ./dist/Noco-macos-arm64 ./mac-dist/ mv ./dist/Noco-macos-x64 ./mac-dist/ - - name: Upload win-arm64 build to asset + - name: Upload executables to asset id: upload-release-asset - uses: actions/upload-release-asset@v1 + uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: ./scripts/pkg-executable/dist/Noco-win-arm64.exe - asset_name: Noco-win-arm64.exe - asset_content_type: application/octet-stream - - - name: Upload win-x64 build to asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: ./scripts/pkg-executable/dist/Noco-win-x64.exe - asset_name: Noco-win-x64.exe - asset_content_type: application/octet-stream - - - name: Upload linux-arm64 build to asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: ./scripts/pkg-executable/dist/Noco-linux-arm64 - asset_name: Noco-linux-arm64 - asset_content_type: application/octet-stream - - - name: Upload linux-x64 build to asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.get_release.outputs.upload_url }} - asset_path: ./scripts/pkg-executable/dist/Noco-linux-x64 - asset_name: Noco-linux-x64 - asset_content_type: application/octet-stream + files: | + ./scripts/pkg-executable/dist/Noco-win-arm64.exe + ./scripts/pkg-executable/dist/Noco-win-x64.exe + ./scripts/pkg-executable/dist/Noco-linux-arm64 + ./scripts/pkg-executable/dist/Noco-linux-x64 - uses: actions/upload-artifact@master with: @@ -205,40 +176,15 @@ jobs: id: compress - - name: Upload macos-x64 build to asset - uses: actions/upload-release-asset@v1 + - name: Upload macos executable to asset + uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.build-executables.outputs.upload_url }} - asset_path: ./scripts/pkg-executable/mac-dist/Noco-macos-x64 - asset_name: Noco-macos-x64 - asset_content_type: application/octet-stream - - - - - name: Upload macos-arm64 build to asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.build-executables.outputs.upload_url }} - asset_path: ./scripts/pkg-executable/mac-dist/Noco-macos-arm64 - asset_name: Noco-macos-arm64 - asset_content_type: application/octet-stream - - - - - name: Upload macos compressed build(for homebrew) to asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ needs.build-executables.outputs.upload_url }} - asset_path: ./scripts/pkg-executable/mac-dist/nocodb.tar.gz - asset_name: nocodb.tar.gz - asset_content_type: application/octet-stream - + files: | + ./scripts/pkg-executable/mac-dist/Noco-macos-x64 + ./scripts/pkg-executable/mac-dist/Noco-macos-arm64 + ./scripts/pkg-executable/mac-dist/nocodb.tar.gz - name: Generate Homebrew Formula class and push run: | @@ -267,7 +213,3 @@ jobs: git commit ./Formula/nocodb.rb -m "Automatic publish" git push - - - - From 006170be222da0dc75f4bbb2d84c03e10b48ec09 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 16:00:51 +0800 Subject: [PATCH 046/122] fix(workflows): use pascalgn/automerge-action@v.0.15.5 --- .github/workflows/pr-to-master.yml | 2 +- .github/workflows/release-npm.yml | 2 +- .github/workflows/update-sdk-path.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-to-master.yml b/.github/workflows/pr-to-master.yml index a4eef87b54..989f239320 100644 --- a/.github/workflows/pr-to-master.yml +++ b/.github/workflows/pr-to-master.yml @@ -55,7 +55,7 @@ jobs: echo "Pull Request URL - ${{ steps.cpr.outputs.pr_url }}" - name: automerge if: ${{ github.event.inputs.targetEnv == 'PROD' || inputs.targetEnv == 'PROD' }} - uses: "pascalgn/automerge-action@v0.14.3" + uses: "pascalgn/automerge-action@v0.15.5" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" PULL_REQUEST: "${{ steps.cpr.outputs.pr_number }}" diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 4da1dd71e5..796f3fdd01 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -84,7 +84,7 @@ jobs: echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" - name: automerge if: ${{ github.event.inputs.targetEnv == 'PROD' || inputs.targetEnv == 'PROD' }} - uses: "pascalgn/automerge-action@v0.14.3" + uses: "pascalgn/automerge-action@v0.15.5" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" PULL_REQUEST: "${{ steps.cpr.outputs.pull-request-number }}" diff --git a/.github/workflows/update-sdk-path.yml b/.github/workflows/update-sdk-path.yml index fed2a4e22e..7b4b700bc1 100644 --- a/.github/workflows/update-sdk-path.yml +++ b/.github/workflows/update-sdk-path.yml @@ -41,7 +41,7 @@ jobs: echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" - name: automerge - uses: "pascalgn/automerge-action@v0.14.3" + uses: "pascalgn/automerge-action@v0.15.5" env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" PULL_REQUEST: "${{ steps.cpr.outputs.pull-request-number }}" From f8e654c6d99b70230c86582a7a266b49bd3f693a Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 16:03:10 +0800 Subject: [PATCH 047/122] fix(workflows): use peter-evans/create-pull-request@v4.2.3 --- .github/workflows/release-npm.yml | 2 +- .github/workflows/update-sdk-path.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-npm.yml b/.github/workflows/release-npm.yml index 796f3fdd01..55ec46d9af 100644 --- a/.github/workflows/release-npm.yml +++ b/.github/workflows/release-npm.yml @@ -68,7 +68,7 @@ jobs: - name: Create Pull Request if: ${{ github.event.inputs.targetEnv == 'PROD' || inputs.targetEnv == 'PROD' }} id: cpr - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4.2.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: diff --git a/.github/workflows/update-sdk-path.yml b/.github/workflows/update-sdk-path.yml index 7b4b700bc1..b71bf2010b 100644 --- a/.github/workflows/update-sdk-path.yml +++ b/.github/workflows/update-sdk-path.yml @@ -27,7 +27,7 @@ jobs: - name: Create Pull Request id: cpr - uses: peter-evans/create-pull-request@v3 + uses: peter-evans/create-pull-request@v4.2.3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: From d89dbecbf88a3fdf818630781790cbc50c1ba6c7 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 16:05:00 +0800 Subject: [PATCH 048/122] fix(workflows): use actions/github-script@v6 --- .github/workflows/release-draft.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml index 1fe4fb3d09..02182678c3 100644 --- a/.github/workflows/release-draft.yml +++ b/.github/workflows/release-draft.yml @@ -56,7 +56,7 @@ jobs: echo "TARGET_SHA=${TARGET_SHA}" >> $GITHUB_OUTPUT echo "Setting TARGET_SHA: ${TARGET_SHA}" - name: Create tag - uses: actions/github-script@v3 + uses: actions/github-script@v6 with: # need workflows permission but it's not in GITHUB_TOKEN scope # need a custom PAT with workflows permission here From a2cabc5b912d43a3a956fdb7ac3731dc0b82a9d3 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 16:18:03 +0800 Subject: [PATCH 049/122] chore(nocodb-sdk): remove unnecessary replace in formula --- packages/nocodb-sdk/src/lib/formulaHelpers.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/packages/nocodb-sdk/src/lib/formulaHelpers.ts b/packages/nocodb-sdk/src/lib/formulaHelpers.ts index 14d50009d5..e10e491dea 100644 --- a/packages/nocodb-sdk/src/lib/formulaHelpers.ts +++ b/packages/nocodb-sdk/src/lib/formulaHelpers.ts @@ -67,11 +67,7 @@ export async function substituteColumnAliasWithIdInFormula( }; // register jsep curly hook jsep.plugins.register(jsepCurlyHook); - const parsedFormula = jsep( - // formula may include double curly brackets in previous version - // convert to single curly bracket here for compatibility - formula.replaceAll('{{', '{').replaceAll('}}', '}') - ); + const parsedFormula = jsep(formula); await substituteId(parsedFormula); return jsepTreeToFormula(parsedFormula); } @@ -106,11 +102,7 @@ export function substituteColumnIdWithAliasInFormula( // register jsep curly hook jsep.plugins.register(jsepCurlyHook); - const parsedFormula = jsep( - // formula may include double curly brackets in previous version - // convert to single curly bracket here for compatibility - formula.replaceAll('{{', '{').replaceAll('}}', '}') - ); + const parsedFormula = jsep(formula); const parsedRawFormula = rawFormula && jsep(rawFormula); substituteId(parsedFormula, parsedRawFormula); return jsepTreeToFormula(parsedFormula); From 2c6521c7e4657303befe42ef166024079f371565 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 18:16:32 +0800 Subject: [PATCH 050/122] fix(nc-gui): single select behaviours based on roles --- .../nc-gui/components/cell/SingleSelect.vue | 41 +++++++++++++------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 5258ffe327..60c6387fba 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -14,6 +14,7 @@ import { extractSdkResponseErrorMsg, inject, ref, + useRoles, useSelectedCellKeyupListener, watch, } from '#imports' @@ -49,6 +50,8 @@ const searchVal = ref() const { getMeta } = useMetas() +const { hasRole } = useRoles() + const { isPg, isMysql } = useProject() // a variable to keep newly created option value @@ -73,6 +76,10 @@ const isOptionMissing = computed(() => { return (options.value ?? []).every((op) => op.title !== searchVal.value) }) +const hasEditRoles = computed(() => hasRole('owner', true) || hasRole('creator', true) || hasRole('editor', true)) + +const editAllowed = computed(() => hasEditRoles.value && (active.value || editable.value)) + const vModel = computed({ get: () => tempSelectedOptState.value ?? modelValue, set: (val) => { @@ -87,10 +94,12 @@ const vModel = computed({ }) watch(isOpen, (n, _o) => { - if (!n) { - aselect.value?.$el?.querySelector('input')?.blur() - } else { - aselect.value?.$el?.querySelector('input')?.focus() + if (editAllowed.value) { + if (!n) { + aselect.value?.$el?.querySelector('input')?.blur() + } else { + aselect.value?.$el?.querySelector('input')?.focus() + } } }) @@ -100,11 +109,15 @@ useSelectedCellKeyupListener(active, (e) => { isOpen.value = false break case 'Enter': - if (active.value && !isOpen.value) { + if (editAllowed.value && active.value && !isOpen.value) { isOpen.value = true } break default: + if (!editAllowed.value) { + e.preventDefault() + break + } // toggle only if char key pressed if (!(e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) && e.key?.length === 1) { e.stopPropagation() @@ -174,7 +187,7 @@ const toggleMenu = (e: Event) => { vModel.value = '' return } - isOpen.value = (active.value || editable.value) && !isOpen.value + isOpen.value = editAllowed.value && !isOpen.value } @@ -183,11 +196,12 @@ const toggleMenu = (e: Event) => { ref="aselect" v-model:value="vModel" class="w-full" - :allow-clear="!column.rqd && active" + :class="{ 'caret-transparent': !hasEditRoles }" + :allow-clear="!column.rqd && editAllowed" :bordered="false" - :open="isOpen && (active || editable)" + :open="isOpen" :disabled="readOnly" - :show-arrow="!readOnly && (active || editable || vModel === null)" + :show-arrow="hasEditRoles && !readOnly && (editable || (active && vModel === null))" :dropdown-class-name="`nc-dropdown-single-select-cell ${isOpen ? 'active' : ''}`" show-search @select="isOpen = false" @@ -216,8 +230,11 @@ const toggleMenu = (e: Event) => { - - +
@@ -240,4 +257,4 @@ const toggleMenu = (e: Event) => { :deep(.ant-select-clear) { opacity: 1; } - + \ No newline at end of file From 183a123cae6740f50a38d3a024312c7509809242 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 11 Jan 2023 18:16:43 +0800 Subject: [PATCH 051/122] fix(nc-gui): multi select behaviours based on roles --- .../nc-gui/components/cell/MultiSelect.vue | 37 ++++++++++++++----- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/packages/nc-gui/components/cell/MultiSelect.vue b/packages/nc-gui/components/cell/MultiSelect.vue index 3815933e49..7b7d69c191 100644 --- a/packages/nc-gui/components/cell/MultiSelect.vue +++ b/packages/nc-gui/components/cell/MultiSelect.vue @@ -19,6 +19,7 @@ import { useEventListener, useMetas, useProject, + useRoles, useSelectedCellKeyupListener, watch, } from '#imports' @@ -57,6 +58,8 @@ const { $api } = useNuxtApp() const { getMeta } = useMetas() +const { hasRole } = useRoles() + const { isPg, isMysql } = useProject() // a variable to keep newly created options value @@ -80,6 +83,10 @@ const isOptionMissing = computed(() => { return (options.value ?? []).every((op) => op.title !== searchVal.value) }) +const hasEditRoles = computed(() => hasRole('owner', true) || hasRole('creator', true) || hasRole('editor', true)) + +const editAllowed = computed(() => hasEditRoles.value && (active.value || editable.value)) + const vModel = computed({ get: () => { const selected = selectedIds.value.reduce((acc, id) => { @@ -154,10 +161,12 @@ watch( ) watch(isOpen, (n, _o) => { - if (!n) { - aselect.value?.$el?.querySelector('input')?.blur() - } else { - aselect.value?.$el?.querySelector('input')?.focus() + if (editAllowed.value) { + if (!n) { + aselect.value?.$el?.querySelector('input')?.blur() + } else { + aselect.value?.$el?.querySelector('input')?.focus() + } } }) @@ -167,7 +176,7 @@ useSelectedCellKeyupListener(active, (e) => { isOpen.value = false break case 'Enter': - if (active.value && !isOpen.value) { + if (editAllowed.value && active.value && !isOpen.value) { isOpen.value = true } break @@ -179,6 +188,10 @@ useSelectedCellKeyupListener(active, (e) => { // skip break default: + if (!editAllowed.value) { + e.preventDefault() + break + } // toggle only if char key pressed if (!(e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) && e.key?.length === 1) { e.stopPropagation() @@ -272,14 +285,14 @@ const onTagClick = (e: Event, onClose: Function) => { :bordered="false" clear-icon show-search - :show-arrow="!readOnly" + :show-arrow="hasEditRoles && !readOnly && (editable || (active && vModel.length === 0))" :open="isOpen && (active || editable)" :disabled="readOnly" - :class="{ '!ml-[-8px]': readOnly }" + :class="{ '!ml-[-8px]': readOnly, 'caret-transparent': !hasEditRoles }" :dropdown-class-name="`nc-dropdown-multi-select-cell ${isOpen ? 'active' : ''}`" @search="search" @keydown.stop - @click="isOpen = (active || editable) && !isOpen" + @click="isOpen = editAllowed && !isOpen" > { - +
@@ -318,7 +335,7 @@ const onTagClick = (e: Event, onClose: Function) => { class="rounded-tag nc-selected-option" :style="{ display: 'flex', alignItems: 'center' }" :color="options.find((el) => el.title === val)?.color" - :closable="(active || editable) && (vModel.length > 1 || !column?.rqd)" + :closable="editAllowed && (active || editable) && (vModel.length > 1 || !column?.rqd)" :close-icon="h(MdiCloseCircle, { class: ['ms-close-icon'] })" @click="onTagClick($event, onClose)" @close="onClose" From c3503bc82b42399cae5a8342515e97754da05304 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 11 Jan 2023 14:54:05 +0530 Subject: [PATCH 052/122] fix(gui): handle empty string in percent and currency cell as null Signed-off-by: Pranav C --- packages/nc-gui/components/cell/Currency.vue | 13 ++++++++++++- packages/nc-gui/components/cell/Percent.vue | 13 ++++++++++++- packages/nc-gui/composables/useMultiSelect/index.ts | 2 +- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/cell/Currency.vue b/packages/nc-gui/components/cell/Currency.vue index c65a699d98..2ff0e2560a 100644 --- a/packages/nc-gui/components/cell/Currency.vue +++ b/packages/nc-gui/components/cell/Currency.vue @@ -14,7 +14,18 @@ const column = inject(ColumnInj)! const editEnabled = inject(EditModeInj)! -const vModel = useVModel(props, 'modelValue', emit) +const _vModel = useVModel(props, 'modelValue', emit) + +const vModel = computed({ + get: () => _vModel.value, + set: (value: unknown) => { + if (value === '') { + _vModel.value = null + } else { + _vModel.value = value as number + } + }, +}) const lastSaved = ref() diff --git a/packages/nc-gui/components/cell/Percent.vue b/packages/nc-gui/components/cell/Percent.vue index c8907656d2..bea2acd71b 100644 --- a/packages/nc-gui/components/cell/Percent.vue +++ b/packages/nc-gui/components/cell/Percent.vue @@ -12,7 +12,18 @@ const emits = defineEmits(['update:modelValue']) const editEnabled = inject(EditModeInj) -const vModel = useVModel(props, 'modelValue', emits) +const _vModel = useVModel(props, 'modelValue', emits) + +const vModel = computed({ + get: () => _vModel.value, + set: (value) => { + if (value === '') { + _vModel.value = null + } else { + _vModel.value = value + } + }, +}) const focus: VNodeRef = (el) => { ;(el as HTMLInputElement)?.focus() diff --git a/packages/nc-gui/composables/useMultiSelect/index.ts b/packages/nc-gui/composables/useMultiSelect/index.ts index 7ac874e192..37a350379c 100644 --- a/packages/nc-gui/composables/useMultiSelect/index.ts +++ b/packages/nc-gui/composables/useMultiSelect/index.ts @@ -268,7 +268,7 @@ export function useMultiSelect( case 67: // set clipboard context only if single cell selected // or if selected range is empty - if ((selectedRange.isSingleCell() || selectedRange.isEmpty()) && rowObj.row[columnObj.title!]) { + if (selectedRange.isSingleCell() || (selectedRange.isEmpty() && rowObj && columnObj)) { clipboardContext = { value: rowObj.row[columnObj.title!], uidt: columnObj.uidt as UITypes, From b9b33dd2679a26f98b48ffc7b641e121ec50c8f1 Mon Sep 17 00:00:00 2001 From: navi Date: Wed, 11 Jan 2023 15:57:41 +0000 Subject: [PATCH 053/122] New translations en.json (French) --- packages/nc-gui/lang/fr.json | 48 ++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/packages/nc-gui/lang/fr.json b/packages/nc-gui/lang/fr.json index c48f44500f..1856eb8f28 100644 --- a/packages/nc-gui/lang/fr.json +++ b/packages/nc-gui/lang/fr.json @@ -211,7 +211,7 @@ "createdBy": "Créé par", "notifyVia": "Notifier via", "projName": "Nom du projet", - "tableName": "Nom de la table", + "tableName": "Nom du tableau", "viewName": "Vue", "viewLink": "Lien de vue", "columnName": "Nom de la colonne", @@ -281,8 +281,8 @@ "onDelete": "Suppression en cours", "account": "Compte", "language": "Langue", - "primaryColor": "Primary Color", - "accentColor": "Accent Color", + "primaryColor": "Couleur primaire", + "accentColor": "Couleur secondaire", "customTheme": "Thème personnalisé", "requestDataSource": "Request a data source you need?", "apiKey": "Clé d'API", @@ -375,7 +375,7 @@ "refreshTable": "Actualiser le tableau", "renameTable": "Renommer le tableau", "deleteTable": "Supprimer le tableau", - "addField": "Ajouter un nouveau champ à cette table", + "addField": "Ajouter un nouveau champ à ce tableau", "setPrimary": "Définir comme valeur primaire", "addRow": "Ajouter une nouvelle ligne", "saveRow": "Enregistrer la ligne", @@ -459,7 +459,7 @@ "dark": "Nuit (^⇧B)", "light": "Jour (^⇧B)" }, - "addTable": "Ajouter une nouvelle table", + "addTable": "Ajouter un nouveau tableau", "inviteMore": "Inviter plus d'utilisateurs", "toggleNavDraw": "Basculer le tiroir de navigation", "reloadApiToken": "Recharger les jetons API", @@ -504,7 +504,7 @@ }, "nonEditableFields": { "computedFieldUnableToClear": "Warning: Computed field - unable to clear text", - "qrFieldsCannotBeDirectlyChanged": "Warning: QR fields cannot be directly changed." + "qrFieldsCannotBeDirectlyChanged": "Attention : les champs QR code ne peuvent pas être modifiés directement." } }, "info": { @@ -599,20 +599,20 @@ }, "tablesMetadataInSync": "Les métadonnées de tables sont en synchronisation", "addMultipleUsers": "Vous pouvez ajouter plusieurs courriels séparés par des virgules (,)", - "enterTableName": "Entrer le nom de la table", + "enterTableName": "Entrez le nom du tableau", "addDefaultColumns": "Ajouter des colonnes par défaut", "tableNameInDb": "Nom de la table tel qu'enregistré dans la base de données", "airtable": { - "credentials": "Where to find this?" + "credentials": "Où trouver ceci ?" }, "import": { "clickOrDrag": "Click or drag file to this area to upload" }, "metaDataRecreated": "Table metadata recreated successfully", - "invalidCredentials": "Invalid credentials", - "downloadingMoreFiles": "Downloading more files", + "invalidCredentials": "Identifiants invalides", + "downloadingMoreFiles": "Téléchargement de fichiers supplémentaires", "copiedToClipboard": "Copié dans le presse-papier", - "requriedFieldsCantBeMoved": "Required field can't be moved", + "requriedFieldsCantBeMoved": "Les champs requis ne peuvent pas être déplacés", "updateNotAllowedWithoutPK": "Update not allowed for table which doesn't have primary key", "autoIncFieldNotEditable": "Auto increment field is not editable", "editingPKnotSupported": "Modification de la clé primaire non prise en charge", @@ -620,8 +620,8 @@ "cacheEmpty": "Le cache est vide", "exportedCache": "Exported Cache Successfully", "valueAlreadyInList": "This value is already in the list", - "noColumnsToUpdate": "No columns to update", - "tableDeleted": "Deleted table successfully", + "noColumnsToUpdate": "Aucune colonne à mettre à jour", + "tableDeleted": "Tableau supprimé avec succès", "generatePublicShareableReadonlyBase": "Generate publicly shareable readonly base", "deleteViewConfirmation": "Êtes-vous sûr de vouloir effacer cette vue ?", "deleteTableConfirmation": "Voulez-vous supprimer ce tableau", @@ -675,14 +675,14 @@ "deleteRowFailed": "Failed to delete row", "setFormDataFailed": "Failed to set form data", "formViewUpdateFailed": "Échec de la mise à jour de la vue du formulaire", - "tableNameRequired": "Table name is required", - "nameShouldStartWithAnAlphabetOr_": "Name should start with an alphabet or _", - "followingCharactersAreNotAllowed": "Following characters are not allowed", - "columnNameRequired": "Column name is required", - "projectNameExceeds50Characters": "Project name exceeds 50 characters", - "projectNameCannotStartWithSpace": "Project name cannot start with space", - "requiredField": "Required field", - "ipNotAllowed": "IP not allowed", + "tableNameRequired": "Nom du tableau requis", + "nameShouldStartWithAnAlphabetOr_": "Le nom doit commencer par une lettre de l'alphabet ou _", + "followingCharactersAreNotAllowed": "Les caractères suivants ne sont pas autorisés", + "columnNameRequired": "Nom de la colonne requis", + "projectNameExceeds50Characters": "Le nom du projet dépasse les 50 caractères", + "projectNameCannotStartWithSpace": "Le nom du projet ne peut pas commencer par un espace", + "requiredField": "Champ requis", + "ipNotAllowed": "Adresse IP non autorisée", "targetFileIsNotAnAcceptedFileType": "Target file is not an accepted file type", "theAcceptedFileTypeIsCsv": "The accepted file type is .csv", "theAcceptedFileTypesAreXlsXlsxXlsmOdsOts": "The accepted file types are .xls, .xlsx, .xlsm, .ods, .ots", @@ -715,10 +715,10 @@ "pluginUninstalled": "Plugin uninstalled successfully", "pluginSettingsSaved": "Plugin settings saved successfully", "pluginTested": "Successfully tested plugin settings", - "tableRenamed": "Table renamed successfully", + "tableRenamed": "Tableau renommé avec succès", "viewDeleted": "Vue effacée avec succès", "primaryColumnUpdated": "Successfully updated as primary column", - "tableDataExported": "Toutes les données de la table ont été exportées avec succès", + "tableDataExported": "Toutes les données du tableau ont été exportées avec succès", "updated": "Mise à jour réussie", "sharedViewDeleted": "Vue partagée effacée avec succès", "userDeleted": "Utilisateur supprimé avec succès", @@ -734,7 +734,7 @@ "shareableURLCopied": "Copied shareable base URL to clipboard!", "embeddableHTMLCodeCopied": "Copied embeddable HTML code!", "userDetailsUpdated": "Successfully updated the user details", - "tableDataImported": "Successfully imported table data", + "tableDataImported": "Données du tableau importées avec succès", "webhookUpdated": "Webhook details updated successfully", "webhookDeleted": "Hook deleted successfully", "webhookTested": "Webhook tested successfully", From 061d27e4ba125caf07b52d4aa69c11ed63712b84 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 12:34:09 +0800 Subject: [PATCH 054/122] fix(nocodb): revise DATETIME_DIFF logic for sqlite --- .../lib/sql/functionMappings/sqlite.ts | 54 ++++++++++--------- 1 file changed, 30 insertions(+), 24 deletions(-) diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts index 9c5f500431..81abddfc2c 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts @@ -83,19 +83,25 @@ const sqlite3 = { ); }, DATETIME_DIFF: ({ fn, knex, pt, colAlias }: MapFnArgs) => { - let datetime_expr1 = fn(pt.arguments[0]).bindings[0]; - let datetime_expr2 = fn(pt.arguments[1]).bindings[0]; + let datetime_expr1 = fn(pt.arguments[0]); + let datetime_expr2 = fn(pt.arguments[1]); // JULIANDAY takes YYYY-MM-DD - datetime_expr1 = convertToTargetFormat( - datetime_expr1, - getDateFormat(datetime_expr1), - 'YYYY-MM-DD' - ); - datetime_expr2 = convertToTargetFormat( - datetime_expr2, - getDateFormat(datetime_expr2), - 'YYYY-MM-DD' - ); + if (datetime_expr1.sql === '?' && datetime_expr1.bindings?.[0]) { + datetime_expr1 = `'${convertToTargetFormat( + datetime_expr1.bindings[0], + getDateFormat(datetime_expr1.bindings[0]), + 'YYYY-MM-DD' + )}'`; + } + + if (datetime_expr2.sql === '?' && datetime_expr2.bindings?.[0]) { + datetime_expr2 = `'${convertToTargetFormat( + datetime_expr2.bindings[0], + getDateFormat(datetime_expr2.bindings[0]), + 'YYYY-MM-DD' + )}'`; + } + const rawUnit = pt.arguments[2] ? fn(pt.arguments[2]).bindings[0] : 'seconds'; @@ -103,36 +109,36 @@ const sqlite3 = { const unit = convertUnits(rawUnit, 'sqlite'); switch (unit) { case 'seconds': - sql = `ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) * 86400)`; + sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 86400)`; break; case 'minutes': - sql = `ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) * 1440)`; + sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 1440)`; break; case 'hours': - sql = `ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) * 24)`; + sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 24)`; break; case 'milliseconds': - sql = `ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) * 86400000)`; + sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 86400000)`; break; case 'weeks': - sql = `ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) / 7)`; + sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 7)`; break; case 'months': - sql = `(ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) / 365)) - * 12 + (ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) / 365 / 12))`; + sql = `(ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365)) + * 12 + (ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365 / 12))`; break; case 'quarters': sql = ` - ROUND((JULIANDAY('${datetime_expr1}')) / 365 / 4) - - ROUND((JULIANDAY('${datetime_expr2}')) / 365 / 4) + - (ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) / 365)) * 4 + ROUND((JULIANDAY(${datetime_expr1})) / 365 / 4) - + ROUND((JULIANDAY(${datetime_expr2})) / 365 / 4) + + (ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365)) * 4 `; break; case 'years': - sql = `ROUND((JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')) / 365)`; + sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365)`; break; case 'days': - sql = `JULIANDAY('${datetime_expr1}') - JULIANDAY('${datetime_expr2}')`; + sql = `JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})`; break; default: sql = ''; From b65789da77fc26274ae1e04a5bf7868a7039dd6d Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 12:34:32 +0800 Subject: [PATCH 055/122] feat(playwright): add NOW() tests for datetime diff formula --- tests/playwright/tests/columnFormula.spec.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/playwright/tests/columnFormula.spec.ts b/tests/playwright/tests/columnFormula.spec.ts index bc08da00ba..650d9501a4 100644 --- a/tests/playwright/tests/columnFormula.spec.ts +++ b/tests/playwright/tests/columnFormula.spec.ts @@ -66,10 +66,22 @@ const formulaDataByDbType = (context: NcContext) => [ formula: `DATETIME_DIFF("2022/10/14", "2023/10/14", "y")`, result: ['-1', '-1', '-1', '-1', '-1'], }, + { + formula: `DATETIME_DIFF(NOW(), "2023/10/14", "y")`, + result: ['-1', '-1', '-1', '-1', '-1'], + }, + { + formula: `DATETIME_DIFF("2022/10/14", NOW(), "y")`, + result: ['0', '0', '0', '0', '0'], + }, { formula: `DATETIME_DIFF("2022/10/14", "2023/10/14", "d")`, result: ['-365', '-365', '-365', '-365', '-365'], }, + { + formula: `DATETIME_DIFF("2022/10/14", NOW(), "d")`, + result: ['-90', '-90', '-90', '-90', '-90'], + }, { formula: `CONCAT(UPPER({City}), LOWER({City}), TRIM(' trimmed '))`, result: [ From 0a93a2c8ed8aeb92e1178e364c018835b977039b Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 13:09:53 +0800 Subject: [PATCH 056/122] fix(playwright): correct test case result - should be all zeros --- tests/playwright/tests/columnFormula.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/tests/columnFormula.spec.ts b/tests/playwright/tests/columnFormula.spec.ts index 650d9501a4..25d6e8ede7 100644 --- a/tests/playwright/tests/columnFormula.spec.ts +++ b/tests/playwright/tests/columnFormula.spec.ts @@ -68,7 +68,7 @@ const formulaDataByDbType = (context: NcContext) => [ }, { formula: `DATETIME_DIFF(NOW(), "2023/10/14", "y")`, - result: ['-1', '-1', '-1', '-1', '-1'], + result: ['0', '0', '0', '0', '0'], }, { formula: `DATETIME_DIFF("2022/10/14", NOW(), "y")`, From 4e3b00eb01186363e5de2a5f4413fe3ab3d9268b Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 14:19:31 +0800 Subject: [PATCH 057/122] fix(playwright): correct formula datetime year --- tests/playwright/tests/columnFormula.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/playwright/tests/columnFormula.spec.ts b/tests/playwright/tests/columnFormula.spec.ts index 25d6e8ede7..3f29a09c05 100644 --- a/tests/playwright/tests/columnFormula.spec.ts +++ b/tests/playwright/tests/columnFormula.spec.ts @@ -71,7 +71,7 @@ const formulaDataByDbType = (context: NcContext) => [ result: ['0', '0', '0', '0', '0'], }, { - formula: `DATETIME_DIFF("2022/10/14", NOW(), "y")`, + formula: `DATETIME_DIFF("2023/10/14", NOW(), "y")`, result: ['0', '0', '0', '0', '0'], }, { From c3513491863ded5509366facbb03c710142da5fb Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 14:20:00 +0800 Subject: [PATCH 058/122] fix(nocodb): use strftime for sqlite date time sql --- .../lib/sql/functionMappings/sqlite.ts | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts index 81abddfc2c..d95430e26b 100644 --- a/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts +++ b/packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/functionMappings/sqlite.ts @@ -109,33 +109,28 @@ const sqlite3 = { const unit = convertUnits(rawUnit, 'sqlite'); switch (unit) { case 'seconds': - sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 86400)`; + sql = `(strftime('%s', ${datetime_expr1}) - strftime('%s', ${datetime_expr2}))`; break; case 'minutes': - sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 1440)`; + sql = `(strftime('%s', ${datetime_expr1}) - strftime('%s', ${datetime_expr2})) / 60`; break; case 'hours': - sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 24)`; + sql = `(strftime('%s', ${datetime_expr1}) - strftime('%s', ${datetime_expr2})) / 3600`; break; case 'milliseconds': - sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) * 86400000)`; + sql = `(strftime('%s', ${datetime_expr1}) - strftime('%s', ${datetime_expr2})) * 1000`; break; case 'weeks': sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 7)`; break; case 'months': - sql = `(ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365)) - * 12 + (ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365 / 12))`; + sql = `(strftime('%Y', ${datetime_expr1}) - strftime('%Y', ${datetime_expr2})) * 12 + (strftime('%m', ${datetime_expr1}) - strftime('%m', ${datetime_expr2})) `; break; case 'quarters': - sql = ` - ROUND((JULIANDAY(${datetime_expr1})) / 365 / 4) - - ROUND((JULIANDAY(${datetime_expr2})) / 365 / 4) + - (ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365)) * 4 - `; + sql = `(strftime('%Y', ${datetime_expr1}) - strftime('%Y', ${datetime_expr2})) * 4 + (strftime('%m', ${datetime_expr1}) - strftime('%m', ${datetime_expr2})) / 3`; break; case 'years': - sql = `ROUND((JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})) / 365)`; + sql = `strftime('%Y', ${datetime_expr1}) - strftime('%Y', ${datetime_expr2})`; break; case 'days': sql = `JULIANDAY(${datetime_expr1}) - JULIANDAY(${datetime_expr2})`; From 1f2227cb4b87d2111dd7e0054596df919e8cd5f9 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 16:08:37 +0800 Subject: [PATCH 059/122] chore(workflows): remove unused code --- .github/workflows/release-executables.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/release-executables.yml b/.github/workflows/release-executables.yml index 3388645b31..ce51d10f5a 100644 --- a/.github/workflows/release-executables.yml +++ b/.github/workflows/release-executables.yml @@ -21,14 +21,6 @@ jobs: build-executables: runs-on: ubuntu-latest steps: - # Get the latest draft release for asset upload url - - uses: cardinalby/git-get-release-action@v1 - id: get_release - env: - GITHUB_TOKEN: ${{ secrets.NC_GITHUB_TOKEN }} - with: - latest: 1 - draft: true - uses: actions/checkout@v3 - name: Cache node modules id: cache-npm @@ -124,8 +116,6 @@ jobs: name: ${{ github.event.inputs.tag || inputs.tag }} path: scripts/pkg-executable/mac-dist retention-days: 1 - outputs: - upload_url: ${{ steps.get_release.outputs.upload_url }} sign-mac-executables: runs-on: macos-latest needs: build-executables From 6a98ea8e3bf4fdeab9305b35602ce3281dc2ce64 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 16:20:10 +0800 Subject: [PATCH 060/122] chore(nc-gui): lint --- packages/nc-gui/components/cell/SingleSelect.vue | 2 +- packages/nc-gui/nuxt.config.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/cell/SingleSelect.vue b/packages/nc-gui/components/cell/SingleSelect.vue index 60c6387fba..521b1e3657 100644 --- a/packages/nc-gui/components/cell/SingleSelect.vue +++ b/packages/nc-gui/components/cell/SingleSelect.vue @@ -257,4 +257,4 @@ const toggleMenu = (e: Event) => { :deep(.ant-select-clear) { opacity: 1; } - \ No newline at end of file + diff --git a/packages/nc-gui/nuxt.config.ts b/packages/nc-gui/nuxt.config.ts index 6f9e7ecb82..e8ee592be4 100644 --- a/packages/nc-gui/nuxt.config.ts +++ b/packages/nc-gui/nuxt.config.ts @@ -139,8 +139,8 @@ export default defineNuxtConfig({ }), monacoEditorPlugin({ languageWorkers: ['json'], - customDistPath: (root: string, buildOutDir: string, base: string) => { - return buildOutDir + '/' + 'monacoeditorwork' + customDistPath: (root: string, buildOutDir: string) => { + return `${buildOutDir}/` + `monacoeditorwork` }, }), PurgeIcons({ From e9055349d18ae268cfb9a72e3b03e5a0ec1fae9c Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 16:20:19 +0800 Subject: [PATCH 061/122] chore(nocodb): lint --- .../nocodb/src/lib/meta/api/sync/helpers/job.ts | 2 +- packages/nocodb/src/lib/models/Model.ts | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts index f6ac2d1227..faf59c603f 100644 --- a/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts +++ b/packages/nocodb/src/lib/meta/api/sync/helpers/job.ts @@ -1468,7 +1468,7 @@ export default async ( rec[key] = JSON.stringify(tempArr); } break; - + case UITypes.SingleLineText: // Barcode data if (value?.text) { diff --git a/packages/nocodb/src/lib/models/Model.ts b/packages/nocodb/src/lib/models/Model.ts index a8fe688707..03f844d596 100644 --- a/packages/nocodb/src/lib/models/Model.ts +++ b/packages/nocodb/src/lib/models/Model.ts @@ -392,11 +392,16 @@ export default class Model implements TableType { } if (force) { - const leftOverColumns = await ncMeta.metaList2(null, null, MetaTable.COL_RELATIONS, { - condition: { - fk_related_model_id: this.id, - }, - }); + const leftOverColumns = await ncMeta.metaList2( + null, + null, + MetaTable.COL_RELATIONS, + { + condition: { + fk_related_model_id: this.id, + }, + } + ); for (const col of leftOverColumns) { await NocoCache.deepDel( @@ -410,7 +415,7 @@ export default class Model implements TableType { fk_related_model_id: this.id, }); } - + await NocoCache.deepDel( CacheScope.COLUMN, `${CacheScope.COLUMN}:${this.id}`, From 836c1c4dacff5c6c17afae14f2c86f5ded7adabb Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 12 Jan 2023 14:35:06 +0530 Subject: [PATCH 062/122] docs: enterprise license key --- .../content/en/setup-and-usages/account-settings.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/noco-docs/content/en/setup-and-usages/account-settings.md b/packages/noco-docs/content/en/setup-and-usages/account-settings.md index 8a33edb0db..3d28cbc476 100644 --- a/packages/noco-docs/content/en/setup-and-usages/account-settings.md +++ b/packages/noco-docs/content/en/setup-and-usages/account-settings.md @@ -45,4 +45,10 @@ Signup without an invitation is disabled by default and can be managed from UI b You can also manage the app store plugins here. -![image](https://user-images.githubusercontent.com/35857179/203267619-24a8f5f5-1c8c-4419-a7a1-be4377fe6216.png) \ No newline at end of file +![image](https://user-images.githubusercontent.com/35857179/203267619-24a8f5f5-1c8c-4419-a7a1-be4377fe6216.png) + +## License + +You can configure NocoDB Enterprise `License key` here + +![Screenshot 2023-01-12 at 2 30 57 PM](https://user-images.githubusercontent.com/86527202/212023989-0129af0a-689d-465e-bdda-3d54399ea6b7.png) From 49a93886df1b875fef42e26b88cee0987c9b7ae1 Mon Sep 17 00:00:00 2001 From: wingkwong Date: Thu, 12 Jan 2023 09:10:16 +0000 Subject: [PATCH 063/122] [create-pull-request] automated change Signed-off-by: GitHub --- packages/nc-gui/package-lock.json | 54 +++++++++++++++++++------------ packages/nc-gui/package.json | 2 +- packages/nc-lib-gui/package.json | 2 +- packages/nocodb-sdk/package.json | 2 +- packages/nocodb/package-lock.json | 50 +++++++++++++--------------- packages/nocodb/package.json | 8 ++--- 6 files changed, 63 insertions(+), 55 deletions(-) diff --git a/packages/nc-gui/package-lock.json b/packages/nc-gui/package-lock.json index 5a431d9adb..938eb57bfc 100644 --- a/packages/nc-gui/package-lock.json +++ b/packages/nc-gui/package-lock.json @@ -29,7 +29,7 @@ "jwt-decode": "^3.1.2", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.101.0", "papaparse": "^5.3.2", "qrcode": "^1.5.1", "socket.io-client": "^4.5.1", @@ -95,7 +95,8 @@ } }, "../nocodb-sdk": { - "version": "0.101.0-beta.0", + "version": "0.101.0", + "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -8543,7 +8544,6 @@ "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", - "devOptional": true, "funding": [ { "type": "individual", @@ -11959,8 +11959,21 @@ } }, "node_modules/nocodb-sdk": { - "resolved": "../nocodb-sdk", - "link": true + "version": "0.101.0", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", + "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", + "dependencies": { + "axios": "^0.21.1", + "jsep": "^1.3.6" + } + }, + "node_modules/nocodb-sdk/node_modules/axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "dependencies": { + "follow-redirects": "^1.14.0" + } }, "node_modules/node-abi": { "version": "3.23.0", @@ -23924,8 +23937,7 @@ "follow-redirects": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", - "devOptional": true + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" }, "form-data": { "version": "4.0.0", @@ -26398,22 +26410,22 @@ } }, "nocodb-sdk": { - "version": "file:../nocodb-sdk", + "version": "0.101.0", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", + "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", "requires": { - "@typescript-eslint/eslint-plugin": "^4.0.1", - "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "cspell": "^4.1.0", - "eslint": "^7.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-functional": "^3.0.2", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-prettier": "^4.0.0", - "jsep": "^1.3.6", - "npm-run-all": "^4.1.5", - "prettier": "^2.1.1", - "typescript": "^4.0.2" + "jsep": "^1.3.6" + }, + "dependencies": { + "axios": { + "version": "0.21.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", + "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", + "requires": { + "follow-redirects": "^1.14.0" + } + } } }, "node-abi": { diff --git a/packages/nc-gui/package.json b/packages/nc-gui/package.json index 49a6c5a9a0..4c52439c96 100644 --- a/packages/nc-gui/package.json +++ b/packages/nc-gui/package.json @@ -52,7 +52,7 @@ "jwt-decode": "^3.1.2", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.101.0", "papaparse": "^5.3.2", "qrcode": "^1.5.1", "socket.io-client": "^4.5.1", diff --git a/packages/nc-lib-gui/package.json b/packages/nc-lib-gui/package.json index 3cb3caa971..df9ba94834 100644 --- a/packages/nc-lib-gui/package.json +++ b/packages/nc-lib-gui/package.json @@ -1,6 +1,6 @@ { "name": "nc-lib-gui", - "version": "0.101.0-beta.0", + "version": "0.101.0", "description": "NocoDB GUI", "author": { "name": "NocoDB", diff --git a/packages/nocodb-sdk/package.json b/packages/nocodb-sdk/package.json index 97884cc492..788f971aa1 100644 --- a/packages/nocodb-sdk/package.json +++ b/packages/nocodb-sdk/package.json @@ -1,6 +1,6 @@ { "name": "nocodb-sdk", - "version": "0.101.0-beta.0", + "version": "0.101.0", "description": "NocoDB SDK", "main": "build/main/index.js", "typings": "build/main/index.d.ts", diff --git a/packages/nocodb/package-lock.json b/packages/nocodb/package-lock.json index 2c97848494..6f4d012571 100644 --- a/packages/nocodb/package-lock.json +++ b/packages/nocodb/package-lock.json @@ -1,12 +1,12 @@ { "name": "nocodb", - "version": "0.101.0-beta.0", + "version": "0.101.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "nocodb", - "version": "0.101.0-beta.0", + "version": "0.101.0", "license": "AGPL-3.0-or-later", "dependencies": { "@google-cloud/storage": "^5.7.2", @@ -65,10 +65,10 @@ "mysql2": "^2.2.5", "nanoid": "^3.1.20", "nc-help": "0.2.85", - "nc-lib-gui": "0.101.0-beta.0", + "nc-lib-gui": "0.101.0", "nc-plugin": "0.1.2", "ncp": "^2.0.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.101.0", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^5.0.0", @@ -153,7 +153,8 @@ } }, "../nocodb-sdk": { - "version": "0.101.0-beta.0", + "version": "0.101.0", + "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -11161,9 +11162,9 @@ } }, "node_modules/nc-lib-gui": { - "version": "0.101.0-beta.0", - "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.101.0-beta.0.tgz", - "integrity": "sha512-7NuNn16fYm397ZcdqDY21f2smydPzk6gog9qZm8UdDn5i3Y49OnlGwpUWkqFX+ZM4T18uJ3rd+1Fe2T2sKWrWg==", + "version": "0.101.0", + "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.101.0.tgz", + "integrity": "sha512-25sDt2KKlJNq2wFpi+97OZfG2WTNfBPIafN57MV0bIJ6OH3168hIUbSOwhY+Q4dujtKZw3goq6X2OX2Y/P9FHg==", "dependencies": { "express": "^4.17.1" } @@ -11222,8 +11223,13 @@ "dev": true }, "node_modules/nocodb-sdk": { - "resolved": "../nocodb-sdk", - "link": true + "version": "0.101.0", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", + "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", + "dependencies": { + "axios": "^0.21.1", + "jsep": "^1.3.6" + } }, "node_modules/node-abort-controller": { "version": "3.0.1", @@ -27687,9 +27693,9 @@ } }, "nc-lib-gui": { - "version": "0.101.0-beta.0", - "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.101.0-beta.0.tgz", - "integrity": "sha512-7NuNn16fYm397ZcdqDY21f2smydPzk6gog9qZm8UdDn5i3Y49OnlGwpUWkqFX+ZM4T18uJ3rd+1Fe2T2sKWrWg==", + "version": "0.101.0", + "resolved": "https://registry.npmjs.org/nc-lib-gui/-/nc-lib-gui-0.101.0.tgz", + "integrity": "sha512-25sDt2KKlJNq2wFpi+97OZfG2WTNfBPIafN57MV0bIJ6OH3168hIUbSOwhY+Q4dujtKZw3goq6X2OX2Y/P9FHg==", "requires": { "express": "^4.17.1" } @@ -27736,22 +27742,12 @@ "dev": true }, "nocodb-sdk": { - "version": "file:../nocodb-sdk", + "version": "0.101.0", + "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", + "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", "requires": { - "@typescript-eslint/eslint-plugin": "^4.0.1", - "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "cspell": "^4.1.0", - "eslint": "^7.8.0", - "eslint-config-prettier": "^6.11.0", - "eslint-plugin-eslint-comments": "^3.2.0", - "eslint-plugin-functional": "^3.0.2", - "eslint-plugin-import": "^2.22.0", - "eslint-plugin-prettier": "^4.0.0", - "jsep": "^1.3.6", - "npm-run-all": "^4.1.5", - "prettier": "^2.1.1", - "typescript": "^4.0.2" + "jsep": "^1.3.6" } }, "node-abort-controller": { diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index c80e5d63fa..5500739529 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -1,6 +1,6 @@ { "name": "nocodb", - "version": "0.101.0-beta.0", + "version": "0.101.0", "description": "NocoDB Backend", "main": "dist/bundle.js", "author": { @@ -105,10 +105,10 @@ "mysql2": "^2.2.5", "nanoid": "^3.1.20", "nc-help": "0.2.85", - "nc-lib-gui": "0.101.0-beta.0", + "nc-lib-gui": "0.101.0", "nc-plugin": "0.1.2", "ncp": "^2.0.0", - "nocodb-sdk": "file:../nocodb-sdk", + "nocodb-sdk": "0.101.0", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^5.0.0", @@ -183,4 +183,4 @@ "prettier": { "singleQuote": true } -} +} \ No newline at end of file From e878f81c43f503b365e98852c7b390dbd8bec52c Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Thu, 12 Jan 2023 18:05:37 +0800 Subject: [PATCH 064/122] chore: update sdk version --- packages/nc-gui/package-lock.json | 52 +++++++++++---------------- packages/nc-gui/package.json | 2 +- packages/nocodb-sdk/package-lock.json | 4 +-- packages/nocodb/package-lock.json | 30 +++++++++------- packages/nocodb/package.json | 4 +-- 5 files changed, 42 insertions(+), 50 deletions(-) diff --git a/packages/nc-gui/package-lock.json b/packages/nc-gui/package-lock.json index 938eb57bfc..ef84a011f4 100644 --- a/packages/nc-gui/package-lock.json +++ b/packages/nc-gui/package-lock.json @@ -29,7 +29,7 @@ "jwt-decode": "^3.1.2", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "0.101.0", + "nocodb-sdk": "file:../nocodb-sdk", "papaparse": "^5.3.2", "qrcode": "^1.5.1", "socket.io-client": "^4.5.1", @@ -96,7 +96,6 @@ }, "../nocodb-sdk": { "version": "0.101.0", - "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -8544,6 +8543,7 @@ "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "devOptional": true, "funding": [ { "type": "individual", @@ -11959,21 +11959,8 @@ } }, "node_modules/nocodb-sdk": { - "version": "0.101.0", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", - "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", - "dependencies": { - "axios": "^0.21.1", - "jsep": "^1.3.6" - } - }, - "node_modules/nocodb-sdk/node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dependencies": { - "follow-redirects": "^1.14.0" - } + "resolved": "../nocodb-sdk", + "link": true }, "node_modules/node-abi": { "version": "3.23.0", @@ -23937,7 +23924,8 @@ "follow-redirects": { "version": "1.15.1", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", - "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==" + "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", + "devOptional": true }, "form-data": { "version": "4.0.0", @@ -26410,22 +26398,22 @@ } }, "nocodb-sdk": { - "version": "0.101.0", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", - "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", + "version": "file:../nocodb-sdk", "requires": { + "@typescript-eslint/eslint-plugin": "^4.0.1", + "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "jsep": "^1.3.6" - }, - "dependencies": { - "axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "requires": { - "follow-redirects": "^1.14.0" - } - } + "cspell": "^4.1.0", + "eslint": "^7.8.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-functional": "^3.0.2", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-prettier": "^4.0.0", + "jsep": "^1.3.6", + "npm-run-all": "^4.1.5", + "prettier": "^2.1.1", + "typescript": "^4.0.2" } }, "node-abi": { diff --git a/packages/nc-gui/package.json b/packages/nc-gui/package.json index 4c52439c96..49a6c5a9a0 100644 --- a/packages/nc-gui/package.json +++ b/packages/nc-gui/package.json @@ -52,7 +52,7 @@ "jwt-decode": "^3.1.2", "locale-codes": "^1.3.1", "monaco-editor": "^0.33.0", - "nocodb-sdk": "0.101.0", + "nocodb-sdk": "file:../nocodb-sdk", "papaparse": "^5.3.2", "qrcode": "^1.5.1", "socket.io-client": "^4.5.1", diff --git a/packages/nocodb-sdk/package-lock.json b/packages/nocodb-sdk/package-lock.json index 309760dc50..47be503215 100644 --- a/packages/nocodb-sdk/package-lock.json +++ b/packages/nocodb-sdk/package-lock.json @@ -1,12 +1,12 @@ { "name": "nocodb-sdk", - "version": "0.101.0-beta.0", + "version": "0.101.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "nocodb-sdk", - "version": "0.101.0-beta.0", + "version": "0.101.0", "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", diff --git a/packages/nocodb/package-lock.json b/packages/nocodb/package-lock.json index 6f4d012571..30cc3fe7ee 100644 --- a/packages/nocodb/package-lock.json +++ b/packages/nocodb/package-lock.json @@ -68,7 +68,7 @@ "nc-lib-gui": "0.101.0", "nc-plugin": "0.1.2", "ncp": "^2.0.0", - "nocodb-sdk": "0.101.0", + "nocodb-sdk": "file:../nocodb-sdk", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^5.0.0", @@ -154,7 +154,6 @@ }, "../nocodb-sdk": { "version": "0.101.0", - "extraneous": true, "license": "AGPL-3.0-or-later", "dependencies": { "axios": "^0.21.1", @@ -11223,13 +11222,8 @@ "dev": true }, "node_modules/nocodb-sdk": { - "version": "0.101.0", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", - "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", - "dependencies": { - "axios": "^0.21.1", - "jsep": "^1.3.6" - } + "resolved": "../nocodb-sdk", + "link": true }, "node_modules/node-abort-controller": { "version": "3.0.1", @@ -27742,12 +27736,22 @@ "dev": true }, "nocodb-sdk": { - "version": "0.101.0", - "resolved": "https://registry.npmjs.org/nocodb-sdk/-/nocodb-sdk-0.101.0.tgz", - "integrity": "sha512-7TZ+ZlJq1DCW9lqf9yOFGGe9r9KuyFEzjxkrrcYigBgIb9I4ob+VGb/XbYIplhh73EeDFhxWLkC1lnTr1bWD5A==", + "version": "file:../nocodb-sdk", "requires": { + "@typescript-eslint/eslint-plugin": "^4.0.1", + "@typescript-eslint/parser": "^4.0.1", "axios": "^0.21.1", - "jsep": "^1.3.6" + "cspell": "^4.1.0", + "eslint": "^7.8.0", + "eslint-config-prettier": "^6.11.0", + "eslint-plugin-eslint-comments": "^3.2.0", + "eslint-plugin-functional": "^3.0.2", + "eslint-plugin-import": "^2.22.0", + "eslint-plugin-prettier": "^4.0.0", + "jsep": "^1.3.6", + "npm-run-all": "^4.1.5", + "prettier": "^2.1.1", + "typescript": "^4.0.2" } }, "node-abort-controller": { diff --git a/packages/nocodb/package.json b/packages/nocodb/package.json index 5500739529..1580154404 100644 --- a/packages/nocodb/package.json +++ b/packages/nocodb/package.json @@ -108,7 +108,7 @@ "nc-lib-gui": "0.101.0", "nc-plugin": "0.1.2", "ncp": "^2.0.0", - "nocodb-sdk": "0.101.0", + "nocodb-sdk": "file:../nocodb-sdk", "nodemailer": "^6.4.10", "object-hash": "^3.0.0", "os-locale": "^5.0.0", @@ -183,4 +183,4 @@ "prettier": { "singleQuote": true } -} \ No newline at end of file +} From 6c2b7ae449ece725e4731c2037d2eee1e858b6a2 Mon Sep 17 00:00:00 2001 From: Raju Udava <86527202+dstala@users.noreply.github.com> Date: Thu, 12 Jan 2023 20:13:27 +0530 Subject: [PATCH 065/122] refactor: 'Link To Another Record' instead of 'Child Table' Signed-off-by: Raju Udava <86527202+dstala@users.noreply.github.com> --- packages/nc-gui/components/smartsheet/column/LookupOptions.vue | 2 +- packages/nc-gui/components/smartsheet/column/RollupOptions.vue | 2 +- packages/nc-gui/lang/en.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/column/LookupOptions.vue b/packages/nc-gui/components/smartsheet/column/LookupOptions.vue index 0667cc7b9f..abd1ebaa0f 100644 --- a/packages/nc-gui/components/smartsheet/column/LookupOptions.vue +++ b/packages/nc-gui/components/smartsheet/column/LookupOptions.vue @@ -56,7 +56,7 @@ const columns = $computed(() => {