dtable-utils
Advanced tools
Comparing version 4.3.8 to 4.3.9-alpha1
@@ -21,3 +21,3 @@ export { CellType } from './constants/cell-type.js'; | ||
export { convertRow, convertRowBack } from './row/convert.js'; | ||
export { getLinkColumnsUsedInFilters, getNonArchiveViews, getViewById, getViewByName, getViewShownColumns, isArchiveView, isDefaultView, isFilterView, isGroupView, isHiddenColumnsView, isSortView } from './view/core.js'; | ||
export { getLinkColumnsUsedInFilters, getNonArchiveViews, getNonPrivateViews, getViewById, getViewByName, getViewShownColumns, isArchiveView, isDefaultView, isFilterView, isGroupView, isHiddenColumnsView, isSortView } from './view/core.js'; | ||
export { getSummaries, getSummariesWithSubgroups, updateGroupSummaries } from './view/summaries.js'; | ||
@@ -57,2 +57,3 @@ export { getFormulaColumnsContainLinks, getSortedFormulaColumns, getSortedFormulaColumnsContainLinks, transLink2LinkFormula } from './view/formula.js'; | ||
export { isNumber, isNumberEqual, round } from './number.js'; | ||
export { searchCollaborators } from './search.js'; | ||
export { ValidateFilter } from './validate/filter.js'; | ||
@@ -59,0 +60,0 @@ export { isValidEmail } from './validate/email.js'; |
@@ -42,2 +42,11 @@ import { getValidFilters, getValidFiltersWithoutError } from '../filter/core.js'; | ||
/** | ||
* Check whether the view is private | ||
* @param {object} view | ||
* @returns bool | ||
*/ | ||
var isPrivateView = function isPrivateView(view) { | ||
return view && view.private_for && view.private_for.length > 0; | ||
}; | ||
/** | ||
* Check whether the view contains filters | ||
@@ -194,2 +203,16 @@ * @param {object} view e.g. { filters, ... } | ||
export { getLinkColumnsUsedInFilters, getNonArchiveViews, getViewById, getViewByName, getViewShownColumns, isArchiveView, isDefaultView, isFilterView, isGroupView, isHiddenColumnsView, isSortView }; | ||
/** | ||
* Get non-private views | ||
* @param {array} views | ||
* @returns non-private views, array | ||
*/ | ||
var getNonPrivateViews = function getNonPrivateViews(views) { | ||
if (!Array.isArray(views)) { | ||
return []; | ||
} | ||
return views.filter(function (view) { | ||
return !isPrivateView(view); | ||
}); | ||
}; | ||
export { getLinkColumnsUsedInFilters, getNonArchiveViews, getNonPrivateViews, getViewById, getViewByName, getViewShownColumns, isArchiveView, isDefaultView, isFilterView, isGroupView, isHiddenColumnsView, isSortView }; |
@@ -60,2 +60,3 @@ 'use strict'; | ||
var number$3 = require('./number.js'); | ||
var search = require('./search.js'); | ||
var filter = require('./validate/filter.js'); | ||
@@ -98,3 +99,3 @@ var email = require('./validate/email.js'); | ||
var rowColor = require('./color/row-color.js'); | ||
var search = require('./archive/clause-module/search.js'); | ||
var search$1 = require('./archive/clause-module/search.js'); | ||
var update = require('./archive/clause-module/update.js'); | ||
@@ -171,2 +172,3 @@ var filterCondition = require('./archive/sql-generator/filter-condition.js'); | ||
exports.getNonArchiveViews = core$2.getNonArchiveViews; | ||
exports.getNonPrivateViews = core$2.getNonPrivateViews; | ||
exports.getViewById = core$2.getViewById; | ||
@@ -250,2 +252,3 @@ exports.getViewByName = core$2.getViewByName; | ||
exports.round = number$3.round; | ||
exports.searchCollaborators = search.searchCollaborators; | ||
exports.ValidateFilter = filter.ValidateFilter; | ||
@@ -306,9 +309,9 @@ exports.isValidEmail = email.isValidEmail; | ||
exports.RowColorUtils = rowColor["default"]; | ||
exports.customFilter2SqlCondition = search.customFilter2SqlCondition; | ||
exports.customSort2SqlCondition = search.customSort2SqlCondition; | ||
exports.generateSearchColumnsString = search.generateSearchColumnsString; | ||
exports.generateViewSearchColumnsString = search.generateViewSearchColumnsString; | ||
exports.generatorCustomSearchSQL = search.generatorCustomSearchSQL; | ||
exports.generatorSearchSQL = search.generatorSearchSQL; | ||
exports.sort2SqlCondition = search.sort2SqlCondition; | ||
exports.customFilter2SqlCondition = search$1.customFilter2SqlCondition; | ||
exports.customSort2SqlCondition = search$1.customSort2SqlCondition; | ||
exports.generateSearchColumnsString = search$1.generateSearchColumnsString; | ||
exports.generateViewSearchColumnsString = search$1.generateViewSearchColumnsString; | ||
exports.generatorCustomSearchSQL = search$1.generatorCustomSearchSQL; | ||
exports.generatorSearchSQL = search$1.generatorSearchSQL; | ||
exports.sort2SqlCondition = search$1.sort2SqlCondition; | ||
exports.generatorUpdateSql = update.generatorUpdateSql; | ||
@@ -315,0 +318,0 @@ exports.getConvertedUpdatedValue = update.getConvertedUpdatedValue; |
@@ -46,2 +46,11 @@ 'use strict'; | ||
/** | ||
* Check whether the view is private | ||
* @param {object} view | ||
* @returns bool | ||
*/ | ||
var isPrivateView = function isPrivateView(view) { | ||
return view && view.private_for && view.private_for.length > 0; | ||
}; | ||
/** | ||
* Check whether the view contains filters | ||
@@ -198,4 +207,19 @@ * @param {object} view e.g. { filters, ... } | ||
/** | ||
* Get non-private views | ||
* @param {array} views | ||
* @returns non-private views, array | ||
*/ | ||
var getNonPrivateViews = function getNonPrivateViews(views) { | ||
if (!Array.isArray(views)) { | ||
return []; | ||
} | ||
return views.filter(function (view) { | ||
return !isPrivateView(view); | ||
}); | ||
}; | ||
exports.getLinkColumnsUsedInFilters = getLinkColumnsUsedInFilters; | ||
exports.getNonArchiveViews = getNonArchiveViews; | ||
exports.getNonPrivateViews = getNonPrivateViews; | ||
exports.getViewById = getViewById; | ||
@@ -202,0 +226,0 @@ exports.getViewByName = getViewByName; |
{ | ||
"name": "dtable-utils", | ||
"version": "4.3.8", | ||
"version": "4.3.9-alpha1", | ||
"description": "dtable common utils", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index.js", |
Sorry, the diff of this file is too big to display
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
860864
217
18985
3