@things-factory/export-ui-excel 4.1.27 → 5.0.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
+ import Excel from '!exceljs'
1
2
  import * as XLSX from '!xlsx'
3
+ import { saveAs } from 'file-saver'
4
+ import groupBy from 'lodash-es/groupBy'
5
+ import transform from 'lodash-es/transform'
2
6
 
3
- import Excel from '!exceljs'
4
7
  import { UPDATE_EXTENSION } from '@things-factory/export-base'
5
- import { saveAs } from 'file-saver'
6
8
  import { store } from '@things-factory/shell'
7
9
 
8
- const _ = require('lodash')
9
-
10
10
  async function jsonToExcel({ extension, name, data }) {
11
11
  if (data === 0) {
12
12
  return
@@ -268,7 +268,7 @@ function multiGroupTree(array, groups, groupsRaw, totals) {
268
268
  }
269
269
  const currentGroup = groups[0]
270
270
  const restGroups = [...groups.slice(1, groups.length)]
271
- let grouping = _.groupBy(array, currentGroup)
271
+ let grouping = groupBy(array, currentGroup)
272
272
 
273
273
  if (!restGroups.length) {
274
274
  let rows = []
@@ -316,7 +316,7 @@ function multiGroupTree(array, groups, groupsRaw, totals) {
316
316
  return rows
317
317
  }
318
318
 
319
- let result = _.transform(
319
+ let result = transform(
320
320
  grouping,
321
321
  (result, value, key) => {
322
322
  let rows = multiGroupTree(value, restGroups, groupsRaw, totals)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@things-factory/export-ui-excel",
3
- "version": "4.1.27",
3
+ "version": "5.0.0-alpha.2",
4
4
  "main": "dist-server/index.js",
5
5
  "browser": "client/index.js",
6
6
  "things-factory": true,
@@ -24,12 +24,12 @@
24
24
  "migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
25
25
  },
26
26
  "dependencies": {
27
- "@things-factory/export-base": "^4.1.27",
28
- "@things-factory/export-ui": "^4.1.27",
29
- "@things-factory/layout-base": "^4.1.27",
27
+ "@things-factory/export-base": "^5.0.0-alpha.2",
28
+ "@things-factory/export-ui": "^5.0.0-alpha.2",
29
+ "@things-factory/layout-base": "^5.0.0-alpha.2",
30
30
  "exceljs": "4.2.0",
31
31
  "file-saver": "^2.0.2",
32
32
  "xlsx": "^0.16.8"
33
33
  },
34
- "gitHead": "d2bcc934a52e1a2f68738ec8b56ad72503172f6f"
34
+ "gitHead": "055536f981d229d51ae63f46585036b35fa86602"
35
35
  }