925 Commits

Author SHA1 Message Date
Marc-Roig
a86c75effa
v5.0.0-beta.7 2024-05-08 16:33:08 +02:00
Ben Irvin
2264b66ec3
fix(database): drop foreign keys before dropping indexes 2024-05-02 19:18:31 +02:00
Marc-Roig
6c76c1b8c2
v5.0.0-beta.6 2024-05-02 16:01:39 +02:00
Alexandre Bodin
3e1be288b8 chore: add fs-extra types where needed 2024-04-26 11:15:51 +02:00
Alexandre Bodin
89b8013624 chore: update utility deps 2024-04-26 09:32:10 +02:00
Marc Roig
58f553ab42
fix: doc id migration for mysql (#20174)
* fix: doc id migration for mysql

* feat: mysql subquery
2024-04-25 14:10:47 +02:00
Mark Kaylor
2aa7d7fb41 v5.0.0-beta.5 2024-04-24 15:52:25 +02:00
Convly
eecdc83f34 Merge branch 'refs/heads/releases/5.0.0-beta.4' into v5/main 2024-04-17 15:53:17 +02:00
Convly
a9b61589c8 chore: update dependencies to 5.0.0-beta.4 2024-04-17 15:43:36 +02:00
Marc Roig
76447298a8
feat: migrate document published entries from v4 (#19813)
* chore: add document-id migration

* feat: migration file

* chore: change migration name

* feat: document draft creation

* fix: use knex to query

* feat: discard drafts

* fix: use database identifiers utils

* fix: leave rename identifiers migration name as it was before

* chore: revert database config

* feat: simplify migration document ids query

* update with subquery

* chore: comment todo on create draft migration

* chore: remove draft creation migration

* feat: register internal migrations dynamically (#20002)

* feat: register internal migrations dynamically

* chore: load umzug lazily

* chore: lazy load umzugProvider migrations

* feat: register internal migrations dynamically (#20006)

* feat: register internal migrations dynamically

* chore: load umzug lazily

* chore: lazy load umzugProvider migrations

* feat: discard draft migration from strapi core

* fix: unit test

* fix: make discardDraft inline

* fix: prettier

* fix: remove unused code

* fix: ignore tables that do not exist

* fix: build

* chore: remove comment

---------

Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2024-04-17 13:41:44 +02:00
Josh
bc71a96d76
chore(pack-up): remove from monorepo (v5) (#20092)
* chore(pack-up): remove from repo

* chore: type fixes

* chore: add suggestions to tighten types

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
2024-04-12 13:39:49 +01:00
Alexandre Bodin
cff608ed92 v5.0.0-beta.3 2024-04-10 19:09:43 +02:00
Alexandre Bodin
43a32432fc fix: v4-v5 conflict in polymorphic relations 2024-04-08 19:27:59 +02:00
Josh
e188aac623 Merge branch 'develop' into v5/main 2024-04-08 15:21:08 +01:00
Alexandre Bodin
2fe3160287 Merge branch 'releases/4.22.1' into develop 2024-04-05 08:31:44 +02:00
Alexandre Bodin
009bd52a1a v4.22.1 2024-04-05 08:20:38 +02:00
Alexandre BODIN
79f8c92d52
Merge pull request #19971 from strapi/fix/issue-12225
feat: support media deep filtering & relation shortcut filters
2024-04-04 11:57:30 +02:00
Alexandre BODIN
54c5072bd1
Update packages/core/database/src/query/helpers/where.ts
Co-authored-by: Jean-Sébastien Herbaux <jean-sebastien.herbaux@epitech.eu>
2024-04-04 11:57:23 +02:00
Alexandre Bodin
13a7fe96d1 v5.0.0-beta.2 2024-04-03 17:35:15 +02:00
Alexandre BODIN
1122223fae
chore: add document-id migration (#19514)
* chore: add document-id migration

* fix: use database identifiers utils

* fix: leave rename identifiers migration name as it was before

* chore: revert database config

* feat: simplify migration document ids query

* update with subquery

---------

Co-authored-by: Marc-Roig <marc12info@gmail.com>
Co-authored-by: Marc Roig <marc.roig.campos@strapi.io>
2024-04-03 15:53:24 +02:00
Mark Kaylor
45fb7bc16d v4.22.0 2024-04-03 09:06:13 -04:00
Alexandre Bodin
2bcdab485d feat: support media deept filtering & relation shortcut filters 2024-04-03 12:43:12 +02:00
Jamie Howard
43b9e91c67
feat(i18n): non localized fields (#19720)
* feat(i18n): wip non localized fields

* feat(i18n): use document service middleware for non localized fields

* feat(i18n): support component data in non localized sync

* chore(i18n): cleanup and fix unit tests

* fix(i18n): reintroduce permissions sync

* test(i18n): api test for non localized fields

* feat(i18n): add earth icon to symbolise localised fields (#19774)

* test(i18n): cover publish, unpublish, update and create in api tests

* feat(i18n): ensure non localized fields are populated

* fix(i18n): get right id

* fix(content-manager): doc metadata in non d&p cases

* fix(conent-manager): i18n detection

* fix: pr feedback

* fix(i18n): handle non localized components

* feat(i18n): sync non localized components

* fix(i18n): wip unit test

* feat(i18n): handle relations within non localized components

* feat(i18n): reintroduce FE and fix for repeatables

* chore: lockfile

* chore(i18n): cleanup

* chore(i18n): cleanup

* feat(i18n): match relation locales to source entry during transformation

* fix(i18n): unit tests

* fix(i18n): getNonLocalizedAttributes

* chore(i18n): fix unit tests

* chore(i18n): pr feedback

* chore(i18n): pr feedback

* fix(i18n): unit tests

---------

Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
2024-04-02 10:08:10 +01:00
Ben Irvin
b003dee48e
chore: upgrade prettier to 3.2.5 2024-03-29 14:39:52 +01:00
Marc-Roig
a45a0cfabf chore: release 5.0.0-beta.1
Co-Authored-By: Marc Roig <20578351+Marc-Roig@users.noreply.github.com>
2024-03-27 16:22:20 +00:00
Convly
32d9b66e63 v4.21.1 2024-03-27 16:53:59 +01:00
Ben Irvin
fd7c075839
enhancement(database)!: shorten db identifies and add internal migration 2024-03-25 18:02:30 +01:00
Alexandre Bodin
4b2e592f77 v5.0.0-beta.0 2024-03-20 16:00:06 +01:00
Alexandre Bodin
894c8f40f3 v5.0.0-alpha.5 2024-03-20 15:54:53 +01:00
Alexandre Bodin
d536f44a9a v5.0.0-alpha.4 2024-03-20 15:44:45 +01:00
Marc Roig
024626cf43
Releases/4.21.0 (#19854) 2024-03-20 15:12:40 +01:00
Alexandre Bodin
1c6cf2ae9f v5.0.0-alpha.3 2024-03-20 15:08:03 +01:00
Alexandre Bodin
7f3ccd6b24 v5.0.0-alpha.2 2024-03-19 23:16:28 +01:00
Alexandre Bodin
00d0f90934 5.0.0-alpha.1 2024-03-19 23:12:32 +01:00
Alexandre Bodin
db34007a2f release: 5.0.0-alpha.0 2024-03-19 10:34:28 +01:00
Josh
7dc4206d08 Merge branch 'develop' into v5/main 2024-03-15 16:11:49 +00:00
Marc Roig
201de5ad3c
feat: document service clone cleanup (#19765) 2024-03-15 14:48:12 +01:00
Alexandre Bodin
a95285578b chore: database enhancements 2024-03-13 22:13:40 +01:00
Mark Kaylor
7a2a86e65f v4.20.5 2024-03-13 15:49:11 +01:00
Marc-Roig
423134764d
Merge branch 'v5/main' into v5/disable-dp 2024-03-12 18:32:44 +01:00
Marc Roig
f7d9269c38
feat: relations no dp (#19682) 2024-03-12 18:20:17 +01:00
Alexandre Bodin
8d53207f8e chore: remove template configuration from utils 2024-03-09 13:08:41 +01:00
Convly
f37fdb46ce v4.20.4 2024-03-06 16:31:53 +01:00
Rémi de Juvigny
8294852592 Merge remote-tracking branch 'origin/v5/main' into v5/history 2024-02-29 11:48:35 +01:00
Rémi de Juvigny
1307b18e6a
chore: merge draft & publish into history (#19632)
* fix: prevent infinite loop opening pool connections in mysql

* test(database): init unit tests for createMetadata

* feat(cm): D&P pt2 (#19380)

* feat: return metadata on content manager endpoints (#19361)

* feat: return metadata on content manager endpoints

* feat: return meta

* fix: cm tests

* feat: fix cm metadata api tests (#19375)

* feat: return metadata on content manager endpoints

* feat: return meta

* fix: cm tests

* fix: admin test

* chore(cm): refactor CM (#19341)

* chore(cm): refactor EditView

comes with a host of new re-usable APIs!

* feat(cm): add useDocument hook

* feat(cm): add useDocumentOperations hook

* feat(cm): initialise EditView header

* feat(cm): add useDocumentLayout hook

* fix: listView from layout refactor

* chore(cm): refactor editview form input renderer

* chore: fix lint & ts

* fix: re-add custom fields

* test: fix admin/CM unit tests

* docs(cm): add docs at a high level of how the CM works

* test: add useDocumentRBAC tests

* chore: pr amends

* feat: add addEditViewSidePanel API to strapi (#19398)

* feat: add addEditViewSidePanel API to strapi

fix: don't pass all the query params to the create route

* chore: pr amends

* fix: return available status when content type doesnt have i18n enabled (#19419)

* fix: return available status when content type doesnt have i18n enabled

* chore: remove comment

* fix(cm): list view & build process

* feat: save and publish

* feat: update contract

* feat: dp tests

* chore: use document from create and update

* feat: save and publish single types

* feat: return metadata on content manager endpoints (#19361)

* feat: return metadata on content manager endpoints

* feat: return meta

* fix: cm tests

* feat: fix cm metadata api tests (#19375)

* feat: return metadata on content manager endpoints

* feat: return meta

* fix: cm tests

* fix: admin test

* chore(cm): refactor CM (#19341)

* chore(cm): refactor EditView

comes with a host of new re-usable APIs!

* feat(cm): add useDocument hook

* feat(cm): add useDocumentOperations hook

* feat(cm): initialise EditView header

* feat(cm): add useDocumentLayout hook

* fix: listView from layout refactor

* chore(cm): refactor editview form input renderer

* chore: fix lint & ts

* fix: re-add custom fields

* test: fix admin/CM unit tests

* docs(cm): add docs at a high level of how the CM works

* test: add useDocumentRBAC tests

* chore: pr amends

* feat: add addEditViewSidePanel API to strapi (#19398)

* feat: add addEditViewSidePanel API to strapi

fix: don't pass all the query params to the create route

* chore: pr amends

* fix: return available status when content type doesnt have i18n enabled (#19419)

* fix: return available status when content type doesnt have i18n enabled

* chore: remove comment

* fix(cm): list view & build process

* feat: add publish & update action (#19423)

* feat: return metadata on content manager endpoints (#19361)

* feat: return metadata on content manager endpoints

* feat: return meta

* fix: cm tests

* feat: fix cm metadata api tests (#19375)

* feat: return metadata on content manager endpoints

* feat: return meta

* fix: cm tests

* fix: admin test

* chore(cm): refactor CM (#19341)

* chore(cm): refactor EditView

comes with a host of new re-usable APIs!

* feat(cm): add useDocument hook

* feat(cm): add useDocumentOperations hook

* feat(cm): initialise EditView header

* feat(cm): add useDocumentLayout hook

* fix: listView from layout refactor

* chore(cm): refactor editview form input renderer

* chore: fix lint & ts

* fix: re-add custom fields

* test: fix admin/CM unit tests

* docs(cm): add docs at a high level of how the CM works

* test: add useDocumentRBAC tests

* chore: pr amends

* feat: add addEditViewSidePanel API to strapi (#19398)

* feat: add addEditViewSidePanel API to strapi

fix: don't pass all the query params to the create route

* chore: pr amends

* fix: return available status when content type doesnt have i18n enabled (#19419)

* fix: return available status when content type doesnt have i18n enabled

* chore: remove comment

* feat: add publish & update action

* feat: add published disabled state

* test: fix suite

* test: add unit for Panels

* fix(cm): status not state for redirect

* fix(cm): list view status & component main field property

* chore: pr feedback

* chore: apply suggestions

Co-authored-by: markkaylor <mark.kaylor@strapi.io>

---------

Co-authored-by: Marc Roig <marc12info@gmail.com>
Co-authored-by: markkaylor <mark.kaylor@strapi.io>

* feat: test single types

* feat: wrap single type publish into a transaction

* feat(cm): add unpublish & delete actions, also re-enable single-types (#19459)

* fix: delete url was wrong way round

* feat: compute modified status

* fix(cm): reimplement ListSettingsView (#19432)

* chore: PR feedback

* feat: discard endpoint

* feat: discard draft api tests

* feat: unpublish and discard

* chore: pr comments

* chore: update sanitizer

* feat(cm): add publish and save (#19500)

* feat(cm): add publish and save

* test(cm): fix unit for useDocumentActions

* Update packages/core/content-manager/server/src/controllers/collection-types.ts

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

* Update packages/core/content-manager/shared/contracts/single-types-v5.ts

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

* feat(document-service): map document ID to entry ID (#19248)

* feat: use document service in content manager

* feat: update contracts with meta information

* chore: group metadata types into a single type

* feat: metadata information in single types

* chore: change meta contract to return documents instead of strings

* fix: remove unused type

* fix: ignore doc id if entry is null

* fix: update contract metadata

* feat: document metadata service

* feat: locale and status filtering

* chore: add comment

* chore: refactor metadata service

* chore: refactor entity manager exists to handle single types

* feat: refactor single type controllers to use documents

* feat: get locale param from in cm endpoints

* Revert "feat: get locale param from in cm endpoints"

This reverts commit 856c38588b8f8521cadd85c8c933f42a36a2178a.

* feat: get locale param from cm endpoints

* Update packages/plugins/i18n/server/src/controllers/validate-locale-creation.ts

Co-authored-by: Ben Irvin <ben@innerdvations.com>

* fix: entity manager unit tests

* chore: unit test document metadata

* feat: prevent empty string locale filtering

* fix: cm contract import

* chore: test new d&p cm features

* fix: search content manager api test

* fix: cm tests

* fix: cm tests

* fix: cm tests

* fix(content-manager): access to non default locale documents (#19190)

* fix(content-manager): access to non default locale documents

* chore(content-manager): revert route construction

* fix(content-manager): api tests for number of draft relations

* test(content-manager): counting number of draft relations for non default locales

* chore(content-manager): remove default locale from entity manager countDraftRelations

* chore: basic relations testing for document service

* chore(e2e): disable edit view tests (#19235)

* feat: get relation ids

* chore: clean functions into other folders

* chore: rename files

* fix: group document ids by its uid

* feat: id mapper

* chore: improve typings

* chore: rename transform functions

* fix: id-transform tests

* chore: simplify function return value

* chore: improve comments

* fix: api tests

* fix: single types unit test

* fix: skip relations test

* fix: exclude fields

* fix: short hand ifs

* fix: merge conflict

* fix: transform output of find one

* Update packages/core/core/src/services/document-service/transform/utils.ts

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>

* feat[Document Service]: Param transformation (#19373)

* fix(core): wip param transformation

* feat(core): wip param transformation based on relational status

* feat(core): wip populate and filter transformation based on relational status

* chore(core): simplify fields and sort

* chore(core): clean up

* feat(core): wip filter transformation with traverseQueryFilters

* feat(core): reorganise and PR feedback

* fix(core): filters traversal logic

* feat(core): populate relational transformations

* chore(core): reintroduce populate transformation

* fix(core): enforce that fields must include id

* fix(core): enforce that fields must include id

* fix(core): filter and sort transformation

* chore(core): typos

* chore(core): further filters test cases

* feat(core): support object based sorts

* chore(core): fields test naming

* feat(core): handle logical operators in filters

* fix: skip conditions test

* fix(core): switchIdForDocumentId (#19497)

* fix: uniqueness test

* fix: available status should be an array

* fix: available statuses

* fix: skip uniqueness folder

* fix: skip uniqueness test errors

* fix: skip failing test

---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Jamie Howard <jamie.howard@strapi.io>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>

* chore: re-implement edit configuration (#19488)

* chore: re-implement edit configuration

* chore: cleanups

* test: fix unit tests

* feat(cm): add discard changes action (#19509)

* feat(cm): add discard changes action

* feat(cm): add discard when unpublishing

* test(e2e): fix editview e2e

* test(e2e): fix uniqueness partially

* test(unit): fix unit tests for actions & add for discard

* chore: bump playwright

* fix(webkit): add shim for requestIdCallback

* chore: pr amends

* feat: return status on available locales

* feat: add document-actions to list-view (#19523)

* fix(cm): add gap and alignment for edit-view heading with super long names

* fix(cm): list view status'

* feat: add list-view actions

* fix: conditions for actions to be enabled

* fix: stay on draft tab when published

* fix: stop propogation on list-view row click

* test(e2e): fix editview tests

* chore: update spelling error

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

---------

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

* feat: test document metadata

* chore: remove unnecessary unit test

* fix: return modified on published documents

* chore: init split single-type collection-type in document service

* Fix/fields test case (#19481)

* Update packages/core/content-manager/server/src/services/document-metadata.ts

Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>

* fix: pretty

* chore: refactor middlewares

* feat: send empty object if locale does not exist on document

* feat: single types

* chore: add tests to middlewares

* feat: update locale using query params (#19546)

* feat: return available locales when not finding locale

* chore: update typings

* feat: add clone action (#19526)

* feat: add clone action

* test(e2e): add auto clone tests

* chore: pr amends

* feat: add information to header actions menu (#19548)

* feat: add information to header actions menu

* fix: dont use non-null-assertion

* feat: manage relations on publish (#19427)


---------

Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Jamie Howard <jamie.howard@strapi.io>

* feat: v5 i18n relations (#19504)


Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Jamie Howard <jamie.howard@strapi.io>

* fix: locale test api

* chore: refactor i18n (#19555)

* chore: remove types package, should be using strapi

* chore: refactor i18n settings page

* feat: add i18n to CM

* feat(i18n): add delete locale action (#19562)

* chore: pr amends

Co-authored-by: Simone <startae14@gmail.com>

---------

Co-authored-by: Simone <startae14@gmail.com>

* feat(cm): re-implement validation (#19578)

* feat: re-implement validation in the CM

feat: add blocker

feat: handle validation errors from the API

chore: reimplement useFieldHint

test(unit): fix fe tests

chore: fix bad logical operator

* chore: await notifications to leave before trying to go to other pages

* fix: validation issues & blocker showing up incorrectly

* fix: broken publish behaviour

* fix(content-manager): uid availability and generation (#19518)

* fix(content-manager): uid availability and generation

* fix(content-manager): pass locale as is from UID service

* fix(content-manager): match UIDs based on startsWith

---------

Co-authored-by: Marc Roig <marc12info@gmail.com>
Co-authored-by: markkaylor <mark.kaylor@strapi.io>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Jamie Howard <jamie.howard@strapi.io>
Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
Co-authored-by: Simone <startae14@gmail.com>

* chore: add centralized methods for replacing hardcoded strings for database identifiers

* chore: update History with new v5 APIs (#19623)

* chore: implement new form component

* chore: display version data

* fix: remove FormLayout to block unsupported fields

* fix: history tests

* chore: infer model kind from initialEntry

* chore: pr feedback first batch

* chore: move mainField to history context

* chore: move data fetching to page level

* fix: ts error in VersionsList test

* fix: permissions loading state

* chore: lift DocumentRBAC

---------

Co-authored-by: Mark Kaylor <mark.kaylor@strapi.io>

---------

Co-authored-by: Ben Irvin <ben.irvin@strapi.io>
Co-authored-by: Josh <37798644+joshuaellis@users.noreply.github.com>
Co-authored-by: Marc Roig <marc12info@gmail.com>
Co-authored-by: markkaylor <mark.kaylor@strapi.io>
Co-authored-by: Jamie Howard <48524071+jhoward1994@users.noreply.github.com>
Co-authored-by: Ben Irvin <ben@innerdvations.com>
Co-authored-by: Jamie Howard <jamie.howard@strapi.io>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
Co-authored-by: Simone <startae14@gmail.com>
2024-02-28 18:06:17 +01:00
Josh
84b8d2ccd4 Merge branch 'develop' into v5/main 2024-02-28 16:01:39 +00:00
Convly
3d2c2b58b3 v4.20.3 2024-02-28 15:33:49 +01:00
Ben Irvin
390c3754d1
chore(database): clean up db naming methods 2024-02-26 18:10:52 +01:00
Ben Irvin
c338fa844e
chore(database): add long db identifiers shortening algorithm 2024-02-26 16:22:34 +01:00
Ben Irvin
6111d69ad8
chore(database): refactor database schema to use naming functions 2024-02-26 15:35:47 +01:00