From 182661aaa057158608235cf8e4a36f328e5dab1c Mon Sep 17 00:00:00 2001 From: JPMeehan Date: Thu, 9 Nov 2023 12:04:06 -0800 Subject: [PATCH 1/2] Class Rename --- src/foundry/client/apps/forms/index.d.ts | 2 +- .../apps/forms/{permission.d.ts => ownership.d.ts} | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) rename src/foundry/client/apps/forms/{permission.d.ts => ownership.d.ts} (79%) diff --git a/src/foundry/client/apps/forms/index.d.ts b/src/foundry/client/apps/forms/index.d.ts index 975c65b1e..d87e834de 100644 --- a/src/foundry/client/apps/forms/index.d.ts +++ b/src/foundry/client/apps/forms/index.d.ts @@ -11,7 +11,7 @@ import "./item"; import "./journal-sheet"; import "./macro-config"; import "./measure-template"; -import "./permission"; +import "./ownership"; import "./playlist-config"; import "./playlist-sound-config"; import "./roll-table-config"; diff --git a/src/foundry/client/apps/forms/permission.d.ts b/src/foundry/client/apps/forms/ownership.d.ts similarity index 79% rename from src/foundry/client/apps/forms/permission.d.ts rename to src/foundry/client/apps/forms/ownership.d.ts index 74dcd9ad4..fa6036dbf 100644 --- a/src/foundry/client/apps/forms/permission.d.ts +++ b/src/foundry/client/apps/forms/ownership.d.ts @@ -5,7 +5,7 @@ declare global { * @typeParam Options - the type of the options object * @typeParam ConcreteDocument - the type of the Document which should be managed by this form sheet */ - class PermissionControl< + class DocumentOwnershipConfig< Options extends DocumentSheetOptions, ConcreteDocument extends foundry.abstract.Document = foundry.abstract.Document, > extends DocumentSheet { @@ -14,7 +14,7 @@ declare global { * ```typescript * foundry.utils.mergeObject(super.defaultOptions, { * id: "permission", - * template: "templates/apps/permission.html", + * template: "templates/apps/ownership.html", * width: 400 * }) * ``` @@ -25,10 +25,12 @@ declare global { override getData(options?: Partial | undefined): MaybePromise; - protected override _updateObject(event: Event, formData: PermissionControl.FormData): Promise; + protected override _updateObject(event: Event, formData: DocumentOwnershipConfig.FormData): Promise; } - namespace PermissionControl { + class PermissionControl extends DocumentOwnershipConfig {} + + namespace DocumentOwnershipConfig { interface FormData { [userId: string]: FormData.InputPermissionLevel; default: FormData.InputPermissionLevel; From a168e4b58647d7a007af25066c1ecbf001e18141 Mon Sep 17 00:00:00 2001 From: JPMeehan Date: Thu, 9 Nov 2023 13:41:46 -0800 Subject: [PATCH 2/2] Deprecation message --- src/foundry/client/apps/forms/ownership.d.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/foundry/client/apps/forms/ownership.d.ts b/src/foundry/client/apps/forms/ownership.d.ts index fa6036dbf..bba49ddf4 100644 --- a/src/foundry/client/apps/forms/ownership.d.ts +++ b/src/foundry/client/apps/forms/ownership.d.ts @@ -28,6 +28,9 @@ declare global { protected override _updateObject(event: Event, formData: DocumentOwnershipConfig.FormData): Promise; } + /** + * @deprecated since v10. + */ class PermissionControl extends DocumentOwnershipConfig {} namespace DocumentOwnershipConfig {