From 43edca6ea95840a1f906a23cd66b69531e18e01f Mon Sep 17 00:00:00 2001 From: roguisharcanetrickster Date: Mon, 9 Mar 2026 19:55:35 +0700 Subject: [PATCH 1/2] Squash merge rat/csv_exporter into rat/csv_plugins --- src/plugins/index.js | 8 +++ .../FNAbviewcsvexporter.js} | 48 ++++++++------ .../FNAbviewcsvexporterEditor.js | 63 ++++++++++++++++++ .../web_view_csvImporter}/CSVImporter.js | 0 .../FNAbviewcsvimporter.js} | 59 ++++++++++------- .../FNAbviewcsvimporterEditor.js | 64 +++++++++++++++++++ .../Designer/editors/EditorManager.js | 4 -- .../editors/views/ABViewCSVExporter.js | 57 ----------------- .../editors/views/ABViewCSVImporter.js | 57 ----------------- .../Designer/properties/PropertyManager.js | 3 +- 10 files changed, 201 insertions(+), 162 deletions(-) rename src/{rootPages/Designer/properties/views/ABViewCSVExporter.js => plugins/web_view_csvExporter/FNAbviewcsvexporter.js} (91%) create mode 100644 src/plugins/web_view_csvExporter/FNAbviewcsvexporterEditor.js rename src/{utils => plugins/web_view_csvImporter}/CSVImporter.js (100%) rename src/{rootPages/Designer/properties/views/ABViewCSVImporter.js => plugins/web_view_csvImporter/FNAbviewcsvimporter.js} (91%) create mode 100644 src/plugins/web_view_csvImporter/FNAbviewcsvimporterEditor.js delete mode 100644 src/rootPages/Designer/editors/views/ABViewCSVExporter.js delete mode 100644 src/rootPages/Designer/editors/views/ABViewCSVImporter.js diff --git a/src/plugins/index.js b/src/plugins/index.js index 44e7aad2..0b06a5d3 100644 --- a/src/plugins/index.js +++ b/src/plugins/index.js @@ -1,3 +1,7 @@ +import CsvExporterEditor from "./web_view_csvExporter/FNAbviewcsvexporterEditor.js"; +import CsvExporterProperties from "./web_view_csvExporter/FNAbviewcsvexporter.js"; +import CsvImporterEditor from "./web_view_csvImporter/FNAbviewcsvimporterEditor.js"; +import CsvImporterProperties from "./web_view_csvImporter/FNAbviewcsvimporter.js"; import viewCarouselProperties from "./web_view_carousel/FNAbviewcarousel.js"; import viewCarouselEditor from "./web_view_carousel/FNAbviewcarouselEditor.js"; import viewCommentProperties from "./web_view_comment/FNAbviewcomment.js"; @@ -46,6 +50,10 @@ const AllPlugins = [ viewTabEditor, viewTextProperties, viewTextEditor, + CsvExporterEditor, + CsvExporterProperties, + CsvImporterEditor, + CsvImporterProperties, ]; export default { diff --git a/src/rootPages/Designer/properties/views/ABViewCSVExporter.js b/src/plugins/web_view_csvExporter/FNAbviewcsvexporter.js similarity index 91% rename from src/rootPages/Designer/properties/views/ABViewCSVExporter.js rename to src/plugins/web_view_csvExporter/FNAbviewcsvexporter.js index f37e75ab..d95c4d48 100644 --- a/src/rootPages/Designer/properties/views/ABViewCSVExporter.js +++ b/src/plugins/web_view_csvExporter/FNAbviewcsvexporter.js @@ -1,18 +1,31 @@ -/* - * ABViewCSVExporter - * A Property manager for our ABViewCSVExporter widget - */ - -import FViewClass from "./ABView"; - -export default function (AB) { +// FNAbviewcsvexporter Properties +// A properties side import for an ABView. +// +export default function FNAbviewcsvexporterProperties({ + AB, + ABViewPropertiesPlugin, + // ABUIPlugin, +}) { const BASE_ID = "properties_abview_csvexporter"; const ABViewClassProperty = FViewClass(AB); const uiConfig = AB.Config.uiSettings(); const L = ABViewClassProperty.L(); - class ABViewCSVExporterProperty extends ABViewClassProperty { + return class ABAbviewcsvexporterProperties extends ABViewPropertiesPlugin { + + static getPluginKey() { + return this.key; + } + + static getPluginType() { + return "properties-view"; + // properties-view : will display in the properties panel of the ABDesigner + } + + + + constructor(baseID) { super(baseID ?? BASE_ID, { datacollection: "", @@ -22,6 +35,7 @@ export default function (AB) { width: "", buttonFilter: "", fields: "", + dataviewID: "", }); this.AB = AB; @@ -143,9 +157,8 @@ export default function (AB) { autoheight: true, select: false, template: (item) => { - return `  ${item.label}`; + return `  ${item.label}`; }, on: { onItemClick: (id, e, node) => { @@ -192,19 +205,19 @@ export default function (AB) { $$(ids.hasHeader).setValue( view.settings.hasHeader ?? - ABViewCSVExporterPropertyComponentDefaults.hasHeader + ABViewCSVExporterPropertyComponentDefaults.hasHeader ); $$(ids.buttonLabel).setValue( view.settings.buttonLabel ?? - ABViewCSVExporterPropertyComponentDefaults.buttonLabel + ABViewCSVExporterPropertyComponentDefaults.buttonLabel ); $$(ids.filename).setValue( view.settings.filename ?? - ABViewCSVExporterPropertyComponentDefaults.filename + ABViewCSVExporterPropertyComponentDefaults.filename ); $$(ids.width).setValue( view.settings.width ?? - ABViewCSVExporterPropertyComponentDefaults.width + ABViewCSVExporterPropertyComponentDefaults.width ); this.populateFilter(); @@ -341,6 +354,5 @@ export default function (AB) { return super._ViewClass("csvExporter"); } } - - return ABViewCSVExporterProperty; } + diff --git a/src/plugins/web_view_csvExporter/FNAbviewcsvexporterEditor.js b/src/plugins/web_view_csvExporter/FNAbviewcsvexporterEditor.js new file mode 100644 index 00000000..bcf5198a --- /dev/null +++ b/src/plugins/web_view_csvExporter/FNAbviewcsvexporterEditor.js @@ -0,0 +1,63 @@ +// FNAbviewcsvexporter Editor +// An Editor wrapper for the ABView Component. +// The Editor is displayed in the ABDesigner as a view is worked on. +// The Editor allows a widget to be moved and placed on the canvas. +// +export default function FNAbviewcsvexporterEditor({ AB, ABViewEditorPlugin }) { + // var L = UIClass.L(); + // var L = ABViewContainer.L(); + + return class ABAbviewcsvexporterEditor extends ABViewEditorPlugin { + + static getPluginKey() { + return this.key; + } + + /** + * @method getPluginType + * return the plugin type for this editor. + * plugin types are how our ClassManager knows how to store + * the plugin. + * @return {string} plugin type + */ + static getPluginType() { + return "editor-view"; + // editor-view : will display in the editor panel of the ABDesigner + } + + static get key() { + return "csvExporter"; + } + + constructor(view, base = "interface_editor_csvExporter") { + // base: {string} unique base id reference + super(view, base); + } + + ui() { + return super.ui(); + } + + async init(AB) { + await super.init(AB); + + this.component.init(this.AB); + + // this.component.onShow(); + // in our editor, we provide accessLv = 2 + } + + detatch() { + this.component?.detatch?.(); + super.detatch(); + + } + + onShow() { + this.component?.onShow?.(); + super.onShow(); + } + }; + + +} diff --git a/src/utils/CSVImporter.js b/src/plugins/web_view_csvImporter/CSVImporter.js similarity index 100% rename from src/utils/CSVImporter.js rename to src/plugins/web_view_csvImporter/CSVImporter.js diff --git a/src/rootPages/Designer/properties/views/ABViewCSVImporter.js b/src/plugins/web_view_csvImporter/FNAbviewcsvimporter.js similarity index 91% rename from src/rootPages/Designer/properties/views/ABViewCSVImporter.js rename to src/plugins/web_view_csvImporter/FNAbviewcsvimporter.js index 307b2876..2c149c64 100644 --- a/src/rootPages/Designer/properties/views/ABViewCSVImporter.js +++ b/src/plugins/web_view_csvImporter/FNAbviewcsvimporter.js @@ -1,21 +1,33 @@ -/* - * ABViewCSVImporter - * A Property manager for our ABViewCSVImporter widget - */ - -import FViewClass from "./ABView"; -import ABRecordRule from "../rules/ABViewRuleListFormRecordRules"; - -let PopupRecordRule = null; - -export default function (AB) { +// FNAbviewcsvimporter Properties +// A properties side import for an ABView. +// +export default function FNAbviewcsvimporterProperties({ + AB, + ABViewPropertiesPlugin, + // ABUIPlugin, +}) { const BASE_ID = "properties_abview_csvimporter"; const ABViewClassProperty = FViewClass(AB); const uiConfig = AB.Config.uiSettings(); const L = ABViewClassProperty.L(); - class ABViewCSVImporterProperty extends ABViewClassProperty { + + + return class ABAbviewcsvimporterProperties extends ABViewPropertiesPlugin { + + static getPluginKey() { + return this.key; + } + + static getPluginType() { + return "properties-view"; + // properties-view : will display in the properties panel of the ABDesigner + } + + + + constructor(baseID) { super(baseID ?? BASE_ID, { datacollection: "", @@ -71,9 +83,8 @@ export default function (AB) { template: this.listTemplate.bind(this), type: { markCheckbox: function (item) { - return ``; + return ``; }, }, onClick: { @@ -198,7 +209,7 @@ export default function (AB) { f.selected = options.selectAll ? true : availableFields.filter((fieldId) => f.id == fieldId).length > - 0; + 0; return f; }); @@ -229,13 +240,10 @@ export default function (AB) { (v) => v.common().key == componentKey )[0]; - return `${$common.markCheckbox(field)} ${ - field.label - }
${ - formComponent ? L(formComponent.common().labelKey ?? "Label") : "" - }
`; + return `${$common.markCheckbox(field)} ${field.label + }
${formComponent ? L(formComponent.common().labelKey ?? "Label") : "" + }
`; } check(e, fieldId) { @@ -359,5 +367,8 @@ export default function (AB) { } } - return ABViewCSVImporterProperty; + + + } + diff --git a/src/plugins/web_view_csvImporter/FNAbviewcsvimporterEditor.js b/src/plugins/web_view_csvImporter/FNAbviewcsvimporterEditor.js new file mode 100644 index 00000000..7a5f3f3c --- /dev/null +++ b/src/plugins/web_view_csvImporter/FNAbviewcsvimporterEditor.js @@ -0,0 +1,64 @@ +// FNAbviewcsvimporter Editor +// An Editor wrapper for the ABView Component. +// The Editor is displayed in the ABDesigner as a view is worked on. +// The Editor allows a widget to be moved and placed on the canvas. +// +export default function FNAbviewcsvimporterEditor({ AB, ABViewEditorPlugin }) { + // var L = UIClass.L(); + // var L = ABViewContainer.L(); + +return class ABAbviewcsvimporterEditor extends ABViewEditorPlugin { + +static getPluginKey() { + return this.key; + } + +/** + * @method getPluginType + * return the plugin type for this editor. + * plugin types are how our ClassManager knows how to store + * the plugin. + * @return {string} plugin type + */ + static getPluginType() { + return "editor-view"; + // editor-view : will display in the editor panel of the ABDesigner + } + + + + + static get key() { + return "csvImporter"; + } + + constructor(view, base = "interface_editor_csvImporter") { + // base: {string} unique base id reference + + super(view, base); + } + + ui() { + return this.component.ui(); + } + + init(AB) { + this.AB = AB; + + this.component.init(this.AB); + + // this.component.onShow(); + // in our editor, we provide accessLv = 2 + } + + detatch() { + this.component?.detatch?.(); + } + + onShow() { + this.component?.onShow?.(); + } + }; + + +} diff --git a/src/rootPages/Designer/editors/EditorManager.js b/src/rootPages/Designer/editors/EditorManager.js index dde8f1de..4a575ff2 100644 --- a/src/rootPages/Designer/editors/EditorManager.js +++ b/src/rootPages/Designer/editors/EditorManager.js @@ -21,8 +21,6 @@ export default function (AB) { // require("./views/ABViewComment"), require("./views/ABViewConditionalContainer"), require("./views/ABViewContainer"), - require("./views/ABViewCSVExporter"), - require("./views/ABViewCSVImporter"), // require("./views/ABViewDataSelect"), // require("./views/ABViewDataview"), // require("./views/ABViewDetail"), @@ -32,8 +30,6 @@ export default function (AB) { require("./views/ABViewGantt"), require("./views/ABViewGrid"), require("./views/ABViewKanban"), - // require("./views/ABViewLabel"), - // require("./views/ABViewLayout"), require("./views/ABViewMenu"), require("./views/ABViewPage"), // require("./views/ABViewPDFImporter"), diff --git a/src/rootPages/Designer/editors/views/ABViewCSVExporter.js b/src/rootPages/Designer/editors/views/ABViewCSVExporter.js deleted file mode 100644 index 92e411da..00000000 --- a/src/rootPages/Designer/editors/views/ABViewCSVExporter.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * ABViewCSVExporterEditor - * The widget that displays the UI Editor Component on the screen - * when designing the UI. - */ -let myClass = null; -// {singleton} -// we will want to call this factory fn() repeatedly in our imports, -// but we only want to define 1 Class reference. - -import UI_Class from "../../ui_class"; - -export default function (AB) { - if (!myClass) { - const UIClass = UI_Class(AB); - // var L = UIClass.L(); - // var L = ABViewContainer.L(); - - myClass = class ABViewCSVExporterEditor extends UIClass { - static get key() { - return "csvExporter"; - } - - constructor(view, base = "interface_editor_csvExporter") { - // base: {string} unique base id reference - - super(view, base); - - this.view = view; - this.component = this.view.component(); - } - - ui() { - return this.component.ui(); - } - - init(AB) { - this.AB = AB; - - this.component.init(this.AB); - - // this.component.onShow(); - // in our editor, we provide accessLv = 2 - } - - detatch() { - this.component?.detatch?.(); - } - - onShow() { - this.component?.onShow?.(); - } - }; - } - - return myClass; -} diff --git a/src/rootPages/Designer/editors/views/ABViewCSVImporter.js b/src/rootPages/Designer/editors/views/ABViewCSVImporter.js deleted file mode 100644 index 8d0a0662..00000000 --- a/src/rootPages/Designer/editors/views/ABViewCSVImporter.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * ABViewCSVImporterEditor - * The widget that displays the UI Editor Component on the screen - * when designing the UI. - */ -let myClass = null; -// {singleton} -// we will want to call this factory fn() repeatedly in our imports, -// but we only want to define 1 Class reference. - -import UI_Class from "../../ui_class"; - -export default function (AB) { - if (!myClass) { - const UIClass = UI_Class(AB); - // var L = UIClass.L(); - // var L = ABViewContainer.L(); - - myClass = class ABViewCSVImporterEditor extends UIClass { - static get key() { - return "csvImporter"; - } - - constructor(view, base = "interface_editor_csvImporter") { - // base: {string} unique base id reference - - super(view, base); - - this.view = view; - this.component = this.view.component(); - } - - ui() { - return this.component.ui(); - } - - init(AB) { - this.AB = AB; - - this.component.init(this.AB); - - // this.component.onShow(); - // in our editor, we provide accessLv = 2 - } - - detatch() { - this.component?.detatch?.(); - } - - onShow() { - this.component?.onShow?.(); - } - }; - } - - return myClass; -} diff --git a/src/rootPages/Designer/properties/PropertyManager.js b/src/rootPages/Designer/properties/PropertyManager.js index 452280d1..dd317c55 100644 --- a/src/rootPages/Designer/properties/PropertyManager.js +++ b/src/rootPages/Designer/properties/PropertyManager.js @@ -79,8 +79,7 @@ export default function (AB) { // require("./views/ABViewComment"), require("./views/ABViewConditionalContainer"), require("./views/ABViewContainer"), - require("./views/ABViewCSVExporter"), - require("./views/ABViewCSVImporter"), + // // require("./views/ABViewCSVImporter"), require("./views/ABViewDataFilter"), // require("./views/ABViewDataSelect"), // require("./views/ABViewDataview"), From ee66dd31ac44bd87171eb22e9815fde0e84ebc11 Mon Sep 17 00:00:00 2001 From: roguisharcanetrickster Date: Thu, 12 Mar 2026 14:09:51 +0700 Subject: [PATCH 2/2] move FieldTypeTool and point tests at new plugin --- .github/workflows/e2e-test.yml | 12 +++++----- .../FNAbviewcsvexporter.js | 4 ++-- .../FNAbviewcsvimporter.js | 11 +++++---- .../web_view_csvImporter/FieldTypeTool.js | 23 +++++++++++++++++++ .../ui_work_object_workspace_popupImport.js | 10 ++++---- .../ui_work_object_list_newObject_csv.js | 2 +- .../Designer/ui_work_object_workspace.js | 8 +++---- test/utils/CSVImporter.test.js | 2 +- 8 files changed, 49 insertions(+), 23 deletions(-) create mode 100644 src/plugins/web_view_csvImporter/FieldTypeTool.js rename src/{rootPages/Designer => plugins/web_view_csvImporter}/ui_work_object_workspace_popupImport.js (83%) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index f452cebe..e3e84e53 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -30,19 +30,19 @@ jobs: - branch: master webpack: update steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: path: plugins/plugin_ABDesigner ref: ${{ inputs.ref }} - name: Generate a token id: generate-token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@v3 with: app-id: ${{ inputs.app_id }} private-key: ${{ secrets.app_secret }} repositories: ab_service_web - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: path: web repository: CruGlobal/ab_service_web @@ -64,7 +64,7 @@ jobs: repository: CruGlobal/ab_service_web - name: Check out kitchen-sink tests - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: repository: CruGlobal/kitchensink_app path: ab/test/e2e/cypress/e2e/kitchensink_app @@ -87,13 +87,13 @@ jobs: run: npm run test:e2e:ab-designer -- --browser chrome working-directory: ./ab - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: failure() with: name: cypress-screenshots path: ./ab/test/e2e/cypress/screenshots - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: failure() with: name: ABServices.log diff --git a/src/plugins/web_view_csvExporter/FNAbviewcsvexporter.js b/src/plugins/web_view_csvExporter/FNAbviewcsvexporter.js index d95c4d48..20a80d70 100644 --- a/src/plugins/web_view_csvExporter/FNAbviewcsvexporter.js +++ b/src/plugins/web_view_csvExporter/FNAbviewcsvexporter.js @@ -8,9 +8,9 @@ export default function FNAbviewcsvexporterProperties({ }) { const BASE_ID = "properties_abview_csvexporter"; - const ABViewClassProperty = FViewClass(AB); const uiConfig = AB.Config.uiSettings(); - const L = ABViewClassProperty.L(); + const L = AB.Label(); + return class ABAbviewcsvexporterProperties extends ABViewPropertiesPlugin { diff --git a/src/plugins/web_view_csvImporter/FNAbviewcsvimporter.js b/src/plugins/web_view_csvImporter/FNAbviewcsvimporter.js index 2c149c64..56003fe3 100644 --- a/src/plugins/web_view_csvImporter/FNAbviewcsvimporter.js +++ b/src/plugins/web_view_csvImporter/FNAbviewcsvimporter.js @@ -1,6 +1,8 @@ // FNAbviewcsvimporter Properties // A properties side import for an ABView. // +import FABViewRuleListFormRecordRules from "../../rootPages/Designer/properties/rules/ABViewRuleListFormRecordRules.js"; + export default function FNAbviewcsvimporterProperties({ AB, ABViewPropertiesPlugin, @@ -8,10 +10,13 @@ export default function FNAbviewcsvimporterProperties({ }) { const BASE_ID = "properties_abview_csvimporter"; - const ABViewClassProperty = FViewClass(AB); const uiConfig = AB.Config.uiSettings(); - const L = ABViewClassProperty.L(); + const L = AB.Label(); + const PopupRecordRule = FABViewRuleListFormRecordRules( + AB, + `${BASE_ID}_popupRecordRule` + ); return class ABAbviewcsvimporterProperties extends ABViewPropertiesPlugin { @@ -46,8 +51,6 @@ export default function FNAbviewcsvimporterProperties({ ui() { const ids = this.ids; - PopupRecordRule = ABRecordRule(this.AB, this.base); - // PopupRecordRule.component(`${this.base}_recordrule`); return super.ui([ { diff --git a/src/plugins/web_view_csvImporter/FieldTypeTool.js b/src/plugins/web_view_csvImporter/FieldTypeTool.js new file mode 100644 index 00000000..ea374473 --- /dev/null +++ b/src/plugins/web_view_csvImporter/FieldTypeTool.js @@ -0,0 +1,23 @@ +module.exports = class FieldTypeTool { + static getFieldType(value) { + if (value === null || value === undefined || value === "") { + return "string"; + } else if ( + value == 0 || + value == 1 || + value == true || + value == false || + value == "checked" || + value == "unchecked" + ) { + return "boolean"; + } else if (!isNaN(value)) { + return "number"; + } else if (Date.parse(value)) { + return "date"; + } else { + if (value.length > 100) return "LongText"; + else return "string"; + } + } +}; diff --git a/src/rootPages/Designer/ui_work_object_workspace_popupImport.js b/src/plugins/web_view_csvImporter/ui_work_object_workspace_popupImport.js similarity index 83% rename from src/rootPages/Designer/ui_work_object_workspace_popupImport.js rename to src/plugins/web_view_csvImporter/ui_work_object_workspace_popupImport.js index 842d28ee..6d026620 100644 --- a/src/rootPages/Designer/ui_work_object_workspace_popupImport.js +++ b/src/plugins/web_view_csvImporter/ui_work_object_workspace_popupImport.js @@ -4,15 +4,15 @@ * Manage the Import CSV data to our currently selected ABObject. * */ -import UI_Class from "./ui_class"; -import FViewProperties from "./properties/views/ABViewCSVImporter"; + +import UI_Class from "../../rootPages/Designer/ui_class"; +import FNAbviewcsvimporterProperties from "./FNAbviewcsvimporter.js"; export default function (AB, ibase) { ibase = ibase || "ui_work_object_workspace_popupImport"; const UIClass = UI_Class(AB); - // var L = UIClass.L(); - const ViewProperties = FViewProperties(AB); - const viewProperties = new ViewProperties(); + const ViewPropertiesClass = FNAbviewcsvimporterProperties(AB.pluginAPI()); + const viewProperties = new ViewPropertiesClass(); class UI_Work_Object_Workspace_PopupImport extends UIClass { constructor(base) { diff --git a/src/rootPages/Designer/ui_work_object_list_newObject_csv.js b/src/rootPages/Designer/ui_work_object_list_newObject_csv.js index c8b3cf69..93ff3db2 100644 --- a/src/rootPages/Designer/ui_work_object_list_newObject_csv.js +++ b/src/rootPages/Designer/ui_work_object_list_newObject_csv.js @@ -5,7 +5,7 @@ * */ import UI_Class from "./ui_class"; -import CSVImporter from "../../utils/CSVImporter.js"; +import CSVImporter from "../../plugins/web_view_csvImporter/CSVImporter.js"; export default function (AB) { const UIClass = UI_Class(AB); diff --git a/src/rootPages/Designer/ui_work_object_workspace.js b/src/rootPages/Designer/ui_work_object_workspace.js index 9513c00c..d6315b82 100644 --- a/src/rootPages/Designer/ui_work_object_workspace.js +++ b/src/rootPages/Designer/ui_work_object_workspace.js @@ -17,7 +17,7 @@ import FPopupExport from "./ui_work_object_workspace_popupExport"; import FPopupFrozenColumns from "./ui_work_object_workspace_popupFrozenColumns"; import FPopupHeaderEditMenu from "./ui_work_object_workspace_popupHeaderEditMenu"; import FPopupHideFields from "./ui_work_object_workspace_popupHideFields"; -import FPopupImport from "./ui_work_object_workspace_popupImport"; +import FPopupImport from "../../plugins/web_view_csvImporter/ui_work_object_workspace_popupImport.js"; import FPopupNewDataField from "./ui_work_object_workspace_popupNewDataField"; import FPopupSortField from "./ui_work_object_workspace_popupSortFields"; import FPopupViewSettings from "./ui_work_object_workspace_popupViewSettings"; @@ -238,9 +238,9 @@ export default function (AB, ibase, init_settings) { AB, `${base}_import` ); - // this.PopupImportObjectComponent.on("done", () => { - // this.populateObjectWorkspace(this.CurrentObject); - // }); + this.PopupImportObjectComponent.on("done", () => { + this.populateObjectWorkspace(this.CurrentObject); + }); this.PopupViewSettingsComponent = FPopupViewSettings( AB, diff --git a/test/utils/CSVImporter.test.js b/test/utils/CSVImporter.test.js index 4c1c4dc5..e2b7358c 100644 --- a/test/utils/CSVImporter.test.js +++ b/test/utils/CSVImporter.test.js @@ -3,7 +3,7 @@ import assert from "assert"; import sinon from "sinon"; import AB from "../_mock/AB.js"; -import CSVImporter from "../../src/utils/CSVImporter.js"; +import CSVImporter from "../../src/plugins/web_view_csvImporter/CSVImporter.js"; function getMockAB() { return new AB();