diff --git a/CHANGELOG.md b/CHANGELOG.md index ac071598e..66d448775 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ -## [0.0.1] - TODO: Add release date. +## [0.1.0] - 2020. 8. 26 -* TODO: Describe initial release. +* Column fixation : Columns can be fixed to the left or right of the grid. +* Column shift : Change the order of the columns by dragging the column title. +* Column sort : Sort the list by clicking on the column heading. +* Column width : Change the column width by dragging the icon to the right of the column title. +* Column action : Click the icon to the right of the column title, you can control the column with the column action menu. +* Multi selection : By long tapping or clicking and moving. +* Copy & paste : Ctrl(macos : Meta) + C or V. +* Select Row Popup : Same as the grid, a selection popup that can be used when selecting an item from a list. +* Keyboard support : Arrow keys, Enter(Shift + Enter), Tab(Shift +Tab), Esc... diff --git a/LICENSE b/LICENSE index ba75c69f7..39cea04cb 100644 --- a/LICENSE +++ b/LICENSE @@ -1 +1,21 @@ -TODO: Add your license here. +MIT License + +Copyright (c) [2020] [PlutoGrid] + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 61a909db5..02a4b5ef8 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,120 @@ -# pluto_grid +## PlutoGrid for flutter - v0.1.0 -PlutoGrid is data grid for flutter. +PlutoGrid, a data grid, is being developed with the goal of running on all platforms supported by Flutter. -## Getting Started +> Currently, under development, there are plans to distribute to pub.dev. -This project is a starting point for a Dart -[package](https://flutter.dev/developing-packages/), -a library module containing code that can be shared easily across -multiple Flutter or Dart projects. +### Features +* Column fixation : Columns can be fixed to the left or right of the grid. +* Column shift : Change the order of the columns by dragging the column title. +* Column sort : Sort the list by clicking on the column heading. +* Column width : Change the column width by dragging the icon to the right of the column title. +* Column action : Click the icon to the right of the column title, you can control the column with the column action menu. +* Multi selection : By long tapping or clicking and moving. +* Copy & paste : Ctrl(macos : Meta) + C or V. +* Select Row Popup : Same as the grid, a selection popup that can be used when selecting an item from a list. +* Keyboard support : Arrow keys, Enter(Shift + Enter), Tab(Shift +Tab), Esc... -For help getting started with Flutter, view our -[online documentation](https://flutter.dev/docs), which offers tutorials, -samples, guidance on mobile development, and a full API reference. +### Demo +[Demo Web](https://bosskmk.github.io/build/web/index.html) + +### Preview + +![PlutoGrid Image](https://bosskmk.github.io/images/pluto_grid_img1.jpg) + +![PlutoGrid Image](https://bosskmk.github.io/images/pluto_grid_img2.jpg) + +### Usage +Generate the data to be used in the grid. +```dart + +List columns = [ + PlutoColumn( + title: 'leftFixedColumn', + field: 'column1', + type: PlutoColumnType.text(), + fixed: PlutoColumnFixed.Left, + ), + PlutoColumn( + title: 'readOnlyColumn', + field: 'column2', + type: PlutoColumnType.text(readOnly: true), + ), + PlutoColumn( + title: 'textColumn', + field: 'column3', + type: PlutoColumnType.text(), + ), + PlutoColumn( + title: 'selectColumn', + field: 'column4', + type: PlutoColumnType.select(['One', 'Two', 'Three']), + ), + PlutoColumn( + title: 'rightFixedColumn', + field: 'column5', + type: PlutoColumnType.text(), + fixed: PlutoColumnFixed.Right, + ), +]; + +List rows = [ + PlutoRow( + cells: { + 'column1': PlutoCell(value: 'column1 value'), + 'column3': PlutoCell(value: 'column3 value'), + 'column4': PlutoCell(value: 'One'), + 'column5': PlutoCell(value: 'column5 value'), + }, + ), + PlutoRow( + cells: { + 'column1': PlutoCell(value: 'column1 value'), + 'column2': PlutoCell(value: 'column2 value'), + 'column3': PlutoCell(value: 'column3 value'), + 'column4': PlutoCell(value: 'Two'), + 'column5': PlutoCell(value: 'column5 value'), + }, + ), + PlutoRow( + cells: { + 'column1': PlutoCell(value: 'column1 value'), + 'column2': PlutoCell(value: 'column2 value'), + 'column3': PlutoCell(value: 'column3 value'), + 'column4': PlutoCell(value: 'Three'), + 'column5': PlutoCell(value: 'column5 value'), + }, + ), +]; +``` + +Create a grid with the data created above. +```dart + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('PlutoGrid Demo'), + ), + body: Container( + padding: const EdgeInsets.all(30), + child: PlutoGrid( + columns: dummyData.columns, + rows: dummyData.rows, + onChanged: (PlutoOnChangedEvent event) { + print(event); + }, + ), + ), + ); + } +``` + +### Coming soon + +* Column types (Number, Date, DateTime...) +* Column filtering +* Row selection +* Multi column sorting +* Paging +* Control UI for mobile \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index c33568066..f0641d029 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,7 @@ name: pluto_grid description: PlutoGrid is data grid for flutter. -version: 0.0.1 -author: -homepage: +version: 0.1.0 +homepage: https://bosskmk.github.io environment: sdk: ">=2.7.0 <3.0.0" @@ -17,40 +16,3 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter. -flutter: - - # To add assets to your package, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - # - # For details regarding assets in packages, see - # https://flutter.dev/assets-and-images/#from-packages - # - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. - - # To add custom fonts to your package, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts in packages, see - # https://flutter.dev/custom-fonts/#from-packages diff --git a/tools/clean.bat b/tool/clean.bat similarity index 62% rename from tools/clean.bat rename to tool/clean.bat index 38ee0d517..ea8ddeb42 100644 --- a/tools/clean.bat +++ b/tool/clean.bat @@ -1 +1,2 @@ +:: Runs when Dart is slow in IDE. rmdir /q /s "%LocalAppData%\.dartServer\.analysis-driver" \ No newline at end of file