WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 6f28b31

Browse files
committed
Deprecated collapsible panel.
Removing the collapsible panel widget from the "Add widget" dialog, keeping all the bindings to keep it live for existing customers.
1 parent 597aca9 commit 6f28b31

File tree

2 files changed

+2
-18
lines changed

2 files changed

+2
-18
lines changed

src/collapsible-panel/collapsiblePanelHandlers.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,6 @@ export class CollapsiblePanelHandlers implements IWidgetHandler<CollapsiblePanel
1616
return !["section", "row", "column", "collapsiblePanel"].includes(dragSession.sourceBinding.name);
1717
}
1818

19-
public async getWidgetOrder(): Promise<IWidgetOrder<CollapsiblePanelModel>> {
20-
const widgetOrder: IWidgetOrder<CollapsiblePanelModel> = {
21-
name: "collapsiblePanel",
22-
displayName: "Collapsible panel",
23-
iconClass: "widget-icon widget-icon-collapsible-panel",
24-
requires: ["html", "js"],
25-
createModel: async () => {
26-
const model = new CollapsiblePanelModel();
27-
model.version = "1.1.0";
28-
return model;
29-
}
30-
};
31-
32-
return widgetOrder;
33-
}
34-
3519
public getContextCommands(context: WidgetContext): IContextCommandSet {
3620
const gridCellContextualEditor: IContextCommandSet = {
3721
color: "#9C27B0",

src/collapsible-panel/collapsiblePanelModelBinder.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { CollapsiblePanelContract } from "./collapsiblePanelContract";
55
import { CollapsiblePanelModel } from "./collapsiblePanelModel";
66

77

8-
export class CollapsiblePanelModelBinder extends CollectionModelBinder implements IModelBinder<CollapsiblePanelModel> {
8+
export class CollapsiblePanelModelBinder extends CollectionModelBinder implements IModelBinder<CollapsiblePanelModel> {
99
constructor(
1010
protected readonly widgetService: IWidgetService,
1111
protected modelBinderSelector: ModelBinderSelector
@@ -23,7 +23,7 @@ export class CollapsiblePanelModelBinder extends CollectionModelBinder implement
2323

2424
public async contractToModel(contract: CollapsiblePanelContract, bindingContext?: Bag<any>): Promise<CollapsiblePanelModel> {
2525
const model = new CollapsiblePanelModel();
26-
model.styles = contract.styles;
26+
model.styles = contract.styles || {};
2727
model.widgets = await this.getChildModels(contract.nodes, bindingContext);
2828
return model;
2929
}

0 commit comments

Comments
 (0)