diff --git a/examples/loader.ts b/examples/loader.ts index d5664223c..e184298f2 100644 --- a/examples/loader.ts +++ b/examples/loader.ts @@ -16,6 +16,7 @@ const mapping: { 'mobx': __moduleId('mobx'), 'mobx-state-tree': __moduleId('mobx-state-tree'), 'react-transition-group': __moduleId('react-transition-group'), + 'papaparse': __moduleId('papaparse'), 'echarts': __moduleId('echarts'), 'zrender': __moduleId('zrender'), 'sortablejs': __moduleId('sortablejs'), diff --git a/fis-conf.js b/fis-conf.js index 16fb19bac..1c2ea2810 100644 --- a/fis-conf.js +++ b/fis-conf.js @@ -386,6 +386,7 @@ if (fis.project.currentMedia() === 'publish') { '!jquery/**', '!zrender/**', '!echarts/**', + '!papaparse/**', '!docsearch.js/**', '!monaco-editor/**.css' ], @@ -398,6 +399,8 @@ if (fis.project.currentMedia() === 'publish') { 'tinymce.js': ['src/components/Tinymce.tsx', 'tinymce/**'], + 'papaparse.js': ['papaparse/**'], + 'charts.js': ['zrender/**', 'echarts/**'], 'rest.js': [ @@ -409,7 +412,8 @@ if (fis.project.currentMedia() === 'publish') { '!src/components/RichText.tsx', '!jquery/**', '!zrender/**', - '!echarts/**' + '!echarts/**', + '!papaparse/**' ] }), postpackager: [ @@ -569,7 +573,8 @@ if (fis.project.currentMedia() === 'publish') { '!tinymce/**', '!jquery/**', '!zrender/**', - '!echarts/**' + '!echarts/**', + '!papaparse/**' ], 'pkg/rich-text.js': [ 'src/components/RichText.js', @@ -578,6 +583,7 @@ if (fis.project.currentMedia() === 'publish') { ], 'pkg/tinymce.js': ['src/components/Tinymce.tsx', 'tinymce/**'], 'pkg/charts.js': ['zrender/**', 'echarts/**'], + 'pkg/papaparse.js': ['papaparse/**'], 'pkg/api-mock.js': ['mock/*.ts'], 'pkg/app.js': [ '/examples/components/App.tsx', @@ -588,14 +594,14 @@ if (fis.project.currentMedia() === 'publish') { '**.{js,jsx,ts,tsx}', '!static/mod.js', '!monaco-editor/**', - '!echarts/**', '!flv.js/**', '!hls.js/**', '!froala-editor/**', '!jquery/**', '!src/components/RichText.js', '!zrender/**', - '!echarts/**' + '!echarts/**', + '!papaparse/**' ], 'pkg/npm.css': ['node_modules/*/**.css', '!monaco-editor/**'], diff --git a/src/renderers/CRUD.tsx b/src/renderers/CRUD.tsx index 2b869c2c2..1a506c6d4 100644 --- a/src/renderers/CRUD.tsx +++ b/src/renderers/CRUD.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import papaparse from 'papaparse'; import {saveAs} from 'file-saver'; import PropTypes from 'prop-types'; import {Renderer, RendererProps} from '../factory'; @@ -66,7 +65,8 @@ export interface CRUDBultinToolbar extends Omit { | 'statistics' | 'switch-per-page' | 'load-more' - | 'filter-toggler'; + | 'filter-toggler' + | 'export-csv'; } export type CRUDToolbarChild = SchemaObject | CRUDBultinToolbar; @@ -1684,13 +1684,15 @@ export default class CRUD extends React.Component {