diff --git a/package-lock.json b/package-lock.json index 623b2bc..57fdfee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "abdesigner", - "version": "1.12.1", + "version": "1.13.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "abdesigner", - "version": "1.12.1", + "version": "1.13.0", "license": "ISC", "dependencies": { "@codemirror/lang-javascript": "^6.2.3", diff --git a/src/plugins/web_view_tab/FNAbviewtabEditor.js b/src/plugins/web_view_tab/FNAbviewtabEditor.js index 47858f6..f2bd4fb 100644 --- a/src/plugins/web_view_tab/FNAbviewtabEditor.js +++ b/src/plugins/web_view_tab/FNAbviewtabEditor.js @@ -41,13 +41,9 @@ export default function FNAbviewtabEditor({ AB, ABViewEditorPlugin }) { constructor(view, base = BASE_ID) { // base: {string} unique base id reference - super(base, { + super(view, base, { view: "", }); - - this.AB = AB; - this.view = view; - this.component = this.view.component(); } ui() { diff --git a/src/rootPages/Designer/editors/views/ABViewContainer.js b/src/rootPages/Designer/editors/views/ABViewContainer.js index 15c5371..7ff5bb6 100644 --- a/src/rootPages/Designer/editors/views/ABViewContainer.js +++ b/src/rootPages/Designer/editors/views/ABViewContainer.js @@ -64,7 +64,7 @@ export default function (AB) { ui() { let key = ABViewContainerEditor.key; let Defaults = - AB.Class.ABViewManager.viewClass(key).defaultValues(); + AB.ClassManager.viewClass(key).defaultValues(); return { _dashboardID: this.ids.component, rows: [ diff --git a/src/rootPages/Designer/editors/views/ABViewMenu.js b/src/rootPages/Designer/editors/views/ABViewMenu.js index c70c928..837103a 100644 --- a/src/rootPages/Designer/editors/views/ABViewMenu.js +++ b/src/rootPages/Designer/editors/views/ABViewMenu.js @@ -33,10 +33,19 @@ export default function (AB) { ui() { const menu = this.component.ui(); + // NOTE: we want our editors to have a { layout .rows[0]=component } structure + // the menu already has a layout around it, so just use that one + // and prepare it for the ABDesigner editor format: + menu._dashboardID = this.component.ids.menu; + + return menu; + /* return { + _dashboardID: this.component.ids.menu, type: "space", rows: [menu, {}], }; + */ } init(AB) { diff --git a/src/rootPages/Designer/properties/mobile/ABMobileViewForm.js b/src/rootPages/Designer/properties/mobile/ABMobileViewForm.js index 5ab6cda..6b17253 100644 --- a/src/rootPages/Designer/properties/mobile/ABMobileViewForm.js +++ b/src/rootPages/Designer/properties/mobile/ABMobileViewForm.js @@ -589,7 +589,7 @@ export default function (AB) { refreshDefaultButton() { const ids = this.ids; const ABViewFormButton = - this.AB.Class.ABViewManager.viewClass("button"); + this.AB.ClassManager.viewClass("button"); // If default button is not exists, then skip this let defaultButton = this.views( diff --git a/src/rootPages/Designer/properties/views/ABViewConditionalContainer.js b/src/rootPages/Designer/properties/views/ABViewConditionalContainer.js index c5f5afa..513ec7f 100644 --- a/src/rootPages/Designer/properties/views/ABViewConditionalContainer.js +++ b/src/rootPages/Designer/properties/views/ABViewConditionalContainer.js @@ -22,7 +22,7 @@ export default function (AB) { }); this.AB = AB; - ABViewPropertyDefaults = this.AB.Class.ABViewManager.viewClass( + ABViewPropertyDefaults = this.AB.ClassManager.viewClass( "conditionalcontainer" ).defaultValues(); } diff --git a/src/rootPages/Designer/properties/views/ABViewDataview.js b/src/rootPages/Designer/properties/views/ABViewDataview.js index 2475dca..13bc88f 100644 --- a/src/rootPages/Designer/properties/views/ABViewDataview.js +++ b/src/rootPages/Designer/properties/views/ABViewDataview.js @@ -25,7 +25,7 @@ export default function (AB) { this.AB = AB; ABViewDataviewPropertyComponentDefaults = - this.AB.Class.ABViewManager.viewClass("dataview").defaultValues(); + this.AB.ClassManager.viewClass("dataview").defaultValues(); this.linkPageComponent = new LinkPageProperty(AB, base); } diff --git a/src/rootPages/Designer/properties/views/ABViewDetail.js b/src/rootPages/Designer/properties/views/ABViewDetail.js index de3f62d..f7c746a 100644 --- a/src/rootPages/Designer/properties/views/ABViewDetail.js +++ b/src/rootPages/Designer/properties/views/ABViewDetail.js @@ -34,7 +34,7 @@ export default function (AB) { this.AB = AB; ABViewDetailPropertyComponentDefaults = - this.AB.Class.ABViewManager.viewClass("detail").defaultValues(); + this.AB.ClassManager.viewClass("detail").defaultValues(); } static get key() { diff --git a/src/rootPages/Designer/properties/views/ABViewDocxBuilder.js b/src/rootPages/Designer/properties/views/ABViewDocxBuilder.js index a9046cc..8a1487e 100644 --- a/src/rootPages/Designer/properties/views/ABViewDocxBuilder.js +++ b/src/rootPages/Designer/properties/views/ABViewDocxBuilder.js @@ -30,7 +30,7 @@ export default function (AB) { this.AB = AB; ABViewDocxBuilderPropertyComponentDefaults = - this.AB.Class.ABViewManager.viewClass( + this.AB.ClassManager.viewClass( "docxBuilder" ).defaultValues(); } diff --git a/src/rootPages/Designer/properties/views/ABViewForm.js b/src/rootPages/Designer/properties/views/ABViewForm.js index 989d870..c4a8481 100644 --- a/src/rootPages/Designer/properties/views/ABViewForm.js +++ b/src/rootPages/Designer/properties/views/ABViewForm.js @@ -47,7 +47,7 @@ export default function (AB) { this.AB = AB; ABViewFormPropertyComponentDefaults = - this.AB.Class.ABViewManager.viewClass("form").defaultValues(); + this.AB.ClassManager.viewClass("form").defaultValues(); } static get key() { @@ -600,7 +600,7 @@ export default function (AB) { refreshDefaultButton() { const ids = this.ids; const ABViewFormButton = - this.AB.Class.ABViewManager.viewClass("button"); + this.AB.ClassManager.viewClass("button"); // If default button is not exists, then skip this let defaultButton = this.views( diff --git a/src/rootPages/Designer/properties/views/ABViewMenu.js b/src/rootPages/Designer/properties/views/ABViewMenu.js index 9716c63..216626d 100644 --- a/src/rootPages/Designer/properties/views/ABViewMenu.js +++ b/src/rootPages/Designer/properties/views/ABViewMenu.js @@ -35,7 +35,7 @@ export default function (AB) { this.AB = AB; ABViewMenuPropertyComponentDefaults = - this.AB.Class.ABViewManager.viewClass("menu").defaultValues(); + this.AB.ClassManager.viewClass("menu").defaultValues(); } static get key() { @@ -775,7 +775,9 @@ export default function (AB) { }); // add tabs - const ABViewTab = this.AB.Class.ABViewManager.viewClass("tab"); + // ABViewManager.viewClass() is depreciated. Use ClassManager.viewClass() instead. + //const ABViewTab = this.AB.Class.ABViewManager.viewClass("tab"); + const ABViewTab = this.AB.ClassManager.viewClass("tab"); page .views((v) => v instanceof ABViewTab) .forEach((tab, tabIndex) => { diff --git a/src/rootPages/Designer/ui_work_interface_workspace.js b/src/rootPages/Designer/ui_work_interface_workspace.js index 03743b8..5c36324 100644 --- a/src/rootPages/Designer/ui_work_interface_workspace.js +++ b/src/rootPages/Designer/ui_work_interface_workspace.js @@ -29,7 +29,7 @@ export default function (AB) { this.ColumnEditor = ABWorkspaceEditor(AB); this.ColumnDetails = ABWorkspaceDetails(AB); - this.classABViewPage = AB.Class.ABViewManager.viewClass("page"); + this.classABViewPage = AB.ClassManager.viewClass("page"); } // webix UI definition: