14487 Commits

Author SHA1 Message Date
Fernando Chávez
34fcaa72ed
feat(content-releases): add status to releases (#19502)
* feat(content-releases): add status to releases

* add docs and fix e2e error

* Update docs/docs/docs/01-core/content-releases/00-intro.md

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

* Update docs/docs/docs/01-core/content-releases/00-intro.md

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

* Update docs/docs/docs/01-core/content-releases/00-intro.md

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

* apply marks feedback

* don't throw error on lifecycle hooks inside releases

* handle when actions are not valid anymore

* await for entry validation on releases edit entry

* check if are changes in content types attributes to revalidate

* fix e2e test

* apply marks feedback

---------

Co-authored-by: Simone <startae14@gmail.com>
2024-02-27 12:57:42 +01:00
Bassel Kanso
3699735d69
Merge pull request #19485 from strapi/fix/transfer-pull
fix: transfer pull getting stuck/skipping assets step
2024-02-27 12:57:15 +02:00
Christian Capeans
a9e9dcd326 fix: undo breaking change 2024-02-27 11:03:44 +01:00
Fernando Chávez
86cbdfe835
feat(content-releases): Add edit release button on edit view (#19595) 2024-02-27 09:15:14 +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
Bassel Kanso
d4cb32ce57 fix: refactoring and adding comment 2024-02-26 14:55:55 +02:00
Ben Irvin
3cea9ffa5c
chore(database): use naming functions for identifiers in metadata relations 2024-02-26 12:27:58 +01:00
Bassel Kanso
8694c2c798 Merge branch 'fix/transfer-pull' of https://github.com/strapi/strapi into fix/transfer-pull 2024-02-26 13:16:42 +02:00
Bassel Kanso
c815b8ecd2 fix: support using mainHash for older versions 2024-02-26 13:03:43 +02:00
Ben Irvin
c29dcf0999
chore: add centralized methods for replacing hardcoded strings for database identifiers 2024-02-23 15:53:56 +01:00
Bassel Kanso
ae988dd79b
Merge branch 'develop' into fix/transfer-pull 2024-02-23 14:21:28 +02:00
Bassel Kanso
85e5d16fda fix: use id instead of hash 2024-02-23 13:52:16 +02:00
Giulio Montagner
f8af92b375
fix: add sizeInBytes for upload providers (#19593) 2024-02-23 11:37:26 +01:00
med8bra
4ae5b2f502 fix(security-middleware): fix config merging with defaults 2024-02-23 02:03:46 +01:00
Bassel Kanso
07894142a4 fix: make it throw an error when an asset is failing 2024-02-23 02:50:17 +02:00
Bassel Kanso
7e586a34f6 Merge branch 'develop' into fix/transfer-pull 2024-02-23 02:02:28 +02:00
Josh
4f4e3c3acd
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>
2024-02-22 17:18:32 +00:00
Fernando Chávez
898f8ae81b
fix(content-releases): fix UI details (#19587)
* fix(content-releases): fix UI details

* apply madhuri feedback
2024-02-22 15:31:14 +01:00
Madhuri Sandbhor
b7774ca2cc
fix: timezone concatenated with _ instead of -, scheduled checkbox width adjusted (#19586) 2024-02-22 15:01:00 +01:00
Rémi de Juvigny
ab39246eba
chore: use db model instead of content type (#19563)
* chore: use db model instead of content type

* chore: remove content type ref in comment

* fix: remove contentTypes from CM index

* fix: yet another model import

* fix: mark feedback
2024-02-21 16:58:02 +01:00
Rémi de Juvigny
65cafcb341
fix(history): refetch history versions on mount (#19566)
* fix(history): refetch versions on mount

* fix: unnecessary refetches

* fix: date component deprecation log

* fix: auto-redirect to newer versions

* fix: handle undefined date

* fix: restore previous behavior

---------

Co-authored-by: Mark Kaylor <mark.kaylor@strapi.io>
2024-02-21 16:07:51 +01:00
markkaylor
2a816cdadd
chore(release): merge v4.20.2 into develop (#19575) 2024-02-21 15:23:05 +01:00
Mark Kaylor
ffe3577903 v4.20.2 2024-02-21 14:40:41 +01:00
Fernando Chávez
430ac2d3d0
feat(content-releases): show release scheduled date (#19552)
* feat(content-releases): show release scheduled date

* add future flag checks

* apply Madhuri feedback

* change env to use env.bool
2024-02-21 13:58:19 +01:00
Ben Irvin
3fe01a0f6d
test(database): init unit tests for createMetadata 2024-02-21 12:07:15 +01:00
Ben Irvin
92e0fee2c4
fix: prevent infinite loop opening pool connections in mysql 2024-02-21 11:54:47 +01:00
Rémi de Juvigny
c448c0402f
Merge branch 'v5/main' into v5/history 2024-02-21 10:35:41 +01:00
Josh
0aca28c03c Merge branch 'develop' into v5/main 2024-02-20 17:51:28 +00:00
Fernando Chávez
4af8963f68
feat(content-releases): add publish webhook (#19515)
* feat(content-releases): add publish webhook

* apply Marks feedback
2024-02-20 14:38:27 +01:00
Rémi de Juvigny
65d2c46358
fix: history page back button (#19553)
* fix: history page back button

* chore: add tests

* chore: remove mocks from tests
2024-02-20 13:52:08 +01:00
Madhuri Sandbhor
8d3598965d
Feat(releases): Ability to schedule a release (#19498)
* added first draft for releases scheduling

* update: scheduled date is made Date or nullable, tests updated for scheduling fields

* fix: pass scheduled date null on edit unchecking the option

* fix: dirty check added for disabling save button

* timezone hook added to generate list of timezone options

* update: timezone added in payload to save in DB

* update: removed grouping and sorting of timezones, keeping simple UTC+/-HH:00 <timezone> format

* fix: removing unnecessary code

* update: creating new release should show schedule by default

* minor change

* tests: queryByRole replaced with getByRole query

* update: use date-fns format functions instead of manually formattingdates, future flag added on front for Scheduling till beta release, test cases updated

* fix: comment added

* minor change

* fix: reverting merging change

* fix: scheduledAt and timezone types updated to be null instead of undefined to keep it consistent

* fix: converted utc to zoned time to update correct time on editing the release

* fix: handled validation on submit, always enable submit, timezone list updated based on selected date

* update: default timezone set, tests updated

* update: selecting date during DST updates the timezone selected and list, TS errors fixed

* fix: timezone display value updated

* fix: e2e tests

* update: e2e added for scheduling info

* fix: minor change

* fix: schema validation reverted, tests updated for findBy
2024-02-20 05:32:14 +01:00
Aurélien Georget
cb9253fb6c fix: fix EE tests 2024-02-19 18:43:03 +01:00
Aurélien Georget
03d0136180 Fix unit tests 2024-02-19 16:45:59 +01:00
Aurélien Georget
16eabd438b Run prettier 2024-02-19 16:17:10 +01:00
Aurélien Georget
9569d5fb80 Revert changes 2024-02-19 16:09:13 +01:00
Aurélien Georget
124cc09a8d Move busines logic to EE folder and override default CE functions 2024-02-19 14:41:20 +01:00
Aurélien GEORGET
4a4ccac025
Merge branch 'develop' into chore/data 2024-02-19 10:27:40 +01:00
Aurélien Georget
6222c3bf28 Remove logs 2024-02-16 18:35:06 +01:00
Aurélien Georget
e0793559dc Move getSSOProvidersList to EE folder 2024-02-16 18:31:43 +01:00
Aurélien Georget
6c4174c4c9 Update function name for better clarity 2024-02-16 18:04:27 +01:00
markkaylor
d817861005
Merge branch 'v5/main' into v5/history 2024-02-16 10:45:16 +01:00
Simone
7abe81e395
fix(content-manager): fix strange behaviours when you change position on Dynamic Zones and solve issue with ids not unique (#19480)
* fix(content-manager): check if the editor ref is already in place and avoid to create a new one on drag

* fix(content-manager): codemirror cleanup on re rendering and change the way we select the temp key value

resolves #17858
resolves #18939
resolves #18701
resolves #17858
closes #18532

Co-Authored-By: Jasper Hartong <47074382+jasperhartong@users.noreply.github.com>

---------

Co-authored-by: Jasper Hartong <47074382+jasperhartong@users.noreply.github.com>
2024-02-16 10:20:57 +01:00
markkaylor
55263f30cb
fix(history): fetch single-types (#19506) 2024-02-16 09:03:47 +01:00
Ben Irvin
5c8ef69f82
fix: validate query populate 2024-02-15 09:24:45 +01:00
Convly
d470b4f75c Merge branch 'releases/4.20.1' into develop 2024-02-14 16:17:09 +01:00
Convly
9aa6e94b2f v4.20.1 2024-02-14 16:12:51 +01:00
Mark Kaylor
9f6b2ac69b Merge branch 'v5/main' of github.com:strapi/strapi into v5/history 2024-02-14 09:43:22 +01:00
Fernando Chávez
dd6ebd43de
feat(content-releases): remove cron when scheduled release is deleted (#19444)
* feat(content-releases): remove cron when scheduled release is deleted

* Update packages/core/content-releases/server/src/services/__tests__/release.test.ts

Co-authored-by: Rémi de Juvigny <8087692+remidej@users.noreply.github.com>

---------

Co-authored-by: Rémi de Juvigny <8087692+remidej@users.noreply.github.com>
2024-02-14 09:29:29 +01:00