diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0d021b6272..c3ff829eb4 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -28,6 +28,33 @@ concurrency: cancel-in-progress: true jobs: + validate-swagger-json: + runs-on: ubuntu-20.04 + timeout-minutes: 10 + if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 1 + +# enable after fixing all validation errors +# - name: Validate OpenAPI definition +# uses: char0n/swagger-editor-validate@v1 +# with: +# swagger-editor-url: http://localhost/ +# definition-file: packages/nocodb/src/schema/swagger.json + + - name: Validate Swagger JSON + run: | + if ! jq empty packages/nocodb/src/schema/swagger.json; then + echo "swagger.json file is not valid JSON" + exit 1 + fi + if ! jq empty packages/nocodb/src/schema/swagger-v2.json; then + echo "swaggerv2.json file is not valid JSON" + exit 1 + fi unit-tests: runs-on: ubuntu-20.04 timeout-minutes: 40 @@ -45,7 +72,7 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: remove use-node-version from .npmrc + - name: remove use-node-version from .npmrc run: sed -i '/^use-node-version/d' .npmrc - name: Get pnpm store directory shell: bash @@ -80,8 +107,8 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: remove use-node-version from .npmrc - run: sed -i '/^use-node-version/d' .npmrc + - name: remove use-node-version from .npmrc + run: sed -i '/^use-node-version/d' .npmrc - name: Get pnpm store directory shell: bash run: | @@ -134,7 +161,7 @@ jobs: uses: ./.github/workflows/playwright-test-workflow.yml with: db: mysql - shard: 4 + shard: 4 playwright-sqlite-1: needs: pre-build-for-playwright if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -162,7 +189,7 @@ jobs: uses: ./.github/workflows/playwright-test-workflow.yml with: db: sqlite - shard: 4 + shard: 4 playwright-pg-shard-1: needs: pre-build-for-playwright if: ${{ github.event_name == 'push' || contains(github.event.pull_request.labels.*.name, 'trigger-CI') || !github.event.pull_request.draft }} @@ -190,4 +217,4 @@ jobs: uses: ./.github/workflows/playwright-test-workflow.yml with: db: pg - shard: 4 \ No newline at end of file + shard: 4 diff --git a/.github/workflows/unit-test.yml b/.github/workflows/unit-test.yml index 00498b7928..38c2ed6b3b 100644 --- a/.github/workflows/unit-test.yml +++ b/.github/workflows/unit-test.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: 18.19.0 # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: diff --git a/docker-compose/traefik/docker-compose.yml b/docker-compose/traefik/docker-compose.yml index b02b03bad7..5d4115d615 100644 --- a/docker-compose/traefik/docker-compose.yml +++ b/docker-compose/traefik/docker-compose.yml @@ -34,7 +34,7 @@ services: retries: 10 test: "pg_isready -U ${DATABASE_USER} -d ${DATABASE_NAME}" timeout: 2s - image: "postgres:12.1-alpine" + image: "postgres:12.17-alpine" networks: - traefik_proxy restart: always @@ -71,7 +71,7 @@ services: - "-c" - "http://localhost:8081/ping" timeout: 3s - image: "traefik:v2.2" + image: "traefik:v2.11" networks: - default - traefik_proxy diff --git a/package.json b/package.json index e9f7a325cf..3a6c54469d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "fs": "0.0.1-security", "lerna": "^7.4.2", "husky": "^8.0.3", - "xlsx": "^0.17.5" + "xlsx": "https://cdn.sheetjs.com/xlsx-0.19.3/xlsx-0.19.3.tgz" }, "husky": { "hooks": { @@ -47,7 +47,16 @@ "pnpm": { "overrides": { "vue": "3.3.13", - "typescript": "latest" + "typescript": "latest", + "ajv@<6.12.3": ">=6.12.3", + "node.extend@<1.1.7": ">=1.1.7", + "tough-cookie@<4.1.3": ">=4.1.3", + "@babel/traverse@<7.23.2": ">=7.23.2", + "follow-redirects@<1.15.4": ">=1.15.4", + "axios@>=0.8.1 <0.28.0": ">=0.28.0", + "ip@<1.1.9": ">=1.1.9", + "ip@=2.0.0": ">=2.0.1", + "xml2js@<0.5.0": ">=0.5.0" } } } diff --git a/packages/nc-gui/assets/nc-icons/arrow-left.svg b/packages/nc-gui/assets/nc-icons/arrow-left.svg new file mode 100644 index 0000000000..31d190cef8 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/arrow-left.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/packages/nc-gui/assets/nc-icons/arrow-right.svg b/packages/nc-gui/assets/nc-icons/arrow-right.svg new file mode 100644 index 0000000000..9e95a99f1b --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/arrow-right.svg @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/packages/nc-gui/assets/nc-icons/cell-attachment.svg b/packages/nc-gui/assets/nc-icons/cell-attachment.svg new file mode 100644 index 0000000000..0d14c80304 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-attachment.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-barcode.svg b/packages/nc-gui/assets/nc-icons/cell-barcode.svg new file mode 100644 index 0000000000..e1736db956 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-barcode.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-checkbox.svg b/packages/nc-gui/assets/nc-icons/cell-checkbox.svg new file mode 100644 index 0000000000..c7dfdfb14f --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-checkbox.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-currency.svg b/packages/nc-gui/assets/nc-icons/cell-currency.svg new file mode 100644 index 0000000000..f4886aee03 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-currency.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-date.svg b/packages/nc-gui/assets/nc-icons/cell-date.svg new file mode 100644 index 0000000000..c5df544962 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-date.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-datetime.svg b/packages/nc-gui/assets/nc-icons/cell-datetime.svg new file mode 100644 index 0000000000..859720d9e8 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-datetime.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-db.svg b/packages/nc-gui/assets/nc-icons/cell-db.svg new file mode 100644 index 0000000000..53d8ccc922 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-db.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-decimal.svg b/packages/nc-gui/assets/nc-icons/cell-decimal.svg new file mode 100644 index 0000000000..4d5db110a1 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-decimal.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-duration.svg b/packages/nc-gui/assets/nc-icons/cell-duration.svg new file mode 100644 index 0000000000..d8e5fe8372 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-duration.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-email.svg b/packages/nc-gui/assets/nc-icons/cell-email.svg new file mode 100644 index 0000000000..1bf0267b34 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-email.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-formula.svg b/packages/nc-gui/assets/nc-icons/cell-formula.svg new file mode 100644 index 0000000000..169d829606 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-formula.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-geometry.svg b/packages/nc-gui/assets/nc-icons/cell-geometry.svg new file mode 100644 index 0000000000..4126148ebf --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-geometry.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-json.svg b/packages/nc-gui/assets/nc-icons/cell-json.svg new file mode 100644 index 0000000000..c613327dfc --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-json.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-link.svg b/packages/nc-gui/assets/nc-icons/cell-link.svg new file mode 100644 index 0000000000..c2427ff00e --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-link.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-longtext.svg b/packages/nc-gui/assets/nc-icons/cell-longtext.svg new file mode 100644 index 0000000000..bfdb92ae92 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-longtext.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-lookup.svg b/packages/nc-gui/assets/nc-icons/cell-lookup.svg new file mode 100644 index 0000000000..d77c7e1a69 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-lookup.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-multiselect.svg b/packages/nc-gui/assets/nc-icons/cell-multiselect.svg new file mode 100644 index 0000000000..c1eaf56f58 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-multiselect.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-number.svg b/packages/nc-gui/assets/nc-icons/cell-number.svg new file mode 100644 index 0000000000..04a8149bbd --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-number.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-percentage.svg b/packages/nc-gui/assets/nc-icons/cell-percentage.svg new file mode 100644 index 0000000000..bd53dc96c5 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-percentage.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-phone.svg b/packages/nc-gui/assets/nc-icons/cell-phone.svg new file mode 100644 index 0000000000..cebfd82713 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-qrcode.svg b/packages/nc-gui/assets/nc-icons/cell-qrcode.svg new file mode 100644 index 0000000000..4e10fc7aac --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-qrcode.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-rating.svg b/packages/nc-gui/assets/nc-icons/cell-rating.svg new file mode 100644 index 0000000000..e52116a748 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-rating.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-rollup.svg b/packages/nc-gui/assets/nc-icons/cell-rollup.svg new file mode 100644 index 0000000000..6730c17e5d --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-rollup.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-select.svg b/packages/nc-gui/assets/nc-icons/cell-select.svg new file mode 100644 index 0000000000..a19b1801e6 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-select.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-text.svg b/packages/nc-gui/assets/nc-icons/cell-text.svg new file mode 100644 index 0000000000..9af97b17a4 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-text.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-time.svg b/packages/nc-gui/assets/nc-icons/cell-time.svg new file mode 100644 index 0000000000..8df7a2cda8 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-time.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-url.svg b/packages/nc-gui/assets/nc-icons/cell-url.svg new file mode 100644 index 0000000000..781af1c05c --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-url.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/cell-user.svg b/packages/nc-gui/assets/nc-icons/cell-user.svg new file mode 100644 index 0000000000..60f73b5442 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/cell-user.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/circle-check.svg b/packages/nc-gui/assets/nc-icons/circle-check.svg new file mode 100644 index 0000000000..ffa3ea1303 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/circle-check.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/system-date.svg b/packages/nc-gui/assets/nc-icons/system-date.svg new file mode 100644 index 0000000000..c9e3333ff8 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/system-date.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/system-key.svg b/packages/nc-gui/assets/nc-icons/system-key.svg new file mode 100644 index 0000000000..f2c3ed467b --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/system-key.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/nc-gui/assets/nc-icons/system-text.svg b/packages/nc-gui/assets/nc-icons/system-text.svg new file mode 100644 index 0000000000..23616c84eb --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/system-text.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/packages/nc-gui/assets/nc-icons/system-user.svg b/packages/nc-gui/assets/nc-icons/system-user.svg new file mode 100644 index 0000000000..a4316e1f09 --- /dev/null +++ b/packages/nc-gui/assets/nc-icons/system-user.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/packages/nc-gui/assets/style.scss b/packages/nc-gui/assets/style.scss index 8ea1d047ca..4b195ee081 100644 --- a/packages/nc-gui/assets/style.scss +++ b/packages/nc-gui/assets/style.scss @@ -784,4 +784,5 @@ svg.nc-cell-icon, svg.nc-virtual-cell-icon { @apply !flex !pl-4 max-w-[calc(100%_-_16px)]; } } -} \ No newline at end of file +} + diff --git a/packages/nc-gui/components/account/Profile.vue b/packages/nc-gui/components/account/Profile.vue index 30fbc61c7d..8aeaed23a5 100644 --- a/packages/nc-gui/components/account/Profile.vue +++ b/packages/nc-gui/components/account/Profile.vue @@ -94,7 +94,7 @@ const onValidate = async (_: any, valid: boolean) => { diff --git a/packages/nc-gui/components/account/Token.vue b/packages/nc-gui/components/account/Token.vue index 9c3d612fb0..70ede150e8 100644 --- a/packages/nc-gui/components/account/Token.vue +++ b/packages/nc-gui/components/account/Token.vue @@ -312,17 +312,17 @@ const handleCancel = () => { class="flex pl-5 py-3 justify-between token items-center border-l-1 border-r-1 border-b-1" > - + {{ el.description }} - + {{ el.created_by }} - + {{ el.token }} ************************************ diff --git a/packages/nc-gui/components/account/UserList.vue b/packages/nc-gui/components/account/UserList.vue index 410e23e820..87458a8467 100644 --- a/packages/nc-gui/components/account/UserList.vue +++ b/packages/nc-gui/components/account/UserList.vue @@ -239,11 +239,11 @@ const openDeleteModal = (user: UserType) => { - + {{ el.display_name }} - + {{ el.email }} diff --git a/packages/nc-gui/components/account/UserMenu.vue b/packages/nc-gui/components/account/UserMenu.vue index f125eeae3b..7fb5e180aa 100644 --- a/packages/nc-gui/components/account/UserMenu.vue +++ b/packages/nc-gui/components/account/UserMenu.vue @@ -4,7 +4,7 @@ import type { UsersSortType } from '~/lib' const { field, direction, handleUserSort } = defineProps<{ field: UsersSortType['field'] - direction: UsersSortType['direction'] + direction?: UsersSortType['direction'] handleUserSort: Function }>() diff --git a/packages/nc-gui/components/cell/Checkbox.vue b/packages/nc-gui/components/cell/Checkbox.vue index 38bc569923..efa710d539 100644 --- a/packages/nc-gui/components/cell/Checkbox.vue +++ b/packages/nc-gui/components/cell/Checkbox.vue @@ -4,6 +4,7 @@ import { ColumnInj, EditColumnInj, IsFormInj, + IsSurveyFormInj, ReadonlyInj, getMdiIcon, inject, @@ -44,6 +45,8 @@ const isExpandedFormOpen = inject(IsExpandedFormOpenInj, ref(false)) const rowHeight = inject(RowHeightInj, ref()) +const isSurveyForm = inject(IsSurveyFormInj, ref(false)) + const checkboxMeta = computed(() => { return { icon: { @@ -98,7 +101,8 @@ useSelectedCellKeyupListener(active, (e) => { }" :tabindex="readOnly ? -1 : 0" @click="onClick(false, $event)" - @keydown.enter.stop="onClick(true, $event)" + @keydown.enter.stop="!isSurveyForm ? onClick(true, $event) : undefined" + @keydown.space.stop="isSurveyForm ? onClick(true, $event) : undefined" >
parseProp(columnMeta?.value?.meta)?.date_format ?? 'YYYY-MM-DD') @@ -98,7 +103,9 @@ watch( ) const placeholder = computed(() => { - if (isEditColumn.value && (modelValue === '' || modelValue === null)) { + if (isForm.value && !isDateInvalid.value) { + return dateFormat.value + } else if (isEditColumn.value && (modelValue === '' || modelValue === null)) { return t('labels.optional') } else if (modelValue === null && showNull.value) { return t('general.null').toUpperCase() @@ -232,6 +239,22 @@ const clickHandler = () => { } cellClickHandler() } + +const handleKeydown = (e: KeyboardEvent) => { + switch (e.key) { + case ' ': + if (isSurveyForm.value) { + open.value = !open.value + } + break + + case 'Enter': + if (!isSurveyForm.value) { + open.value = !open.value + } + break + } +}