Compare commits

...
440 Commits
Author SHA1 Message Date
Nikolaj 3d9a843446 Try and fix pipeline 2023-03-23 10:50:21 +01:00
Nikolaj 23ae9412f9 Bump version 2023-03-23 09:31:18 +01:00
Nikolaj 07bc3798cc Convert path to absolute 2023-03-23 09:30:52 +01:00
Nikolaj 921a32ee03 Bump version 2023-03-14 14:20:31 +01:00
Bjarke BergandNikolaj fcca1cf5c0 Check the tmpimg path is in the expected folder 2023-03-14 14:19:11 +01:00
Andreas Zerbstandnikolajlauridsen cf1cd51266 Removed path so we can generate templates 2023-02-22 08:49:15 +01:00
Bjarke Bergandnikolajlauridsen 0e65af701f Fixed pipeline after dotnet sdk 7.0.200 2023-02-22 08:49:10 +01:00
nikolajlauridsen 0014f0e6db Bump version 2023-02-22 08:38:16 +01:00
Jacob OvergaardandGitHub f3bcfcd5d9 v11: npm updates for february (#13803)
* update ace-builds from 1.14.0 to 1.15.0

* update eslint from 8.32.0 to 8.33.0

* update jsdom from 21.0.0 to 21.1.0

* update nouislider from 15.6.1 to 15.7.0
2023-02-08 09:58:40 +01:00
Nikolaj GeisleandZeegaan 3d47cac9ac V10: fix content version cleanup dto migration (#13788)
* Add DoesPrimaryKeyExist method

* Add primary key name to dto

* Add extension method PrimaryKeyExists

* Dont use sql_master table

* Implement DoesPrimaryKeyExists

* Rename without plural s

* Refactor to get proper primary key name and not column name

* Use primary key name and not column name

* Dont filter tables in memory

* Remove .Where

* Don't select all, select only sql

* throw NotImplementedException by default

* USe virtual instead of abstract to avoid breaking change

* Reinstert primary key attribute

---------

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-02-07 13:48:36 +01:00
Bjarke BergandGitHub e3135bd97e Updated nuget dependencies (#13787) 2023-02-06 14:58:48 +01:00
Jacob OvergaardandGitHub 80112d88f4 V11: Fix for media library type dialog (#13780)
* let the server determine the type rather than assuming it is an image

this is especially useful for SVGs that would otherwise be uploaded as images instead of the more appropriate Vector Graphics default type

* do not start processing of the queue if a dialog is shown

return early if the dialog is shown (if _requestChooseMediaTypeDialog() does not immediately return false) because that means the user will pick the media type

* clean up of the scope for performance

remove 'handleFile' since it is not being used and make the other callbacks one-way bound since we are not changing them

* add jsdoc to improve understanding of the dropzone directive
2023-02-06 14:39:57 +01:00
Sebastiaan Janssen 74e2e58935 Merge branch 'contrib' into v11/dev 2023-02-06 14:35:47 +01:00
66f483e88c New backoffice: Obsolete ReadOnlyUserGroup constructor. (#13676)
* Obsolete old ReadOnlyUserGroup constructor

* Update src/Umbraco.Core/Models/Membership/ReadOnlyUserGroup.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

---------

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
2023-02-06 14:32:27 +01:00
Sebastiaan Janssen 75f16b79fb Merge branch 'v11/dev' into contrib 2023-02-06 14:29:48 +01:00
2f5726384d Mini-list view search by id,name & key is fixed. (#13735)
* Mini-list view search by id,name & key is fixed.
Added  multiple conditions in the query to consider id or name or key from the filter param(search bar from minilistview)

* make it more simple ,now using || instead of clause conditions.

---------

Co-authored-by: Dhanesh Kumar <dhanesh.kumar@phases.dk>
Co-authored-by: Michael <michael@crossingpaths.be>
2023-02-06 12:57:36 +01:00
Erik-Jan WestendorpandGitHub 371679b2e5 Remove special characters in avatar (#13766)
* Remove special characters

* Remove some chars not all
2023-02-06 12:40:28 +01:00
Bjarke Berg 6d7b619d94 post merge 2023-02-06 10:18:15 +01:00
Bjarke Berg fe2d071fd5 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-02-06 10:16:49 +01:00
Jacob OvergaardandGitHub 36cbcc36de add check for editorState.getCurrent to find the current editor (relevant in infinite editors), and throw a warning if an editor completely misses the current node context (#13778)
disable drag&drop entirely if the property editor did not get a node through bindings or editorState
2023-02-03 10:20:23 +01:00
Andreas ZerbstandAndreas Zerbst eaf7994dca Updated the ID of the locator in the test 'can set a minimum of required blocks in content with a block list editor' to match the correct ID. (#13769) 2023-02-01 15:17:28 +01:00
Andreas ZerbstandAndreas Zerbst 8a5e553986 Updated the ID of the locator in the test 'can set a minimum of required blocks in content with a block list editor' to match the correct ID. (#13769) 2023-02-01 15:16:00 +01:00
Andreas ZerbstandGitHub b538318b5c V11/feature/block grid editor datatype tests (#13666)
* Added tests for the BlockGridEditorDataType

* Bumped versions

* Split the file into two, so we now have a file with the Blocks and one with the Configuration of the datatype

* Changed function variables to class variables.
Changed tests to use the ConstantHelpers
Changed naming
2023-02-01 15:11:18 +01:00
Sebastiaan Janssen 5e03f9bb4e Revert "IScopeProvider" is used from Umbraco.Cms.Infrastructure.Scoping"
This reverts commit 0907255931.
2023-02-01 14:01:29 +01:00
Andreas ZerbstandGitHub fca689b140 V11/feature/block grid editor document test (#13667)
* Added tests for BlockGridEditorInDocument

* Bumped version

* Updated naming
Removed unnecessary reload
2023-02-01 13:32:01 +01:00
Kenn JacobsenandGitHub 4453459f06 Obsolete language ID related properties and methods for V13 (#13753) 2023-02-01 09:37:43 +01:00
Jeroen BreuerandSebastiaan Janssen ff3d8c1c6c Make methods virtual so they can be redefined in derived classes. 2023-01-31 19:43:24 +01:00
dKumarmjandSebastiaan Janssen 0907255931 IScopeProvider" is used from Umbraco.Cms.Infrastructure.Scoping 2023-01-31 18:13:54 +01:00
Bjarke Berg e79198c990 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-31 12:58:48 +01:00
Bjarke Berg 11d393e419 Updated version number 2023-01-31 12:58:33 +01:00
Ealse BoumaandSebastiaan Janssen 5c0673930a Changed default initialized button permissions for listviews 2023-01-31 11:14:20 +01:00
Sebastiaan Janssen 61685a459b Merge branch 'v11/dev' into contrib 2023-01-31 10:17:54 +01:00
417f31fba5 Send email notification on password reset (#13757)
Co-authored-by: Aleksander <alf@umrabco.dk>
2023-01-31 09:04:26 +01:00
Warren BuckleyandGitHub d38fabea4a Fixes #13715 Simple LogViewer queries not returning results (#13748)
* Fixes #13715 issue with simple logviewer searches

* Update Logviewer test - to ensure MessageLike and simple equivalent returns same result count to help catch
2023-01-30 10:32:28 +01:00
Marc GoodsonandMichael Latouche 23b03f408e Add .woff2 to BrowsableFileExtensions 2023-01-29 20:27:47 +01:00
Bjarke Berg e94328ad57 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-27 09:50:06 +01:00
Bjarke Berg 700a33ac73 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-27 09:49:47 +01:00
dependabot[bot]andJacob Overgaard d3b4bae1b5 Bump ua-parser-js from 0.7.31 to 0.7.33 in /src/Umbraco.Web.UI.Client
Bumps [ua-parser-js](https://github.com/faisalman/ua-parser-js) from 0.7.31 to 0.7.33.
- [Release notes](https://github.com/faisalman/ua-parser-js/releases)
- [Changelog](https://github.com/faisalman/ua-parser-js/blob/master/changelog.md)
- [Commits](https://github.com/faisalman/ua-parser-js/compare/0.7.31...0.7.33)

---
updated-dependencies:
- dependency-name: ua-parser-js
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-27 08:56:52 +01:00
Sebastiaan Janssen 33adbf41fa Update contributing docs with the correct branch name 2023-01-26 15:38:54 +01:00
Sebastiaan Janssen 3a7624c385 Merge branch 'v11/dev' into v11/contrib 2023-01-26 15:31:39 +01:00
c868c60ed2 V11: Fix decimal variants (#13741)
* fix sqlite with variants

* Create and register SqlSpecificMapper

* Delete obsolete file

* Add back inheritance

Co-authored-by: Zeegaan <nge@umbraco.dk>
2023-01-26 12:26:06 +01:00
Bjarke Berg be0138e526 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-24 11:56:32 +01:00
Bjarne FyrstenborgandGitHub 14af1aea9b Ensure to reset padding and border as well for textarea in richtext (#13012) 2023-01-24 09:18:54 +01:00
MoleandGitHub 17248ce494 V11: Add improved log message on compilation failure using InMemoryAuto (#13678)
* Add improved log message when in memory compilation fails.

* Move LogCompilationFailure into its own method

And hopefully make codescene happeh

* Reduce nesting

* Replace null check with linq
2023-01-23 08:19:15 +01:00
Jacob OvergaardandGitHub 7aee15d6d1 V11: Prevalues as toggles have problems in datatype settings view (#13709)
* format preValues with DataTypeHelper.createPreValuesProps before rendering so they have the 'alias' prop used for input-id to umb-toggle

* preValues are now formatted on fetch so we do not need to do it again
2023-01-20 08:13:37 +01:00
Jacob Overgaard a8acefcaba introduce lint option for gulp so we only lint when building and not watching, which makes dev, watch and fastdev even faster 2023-01-19 12:56:55 +01:00
Jacob OvergaardandGitHub b97dd46608 V11: fix issue where editing a macro was not possible (#13702)
* remove the onSetup for the macro button since we want to always be able to interact with the macro button (either insert or edit)

* let the onAction method find the currently selected macro by asking the active editor for its selection instead of relying on the NodeChanged event
2023-01-19 11:02:33 +01:00
Bjarke Berg 8c22de0bad Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2023-01-19 09:50:54 +01:00
Bjarke Berg 1b88e0a7a1 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	version.json
2023-01-19 09:41:00 +01:00
Jacob OvergaardandGitHub f23ebaefa6 v11: javascript dependency updates (UUI, TinyMCE, jQuery, signalR, and more) (#13696)
* build(deps-dev): update development dependencies

* update the Umbraco UI library to 1.1.0

* update ace editor to 1.14.0

* update diff to 5.1.0

* update jquery to 3.6.3

* update tinymce to 6.3.1

* update underscore to 1.13.6

* update @microsoft/signalr to 7.0.2
2023-01-19 09:39:57 +01:00
Bjarke Berg 2dd38f8393 Merge remote-tracking branch 'origin/v11/contrib' into v11/dev 2023-01-19 09:32:04 +01:00
MoleandGitHub 46049bfd74 Obsolete things broken in migrations refactor (#13658)
* Obsolete chings changed in v13

* Fix tests

* Obsolete Execute and add ExecutePlan with default implementation.

This just calls the old implementation and creates an ExecutedMigrationPlan from the result

In V13 this has its own implementation.

* Mention notification in obsolete message
2023-01-19 09:27:33 +01:00
Jacob OvergaardandGitHub 0d4d3ce33c add workaround for line-height issues with tinymce (#13700)
based on this upstream issue: https://github.com/tinymce/tinymce/issues/6431
2023-01-19 09:26:00 +01:00
Jacob OvergaardandGitHub cfdc4a9573 add the s html element to allow list for TinyMCE (#13697)
Fixes #13637
2023-01-19 09:25:44 +01:00
8fdb5a55ea Updating german translation (#13684)
* updating german translations

* translating missing sections

* added missing closing tag

Co-authored-by: Michael <michael@crossingpaths.be>
2023-01-19 00:19:13 +01:00
Mike MaseyandMichael Latouche 3ebd15b67e fix: move list view selection options to after list in focus order 2023-01-15 22:42:48 +01:00
Bjarne FyrstenborgandMichael Latouche eb9f9c68dd Add separator before reload node in Media Types tree 2023-01-15 21:56:18 +01:00
ustadstarandMichael Latouche fd992f65bb Fix copy content with descendants not copying sort order (#13464) 2023-01-13 01:30:48 +01:00
Kenn JacobsenandGitHub 8463d906a7 Make sure the property editor layout is contained within its container (prevent Z-index bleed-through) (#13583) 2023-01-12 10:55:02 +01:00
Nikolaj 314f79bd07 Bump version 2023-01-11 15:39:26 +01:00
Nikolaj 1438b0a731 Merge branch 'release/11.1' into v11/dev 2023-01-11 15:38:45 +01:00
Nikolaj bad914842a Bump version 2023-01-11 10:25:31 +01:00
Andy ButlandandNikolaj a91c81ee56 Changed healthcheck collection configuration to use a concrete type to ensure configuration settings are bound. 2023-01-11 10:22:39 +01:00
Bjarne FyrstenborgandGitHub 3e415b242f Hide colors from icon picker (#13079)
* Ensure border is set so it doesn't jump on selection

* Allow to hide color from icon picker

* Use CSS grid instead to fill icons and with minimum width

* Remove odd flex size

* Set minimum to 60px instead
2023-01-07 03:15:51 +01:00
Bjarke Berg 46798c42b5 Merge remote-tracking branch 'origin/v11/dev' into v11/contrib 2023-01-06 13:52:29 +01:00
Bjarke Berg 6d8a3c550f Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2023-01-06 08:44:50 +01:00
Erik-Jan WestendorpandMichael Latouche 045c755ccf Translate dictionary area 2023-01-06 02:48:26 +01:00
dependabot[bot]andJacob Overgaard 591c78ae0c Bump decode-uri-component in /src/Umbraco.Web.UI.Client
Bumps [decode-uri-component](https://github.com/SamVerschueren/decode-uri-component) from 0.2.0 to 0.2.2.
- [Release notes](https://github.com/SamVerschueren/decode-uri-component/releases)
- [Commits](https://github.com/SamVerschueren/decode-uri-component/compare/v0.2.0...v0.2.2)

---
updated-dependencies:
- dependency-name: decode-uri-component
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 11:10:19 +01:00
dependabot[bot]andJacob Overgaard 3ddb6e6832 Bump json5 from 2.2.1 to 2.2.3 in /src/Umbraco.Web.UI.Client
Bumps [json5](https://github.com/json5/json5) from 2.2.1 to 2.2.3.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v2.2.1...v2.2.3)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-05 11:09:10 +01:00
Bjarke Berg a1a4f288cd Merge remote-tracking branch 'origin/v11/dev' into v11/contrib 2023-01-05 10:29:30 +01:00
Mykola GorbatenkoandMichael Latouche b52a4363c4 added Ukrainian language 2023-01-05 03:32:52 +01:00
Vitor RodriguesandGitHub 7d9bb8f595 Exposed media file provider configuration method (#13294)
This is required for consumers that intend to use WithCustomMiddleware instead of WithMiddleware, as otherwise they are forced to re-implement this code
2023-01-04 10:23:16 +01:00
CyberReiterandMichael Latouche b7a26360e5 minor improvements to indexing performance 2023-01-02 01:26:25 +01:00
Robert FosterandGitHub e7a986b1c3 fix for #13623 by hiding Member Edit Action Menu on Infinite editing … (#13624)
* fix for #13623 by hiding Member Edit Action Menu on Infinite editing for consistency

* added missing attribute to umb-editor-header for Member editing
2022-12-31 03:51:33 +01:00
MehmetandGitHub 59c5226d68 Rename title marketplace to packages (#13625) 2022-12-30 13:29:51 +01:00
dc46b649f7 fixes data-element attribute on media section (#13621)
* fixes data-element attribute on media section

* Revert "fixes data-element attribute on media section"

This reverts commit 2a35c9fbed.

* use property alias on members umb-property

Co-authored-by: Mario Lopez <mario@luminary.com>
2022-12-28 08:50:37 +01:00
Calvin DavisandMichael Latouche 4fbb0805e8 Add margin-right to block card name and subname 2022-12-26 02:55:14 +01:00
Nikolaj 2b72df09bb Merge branch 'release/11.1' into v11/dev 2022-12-21 13:54:29 +01:00
f37c02ea79 V10: Dont disable invited users (#13600)
* Dont allow disable user when invited

* Use data instead of selection

* return succesfully disabled users

* Disable disable button when invited

* Add integration tests

* Remove unused usings

* Update src/Umbraco.Web.BackOffice/Controllers/UsersController.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Create DisabledUsersModel

* use data.disabledUsers

* Return OK if no users to be saved

* User disabledUsersModel

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
2022-12-21 10:07:11 +01:00
Bjarke Berg 03e00cbed2 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-12-20 10:19:36 +01:00
Bjarke Berg 9c087f584d Fixed build warnings in ManagementApi 2022-12-20 08:53:37 +01:00
Ronald BarendseandBjarke Berg 832e44cb01 Also fix GetBackOfficeUrl in UrlHelperExtensions 2022-12-20 08:31:37 +01:00
Ronald BarendseandBjarke Berg 58da7f754b Rename fixed extension method to GetUmbracoBackOfficeUrl and obsolete old one 2022-12-20 08:31:37 +01:00
Ronald BarendseandBjarke Berg 751c1883ce Fix GetBackOfficeUrl extension method 2022-12-20 08:31:37 +01:00
Bjarke BergandGitHub 1332ba51e8 Merge pull request #13599 from umbraco/v11/bugfix/getbackofficeurl
Add `GetUmbracoBackOfficeUrl` extension methods
2022-12-20 08:30:45 +01:00
Bjarke Berg e375ab4b1b Added new ContentAndWebRootFileProviderFactory and use that for IManifestFileProviderFactory, so manifests can be found in /app_plugins folder too (#13597)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13565
2022-12-20 08:10:47 +01:00
Bjarke BergandGitHub 6430c61ee9 Added new ContentAndWebRootFileProviderFactory and use that for IManifestFileProviderFactory, so manifests can be found in /app_plugins folder too (#13597)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13565
2022-12-20 07:00:07 +01:00
Ronald Barendse 532636cdbe Also fix GetBackOfficeUrl in UrlHelperExtensions 2022-12-19 12:04:35 +01:00
Ronald Barendse 900dd22277 Rename fixed extension method to GetUmbracoBackOfficeUrl and obsolete old one 2022-12-19 11:52:48 +01:00
Ronald Barendse b457734f18 Fix GetBackOfficeUrl extension method 2022-12-19 11:31:18 +01:00
Bjarne FyrstenborgandMichael Latouche 05a511a16c Only show rollback button if allowed action 2022-12-18 01:26:04 +01:00
Kenn Jacobsenandnikolajlauridsen d173a99fc8 Support space (and more) in tag groups (#13589) 2022-12-16 14:24:51 +01:00
nikolajlauridsen 6835436ed5 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-12-16 14:24:17 +01:00
Kenn Jacobsenandnikolajlauridsen a5a80fdd41 Multi URL picker improvements for V11 (#13586)
* Use bulk lookup to find URLs for multi URL picker items

* Make sure URLs and anchors are loaded correctly when no culture is supplied
2022-12-16 13:07:40 +01:00
Kenn JacobsenandGitHub aee1d70f64 Multi URL picker improvements for V11 (#13586)
* Use bulk lookup to find URLs for multi URL picker items

* Make sure URLs and anchors are loaded correctly when no culture is supplied
2022-12-16 13:06:27 +01:00
Kenn Jacobsenandnikolajlauridsen a897e3bdd3 Improved support for TinyMCE custom style formats (#13582) 2022-12-16 12:42:50 +01:00
Kenn JacobsenandGitHub 7b0f678c38 Improved support for TinyMCE custom style formats (#13582) 2022-12-16 12:41:19 +01:00
Ronald BarendseandElitsa Marinovska 48f4d8b7d1 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
(cherry picked from commit 544cb30602)
2022-12-16 11:25:00 +01:00
544cb30602 Set redirect URL when building model (#12969)
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-12-16 11:17:56 +01:00
Nikolaj 0234c5b637 Roll back BPlusTree dependency 2022-12-15 13:56:57 +01:00
Bjarke Berg ace43452e4 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-12-15 10:36:23 +01:00
Bjarke Berg 6f4b60c76c Updated Nuget packages 2022-12-15 10:36:13 +01:00
Nikolaj 1c2b5d34fd Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.controller.js
2022-12-15 09:32:03 +01:00
Bjarke Berg cec87e400f post merge fix 2022-12-14 09:09:20 +01:00
Bjarke Berg fd974a416c Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
#	tests/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Routing/InstallAreaRoutesTests.cs
2022-12-14 08:51:45 +01:00
c4b83972bc Map AdditionalData (#13567)
* Map AdditionalData

Signed-off-by: Zeegaan <nge@umbraco.dk>

* Re-implement private setter

* Remove obsolete MapAll condition

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-12-13 15:04:39 +01:00
Bjarke BergandGitHub 76c99772a0 Merge pull request #13571 from umbraco/v11/feature/loggingsettingsextensions
Change `GetAbsoluteLoggingPath` to extension method
2022-12-13 10:28:27 +01:00
Sebastiaan Janssen d5e1c7398f Disable healthChecks test for now as it has different results on the build server versus local machine 2022-12-13 09:13:36 +01:00
Ronald Barendse a49151f552 Change GetAbsoluteLoggingPath to extension method 2022-12-13 09:11:59 +01:00
Sebastiaan Janssen ca8f84f254 Simplify healthcheck button selector 2022-12-12 18:33:50 +01:00
Sebastiaan Janssen 2e4db50781 Fix wrong expectation in the security health checks 2022-12-12 16:58:56 +01:00
Sebastiaan Janssen b366b26f19 Fix failing integration test (runtime mode was added to system info) 2022-12-12 15:48:36 +01:00
Sebastiaan Janssen 5c993ea3c6 Merge branch 'v11/dev' into v11/contrib 2022-12-12 13:59:03 +01:00
TiffanyandMichael Latouche 105670dcc1 Tree Roots are H1 2022-12-10 19:03:55 +01:00
Matthew WiseandMichael Latouche ec56778c9f standarising ActionLetter and ActionName for IAction 2022-12-10 01:59:45 +01:00
Bjarne FyrstenborgandMichael Latouche 2d2d8df82e Show published in tracked references 2022-12-09 01:00:07 +01:00
sofietoftandNikolaj 311c11074f Updated docs links to point to new platform (#13426)
* Updated docs links to point to new platform

* Update settingsdashboardintro.html

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-12-08 14:50:04 +01:00
Jacob OvergaardandGitHub 63e4adca92 Tree picker support for selecting containers (#13507)
Fixes https://github.com/umbraco/Umbraco-CMS/issues/13463
2022-12-07 15:21:15 +01:00
Bjarke Berg b491b8c7a3 Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
#	src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.controller.js
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
2022-12-07 10:57:32 +01:00
Bjarke BergandGitHub 388daf88c2 Merge pull request #13533 from umbraco/v11/feature/merge_v10.4_into_v11.1
V11/feature/merge v10.4 into v11.1
2022-12-07 10:55:59 +01:00
Bjarke BergandGitHub 519b3295ee Merge pull request #13532 from umbraco/revert-13528-v11/feature/merge_v10.4_into_v11.1
Revert "Merge v10.4 into v11.1"
2022-12-07 10:55:32 +01:00
Bjarke BergandGitHub 685193df77 Revert "Merge v10.4 into v11.1 (#13528)"
This reverts commit 443e8a8272.
2022-12-07 10:53:09 +01:00
+17 443e8a8272 Merge v10.4 into v11.1 (#13528)
* Bump version

* Add PrivateAssets="all" to mangement api project reference (#13249)

* Bump version

* Use the actual save function for saving the copy (#13066)

* Use the actual save function for saving the copy

* PR feedback

(cherry picked from commit 3802097a32)

* Unbreak breaking change in #13066 (#13288)

(cherry picked from commit e4741b0c64)

* Bump version to 10.3.2

* Parse lockId as invariant (#13284)

Co-authored-by: Zeegaan <nge@umbraco.dk>
(cherry picked from commit 272e922020)

* Allow for configuration of additional languages to install and ensure one is set as default. (#13290)

* Allow for configuration of additional languages to install and ensure one is set as default.

* Amended install default language method to handle invalid ISO codes and ensure the first specified language is always made the default.

* Removed unnecessary using.

* Apply suggestions from code review

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Clean up.

* Update src/Umbraco.Infrastructure/Migrations/Install/DatabaseDataCreator.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Updated Smidge (#13331)

* Fix casing in fileSystemBasePath (#13306)

* Add guard statement (#13340)

* Move block grid single area rendering to its own dedicated view (#13359)

* Block Grid Editor Improvements (#13282)

* remove console log

* Updated references for Forms and Deploy in JSON schema project. (#13411)

* Enable single block mode (#13216)

* Enable single block mode

* Fixes tests, and adds test for single block mode output type

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Infrastructure/PropertyEditors/ValueConverters/BlockListPropertyValueConverter.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Fix breaking change

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Block Grid Editor: Removal of the forced placement feature (#13400)

* removal of the forceLeft/forceRight code

* removal of forced placement in css

* bring back removed code

* V10: AllowedUploadFiles appsetting not working (#13408)

* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Feature: Media Picker drag and drop upload directly on property editor (#13393)

* prototype drag and drop upload

* Add upload image endpoint

* Add MediaPickerThreeController.cs

* Revert "Add upload image endpoint"

This reverts commit 4bb5865480.

* Update IIOHelper dependency

* show preview when uploading a new media item

* open uploaded media in media entry editor

* map data from uploaded media entry to support cropper

* add crop data to uploaded media item

* remove media library buttons for media entries not created in the media library

* Implement temp images save & add to media picker 3

* Implement ITemporaryImageService

* Remove save logic from MediaPicker3PropertyEditor

* Dont use a TempImageDto

* Add GetByAlias endpoint

* Add additonal xml doc

* Refactor to take array of aliases

* Add FromQuery attribute

* Formatting

* add resource to get media types by alias

* validate file size and file type based on server variables

* Update OpenApi.json
Add media picker three to BackOfficeServerVariables

* rename endpoint to upload media

* Use baseurl Method

* Dont upload in rte folder

* pass params correctly to end point

* queue files before uploading

* handle invalid files

* progress bar design adjustments

* only create data url for images

* disable edit and name buttons when uploading

* fix missing error messages for invalid files

* add temp location to media entry

* Add startNode to TemporaryImageService.cs

* Refactor get by alias

* Rename to GetAllFiltered

* use getAllFiltered method

* remove autoselect option

* fix missing alias when selecting media type

* fix file filter

* don't overwrite invalid entries from dropping new files

* add disallowed files to filter

* remove console.log

* move media uploader logic to reusable function

* fix missing tmp location

* attach media type alias to the mediaEntry

* support readonly mode

* show discard changes when files has been dropped

* add disabled prop to button group

* emit events when upload queue starts and ends

* pass node to media picker property editor

* add service to keep track of all uploads in progress

* add upload in progress to uploadTracker when the queue starts and ends

* disabled buttons when any upload is in progress

* return a subscription to align with eventsService

* Fix up cases where StartNodeId was null

* scope css

* Show filename in dialog for selecting media type

* reuse translation from media library dropzone

* Don't check for only images

* Remove composer

* Add mediaTypeAlias to TemporaryImageService

* Rename ITemporaryImageService to ITemporaryMediaService

* prefix client side only props with $ so we don't send unnecessary data to the server

* use prefixed dataURL in media entry editor

* render icon for non images

* fix auto select media type

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* V10: merge v8 blobstorage file deletion fix (#13415)

* Implement fix from v8 https://github.com/umbraco/Umbraco-CMS/pull/11998

* Clean-up

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>

* Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client

Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update block grid panel name (#13325)

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client

Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client

Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* updated package-lock

* Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Block Grid Editor sorting directive (#13391)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Block Grid Editor adjust while sorting (#13442)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* change let to const

* Revert "change let to const"

This reverts commit fe19f8c5ed.

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Block Grid Editor - make prevalue overlay medium sized (#13443)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* block grid editor visual adjustments (#13446)

* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

* more white borders on UI

* move Catalogue appearance to Advanced

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Display media trashed state on custom view for image demo block (#13448)

* Block Grid Editor translations and Area size keyboard navigation (#13450)

* use custom prop for calculated width (#13451)

* Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client

Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Cherry pick #13373 to v10/dev

* remove the hidding of catelouge appearance as its not located under advance (#13456)

* Fix preview issue for new (empty) variants (#13455)

* Fix save and preview for new (unsaved) variants

* Rework & simplify

* Rollback improvements (#13452)

* Rollback improvements - hide draft version, allow rolling back to last published version

* UX improvements to rollback, revert some overly complex logic in favor of better UX

* Ensure title update when changing rollback version

* Clean up

* Fix rollback playwright text

* Cherry pick #13404 to v10

* Delete references using custom relation types (#13389)

undefined

* V11: Fix ordering by published in list of content (#13474)

* Update sort statement to use published field for invariant content

* Order by published if invariant

* Add support for tags in block editors and nested content (#13412)

* feat: add tags extension points and remove hardcoded tags handling

* feat: allow tags editor in nested content and block editors

* Update src/Umbraco.Infrastructure/PropertyEditors/TagsPropertyEditor.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Web.BackOffice/Controllers/ContentControllerBase.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Ensure that all automatic relation types are updated (#13470)

* Make sure contexbar fits within the available space (#13467)

* Make sure contexbar fits within the available space

* Ensuring context bar moves above, no matter size of it.

* Fixing apperance of connection-fixers

* do not set layout gaps (#13496)

* V10/feature/fixing flaky acceptance test (#13473)

* Updated Forms dependency for JSON schema to the latest version. (#13505)

* Accessibility - Fix Packages - Modal - Empty buttons (#13114)

* Changing the way we create the temp file for SQLite file (#13439)

* Fix concurrency issue in UmbracoMapper (#13524)

* Add logging to UmbracoMapper

* Add NullLogger to tests

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)

* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* V11/feature/flaky test work (#13513) (#13527)

* Removed all the DeleteAllContent since I delete the doctypes in the before and after each functions which also deletes the content.

* fixed the test so it selects the specific button!

* I was dumb and forgot to remove the out commented code

* Added additional timeout so the pipeline has more time

* Removed language in settings because it was a duplicate of languages / languages

* Fixed the tests so they now check if each individual language that was created actually exists instead of checking for how many languages there are which could be flaky if another test touching the languages failed

* Bumped version

* Added a better locator for the buttons and increased timeouts

Signed-off-by: Zeegaan <nge@umbraco.dk>

Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>

* Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)

* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>

* Rollback project imports

* Remove duplicated lines in translations

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com>
Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Niels Lyngsø <nsl@umbraco.dk>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Søren Kottal <sk@ecreo.dk>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Watt <bkclerke@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: niekvanderreest <niekvanderreest@hotmail.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Rasmus John Pedersen <mail@rjp.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Jan Skovgaard <1932158+BatJan@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Jonny Muir <jonnymoo@hotmail.com>
Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Justin Neville <67802060+justin-nevitech@users.noreply.github.com>
2022-12-07 08:51:00 +01:00
Bjarke Berg 2b6205a88c Remove duplicated lines in translations 2022-12-07 07:22:59 +01:00
ustadstarandMichael Latouche f7e73fbff5 Fix check for existing userStatesFilter 2022-12-07 00:38:30 +01:00
Bjarke Berg e83e2dedb4 Rollback project imports 2022-12-06 13:32:06 +01:00
Bjarke Berg 962c1a1a5b Merge branch 'v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Infrastructure/Migrations/Upgrade/UmbracoPlan.cs
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Branding/logo.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Login/login.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/templates.spec.ts
2022-12-06 12:53:37 +01:00
Justin NevilleandBjarke Berg e2b8cc7060 Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)
* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 12:40:47 +01:00
d08f21d638 Fix for issue 13017 - BeginUmbracoForm doesn't work with custom umbraco routes (#13103)
* Fix issue with custom Umbraco routes not working after submitting to a Surface controller

* Added comments

* Fixed breaking changes

* Fixed test by using correct new ctor

* Fixed initializtion of UmbracoRouteValueTransformer due to ambiguous ctor

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 12:39:43 +01:00
Andreas ZerbstandGitHub 2da4b725b1 V11/feature/flaky test work (#13513)
* Removed all the DeleteAllContent since I delete the doctypes in the before and after each functions which also deletes the content.

* fixed the test so it selects the specific button!

* I was dumb and forgot to remove the out commented code

* Added additional timeout so the pipeline has more time

* Removed language in settings because it was a duplicate of languages / languages

* Fixed the tests so they now check if each individual language that was created actually exists instead of checking for how many languages there are which could be flaky if another test touching the languages failed

* Bumped version

* Added a better locator for the buttons and increased timeouts
2022-12-06 10:34:03 +01:00
4e823982c7 Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)
* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 08:19:44 +01:00
5e03236e70 Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)
* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-12-06 08:17:58 +01:00
Jason ElkinandGitHub 96918a9f1f Improve system information/telemetry (#13159)
* Differentiate between IIS and IIS Express in system information telemetry

* Add runtime mode to system information telemetry
2022-12-02 09:03:23 +01:00
Corné HoskamandGitHub 9099bf44ac Added various Block Grid translations (NL) - Pt 2. (#13508)
* Added various translations

* Added another translation

* Change request

* Added various other area translations

* Resolve conflict

* Forgot one!

* Update nl.xml
2022-12-01 14:26:58 +01:00
Kenn JacobsenandGitHub 2143d8c3fe Handle external authentication providers (#13487) 2022-12-01 10:38:24 +01:00
Andreas ZerbstandGitHub 2ce205953c V11/cherry pick flaky test (#13506)
* V10/feature/fixing flaky acceptance test (#13473)

* Bumped version
2022-12-01 08:55:33 +01:00
Nikolaj 934bb8be7a Merge tag 'release-11.0.0' into v11/dev
# Conflicts:
#	version.json
2022-12-01 08:29:47 +01:00
Justin NevilleandSebastiaan Janssen 8bf6a9246f Added aria label to time period on log dashboard 2022-11-30 16:20:31 +01:00
Justin NevilleandSebastiaan Janssen 88ff05a836 Allow empty valuesets to be indexed so the back-offce does not hang when rebuilding empty indexes 2022-11-30 16:19:17 +01:00
Markus JohanssonandSebastiaan Janssen d2ab80534a LogViewe: Adding support for destructed properties 2022-11-30 16:17:27 +01:00
Matthew CareandSebastiaan Janssen 67c60d8a19 Update to latest framework version
Update reference to old framework version in web site projects
2022-11-30 16:16:08 +01:00
Erik-Jan WestendorpandSebastiaan Janssen 4f129baebd Use constants instead of hardcoded strings 2022-11-30 16:13:47 +01:00
Lotte PitcherandGitHub da9eae1252 Remove reference to installing a local package via backoffice (#13330) 2022-11-30 16:08:54 +01:00
Lotte PitcherandGitHub af4333b8e4 Fixing some comments errors to reduce CodeQL warnings (#13327) 2022-11-30 16:01:36 +01:00
CyberReiterandSebastiaan Janssen 02dcf98e3d make use of spans in UriExtensions to make them faster 2022-11-30 15:56:47 +01:00
Vitor RodriguesandSebastiaan Janssen 7ad1e638e6 Re-use any existing ReloadableLogger
It's possible that consumers have already set up a bootstrap logger themselves before Umbraco had a chance too, if that's the case we just reload it.
2022-11-30 15:51:36 +01:00
Vitor RodriguesandSebastiaan Janssen d4c921264d Added missing content-type header to BootFailedMiddleware response
When Umbraco is configured with X-Content-Type-Options nosniff as is recommended (there's even a health check for it), any boot failure would simply show the html source code in the browser instead of properly rendering the html, as the content-type wasn't being set.
2022-11-30 15:48:46 +01:00
Marc GoodsonandGitHub 2461b7d805 Adjust the wording of some of the helper text around the new Block Grid editor (#13484) 2022-11-30 15:36:23 +01:00
Kristian Tolleshaug MørchandSebastiaan Janssen 69c725b3ec Ensure format processor is before quality processor. 2022-11-30 13:50:06 +01:00
Vlael LayugandMichael Latouche f7b42a50cc add default culture when there's only 1 language configured 2022-11-30 08:50:30 +01:00
nikolajlauridsen d713b383c9 Bump version to final 2022-11-29 16:40:47 +01:00
Bjarke Bergandnikolajlauridsen 18fd0c9ed7 Nuget updates (#13478)
* Updated nuget packages

* Remove npoco update

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-11-29 14:17:07 +01:00
6c13c87f15 Nuget updates (#13478)
* Updated nuget packages

* Remove npoco update

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-11-29 14:16:49 +01:00
Niels LyngsøandGitHub acbaaecbcc do not set layout gaps (#13496) 2022-11-29 13:35:07 +01:00
Callum WhyteandGitHub 5ef43cb4f0 Rename StaticServiceProvider namespace Umbraco.Cms.Core.DependencyInjection (#13239) 2022-11-29 12:22:57 +01:00
Bjarne FyrstenborgandGitHub 30a7bca0ef UserController should use getLocalDate from dateHelper (#13469)
* Use `getLocalDate` from dateHelper

* Remove duplicate import

* Keep function getLocalDate but use dateHelper

* Mark function as deprecated
2022-11-29 11:56:12 +01:00
Bjarke Berg abd490f460 Merge remote-tracking branch 'origin/release/11.0' into release/11.0 2022-11-29 10:36:13 +01:00
Jacob OvergaardandGitHub b5a3dcb81e Info panes not loading prerequisites (#13486)
* load relations immediately on init and remove call to non-existing function `appTabChange` on destroy

* load relations immediately on init and remove now not-used eventsService
2022-11-29 10:07:52 +01:00
Niels Lyngsøandnikolajlauridsen b9990f23db Make sure contexbar fits within the available space (#13467)
* Make sure contexbar fits within the available space

* Ensuring context bar moves above, no matter size of it.

* Fixing apperance of connection-fixers
2022-11-29 09:59:49 +01:00
Bjarke Berg 9bed0cde9a Move login.svg file 2022-11-29 09:30:11 +01:00
Bjarke Berg a76d68bd37 Merge remote-tracking branch 'origin/release/11.0' into v11/dev
# Conflicts:
#	version.json
2022-11-29 08:19:27 +01:00
bfe9579a0c V11: Allow changing logging directory from configuration (#13485)
* Allow changing logging directory from configuration

* Clean up

* Missing return statement

* Apply suggestions from code review

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Core/Constants-SystemDirectories.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-29 07:27:59 +01:00
Roy BerrisandGitHub 1ed24e78c8 Notification documentation (#13207) 2022-11-28 23:26:59 +01:00
CyberReiterandSebastiaan Janssen f99378c5d3 Use ToArray instead of ToList 2022-11-28 23:18:54 +01:00
Erik-Jan WestendorpandGitHub 65dd52ad05 Add AddManifestFilter extension method to UmbracoBuilder.CollectionBuilders.cs (#13161) 2022-11-28 23:14:24 +01:00
Lars-Erik AabechandSebastiaan Janssen 4d23e8a6bd Ensure culture is always set in LocalizeText 2022-11-28 23:11:28 +01:00
bkclerkeandSebastiaan Janssen 1009238f32 add aria-labelledby attribute to tags input 2022-11-28 23:04:13 +01:00
Jan SkovgaardandGitHub 97fa4d76dc Accessibility: Fix - Missing table description: A data table is present with no description associated to it (#13117) 2022-11-28 22:54:54 +01:00
Asbjørn Riis-KnudsenandGitHub 50d361c4e6 Skip populating the PropertyTypeGroup alias column if it is already populated (#13109) 2022-11-28 22:44:59 +01:00
patrickdemooij9andGitHub 475cea40a1 Use span in StripFileExtension to speed up and use less memory (#13101) 2022-11-28 22:12:30 +01:00
Anders BjernerandSebastiaan Janssen 33668a5d95 Added "loading" parameter to "umbEditorHeader" directive 2022-11-28 21:46:49 +01:00
Bjarne FyrstenborgandGitHub a7368542d8 Add input id to args in toggleValue event (#13108) 2022-11-28 21:33:59 +01:00
Karl ButlerandGitHub 2d560e9766 Accessibility Fixes for Users and Packages pages (#13087) 2022-11-28 21:17:04 +01:00
JesseandGitHub e87701c482 added fix for ncNodeName filter in list view (#13086) 2022-11-28 20:38:12 +01:00
Bjarke Berg 65f66c2560 Merge remote-tracking branch 'origin/release/11.0' into release/11.0 2022-11-28 19:58:10 +01:00
Bjarke Berg 082864f529 bump to rc6 2022-11-28 19:58:02 +01:00
Ronald BarendseandGitHub 8c483e8d3b Only add global usings when ImplicitUsings is enabled (#13491) 2022-11-28 19:57:36 +01:00
Niels LyngsøandBjarke Berg ed67cd887f Change login image to new SVG. (#13493) 2022-11-28 19:56:04 +01:00
Niels LyngsøandGitHub 188fa237cd Change login image to new SVG. (#13493) 2022-11-28 19:55:15 +01:00
Ronald BarendseandGitHub a3361606e0 Create and pack empty file to add TFM dependency (#13475) 2022-11-28 19:48:29 +01:00
Ronald BarendseandGitHub e45ed3d7f1 Revert breaking changes adding IContextCache to deploy connectors (#13489)
* Remove breaking changes in Deploy connector interfaces

* Add extension methods for calling the new interface methods in a backwards-compatible way
2022-11-28 19:16:19 +01:00
bakersbakebreadandSebastiaan Janssen 3377a7c96b add setDirty() logic to remove actions on mediaPicker3 property editor 2022-11-28 15:50:41 +01:00
Corné HoskamandNikolaj 493e93cc89 Added various Block Grid translations (EN & NL) (#13488)
* Added various translations

* Added another translation

* Change request
2022-11-28 14:58:10 +01:00
Corné HoskamandGitHub a4e67bf444 Added various Block Grid translations (EN & NL) (#13488)
* Added various translations

* Added another translation

* Change request
2022-11-28 14:54:03 +01:00
Nikolaj 7342fde17f Revert "Add status endpoint"
This reverts commit b594ad8ccf.
2022-11-28 14:42:22 +01:00
Nikolaj b594ad8ccf Add status endpoint 2022-11-28 14:41:15 +01:00
Sebastiaan Janssen 8c2329f2b2 Merge branch 'v11/dev' into v11/contrib
# Conflicts:
#	src/Umbraco.Core/EmbeddedResources/Lang/en.xml
#	src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
#	src/Umbraco.Web.UI.Client/src/views/packages/views/repo.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.controller.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-configuration-area-entry.html
2022-11-28 13:50:44 +01:00
Elitsa MarinovskaandGitHub af6b8fc5cb Enabling an Umbraco admin user to disable 2FA for a member (#13369)
* Fix Invalid authentication code bug

* Add translation keys for 2fa

* Display toggle for 2FA on member

* Add TwoFactorEnabled prop when saving member

* Handle disabling of 2FA

* Fix tests

* Changing obsolete msg
2022-11-28 13:42:38 +01:00
MoleandGitHub 06924ed0f4 Ensure that all automatic relation types are updated (#13470) 2022-11-28 12:49:14 +01:00
Jacob Overgaard 1a0983f0c7 update marketplace url to its final, live url 2022-11-28 11:15:48 +01:00
MoleandGitHub 37b33641c3 V11: Fix ordering by published in list of content (#13474)
* Update sort statement to use published field for invariant content

* Order by published if invariant
2022-11-25 11:37:46 +01:00
Sean ThorneandMichael Latouche 88ce31197e add health-check basic tests 2022-11-25 09:40:23 +01:00
Owain JonesandMichael Latouche 079b2b7452 Updated welsh translations file 2022-11-25 02:16:37 +01:00
Paul SealandGitHub d86d29807d created an add current domain button to the cultures and hostnames sc… (#13436)
* created an add current domain button to the cultures and hostnames screen

* removed unwanted space
2022-11-25 02:07:03 +01:00
Bjarne FyrstenborgandGitHub a500ef9497 Delete references using custom relation types (#13389)
undefined
2022-11-23 15:43:51 +01:00
MoleandGitHub aeb52ed94e Merge pull request #13404 from sean-p-m/temp-13402
13402 - Update PreviewAuthenticationMiddleware to support chunked aut…
2022-11-23 11:36:15 +01:00
Jacob OvergaardandGitHub 02275ed772 Add sensible eslint rules with newest eslint version (#13457) 2022-11-23 11:26:20 +01:00
MoleandGitHub 525a204c40 Merge pull request #13459 from umbraco/v11/merge_release_into_dev
Merge release into dev
2022-11-22 16:08:59 +01:00
Warren BuckleyandGitHub b392ac78b3 Merge pull request #13458 from umbraco/v11/codespaces/updated-sqlite-feature-location
Codespaces: Updated SQLite DevContainer feature after rename
2022-11-22 14:59:03 +00:00
f83c946c96 Updated docs links to point to new platform (#13426)
* Updated docs links to point to new platform

* Update settingsdashboardintro.html

Co-authored-by: nikolajlauridsen <nikolajlauridsen@protonmail.ch>
2022-11-22 15:37:15 +01:00
nikolajlauridsen d188ff9730 Merge branch 'release/11.0' into v11/merge_release_into_dev
# Conflicts:
#	src/JsonSchema/AppSettings.cs
#	src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/blockgridui.less
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/blockgrid.blockconfiguration.overlay.html
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbblockgridentries.component.js
#	src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/umbraco-blockgridlayout-flexbox.css
#	version.json
2022-11-22 15:30:45 +01:00
Warren Buckley 03253afabe The repo & package for the SQLite DevContainer feature has moved after I renamed the repo 2022-11-22 14:11:24 +00:00
Kenn JacobsenandGitHub cbd5d45bbf Split search/index API into two separate APIs (#13447)
* Split searcher and indexer API into two separate ones

* Fixed bad merge + fixed namespaces

* Update OpenAPI json scheme
2022-11-22 13:43:50 +01:00
Bjarne Fyrstenborgandnikolajlauridsen dc1b10f324 Adjust sorting of block grid editor groups to y-axis only (#13225)
fixes https://github.com/umbraco/Umbraco-CMS/issues/13180
2022-11-22 12:53:52 +01:00
Ronald BarendseandGitHub 2e54579a2f Simplify JSON schema, generation, copying and updating (#13427)
* Simplify JSON schema and only generate appsettings-schema.Umbraco.Cms.json

* Use Umbraco.JsonSchema.Extensions to dynamically add JSON schema references

* Move DependentUpon items to shared MSBuild props

* Update LangVersion to latest

* Update Umbraco.GitVersioning.Extensions to 0.2.0

* Remove JSON schemas on clean

* Remove Umbraco.JsonSchema.Core project

* Fix JSON schema nullability

* Ignore additional JSON schema files in template

* Update CompatibilitySuppressions.xml

* Remove GlobalSettings.UmbracoPath from JSON schema again

* Remove RemoveUmbracoJsonSchemaFiles target

* Update Umbraco.JsonSchema.Extensions to 0.2.0 and add weights

* Flatten generated JSON schema hierarchy

* Remove LicensesSettings from CMS codebase

* Change AdditionalParameters to IDictionary
2022-11-22 12:48:11 +01:00
Bjarne FyrstenborgandGitHub d4c5f5017f Adjust sorting of block grid editor groups to y-axis only (#13225)
fixes https://github.com/umbraco/Umbraco-CMS/issues/13180
2022-11-22 10:57:31 +01:00
Niels Lyngsøandnikolajlauridsen 85842bde9f remove the hidding of catelouge appearance as its not located under advance (#13456) 2022-11-22 10:55:14 +01:00
nikolajlauridsen 22caf2319d Bump version 2022-11-22 09:51:34 +01:00
niekvanderreestandnikolajlauridsen 82cd8330ea Cherry pick #13373 to v10/dev 2022-11-22 09:48:15 +01:00
dependabot[bot]andnikolajlauridsen 36a505ee78 Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-22 09:48:03 +01:00
Niels Lyngsøandnikolajlauridsen bde2f7c0c3 use custom prop for calculated width (#13451) 2022-11-22 09:44:09 +01:00
Niels Lyngsøandnikolajlauridsen 0def36ac31 Block Grid Editor translations and Area size keyboard navigation (#13450) 2022-11-22 09:44:01 +01:00
Niels Lyngsøandnikolajlauridsen a0f348862f Display media trashed state on custom view for image demo block (#13448) 2022-11-22 09:43:45 +01:00
3b9fc38078 block grid editor visual adjustments (#13446)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

* more white borders on UI

* move Catalogue appearance to Advanced

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:43:21 +01:00
195cf4f9ec Block Grid Editor - make prevalue overlay medium sized (#13443)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* make prevalue editor overlay medium size

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:42:53 +01:00
f2798a6790 Block Grid Editor adjust while sorting (#13442)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

* Adjust columnSpan to context container, keep start columnSpan as the target for the calculation.

* change let to const

* Revert "change let to const"

This reverts commit fe19f8c5ed.

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:29:54 +01:00
72bdebf419 v11: Umbraco Marketplace replaces packages repo (#13371)
* add lang keys for marketplace

* remove old 'repo' page and deprecate related services

* add new view for Umbraco Marketplace

* optimise margin/padding for other tabs

* mark Our Repository constants as obsolete

* improve css path to iframe slightly with more aliases and classnames

* remove style qs

* update URL of Marketplace

* add ng-controller with utitlities for future PostMessage API

* rename marketplace loaded function

* remove iframe postmessage logic for time being

* add handling of dynamic querystring params

* assume url does not change

* Added support for additional parameters for marketplace

* Update src/JsonSchema/AppSettings.cs

Fix styling issue

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Update src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs

Fix styling issue

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Update src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs

Make comment more descriptive

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Update src/Umbraco.Core/Constants-Marketplace.cs

Fix styling issue

Co-authored-by: Ronald Barendse <ronald@barend.se>

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-22 09:28:15 +01:00
1196a4d07b Block Grid Editor sorting directive (#13391)
* make sure area border is on top of block views.

* rename class to avoid confusion

* change witch UI goes on top on hover

* Description informing all blocks are allowed when none is configured.

* add 'When empty'

* Sort mode

* ability to switch out property actions

* enter and exit sortmode from property actions

* gridsortblock

* rename block class to use sortblock

* Sort mode styling

* remove unused css selector

* fixing style for inline-creat button to appear above and not when hovering contextbar

* work on block grid inline editor

* use uui-button + enable installing demo blocks when its not the first dataType of this kind.

* improvements to inline editing POC

* update title of area config overlay editor

* reset columnSpan if no column span options is defined.

* Inline editing

* remove html comment

* remove code for transfer of stylesheets

* ability to hide label from directive

* inline editing using slots to render the umb-property in light dom

* remove property editor proxies when moving a block to a new area/block/context

* minor adjustments to custom views

* use individual slots for each area.

* Inline editing

* a little smaller rte min-height

* fire Custom focus/blur event for Block Grid Editor to catch for focus imitation

* disable inline editing prevalue field when custom view is set

* Fix scroll parent block into view

* initial work on sorter directive

* remove mediaBlock controller

* initial notes and structure

* further concept work

* remove consol log

* CSS for getting bigger areas

* removal of the forceLeft/forceRight code

* proven concept

* fix grid space detection. vertical/horizontal

* clean up and notes

* move into inner containers as well

* use last available index pr default

* boundary selector, for improved choise of dropping into an area

* hide last inline create button when dragging around

* remove console.log

* removal of forced placement in css

* default config and clean up

* notes

* bring back removed code

* show area ui when in dragging mode

* more specific selector

* drop allowance + clean up

* notes and clean up

* auto scroll

* turn --umb-block-grid--dragging-mode into conditional CSS Custom Property

* auto scroll

* refactoring

* fix condition mistake

* scope.config.resolveVerticalDirection

* wrap up simple setDragImage solution

* bring back vm.notifyVisualUpdate and clean up

* make draggableSelector optional, fallback to element

* implement umb-block-grid-sorter for Area PreValue editor

* remove sortableJS dependency

* remove sortableJs from dependencies

* wups, bring back the comma

* removed sortablejs from package-lock

* finished implementation of sorter for PreValue Block Areas

* fix for FireFox shadowDom issue, contains temprorary code.

* stop auto scroll

* make full thing dragable

* fix firefox issue (applying translateZ)

* comment

* make block fit in context columns

* revert element to where it came from if sync could not succeed + clean up

* ensure block does not push the amount of columns, this occourse when dragging item around.

* take horizontalPlaceAfter into account

* implement horizontalPlaceAfter in Areas Prevalue editor

* clean up dependencies

* Shift related el to first in row or last in row when there is no horizontal room

* clean up and correct calculation

* remove unused attribute

* revert to using el.getBoundingClientRect(), as the config.draggableSelector is not available for the placeholder item.

* bind model via dedicated binding to ensure it stay connected with the source model

* Update src/Umbraco.Web.UI.Client/src/views/propertyeditors/blockgrid/prevalue/umb-block-grid-area-editor.html

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* fix eslint issues

* ensure missingColumnWidth is above 0

* Do not allow dragging something thats not found in the model.

* remove as this is not an error.

* update to Flexbox solution

* as the complex model does not change we can use single way binding

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-22 09:27:13 +01:00
Anders Bjernerandnikolajlauridsen 65479706a9 NullOrWhiteSpaceAsNull should be nullable 2022-11-22 09:26:42 +01:00
niekvanderreestandnikolajlauridsen b3555eb374 Cherry pick #13373 to v10/dev 2022-11-22 09:24:06 +01:00
dependabot[bot]andJacob Overgaard 9791c4964f Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-22 09:11:06 +01:00
dependabot[bot]andJacob Overgaard 0f4b2300ab Bump engine.io and socket.io in /src/Umbraco.Web.UI.Client
Bumps [engine.io](https://github.com/socketio/engine.io) and [socket.io](https://github.com/socketio/socket.io). These dependencies needed to be updated together.

Updates `engine.io` from 6.1.3 to 6.2.1
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.1.3...6.2.1)

Updates `socket.io` from 4.4.1 to 4.5.3
- [Release notes](https://github.com/socketio/socket.io/releases)
- [Changelog](https://github.com/socketio/socket.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io/compare/4.4.1...4.5.3)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
- dependency-name: socket.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-22 09:10:08 +01:00
Warren BuckleyandGitHub a2e61b7899 Merge pull request #13453 from umbraco/v11/codespace-SQLite-as-container-feature
Codespaces: Adds SQLite to DevContainer via Features
2022-11-22 07:59:43 +00:00
Warren Buckley 16a1cda67c Uses the SQLite DevContainer Feature I wrote as GitHub won't write one 2022-11-21 22:42:41 +00:00
Kenn JacobsenandGitHub 48733e6132 Support explicit operation IDs (#13449) 2022-11-21 19:51:42 +01:00
Jan SkovgaardandGitHub 2288d98481 Block Grid Editor: Replace "TODO" text in titles (#13433) 2022-11-21 16:52:51 +01:00
4e98df799f v11: Umbraco Marketplace replaces packages repo (#13371)
* add lang keys for marketplace

* remove old 'repo' page and deprecate related services

* add new view for Umbraco Marketplace

* optimise margin/padding for other tabs

* mark Our Repository constants as obsolete

* improve css path to iframe slightly with more aliases and classnames

* remove style qs

* update URL of Marketplace

* add ng-controller with utitlities for future PostMessage API

* rename marketplace loaded function

* remove iframe postmessage logic for time being

* add handling of dynamic querystring params

* assume url does not change

* Added support for additional parameters for marketplace

* Update src/JsonSchema/AppSettings.cs

Fix styling issue

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Update src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs

Fix styling issue

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Update src/Umbraco.Core/Configuration/Models/MarketplaceSettings.cs

Make comment more descriptive

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Update src/Umbraco.Core/Constants-Marketplace.cs

Fix styling issue

Co-authored-by: Ronald Barendse <ronald@barend.se>

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-18 15:06:24 +01:00
d089825537 Feature: Media Picker drag and drop upload directly on property editor (#13393)
* prototype drag and drop upload

* Add upload image endpoint

* Add MediaPickerThreeController.cs

* Revert "Add upload image endpoint"

This reverts commit 4bb5865480.

* Update IIOHelper dependency

* show preview when uploading a new media item

* open uploaded media in media entry editor

* map data from uploaded media entry to support cropper

* add crop data to uploaded media item

* remove media library buttons for media entries not created in the media library

* Implement temp images save & add to media picker 3

* Implement ITemporaryImageService

* Remove save logic from MediaPicker3PropertyEditor

* Dont use a TempImageDto

* Add GetByAlias endpoint

* Add additonal xml doc

* Refactor to take array of aliases

* Add FromQuery attribute

* Formatting

* add resource to get media types by alias

* validate file size and file type based on server variables

* Update OpenApi.json
Add media picker three to BackOfficeServerVariables

* rename endpoint to upload media

* Use baseurl Method

* Dont upload in rte folder

* pass params correctly to end point

* queue files before uploading

* handle invalid files

* progress bar design adjustments

* only create data url for images

* disable edit and name buttons when uploading

* fix missing error messages for invalid files

* add temp location to media entry

* Add startNode to TemporaryImageService.cs

* Refactor get by alias

* Rename to GetAllFiltered

* use getAllFiltered method

* remove autoselect option

* fix missing alias when selecting media type

* fix file filter

* don't overwrite invalid entries from dropping new files

* add disallowed files to filter

* remove console.log

* move media uploader logic to reusable function

* fix missing tmp location

* attach media type alias to the mediaEntry

* support readonly mode

* show discard changes when files has been dropped

* add disabled prop to button group

* emit events when upload queue starts and ends

* pass node to media picker property editor

* add service to keep track of all uploads in progress

* add upload in progress to uploadTracker when the queue starts and ends

* disabled buttons when any upload is in progress

* return a subscription to align with eventsService

* Fix up cases where StartNodeId was null

* scope css

* Show filename in dialog for selecting media type

* reuse translation from media library dropzone

* Don't check for only images

* Remove composer

* Add mediaTypeAlias to TemporaryImageService

* Rename ITemporaryImageService to ITemporaryMediaService

* prefix client side only props with $ so we don't send unnecessary data to the server

* use prefixed dataURL in media entry editor

* render icon for non images

* fix auto select media type

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-18 11:47:42 +01:00
Nikolaj GeisleGitHubZeegaanMoleRonald Barendsedependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Blake WattJacob Overgaard
fb48ecb57f V11: merge dev to contrib (#13438)
* V11: add test flakyness reporting (#13386)

* update json-models-builders

* Add reporting to all before each loops

* Add commitId to env for pipelines

* Test reports correctly

* Bumb testhelper version

* Update playwright-testhelpers version

* Bumb playwright test-helper version

* Bumb playwright-testhelpers version

* Add AgentOs to yaml env

* Bumb playwright-testhelper version

* Try different AgentOS

* Revert "Try different AgentOS"

This reverts commit fc90620aef.

* Revert logo test

* Add missing semicolons

* Update package-lock.json

* Add reports to Blocklist tests

Co-authored-by: Zeegaan <nge@umbraco.dk>

* V10: AllowedUploadFiles appsetting not working (#13408)

* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

Co-authored-by: Zeegaan <nge@umbraco.dk>

* V11: Add  compatibility suppressions (#13425)

* Add suprressions

* Revert "Add suprressions"

This reverts commit 1c924ee967.

* Update CompatibilitySuppressions.xml

Co-authored-by: Ronald Barendse <ronald@barend.se>

* Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client

Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* update block grid panel name (#13325)

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>

* Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client

Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client

Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Management API: SearchController improvements (#13420)

* remove typo of double PagedViewModel in response

* add providerProperties with custom formatter

* use a more descriptive variable name

* use a more descriptive variable name for property types

* generate new schema

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Blake Watt <bkclerke@users.noreply.github.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-18 09:00:43 +01:00
dependabot[bot]andNikolaj 695b5bd57a Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:22:14 +01:00
dependabot[bot]andNikolaj f7a314cd6b Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:21:14 +01:00
dependabot[bot]andNikolaj 44d1c2d722 Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:21:09 +01:00
dependabot[bot]andNikolaj 5e40b3f0d6 Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:21:03 +01:00
dependabot[bot]andJacob Overgaard 7281c6ba26 Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:20:35 +01:00
dependabot[bot]andJacob Overgaard 98da07cfb4 Bump minimatch from 3.0.4 to 3.1.2 in /src/Umbraco.Web.UI.Client
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 15:20:08 +01:00
267656d793 Management API: SearchController improvements (#13420)
* remove typo of double PagedViewModel in response

* add providerProperties with custom formatter

* use a more descriptive variable name

* use a more descriptive variable name for property types

* generate new schema

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 14:46:42 +01:00
dependabot[bot]andJacob Overgaard a4098ce0b1 Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:18:38 +01:00
dependabot[bot]andJacob Overgaard 8048a11944 Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:18:30 +01:00
dependabot[bot]andJacob Overgaard ba8d2e87d5 Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:18:27 +01:00
dependabot[bot]andJacob Overgaard d1f10f486d Bump eventsource from 1.1.0 to 1.1.2 in /src/Umbraco.Web.UI.Client
Bumps [eventsource](https://github.com/EventSource/eventsource) from 1.1.0 to 1.1.2.
- [Release notes](https://github.com/EventSource/eventsource/releases)
- [Changelog](https://github.com/EventSource/eventsource/blob/master/HISTORY.md)
- [Commits](https://github.com/EventSource/eventsource/compare/v1.1.0...v1.1.2)

---
updated-dependencies:
- dependency-name: eventsource
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:16:53 +01:00
dependabot[bot]andJacob Overgaard 55b7897d86 Bump minimist from 1.2.5 to 1.2.7 in /src/Umbraco.Web.UI.Client
Bumps [minimist](https://github.com/minimistjs/minimist) from 1.2.5 to 1.2.7.
- [Release notes](https://github.com/minimistjs/minimist/releases)
- [Changelog](https://github.com/minimistjs/minimist/blob/main/CHANGELOG.md)
- [Commits](https://github.com/minimistjs/minimist/compare/v1.2.5...v1.2.7)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:16:07 +01:00
dependabot[bot]andJacob Overgaard cf6042ce37 Bump async from 2.6.3 to 2.6.4 in /src/Umbraco.Web.UI.Client
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 14:15:39 +01:00
Blake WattandJacob Overgaard 3b08f4a964 update block grid panel name (#13325)
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-17 14:11:25 +01:00
7239a78ad1 update block grid panel name (#13325)
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
2022-11-17 14:10:37 +01:00
dependabot[bot]andJacob Overgaard 9ec7b1ce49 Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 13:59:38 +01:00
dependabot[bot]andJacob Overgaard 0415ed8267 Bump socket.io-parser from 4.0.4 to 4.0.5 in /src/Umbraco.Web.UI.Client
Bumps [socket.io-parser](https://github.com/socketio/socket.io-parser) from 4.0.4 to 4.0.5.
- [Release notes](https://github.com/socketio/socket.io-parser/releases)
- [Changelog](https://github.com/socketio/socket.io-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/socket.io-parser/compare/4.0.4...4.0.5)

---
updated-dependencies:
- dependency-name: socket.io-parser
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-17 13:59:11 +01:00
MoleandRonald Barendse f18209f616 V11: Add compatibility suppressions (#13425)
* Add suprressions

* Revert "Add suprressions"

This reverts commit 1c924ee967.

* Update CompatibilitySuppressions.xml

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-17 13:56:09 +01:00
0042343e0b V11: Add compatibility suppressions (#13425)
* Add suprressions

* Revert "Add suprressions"

This reverts commit 1c924ee967.

* Update CompatibilitySuppressions.xml

Co-authored-by: Ronald Barendse <ronald@barend.se>
2022-11-17 13:54:14 +01:00
Warren BuckleyandGitHub 76078b29dc Merge pull request #13428 from umbraco/v11/codespaces-updated-readme
Codespaces: Updated readme
2022-11-17 10:38:58 +00:00
Warren Buckley 74b7ee142c Updated readme 2022-11-17 10:35:18 +00:00
Anders BjernerandMichael Latouche 5ffc2b1ccb NullOrWhiteSpaceAsNull should be nullable 2022-11-17 11:13:49 +01:00
5ce7cd39b9 V10: AllowedUploadFiles appsetting not working (#13408)
* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 09:55:54 +01:00
d545c1fa1e V10: AllowedUploadFiles appsetting not working (#13408)
* Add new Settings

* Use new settings instead of old ones

* Implement AllowedUploadedFiles value to be copied to AllowedUplayedFileExtensions

* Obsolete old settings

* Rename DisallowedUploadFileExtensions

* Implement same fix for DisallowedUploadFiles

* Use new settings for backoffice server variables

* Update the correct setting

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 09:55:27 +01:00
22bcc9b054 V11: add test flakyness reporting (#13386)
* update json-models-builders

* Add reporting to all before each loops

* Add commitId to env for pipelines

* Test reports correctly

* Bumb testhelper version

* Update playwright-testhelpers version

* Bumb playwright test-helper version

* Bumb playwright-testhelpers version

* Add AgentOs to yaml env

* Bumb playwright-testhelper version

* Try different AgentOS

* Revert "Try different AgentOS"

This reverts commit fc90620aef.

* Revert logo test

* Add missing semicolons

* Update package-lock.json

* Add reports to Blocklist tests

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-11-17 09:27:47 +01:00
Sebastiaan Janssen 60765b976c Merge branch 'v11/dev' into v11/contrib
# Conflicts:
#	.gitignore
#	src/Umbraco.Cms.ManagementApi/ManagementApiComposer.cs
#	src/Umbraco.Cms.ManagementApi/OpenApi.json
2022-11-17 09:26:44 +01:00
Niels LyngsøandNikolaj dc2358f4f0 Block Grid Editor: Removal of the forced placement feature (#13400)
* removal of the forceLeft/forceRight code

* removal of forced placement in css

* bring back removed code
2022-11-17 08:42:18 +01:00
Niels LyngsøandNikolaj 9b13a260e9 Block Grid Editor: Removal of the forced placement feature (#13400)
* removal of the forceLeft/forceRight code

* removal of forced placement in css

* bring back removed code
2022-11-17 08:41:21 +01:00
Jacob OvergaardandNikolaj 8a04f9fd99 v11: Fix for TinyMCE dropdowns (#13417)
* Set higher z-index for TinyMCE overlays as they were set below that of our property editor overlays

Fixes #13414

* replace !important with more specificity
2022-11-17 08:39:47 +01:00
Warren BuckleyandGitHub 137b4eba68 Merge pull request #13421 from umbraco/v11/codespace-fwd-port-smtp4dev
Codespaces: List port 5000 for Smtp4Dev
2022-11-16 16:34:59 +00:00
Warren Buckley dbc8c2680e List port 5000 for Smtp4Dev 2022-11-16 16:21:05 +00:00
Jacob OvergaardandGitHub f2de42f38e v11: Fix for TinyMCE dropdowns (#13417)
* Set higher z-index for TinyMCE overlays as they were set below that of our property editor overlays

Fixes #13414

* replace !important with more specificity
2022-11-16 11:48:18 +01:00
Warren BuckleyandGitHub 079d2f91b9 Merge pull request #13416 from umbraco/v11/codespaces-auto-open-codespace-readme
CodeSpaces: Scaffold out a file for a specific Codespace readme to auto open
2022-11-15 16:58:12 +00:00
Warren Buckley d3905b4c5c Scaffold out a file for a specific Codespace readme 2022-11-15 16:16:08 +00:00
7af8a407d3 Management API operation IDs (#13374)
* add a custom operationId generator to swagger operations based on the name of the action

* mark 'total' and 'items' as required in all paged models seeing as they should be there always non-nullable

* fix action typo collect -> rebuild to avoid duplicates

* fix operations for server status + version

* add factory to format custom operation ids

* Revert "fix operations for server status + version"

This reverts commit 066a59e1c2.

* Throw exception if no relative path and remove template placeholders completely

* Revert "Throw exception if no relative path and remove template placeholders completely"

This reverts commit 40af0721d6.

* Move source generated regex statements to its own file (#13410)

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-11-15 15:43:12 +01:00
Warren BuckleyandGitHub be8b083746 Merge pull request #13409 from umbraco/v11/codespace-sqlite-extension
Codespaces: Adds SQLite extension & ensures SQLite thats needed for it
2022-11-15 14:01:51 +00:00
Warren Buckley 2f976b41b4 Adds SQLite extension & ensures SQLite thats needed for it 2022-11-15 13:33:26 +00:00
Warren BuckleyandGitHub c7e78bcb72 Merge pull request #13407 from umbraco/v11/codespace-remove-build-before-launch
Codespaces: Removes the explicit build before attaching debugger launch task
2022-11-15 11:52:23 +00:00
Warren Buckley 704dda9575 Removes the explicit build before attaching debugger launch task 2022-11-15 11:23:53 +00:00
Warren BuckleyandGitHub d4949ae613 Merge pull request #13405 from umbraco/v11/codespaces-prebuild-dev-cert
Codespaces: dotnet devcert in the docker was not working so moved to updateContentCommand
2022-11-15 10:47:53 +00:00
Warren BuckleyandGitHub f0a34bd2a4 Merge branch 'v11/contrib' into v11/codespaces-prebuild-dev-cert 2022-11-15 10:19:39 +00:00
Warren BuckleyandGitHub aaf76ec5b8 Merge pull request #13401 from umbraco/v11/feature/codespaces-port-forward-config
Enable CodeSpaces PortForwarding Config
2022-11-15 10:14:35 +00:00
Warren Buckley 1d78a06509 The devcert in the docker was not working so moved to updateContentCommand 2022-11-15 10:14:29 +00:00
Sean Maloney c365c64bea 13402 - Update PreviewAuthenticationMiddleware to support chunked authentication cookies 2022-11-15 10:12:10 +00:00
Warren Buckley b32b0371ae Open Browser config is not working for some unknown reason 2022-11-15 09:47:10 +00:00
Warren Buckley 0cad30a8fa Adds SMTP4Dev and opens browser to HTTPs Umbraco 2022-11-15 08:55:39 +00:00
Warren Buckley 5d3b2e2e8a Enable CodeSpaces PortForwarding Config as SMTP4Dev did not auto appear in new prebuilds 2022-11-15 08:43:21 +00:00
Jacob OvergaardandNikolaj 6bc537713c v11: Rich text editor - remove distraction-free mode and optimise inline mode (#13394)
* combine 'inline' and 'distraction-free' modes with the quickbars plugin

* remove 'distraction-free' and map to 'inline'

* remove container overrides for 'distraction-free'
2022-11-15 09:13:14 +01:00
Warren BuckleyandGitHub 35355ce828 Merge pull request #13398 from umbraco/v11/feature/codespace-prebuilds-take-two
Trying Codespace prebuilds to use updateContentCommand that the docs refer to
2022-11-14 15:14:52 +00:00
Warren Buckley a4f8a51c57 Trying Codespace prebuilds to use updateContentCommand that the docs refer to 2022-11-14 15:11:15 +00:00
Jacob OvergaardandGitHub 3a8024c0c6 v11: Rich text editor - remove distraction-free mode and optimise inline mode (#13394)
* combine 'inline' and 'distraction-free' modes with the quickbars plugin

* remove 'distraction-free' and map to 'inline'

* remove container overrides for 'distraction-free'
2022-11-14 16:01:01 +01:00
Warren BuckleyandGitHub f5ff3e87d2 Merge pull request #13396 from umbraco/warrenbuckley-patch-1
Adds Open in GitHub Codespaces to main readme
2022-11-14 14:37:02 +00:00
Warren BuckleyandGitHub cf96aefb86 Adds Open in GitHub Codespaces to main readme
Adds Open in GitHub Codespaces to main readme next to other badges we have at the top of the readme
2022-11-14 14:36:26 +00:00
Warren BuckleyandGitHub dd895b1736 Merge pull request #13395 from umbraco/v11/feature/codespaces-prebuild-dotnetbuild
Adds dotnet build command for onCreateCommand to use in Prebuilds of CodeSpaces
2022-11-14 14:31:56 +00:00
Warren Buckley 3c709cfa24 Adds dotnet build command for onCreateCommand to use in Prebuilds of CodeSpaces 2022-11-14 14:10:52 +00:00
Nikolaj d03e0443b1 Merge branch 'release/11.0' into v11/dev
# Conflicts:
#	version.json
2022-11-14 14:41:44 +01:00
Nikolaj 0356aade30 Bump version 2022-11-14 12:44:26 +01:00
Nikolai Emil DammandNikolaj c2047d1d6e Remove nullability from AdditionalData on ContentItemDisplay (#13380)
@Zeegaan We have a use case where we need to set a value in the AdditionalData dictionary in a NotificationHandler, but as it can be null, it requires reflection to make sure that is not the case. As such, it would be nice if the following change could be implemented to ensure it is never null.
2022-11-14 12:42:43 +01:00
Bjarke BergandNikolaj 13308c3610 Obsolete old migrations and exif code (#13382)
* Obsoleted and deleted internal migrations + Enabled breaking changes checks agains v11.0.0-rc1

* Obsoleted and deleted internal exif stuff

* Added CompatibilitySuppressions.xml

* Change GenerateCompatibilitySuppressionFile
2022-11-14 12:40:22 +01:00
Bjarke BergandGitHub 616d092577 Obsolete old migrations and exif code (#13382)
* Obsoleted and deleted internal migrations + Enabled breaking changes checks agains v11.0.0-rc1

* Obsoleted and deleted internal exif stuff

* Added CompatibilitySuppressions.xml

* Change GenerateCompatibilitySuppressionFile
2022-11-14 12:40:06 +01:00
Warren BuckleyandGitHub 888488e7e4 Merge pull request #13392 from umbraco/v11/feature/codespace-gh-cli-ssh-support
Adds the SSH feature to allow the GitHub CLI SSH command to work
2022-11-14 11:34:27 +00:00
Mole 233c9df1d6 V11: InMemory - only add models assembly as runtime view reference if it exists (#13390)
* Only add models assembly as runtime view reference if it exists

* Add in memory metadata reference properly

compilations are readonly
2022-11-14 12:19:35 +01:00
Niels LyngsøandNikolaj e321982f44 remove console log 2022-11-14 12:19:31 +01:00
Niels LyngsøandNikolaj 27ec62016d Block Grid Editor Improvements (#13282) 2022-11-14 12:19:24 +01:00
Niels LyngsøandNikolaj 0e1095061e remove console log 2022-11-14 12:17:12 +01:00
Niels LyngsøandNikolaj 1bd03374dc Block Grid Editor Improvements (#13282) 2022-11-14 12:17:03 +01:00
MoleandGitHub a9e605d532 V11: InMemory - only add models assembly as runtime view reference if it exists (#13390)
* Only add models assembly as runtime view reference if it exists

* Add in memory metadata reference properly

compilations are readonly
2022-11-14 11:37:55 +01:00
Warren Buckley bd4553d8a4 Adds the SSH feature to allow the GitHub CLI SSH command to work 2022-11-14 10:01:34 +00:00
Matthew CareandGitHub 77859719f2 Batch media upload (#12947)
* Allow simultaneous uploads

Upload files in batches for faster uploading

* Fix concurrency issue

Many requests to add files coming at the same time can cause duplicate folders to be created.
In some cases, SQL exceptions can throw, and cause the application to hang.
Add Semaphore to process files on a single thread.

* Replace Semaphore with a Scope Provider

As suggested in the PR comments, replaced Semaphore with ICoreScopeProvider

* Revert "Replace Semaphore with a Scope Provider"

This reverts commit 228e1010c6.

* Add comment to make configurable

Out of scope of the PR, but this should be configurable in appsettings

* Apply PR 13345

Apply PR 13345 to resolve "freezing" issue caused by unhandled errors

* Account for currently processing items

If you drag files into the dropzone whilst other files are uploading then the "total" count is incorrect.
2022-11-14 07:49:18 +01:00
Andreas ZerbstandGitHub bee6adfe27 V11: Add new blocklist acceptance tests (#13299)
* Created test for block list editor

* Added a couple of test for the block list editor

* Changed parts of builder

* Split the test into two files instead of one

* Updated and added test for blockListEditor

* Updated version

* Fixed so it now targets the correct selector

* Removed unnecessary login in the afterEach

* Fixed up the test so they are now using constants and the correct helpers

* Bumped version

* Updated the package-lock

* Added local function to battle code reuse!

* Updated the path of the image for the test 'can edit a block list editor'

* Placed an expect before the button so it waits to click the button till it's visible

* Yet another fix for the imagePath and a missing "
2022-11-14 07:01:33 +01:00
Warren BuckleyandGitHub efa069f1ed Merge pull request #13387 from umbraco/v11/codespaces
Adds in .NET 7 SDK to GitHub CodeSpaces
2022-11-11 19:38:17 +00:00
Warren Buckley 4d1a1ba413 Adds in .NET SDK using the Feature approach in devcontainer.json until NET7 image is live 2022-11-11 19:01:54 +00:00
Nikolai Emil DammandGitHub ad0582a5aa Remove nullability from AdditionalData on ContentItemDisplay (#13380)
@Zeegaan We have a use case where we need to set a value in the AdditionalData dictionary in a NotificationHandler, but as it can be null, it requires reflection to make sure that is not the case. As such, it would be nice if the following change could be implemented to ensure it is never null.
2022-11-10 14:13:10 +01:00
Kenn JacobsenandNikolaj 69c6eae7a2 Move block grid single area rendering to its own dedicated view (#13359) 2022-11-09 09:52:46 +01:00
Kenn JacobsenandNikolaj d11ed8acff Move block grid single area rendering to its own dedicated view (#13359) 2022-11-09 09:51:11 +01:00
Bjarke BergandNikolaj 84240d90b6 Updated to aspnetcore 7.0.0 (#13372) 2022-11-09 09:33:22 +01:00
Bjarke BergandGitHub 73afd29b55 Updated to aspnetcore 7.0.0 (#13372) 2022-11-09 09:30:07 +01:00
c1e9775f29 Merge new backoffice changes to release branch (#13368)
* New backoffice: Cleanup management API routes (#13296)

* Rename ModelsBuilderDashboard folder to ModelsBuilder

* Fix modelsbuilder paths and related naming

* Rename analytics route to telemetry

* Fix controller bases - routes and tags

* Fix items route

* Fix more controllerbase routes

* Fix route

* Fix OpenApi file

* Merging DictionaryItem and Dictionary

* Fix TrackedReferences naming

* Update OpenApi file

* Rename Analytics* related types to Telemetry*

* New Backoffice: Return AnalyticsLevelViewModel from Telemetry/ (#13298)

* Return TelemetryLevelViewModel instead of TelemetryLevel

* Fix schema

* Change telemetry/current to telemetry/level

(cherry picked from commit f2b8494c669cbbf04b623753abbf1be211973aa9)

* Add contants for tree and recycle-bin subpaths

(cherry picked from commit 4449f56bc00832ea6d357a3854b454791c80e0e2)

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* OpenId Connect authentication for new management API (#13318)

* First attempt at OpenIddict

* Making headway and more TODOs

* Redo current policies for multiple schemas + clean up auth controller

* Fix bad merge

* Clean up some more test code

* Fix spacing

* Include AddAuthentication() in OpenIddict addition

* A little more clean-up

* Move application creation to its own implementation + prepare for middleware to handle valid callback URL

* Enable refresh token flow

* Fix bad merge from v11/dev

* Support auth for Swagger and Postman in non-production environments + use default login screen for back-office logins

* Add workaround to client side login handling so the OAuth return URL is not corrupted before redirection

* Add temporary configuration handling for new backoffice

* Restructure the code somewhat, move singular responsibility from management API project

* Add recurring task for cleaning up old tokens in the DB

* Fix bad merge + make auth controller align with the new management API structure

* Explicitly handle the new management API path as a backoffice path (NOTE: this is potentially behaviorally breaking!)

* Redo handle the new management API requests as backoffice requests, this time in a non-breaking way

* Add/update TODOs

* Revert duplication of current auth policies for OpenIddict (as it breaks everything for V11 without the new management APIs) and introduce a dedicated PoC policy setup for OpenIddict.

* Fix failing unit tests

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Core/Routing/UmbracoRequestPaths.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Use Swashbuckle instead of NSwag (#13350)

* First attempt at OpenIddict

* Making headway and more TODOs

* Redo current policies for multiple schemas + clean up auth controller

* Fix bad merge

* Clean up some more test code

* Fix spacing

* Include AddAuthentication() in OpenIddict addition

* A little more clean-up

* Move application creation to its own implementation + prepare for middleware to handle valid callback URL

* Enable refresh token flow

* Fix bad merge from v11/dev

* Support auth for Swagger and Postman in non-production environments + use default login screen for back-office logins

* Add workaround to client side login handling so the OAuth return URL is not corrupted before redirection

* Add temporary configuration handling for new backoffice

* Restructure the code somewhat, move singular responsibility from management API project

* Add recurring task for cleaning up old tokens in the DB

* Fix bad merge + make auth controller align with the new management API structure

* Explicitly handle the new management API path as a backoffice path (NOTE: this is potentially behaviorally breaking!)

* Redo handle the new management API requests as backoffice requests, this time in a non-breaking way

* Add/update TODOs

* Replace NSwag with Swashbuckle and clean up unnecessary client secret workaround

* Revert duplication of current auth policies for OpenIddict (as it breaks everything for V11 without the new management APIs) and introduce a dedicated PoC policy setup for OpenIddict.

* Fix failing unit tests

* A little niceness + export new OpenApi.json and fix path in contract unit test

* Redo after merge with v11/dev + filter out unwanted mime types

* Remove CreatedResult and NotFoundObjectResult where possible

* Custom schema IDs - no more "ViewModel" postfix and make generic lists look less clunky too

* A little more explanation for generic schema ID generation

* Force Swashbuckle to use enum string names

* Update OpenApi.json to match new enum string values

* Add clarifying comment about weird looking construct

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-08 12:48:46 +01:00
Nathan Woulfeandnikolajlauridsen 65803e2645 add workflow to schema (#13349)
* add workflow to schema

* add licenses to CMSDefinition - intentionally only adding to schema, not registered as options
2022-11-08 11:07:30 +01:00
+1 64e7933d57 V11: Merge dev to contrib (#13363)
* Bump version

* Add IContextCache to deploy connectors (#13287)

* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Add IContextCache to deploy connectors (#13287)

* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>

* Parse lockId as invariant (#13284)

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Fix Sqlite database locking issue (#13246)

* Add locking for creating scope

* Lock the repository instead

* Add scope in action instead of locking in service

* Fix up post-merge

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Bump version to next minor

* Fix for UseExceptionHandler no longer working since v10.3 RC (#13218)

* Fix for UseExceptionHandler no longer working since v10.3 RC

* Update the management api path to match the new one

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>

* New backoffice: Cleanup management API routes (#13296)

* Rename ModelsBuilderDashboard folder to ModelsBuilder

* Fix modelsbuilder paths and related naming

* Rename analytics route to telemetry

* Fix controller bases - routes and tags

* Fix items route

* Fix more controllerbase routes

* Fix route

* Fix OpenApi file

* Merging DictionaryItem and Dictionary

* Fix TrackedReferences naming

* Update OpenApi file

* Rename Analytics* related types to Telemetry*

* New Backoffice: Return AnalyticsLevelViewModel from Telemetry/ (#13298)

* Return TelemetryLevelViewModel instead of TelemetryLevel

* Fix schema

* Change telemetry/current to telemetry/level

(cherry picked from commit f2b8494c669cbbf04b623753abbf1be211973aa9)

* Add contants for tree and recycle-bin subpaths

(cherry picked from commit 4449f56bc00832ea6d357a3854b454791c80e0e2)

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Updated Smidge, Npoco and MailKit (#13310)

* Updated Smidge, Npoco and MailKit

* Added missing command (after breaking interface in npoco)

* OpenId Connect authentication for new management API (#13318)

* First attempt at OpenIddict

* Making headway and more TODOs

* Redo current policies for multiple schemas + clean up auth controller

* Fix bad merge

* Clean up some more test code

* Fix spacing

* Include AddAuthentication() in OpenIddict addition

* A little more clean-up

* Move application creation to its own implementation + prepare for middleware to handle valid callback URL

* Enable refresh token flow

* Fix bad merge from v11/dev

* Support auth for Swagger and Postman in non-production environments + use default login screen for back-office logins

* Add workaround to client side login handling so the OAuth return URL is not corrupted before redirection

* Add temporary configuration handling for new backoffice

* Restructure the code somewhat, move singular responsibility from management API project

* Add recurring task for cleaning up old tokens in the DB

* Fix bad merge + make auth controller align with the new management API structure

* Explicitly handle the new management API path as a backoffice path (NOTE: this is potentially behaviorally breaking!)

* Redo handle the new management API requests as backoffice requests, this time in a non-breaking way

* Add/update TODOs

* Revert duplication of current auth policies for OpenIddict (as it breaks everything for V11 without the new management APIs) and introduce a dedicated PoC policy setup for OpenIddict.

* Fix failing unit tests

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Core/Routing/UmbracoRequestPaths.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* V11: Using IFileProvider to access assets added from packages (#13141)

* Creating a FileProviderFactory for getting the package.manifest and grid.editors.config.js files through a file provider

* Collecting the package.manifest-s from different sources

* Searching different sources for grid.editors.config.js

* Using an IFileProvider to collect all tours

* Refactoring IconService.cs

* Typo

* Optimizations when looping through the file system

* Moving WebRootFileProviderFactory to Umbraco.Web.Common proj

* Removes double registering

* pluginLangFileSources includes the localPluginFileSources

* Comments

* Remove linq from foreach

* Change workflow for grid.editors.config.js so we check first physical file, then RCL, then Embedded

* Clean up

* Check if config dir exists

* Discover nested package.manifest files

* Fix IFileInfo.PhysicalPath check

* Revert 712810e1fd as that way files in content root are preferred over those in web root

* Adding comments

* Refactoring

* Remove PhysicalPath check

* Fix registration of WebRootFileProviderFactory

* Use Swashbuckle instead of NSwag (#13350)

* First attempt at OpenIddict

* Making headway and more TODOs

* Redo current policies for multiple schemas + clean up auth controller

* Fix bad merge

* Clean up some more test code

* Fix spacing

* Include AddAuthentication() in OpenIddict addition

* A little more clean-up

* Move application creation to its own implementation + prepare for middleware to handle valid callback URL

* Enable refresh token flow

* Fix bad merge from v11/dev

* Support auth for Swagger and Postman in non-production environments + use default login screen for back-office logins

* Add workaround to client side login handling so the OAuth return URL is not corrupted before redirection

* Add temporary configuration handling for new backoffice

* Restructure the code somewhat, move singular responsibility from management API project

* Add recurring task for cleaning up old tokens in the DB

* Fix bad merge + make auth controller align with the new management API structure

* Explicitly handle the new management API path as a backoffice path (NOTE: this is potentially behaviorally breaking!)

* Redo handle the new management API requests as backoffice requests, this time in a non-breaking way

* Add/update TODOs

* Replace NSwag with Swashbuckle and clean up unnecessary client secret workaround

* Revert duplication of current auth policies for OpenIddict (as it breaks everything for V11 without the new management APIs) and introduce a dedicated PoC policy setup for OpenIddict.

* Fix failing unit tests

* A little niceness + export new OpenApi.json and fix path in contract unit test

* Redo after merge with v11/dev + filter out unwanted mime types

* Remove CreatedResult and NotFoundObjectResult where possible

* Custom schema IDs - no more "ViewModel" postfix and make generic lists look less clunky too

* A little more explanation for generic schema ID generation

* Force Swashbuckle to use enum string names

* Update OpenApi.json to match new enum string values

* Add clarifying comment about weird looking construct

* add workflow to schema (#13349)

* add workflow to schema

* add licenses to CMSDefinition - intentionally only adding to schema, not registered as options

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
Co-authored-by: Ronald Barendse <ronald@barend.se>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Justin Neville <67802060+justin-nevitech@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
2022-11-08 08:21:55 +01:00
Nathan WoulfeandGitHub 8074c3fb62 add workflow to schema (#13349)
* add workflow to schema

* add licenses to CMSDefinition - intentionally only adding to schema, not registered as options
2022-11-07 16:01:11 +01:00
Kenn JacobsenandGitHub 2a5c70a28b Use Swashbuckle instead of NSwag (#13350)
* First attempt at OpenIddict

* Making headway and more TODOs

* Redo current policies for multiple schemas + clean up auth controller

* Fix bad merge

* Clean up some more test code

* Fix spacing

* Include AddAuthentication() in OpenIddict addition

* A little more clean-up

* Move application creation to its own implementation + prepare for middleware to handle valid callback URL

* Enable refresh token flow

* Fix bad merge from v11/dev

* Support auth for Swagger and Postman in non-production environments + use default login screen for back-office logins

* Add workaround to client side login handling so the OAuth return URL is not corrupted before redirection

* Add temporary configuration handling for new backoffice

* Restructure the code somewhat, move singular responsibility from management API project

* Add recurring task for cleaning up old tokens in the DB

* Fix bad merge + make auth controller align with the new management API structure

* Explicitly handle the new management API path as a backoffice path (NOTE: this is potentially behaviorally breaking!)

* Redo handle the new management API requests as backoffice requests, this time in a non-breaking way

* Add/update TODOs

* Replace NSwag with Swashbuckle and clean up unnecessary client secret workaround

* Revert duplication of current auth policies for OpenIddict (as it breaks everything for V11 without the new management APIs) and introduce a dedicated PoC policy setup for OpenIddict.

* Fix failing unit tests

* A little niceness + export new OpenApi.json and fix path in contract unit test

* Redo after merge with v11/dev + filter out unwanted mime types

* Remove CreatedResult and NotFoundObjectResult where possible

* Custom schema IDs - no more "ViewModel" postfix and make generic lists look less clunky too

* A little more explanation for generic schema ID generation

* Force Swashbuckle to use enum string names

* Update OpenApi.json to match new enum string values

* Add clarifying comment about weird looking construct
2022-11-04 14:46:35 +01:00
nikolajlauridsen 0ed3121eaa Bump version 2022-11-03 09:38:33 +01:00
Elitsa Marinovskaandnikolajlauridsen f4eac20eaf V11: Using IFileProvider to access assets added from packages (#13141)
* Creating a FileProviderFactory for getting the package.manifest and grid.editors.config.js files through a file provider

* Collecting the package.manifest-s from different sources

* Searching different sources for grid.editors.config.js

* Using an IFileProvider to collect all tours

* Refactoring IconService.cs

* Typo

* Optimizations when looping through the file system

* Moving WebRootFileProviderFactory to Umbraco.Web.Common proj

* Removes double registering

* pluginLangFileSources includes the localPluginFileSources

* Comments

* Remove linq from foreach

* Change workflow for grid.editors.config.js so we check first physical file, then RCL, then Embedded

* Clean up

* Check if config dir exists

* Discover nested package.manifest files

* Fix IFileInfo.PhysicalPath check

* Revert 712810e1fd as that way files in content root are preferred over those in web root

* Adding comments

* Refactoring

* Remove PhysicalPath check

* Fix registration of WebRootFileProviderFactory
2022-11-03 09:17:42 +01:00
Elitsa MarinovskaandGitHub 897cf4ca19 V11: Using IFileProvider to access assets added from packages (#13141)
* Creating a FileProviderFactory for getting the package.manifest and grid.editors.config.js files through a file provider

* Collecting the package.manifest-s from different sources

* Searching different sources for grid.editors.config.js

* Using an IFileProvider to collect all tours

* Refactoring IconService.cs

* Typo

* Optimizations when looping through the file system

* Moving WebRootFileProviderFactory to Umbraco.Web.Common proj

* Removes double registering

* pluginLangFileSources includes the localPluginFileSources

* Comments

* Remove linq from foreach

* Change workflow for grid.editors.config.js so we check first physical file, then RCL, then Embedded

* Clean up

* Check if config dir exists

* Discover nested package.manifest files

* Fix IFileInfo.PhysicalPath check

* Revert 712810e1fd as that way files in content root are preferred over those in web root

* Adding comments

* Refactoring

* Remove PhysicalPath check

* Fix registration of WebRootFileProviderFactory
2022-11-02 15:26:07 +01:00
Nikolaj GeisleandNikolaj 8243a66dee Add guard statement (#13340) 2022-11-02 13:12:55 +01:00
dc9d4155a3 OpenId Connect authentication for new management API (#13318)
* First attempt at OpenIddict

* Making headway and more TODOs

* Redo current policies for multiple schemas + clean up auth controller

* Fix bad merge

* Clean up some more test code

* Fix spacing

* Include AddAuthentication() in OpenIddict addition

* A little more clean-up

* Move application creation to its own implementation + prepare for middleware to handle valid callback URL

* Enable refresh token flow

* Fix bad merge from v11/dev

* Support auth for Swagger and Postman in non-production environments + use default login screen for back-office logins

* Add workaround to client side login handling so the OAuth return URL is not corrupted before redirection

* Add temporary configuration handling for new backoffice

* Restructure the code somewhat, move singular responsibility from management API project

* Add recurring task for cleaning up old tokens in the DB

* Fix bad merge + make auth controller align with the new management API structure

* Explicitly handle the new management API path as a backoffice path (NOTE: this is potentially behaviorally breaking!)

* Redo handle the new management API requests as backoffice requests, this time in a non-breaking way

* Add/update TODOs

* Revert duplication of current auth policies for OpenIddict (as it breaks everything for V11 without the new management APIs) and introduce a dedicated PoC policy setup for OpenIddict.

* Fix failing unit tests

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Cms.ManagementApi/Security/BackOfficeApplicationManager.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>

* Update src/Umbraco.Core/Routing/UmbracoRequestPaths.cs

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
2022-11-01 11:15:31 +01:00
MoleandGitHub 174874eb11 Fix casing in fileSystemBasePath (#13306) 2022-11-01 08:41:50 +01:00
Bjarke BergandNikolaj 68676db082 Updated Smidge, Npoco and MailKit (#13310)
* Updated Smidge, Npoco and MailKit

* Added missing command (after breaking interface in npoco)
2022-10-31 08:28:59 +01:00
Bjarke BergandGitHub 746ab4bb23 Updated Smidge, Npoco and MailKit (#13310)
* Updated Smidge, Npoco and MailKit

* Added missing command (after breaking interface in npoco)
2022-10-31 08:25:06 +01:00
Jason ElkinandMichael Latouche 6cb53fd703 Swap HSTS healthcheck status on localhost 2022-10-30 00:51:36 +02:00
TiffanyandMichael Latouche 96da638236 Added h2 for the package details heading 2022-10-29 01:13:39 +02:00
SimonJansson2andMichael Latouche 2071224d1f Adding swedish backoffice translations 2022-10-27 09:32:53 +02:00
6ff4d27d47 New backoffice: Cleanup management API routes (#13296)
* Rename ModelsBuilderDashboard folder to ModelsBuilder

* Fix modelsbuilder paths and related naming

* Rename analytics route to telemetry

* Fix controller bases - routes and tags

* Fix items route

* Fix more controllerbase routes

* Fix route

* Fix OpenApi file

* Merging DictionaryItem and Dictionary

* Fix TrackedReferences naming

* Update OpenApi file

* Rename Analytics* related types to Telemetry*

* New Backoffice: Return AnalyticsLevelViewModel from Telemetry/ (#13298)

* Return TelemetryLevelViewModel instead of TelemetryLevel

* Fix schema

* Change telemetry/current to telemetry/level

(cherry picked from commit f2b8494c669cbbf04b623753abbf1be211973aa9)

* Add contants for tree and recycle-bin subpaths

(cherry picked from commit 4449f56bc00832ea6d357a3854b454791c80e0e2)

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2022-10-27 08:46:21 +02:00
Justin NevilleandNikolaj 86d9e51039 Fix for UseExceptionHandler no longer working since v10.3 RC (#13218)
* Fix for UseExceptionHandler no longer working since v10.3 RC

* Update the management api path to match the new one

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2022-10-26 13:57:37 +02:00
f5aba340e4 Fix for UseExceptionHandler no longer working since v10.3 RC (#13218)
* Fix for UseExceptionHandler no longer working since v10.3 RC

* Update the management api path to match the new one

Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
2022-10-26 13:56:09 +02:00
Nikolaj 054f5db6bb Bump version to next minor 2022-10-26 10:17:40 +02:00
Nikolaj 276be1ac8e Merge branch 'release/11.0' into v11/dev 2022-10-26 10:16:02 +02:00
bacc81d01a Fix Sqlite database locking issue (#13246)
* Add locking for creating scope

* Lock the repository instead

* Add scope in action instead of locking in service

* Fix up post-merge

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-26 08:47:04 +02:00
2cb926cada Parse lockId as invariant (#13284)
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-26 08:45:51 +02:00
10d03f0b58 Add IContextCache to deploy connectors (#13287)
* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>
2022-10-26 08:42:55 +02:00
1560e84f14 Add IContextCache to deploy connectors (#13287)
* Add IContextCache and implementations

* Update connector interfaces to use IContextCache

* Minor cleanup

* Move DeployContextCache prefix to constant

* Move default implementations to obsolete methods

* Remove DeployContextCache and DictionaryCache

Co-authored-by: Andy Butland <abutland73@gmail.com>
2022-10-25 18:40:11 +02:00
Sebastiaan Janssen 2f57e84aba Merge branch 'v11/dev' into v11/contrib 2022-10-25 16:42:18 +02:00
MoleandGitHub fc187596e3 V11: Use SqLiteException instead of SqlException in SqliteDistributedLockingMechanism & fix E2E tests (#13293) 2022-10-25 16:40:36 +02:00
BatJanandSebastiaan Janssen 8fe699f26b Change prevalue order 2022-10-25 15:47:45 +02:00
Matthew WiseandSebastiaan Janssen 5040bbc1b2 Added asserts to TagsCanBecomeInvariantByPropertyTypeAndBackToVariant 2022-10-25 15:44:50 +02:00
Matthew WiseandSebastiaan Janssen 036580248b Remove xml docs warnings using .editorconfig 2022-10-25 15:41:48 +02:00
Rachel BreezeandSebastiaan Janssen d32b93349d A11Y added missing iframe title to installer and preview controller. 2022-10-25 15:40:14 +02:00
CyberReiterandSebastiaan Janssen ce60e72452 adding some german translations 2022-10-25 15:38:30 +02:00
MoleandGitHub dc9085bd1d Remove references to build.ps1 in build docs (#13252) 2022-10-25 14:52:10 +02:00
Sebastiaan Janssen 46414f2c64 Merge branch 'v11/dev' into v11/contrib 2022-10-25 14:27:14 +02:00
Sebastiaan Janssen 9e3178034e Merge branch 'v10/dev' into v11/dev 2022-10-25 14:26:01 +02:00
CarlandGitHub 2ab0fa514d Added constants for getTreeItem in 2 stes of tests (#13276) 2022-10-24 07:49:36 +02:00
4367e45b73 Const adding for content tests (#13271)
* Constant replacing string

SaveNode const created to replace string for saveNew action

* Hardcoded string for content replaced for const

* Const created for default alias

* Refactoring dupe constants

* Using constanthelper to refactor further

* Dupe consts for strings amalgamated

Cleaning up the few strings I have missed and duplicate constants with different name

Co-authored-by: emma burstow <emaburst@gmail.com>
2022-10-24 07:45:06 +02:00
CarlandGitHub 220600319c Feature/git ignore to exclude test results from git (#13275)
* Additional info for running individual tests

* Ignore playwright test results from git

* Update README.md

These changes belong in a different PR #13274
2022-10-24 07:41:37 +02:00
CarlandGitHub aada595d60 Additional info for running individual tests (#13274) 2022-10-24 07:40:14 +02:00
Carole Rennie LoganandSebastiaan Janssen cdb42799dd updating to reference v11/contrib, not 10 2022-10-22 13:07:59 +02:00
Carole Rennie LoganandGitHub e780beadd7 update to link to youtube tutorials (#13266) 2022-10-22 13:06:17 +02:00
TiffanyandSebastiaan Janssen 5209840597 Fixed user invited badge color 2022-10-22 12:37:07 +02:00
emma-hqandGitHub 5fe165421c Adding discord server info (#13264)
* Adding discord server info

Discord server added to the Join our community section

* Update .github/README.md
2022-10-21 22:13:59 +01:00
Michael LatoucheandJoe Glombek 92ac072559 Update datepicker.controller.js
Don't set dirty if date actually not changed
2022-10-21 21:14:29 +01:00
6cad4013e4 Renames Installer form from "myForm" to "installerForm" (#12806)
Co-authored-by: Joe Glombek <joe@glombek.com>
2022-10-21 20:21:21 +01:00
Sebastiaan JanssenandMichael Latouche 7d9ee69fbc Changed Logo button behavior to be more consistent with the rest of the header 2022-10-21 18:16:58 +02:00
Anders BjernerandMichael Latouche 4922144528 Added shortcut="esc" to RTE HTML editor close button 2022-10-21 16:58:26 +02:00
Nikolaj 96ea387a6c Bump version 2022-10-21 10:31:39 +02:00
Mole 38712dce16 Add PrivateAssets="all" to mangement api project reference (#13249) 2022-10-21 09:17:38 +02:00
MoleandGitHub e57e910ca6 Merge pull request #13244 from umbraco/v11/merge_dev_into_release
Merge v11/dev into release/11.0.0
2022-10-20 11:43:12 +02:00
nikolajlauridsen 40200d077e Merge branch 'v11/dev' into v11/merge_dev_into_release 2022-10-20 10:18:09 +02:00
MoleandGitHub 7ddea288f9 Merge pull request #13243 from umbraco/v11/merge_v10
V11/merge v10
2022-10-20 10:16:47 +02:00
b3f11b9c16 New backoffice: Change management API base path (#13232)
* Change management api base path to  /umbraco/management/api/

* Update OpenApi schema

* Fixing some more paths

Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-10-20 09:50:54 +02:00
nikolajlauridsen 8bdfcad469 Fix comment in Umbracoplan 2022-10-20 09:44:23 +02:00
nikolajlauridsen fec7b680ce Merge remote-tracking branch 'origin/v10/dev' into v11/merge_v10
# Conflicts:
#	src/Umbraco.Core/Services/LocalizedTextServiceSupplementaryFileSource.cs
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Settings/macro.spec.ts
2022-10-20 09:37:14 +02:00
Nikolaj d9286fd4f8 Re-add push to nuget step 2022-10-19 14:32:05 +02:00
Nikolaj 5315f4df1b Remove broken duplicate nuget push command 2022-10-19 14:09:01 +02:00
Nikolaj 1c5e7956f9 Fix publish to MyGet 2022-10-19 12:51:26 +02:00
Nikolaj a73eced29c Add UseDotNet to Integration Tests SQL Server 2022-10-19 10:46:32 +02:00
df19d4fc6d Fixes: Consistency for Nullable reference types in LINQ extensions methods #12692 (#12703)
* Ensure Name and Children can never return null.

* Name should be empty not null

* Ensure Name and Children type queries never return null

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
2022-10-19 10:32:09 +02:00
+1 27e129a6b4 V11: Merge v10 (#13235)
* Fix broken selectable state for list view items (#13148)

* Add sync rendering extensions for block grid and async ones for block list (#13168)

* Re-add IsPackable to Umbraco.Tests.Integration

* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

(cherry picked from commit 4a412bb432)

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Pass the node property to umb-property & umb-property-editor (#13151)

Co-authored-by: Zeegaan <nge@umbraco.dk>

* V10: 13099 fix validation error (#13170)

* Add validation error message to Viewpicker

* Add help-inline class to make validation-text red

Co-authored-by: Zeegaan <nge@umbraco.dk>

* move clear:both; to the flexbox example (#13194)

* remove pointer-events from Image, to make drag n' drop work on firefox. (#13193)

* area permission min-max inputs width increase (#13195)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add documentation for default block grid partial views in the rendering extension methods (#13184)

* Add data-element to umb property so we can find it (#13199)

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Add data-element to umb property so we can find it (#13199)

Co-authored-by: Zeegaan <nge@umbraco.dk>

* V10/bugfix/create simple package test (#13162)

* Fixed assert to hopefully find the package each time so it isnt flaky anymore

* Updated so it retries 5 times instead of 2

* Dont submit html-report

* Dont have output defined in npm run

* Copy over playwright trace.zip files before publishing

* Updated assert so it looks after the package in the table

* updated so we get the first fail as the trace file

* Bumped version for testhelpers

* Updated so the test checks if the package actually exists. Added a wait that checks if the created packages button is visible

* Updated package lock

* Fixed so it now calls the correct testhelper

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Merge BjarneF fix into 10.3 (#13220)

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* make Area fit within block row (#13221)

* 10.3.0-RC: Change grid area input to number + change generic label (#13203)

Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>

* move below center, to make room (#13222)

* highlight areas in dragging-mode for modern browsers (#13224)

* Collect new .xml language files from different sources (#13212)

* Collecting new language files from different sources

* Apply suggestions from review

* Adding TODO for merging the language files locations to one when packages are not concerned

* Collect new .xml language files from different sources (#13212)

* Collecting new language files from different sources

* Apply suggestions from review

* Adding TODO for merging the language files locations to one when packages are not concerned

* Resync editors if content model changed (#13230)

* Disable BlockGridEditor (#13229)

* Disable BlockGridEditor

* Fix typeloader test

* Update src/Umbraco.Core/Models/Blocks/BlockGridItem.cs

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* V10.4: Re-enable block grid editor (#13231)

* Revert "Disable BlockGridEditor (#13229)"

This reverts commit 4e9aa8dac2.

* Re-do xml comments fix

* Fix nullable reference error

* Fix acceptance test package.json and package-lock.json

* Re-add wait-on

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Matt Darby <matt@darby.digital>
2022-10-19 10:24:43 +02:00
Andreas ZerbstandGitHub b69afe81f3 Merge pull request #13228 from umbraco/v11/bugfix/Add-proper-assert-for-relationtype-test
Added proper save assert instead of checking on the route
2022-10-18 12:38:16 +02:00
Zeegaan 21e6cf36e7 Added proper save assert instead of checking on the route 2022-10-18 11:18:05 +02:00
2903d58ab3 V10: 13125 don't return "null" (#13163)
* Add null check

* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add data-element to umb property so we can find it (#13199)

Co-authored-by: Zeegaan <nge@umbraco.dk>

* V10/bugfix/create simple package test (#13162)

* Fixed assert to hopefully find the package each time so it isnt flaky anymore

* Updated so it retries 5 times instead of 2

* Dont submit html-report

* Dont have output defined in npm run

* Copy over playwright trace.zip files before publishing

* Updated assert so it looks after the package in the table

* updated so we get the first fail as the trace file

* Bumped version for testhelpers

* Updated so the test checks if the package actually exists. Added a wait that checks if the created packages button is visible

* Updated package lock

* Fixed so it now calls the correct testhelper

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Update src/Umbraco.Core/PropertyEditors/DataValueEditor.cs

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>
2022-10-18 10:56:09 +02:00
Andreas ZerbstandGitHub b1cbc92e8c Merge pull request #13209 from umbraco/v11/bugfix/fix-more-unstable-acceptance-tests
V11: fix more unstable acceptance tests
2022-10-18 09:00:52 +02:00
Nikolaj GeisleandGitHub b84dcf87dd Update tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/ModelsBuilder/modelsbuilder.spec.ts 2022-10-18 08:19:23 +02:00
Kenn JacobsenandGitHub 000324aaba Make Examine API more REST-ish (#13198)
* Make Examine API more REST-ish

* Undo bad renaming

* Move search endpoint under "searchers" route

* Update schema to match new API definition

* Update OpenAPI schema after merge

* Remove "examine" prefixes and change API route from "examine" to "search"

* Update OpenAPI json schema
2022-10-17 17:15:06 +02:00
Nikolaj Geisle d090b89848 Merge remote-tracking branch 'origin/v11/dev' into v11/bugfix/fix-more-unstable-acceptance-tests 2022-10-17 15:52:49 +02:00
Bjarke Berg e006f7cd7d Fixed issue when no models mode was specified in app settings 2022-10-17 15:43:17 +02:00
Nikolaj Geisle 9b6902d9ba Bumb playwright-testhelper version 2022-10-17 15:42:00 +02:00
Nikolaj Geisle c42e6d616c Reset maximum timeout to 30s 2022-10-17 15:27:26 +02:00
Nikolaj Geisle 3a196382f9 Update maximum test time-out 2022-10-17 14:53:41 +02:00
Nikolaj Geisle 8440f57de8 Bumb testhelpers package 2022-10-17 14:29:03 +02:00
Nikolaj Geisle 166791f3da Merge remote-tracking branch 'origin/v11/dev' into v11/bugfix/fix-more-unstable-acceptance-tests 2022-10-17 14:03:09 +02:00
Nikolaj Geisle 2ff3f270ab Remove whitespace from response 2022-10-17 13:01:54 +02:00
Nikolaj Geisle d8b7733ee7 Bumb testhelpers version 2022-10-17 12:17:31 +02:00
Nikolaj Geisle 4a28001740 Update test-helpers version 2022-10-17 12:13:55 +02:00
Nikolaj Geisle a28c2f2f9a Dont remove whitespace 2022-10-17 11:10:05 +02:00
Nikolaj Geisle a50b0de0bb Update playwright-testhelpers version 2022-10-17 10:37:40 +02:00
Bjarke Berg f0866d3ea0 Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-10-17 08:21:26 +02:00
Bjarke Berg 773262c8ce Updated templates to say .net 7 2022-10-17 08:21:16 +02:00
Nikolaj Geisle 13b6eb3a48 Assert that the item is loaded before trying to click rollback 2022-10-14 23:58:47 +02:00
MoleandGitHub f7a26f5b58 Only replace the MS services when the site is actually set to InMemoryAuto (#13201) 2022-10-14 20:04:19 +02:00
Nikolaj Geisle fbfeef1b9a Merge branch 'v11/dev' into v11/bugfix/fix-more-unstable-acceptance-tests 2022-10-14 19:21:51 +02:00
Bjarke Berg b4166028bf Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-10-14 15:09:04 +02:00
Bjarke Berg 1ea9009feb Added code to avoid unneccessary breaking changes 2022-10-14 15:08:56 +02:00
Ronald Barendse 3dc103e8a6 Add wait-on dev dependency 2022-10-14 11:10:29 +02:00
Nikolaj Geisle 31b76c3705 Close success notification 2022-10-14 10:28:21 +02:00
Nikolaj Geisle 4d4999b078 Add proper expect to download button 2022-10-14 09:51:45 +02:00
Nikolaj Geisle a20a44c0c2 Update testhelpers version 2022-10-14 09:51:33 +02:00
Nikolaj Geisle 6f12eb158a Dont commit playwright.config.ts 2022-10-14 09:09:49 +02:00
Nikolaj Geisle d7ca610f6d Update tests to close success notifications 2022-10-14 09:06:12 +02:00
Nikolaj Geisle e6b0b65ddd Close success notifications after they pop up 2022-10-14 08:48:20 +02:00
Kenn JacobsenandGitHub 9ce83e8f55 Fix pipeline errors for V11 (#13208)
* Correct exec parameter list for json schema generation during build

* Update OpenAPI schema
2022-10-14 08:37:14 +02:00
8e3e4d7ba6 V11: fix failing acceptance tests (#13204)
* Fix macro in RTE test

* Update test-helper version

Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-13 19:29:00 +02:00
ea84b863af V11: v10 to v11 (#13205)
* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add data-element to umb property so we can find it (#13199)

Co-authored-by: Zeegaan <nge@umbraco.dk>

* V10/bugfix/create simple package test (#13162)

* Fixed assert to hopefully find the package each time so it isnt flaky anymore

* Updated so it retries 5 times instead of 2

* Dont submit html-report

* Dont have output defined in npm run

* Copy over playwright trace.zip files before publishing

* Updated assert so it looks after the package in the table

* updated so we get the first fail as the trace file

* Bumped version for testhelpers

* Updated so the test checks if the package actually exists. Added a wait that checks if the created packages button is visible

* Updated package lock

* Fixed so it now calls the correct testhelper

Co-authored-by: Zeegaan <nge@umbraco.dk>

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Andreas Zerbst <73799582+andr317c@users.noreply.github.com>
2022-10-13 15:29:38 +02:00
f4280fff0e V11: merge v10 to v11 (#13200)
* Fix for potential race condition in packages search (#13153)

* search on input allowing to wait for copy/paste etc

* invoke resourcePromise() with correct parameters

* return the xhrStatus allowing the caller to check if the request was aborted

* fix: send in canceler.promise to allow the timeout to work

* catch any errors and ignore aborts if they happen

* move the logic to handle cancellations outside Angulars $scope.$apply

* remove file accidentally committed

* V10: Fix request accessor memory leak (#13152)

* Dispose OnChange event registration when disposing the notification handler

* Ensure that the ApplicationUrl is only initialized once

Since notifications handlers are transient,_hasAppUrl and _isInit defaults to false on every request causing it to always be called.

* Make notification handler and EnsureApplicationUrl internal

* Add missing ForceLeft and ForceRight (#13190)

* Fix tags with CSV storage type (#13188)

* Fixing null check as default(NRT) is null => default(configuration?.Delimiter) is also null and we were counting on it being the same as default(char)

* Adding tests to check cases with multiple tags (or tag made of comma separated values)

* Add data-element to umb property so we can find it (#13199)

Co-authored-by: Zeegaan <nge@umbraco.dk>

Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
2022-10-13 11:08:32 +02:00
Nikolaj GeisleandGitHub 442342e388 Make parameters nullable (#13185) 2022-10-13 09:21:27 +02:00
Bjarke Berg ed9a26be3a Post merge fix 2022-10-12 11:20:46 +02:00
Ronald Barendse 3599dd4178 Remove duplicate package references 2022-10-12 11:14:35 +02:00
Bjarke Berg 4712e9e08e Added CompatibilitySuppressions.xml 2022-10-12 11:06:26 +02:00
Bjarke Berg 8ebeb32469 Merge remote-tracking branch 'origin/v11/dev' into v11/dev
# Conflicts:
#	.gitignore
2022-10-12 10:48:40 +02:00
Bjarke Berg 5bd796d73f Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	build/azure-pipelines.yml
#	tests/Umbraco.Tests.AcceptanceTest/misc/umbraco-linux.docker
2022-10-12 10:47:49 +02:00
Ronald Barendse 30e016afb3 Fix ManagementApi dependency and update JSON schema file names 2022-10-12 10:47:10 +02:00
Bjarke Berg 909a14b53a Merge remote-tracking branch 'origin/v11/dev' into v11/dev 2022-10-12 10:45:49 +02:00
Bjarke Berg 5bbd669776 Updated nuget packages to latest version. Incl asp.net core to 7rc2 2022-10-12 10:45:42 +02:00
Ronald Barendse d73ab7c9ca Add compatibility suppressions 2022-10-11 23:54:20 +02:00
Ronald BarendseandGitHub 535d07486f Re-add --no-build to dotnet pack
Should be fixed in .NET SDK 7: https://github.com/dotnet/aspnetcore/issues/43062
2022-10-11 23:42:32 +02:00
94774113f6 V11: Fix InMemoryAuto modelsbuilder mode (#13107)
* POC of a solution that works

* Add razor reference manager

* Ensure the compilation options are correct

* Move InMemory classes to its own namespace

These are all internal, so it should be fine.

* Throw proper exceptions when compilation fails

* Add CheckSumValidator

* Clear the ViewCompiler cache when models changed

This means we no longer need the RefreshingRazorViewEngine \o/

* Remove unused constructor injection

* Make UmbracoAssemblyLoadContext non internal

* Add WIP

* Clear the RazorViewEngine cache when generating new models

This uses reflection, which isn't super nice, however, the alternative is to clone'n'own the entire RazorViewEngine, which is arguably worse

* Fix circular dependency

* Remove ModelsChanged event

This is no longer necessary

* Fix precompiled views path

We need to normalize these paths to ensure they matches with the keys in _precompiledViews

* Clean

* Fix content tests

* Add logging

* Update the comment in UmbracoBuilderDependencyInjectionExtensions to reflect changes

* Remove RefreshingRazorViewEngine as its no longer needed

* Remove unused ViewEngine hack from DI

* Fix langversion

This is required since dotnet 7 is still in preview

* Add modelsbuilder tests

* Add more tests

* fixed comment

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-10-07 10:42:32 +02:00
Bjarke Berg b2ed235870 Merge remote-tracking branch 'origin/v10/dev' into v11/dev 2022-10-07 10:04:11 +02:00
Bjarke Berg e6074968fe Updated dependencies 2022-10-05 21:26:05 +02:00
Bjarke Berg 9df07de52e Merge remote-tracking branch 'origin/v10/dev' into v11/dev
# Conflicts:
#	version.json
2022-10-05 21:18:36 +02:00
Bjarke BergandGitHub 018e1e9265 Merge pull request #13129 from umbraco/v11/merge/merge-v10-to-v11
merge v10 into v11
2022-10-05 21:17:55 +02:00
Bjarke Berg 4e48c975b7 Fix contract 2022-10-05 20:55:20 +02:00
Bjarke Berg 90e5f8538d Merge remote-tracking branch 'origin/v11/merge/merge-v10-to-v11' into v11/merge/merge-v10-to-v11 2022-10-05 16:05:06 +02:00
Bjarke Berg 44e768de4d fix pack issue 2022-10-05 16:04:26 +02:00
Nikolaj Geisle 23f2e73d72 Remove unused dependencies 2022-10-05 15:51:38 +02:00
Nikolaj Geisle 0e7baa1626 Update langversion 2022-10-05 15:51:28 +02:00
Zeegaan b797350d00 Post-merge 2022-10-05 15:16:43 +02:00
Zeegaan 9243c59ce9 Merge branch 'v10/dev' into v11/merge/merge-v10-to-v11
# Conflicts:
#	.github/workflows/codeql-analysis.yml
#	.gitignore
#	Directory.Build.props
#	build/azure-pipelines.yml
#	src/JsonSchema/Options.cs
#	src/JsonSchema/UmbracoJsonSchemaGenerator.cs
#	src/Umbraco.Cms.ManagementApi/DependencyInjection/FactoryBuilderExtensions.cs
#	src/Umbraco.Cms.ManagementApi/ManagementApiComposer.cs
#	src/Umbraco.Cms.ManagementApi/OpenApi.json
#	src/Umbraco.Core/Models/Mapping/DictionaryMapDefinition.cs
#	src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs
#	tests/Directory.Build.props
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Packages/packages.spec.ts
#	tests/Umbraco.Tests.AcceptanceTest/tests/DefaultConfig/Tabs/tabs.spec.ts
#	tests/Umbraco.Tests.Integration/TestServerTest/UmbracoTestServerTestBase.cs
2022-10-05 14:29:41 +02:00
Bjarke BergandGitHub 46da0b07a8 Ship two json schema files.. One that reference others, and a CMS one (#13123)
* Ship two json schema files.. One that reference others, and a CMS one

* git ignore

* Build schema files sepearately
2022-10-05 12:42:21 +02:00
+12 6dc874147f v11: Merge v10/feature/project-cleanup into v11/dev (#13112)
* New backoffice/add system text json configuration attribute (#12998)

* Add SystemTextJsonConfigurationAttribute

* Fix up formatting

* Rename classes for clearer purpose

Co-authored-by: Zeegaan <nge@umbraco.dk>

* UmbracoPath should no longer be configurable (#13032)

* UmbracoPath should no longer be configurable

* Remove UmbracoPath configuration from all tests

* Only contain style instead of full layout (#13033)

* Only contain style instead of full layout (#13033)

* Fix CodeQL duplicate "permissions"  node and reformat

* add an extra check to ensure the pips exist before adding a class to them

* improve pip classList add/remove with no intermediary variable

* Only contain style instead of full layout (#13033)

* Ensure consistent margin on headings in tree root (#12992)

* Ensure consistent margin on headings in tree root (#12992)

(cherry picked from commit 88bfef9e0d)

* Bump version to 10.2.1

* Translate "User permissions for languages" feature to dutch (#12971)

* Translate 'sectionsHelp' to Dutch

* Translate 'selectLanguages' to Dutch

* Transkate 'allowAccessToAllLanguages' to Dutch

* Translate "User permissions for languages" feature to español (#12975)

* Translate 'selectLanguages' to Español

* Translate 'languagesHelp' to español

* Translate 'allowAccessToAllLanguages' to spanish

* Updated project references for Forms and Deploy in the JsonSchema project. (#13047)

* Updated project references for Forms and Deploy in the JsonSchema project. (#13047)

* UmbracoPath has been removed from the official schema store, remove temporary workaround from our schema generator as well (#13043)

* add an extra check to ensure the pips exist before adding a class to them

* improve pip classList add/remove with no intermediary variable

* pass in parameters needed to member service (#13020)

* Missing methods from IMemberService (#13022)

* Add back methods to interface

* Add default implementations to avoid breaking changes

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New endpoint for web profiling dashboard (#13038)

* Endpoint for web profiling dashboard

* Add profiling API contract

* New Backoffice: Published cache controller (#13034)

* Add published cache controller (endpoints for the Published Status dashboard)

* Update OpenAPI contract for published cache endpoints

* Fix OpenApi spec

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Bug fix for datepicker with offset time (#12847)

* https://github.com/umbraco/Umbraco-CMS/issues/12844

* remove "X" from ng-attr

Doing the test I killed the ng-if attr. But forgot it was there doing the commit

Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>

* Make sure swagger tags and operations are sorted alphabetically (#13055)

* Add spellcheck false to password inputs (#13059)

* Add null check for variants in Grid Layout (#13060)

This fixes a regression from 10.2.0 where the `variants` property was removed.

* Add null check for variants in Grid Layout (#13060)

This fixes a regression from 10.2.0 where the `variants` property was removed.

* Fixes #12972 for validating legacy member passwords (#12973)

* Fixes #12972 for validating legacy member passwords

* Removed unused variable

* removed unused variable

* Fix issue toggling boolean between true/false after Save without refreshing

* New backoffice: examine management controller (#12981)

* Add ExamineManagementControllerBase

* Add ExamineIndexModelFactory

* Add IndexesExamineManagementController

* Add proper attributes

* Implement ExamineIndexViewModel.cs

* formatting

* Add comment about it working in .NET 7

* Add SearchersExamineManagementController.cs

* Update comments about why it might throw errors

* Add SearchResultViewModel

* Add SearchExamineManagementController

* Add ExamineSearcherValidationService

* Rename ExamineSearcherValidationService.cs to ExamineSearcherFinderService.cs

* Rename interface aswell

* Add SearchExamineManagementController

* Refactor ExamineSearcherFinderService

* Add HasIndexRebuiltExamineManagementController.cs

* Fix up formatting

* Async actions

* Add RebuildIndexExamineManagementController.cs

* Rename IExamineIndexModelFactory to IExamineIndexViewModelFactory

* Refactor HasIndexRebuilt endpoint to Index endpoint

* Remove unused usings

* Fix up DetailsExplanation

* Create dedicated SearchersViewModel

* Rename action

* Rename RebuildIndex to Rebuild

* Dont have changes in ExamineIndexModel

* Make values strongly typed instead of generic lists of strings

* Rename to non-plural

* Rename to non-plural

* Rename controller

* Introduce ITemporaryIndexingService

* Introduce ITemporaryIndexingService

* Add SearcherName to view model

* Move to new ExamineManagementControllerBase.cs

* Refactor ExamineManagerService

* Use init instead of setters

* Make properties explicitly on models

* Add DI

* Apply suggestions from code review

Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Rename to IndexExamineManagementController

* Return ViewModel instead of exception

* Make view models non-nullable

* Add examine management extension point

* Rename to IndexingRebuilderService

* Move rebuild logic to service

* Fix up usages in IIndexingRebuilderService

* Fix up DI

* Fix OpenApi contract

* Implement CanRebuild on IIndexingRebuilderService.cs

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>

* Update build script

* Add BuildProjectReferences=false to dotnet pack

* Internalize Umbraco.Cms.ManagementApi references

* Make Searchers endpoint return ActionResult (#13068)

* New backoffice - trees design (#12963)

* Refactor: Add default versioned back office route attribute

* Tree controller bases and first draft implementations for document, media and doctype

* Move tree item view models to appropriate location

* Fix missing parent

* Refactor user entity access for testability

* A bit of clean-up + handle user start nodes for items endpoint

* Implement foldersOnly for folder tree

* Items endpoint for document type tree

* Strongly typed action results

* Content + media recycle bin

* Correct return type for swagger

* Member type tree

* Rename user start node handling to make a little more sense

* Revert to faked admin start nodes in document tree

* Media type tree

* Data type tree

* Relation type tree

* Remove unused dependency from member type tree

* Correct documentation for member type tree endpoint response types

* Use icon constants

* Add templates tree

* Member group tree

* Document blueprint tree

* Partial views, scripts and stylesheets trees

* Static files tree

* Clarify "folders only" state

* Comments and improved readability

* Rename TreeControllerBase and TreeItemViewModel

* Move recycle bin controller base to its own namespace

* Moved tree base controllers to their own namespace

* Common base class for tree view models

* Remove ProblemDetails response type declaration from all actions

* Add OpenApiTag

* Various review comments

* Dictionary item tree

* Renamed all tree controllers to follow action/feature naming convention

* Handle client culture state for document tree

* Support "ignore user start nodes" for content and media + refactor how tree states work to make things more explicit

* Fix or postpone a few TODOs

* Make entity service able to paginate trashed children

* Handle sorting explicitly

* Re-apply VersionedApiBackOfficeRoute to install and upgrade controllers after merge

* Use PagedViewModel instead of PagedResult for all trees

* Explain the usage of UmbracoObjectTypes.Unknown

* Introduce and apply GetMany pattern for dictionary items

* Add a note about relation type caching

* Fix broken test build + add unit tests for new localization service methods

* Use new management API controller base

* Entity repository should build document entities for document blueprints when getting paged entities (same as it does when getting specific entities)

* Use Media type for Media recycle bin

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Move shared relation service to concrete implementations

* Use inclusive language

* Add 401 response type documentation to applicable trees

* Refactor entity load for folder tree controller base + ensure that folders are only included in the first result page

* Add (in-memory) pagination to dictionary tree

* Make file system controller honor paging parameters

* Support pagination in relation type tree

* Clarify method name a bit for detecting tree root path requests

* Update Open API schema to match new trees

* Move from page number and page size to skip/take (with temporary workaround for lack of property skip/take pagination in current DB implementation)

* Update OpenAPI schema to match skip/take

* Update OpenAPI schema

* Don't return paginated view models from "items" endpoints

* Update OpenApi schema

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Use pattern matching to check if items is not `JArray`

* Bump Smidge up to v4.1.1

* Removing X-XSS-Protection healthcheck

* Redirect to a return URL if one is present on the querystring when logging into the back office

* Fix issue 13023 - Cannot read properties of undefined (reading 'allowedActions')

* Implement playwright acceptance tests instead of cypress (#13069)

* fix up dependencies in package.json

* Change configs to playwright

* update types

* remove cypress

* add playwright

* Fix up imports

* Move up test files

* Fix up scripts

* Update user import

* Remove allowEditInvariantFromNonDefault=True.spec.ts

* Update docker container

* Run playwright on pipelines

* Install playwright

* change urls

* change to run playwright

* Update reporter

* create .env file when installing

* update pipelines

* Remove @in yml

* Update Yaml script to use New-Item

* Pipe object to Value

* Update yaml to use "" not {}

* Update localhost to proper port

* Push package-lock.json

* include dotenv in package.json

* Add back umbraco.config.ts

* Dont change launchSettings.json

* Fix up pipelines

* Change working directory

* Add logging

* Actually name the file

* Remove .env from path

* Add working directory

* Add working directory to script

* check env content

* Update more working dir

* Try making newline in YAML

* add quotes

* Try multiline infront of script

* Move top statement

* use https

* Update to localhost 44331

* ignore https in config

* Change linux to https

* add timeouts for tests

* Fix up url for linux

* Update docker to use port 44331 -> 5000

* increase timeout

* Update yaml

* Remove Cypress references and fix URL/port mapping

* Update umbraco-linux.docker

* Generate ASP.NET HTTPS development certificate

* Enable HTTPS development certificate in Docker

* Dont run failing tests

* Update HTTPS development certificate generation

* Copy nuget.config to correct location in Docker file

* do not run flaky test

* update outputdir

* Remove flaky tests

* Update to dot reporter

* Update to json-models-builders package

* Check if results folder exists

* Remove logging

* Use bash to find folder

* Dont use junit to report

* only publish if folder exists

* Add 5 retries for CI

* search correct folder

* Remove unused json file

* Use line reporter

* Remove umbraco.config.ts

* Remove more flaky test

* Add waits so we dont bombard SQLite

* Add page as parameter

* add page as parameter

* Remove flaky macro test

Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Ronald Barendse <ronald@barend.se>

* Fix comment of view property in `ConfigurationFieldAttribute` (#13077)

* Fix comment of view property in `ConfigurationFieldAttribute`

* Update description of key property as well

* Use char instead of string for DetectJson (#13019)

* Use char instead of string for DetectJson

* Use faster method

* Change DetectIsJon method

* Update acceptance test readme & scripts (#13078)

* Update readme to reflect the change to playwright

* Update test scripts

* update README

* update pipelines to run new script

* update package.json scripts

* dont include demo test in package.json

* Add creation of blueprint test

* Implement create test script

Co-authored-by: Zeegaan <nge@umbraco.dk>

* Refactor event handler away from keyup to ng-change

* Don't use legacy icon for action delete

* Added nullability attribute to IsNullOrWhitespace

* Fixes umbraco/Umbraco-CMS.Accessibility.Issues #63 and #61

* Revert "Removing X-XSS-Protection healthcheck" (#13096)

This reverts commit 696475ebf2.

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: New Api controllers (#12983)

* Create migrate Language controller to Umbraco.Cms:ManagementApi

* Add proper language mapping

* Update mapping to handle if language name is null

* Uncomment code

* Add new language view model

* Add LanguageViewModelMapping

* Add mapper registration

* Fix up AddMappers extension method

* Implement mapping IEnumerable of languages

* Change action signatures to ViewModel instead of model

* Seperate logic from controller into service

* Move LanguageService.cs

* Register service

* Fix up mapping

* Add null check to mapping instead of controller

* Map to ILanguage instead of implementation

* Fix up null check

* Implement ProblemDetailsBuilder.cs

* Rename duplicate method

* Use builder in actions

* Implement new Paged models

* Create language controller base

* Use pagedModel for GetAllLanguages

* Create GetAllLanguagesPaged method

* Split language controller into single APIs

* Fix up controllers with API versions

* Map Total property

* Fix up route and naming for GetLanguageController.cs

* Fix up naming for language controllers

* New folder structure

* Add culture controllers

* Map CultureInfos to paged CultureViewModel

* Remove wierd include in csproj

* Refactor controller to return pagedViewModel instead of dictionary

* Fix up mapping to map single and enumerable

* Register mapping

* Add apiversion to controller

* Add inheritdoc

* Create DictionaryControllerBase.cs

* Add delete controller

* Only use HttpDelete for deletes

* Check also if language exists in service

* Split Save action into Create & Update actions

* Update Http attributes on Create and update controllers

* Proper routing for delete controller

* Add api version

* Make action async

* Implement CreateDictionaryController

* Create DictionaryViewModel.cs

* Use viewmodel instead of values

* Create get by int DictionaryController

* Add view models

* Rename controller

* Rename DictionaryViewModel to DictionaryItemViewModel

* use created instead of ID

* Apply DataContract/Datamember to view model

* change to guid instead of Guid

* Use proper responses instead of return models when creating/updating

* Implement new IDictionaryService

* Implement new MoveController

* Use new service in mapper

* Remove unused method

* Add DictionaryViewModelMapDefinition

* Create MoveOrCopyViewModel

* Proper Http action

* Create UpdateDictionary controller

* Map IDictionaryItem to DictionaryViewModel

* Add JsonPatching

* Add UpdateDictionaryController.cs

* Map DictionaryTranslationsDisplays properly

* ParentId should be nullable

* Add new DictionaryTranslationViewModel.cs

* Remove translationViewModel

* Add Id and Key to DictionaryTranslationDisplay.cs

* Implement IDictionaryFactory.cs

* Create DictionaryViewModels and do not use IEntity

* Map to new view models instead of displays

* Register the factiories in the service container

* Remove newtonsoft

* Add serializing to and from PatchDocs

* Use JsonPatchViewModel instead of object type

* Add JsonPatch.Net to csproj

* Implement JsonPatchService.cs

* Register JsonPatchService

* Make model non-nullable

* Update controllers to use new attributes

* Rename MoveViewModel.cs

* Remove NameIsDirty as that is legacy from how we used to handle updating

* Add GetAllDictionaryController

* Add todo to DictionaryControllerBase

* Add ExportDictionaryController

* Add ImportDictionaryController

* Remove unused umbraco mapper

* Add upload dictionary controller

* Create Dictionary import view models

* Update UploadDictionaryController with view models

* Remove unused using

* Implement pagedviewmodel for GetAllDictionaryController.cs

* Add dictionary overview viewmodels

* Add mapping for DictionaryOverViewModel

* Update Dictionary controller to use new viewmodel

* Fix up attributes for UploadDictionaryController

* Make actions async

* Make controller bases abstract

* Fix after merge

* New backoffice: Analytics controller (#12957)

* Add AnalyticsControllerBase

* Add AnalyticsViewModel

* Add GetAnalyticsController

* Update ViewModel to use System.Text.Json

* Add SetAnalyticsController

* Add AnalyticsLevelViewModel

* Add GetAllAnalyticsController

* Add viewmodel factory

* Register factory for DI

* Use factory for creation of ViewModel

* Fix up AnalyticsLevelViewModel.cs

* Use analyticsLevelViewModel

* Add Enum validation to controller

* Add OpenApi attributes

* Add routing to GetAllAnalyticsController

* Rename IPagedViewModelFactory

* use new renamed PagedViewModelFactory

* Make actions async

* Make controller base abstract

* Fix up after merge

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: Help controller (#12958)

* Add HelpControllerBase

* Add HelpPageViewModel

* Add GetHelpController

* Add viewmodel factory

* Register factory for DI

* Use PagedViewModelFactory for controller

* Update baseurl to be nullable

* Rename IPagedViewModelFactory

* Use new renamed IPagedViewModelFactory

* Dont use httpclient as field

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: Relation controller (#12961)

* Add relation controller base

* Add commen about auth

* Add GetRelationController

* Use mapping to viewmodel

* Add RelationViewModel

* Add RelationViewModelsMapDefinition.cs

* Add viewmodel factory

* Register factory for DI

* Rename IPagedViewModelFactory

* Add RelationViewModelFactory

* Remove unused service

* Add GetByChildRelationController

* Add relationViewModelFactory to DI

* Add MappingBuilderExtensions

* Add relationViewModelsMapDefinition to DI

* Use PagedViewModel for child relations

* Add CreateMultiple

* Update GetRelationController to use factory instead of direct mapping

* Update GetByChildRelationController to use relationViewModelFactory

* Fix up after merge

Co-authored-by: Zeegaan <nge@umbraco.dk>

* New backoffice: Tracked references controller (#12966)

* Add TrackedReferencesControllerBase.cs

* Add GetTrackedReferencesController

* Add relation model

* Add ITrackedReferencesRepository.cs

* Rename relation to RelationModel

* Add RelationMapDefinition.cs

* Add TrackedReferencesSkipTakeRepository

* Rename RelationModelMapDefinition

* Add new services to DI

* Rename RelationModel to RelationItemModel

* Implement TrackedReferencesSkipTakeService

* Formatting

* Add RelationItemViewModel.cs

* Add mapdefition

* Update TrackedReferencesController to use new PagedViewModel

* Add service to DI

* imlement proper routing

* Add async to GetTrackedReferencesController.cs

* Rename action to get

* Add DescendantTrackedReferencesController

* make filterMustBeIsDependency nullable

* Use count instead of capacity

* Rename controller

* Add MultipleTrackedReferencesController.cs

* Refactor TrackedReferencesService to not return pagedViewModel

* Remove TODO untill consensus on convention

* Formatting

* Delete old duplicate controller

* Fix up naming

* Fix up naming and fixed todo

* Fix up mapdefinition registrations

* Rename controllers

* Fix naming

* Fix nullable tree

* Fix up relation controller & action names

* Fix naming

* Fix up multiple to not be post

* Apply suggestions from code review

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Remove [ApiVersion] from each individual controller and added to base instead

* Added missing semi-colon

* Update all "non-async async" endpoints to return Task.FromResult

* Fixed up LanguageViewModels namespace

* Return proper status code

* Update xml documentation

* Rename GetAllCultureController

* Change return type attribute to proper Model

* Change return type attribute to correct model

* Add clarifying comment

* Change return type attribute to proper model

* Rename ById to by key

* Update DictionaryOverviewViewModel to use Key instead of ID

* Implement factory method to create viewModel instead of using services in mapper

* Fix up DictionaryItemViewModel to use Parent GUID instead of ID

* Update return type attribute to correct model

* Update key to actual GUID instead of string

* Update route to not include "delete"

* Remove redundant IActionResult specification

* Update responseType attribute to correct models

* Update OpenApiTag for DictionaryControllerBase

* Update ResponseType attribute to correct models

* update variable name to not be "XD"

* Update ResponseType attribute to correct model

* Update route to not include "update" as it is redundant

* Update produces responsetype attributes to correct models

* Use IJsonSerializer abstraction instead of JsonConvert directly

* Remove unused field

* Change ResponseType attribute to correct model

* change TrackedReferencesSkipTakeService to return pagedModels directly

* Remove duplicate DI

* change to better variable names

* Move RelationItemModel to core

* Remove empty folder

* Remove ITrackedReferencesSkipTakeService and add it to TrackedReferencesService

* remove TrackedReferencesSkipTakeRepository and add to TrackedReferencesRepository.cs

* Fix up TrackedReferencesService to not use SkipTake repository

* Remove AddRepositories from ManagementApiComposer

* Transition to ManagementApiBaseController

* Fixes ResponseType attribute to correct model

* Add loading files to service instead of having logic in controller

* Add todo comment

* Fix up routing for delete language

* Use problem details builder

* Add SystemTextJsonSerializer

* Add SystemTextJsonSerializer

* Remove unused usings

* Remove obsolete MoveDictionaryController

* Remove CreateDate and UpdateDate from DictionaryViewModel

* Change response type to correct model

* Remove PagedViewModelFactory.cs

* Add obsolete message

* Fix installer view models

A setter is required for the modelbinder to be able to do its work

* Update src/Umbraco.Cms.ManagementApi/Controllers/Analytics/SetAnalyticsController.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Update ResponseType to correct Model

* Update comment

* Add FileUploadService

* Add DictionaryFactory.cs to handle creation of viewmodel

* Remove unused DI

* Rename actions & controllers to reflect eachother

* Update OpenApi.json

* Add dictionary to openapi

* Update in proper alphabetical order

* Add trackedReferences to openapi

* Fix open api doc

Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>

* Backport project cleanup from #12907

* Remove empty Directory.Build.props

* Fix GenerateAppsettingsSchema target

* Re-add empty Directory.Build.props to prevent inheritance

* Re-add missing JsonPatch.Net dependency

* Fix merge issues (redundant TargetFramework property and appsettings-schema.json generation)

* Fix and improve OpenAPI test assertion

Co-authored-by: Sebastiaan Janssen <sebastiaan@umbraco.com>
Co-authored-by: Nikolaj Geisle <70372949+Zeegaan@users.noreply.github.com>
Co-authored-by: Zeegaan <nge@umbraco.dk>
Co-authored-by: Kenn Jacobsen <kja@umbraco.dk>
Co-authored-by: Mads Rasmussen <madsr@hey.com>
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Co-authored-by: Erik-Jan Westendorp <erikjanwestendorp@outlook.com>
Co-authored-by: Andy Butland <abutland73@gmail.com>
Co-authored-by: Sean <29239704+Bakersbakebread@users.noreply.github.com>
Co-authored-by: Lucas Bach Bisgaard <rammi@rammi.dk>
Co-authored-by: Lucas Bach Bisgaard <lom@novicell.dk>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
Co-authored-by: Busra Sengul <aysebusrasengul@gmail.com>
Co-authored-by: Justin Neville <justin@nevitech.co.uk>
Co-authored-by: Jeavon Leopold <jeavon@crumpled-dog.com>
Co-authored-by: Austin Gilbert <AGilbert@rbaconsulting.com>
Co-authored-by: patrickdemooij9 <patrickdemooij98@hotmail.com>
Co-authored-by: bakersbakebread <hello@seanthorne.co.uk>
Co-authored-by: Karl Butler <kbutler@carbonsix.digital>
2022-10-05 12:14:43 +02:00
Ronald BarendseandGitHub c9f6d6059d Add GitVersionBaseDirectory and fix typo 2022-10-03 16:10:22 +02:00
Andy ButlandandGitHub 7963b76d57 Adds additional deploy selector. (#13094) 2022-10-03 13:14:18 +02:00
Ronald BarendseandGitHub 3873a0735c v11: Decouple dependencies (#12907)
* Move core dependencies and MSBuild targets from Umbraco.Cms to Umbraco.Cms.Targets

* Re-add appsettings.Tests.json

* Include appsettings-schema.json

* Use .NET 7.x in CodeQL build

* Fix duplicate Directory.Build.props import

* Decouple ImageSharp/ImageSharp.Web implementations

* Further decouple SqlServer implementation

* Add SupportedImageFileTypes to IImageDimensionExtractor

* Update descriptions

* Update project metadata

* Re-enable package validation

* Add embedded package icon

* Move ContinuousIntegrationBuild to build script

* Move shared properties to root Directory.Build.props

* Fix GetInstallState throwing exception when default provider isn't configured

* Remove redundant PackageRequireLicenseAcceptance and update version to 11.0.0-rc1

* Update build script

* Remove LangVersion preview

* Disable app-local ICU for MacOS integration test

* Disable app-local ICU for all integration tests

* Fix RuntimeState_Run test assertion

* Update projects and build script to require Node.js 16.17 (latest LTS)

* Remove app-local ICU from unit tests

* Add missing project reference

* Generate XML documentation files

* Expose management API in Web.UI project

* Update .NET 7 dependencies to RC1

* Update package-lock.json files

* Downgrade Cypress version
2022-09-27 14:22:34 +02:00
Bjarke Berg d206df0cac Updated dependencies and cleaned up 2022-09-23 14:56:23 +02:00
510d8bf252 V11: Update the rich text editor TinyMCE to v6 (#13013)
* update 'tinymce' from v4 to v6

* add/remove plugin & file changes

* remove unsupported plugins

* update changes to tinymce api

* bump tinymce to 6.2.0

* reinstate fastdev task

* update rte prevalues

* fix styling of tinymce inline mode

* document new files

* update builtin allowed elements, plugins and styles

* update upload_image_handler to new format

* set correct startup plugins and config

* remove old config for "Paste from Word" which is no longer supported

* update naming in default toolbar

* replace fire() with dispatch()

* support resizing of other elements besides objects, e.g. tables

* replace fire() with dispatch()

* change classes for fullscreen styling

* handle special parsing of AngularJS json response

* remove deprecated tinymce options

* use EditorOptions API to get settings

* send in correct toolbar config

* update icons to use tinymce's new icon pack

* remove unused functions

* configure custom styles

* update docs

* add initial toolbars to grid rte

* change htmlId selector to support html id's with numbers

* remove pintoolbar as it is not compatible with tiny 6

* register custom option maxImageSize through the OptionsManager

* remove custom option

* Revert "register custom option maxImageSize through the OptionsManager"

This reverts commit 342354d6cd.

* register custom option maxImageSize and fetch through EditorOptions

* add rounding to forced image size

* remove fullscreen plugin as it is not available in prod build anyway and it does not work

* update API for uploadImages() function

* update string extensions IsFullPath to support more filepaths with new built-in Path.IsPathFullyQualified

* resolve TODO to switch to Path.IsPathFullyQualified supported from .NET Standard 2.1

* ensure that files are copied from the TEMP folder in the web root

* add dragstart event to drag-events series

* optimise isMediaPickerEnabled function with newer array function 'includes'

* add TEMP folder to gitignore (fx fileuploads)

* update selector for "Insert Macro" button in rte test

* remove old documentation

* Use content root instead of web root for uploaded images

* test IsFullPath without tricky UNC paths that are not useful

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
2022-09-20 15:20:20 +02:00
Sebastiaan Janssen 084153157b Fix merge conflict 2022-09-20 13:30:26 +02:00
Sebastiaan Janssen 42c32e76f2 Merge branch 'v10/dev' into v11/dev
# Conflicts:
#	src/Umbraco.Cms.ManagementApi/ManagementApiComposer.cs
2022-09-20 10:56:01 +02:00
Bjarke BergandSebastiaan Janssen d139f4acc0 Updated dependencies and fixed new NRT issues
(cherry picked from commit 803c044b60)
(cherry picked from commit b2b2903a6e)
2022-09-20 10:48:29 +02:00
Sebastiaan Janssen 40035aa629 Merge branch 'v10/dev' into v11/dev 2022-09-20 09:13:22 +02:00
Sebastiaan Janssen db5d05d641 Revert files that shouldn't change back in v11 2022-09-19 16:37:24 +02:00
Sebastiaan Janssen 85147fb5e8 Merge branch 'v10/dev' into v11/dev 2022-09-19 16:25:44 +02:00
Bjarke Berg 1ddfcba686 Updated more dependencies 2022-09-19 12:50:56 +02:00
856 changed files with 23160 additions and 23276 deletions
-4
View File
@@ -22,7 +22,3 @@ RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/
# https://docs.npmjs.com/cli/v6/using-npm/config#unsafe-perm
# Default: false if running as root, true otherwise (we are ROOT)
#RUN npm -g config set user vscode && npm -g config set unsafe-perm
# Generate and trust a local developer certificate for Kestrel
# This is needed for Kestrel to bind on https
RUN dotnet dev-certs https --trust
+52 -2
View File
@@ -6,6 +6,7 @@
"service": "app",
"workspaceFolder": "/workspace",
// Set *default* container specific settings.json values on container create.
"settings": {
"omnisharp.defaultLaunchSolution": "umbraco.sln",
@@ -13,13 +14,62 @@
"omnisharp.enableRoslynAnalyzers": true
},
"features": {
// Workaround until the image is updated to include the latest version of .NET Core - .NET7
// https://github.com/devcontainers/templates/issues/38#issuecomment-1310803259
"ghcr.io/devcontainers/features/dotnet:1": {
"version": "7"
},
// Adds SSH support to the container
// Allowing the Github CLI `gh codespace ssh` to work
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
// Adds SQLite feature from apt install
// Also adds the SQLite VSCode extension
"ghcr.io/warrenbuckley/codespace-features/sqlite:1": {}
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp"
],
// This is used in the prebuilds - so dotnet build (nuget restore and node stuff) is done
"updateContentCommand": "dotnet build umbraco.sln && dotnet dev-certs https --trust",
// Use 'forwardPorts' to make a list of ports inside the container available locally.
"forwardPorts": [9000, 5000, 25]
// Use 'forwardPorts' to make a list of ports inside the container available locallAdd "forwardPorts": [9000, 5000, 25],
// Port needed to help discover SMTP4Dev
"forwardPorts": [
5000
],
"portsAttributes": {
"5000": {
"label": "SMTP4Dev",
"protocol": "http",
"onAutoForward": "notify"
},
"9000": {
"label": "Umbraco HTTP",
"protocol": "http",
"onAutoForward": "notify"
},
"44331": {
"label": "Umbraco HTTPS",
"protocol": "https",
"onAutoForward": "notify"
}
},
"customizations": {
"codespaces": {
"openFiles": [
".github/codespaces-readme.md"
]
}
}
// [Optional] To reuse of your local HTTPS dev cert:
//
+1
View File
@@ -248,6 +248,7 @@ csharp_preserve_single_line_blocks = true
##########################################
[*.{cs,csx,cake,vb,vbx}]
dotnet_diagnostic.CS1591.severity = suggestion
##########################################
# Styles
+16 -147
View File
@@ -1,4 +1,4 @@
# Umbraco CMS Build
# Umbraco CMS Build
## Are you sure?
@@ -99,111 +99,33 @@ When the page eventually loads in your web browser, you can follow the installer
Did you read ["Are you sure"](#are-you-sure)?
### Quick!
Do note that this is only required if you want to test out your custom changes in a separate site (not the one in the Umbraco.Web.UI), if you just want to test your changes you can run the included test site using: `dotnet run` from `src/Umbraco.Web.UI/`
To build Umbraco, fire up PowerShell and move to Umbraco's repository root (the directory that contains `src`, `build`, `LICENSE.md`...). There, trigger the build with the following command:
You may want to build a set of NuGet packages with your changes, this can be done using the dotnet pack command.
build/build.ps1
First enter the root of the project in a command line environment, and then use the following command to build the NuGet packages:
If you only see a build.bat-file, you're probably on the wrong branch. If you switch to the correct branch (v8/contrib) the file will appear and you can build it.
`dotnet pack -c Release -o Build.Out`
You might run into [Powershell quirks](#powershell-quirks).
This will restore and build the project using the release configuration, and put all the outputted files in a folder called `Build.Out`
If it runs without errors; Hooray! Now you can continue with [the next step](CONTRIBUTING.md#how-do-i-begin) and open the solution and build it.
You can then add these as a local NuGet feed using the following command:
`dotnet nuget add source <Path to Build.Out folder> -n MyLocalFeed`
### Build Infrastructure
The Umbraco Build infrastructure relies on a PowerShell object. The object can be retrieved with:
$ubuild = build/build.ps1 -get
The object exposes various properties and methods that can be used to fine-grain build Umbraco. Some, but not all, of them are detailed below.
#### Properties
The object exposes the following properties:
* `SolutionRoot`: the absolute path to the solution root
* `VisualStudio`: a Visual Studio object (see below)
* `NuGet`: the absolute path to the NuGet executable
* `Zip`: the absolute path to the 7Zip executable
* `VsWhere`: the absolute path to the VsWhere executable
* `NodePath`: the absolute path to the Node install
* `NpmPath`: the absolute path to the Npm install
The Visual Studio object is `null` when Visual Studio has not been detected (eg on VSTS). When not null, the object exposes the following properties:
* `Path`: Visual Studio installation path (eg some place under `Program Files`)
* `Major`: Visual Studio major version (eg `15` for VS 2017)
* `Minor`: Visual Studio minor version
* `MsBuild`: the absolute path to the MsBuild executable
#### GetUmbracoVersion
Gets an object representing the current Umbraco version. Example:
$v = $ubuild.GetUmbracoVersion()
Write-Host $v.Semver
The object exposes the following properties:
* `Semver`: the semver object representing the version
* `Release`: the main part of the version (eg `7.6.33`)
* `Comment`: the pre release part of the version (eg `alpha02`)
* `Build`: the build number part of the version (eg `1234`)
#### SetUmbracoVersion
Modifies Umbraco files with the new version.
>This entirely replaces the legacy `UmbracoVersion.txt` file. Do *not* edit version infos in files.
The version must be a valid semver version. It can include a *pre release* part (eg `alpha02`) and/or a *build number* (eg `1234`). Examples:
$ubuild.SetUmbracoVersion("7.6.33")
$ubuild.SetUmbracoVersion("7.6.33-alpha.2")
$ubuild.SetUmbracoVersion("7.6.33+1234")
$ubuild.SetUmbracoVersion("7.6.33-beta.5+5678")
#### Build
Builds Umbraco. Temporary files are generated in `build.tmp` while the actual artifacts (zip files, NuGet packages...) are produced in `build.out`. Example:
$ubuild.Build()
Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build.
**Note: web.config**
Building Umbraco requires a clean `web.config` file in the `Umbraco.Web.UI` project. If a `web.config` file already exists, the `pre-build` task (see below) will save it as `web.config.temp-build` and replace it with a clean copy of `web.Template.config`. The original file is replaced once it is safe to do so, by the `pre-packages` task.
#### Build-UmbracoDocs
Builds umbraco documentation. Temporary files are generated in `build.tmp` while the actual artifacts (docs...) are produced in `build.out`. Example:
Build-UmbracoDocs
Some log files, such as MsBuild logs, are produced in `build.tmp` too. The `build` directory should remain clean during a build.
#### Verify-NuGet
Verifies that projects all require the same version of their dependencies, and that NuSpec files require versions that are consistent with projects. Example:
Verify-NuGet
This will add a local nuget feed with the name "MyLocalFeed" and you'll now be able to use your custom built NuGet packages.
### Cleaning up
Once the solution has been used to run a site, one may want to "reset" the solution in order to run a fresh new site again.
At the very minimum, you want
The easiest way to do this by deleting the following files and folders:
* src/Umbraco.Web.UI/appsettings.json
* src/Umbraco.Web.UI/umbraco/Data
git clean -Xdf src/Umbraco.Web.UI/App_Data
rm src/Umbraco.Web.UI/web.config
You only have to remove the connection strings from the appsettings, but removing the data folder ensures that the sqlite database gets deleted too.
Then, a simple 'Rebuild All' in Visual Studio will recreate a fresh `web.config` but should be quite fast (since it does not really need to rebuild anything).
The `clean` Git command force (`-f`) removes (`-X`, note the capital X) all files and directories (`-d`) that are ignored by Git.
Next time you run a build the `appsettings.json` file will be re-created in its default state.
This will leave media files and views around, but in most cases, it will be enough.
@@ -219,65 +141,12 @@ For git documentation see:
## Azure DevOps
Umbraco uses Azure DevOps for continuous integration, nightly builds and release builds. The Umbraco CMS project on DevOps [is available for anonymous users](https://umbraco.visualstudio.com/Umbraco%20Cms).
Umbraco uses Azure DevOps for continuous integration, nightly builds and release builds. The Umbraco CMS project on DevOps [is available for anonymous users](https://umbraco.visualstudio.com/Umbraco%20Cms)..
DevOps uses the `Build-Umbraco` command several times, each time passing a different *target* parameter. The supported targets are:
* `pre-build`: prepares the build
* `compile-belle`: compiles Belle
* `compile-umbraco`: compiles Umbraco
* `pre-tests`: prepares the tests
* `compile-tests`: compiles the tests
* `pre-packages`: prepares the packages
* `pkg-zip`: creates the zip files
* `pre-nuget`: prepares NuGet packages
* `pkg-nuget`: creates NuGet packages
All these targets are executed when `Build-Umbraco` is invoked without a parameter (or with the `all` parameter). On VSTS, compilations (of Umbraco and tests) are performed by dedicated DevOps tasks. Similarly, creating the NuGet packages is also performed by dedicated DevOps tasks.
Finally, the produced artifacts are published in two containers that can be downloaded from DevOps: `zips` contains the zip files while `nuget` contains the NuGet packages.
>During a DevOps build, some environment `UMBRACO_*` variables are exported by the `pre-build` target and can be reused in other targets *and* in DevOps tasks. The `UMBRACO_TMP` environment variable is used in `Umbraco.Tests` to disable some tests that have issues with DevOps at the moment.
The produced artifacts are published in a container that can be downloaded from DevOps called "nupkg" which contains all the NuGet packages that got built.
## Quirks
### PowerShell Quirks
There is a good chance that running `build.ps1` ends up in error, with messages such as
>The file ...\build.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies.
PowerShell has *Execution Policies* that may prevent the script from running. You can check the current policies with:
PS> Get-ExecutionPolicy -List
Scope ExecutionPolicy
----- ---------------
MachinePolicy Undefined
UserPolicy Undefined
Process Undefined
CurrentUser Undefined
LocalMachine RemoteSigned
Policies can be `Restricted`, `AllSigned`, `RemoteSigned`, `Unrestricted` and `Bypass`. Scopes can be `MachinePolicy`, `UserPolicy`, `Process`, `CurrentUser`, `LocalMachine`. You need the current policy to be `RemoteSigned`&mdash;as long as it is `Undefined`, the script cannot run. You can change the current user policy with:
PS> Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Alternatively, you can do it at machine level, from within an elevated PowerShell session:
PS> Set-ExecutionPolicy -Scope LocalMachine -ExecutionPolicy RemoteSigned
And *then* the script should run. It *might* however still complain about executing scripts, with messages such as:
>Security warning - Run only scripts that you trust. While scripts from the internet can be useful, this script can potentially harm your computer. If you trust this script, use the Unblock-File cmdlet to allow the script to run without this warning message. Do you want to run ...\build.ps1?
[D] Do not run [R] Run once [S] Suspend [?] Help (default is "D"):
This is usually caused by the scripts being *blocked*. And that usually happens when the source code has been downloaded as a Zip file. When Windows downloads Zip files, they are marked as *blocked* (technically, they have a Zone.Identifier alternate data stream, with a value of "3" to indicate that they were downloaded from the Internet). And when such a Zip file is un-zipped, each and every single file is also marked as blocked.
The best solution is to unblock the Zip file before un-zipping: right-click the files, open *Properties*, and there should be a *Unblock* checkbox at the bottom of the dialog. If, however, the Zip file has already been un-zipped, it is possible to recursively unblock all files from PowerShell with:
PS> Get-ChildItem -Recurse *.* | Unblock-File
### Git Quirks
Git might have issues dealing with long file paths during build. You may want/need to enable `core.longpaths` support (see [this page](https://github.com/msysgit/msysgit/wiki/Git-cannot-create-a-file-or-directory-with-a-long-path) for details).
+6 -6
View File
@@ -103,7 +103,7 @@ Great question! The short version goes like this:
1. **Switch to the correct branch**
Switch to the `v10/contrib` branch
Switch to the `contrib` branch
1. **Build**
@@ -111,7 +111,7 @@ Great question! The short version goes like this:
1. **Branch**
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `v10/contrib`, create a new branch first.
Create a new branch now and name it after the issue you're fixing, we usually follow the format: `temp-12345`. This means it's a temporary branch for the particular issue you're working on, in this case issue number `12345`. Don't commit to `contrib`, create a new branch first.
1. **Change**
@@ -121,7 +121,7 @@ Great question! The short version goes like this:
Done? Yay! 🎉
Remember to commit to your new `temp` branch, and don't commit to `v10/contrib`. Then you can push the changes up to your fork on GitHub.
Remember to commit to your new `temp` branch, and don't commit to `contrib`. Then you can push the changes up to your fork on GitHub.
#### Keeping your Umbraco fork in sync with the main repository
[sync fork]: #keeping-your-umbraco-fork-in-sync-with-the-main-repository
@@ -138,10 +138,10 @@ Then when you want to get the changes from the main repository:
```
git fetch upstream
git rebase upstream/v10/contrib
git rebase upstream/contrib
```
In this command we're syncing with the `v10/contrib` branch, but you can of course choose another one if needed.
In this command we're syncing with the `contrib` branch, but you can of course choose another one if needed.
[More information on how this works can be found on the thoughtbot blog.][sync fork ext]
@@ -169,7 +169,7 @@ We recommend you to [sync with our repository][sync fork] before you submit your
GitHub will have picked up on the new branch you've pushed and will offer to create a Pull Request. Click that green button and away you go.
![Create a pull request](img/createpullrequest.png)
We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to something, usually `v10/contrib`. If you are working on v9, this is the branch you should be targeting.
We like to use [git flow][git flow] as much as possible, but don't worry if you are not familiar with it. The most important thing you need to know is that when you fork the Umbraco repository, the default branch is set to `contrib`. This is the branch you should be targeting.
Please note: we are no longer accepting features for v8 and below but will continue to merge security fixes as and when they arise.
+3 -2
View File
@@ -1,4 +1,4 @@
# [Umbraco CMS](https://umbraco.com) &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md) [![Build status](https://umbraco.visualstudio.com/Umbraco%20Cms/_apis/build/status/Cms%208%20Continuous?branchName=v8/contrib)](https://umbraco.visualstudio.com/Umbraco%20Cms/_build?definitionId=75) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) [![Twitter](https://img.shields.io/twitter/follow/umbraco.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=umbraco) [![Discord](https://img.shields.io/discord/869656431308189746)](https://discord.gg/umbraco)
# [Umbraco CMS](https://umbraco.com) &middot; [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](../LICENSE.md) [![Build status](https://umbraco.visualstudio.com/Umbraco%20Cms/_apis/build/status/Cms%208%20Continuous?branchName=v8/contrib)](https://umbraco.visualstudio.com/Umbraco%20Cms/_build?definitionId=75) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md) [![Twitter](https://img.shields.io/twitter/follow/umbraco.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=umbraco) [![Discord](https://img.shields.io/discord/869656431308189746)](https://discord.gg/umbraco) [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://github.com/codespaces/new?hide_repo_select=true&ref=v11%2Fcontrib&repo=10601208&machine=basicLinux32gb&devcontainer_path=.devcontainer%2Fdevcontainer.json&location=WestEurope)
Umbraco is the friendliest, most flexible and fastest growing ASP.NET CMS, and used by more than 500,000 websites worldwide. Our mission is to help you deliver delightful digital experiences by making Umbraco friendly, simpler and social.
@@ -31,7 +31,8 @@ The documentation for Umbraco CMS can be found [on Our Umbraco](https://docs.umb
Our friendly community is available 24/7 at the community hub, we call ["Our Umbraco"](https://our.umbraco.com/). Our Umbraco features forums for questions and answers, documentation, downloadable plugins for Umbraco, and a rich collection of community resources.
Besides "Our", we all support each other also via Twitter: [Umbraco HQ](https://twitter.com/umbraco), [Release Updates](https://twitter.com/umbracoproject), [#umbraco](https://twitter.com/hashtag/umbraco)
Besides "Our", we all support each other in our [Community Discord Server](https://discord.gg/umbraco) and on Twitter: [Umbraco HQ](https://twitter.com/umbraco), [Release Updates](https://twitter.com/umbracoproject), [#umbraco](https://twitter.com/hashtag/umbraco)
## Contributing
+21
View File
@@ -0,0 +1,21 @@
# GitHub CodeSpaces
Umbraco source code can be edited inside the browser with VSCode and CodeSpaces.
This development environment comes with all the tools you need to build Umbraco source code.
## Debugging and Running
From VSCode browse to the Run and Debug section and then click the green button. This will build the Umbraco source code and attach a debugger and launch the site.
## Default Umbraco credentials
Username: test@umbraco.com
Password: password1234
## Test Email Server
A SMTP4Dev instance for testing email is available on port 5000.
## SQLite Database
The SQLite extension is preinstalled and allows you to open, query, edit the data inside the Umbraco SQLite database for ease of use.
+2 -2
View File
@@ -15,8 +15,8 @@ permissions:
contents: read
env:
dotnetVersion: 6.x
dotnetIncludePreviewVersions: false
dotnetVersion: 7.x
dotnetIncludePreviewVersions: true
solution: umbraco.sln
buildConfiguration: SkipTests
DOTNET_NOLOGO: true
+7 -1
View File
@@ -101,6 +101,12 @@ preserve.belle
/tests/Umbraco.Tests.UnitTests/[Uu]mbraco/[Dd]ata/TEMP/
# Ignore auto-generated schema
/src/Umbraco.Cms/appsettings-schema.json
/src/Umbraco.Cms.Targets/tasks/
/src/Umbraco.Cms.Targets/appsettings-schema.*.json
/src/Umbraco.Web.UI/appsettings-schema.json
/src/Umbraco.Web.UI/appsettings-schema.*.json
/tests/Umbraco.Tests.Integration/appsettings-schema.json
/tests/Umbraco.Tests.Integration/appsettings-schema.*.json
/src/Umbraco.Cms/appsettings-schema.json
playwright-report
trace.zip
-1
View File
@@ -8,7 +8,6 @@
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "Dotnet build",
"program": "dotnet",
"args": ["run"],
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
+5 -3
View File
@@ -1,7 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>latest</LangVersion>
<Company>Umbraco HQ</Company>
<Authors>Umbraco</Authors>
<Copyright>Copyright © Umbraco $([System.DateTime]::Today.ToString('yyyy'))</Copyright>
@@ -28,8 +29,9 @@
<!-- Package Validation -->
<PropertyGroup>
<GenerateCompatibilitySuppressionFile>false</GenerateCompatibilitySuppressionFile>
<EnablePackageValidation>true</EnablePackageValidation>
<PackageValidationBaselineVersion>10.0.0</PackageValidationBaselineVersion>
<PackageValidationBaselineVersion>11.0.0-rc1</PackageValidationBaselineVersion>
<EnableStrictModeForCompatibleFrameworksInPackage>true</EnableStrictModeForCompatibleFrameworksInPackage>
<EnableStrictModeForCompatibleTfms>true</EnableStrictModeForCompatibleTfms>
</PropertyGroup>
@@ -39,7 +41,7 @@
<PackageReference Include="Nerdbank.GitVersioning" Version="3.5.113" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.406" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.Code" Version="2.0.0" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.1.1" PrivateAssets="all" IsImplicitlyDefined="true" />
<PackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" PrivateAssets="all" IsImplicitlyDefined="true" />
</ItemGroup>
<ItemGroup>
+12 -9
View File
@@ -23,9 +23,9 @@ parameters:
default: false
variables:
nodeVersion: 14.18.1
dotnetVersion: 6.x
dotnetIncludePreviewVersions: false
nodeVersion: 16.17.0
dotnetVersion: 7.x
dotnetIncludePreviewVersions: true
solution: umbraco.sln
buildConfiguration: Release
UMBRACO__CMS__GLOBAL__ID: 00000000-0000-0000-0000-000000000042
@@ -72,7 +72,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- task: DotNetCoreCLI@2
displayName: Run dotnet restore
@@ -111,7 +110,7 @@ stages:
}
}
dotnet pack $(solution) --configuration $(buildConfiguration) -p:BuildProjectReferences=false --output $(Build.ArtifactStagingDirectory)/nupkg
dotnet pack $(solution) --configuration $(buildConfiguration) --no-build --property:PackageOutputPath=$(Build.ArtifactStagingDirectory)/nupkg
- script: |
sha="$(Build.SourceVersion)"
sha=${sha:0:7}
@@ -246,7 +245,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- task: DotNetCoreCLI@2
displayName: Run dotnet test
@@ -283,7 +281,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- task: DotNetCoreCLI@2
displayName: Run dotnet test
@@ -321,6 +318,11 @@ stages:
inputs:
artifact: build_output
path: $(Build.SourcesDirectory)
- task: UseDotNet@2
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
includePreviewVersions: $(dotnetIncludePreviewVersions)
- powershell: sqllocaldb start mssqllocaldb
displayName: Start localdb (Windows only)
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
@@ -361,6 +363,7 @@ stages:
dockerImageName: umbraco-linux
Windows:
vmImage: 'windows-latest'
DOTNET_GENERATE_ASPNET_CERTIFICATE: true # Automatically generate HTTPS development certificate on Windows
# Enable console logging in Release mode
Serilog__WriteTo__0__Name: Async
Serilog__WriteTo__0__Args__configure__0__Name: Console
@@ -414,7 +417,6 @@ stages:
displayName: Use .NET $(dotnetVersion)
inputs:
version: $(dotnetVersion)
performMultiLevelLookup: true
includePreviewVersions: $(dotnetIncludePreviewVersions)
- pwsh: |
$sha = 'g$(Build.SourceVersion)'.substring(0, 8)
@@ -450,6 +452,8 @@ stages:
workingDirectory: tests/Umbraco.Tests.AcceptanceTest
env:
CI: true
CommitId: $(Build.SourceVersion)
AgentOs: $(Agent.OS)
- pwsh: |
docker logs $(dockerImageName) > $(Build.ArtifactStagingDirectory)/playwright.log 2>&1
docker stop $(dockerImageName)
@@ -506,7 +510,6 @@ stages:
packagesToPush: $(Build.ArtifactStagingDirectory)/**/*.nupkg
nuGetFeedType: 'external'
publishFeedCredentials: 'MyGet - Pre-releases'
- stage: Deploy_NuGet
displayName: NuGet release
dependsOn:
-53
View File
@@ -1,53 +0,0 @@
name: issue-first-response
on:
issues:
types: [opened]
jobs:
send-response:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Install dependencies
run: |
npm install node-fetch@2
- name: Fetch random comment 🗣️ and add it to the issue
uses: actions/github-script@v6
with:
script: |
const fetch = require('node-fetch')
const response = await fetch('https://collaboratorsv2.euwest01.umbraco.io/umbraco/api/comments/PostComment', {
method: 'post',
body: JSON.stringify({
repo: '${{ github.repository }}',
number: '${{ github.event.number }}',
actor: '${{ github.actor }}',
commentType: 'opened-issue-first-comment'
}),
headers: {
'Authorization': 'Bearer ${{ secrets.OUR_BOT_API_TOKEN }}',
'Content-Type': 'application/json'
}
});
try {
const data = await response.text();
if(response.status === 200 && data !== '') {
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: data
});
} else {
console.log("Status code did not indicate success:", response.status);
console.log("Returned data:", data);
}
} catch(error) {
console.log(error);
}
-137
View File
@@ -1,137 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Umbraco.Cms.Core.Configuration;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Deploy.Core.Configuration.DebugConfiguration;
using Umbraco.Deploy.Core.Configuration.DeployConfiguration;
using Umbraco.Deploy.Core.Configuration.DeployProjectConfiguration;
using Umbraco.Forms.Core.Configuration;
using SecuritySettings = Umbraco.Cms.Core.Configuration.Models.SecuritySettings;
namespace JsonSchema
{
internal class AppSettings
{
/// <summary>
/// Gets or sets the Umbraco
/// </summary>
public UmbracoDefinition? Umbraco { get; set; }
/// <summary>
/// Configuration of Umbraco CMS and packages
/// </summary>
internal class UmbracoDefinition
{
// ReSharper disable once InconsistentNaming
public CmsDefinition? CMS { get; set; }
public FormsDefinition? Forms { get; set; }
public DeployDefinition? Deploy { get; set; }
/// <summary>
/// Configurations for the Umbraco CMS
/// </summary>
public class CmsDefinition
{
public ContentSettings? Content { get; set; }
public CoreDebugSettings? Debug { get; set; }
public ExceptionFilterSettings? ExceptionFilter { get; set; }
public ModelsBuilderSettings? ModelsBuilder { get; set; }
public GlobalSettings? Global { get; set; }
public HealthChecksSettings? HealthChecks { get; set; }
public HostingSettings? Hosting { get; set; }
public ImagingSettings? Imaging { get; set; }
public IndexCreatorSettings? Examine { get; set; }
public KeepAliveSettings? KeepAlive { get; set; }
public LoggingSettings? Logging { get; set; }
public NuCacheSettings? NuCache { get; set; }
public RequestHandlerSettings? RequestHandler { get; set; }
public RuntimeSettings? Runtime { get; set; }
public SecuritySettings? Security { get; set; }
public TourSettings? Tours { get; set; }
public TypeFinderSettings? TypeFinder { get; set; }
public WebRoutingSettings? WebRouting { get; set; }
public UmbracoPluginSettings? Plugins { get; set; }
public UnattendedSettings? Unattended { get; set; }
public RichTextEditorSettings? RichTextEditor { get; set; }
public RuntimeMinificationSettings? RuntimeMinification { get; set; }
public BasicAuthSettings? BasicAuth { get; set; }
public PackageMigrationSettings? PackageMigration { get; set; }
public LegacyPasswordMigrationSettings? LegacyPasswordMigration { get; set; }
public ContentDashboardSettings? ContentDashboard { get; set; }
public HelpPageSettings? HelpPage { get; set; }
public InstallDefaultDataSettings? DefaultDataCreation { get; set; }
public DataTypesSettings? DataTypes { get; set; }
public MarketplaceSettings? Marketplace { get; set; }
}
/// <summary>
/// Configurations for the Umbraco Forms package to Umbraco CMS
/// </summary>
public class FormsDefinition
{
public FormDesignSettings? FormDesign { get; set; }
public PackageOptionSettings? Options { get; set; }
public Umbraco.Forms.Core.Configuration.SecuritySettings? Security { get; set; }
public FieldTypesDefinition? FieldTypes { get; set; }
/// <summary>
/// Configurations for the Umbraco Forms Field Types
/// </summary>
public class FieldTypesDefinition
{
public DatePickerSettings? DatePicker { get; set; }
public Recaptcha2Settings? Recaptcha2 { get; set; }
public Recaptcha3Settings? Recaptcha3 { get; set; }
}
}
/// <summary>
/// Configurations for the Umbraco Deploy package to Umbraco CMS
/// </summary>
public class DeployDefinition
{
public DeploySettings? Settings { get; set; }
public DeployProjectConfig? Project { get; set; }
public DebugSettings? Debug { get; set; }
}
}
}
}
@@ -1,13 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
using NJsonSchema.Generation;
namespace JsonSchema
{
internal class NamespacePrefixedSchemaNameGenerator : DefaultSchemaNameGenerator
{
public override string Generate(Type type) => type.Namespace?.Replace(".", string.Empty) + base.Generate(type);
}
}
-13
View File
@@ -1,13 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using CommandLine;
namespace JsonSchema
{
internal class Options
{
[Option('o', "outputFile", Required = false, HelpText = "Set path of the output file.", Default = "appsettings-schema.json")]
public string OutputFile { get; set; } = null!;
}
}
-41
View File
@@ -1,41 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
using System.IO;
using System.Threading.Tasks;
using CommandLine;
namespace JsonSchema
{
internal class Program
{
public static async Task Main(string[] args)
{
try
{
await Parser.Default.ParseArguments<Options>(args)
.WithParsedAsync(Execute);
}
catch (Exception e)
{
Console.WriteLine(e);
throw;
}
}
private static async Task Execute(Options options)
{
var generator = new UmbracoJsonSchemaGenerator();
var schema = await generator.Generate();
var path = Path.GetFullPath(Path.Combine(Environment.CurrentDirectory, options.OutputFile));
Console.WriteLine("Path to use {0}", path);
Directory.CreateDirectory(Path.GetDirectoryName(path)!);
Console.WriteLine("Ensured directory exists");
await File.WriteAllTextAsync(path, schema);
Console.WriteLine("File written at {0}", path);
}
}
}
@@ -1,58 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using NJsonSchema.Generation;
using Umbraco.Cms.Core.Configuration.Models;
namespace JsonSchema
{
/// <summary>
/// Generator of the JsonSchema for AppSettings.json including A specific Umbraco version.
/// </summary>
public class UmbracoJsonSchemaGenerator
{
private static readonly HttpClient s_client = new ();
private readonly JsonSchemaGenerator _innerGenerator;
/// <summary>
/// Initializes a new instance of the <see cref="UmbracoJsonSchemaGenerator" /> class.
/// </summary>
public UmbracoJsonSchemaGenerator()
=> _innerGenerator = new JsonSchemaGenerator(new UmbracoJsonSchemaGeneratorSettings());
/// <summary>
/// Generates a json representing the JsonSchema for AppSettings.json including A specific Umbraco version..
/// </summary>
public async Task<string> Generate()
{
JObject umbracoSchema = GenerateUmbracoSchema();
JObject officialSchema = await GetOfficialAppSettingsSchema();
officialSchema.Merge(umbracoSchema);
return officialSchema.ToString();
}
private async Task<JObject> GetOfficialAppSettingsSchema()
{
HttpResponseMessage response = await s_client.GetAsync("https://json.schemastore.org/appsettings.json")
.ConfigureAwait(false);
var result = await response.Content.ReadAsStringAsync();
return JsonConvert.DeserializeObject<JObject>(result)!;
}
private JObject GenerateUmbracoSchema()
{
NJsonSchema.JsonSchema schema = _innerGenerator.Generate(typeof(AppSettings));
// TODO: when the "UmbracoPath" setter is removed from "GlobalSettings" (scheduled for V12), remove this line as well
schema.Definitions["UmbracoCmsCoreConfigurationModelsGlobalSettings"]?.Properties?.Remove(nameof(GlobalSettings.UmbracoPath));
return JsonConvert.DeserializeObject<JObject>(schema.ToJson())!;
}
}
}
@@ -1,43 +0,0 @@
// Copyright (c) Umbraco.
// See LICENSE for more details.
using System;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Serialization;
using NJsonSchema.Generation;
namespace JsonSchema
{
/// <inheritdoc />
public class UmbracoJsonSchemaGeneratorSettings : JsonSchemaGeneratorSettings
{
/// <summary>
/// Initializes a new instance of the <see cref="UmbracoJsonSchemaGeneratorSettings"/> class.
/// </summary>
public UmbracoJsonSchemaGeneratorSettings()
{
AlwaysAllowAdditionalObjectProperties = true;
SerializerSettings = new JsonSerializerSettings()
{
ContractResolver = new WritablePropertiesOnlyResolver()
};
DefaultReferenceTypeNullHandling = ReferenceTypeNullHandling.NotNull;
SchemaNameGenerator = new NamespacePrefixedSchemaNameGenerator();
SerializerSettings.Converters.Add(new StringEnumConverter());
IgnoreObsoleteProperties = true;
GenerateExamples = true;
}
private class WritablePropertiesOnlyResolver : DefaultContractResolver
{
protected override IList<JsonProperty> CreateProperties(Type type, MemberSerialization memberSerialization)
{
IList<JsonProperty> props = base.CreateProperties(type, memberSerialization);
return props.Where(p => p.Writable).ToList();
}
}
}
}
@@ -8,7 +8,7 @@ using SixLabors.ImageSharp.Web.Middleware;
using SixLabors.ImageSharp.Web.Processors;
using Umbraco.Cms.Core.Configuration.Models;
namespace Umbraco.Cms.Web.Common.DependencyInjection;
namespace Umbraco.Cms.Imaging.ImageSharp;
/// <summary>
/// Configures the ImageSharp middleware options.
@@ -4,7 +4,7 @@ using SixLabors.ImageSharp.Web.Caching;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Extensions;
namespace Umbraco.Cms.Web.Common.DependencyInjection;
namespace Umbraco.Cms.Imaging.ImageSharp;
/// <summary>
/// Configures the ImageSharp physical file system cache options.
@@ -8,20 +8,21 @@ using SixLabors.ImageSharp.Web;
using SixLabors.ImageSharp.Web.Commands;
using SixLabors.ImageSharp.Web.Processors;
namespace Umbraco.Cms.Web.Common.ImageProcessors;
namespace Umbraco.Cms.Imaging.ImageSharp.ImageProcessors;
/// <summary>
/// Allows the cropping of images.
/// Allows the cropping of images.
/// </summary>
/// <seealso cref="SixLabors.ImageSharp.Web.Processors.IImageWebProcessor" />
public class CropWebProcessor : IImageWebProcessor
{
/// <summary>
/// The command constant for the crop coordinates.
/// The command constant for the crop coordinates.
/// </summary>
public const string Coordinates = "cc";
/// <summary>
/// The command constant for the resize orientation handling mode.
/// The command constant for the resize orientation handling mode.
/// </summary>
public const string Orient = "orient";
@@ -59,10 +60,8 @@ public class CropWebProcessor : IImageWebProcessor
var right = Math.Clamp(1 - coordinates[2], 0, 1);
var bottom = Math.Clamp(1 - coordinates[3], 0, 1);
var orientation = GetExifOrientation(image, commands, parser, culture);
Vector2 xy1 =
ExifOrientationUtilities.Transform(new Vector2(left, top), Vector2.Zero, Vector2.One, orientation);
Vector2 xy2 =
ExifOrientationUtilities.Transform(new Vector2(right, bottom), Vector2.Zero, Vector2.One, orientation);
Vector2 xy1 = ExifOrientationUtilities.Transform(new Vector2(left, top), Vector2.Zero, Vector2.One, orientation);
Vector2 xy2 = ExifOrientationUtilities.Transform(new Vector2(right, bottom), Vector2.Zero, Vector2.One, orientation);
// Scale points to a pixel based rectangle
Size size = image.Image.Size();
@@ -0,0 +1,16 @@
using Umbraco.Cms.Core.Composing;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Extensions;
namespace Umbraco.Cms.Imaging.ImageSharp;
/// <summary>
/// Adds imaging support using ImageSharp/ImageSharp.Web.
/// </summary>
/// <seealso cref="Umbraco.Cms.Core.Composing.IComposer" />
public sealed class ImageSharpComposer : IComposer
{
/// <inheritdoc />
public void Compose(IUmbracoBuilder builder)
=> builder.AddUmbracoImageSharp();
}
@@ -3,26 +3,27 @@ using SixLabors.ImageSharp.Metadata.Profiles.Exif;
using Umbraco.Cms.Core.Media;
using Size = System.Drawing.Size;
namespace Umbraco.Cms.Infrastructure.Media;
namespace Umbraco.Cms.Imaging.ImageSharp.Media;
internal class ImageSharpDimensionExtractor : IImageDimensionExtractor
public sealed class ImageSharpDimensionExtractor : IImageDimensionExtractor
{
private readonly Configuration _configuration;
/// <inheritdoc />
public IEnumerable<string> SupportedImageFileTypes { get; }
/// <summary>
/// Initializes a new instance of the <see cref="ImageSharpDimensionExtractor" /> class.
/// Initializes a new instance of the <see cref="ImageSharpDimensionExtractor" /> class.
/// </summary>
/// <param name="configuration">The configuration.</param>
public ImageSharpDimensionExtractor(Configuration configuration)
=> _configuration = configuration;
{
_configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
/// <summary>
/// Gets the dimensions of an image.
/// </summary>
/// <param name="stream">A stream containing the image bytes.</param>
/// <returns>
/// The dimension of the image.
/// </returns>
SupportedImageFileTypes = configuration.ImageFormats.SelectMany(f => f.FileExtensions).ToArray();
}
/// <inheritdoc />
public Size? GetDimensions(Stream? stream)
{
Size? size = null;
@@ -5,25 +5,27 @@ using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Web.Processors;
using Umbraco.Cms.Core.Media;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Web.Common.ImageProcessors;
using Umbraco.Cms.Imaging.ImageSharp.ImageProcessors;
using static Umbraco.Cms.Core.Models.ImageUrlGenerationOptions;
namespace Umbraco.Cms.Web.Common.Media;
namespace Umbraco.Cms.Imaging.ImageSharp.Media;
/// <summary>
/// Exposes a method that generates an image URL based on the specified options that can be processed by ImageSharp.
/// </summary>
/// <seealso cref="IImageUrlGenerator" />
public class ImageSharpImageUrlGenerator : IImageUrlGenerator
public sealed class ImageSharpImageUrlGenerator : IImageUrlGenerator
{
/// <inheritdoc />
public IEnumerable<string> SupportedImageFileTypes { get; }
/// <summary>
/// Initializes a new instance of the <see cref="ImageSharpImageUrlGenerator" /> class.
/// </summary>
/// <param name="configuration">The ImageSharp configuration.</param>
public ImageSharpImageUrlGenerator(Configuration configuration)
: this(configuration.ImageFormats.SelectMany(f => f.FileExtensions).ToArray())
{
}
{ }
/// <summary>
/// Initializes a new instance of the <see cref="ImageSharpImageUrlGenerator" /> class.
@@ -35,9 +37,6 @@ public class ImageSharpImageUrlGenerator : IImageUrlGenerator
internal ImageSharpImageUrlGenerator(IEnumerable<string> supportedImageFileTypes) =>
SupportedImageFileTypes = supportedImageFileTypes;
/// <inheritdoc />
public IEnumerable<string> SupportedImageFileTypes { get; }
/// <inheritdoc />
public string? GetImageUrl(ImageUrlGenerationOptions? options)
{
@@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Title>Umbraco CMS - Imaging - ImageSharp</Title>
<Description>Adds imaging support using ImageSharp/ImageSharp.Web to Umbraco CMS.</Description>
<!-- TODO: Enable when final version is shipped (because there's currently no previous version) -->
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="2.1.3" />
<PackageReference Include="SixLabors.ImageSharp.Web" Version="2.0.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Umbraco.Web.Common\Umbraco.Web.Common.csproj" />
</ItemGroup>
<ItemGroup>
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
<_Parameter1>Umbraco.Tests.UnitTests</_Parameter1>
</AssemblyAttribute>
</ItemGroup>
</Project>
@@ -0,0 +1,54 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Web.Caching;
using SixLabors.ImageSharp.Web.DependencyInjection;
using SixLabors.ImageSharp.Web.Middleware;
using SixLabors.ImageSharp.Web.Providers;
using Umbraco.Cms.Core.DependencyInjection;
using Umbraco.Cms.Core.Media;
using Umbraco.Cms.Imaging.ImageSharp.ImageProcessors;
using Umbraco.Cms.Imaging.ImageSharp.Media;
using Umbraco.Cms.Web.Common.ApplicationBuilder;
using Umbraco.Extensions;
namespace Umbraco.Cms.Imaging.ImageSharp;
public static class UmbracoBuilderExtensions
{
/// <summary>
/// Adds Image Sharp with Umbraco settings
/// </summary>
public static IServiceCollection AddUmbracoImageSharp(this IUmbracoBuilder builder)
{
// Add default ImageSharp configuration and service implementations
builder.Services.AddSingleton(Configuration.Default);
builder.Services.AddUnique<IImageDimensionExtractor, ImageSharpDimensionExtractor>();
builder.Services.AddSingleton<IImageUrlGenerator, ImageSharpImageUrlGenerator>();
builder.Services.AddImageSharp()
// Replace default image provider
.ClearProviders()
.AddProvider<WebRootImageProvider>()
// Add custom processors
.AddProcessor<CropWebProcessor>();
// Configure middleware
builder.Services.AddTransient<IConfigureOptions<ImageSharpMiddlewareOptions>, ConfigureImageSharpMiddlewareOptions>();
// Configure cache options
builder.Services.AddTransient<IConfigureOptions<PhysicalFileSystemCacheOptions>, ConfigurePhysicalFileSystemCacheOptions>();
// Important we handle image manipulations before the static files, otherwise the querystring is just ignored
builder.Services.Configure<UmbracoPipelineOptions>(options =>
{
options.AddFilter(new UmbracoPipelineFilter(nameof(ImageSharpComposer))
{
PrePipeline = prePipeline => prePipeline.UseImageSharp()
});
});
return builder.Services;
}
}
@@ -1,22 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
public class AllAnalyticsController : AnalyticsControllerBase
{
[HttpGet("all")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<TelemetryLevel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<TelemetryLevel>> GetAll(int skip, int take)
{
TelemetryLevel[] levels = Enum.GetValues<TelemetryLevel>();
return await Task.FromResult(new PagedViewModel<TelemetryLevel>
{
Total = levels.Length,
Items = levels.Skip(skip).Take(take),
});
}
}
@@ -1,13 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/analytics")]
[OpenApiTag("Analytics")]
[ApiVersion("1.0")]
public abstract class AnalyticsControllerBase : ManagementApiControllerBase
{
}
@@ -1,18 +0,0 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Analytics;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
public class GetAnalyticsController : AnalyticsControllerBase
{
private readonly IMetricsConsentService _metricsConsentService;
public GetAnalyticsController(IMetricsConsentService metricsConsentService) => _metricsConsentService = metricsConsentService;
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(AnalyticsLevelViewModel), StatusCodes.Status200OK)]
public async Task<AnalyticsLevelViewModel> Get() => await Task.FromResult(new AnalyticsLevelViewModel { AnalyticsLevel = _metricsConsentService.GetConsentLevel() });
}
@@ -1,12 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Culture;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/culture")]
[OpenApiTag("Culture")]
[VersionedApiBackOfficeRoute("culture")]
[ApiExplorerSettings(GroupName = "Culture")]
[ApiVersion("1.0")]
public abstract class CultureControllerBase : ManagementApiControllerBase
{
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -12,8 +11,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.DataType.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DataType}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DataType))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.DataType}")]
[ApiExplorerSettings(GroupName = "Data Type")]
public class DataTypeTreeControllerBase : FolderTreeControllerBase<FolderTreeItemViewModel>
{
private readonly IDataTypeService _dataTypeService;
@@ -12,7 +12,7 @@ public class ItemsDataTypeTreeController : DataTypeTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FolderTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,12 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/dictionary")]
[OpenApiTag("Dictionary")]
[VersionedApiBackOfficeRoute("dictionary")]
[ApiExplorerSettings(GroupName = "Dictionary")]
[ApiVersion("1.0")]
// TODO: Add authentication
public abstract class DictionaryControllerBase : ManagementApiControllerBase
@@ -23,13 +23,13 @@ public class ExportDictionaryController : DictionaryControllerBase
[HttpGet("export/{key:guid}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(FileContentResult), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(NotFoundObjectResult), StatusCodes.Status404NotFound)]
[ProducesResponseType(typeof(NotFoundResult), StatusCodes.Status404NotFound)]
public async Task<IActionResult> ExportDictionary(Guid key, bool includeChildren = false)
{
IDictionaryItem? dictionaryItem = _localizationService.GetDictionaryItemById(key);
if (dictionaryItem is null)
{
return await Task.FromResult(NotFound("No dictionary item found with id "));
return await Task.FromResult(NotFound());
}
XElement xml = _entityXmlSerializer.Serialize(dictionaryItem, includeChildren);
@@ -4,6 +4,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Extensions;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.Services;
@@ -13,18 +14,15 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary;
public class ImportDictionaryController : DictionaryControllerBase
{
private readonly IHostingEnvironment _hostingEnvironment;
private readonly IDictionaryService _dictionaryService;
private readonly IWebHostEnvironment _webHostEnvironment;
private readonly ILoadDictionaryItemService _loadDictionaryItemService;
public ImportDictionaryController(
IHostingEnvironment hostingEnvironment,
IDictionaryService dictionaryService,
IWebHostEnvironment webHostEnvironment,
ILoadDictionaryItemService loadDictionaryItemService)
{
_hostingEnvironment = hostingEnvironment;
_dictionaryService = dictionaryService;
_webHostEnvironment = webHostEnvironment;
_loadDictionaryItemService = loadDictionaryItemService;
@@ -41,7 +39,7 @@ public class ImportDictionaryController : DictionaryControllerBase
return NotFound();
}
var filePath = Path.Combine(_hostingEnvironment.MapPathContentRoot(Constants.SystemDirectories.Data), file);
var filePath = Path.Combine(_webHostEnvironment.MapPathContentRoot(Constants.SystemDirectories.Data), file);
if (_webHostEnvironment.ContentRootFileProvider.GetFileInfo(filePath) is null)
{
return await Task.FromResult(NotFound());
@@ -6,11 +6,11 @@ using Umbraco.Cms.ManagementApi.Services.Paging;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary.Tree;
public class ChildrenDictionaryItemTreeController : DictionaryItemTreeControllerBase
public class ChildrenDictionaryTreeController : DictionaryTreeControllerBase
{
public ChildrenDictionaryItemTreeController(IEntityService entityService, ILocalizationService localizationService)
public ChildrenDictionaryTreeController(IEntityService entityService, ILocalizationService localizationService)
: base(entityService, localizationService)
{
}
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
@@ -7,17 +6,17 @@ using Umbraco.Cms.ManagementApi.Controllers.Tree;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DictionaryItem}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DictionaryItem))]
// NOTE: at the moment dictionary items aren't supported by EntityService, so we have little use of the
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/dictionary")]
[ApiExplorerSettings(GroupName = "Dictionary")]
// NOTE: at the moment dictionary items (renamed to dictionary tree) aren't supported by EntityService, so we have little use of the
// tree controller base. We'll keep it though, in the hope that we can mend EntityService.
public class DictionaryItemTreeControllerBase : EntityTreeControllerBase<EntityTreeItemViewModel>
public class DictionaryTreeControllerBase : EntityTreeControllerBase<EntityTreeItemViewModel>
{
public DictionaryItemTreeControllerBase(IEntityService entityService, ILocalizationService localizationService)
public DictionaryTreeControllerBase(IEntityService entityService, ILocalizationService localizationService)
: base(entityService) =>
LocalizationService = localizationService;
@@ -4,16 +4,16 @@ using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary.Tree;
public class ItemsDictionaryItemTreeController : DictionaryItemTreeControllerBase
public class ItemsDictionaryTreeController : DictionaryTreeControllerBase
{
public ItemsDictionaryItemTreeController(IEntityService entityService, ILocalizationService localizationService)
public ItemsDictionaryTreeController(IEntityService entityService, ILocalizationService localizationService)
: base(entityService, localizationService)
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FolderTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -6,11 +6,11 @@ using Umbraco.Cms.ManagementApi.Services.Paging;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.DictionaryItem.Tree;
namespace Umbraco.Cms.ManagementApi.Controllers.Dictionary.Tree;
public class RootDictionaryItemTreeController : DictionaryItemTreeControllerBase
public class RootDictionaryTreeController : DictionaryTreeControllerBase
{
public RootDictionaryItemTreeController(IEntityService entityService, ILocalizationService localizationService)
public RootDictionaryTreeController(IEntityService entityService, ILocalizationService localizationService)
: base(entityService, localizationService)
{
}
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -14,10 +13,10 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Document.RecycleBin;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Document}/recycle-bin")]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.RecycleBin}/{Constants.UdiEntityType.Document}")]
[RequireDocumentTreeRootAccess]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[OpenApiTag(nameof(Constants.UdiEntityType.Document))]
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Document))]
public class DocumentRecycleBinControllerBase : RecycleBinControllerBase<RecycleBinItemViewModel>
{
public DocumentRecycleBinControllerBase(IEntityService entityService)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Models;
@@ -16,8 +15,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Document.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Document}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.Document))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.Document}")]
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Document))]
public abstract class DocumentTreeControllerBase : UserStartNodeTreeControllerBase<DocumentTreeItemViewModel>
{
private readonly IPublicAccessService _publicAccessService;
@@ -21,7 +21,7 @@ public class ItemsDocumentTreeController : DocumentTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<DocumentTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys, Guid? dataTypeKey = null, string? culture = null)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -12,8 +11,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.DocumentBlueprint.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DocumentBlueprint}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DocumentBlueprint))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.DocumentBlueprint}")]
[ApiExplorerSettings(GroupName = "Document Blueprint")]
public class DocumentBlueprintTreeControllerBase : EntityTreeControllerBase<DocumentBlueprintTreeItemViewModel>
{
private readonly IContentTypeService _contentTypeService;
@@ -13,7 +13,7 @@ public class ItemsDocumentBlueprintTreeController : DocumentBlueprintTreeControl
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentBlueprintTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<DocumentBlueprintTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -12,8 +11,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.DocumentType.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.DocumentType}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.DocumentType))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.DocumentType}")]
[ApiExplorerSettings(GroupName = "Document Type")]
public class DocumentTypeTreeControllerBase : FolderTreeControllerBase<DocumentTypeTreeItemViewModel>
{
private readonly IContentTypeService _contentTypeService;
@@ -12,7 +12,7 @@ public class ItemsDocumentTypeTreeController : DocumentTypeTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<DocumentTypeTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<DocumentTypeTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/examineManagement")]
[OpenApiTag("ExamineManagement")]
public class ExamineManagementControllerBase : ManagementApiControllerBase
{
}
@@ -1,42 +0,0 @@
using Examine;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Infrastructure.Examine;
using Umbraco.Cms.ManagementApi.Factories;
using Umbraco.Cms.ManagementApi.ViewModels.ExamineManagement;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Extensions;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
[ApiVersion("1.0")]
public class IndexesExamineManagementController : ExamineManagementControllerBase
{
private readonly IExamineManager _examineManager;
private readonly IExamineIndexViewModelFactory _examineIndexViewModelFactory;
public IndexesExamineManagementController(
IExamineManager examineManager,
IExamineIndexViewModelFactory examineIndexViewModelFactory)
{
_examineManager = examineManager;
_examineIndexViewModelFactory = examineIndexViewModelFactory;
}
/// <summary>
/// Get the details for indexers
/// </summary>
/// <returns></returns>
[HttpGet("indexes")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<ExamineIndexViewModel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<ExamineIndexViewModel>> Indexes(int skip, int take)
{
ExamineIndexViewModel[] indexes = _examineManager.Indexes
.Select(_examineIndexViewModelFactory.Create)
.OrderBy(examineIndexModel => examineIndexModel.Name?.TrimEnd("Indexer")).ToArray();
var viewModel = new PagedViewModel<ExamineIndexViewModel> { Items = indexes.Skip(skip).Take(take), Total = indexes.Length };
return viewModel;
}
}
@@ -1,12 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Help;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/help")]
[OpenApiTag("Help")]
[VersionedApiBackOfficeRoute("help")]
[ApiExplorerSettings(GroupName = "Help")]
[ApiVersion("1.0")]
public abstract class HelpControllerBase : ManagementApiControllerBase
{
@@ -0,0 +1,41 @@
using Examine;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.ManagementApi.Factories;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Search;
using Umbraco.Extensions;
namespace Umbraco.Cms.ManagementApi.Controllers.Indexer;
[ApiVersion("1.0")]
public class AllIndexerController : IndexerControllerBase
{
private readonly IExamineManager _examineManager;
private readonly IIndexViewModelFactory _indexViewModelFactory;
public AllIndexerController(
IExamineManager examineManager,
IIndexViewModelFactory indexViewModelFactory)
{
_examineManager = examineManager;
_indexViewModelFactory = indexViewModelFactory;
}
/// <summary>
/// Get the details for indexers
/// </summary>
/// <returns></returns>
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<IndexViewModel>), StatusCodes.Status200OK)]
public Task<PagedViewModel<IndexViewModel>> All(int skip, int take)
{
IndexViewModel[] indexes = _examineManager.Indexes
.Select(_indexViewModelFactory.Create)
.OrderBy(indexModel => indexModel.Name.TrimEnd("Indexer")).ToArray();
var viewModel = new PagedViewModel<IndexViewModel> { Items = indexes.Skip(skip).Take(take), Total = indexes.Length };
return Task.FromResult(viewModel);
}
}
@@ -2,21 +2,21 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.ManagementApi.Factories;
using Umbraco.Cms.ManagementApi.ViewModels.ExamineManagement;
using Umbraco.Cms.ManagementApi.ViewModels.Search;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
namespace Umbraco.Cms.ManagementApi.Controllers.Indexer;
[ApiVersion("1.0")]
public class IndexExamineManagementController : ExamineManagementControllerBase
public class DetailsIndexerController : IndexerControllerBase
{
private readonly IExamineIndexViewModelFactory _examineIndexViewModelFactory;
private readonly IIndexViewModelFactory _indexViewModelFactory;
private readonly IExamineManager _examineManager;
public IndexExamineManagementController(
IExamineIndexViewModelFactory examineIndexViewModelFactory,
public DetailsIndexerController(
IIndexViewModelFactory indexViewModelFactory,
IExamineManager examineManager)
{
_examineIndexViewModelFactory = examineIndexViewModelFactory;
_indexViewModelFactory = indexViewModelFactory;
_examineManager = examineManager;
}
@@ -29,15 +29,15 @@ public class IndexExamineManagementController : ExamineManagementControllerBase
/// This is kind of rudimentary since there's no way we can know that the index has rebuilt, we
/// have a listener for the index op complete so we'll just check if that key is no longer there in the runtime cache
/// </remarks>
[HttpGet("index")]
[HttpGet("{indexName}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(ExamineIndexViewModel), StatusCodes.Status200OK)]
public async Task<ActionResult<ExamineIndexViewModel?>> Index(string indexName)
[ProducesResponseType(typeof(IndexViewModel), StatusCodes.Status200OK)]
public async Task<ActionResult<IndexViewModel?>> Details(string indexName)
{
if (_examineManager.TryGetIndex(indexName, out IIndex? index))
{
return await Task.FromResult(_examineIndexViewModelFactory.Create(index!));
return await Task.FromResult(_indexViewModelFactory.Create(index!));
}
var invalidModelProblem = new ProblemDetails
@@ -0,0 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Indexer;
[ApiController]
[VersionedApiBackOfficeRoute("indexer")]
[ApiExplorerSettings(GroupName = "Indexer")]
public class IndexerControllerBase : ManagementApiControllerBase
{
}
@@ -5,17 +5,17 @@ using Microsoft.Extensions.Logging;
using Umbraco.Cms.Infrastructure.Examine;
using Umbraco.New.Cms.Infrastructure.Services;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
namespace Umbraco.Cms.ManagementApi.Controllers.Indexer;
[ApiVersion("1.0")]
public class RebuildExamineManagementController : ExamineManagementControllerBase
public class RebuildIndexerController : IndexerControllerBase
{
private readonly ILogger<RebuildExamineManagementController> _logger;
private readonly ILogger<RebuildIndexerController> _logger;
private readonly IIndexingRebuilderService _indexingRebuilderService;
private readonly IExamineManager _examineManager;
public RebuildExamineManagementController(
ILogger<RebuildExamineManagementController> logger,
public RebuildIndexerController(
ILogger<RebuildIndexerController> logger,
IIndexingRebuilderService indexingRebuilderService,
IExamineManager examineManager)
{
@@ -29,7 +29,7 @@ public class RebuildExamineManagementController : ExamineManagementControllerBas
/// </summary>
/// <param name="indexName"></param>
/// <returns></returns>
[HttpPost("rebuild")]
[HttpPost("{indexName}/rebuild")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(typeof(OkResult), StatusCodes.Status200OK)]
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.ManagementApi.Filters;
using Umbraco.New.Cms.Web.Common.Routing;
@@ -8,7 +7,7 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Install;
[ApiController]
[VersionedApiBackOfficeRoute("install")]
[OpenApiTag("Install")]
[ApiExplorerSettings(GroupName = "Install")]
[RequireRuntimeLevel(RuntimeLevel.Install)]
public abstract class InstallControllerBase : ManagementApiControllerBase
{
@@ -21,7 +21,7 @@ public class ValidateDatabaseInstallController : InstallControllerBase
_mapper = mapper;
}
[HttpPost("validateDatabase")]
[HttpPost("validate-database")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status200OK)]
@@ -1,12 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Language;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/language")]
[OpenApiTag("Language")]
[VersionedApiBackOfficeRoute("language")]
[ApiExplorerSettings(GroupName = "Language")]
[ApiVersion("1.0")]
public abstract class LanguageControllerBase : ManagementApiControllerBase
{
@@ -1,6 +1,5 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -14,10 +13,10 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Media.RecycleBin;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Media}/recycle-bin")]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.RecycleBin}/{Constants.UdiEntityType.Media}")]
[RequireMediaTreeRootAccess]
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
[OpenApiTag(nameof(Constants.UdiEntityType.Media))]
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Media))]
public class MediaRecycleBinControllerBase : RecycleBinControllerBase<RecycleBinItemViewModel>
{
public MediaRecycleBinControllerBase(IEntityService entityService)
@@ -20,7 +20,7 @@ public class ItemsMediaTreeController : MediaTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<ContentTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<ContentTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys, Guid? dataTypeKey = null)
@@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Models;
@@ -15,8 +15,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Media.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Media}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.Media))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.Media}")]
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Media))]
public class MediaTreeControllerBase : UserStartNodeTreeControllerBase<ContentTreeItemViewModel>
{
private readonly AppCaches _appCaches;
@@ -12,7 +12,7 @@ public class ItemsMediaTypeTreeController : MediaTypeTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FolderTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -12,8 +11,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.MediaType.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.MediaType}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.MediaType))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.MediaType}")]
[ApiExplorerSettings(GroupName = "Media Type")]
public class MediaTypeTreeControllerBase : FolderTreeControllerBase<FolderTreeItemViewModel>
{
private readonly IMediaTypeService _mediaTypeService;
@@ -12,7 +12,7 @@ public class ItemsMemberGroupTreeController : MemberGroupTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<EntityTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<EntityTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -12,8 +11,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.MemberGroup.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.MemberGroup}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.MemberGroup))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.MemberGroup}")]
[ApiExplorerSettings(GroupName = "Member Group")]
public class MemberGroupTreeControllerBase : EntityTreeControllerBase<EntityTreeItemViewModel>
{
public MemberGroupTreeControllerBase(IEntityService entityService)
@@ -12,7 +12,7 @@ public class ItemsMemberTypeTreeController : MemberTypeTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<EntityTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<EntityTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -12,8 +11,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.MemberType.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.MemberType}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.MemberType))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.MemberType}")]
[ApiExplorerSettings(GroupName = "Member Type")]
public class MemberTypeTreeControllerBase : EntityTreeControllerBase<EntityTreeItemViewModel>
{
public MemberTypeTreeControllerBase(IEntityService entityService)
@@ -8,7 +8,7 @@ using Umbraco.Cms.Infrastructure.ModelsBuilder;
using Umbraco.Cms.Infrastructure.ModelsBuilder.Building;
using Umbraco.Extensions;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilderDashboard;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilder;
public class BuildModelsBuilderController : ModelsBuilderControllerBase
{
@@ -1,10 +1,9 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.ManagementApi.Factories;
using Umbraco.Cms.ManagementApi.ViewModels.ModelsBuilderDashboard;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilderDashboard;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilder;
public class GetModelsBuilderController : ModelsBuilderControllerBase
{
@@ -12,8 +11,8 @@ public class GetModelsBuilderController : ModelsBuilderControllerBase
public GetModelsBuilderController(IModelsBuilderViewModelFactory modelsBuilderViewModelFactory) => _modelsBuilderViewModelFactory = modelsBuilderViewModelFactory;
[HttpGet]
[ProducesResponseType(typeof(CreatedResult), StatusCodes.Status200OK)]
[HttpGet("dashboard")]
[ProducesResponseType(typeof(ModelsBuilderViewModel), StatusCodes.Status200OK)]
[MapToApiVersion("1.0")]
public async Task<ActionResult<ModelsBuilderViewModel>> GetDashboard() => await Task.FromResult(Ok(_modelsBuilderViewModelFactory.Create()));
}
@@ -1,12 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilderDashboard;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilder;
[ApiController]
[VersionedApiBackOfficeRoute("modelsBuilder")]
[OpenApiTag("ModelsBuilder")]
[VersionedApiBackOfficeRoute("models-builder")]
[ApiExplorerSettings(GroupName = "Models Builder")]
[ApiVersion("1.0")]
public class ModelsBuilderControllerBase : ManagementApiControllerBase
@@ -5,7 +5,7 @@ using Umbraco.Cms.Infrastructure.ModelsBuilder;
using Umbraco.Cms.ManagementApi.ViewModels.ModelsBuilderDashboard;
using Umbraco.New.Cms.Core.Models;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilderDashboard;
namespace Umbraco.Cms.ManagementApi.Controllers.ModelsBuilder;
public class StatusModelsBuilderController : ModelsBuilderControllerBase
{
@@ -12,7 +12,7 @@ public class ItemsPartialViewTreeController : PartialViewTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FileSystemTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FileSystemTreeItemViewModel>>> Items([FromQuery(Name = "path")] string[] paths)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
@@ -9,8 +8,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.PartialView.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.PartialView}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.PartialView))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.PartialView}")]
[ApiExplorerSettings(GroupName = "Partial View")]
public class PartialViewTreeControllerBase : FileSystemTreeControllerBase
{
public PartialViewTreeControllerBase(FileSystems fileSystems)
@@ -1,13 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Profiling;
[ApiVersion("1.0")]
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/profiling")]
[OpenApiTag("Profiling")]
[VersionedApiBackOfficeRoute("profiling")]
[ApiExplorerSettings(GroupName = "Profiling")]
public class ProfilingControllerBase : ManagementApiControllerBase
{
}
@@ -1,13 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.PublishedCache;
[ApiVersion("1.0")]
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/published-cache")]
[OpenApiTag("PublishedCache")]
[VersionedApiBackOfficeRoute("published-cache")]
[ApiExplorerSettings(GroupName = "Published Cache")]
public class PublishedCacheControllerBase : ManagementApiControllerBase
{
}
@@ -14,7 +14,7 @@ public class RebuildPublishedCacheController : PublishedCacheControllerBase
[HttpPost("rebuild")]
[MapToApiVersion("1.0")]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<ActionResult> Collect()
public async Task<ActionResult> Rebuild()
{
_publishedSnapshotService.Rebuild();
return await Task.FromResult(Ok());
@@ -22,7 +22,7 @@ public class ByChildRelationController : RelationControllerBase
_relationViewModelFactory = relationViewModelFactory;
}
[HttpGet("childRelations/{childId:int}")]
[HttpGet("child-relation/{childId:int}")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<RelationViewModel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<RelationViewModel>> ByChild(int childId, int skip, int take, string? relationTypeAlias = "")
@@ -1,12 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Relation;
[ApiController]
[BackOfficeRoute("api/v{version:apiVersion}/relation")]
[OpenApiTag("Relation")]
[VersionedApiBackOfficeRoute("relation")]
[ApiExplorerSettings(GroupName = "Relation")]
[ApiVersion("1.0")]
// TODO: Implement Authentication
public abstract class RelationControllerBase : ManagementApiControllerBase
@@ -14,7 +14,7 @@ public class ItemsRelationTypeTreeController : RelationTypeTreeControllerBase
: base(entityService) =>
_relationService = relationService;
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FolderTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FolderTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Services;
@@ -11,8 +10,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.RelationType.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.RelationType}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.RelationType))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.RelationType}")]
[ApiExplorerSettings(GroupName = "Relation Type")]
// NOTE: at the moment relation types aren't supported by EntityService, so we have little use of the
// tree controller base. We'll keep it though, in the hope that we can mend EntityService.
public class RelationTypeTreeControllerBase : EntityTreeControllerBase<EntityTreeItemViewModel>
@@ -12,7 +12,7 @@ public class ItemsScriptTreeController : ScriptTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FileSystemTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FileSystemTreeItemViewModel>>> Items([FromQuery(Name = "path")] string[] paths)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
@@ -9,8 +8,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Script.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Script}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.Script))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.Script}")]
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Script))]
public class ScriptTreeControllerBase : FileSystemTreeControllerBase
{
public ScriptTreeControllerBase(FileSystems fileSystems)
@@ -1,28 +1,27 @@
using Examine;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Infrastructure.Examine;
using Umbraco.Cms.ManagementApi.ViewModels.ExamineManagement;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Search;
using Umbraco.Extensions;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
namespace Umbraco.Cms.ManagementApi.Controllers.Searcher;
[ApiVersion("1.0")]
public class SearchersExamineManagementController : ExamineManagementControllerBase
public class AllSearcherController : SearcherControllerBase
{
private readonly IExamineManager _examineManager;
public SearchersExamineManagementController(IExamineManager examineManager) => _examineManager = examineManager;
public AllSearcherController(IExamineManager examineManager) => _examineManager = examineManager;
/// <summary>
/// Get the details for searchers
/// </summary>
/// <returns></returns>
[HttpGet("searchers")]
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<SearcherViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<PagedViewModel<SearcherViewModel>>> Searchers(int skip, int take)
public async Task<ActionResult<PagedViewModel<SearcherViewModel>>> All(int skip, int take)
{
var searchers = new List<SearcherViewModel>(
_examineManager.RegisteredSearchers.Select(searcher => new SearcherViewModel { Name = searcher.Name })
@@ -4,28 +4,28 @@ using Lucene.Net.QueryParsers.Classic;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.ManagementApi.Services;
using Umbraco.Cms.ManagementApi.ViewModels.ExamineManagement;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Search;
using Umbraco.Extensions;
namespace Umbraco.Cms.ManagementApi.Controllers.ExamineManagement;
namespace Umbraco.Cms.ManagementApi.Controllers.Searcher;
[ApiVersion("1.0")]
public class SearchExamineManagementController : ExamineManagementControllerBase
public class QuerySearcherController : SearcherControllerBase
{
private readonly IExamineManagerService _examineManagerService;
public SearchExamineManagementController(IExamineManagerService examineManagerService) => _examineManagerService = examineManagerService;
public QuerySearcherController(IExamineManagerService examineManagerService) => _examineManagerService = examineManagerService;
[HttpGet("search")]
[HttpGet("{searcherName}/query")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<PagedViewModel<SearchResultViewModel>>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(PagedViewModel<SearchResultViewModel>), StatusCodes.Status200OK)]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status404NotFound)]
public async Task<ActionResult<PagedViewModel<SearchResultViewModel>>> GetSearchResults(string searcherName, string? query, int skip, int take)
public async Task<ActionResult<PagedViewModel<SearchResultViewModel>>> Query(string searcherName, string? term, int skip, int take)
{
query = query?.Trim();
term = term?.Trim();
if (query.IsNullOrWhiteSpace())
if (term.IsNullOrWhiteSpace())
{
return new PagedViewModel<SearchResultViewModel>();
}
@@ -50,7 +50,7 @@ public class SearchExamineManagementController : ExamineManagementControllerBase
{
results = searcher
.CreateQuery()
.NativeQuery(query)
.NativeQuery(term)
.Execute(QueryOptions.SkipTake(skip, take));
}
catch (ParseException)
@@ -0,0 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Searcher;
[ApiController]
[VersionedApiBackOfficeRoute("searcher")]
[ApiExplorerSettings(GroupName = "Searcher")]
public class SearcherControllerBase : ManagementApiControllerBase
{
}
@@ -0,0 +1,144 @@
using System.Security.Claims;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Options;
using OpenIddict.Abstractions;
using OpenIddict.Server.AspNetCore;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.Security;
using Umbraco.Cms.Web.BackOffice.Security;
using Umbraco.Extensions;
using Umbraco.New.Cms.Web.Common.Routing;
using SignInResult = Microsoft.AspNetCore.Mvc.SignInResult;
using IdentitySignInResult = Microsoft.AspNetCore.Identity.SignInResult;
namespace Umbraco.Cms.ManagementApi.Controllers.Security;
[ApiController]
[VersionedApiBackOfficeRoute(Paths.BackOfficeApiEndpointTemplate)]
[ApiExplorerSettings(GroupName = "Security")]
public class BackOfficeController : ManagementApiControllerBase
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly IBackOfficeSignInManager _backOfficeSignInManager;
private readonly IBackOfficeUserManager _backOfficeUserManager;
private readonly IOptions<SecuritySettings> _securitySettings;
public BackOfficeController(
IHttpContextAccessor httpContextAccessor,
IBackOfficeSignInManager backOfficeSignInManager,
IBackOfficeUserManager backOfficeUserManager,
IOptions<SecuritySettings> securitySettings)
{
_httpContextAccessor = httpContextAccessor;
_backOfficeSignInManager = backOfficeSignInManager;
_backOfficeUserManager = backOfficeUserManager;
_securitySettings = securitySettings;
}
[HttpGet("authorize")]
[HttpPost("authorize")]
[MapToApiVersion("1.0")]
public async Task<IActionResult> Authorize()
{
HttpContext context = _httpContextAccessor.GetRequiredHttpContext();
OpenIddictRequest? request = context.GetOpenIddictServerRequest();
if (request == null)
{
return BadRequest("Unable to obtain OpenID data from the current request");
}
return request.IdentityProvider.IsNullOrWhiteSpace()
? await AuthorizeInternal(request)
: await AuthorizeExternal(request);
}
private async Task<IActionResult> AuthorizeInternal(OpenIddictRequest request)
{
// TODO: ensure we handle sign-in notifications for internal logins.
// when the new login screen is implemented for internal logins, make sure it still handles
// user sign-in notifications (calls BackOfficeSignInManager.HandleSignIn) as part of the
// sign-in process
// for future reference, notifications are already handled for the external login flow by
// by calling BackOfficeSignInManager.ExternalLoginSignInAsync
// retrieve the user principal stored in the authentication cookie.
AuthenticateResult cookieAuthResult = await HttpContext.AuthenticateAsync(Constants.Security.BackOfficeAuthenticationType);
var userName = cookieAuthResult.Succeeded
? cookieAuthResult.Principal?.Identity?.Name
: null;
if (userName != null)
{
BackOfficeIdentityUser? backOfficeUser = await _backOfficeUserManager.FindByNameAsync(userName);
if (backOfficeUser != null)
{
return await SignInBackOfficeUser(backOfficeUser, request);
}
}
return DefaultChallengeResult();
}
private async Task<IActionResult> AuthorizeExternal(OpenIddictRequest request)
{
var provider = request.IdentityProvider ?? throw new ArgumentException("No identity provider found in request", nameof(request));
ExternalLoginInfo? loginInfo = await _backOfficeSignInManager.GetExternalLoginInfoAsync();
if (loginInfo?.Principal != null)
{
IdentitySignInResult result = await _backOfficeSignInManager.ExternalLoginSignInAsync(loginInfo, false, _securitySettings.Value.UserBypassTwoFactorForExternalLogins);
if (result.Succeeded)
{
// Update any authentication tokens if succeeded
await _backOfficeSignInManager.UpdateExternalAuthenticationTokensAsync(loginInfo);
// sign in the backoffice user associated with the login provider and unique provider key
BackOfficeIdentityUser? backOfficeUser = await _backOfficeUserManager.FindByLoginAsync(loginInfo.LoginProvider, loginInfo.ProviderKey);
if (backOfficeUser != null)
{
return await SignInBackOfficeUser(backOfficeUser, request);
}
}
else
{
// avoid infinite auth loops when something fails by performing the default challenge (default login screen)
return DefaultChallengeResult();
}
}
AuthenticationProperties properties = _backOfficeSignInManager.ConfigureExternalAuthenticationProperties(provider, null);
return new ChallengeResult(provider, properties);
}
private async Task<IActionResult> SignInBackOfficeUser(BackOfficeIdentityUser backOfficeUser, OpenIddictRequest request)
{
ClaimsPrincipal backOfficePrincipal = await _backOfficeSignInManager.CreateUserPrincipalAsync(backOfficeUser);
backOfficePrincipal.SetClaim(OpenIddictConstants.Claims.Subject, backOfficeUser.Key.ToString());
// TODO: it is not optimal to append all claims to the token.
// the token size grows with each claim, although it is still smaller than the old cookie.
// see if we can find a better way so we do not risk leaking sensitive data in bearer tokens.
// maybe work with scopes instead?
Claim[] backOfficeClaims = backOfficePrincipal.Claims.ToArray();
foreach (Claim backOfficeClaim in backOfficeClaims)
{
backOfficeClaim.SetDestinations(OpenIddictConstants.Destinations.AccessToken);
}
if (request.GetScopes().Contains(OpenIddictConstants.Scopes.OfflineAccess))
{
// "offline_access" scope is required to use refresh tokens
backOfficePrincipal.SetScopes(OpenIddictConstants.Scopes.OfflineAccess);
}
return new SignInResult(OpenIddictServerAspNetCoreDefaults.AuthenticationScheme, backOfficePrincipal);
}
private static IActionResult DefaultChallengeResult() => new ChallengeResult(Constants.Security.BackOfficeAuthenticationType);
}
@@ -0,0 +1,12 @@
namespace Umbraco.Cms.ManagementApi.Controllers.Security;
public static class Paths
{
public const string BackOfficeApiEndpointTemplate = "security/back-office";
public static readonly string BackOfficeApiAuthorizationEndpoint = BackOfficeApiEndpointPath($"{BackOfficeApiEndpointTemplate}/authorize");
public static readonly string BackOfficeApiTokenEndpoint = BackOfficeApiEndpointPath($"{BackOfficeApiEndpointTemplate}/token");
private static string BackOfficeApiEndpointPath(string relativePath) => $"/umbraco/management/api/v1.0/{relativePath}";
}
@@ -1,12 +1,11 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Server;
[ApiController]
[VersionedApiBackOfficeRoute("server")]
[OpenApiTag("Server")]
[ApiExplorerSettings(GroupName = "Server")]
public abstract class ServerControllerBase : ManagementApiControllerBase
{
@@ -12,7 +12,7 @@ public class ItemsStaticFileTreeController : StaticFileTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FileSystemTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FileSystemTreeItemViewModel>>> Items([FromQuery(Name = "path")] string[] paths)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
@@ -9,8 +8,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.StaticFile.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute("static-file/tree")]
[OpenApiTag("StaticFile")]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/static-file")]
[ApiExplorerSettings(GroupName = "Static File")]
public class StaticFileTreeControllerBase : FileSystemTreeControllerBase
{
private static readonly string[] _allowedRootFolders = { "App_Plugins", "wwwroot" };
@@ -12,7 +12,7 @@ public class ItemsStylesheetTreeController : StylesheetTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<FileSystemTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<FileSystemTreeItemViewModel>>> Items([FromQuery(Name = "path")] string[] paths)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.IO;
using Umbraco.Cms.ManagementApi.Controllers.Tree;
@@ -9,8 +8,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Stylesheet.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Stylesheet}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.Stylesheet))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.Stylesheet}")]
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Stylesheet))]
public class StylesheetTreeControllerBase : FileSystemTreeControllerBase
{
public StylesheetTreeControllerBase(FileSystems fileSystems)
@@ -0,0 +1,23 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.Telemetry;
namespace Umbraco.Cms.ManagementApi.Controllers.Telemetry;
public class AllTelemetryController : TelemetryControllerBase
{
[HttpGet]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(PagedViewModel<TelemetryViewModel>), StatusCodes.Status200OK)]
public async Task<PagedViewModel<TelemetryViewModel>> GetAll(int skip, int take)
{
TelemetryLevel[] levels = Enum.GetValues<TelemetryLevel>();
return await Task.FromResult(new PagedViewModel<TelemetryViewModel>
{
Total = levels.Length,
Items = levels.Skip(skip).Take(take).Select(level => new TelemetryViewModel { TelemetryLevel = level }),
});
}
}
@@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Telemetry;
namespace Umbraco.Cms.ManagementApi.Controllers.Telemetry;
public class GetTelemetryController : TelemetryControllerBase
{
private readonly IMetricsConsentService _metricsConsentService;
public GetTelemetryController(IMetricsConsentService metricsConsentService) => _metricsConsentService = metricsConsentService;
[HttpGet("level")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(TelemetryViewModel), StatusCodes.Status200OK)]
public async Task<TelemetryViewModel> Get() => await Task.FromResult(new TelemetryViewModel { TelemetryLevel = _metricsConsentService.GetConsentLevel() });
}
@@ -1,36 +1,35 @@
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Umbraco.Cms.Core.Services;
using Umbraco.Cms.ManagementApi.ViewModels.Analytics;
using Umbraco.Cms.ManagementApi.ViewModels.Server;
using Umbraco.Cms.ManagementApi.ViewModels.Telemetry;
namespace Umbraco.Cms.ManagementApi.Controllers.Analytics;
namespace Umbraco.Cms.ManagementApi.Controllers.Telemetry;
public class SetAnalyticsController : AnalyticsControllerBase
public class SetTelemetryController : TelemetryControllerBase
{
private readonly IMetricsConsentService _metricsConsentService;
public SetAnalyticsController(IMetricsConsentService metricsConsentService) => _metricsConsentService = metricsConsentService;
public SetTelemetryController(IMetricsConsentService metricsConsentService) => _metricsConsentService = metricsConsentService;
[HttpPost]
[HttpPost("level")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(ProblemDetails), StatusCodes.Status400BadRequest)]
[ProducesResponseType(StatusCodes.Status200OK)]
public async Task<IActionResult> SetConsentLevel(AnalyticsLevelViewModel analyticsLevelViewModel)
public async Task<IActionResult> SetConsentLevel(TelemetryViewModel telemetryViewModel)
{
if (!Enum.IsDefined(analyticsLevelViewModel.AnalyticsLevel))
if (!Enum.IsDefined(telemetryViewModel.TelemetryLevel))
{
var invalidModelProblem = new ProblemDetails
{
Title = "Invalid AnalyticsLevel value",
Detail = "The provided value for AnalyticsLevel is not valid",
Title = "Invalid TelemetryLevel value",
Detail = "The provided value for TelemetryLevel is not valid",
Status = StatusCodes.Status400BadRequest,
Type = "Error",
};
return BadRequest(invalidModelProblem);
}
_metricsConsentService.SetConsentLevel(analyticsLevelViewModel.AnalyticsLevel);
_metricsConsentService.SetConsentLevel(telemetryViewModel.TelemetryLevel);
return await Task.FromResult(Ok());
}
}
@@ -0,0 +1,12 @@
using Microsoft.AspNetCore.Mvc;
using Umbraco.New.Cms.Web.Common.Routing;
namespace Umbraco.Cms.ManagementApi.Controllers.Telemetry;
[ApiController]
[VersionedApiBackOfficeRoute("telemetry")]
[ApiExplorerSettings(GroupName = "Telemetry")]
[ApiVersion("1.0")]
public abstract class TelemetryControllerBase : ManagementApiControllerBase
{
}
@@ -12,7 +12,7 @@ public class ItemsTemplateTreeController : TemplateTreeControllerBase
{
}
[HttpGet("items")]
[HttpGet("item")]
[MapToApiVersion("1.0")]
[ProducesResponseType(typeof(IEnumerable<EntityTreeItemViewModel>), StatusCodes.Status200OK)]
public async Task<ActionResult<IEnumerable<EntityTreeItemViewModel>>> Items([FromQuery(Name = "key")] Guid[] keys)
@@ -1,5 +1,4 @@
using Microsoft.AspNetCore.Mvc;
using NSwag.Annotations;
using Umbraco.Cms.Core;
using Umbraco.Cms.Core.Models;
using Umbraco.Cms.Core.Models.Entities;
@@ -12,8 +11,8 @@ namespace Umbraco.Cms.ManagementApi.Controllers.Template.Tree;
[ApiVersion("1.0")]
[ApiController]
[VersionedApiBackOfficeRoute($"{Constants.UdiEntityType.Template}/tree")]
[OpenApiTag(nameof(Constants.UdiEntityType.Template))]
[VersionedApiBackOfficeRoute($"{Constants.Web.RoutePath.Tree}/{Constants.UdiEntityType.Template}")]
[ApiExplorerSettings(GroupName = nameof(Constants.UdiEntityType.Template))]
public class TemplateTreeControllerBase : EntityTreeControllerBase<EntityTreeItemViewModel>
{
public TemplateTreeControllerBase(IEntityService entityService)
@@ -7,14 +7,14 @@ using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.TrackedReferences;
using Umbraco.New.Cms.Core.Models;
namespace Umbraco.Cms.ManagementApi.Controllers.TrackedReferences;
namespace Umbraco.Cms.ManagementApi.Controllers.TrackedReference;
public class ForItemTrackedReferencesController : TrackedReferencesControllerBase
public class ByIdTrackedReferenceController : TrackedReferenceControllerBase
{
private readonly ITrackedReferencesService _trackedReferencesService;
private readonly IUmbracoMapper _umbracoMapper;
public ForItemTrackedReferencesController(ITrackedReferencesService trackedReferencesService, IUmbracoMapper umbracoMapper)
public ByIdTrackedReferenceController(ITrackedReferencesService trackedReferencesService, IUmbracoMapper umbracoMapper)
{
_trackedReferencesService = trackedReferencesService;
_umbracoMapper = umbracoMapper;
@@ -7,14 +7,14 @@ using Umbraco.Cms.ManagementApi.ViewModels.Pagination;
using Umbraco.Cms.ManagementApi.ViewModels.TrackedReferences;
using Umbraco.New.Cms.Core.Models;
namespace Umbraco.Cms.ManagementApi.Controllers.TrackedReferences;
namespace Umbraco.Cms.ManagementApi.Controllers.TrackedReference;
public class DescendantsTrackedReferencesController : TrackedReferencesControllerBase
public class DescendantsTrackedReferenceController : TrackedReferenceControllerBase
{
private readonly ITrackedReferencesService _trackedReferencesSkipTakeService;
private readonly IUmbracoMapper _umbracoMapper;
public DescendantsTrackedReferencesController(ITrackedReferencesService trackedReferencesSkipTakeService, IUmbracoMapper umbracoMapper)
public DescendantsTrackedReferenceController(ITrackedReferencesService trackedReferencesSkipTakeService, IUmbracoMapper umbracoMapper)
{
_trackedReferencesSkipTakeService = trackedReferencesSkipTakeService;
_umbracoMapper = umbracoMapper;

Some files were not shown because too many files have changed in this diff Show More