@filerobot/utils
Advanced tools
Comparing version 0.0.0-beta.2 to 0.0.0-beta.3
@@ -229,3 +229,3 @@ import { VisibilityIcon, CodeIcon, TagsIcon, MetaIcon, DetailsIcon, CommentsIcon, HistoryIcon, BranchesIcon, SimilarityIcon, LinkIcon, ShareFolderIcon, ShareAssetsIcon } from '@filerobot/icons'; | ||
i18nStr: 'fileCardSubTabMeta', | ||
icon: VisibilityIcon | ||
icon: MetaIcon | ||
}, | ||
@@ -300,4 +300,5 @@ TAGS: { | ||
}; | ||
var MENU_TYPES = { | ||
SORTING: 'SORTING' | ||
var CONTEXT_MENU_TYPES = { | ||
SORTING: 'SORTING', | ||
FILE: 'FILE' | ||
}; | ||
@@ -371,2 +372,2 @@ var FILTER_TYPE_ID = 'filter'; | ||
}; | ||
export { DETAILSVIEW_TABS_IDS, DETAILSVIEW_TABS_OBJECTS, FILE_TYPES_AND_ICONS, FILTER_OPTIONS, FILECARD_TABS_IDS, FILECARD_TABS_OBJECTS, FOLDERCARD_TABS_IDS, FOLDERCARD_TABS_OBJECTS, ITEMSCARD_TABS_IDS, ITEMSCARD_TABS_OBJECTS, FILE_EXPLORER_PLUGIN_ID, SORT_OPTIONS, SORT_COL_OPTIONS, FILTER_TYPE_ID, LIST_VIEW_COLS_IDS, LIST_VIEW_COLS_OBJECTS, VIEWS_IDS, TIME_OPTIONS, METADATA_VERSIONS, MENU_TYPES, DETAILS_ITEM_OPTIONS, COLORS, IMAGE_EDITOR_MODES, FILECARD_DETAILS_SUBTABS_IDS, FILECARD_DETAILS_SUBTABS_OBJECTS, FILECARD_SHARE_TABS_OBJECTS }; | ||
export { DETAILSVIEW_TABS_IDS, DETAILSVIEW_TABS_OBJECTS, FILE_TYPES_AND_ICONS, FILTER_OPTIONS, FILECARD_TABS_IDS, FILECARD_TABS_OBJECTS, FOLDERCARD_TABS_IDS, FOLDERCARD_TABS_OBJECTS, ITEMSCARD_TABS_IDS, ITEMSCARD_TABS_OBJECTS, FILE_EXPLORER_PLUGIN_ID, SORT_OPTIONS, SORT_COL_OPTIONS, FILTER_TYPE_ID, LIST_VIEW_COLS_IDS, LIST_VIEW_COLS_OBJECTS, VIEWS_IDS, TIME_OPTIONS, METADATA_VERSIONS, CONTEXT_MENU_TYPES, DETAILS_ITEM_OPTIONS, COLORS, IMAGE_EDITOR_MODES, FILECARD_DETAILS_SUBTABS_IDS, FILECARD_DETAILS_SUBTABS_OBJECTS, FILECARD_SHARE_TABS_OBJECTS }; |
@@ -21,3 +21,3 @@ import { TIME_OPTIONS } from './constants'; | ||
var size = file.size.pretty; | ||
var tags = (_file$properties = file.properties) != null && _file$properties.tags ? file.properties.tags : []; | ||
var tags = (_file$properties = file.properties) !== null && _file$properties !== void 0 && _file$properties.tags ? file.properties.tags : []; | ||
var resolution = isDefined ? imgWidth + 'x' + imgHeight : null; | ||
@@ -24,0 +24,0 @@ var visibility = file.visibility; |
@@ -13,3 +13,3 @@ export default (function (file, notFoundStr) { | ||
var fileMime = file.mime; | ||
var mimeSeparatorIndex = fileMime == null ? void 0 : fileMime.lastIndexOf('/'); | ||
var mimeSeparatorIndex = fileMime === null || fileMime === void 0 ? void 0 : fileMime.lastIndexOf('/'); | ||
@@ -21,3 +21,3 @@ if (fileMime && mimeSeparatorIndex && mimeSeparatorIndex !== -1) { | ||
var fileType = file.type; | ||
var typeSeparatorIndex = fileType == null ? void 0 : fileType.lastIndexOf('/'); | ||
var typeSeparatorIndex = fileType === null || fileType === void 0 ? void 0 : fileType.lastIndexOf('/'); | ||
@@ -29,3 +29,3 @@ if (fileType && typeSeparatorIndex && typeSeparatorIndex !== -1) { | ||
var fileName = file.name; | ||
var nameSeparatorIndex = fileName == null ? void 0 : fileName.lastIndexOf('.'); | ||
var nameSeparatorIndex = fileName === null || fileName === void 0 ? void 0 : fileName.lastIndexOf('.'); | ||
@@ -32,0 +32,0 @@ if (fileName && nameSeparatorIndex && nameSeparatorIndex !== -1) { |
@@ -11,2 +11,3 @@ import { TIME_OPTIONS } from './constants'; | ||
var updadtedAt = folder.updated_at ? new Date(folder.updated_at).toLocaleTimeString('en', TIME_OPTIONS) : ''; | ||
var createdAt = folder.created_at ? new Date(folder.created_at).toLocaleTimeString('en', TIME_OPTIONS) : ''; | ||
var visibility = folder.visibility; | ||
@@ -22,4 +23,5 @@ return { | ||
updadtedAt: updadtedAt, | ||
createdAt: createdAt, | ||
visibility: visibility | ||
}; | ||
}); |
var getItemPath = function getItemPath(item) { | ||
var _item$url; | ||
if (item != null && (_item$url = item.url) != null && _item$url.path) { | ||
if (item !== null && item !== void 0 && (_item$url = item.url) !== null && _item$url !== void 0 && _item$url.path) { | ||
var lastDirSeparatorIndex = item.url.path.lastIndexOf('/'); | ||
@@ -6,0 +6,0 @@ return item.url.path.substr(0, lastDirSeparatorIndex) || '/'; |
@@ -13,7 +13,7 @@ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var getVisibilityObject = function getVisibilityObject(visibilities, visibility) { | ||
var visibilityItem = visibilities == null ? void 0 : visibilities.filter(function (vy) { | ||
var visibilityItem = visibilities === null || visibilities === void 0 ? void 0 : visibilities.filter(function (vy) { | ||
return vy.key === visibility; | ||
} // the string value of set property of visbility object | ||
)[0]; | ||
var VisibilityIcon = VISIBILITIES_ICONS[visibilityItem == null ? void 0 : visibilityItem.muiIconKey]; | ||
var VisibilityIcon = VISIBILITIES_ICONS[visibilityItem === null || visibilityItem === void 0 ? void 0 : visibilityItem.muiIconKey]; | ||
return _extends({ | ||
@@ -20,0 +20,0 @@ Icon: VisibilityIcon |
@@ -6,3 +6,3 @@ { | ||
"types": "types/index.d.ts", | ||
"version": "0.0.0-beta.2", | ||
"version": "0.0.0-beta.3", | ||
"files": [ | ||
@@ -9,0 +9,0 @@ "/dist", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
107294
2336