Skip to content

Commit

Permalink
Migrated csv and csvim editors, fixed git and projects tree initializ…
Browse files Browse the repository at this point in the history
…ation

Signed-off-by: StanZGenchev <stan.z.genchev@gmail.com>
  • Loading branch information
StanZGenchev committed Jan 15, 2025
1 parent 11ecb51 commit b12cbb5
Show file tree
Hide file tree
Showing 81 changed files with 1,447 additions and 192 deletions.
8 changes: 6 additions & 2 deletions components/group/group-platform-ide/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,15 @@
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-designer</artifactId>
<artifactId>dirigible-components-editor-entity</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-entity</artifactId>
<artifactId>dirigible-components-editor-csv</artifactId>
</dependency>
<dependency>
<groupId>org.eclipse.dirigible</groupId>
<artifactId>dirigible-components-editor-csvim</artifactId>
</dependency>

<dependency>
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,42 +24,37 @@
<theme></theme>
<script type="text/javascript" src="/services/js/resources-core/services/loader.js?id=ide-editor-js">
</script>
<link type="text/css" rel="stylesheet"
href="/services/js/resources-core/services/loader.js?id=ide-editor-css" />
<script type="text/javascript" src="js/papaparse.min.js"></script>
<script type="text/javascript" src="js/ag-grid-community.min.noStyle.js"></script>
<link type="text/css" rel="stylesheet" href="/services/js/resources-core/services/loader.js?id=ide-editor-css" />
<script type="text/javascript" src="/webjars/papaparse/5.3.2/papaparse.min.js"></script>
<script type="text/javascript" src="/webjars/ag-grid-community__all-modules/27.1.0/dist/ag-grid-community.min.noStyle.js"></script>
<script type="text/javascript" src="js/editor.js"></script>
<link type="text/css" rel="stylesheet" href="css/csv.css" />
<link type="text/css" rel="stylesheet" href="css/ag-grid.min.css" />
<link type="text/css" rel="stylesheet" href="css/ag-theme-alpine.min.css" />
<link type="text/css" rel="stylesheet" href="/webjars/ag-grid-community__all-modules/27.1.0/dist/styles/ag-grid.min.css" />
<link type="text/css" rel="stylesheet" href="/webjars/ag-grid-community__all-modules/27.1.0/dist/styles/ag-theme-alpine.min.css" />
</head>

<body class="dg-vbox" ng-mousedown="handleClick($event)" dg-contextmenu="contextMenuContent" dg-shortcut="'ctrl+s'"
dg-shortcut-action="save">
<body class="dg-vbox" ng-mousedown="handleClick($event)" dg-contextmenu="contextMenuContent" dg-shortcut="'ctrl+s'" dg-shortcut-action="save">
<fd-busy-indicator-extended class="dg-fill-parent" ng-hide="state.error || !state.isBusy" dg-size="l">
{{state.busyText}}
</fd-busy-indicator-extended>
<fd-toolbar ng-show="!state.error && !state.isBusy">
<fd-toolbar-spacer></fd-toolbar-spacer>
<fd-input type="search" placeholder="Search..." ng-model="search.text" ng-change="searchCsv()"
style="max-width:30%;"></fd-input>
<fd-input type="search" placeholder="Search..." ng-model="search.text" ng-change="searchCsv()" style="max-width:30%;"></fd-input>
<fd-toolbar-separator></fd-toolbar-separator>
<fd-button glyph="sap-icon--save" dg-label="Save" dg-type="transparent" ng-click="save()">
</fd-button>
<fd-button glyph="sap-icon--download" dg-label="Export" dg-type="transparent" ng-click="downloadCsv()">
</fd-button>
<fd-toolbar-separator></fd-toolbar-separator>
<fd-toolbar-overflow>
<fd-button glyph="sap-icon--add" is-overflow="true" dg-type="transparent" ng-click="addRow()"
dg-label="Add row"></fd-button>
<fd-button glyph="sap-icon--add" is-overflow="true" dg-type="transparent" ng-click="addRow()" dg-label="Add row"></fd-button>
<fd-toolbar-separator></fd-toolbar-separator>
<fd-checkbox id="csvHeader" ng-model="papaConfig.header" ng-change="hasHeader()">
</fd-checkbox>
<fd-checkbox-label for="csvHeader">Has header</fd-checkbox-label>
</fd-toolbar-overflow>
</fd-toolbar>
<div class="dg-fill-parent ag-grid-editor ag-theme-alpine" ag-grid="gridOptions"
ng-show="!state.error && !state.isBusy"></div>
<div class="dg-fill-parent ag-grid-editor ag-theme-alpine" ag-grid="gridOptions" ng-show="!state.error && !state.isBusy"></div>
<div class="dg-full-width dg-border-top" ng-show="!state.error && !state.isBusy">
<p class="fd-text fd-margin--tiny">Data rows: {{rowsCount}}</p>
</div>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ csvView.controller('CsvViewController', function ($scope, $window, messageHub, w
messageHub.setEditorDirty($scope.dataParameters.file, false);
$scope.$apply(function () {
$scope.state.isBusy = false;
$scope.isFileChanged = false;
isFileChanged = false;
});
} else {
messageHub.setStatusError(`Error saving '${$scope.dataParameters.file}'`);
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<relativePath>../../pom.xml</relativePath>
</parent>

<name>Components - IDE - Designer - Editor</name>
<artifactId>dirigible-components-editor-designer</artifactId>
<name>Components - IDE - CSV - Editor</name>
<artifactId>dirigible-components-editor-csv</artifactId>
<packaging>jar</packaging>

<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
* SPDX-License-Identifier: EPL-2.0
*/
const editorData = {
id: 'designerEditor',
label: 'Designer Editor',
id: 'csv-editor',
region: 'center',
path: '/services/web/editor-designer/designer/index.html',
contentTypes: ['application/dirigible-designer'],
label: 'CSV Editor',
path: '/services/web/editor-csv/editor.html',
contentTypes: ['text/csv'],
};
if (typeof exports !== 'undefined') {
exports.getEditor = () => editorData;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Copyright (c) 2010-2024 Eclipse Dirigible contributors
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* SPDX-FileCopyrightText: Eclipse Dirigible contributors
* SPDX-License-Identifier: EPL-2.0
*/
:root {
--ag-background-color: var(--sapList_Background, #fff);
--ag-border-color: var(--sapGroup_TitleBorderColor, #d9d9d9);
--ag-input-focus-border-color: var(--sapField_Focus_BorderColor, #303030);
--ag-row-hover-color: var(--sapList_Hover_Background, #f2f2f2);
--ag-selected-row-background-color: var(--sapList_SelectionBackgroundColor, #fff7d9);
--ag-header-background-color: var(--sapList_HeaderBackground, #f7f7f7);
--ag-odd-row-background-color: var(--sapList_HeaderBackground, #f7f7f7);
--ag-control-panel-background-color: var(--sapList_HeaderBackground, #f7f7f7);
--ag-alpine-active-color: var(--sapList_Active_TextColor, #303030);
--ag-foreground-color: var(--sapTextColor, #303030);
--ag-checkbox-background-color: var(--sapField_Background, #fff);
--ag-checkbox-checked-color: var(--sapActiveColor, #bebebe);
--ag-row-border-color: var(--sapList_BorderColor, #dedede);
}

.ag-grid-editor>.ag-root-wrapper {
border: none !important;
}

.header-input {
display: none;
width: 100%;
}

.ag-cell-value:empty {
height: 100%;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"files": [
{
"table": "jhkasd",
"schema": "asd",
"file": "/editor-csv/test.csv",
"header": true,
"useHeaderNames": false,
"delimField": ",",
"delimEnclosing": "\"",
"distinguishEmptyFromNull": true,
"version": ""
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!--
Copyright (c) 2010-2024 Eclipse Dirigible contributors
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v2.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
SPDX-FileCopyrightText: Eclipse Dirigible contributors
SPDX-License-Identifier: EPL-2.0
-->
<!DOCTYPE HTML>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" ng-app="csv-editor" ng-controller="CsvController">

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" sizes="any" href="data:;base64,iVBORw0KGgo=">
<title config-title></title>
<script type="text/javascript" src="/services/web/editor-csv/configs/csv-editor.js"></script>
<script type="text/javascript" src="/services/js/platform-core/services/loader.js?id=editor-js"></script>
<script type="text/javascript" src="/webjars/papaparse/5.3.2/papaparse.min.js"></script>
<script type="text/javascript" src="/webjars/ag-grid-community__all-modules/27.1.0/dist/ag-grid-community.min.noStyle.js"></script>
<link type="text/css" rel="stylesheet" href="/services/js/platform-core/services/loader.js?id=view-css" />
<link type="text/css" rel="stylesheet" href="/webjars/ag-grid-community__all-modules/27.1.0/dist/styles/ag-grid.min.css" />
<link type="text/css" rel="stylesheet" href="/webjars/ag-grid-community__all-modules/27.1.0/dist/styles/ag-theme-alpine.min.css" />
<link type="text/css" rel="stylesheet" href="css/csv.css" />
<script type="text/javascript" src="/services/web/editor-csv/js/editor.js"></script>
</head>

<body class="bk-vbox" ng-mousedown="handleClick($event)" ng-on-contextmenu="showContextMenu($event)" shortcut="'ctrl+s'" shortcut-action="save">
<bk-busy-indicator-extended class="bk-fill-parent" ng-hide="state.error || !state.isBusy" size="l">{{state.busyText}}</bk-busy-indicator-extended>
<bk-toolbar ng-show="!state.error && !state.isBusy">
<bk-toolbar-spacer></bk-toolbar-spacer>
<bk-input type="search" compact="true" placeholder="Search..." ng-model="search.text" ng-change="searchCsv()" style="max-width:30%;"></bk-input>
<bk-toolbar-separator></bk-toolbar-separator>
<bk-button glyph="sap-icon--save" label="Save" state="transparent" ng-click="save()"></bk-button>
<bk-button glyph="sap-icon--download" label="Export" state="transparent" ng-click="downloadCsv()"></bk-button>
<bk-toolbar-separator></bk-toolbar-separator>
<bk-toolbar-overflow>
<bk-button glyph="sap-icon--add" is-overflow="true" state="transparent" ng-click="addRow()" label="Add row"></bk-button>
<bk-toolbar-separator></bk-toolbar-separator>
<bk-checkbox id="csvHeader" ng-model="papaConfig.header" ng-change="hasHeader()"></bk-checkbox>
<bk-checkbox-label for="csvHeader">Has header</bk-checkbox-label>
</bk-toolbar-overflow>
</bk-toolbar>
<div class="bk-fill-parent ag-grid-editor ag-theme-alpine" ag-grid="gridOptions" ng-show="!state.error && !state.isBusy"></div>
<div class="bk-full-width bk-border--top" ng-show="!state.error && !state.isBusy">
<p class="fd-text fd-margin--tiny">Data rows: {{rowsCount}}</p>
</div>
<bk-message-page glyph="sap-icon--error" ng-if="state.error">
<bk-message-page-title>Editor encounterd an error!</bk-message-page-title>
<bk-message-page-subtitle>{{errorMessage}}</bk-message-page-subtitle>
</bk-message-page>
<theme></theme>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"module": "editor-csv/configs/csv-editor.js",
"extensionPoint": "platform-editors",
"description": "CSV Editor"
}
Loading

0 comments on commit b12cbb5

Please sign in to comment.