Skip to content

Commit 6d5271f

Browse files
committed
Merge branch 'main' into v17/dev
2 parents f8ec2da + a5f9bba commit 6d5271f

35 files changed

+819
-189
lines changed

src/Umbraco.Core/Services/DictionaryItemService.cs

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,25 @@ public async Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>> Creat
159159
/// <inheritdoc />
160160
public async Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>> UpdateAsync(
161161
IDictionaryItem dictionaryItem, Guid userKey)
162-
=> await SaveAsync(
162+
{
163+
// Create and update dates aren't tracked for dictionary items. They exist on IDictionaryItem due to the
164+
// inheritance from IEntity, but we don't store them.
165+
// However we have logic in ServerEventSender that will provide SignalR events for created and update operations,
166+
// where these dates are used to distinguish between the two (whether or not the entity has an identity cannot
167+
// be used here, as these events fire after persistence when the identity is known for both creates and updates).
168+
// So ensure we set something that can be distinguished here.
169+
if (dictionaryItem.CreateDate == default)
170+
{
171+
dictionaryItem.CreateDate = DateTime.MinValue;
172+
}
173+
174+
if (dictionaryItem.UpdateDate == default)
175+
{
176+
// TODO (V17): To align with updates of system dates, this needs to change to DateTime.UtcNow.
177+
dictionaryItem.UpdateDate = DateTime.Now;
178+
}
179+
180+
return await SaveAsync(
163181
dictionaryItem,
164182
() =>
165183
{
@@ -174,6 +192,7 @@ public async Task<Attempt<IDictionaryItem, DictionaryItemOperationStatus>> Updat
174192
AuditType.Save,
175193
"Update DictionaryItem",
176194
userKey);
195+
}
177196

178197
/// <inheritdoc />
179198
public async Task<Attempt<IDictionaryItem?, DictionaryItemOperationStatus>> DeleteAsync(Guid id, Guid userKey)

src/Umbraco.Web.UI.Client/package-lock.json

Lines changed: 128 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Umbraco.Web.UI.Client/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
"./lit-element": "./dist-cms/packages/core/lit-element/index.js",
6161
"./localization": "./dist-cms/packages/core/localization/index.js",
6262
"./log-viewer": "./dist-cms/packages/log-viewer/index.js",
63+
"./management-api": "./dist-cms/packages/management-api/index.js",
6364
"./markdown-editor": "./dist-cms/packages/markdown-editor/index.js",
6465
"./media-type": "./dist-cms/packages/media/media-types/index.js",
6566
"./media": "./dist-cms/packages/media/media/index.js",
@@ -126,6 +127,7 @@
126127
"./external/monaco-editor": "./dist-cms/external/monaco-editor/index.js",
127128
"./external/openid": "./dist-cms/external/openid/index.js",
128129
"./external/rxjs": "./dist-cms/external/rxjs/index.js",
130+
"./external/signalr": "./dist-cms/external/signalr/index.js",
129131
"./external/tiptap": "./dist-cms/external/tiptap/index.js",
130132
"./external/uui": "./dist-cms/external/uui/index.js"
131133
},

src/Umbraco.Web.UI.Client/src/apps/backoffice/backoffice.element.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const CORE_PACKAGES = [
1515
import('../../packages/block/umbraco-package.js'),
1616
import('../../packages/clipboard/umbraco-package.js'),
1717
import('../../packages/code-editor/umbraco-package.js'),
18+
import('../../packages/content/umbraco-package.js'),
1819
import('../../packages/data-type/umbraco-package.js'),
1920
import('../../packages/dictionary/umbraco-package.js'),
2021
import('../../packages/documents/umbraco-package.js'),
@@ -24,6 +25,7 @@ const CORE_PACKAGES = [
2425
import('../../packages/help/umbraco-package.js'),
2526
import('../../packages/language/umbraco-package.js'),
2627
import('../../packages/log-viewer/umbraco-package.js'),
28+
import('../../packages/management-api/umbraco-package.js'),
2729
import('../../packages/markdown-editor/umbraco-package.js'),
2830
import('../../packages/media/umbraco-package.js'),
2931
import('../../packages/members/umbraco-package.js'),
@@ -48,7 +50,6 @@ const CORE_PACKAGES = [
4850
import('../../packages/umbraco-news/umbraco-package.js'),
4951
import('../../packages/user/umbraco-package.js'),
5052
import('../../packages/webhook/umbraco-package.js'),
51-
import('../../packages/content/umbraco-package.js'),
5253
];
5354

5455
@customElement('umb-backoffice')
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from '@microsoft/signalr';
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"name": "@umbraco-backoffice/signalr",
3+
"private": true,
4+
"type": "module",
5+
"scripts": {
6+
"build": "vite build"
7+
},
8+
"dependencies": {
9+
"@microsoft/signalr": "9.0.6"
10+
}
11+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig } from 'vite';
2+
import { rmSync } from 'fs';
3+
import { getDefaultConfig } from '../../vite-config-base';
4+
5+
const dist = '../../../dist-cms/external/signalr';
6+
7+
// delete the unbundled dist folder
8+
rmSync(dist, { recursive: true, force: true });
9+
10+
export default defineConfig({
11+
...getDefaultConfig({
12+
dist,
13+
base: '/umbraco/backoffice/external/signalr',
14+
entry: {
15+
index: './index.ts',
16+
},
17+
}),
18+
});

0 commit comments

Comments
 (0)