当前位置: 首页 > 软件库 > 大数据 > 数据查询 >

Angular-Slickgrid

授权协议 MIT License
开发语言 Java
所属分类 大数据、 数据查询
软件类型 开源软件
地区 不详
投 递 者 胡夕
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

Angular-Slickgrid

Actions Status

Brief introduction

One of the best javascript datagrid SlickGrid which was originally developed by @mleibman is now available to Angular. I have used a few datagrids and SlickGrid beats most of them in terms of functionalities and performance (it can easily deal with even a million row). We will be using the 6pac/SlickGrid fork, it is the most active fork since the original author @mleibman stopped working on his original repo. Also worth knowing that I have contributed a lot to the 6pac/SlickGrid fork for the benefit of Angular-Slickgrid... also a reminder, this is a wrapper of a jQuery lib (SlickGrid) and a big portion of the lib (like Editors, Filters and others) are written in jQuery/JavaScript, so just keep that in mind and that also means jQuery is a dependency.

NPM Package

Angular-Slickgrid on NPM

License

MIT License

Like it? it

You like and use Angular-Slickgrid? Be sure to upvote and feel free to contribute. �� ��‍♀️

Like my work?

If you like my work, you can also support me with caffeine. I certainly drank many coffees to build and keep adding features for this great library.

Buy Me a Coffee at ko-fi.com

Latest News & Releases

Check out the Releases section for all latest News & Releases.

Angular Compatibility

  • version 1.x.x for Angular 4 to 6
    • Angular 6, is only supported through rxjs-compat as shown in this post. It's preferable to upgrade to Angular 7+ to avoid using the rxjs-compat package.
  • version 2.x.x for Angular 7+
    • since version 2.11.0, you can also change your build target to ES2015 for modern browser.
  • version 3.x.x for Angular 12+ and RxJS 7+
    • build target got bumped to ES2018 for modern browser only
    • IE11 is reaching EOL by year end and is no longer supported, if you still need to support it then stick with version 2.x
    • uses Slickgrid-Universal monorepo

For Angular 12+ see the instructions below - Angular 12 with WebPack 5 - polyfill issue

ngx-translate Compatibility

If you are facing any issues with ngx-translate library while building your Angular Project. You need to make sure that @ngx-translate/core is part of your dependencies, that is also true even when using a single Locale, that is because it is a peerDependency of Angular-Slickgrid. The reason is because, we use @Optional() TranslateService in the lib and for that to work, we still need it to be installed, but don't worry it should still be removed by the tree shaking process after a running a production build. See their version compatibility table below

Angular Version @ngx-translate/core
10 13.x+
9 12.x+
8 12.x+
7 11.x+

Build Warnings (Angular 8+)

You might get warnings about SlickGrid while doing a production build, most of them are fine and the best way to fix them, is to simply remove/ignore the warnings, all you have to do is to add a file named ngcc.config.js in your project root (same location as the angular.json file) with the following content (you can also see this commit which fixes the Angular-Slickgrid-Demos prod build):

module.exports = {
  packages: {
    'angular-slickgrid': {
      ignorableDeepImportMatchers: [
        /assign-deep/,
        /slickgrid\//,
        /flatpickr/,
        /dequal/,
        /jquery-ui\//,
      ]
    },
  }
};

You should also add Angular-Slickgrid as an allowed CommonJS dependency to your angular.json file to silent the warnings.

"options": {
  "allowedCommonJsDependencies": ["angular-slickgrid"]
}

Angular 12 with WebPack 5 - how to fix polyfill error

Since Angular 12 switched to WebPack 5, you might get some new errors and you will need to add some polyfills manually to get the Excel Builder (Excel Export) to work.

The error you might get

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

Steps to fix it

  1. npm install stream-browserify
  2. Add a path mapping in tsconfig.json:
{
  ...
  "compilerOptions": {
    "paths": {
      "stream": [ "./node_modules/stream-browserify" ]
    },
  1. Add stream to allowedCommonJsDependencies in angular.json:
  "options": {
    "allowedCommonJsDependencies": [
      "assign-deep",
      "excel-builder-webpacker",
      "jquery-ui",
      "stream"
    ],

Fully Tested with Jest (Unit Tests) - Cypress (E2E Tests)

Angular-Slickgrid and Slickgrid-Universal both have 100% Unit Test Coverage, we are talking about +13,000 lines of code (+3,000 unit tests) that are fully tested with Jest. On the UI side, all Angular-Slickgrid Examples are tested with Cypress, there are over +450 Cypress E2E tests.

Installation

Refer to the Wiki - HOWTO Step by Step and/or clone the Angular-Slickgrid Demos repository. Please don't open any issue unless you have followed these steps (from the Wiki), and if any of the steps are incorrect or confusing, then please let me know.

NOTE: if you have any question, please consider asking installation and/or general questions on Stack Overflow

Demo page

Angular-Slickgrid works with Bootstrap 4 and even latest Bootstrap 5 version, you can see a demo of each one below.

There are also 2 new styling Themes, Material & Salesforce are also available and you could also use SVG icons if so take a look at the Wiki - SVG Icons

Working Demo

For a complete and working local demo (with +30 examples), you can (should) clone the Angular-Slickgrid Demos repository. That repo is updated frequently and is used to update the GitHub demo pages for both the Bootstrap 5 demo and Bootstrap 4 demo.

git clone https://github.com/ghiscoding/angular-slickgrid-demos
cd bootstrap4-demo-with-translate
npm install
npm start

How to load data with HttpClient?

You might notice that all demos are coded with mocked dataset in each of the examples, that is mainly for demo purposes, but you might be wondering how to connect this with an HttpClient? Easy... just replace the mocked data, assigned to the dataset property, by your HttpClient call it and that's it. The dataset property can be changed or refreshed at any time, which is why you can use local data and/or connect it to a Promise or an Observable with HttpClient (internally it's just a SETTER that refreshes the grid). See Example 24 for a demo showing how to load a JSON file with HttpClient.

Wiki / Documentation

The Wiki is where all the documentation and instructions will go, so please consult the Angular-Slickgrid - Wiki before opening any issues. The Wiki - HOWTO is a great place to start with. You can also take a look at the Demo page, it includes sample for most of the features and it keeps growing (so you might want to consult it whenever a new version comes out).

Main features

You can see some screenshots below and the instructions down below and if that is not enough for you to decide, head over to the Wiki - Main Features.

Missing features

What if Angular-Slickgrid is missing feature(s) compare to the original core library 6pac/SlickGrid?

Fear not, and just simply reference the SlickGrid and DataView objects, just like in the core lib, those are exposed through Event Emitters. For more info continue reading on Wiki - SlickGrid & DataView objects and Wiki - Grid & DataView Events

Screenshots

Screenshots from the demo app with the Bootstrap theme.

Note that the styling changed a bit, the best is to simply head over to the Live Demo page.

Slickgrid example with Formatters (last column shown is a custom Formatter)

You can also see the Grid Menu opened (aka hambuger menu)

Filters and Multi-Column Sort

Inline Editing

Pinned (aka frozen) Columns/Rows

Draggable Grouping & Aggregators

Slickgrid Example with Server Side (Filter/Sort/Pagination)

Comes with OData & GraphQL support (you can implement custom ones too)

Composite Editor Modal Windows

  • var app = angular.module('app', [ 'ui.grid.resizeColumns']); $scope.gridOptions.enableColumnResizing = true; <div id="grid1" ui-grid="gridOptions" ui-grid-resize-columns class="grid"></div> 不邀自来,一共三步不

 相关资料
  • Angular 是一款十分流行且好用的 Web 前端框架,目前由 Google 维护。这个条目收录的是 Angular 2 及其后面的版本。由于官方已将 Angular 2 和之前的版本 Angular.js 分开维护(两者的 GitHub 地址和项目主页皆不相同),所以就有了这个页面。传送门:Angular.js 特性 跨平台 渐进式 Web 应用 借助现代化 Web 平台的力量,交付 app

  • 即将到来的Angular 2框架是使用TypeScript开发的。 因此Angular和TypeScript一起使用非常简单方便。 Angular团队也在其文档里把TypeScript视为一等公民。 正因为这样,你总是可以在Angular 2官网(或Angular 2官网中文版)里查看到最新的结合使用Angular和TypeScript的参考文档。 在这里查看快速上手指南,现在就开始学习吧!

  • 从头开始创建项目 lint你的代码 运行您的单元测试和端到端测试。 Angular 2 CLI目前只在TypeScript中生成框架,稍后还会有其他版本。

  • 这小节内容是译者加的,因为我认为对于新手而言,学习一个框架是有成本的,特别是对于一个不算简单的技术来说,我希望这篇教程是对新手友好的,所以我首先要让你放心的将时间和精力投入到Angular2 中。那我们先不谈技术细节,先用数据说话。 这里我多说一句,最近看一些文章中谷歌趋势截图,大都没有把范围限定在“编程”上。图中可以看出Vue2非常少,所以在下面比较中不再单独统计。 教程数量 这里我选取的主要是

  • 我们已经在Highcharts Configuration Syntax一章中看到了用于绘制图表的配置 。 下面给出角度计图表的示例。 配置 (Configurations) 现在让我们看一下所采取的其他配置/步骤。 chart.type 将图表类型配置为基于计量。 将类型设置为“规格”。 var chart = { type: 'guage' }; pane 此类型仅适用于极坐标图和角度

  • 角度计图表用于绘制仪表/仪表类型图表。 在本节中,我们将讨论不同类型的角度计图表。 Sr.No. 图表类型和描述 1 角度计 角度表。 2 实心仪​​表 实心图表。 3 Clock 时钟。 4 带双轴的仪表 带双轴的仪表图。 5 VU表 VU表图表。