@girder/core 3.2.7 → 5.0.0-a10
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.
- package/README.md +61 -0
- package/dist-lib/Girder_Favicon.png +0 -0
- package/dist-lib/fontello/node_modules/ansi-regex/index.d.ts +37 -0
- package/dist-lib/fontello/node_modules/ansi-styles/index.d.ts +345 -0
- package/dist-lib/fontello/node_modules/big-integer/BigInteger.d.ts +2393 -0
- package/dist-lib/fontello/node_modules/fontello-cli/node_modules/colors/safe.d.ts +48 -0
- package/dist-lib/fontello/node_modules/has-flag/index.d.ts +39 -0
- package/dist-lib/fontello/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/dist-lib/fontello/node_modules/is-docker/index.d.ts +15 -0
- package/dist-lib/fontello/node_modules/is-plain-object/index.d.ts +5 -0
- package/dist-lib/fontello/node_modules/is-wsl/index.d.ts +15 -0
- package/dist-lib/fontello/node_modules/isobject/index.d.ts +5 -0
- package/dist-lib/fontello/node_modules/open/index.d.ts +88 -0
- package/dist-lib/fontello/node_modules/safe-buffer/index.d.ts +187 -0
- package/dist-lib/fontello/node_modules/strip-ansi/index.d.ts +17 -0
- package/dist-lib/girder-core.js +57770 -0
- package/dist-lib/girder-core.js.map +1 -0
- package/dist-lib/girder-core.umd.cjs +1572 -0
- package/dist-lib/girder-core.umd.cjs.map +1 -0
- package/dist-lib/index.d.ts +1 -0
- package/{auth.js → dist-lib/src/auth.js} +1 -41
- package/{collections → dist-lib/src/collections}/AssetstoreCollection.js +2 -1
- package/{constants.js → dist-lib/src/constants.js} +0 -1
- package/dist-lib/src/index.d.ts +23 -0
- package/dist-lib/src/index.ts +80 -0
- package/dist-lib/src/main.ts +46 -0
- package/{models → dist-lib/src/models}/FolderModel.js +1 -1
- package/{rest.js → dist-lib/src/rest.js} +12 -7
- package/{routes.js → dist-lib/src/routes.js} +65 -67
- package/{templates → dist-lib/src/templates}/body/assetstores.pug +0 -15
- package/{templates → dist-lib/src/templates}/body/frontPage.pug +1 -1
- package/{templates → dist-lib/src/templates}/body/systemConfiguration.pug +37 -42
- package/{templates → dist-lib/src/templates}/widgets/editAssetstoreWidget.pug +4 -12
- package/{templates → dist-lib/src/templates}/widgets/newAssetstore.pug +4 -35
- package/dist-lib/src/utilities/EventStream.js +111 -0
- package/{utilities → dist-lib/src/utilities}/S3UploadHandler.js +4 -44
- package/dist-lib/src/version.js +6 -0
- package/{views → dist-lib/src/views}/View.js +2 -1
- package/{views → dist-lib/src/views}/body/AssetstoresView.js +24 -26
- package/{views → dist-lib/src/views}/body/SystemConfigurationView.js +1 -20
- package/{views → dist-lib/src/views}/body/index.js +2 -1
- package/{views → dist-lib/src/views}/layout/LoginView.js +1 -1
- package/{views → dist-lib/src/views}/widgets/ApiKeyListWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/DateTimeRangeWidget.js +2 -1
- package/{views → dist-lib/src/views}/widgets/DateTimeWidget.js +2 -1
- package/{views → dist-lib/src/views}/widgets/EditApiKeyWidget.js +3 -1
- package/{views → dist-lib/src/views}/widgets/EditAssetstoreWidget.js +4 -16
- package/{views → dist-lib/src/views}/widgets/ItemListWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/MetadataWidget.js +7 -3
- package/{views → dist-lib/src/views}/widgets/NewAssetstoreWidget.js +2 -11
- package/{views → dist-lib/src/views}/widgets/PaginateWidget.js +2 -2
- package/{views → dist-lib/src/views}/widgets/RootSelectorWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/SearchPaginateWidget.js +2 -2
- package/{views → dist-lib/src/views}/widgets/SortCollectionWidget.js +1 -1
- package/{views → dist-lib/src/views}/widgets/index.js +7 -1
- package/dist-lib/src/vite-env.d.ts +5 -0
- package/dist-lib/style.css +16 -0
- package/package.json +80 -31
- package/index.js +0 -31
- package/main.js +0 -21
- package/utilities/EventStream.js +0 -177
- package/version.js +0 -10
- /package/{assets → dist-lib}/Girder_Mark.png +0 -0
- /package/{collections → dist-lib/src/collections}/ApiKeyCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/Collection.js +0 -0
- /package/{collections → dist-lib/src/collections}/CollectionCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/FileCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/FolderCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/GroupCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/ItemCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/UserCollection.js +0 -0
- /package/{collections → dist-lib/src/collections}/index.js +0 -0
- /package/{dialog.js → dist-lib/src/dialog.js} +0 -0
- /package/{events.js → dist-lib/src/events.js} +0 -0
- /package/{misc.js → dist-lib/src/misc.js} +0 -0
- /package/{models → dist-lib/src/models}/AccessControlledModel.js +0 -0
- /package/{models → dist-lib/src/models}/ApiKeyModel.js +0 -0
- /package/{models → dist-lib/src/models}/AssetstoreModel.js +0 -0
- /package/{models → dist-lib/src/models}/CollectionCreationPolicyModel.js +0 -0
- /package/{models → dist-lib/src/models}/CollectionModel.js +0 -0
- /package/{models → dist-lib/src/models}/FileModel.js +0 -0
- /package/{models → dist-lib/src/models}/GroupModel.js +0 -0
- /package/{models → dist-lib/src/models}/ItemModel.js +0 -0
- /package/{models → dist-lib/src/models}/MetadataMixin.js +0 -0
- /package/{models → dist-lib/src/models}/Model.js +0 -0
- /package/{models → dist-lib/src/models}/UserModel.js +0 -0
- /package/{models → dist-lib/src/models}/index.js +0 -0
- /package/{pluginUtils.js → dist-lib/src/pluginUtils.js} +0 -0
- /package/{router.js → dist-lib/src/router.js} +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/apidocs/apidocs.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/adminConsole.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/assetstores.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/collectionList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/collectionPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/frontPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/groupList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/groupPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/itemPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/plugins.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/searchResultsList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/systemConfig.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/userAccount.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/userList.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/body/userPage.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/footer.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/global.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/globalNav.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/header.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/headerUser.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/layout.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/layoutVars.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/loading.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/layout/progressArea.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/accessWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/browserWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/hierarchyWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/markdownWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/metadataWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/searchFieldWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/taskProgress.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/timelineWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/uploadWidget.styl +0 -0
- /package/{stylesheets → dist-lib/src/stylesheets}/widgets/userOtpManagementWidget.styl +0 -0
- /package/{templates → dist-lib/src/templates}/body/adminConsole.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/collectionList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/collectionPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/filesystemImport.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/groupList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/groupPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/itemPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/plugins.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/s3Import.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/searchResults.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/searchResultsType.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/userAccount.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/userList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/body/userPage.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/alert.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layout.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutFooter.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutGlobalNav.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutHeader.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutHeaderUser.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/layoutProgressArea.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/loginDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/registerDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/layout/resetPasswordDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEditor.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEditorMixins.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEditorNonModal.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/accessEntry.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/apiKeyList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/browserWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/checkedActionsMenu.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/collectionInfoDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/confirmDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/dateTimeRangeWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/dateTimeWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editApiKeyWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editCollectionWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editFileWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editFolderWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editGroupWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/editItemWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/fileInfoDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/fileList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/folderInfoDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/folderList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupAdminList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupInviteDialog.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupInviteList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupMemberList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/groupModList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/hierarchyBreadcrumb.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/hierarchyPaginated.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/hierarchyWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/itemBreadcrumb.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/itemList.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/jsonMetadatumEditWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/jsonMetadatumView.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/loadingAnimation.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/markdownWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/metadataWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/metadatumEditWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/metadatumView.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/paginateWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/pluginConfigBreadcrumb.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/rootSelectorWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchField.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchHelp.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchModeSelect.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/searchResults.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/sortCollectionWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/taskProgress.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/timeline.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/uploadWidget.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/uploadWidgetMixins.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/uploadWidgetNonModal.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/userOtpBegin.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/userOtpDisable.pug +0 -0
- /package/{templates → dist-lib/src/templates}/widgets/userOtpEnable.pug +0 -0
- /package/{utilities → dist-lib/src/utilities}/PluginUtils.js +0 -0
- /package/{utilities → dist-lib/src/utilities}/index.js +0 -0
- /package/{utilities → dist-lib/src/utilities}/jquery/girderEnable.js +0 -0
- /package/{utilities → dist-lib/src/utilities}/jquery/girderModal.js +0 -0
- /package/{views → dist-lib/src/views}/App.js +0 -0
- /package/{views → dist-lib/src/views}/body/AdminView.js +0 -0
- /package/{views → dist-lib/src/views}/body/CollectionView.js +0 -0
- /package/{views → dist-lib/src/views}/body/CollectionsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/FilesystemImportView.js +0 -0
- /package/{views → dist-lib/src/views}/body/FolderView.js +0 -0
- /package/{views → dist-lib/src/views}/body/FrontPageView.js +0 -0
- /package/{views → dist-lib/src/views}/body/GroupView.js +0 -0
- /package/{views → dist-lib/src/views}/body/GroupsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/ItemView.js +0 -0
- /package/{views → dist-lib/src/views}/body/PluginsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/S3ImportView.js +0 -0
- /package/{views → dist-lib/src/views}/body/SearchResultsView.js +0 -0
- /package/{views → dist-lib/src/views}/body/UserAccountView.js +0 -0
- /package/{views → dist-lib/src/views}/body/UserView.js +0 -0
- /package/{views → dist-lib/src/views}/body/UsersView.js +0 -0
- /package/{views → dist-lib/src/views}/index.js +0 -0
- /package/{views → dist-lib/src/views}/layout/FooterView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/GlobalNavView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/HeaderUserView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/HeaderView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/ProgressListView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/RegisterView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/ResetPasswordView.js +0 -0
- /package/{views → dist-lib/src/views}/layout/index.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/AccessWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/BrowserWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/CheckedMenuWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/CollectionInfoWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditCollectionWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditFileWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditFolderWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditGroupWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/EditItemWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FileInfoWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FileListWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FolderInfoWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/FolderListWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupAdminsWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupInvitesWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupMembersWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/GroupModsWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/HierarchyWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/ItemBreadcrumbWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/LoadingAnimation.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/MarkdownWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/PluginConfigBreadcrumbWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/SearchFieldWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/TaskProgressWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/TimelineWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/UploadWidget.js +0 -0
- /package/{views → dist-lib/src/views}/widgets/UserOtpManagementWidget.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/index'
|
|
@@ -7,42 +7,6 @@ import { restRequest } from '@girder/core/rest';
|
|
|
7
7
|
// TODO: this might need some fixing/testing, as it seems that
|
|
8
8
|
// girder.corsAuth could be an override. See login doc below.
|
|
9
9
|
var corsAuth = false;
|
|
10
|
-
|
|
11
|
-
// TODO delete in next major version
|
|
12
|
-
var cookie = {
|
|
13
|
-
findAll: function () {
|
|
14
|
-
var cookies = {};
|
|
15
|
-
_(document.cookie.split(';'))
|
|
16
|
-
.chain()
|
|
17
|
-
.map(function (m) {
|
|
18
|
-
return m.replace(/^\s+/, '').replace(/\s+$/, '');
|
|
19
|
-
})
|
|
20
|
-
.each(function (c) {
|
|
21
|
-
var arr = c.split('='),
|
|
22
|
-
key = arr[0],
|
|
23
|
-
value = null,
|
|
24
|
-
size = _.size(arr);
|
|
25
|
-
if (size > 1) {
|
|
26
|
-
value = arr.slice(1).join('');
|
|
27
|
-
}
|
|
28
|
-
cookies[key] = value;
|
|
29
|
-
});
|
|
30
|
-
return cookies;
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
find: function (name) {
|
|
34
|
-
var foundCookie = null,
|
|
35
|
-
list = this.findAll();
|
|
36
|
-
|
|
37
|
-
_.each(list, function (value, key) {
|
|
38
|
-
if (key === name) {
|
|
39
|
-
foundCookie = value;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
return foundCookie;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
|
|
46
10
|
var currentUser = null;
|
|
47
11
|
var currentToken = window.localStorage.getItem('girderToken');
|
|
48
12
|
|
|
@@ -85,12 +49,9 @@ function basicAuthEncode(username, password) {
|
|
|
85
49
|
*
|
|
86
50
|
* @param username The username or email to login as.
|
|
87
51
|
* @param password The password to use.
|
|
88
|
-
* @param cors If the girder server is on a different origin, set this
|
|
89
|
-
* to "true" to save the auth cookie on the current domain. Alternatively,
|
|
90
|
-
* you may set the global option "girder.corsAuth = true".
|
|
91
52
|
* @param otpToken An optional one-time password to include with the login.
|
|
92
53
|
*/
|
|
93
|
-
function login(username, password,
|
|
54
|
+
function login(username, password, otpToken = null) {
|
|
94
55
|
var auth = basicAuthEncode(username, password);
|
|
95
56
|
|
|
96
57
|
const headers = {
|
|
@@ -140,7 +101,6 @@ function logout() {
|
|
|
140
101
|
}
|
|
141
102
|
|
|
142
103
|
export {
|
|
143
|
-
cookie,
|
|
144
104
|
corsAuth,
|
|
145
105
|
getCurrentUser,
|
|
146
106
|
setCurrentUser,
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
declare const girder: {
|
|
2
|
+
$: any;
|
|
3
|
+
_: any;
|
|
4
|
+
Backbone: any;
|
|
5
|
+
moment: any;
|
|
6
|
+
initializeDefaultApp: (apiRoot: string, el?: string | HTMLElement) => Promise<unknown>;
|
|
7
|
+
auth: any;
|
|
8
|
+
collections: any;
|
|
9
|
+
constants: any;
|
|
10
|
+
dialog: any;
|
|
11
|
+
events: any;
|
|
12
|
+
misc: any;
|
|
13
|
+
models: any;
|
|
14
|
+
plugins: {};
|
|
15
|
+
pluginUtils: any;
|
|
16
|
+
rest: any;
|
|
17
|
+
router: any;
|
|
18
|
+
utilities: any;
|
|
19
|
+
version: any;
|
|
20
|
+
views: any;
|
|
21
|
+
};
|
|
22
|
+
export type Girder = typeof girder;
|
|
23
|
+
export { girder, };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import $ from 'jquery';
|
|
2
|
+
|
|
3
|
+
import _ from 'underscore';
|
|
4
|
+
|
|
5
|
+
import Backbone from 'backbone';
|
|
6
|
+
|
|
7
|
+
import moment from 'moment';
|
|
8
|
+
|
|
9
|
+
import * as auth from './auth';
|
|
10
|
+
import * as collections from './collections';
|
|
11
|
+
import * as constants from './constants';
|
|
12
|
+
import * as dialog from './dialog';
|
|
13
|
+
import * as misc from './misc';
|
|
14
|
+
import * as models from './models';
|
|
15
|
+
import * as pluginUtils from './pluginUtils';
|
|
16
|
+
import * as rest from './rest';
|
|
17
|
+
import * as utilities from './utilities';
|
|
18
|
+
import * as views from './views';
|
|
19
|
+
import events from './events';
|
|
20
|
+
import router from './router';
|
|
21
|
+
import version from './version';
|
|
22
|
+
|
|
23
|
+
const initializeDefaultApp = async (apiRoot: string, el: string | HTMLElement = 'body') => {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
$(() => {
|
|
26
|
+
rest.setApiRoot(apiRoot);
|
|
27
|
+
events.trigger('g:appload.before');
|
|
28
|
+
rest.restRequest({
|
|
29
|
+
url: `system/public_settings`,
|
|
30
|
+
method: 'GET',
|
|
31
|
+
}).done((resp: any) => {
|
|
32
|
+
const app = new views.App({
|
|
33
|
+
el,
|
|
34
|
+
parentView: null,
|
|
35
|
+
contactEmail: resp['core.contact_email_address'],
|
|
36
|
+
privacyNoticeHref: resp['core.privacy_notice'],
|
|
37
|
+
brandName: resp['core.brand_name'],
|
|
38
|
+
bannerColor: resp['core.banner_color'],
|
|
39
|
+
registrationPolicy: resp['core.registration_policy'],
|
|
40
|
+
enablePasswordLogin: resp['core.enable_password_login'],
|
|
41
|
+
});
|
|
42
|
+
app.render();
|
|
43
|
+
document.title = resp['core.brand_name'];
|
|
44
|
+
events.trigger('g:appload.after', app);
|
|
45
|
+
resolve(app);
|
|
46
|
+
}).fail((resp: any) => {
|
|
47
|
+
events.trigger('g:error', resp);
|
|
48
|
+
reject(new Error("Could not retrieve public settings from server."));
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
const girder = {
|
|
55
|
+
$,
|
|
56
|
+
_,
|
|
57
|
+
Backbone,
|
|
58
|
+
moment,
|
|
59
|
+
initializeDefaultApp,
|
|
60
|
+
auth,
|
|
61
|
+
collections,
|
|
62
|
+
constants,
|
|
63
|
+
dialog,
|
|
64
|
+
events,
|
|
65
|
+
misc,
|
|
66
|
+
models,
|
|
67
|
+
plugins: {},
|
|
68
|
+
pluginUtils,
|
|
69
|
+
rest,
|
|
70
|
+
router,
|
|
71
|
+
utilities,
|
|
72
|
+
version,
|
|
73
|
+
views
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
export type Girder = typeof girder;
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
girder,
|
|
80
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { girder } from '.';
|
|
2
|
+
|
|
3
|
+
declare global {
|
|
4
|
+
interface Window {
|
|
5
|
+
girder: typeof girder;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
window.girder = girder;
|
|
9
|
+
|
|
10
|
+
interface StaticFilesSpec {
|
|
11
|
+
css: string[],
|
|
12
|
+
js: string[],
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const apiRoot = import.meta.env.VITE_API_ROOT ?? '/api/v1';
|
|
16
|
+
|
|
17
|
+
(async () => {
|
|
18
|
+
const origin = apiRoot.startsWith('/') ? window.origin : new URL(apiRoot).origin;
|
|
19
|
+
const staticFilesResp = await fetch(`${apiRoot}/system/plugin_static_files`);
|
|
20
|
+
const staticFiles: StaticFilesSpec = await staticFilesResp.json();
|
|
21
|
+
|
|
22
|
+
staticFiles.css.forEach((href) => {
|
|
23
|
+
const link = document.createElement('link');
|
|
24
|
+
link.rel = 'stylesheet';
|
|
25
|
+
link.type = 'text/css';
|
|
26
|
+
link.href = new URL(href, origin).href;
|
|
27
|
+
document.head.appendChild(link);
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Since plugin JS files may implicitly depend on each other at import time, we can't load
|
|
31
|
+
// them in parallel. They already come to us in topoligically sorted order, so we can safely
|
|
32
|
+
// load them one after the other.
|
|
33
|
+
for (const href of staticFiles.js) {
|
|
34
|
+
await new Promise<void>((resolve) => {
|
|
35
|
+
const script = document.createElement('script');
|
|
36
|
+
script.type = 'text/javascript';
|
|
37
|
+
script.src = new URL(href, origin).href;
|
|
38
|
+
document.head.appendChild(script);
|
|
39
|
+
script.addEventListener('load', function() {
|
|
40
|
+
resolve();
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
await girder.initializeDefaultApp(apiRoot);
|
|
46
|
+
})();
|
|
@@ -20,7 +20,7 @@ var FolderModel = AccessControlledModel.extend({
|
|
|
20
20
|
return restRequest({
|
|
21
21
|
url: `${this.resourceName}/${this.id}/contents`,
|
|
22
22
|
method: 'DELETE'
|
|
23
|
-
}).done((
|
|
23
|
+
}).done(() => {
|
|
24
24
|
this.trigger('g:success');
|
|
25
25
|
}).fail((err) => {
|
|
26
26
|
this.trigger('g:error', err);
|
|
@@ -31,13 +31,6 @@ function setApiRoot(root) {
|
|
|
31
31
|
apiRoot = root.replace(/\/$/, '');
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
// Initialize the API root (at JS load time)
|
|
35
|
-
// This could be overridden when the App is started, but we need sensible defaults so models, etc.
|
|
36
|
-
// can be easily used without having to start an App or explicitly set these values
|
|
37
|
-
setApiRoot(
|
|
38
|
-
$('#g-global-info-apiroot').text().replace('%HOST%', window.location.origin) || '/api/v1'
|
|
39
|
-
);
|
|
40
|
-
|
|
41
34
|
/**
|
|
42
35
|
* Make a request to the REST API.
|
|
43
36
|
*
|
|
@@ -128,6 +121,18 @@ const restRequest = function (opts) {
|
|
|
128
121
|
// Overwrite defaults with passed opts, but do not mutate opts
|
|
129
122
|
const args = _.extend({}, defaults, opts);
|
|
130
123
|
|
|
124
|
+
try {
|
|
125
|
+
// If the data is too large for a GET or PUT request, convert it to a POST request.
|
|
126
|
+
// Girder's REST API handles this for all requests.
|
|
127
|
+
if ((!args.method || args.method === 'GET' || args.method === 'PUT') && args.data && !args.contentType) {
|
|
128
|
+
if (JSON.stringify(args.data).length > 1536) {
|
|
129
|
+
args.headers = args.header || {};
|
|
130
|
+
args.headers['X-HTTP-Method-Override'] = args.method || 'GET';
|
|
131
|
+
args.method = 'POST';
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
} catch (err) { }
|
|
135
|
+
|
|
131
136
|
if (!args.url) {
|
|
132
137
|
throw new Error('restRequest requires a "url" argument');
|
|
133
138
|
}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
/* eslint-disable import/first */
|
|
2
|
-
|
|
3
1
|
import router from '@girder/core/router';
|
|
4
2
|
import events from '@girder/core/events';
|
|
5
3
|
import eventStream from '@girder/core/utilities/EventStream';
|
|
@@ -10,14 +8,76 @@ import { restRequest } from '@girder/core/rest';
|
|
|
10
8
|
* Admin
|
|
11
9
|
*/
|
|
12
10
|
import AdminView from '@girder/core/views/body/AdminView';
|
|
13
|
-
router.route('admin', 'admin', function () {
|
|
14
|
-
events.trigger('g:navigateTo', AdminView);
|
|
15
|
-
});
|
|
16
11
|
|
|
17
12
|
/**
|
|
18
13
|
* Assetstores
|
|
19
14
|
*/
|
|
20
15
|
import AssetstoresView from '@girder/core/views/body/AssetstoresView';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Collections
|
|
19
|
+
*/
|
|
20
|
+
import CollectionsView from '@girder/core/views/body/CollectionsView';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Collection
|
|
24
|
+
*/
|
|
25
|
+
import CollectionView from '@girder/core/views/body/CollectionView';
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Folder
|
|
29
|
+
*/
|
|
30
|
+
import FolderView from '@girder/core/views/body/FolderView';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* FrontPage
|
|
34
|
+
*/
|
|
35
|
+
import FrontPageView from '@girder/core/views/body/FrontPageView';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Groups
|
|
39
|
+
*/
|
|
40
|
+
import GroupsView from '@girder/core/views/body/GroupsView';
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Group
|
|
44
|
+
*/
|
|
45
|
+
import GroupView from '@girder/core/views/body/GroupView';
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Item
|
|
49
|
+
*/
|
|
50
|
+
import ItemView from '@girder/core/views/body/ItemView';
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Plugins
|
|
54
|
+
*/
|
|
55
|
+
import PluginsView from '@girder/core/views/body/PluginsView';
|
|
56
|
+
import UsersView from '@girder/core/views/body/UsersView';
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* SystemConfiguration
|
|
60
|
+
*/
|
|
61
|
+
import SystemConfigurationView from '@girder/core/views/body/SystemConfigurationView';
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* UserAccount
|
|
65
|
+
*/
|
|
66
|
+
import UserAccountView from '@girder/core/views/body/UserAccountView';
|
|
67
|
+
import UserModel from '@girder/core/models/UserModel';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* User
|
|
71
|
+
*/
|
|
72
|
+
import UserView from '@girder/core/views/body/UserView';
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* SearchResults
|
|
76
|
+
*/
|
|
77
|
+
import SearchResultsView from '@girder/core/views/body/SearchResultsView';
|
|
78
|
+
router.route('admin', 'admin', function () {
|
|
79
|
+
events.trigger('g:navigateTo', AdminView);
|
|
80
|
+
});
|
|
21
81
|
router.route('assetstores', 'assetstores', function (params) {
|
|
22
82
|
events.trigger('g:navigateTo', AssetstoresView, {
|
|
23
83
|
assetstoreEdit: params.dialog === 'assetstoreedit' ? params.dialogid : false
|
|
@@ -26,20 +86,10 @@ router.route('assetstores', 'assetstores', function (params) {
|
|
|
26
86
|
router.route('assetstore/:id/import', 'assetstoreImport', function (assetstoreId) {
|
|
27
87
|
AssetstoresView.import(assetstoreId);
|
|
28
88
|
});
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Collections
|
|
32
|
-
*/
|
|
33
|
-
import CollectionsView from '@girder/core/views/body/CollectionsView';
|
|
34
89
|
router.route('collections', 'collections', function (params) {
|
|
35
90
|
events.trigger('g:navigateTo', CollectionsView, params || {});
|
|
36
91
|
events.trigger('g:highlightItem', 'CollectionsView');
|
|
37
92
|
});
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Collection
|
|
41
|
-
*/
|
|
42
|
-
import CollectionView from '@girder/core/views/body/CollectionView';
|
|
43
93
|
router.route('collection/:id', 'collectionAccess', function (cid, params) {
|
|
44
94
|
CollectionView.fetchAndInit(cid, {
|
|
45
95
|
access: params.dialog === 'access',
|
|
@@ -60,11 +110,6 @@ router.route('collection/:id/folder/:id', 'collectionFolder', function (cid, fol
|
|
|
60
110
|
itemCreate: params.dialog === 'itemcreate'
|
|
61
111
|
});
|
|
62
112
|
});
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Folder
|
|
66
|
-
*/
|
|
67
|
-
import FolderView from '@girder/core/views/body/FolderView';
|
|
68
113
|
router.route('folder/:id', 'folder', function (id, params) {
|
|
69
114
|
FolderView.fetchAndInit(id, {
|
|
70
115
|
upload: params.dialog === 'upload',
|
|
@@ -74,28 +119,13 @@ router.route('folder/:id', 'folder', function (id, params) {
|
|
|
74
119
|
itemCreate: params.dialog === 'itemcreate'
|
|
75
120
|
});
|
|
76
121
|
});
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* FrontPage
|
|
80
|
-
*/
|
|
81
|
-
import FrontPageView from '@girder/core/views/body/FrontPageView';
|
|
82
122
|
router.route('', 'index', function () {
|
|
83
123
|
events.trigger('g:navigateTo', FrontPageView);
|
|
84
124
|
});
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Groups
|
|
88
|
-
*/
|
|
89
|
-
import GroupsView from '@girder/core/views/body/GroupsView';
|
|
90
125
|
router.route('groups', 'groups', function (params) {
|
|
91
126
|
events.trigger('g:navigateTo', GroupsView, params || {});
|
|
92
127
|
events.trigger('g:highlightItem', 'GroupsView');
|
|
93
128
|
});
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Group
|
|
97
|
-
*/
|
|
98
|
-
import GroupView from '@girder/core/views/body/GroupView';
|
|
99
129
|
router.route('group/:id', 'groupView', function (groupId, params) {
|
|
100
130
|
GroupView.fetchAndInit(groupId, {
|
|
101
131
|
edit: params.dialog === 'edit'
|
|
@@ -107,11 +137,6 @@ router.route('group/:id/:tab', 'groupView', function (groupId, tab, params) {
|
|
|
107
137
|
tab: tab
|
|
108
138
|
});
|
|
109
139
|
});
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* Item
|
|
113
|
-
*/
|
|
114
|
-
import ItemView from '@girder/core/views/body/ItemView';
|
|
115
140
|
router.route('item/:id', 'item', function (itemId, params) {
|
|
116
141
|
ItemView.fetchAndInit(itemId, {
|
|
117
142
|
edit: params.dialog === 'itemedit',
|
|
@@ -119,29 +144,12 @@ router.route('item/:id', 'item', function (itemId, params) {
|
|
|
119
144
|
upload: params.dialog === 'upload' ? params.dialogid : false
|
|
120
145
|
});
|
|
121
146
|
});
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Plugins
|
|
125
|
-
*/
|
|
126
|
-
import PluginsView from '@girder/core/views/body/PluginsView';
|
|
127
|
-
import UsersView from '@girder/core/views/body/UsersView';
|
|
128
147
|
router.route('plugins', 'plugins', function () {
|
|
129
148
|
events.trigger('g:navigateTo', PluginsView);
|
|
130
149
|
});
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* SystemConfiguration
|
|
134
|
-
*/
|
|
135
|
-
import SystemConfigurationView from '@girder/core/views/body/SystemConfigurationView';
|
|
136
150
|
router.route('settings', 'settings', function () {
|
|
137
151
|
events.trigger('g:navigateTo', SystemConfigurationView);
|
|
138
152
|
});
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* UserAccount
|
|
142
|
-
*/
|
|
143
|
-
import UserAccountView from '@girder/core/views/body/UserAccountView';
|
|
144
|
-
import UserModel from '@girder/core/models/UserModel';
|
|
145
153
|
router.route('useraccount/:id/:tab', 'accountTab', function (id, tab) {
|
|
146
154
|
UserAccountView.fetchAndInit(id, tab);
|
|
147
155
|
});
|
|
@@ -197,11 +205,6 @@ router.route('users', 'users', function (params) {
|
|
|
197
205
|
events.trigger('g:navigateTo', UsersView, params || {});
|
|
198
206
|
events.trigger('g:highlightItem', 'UsersView');
|
|
199
207
|
});
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* User
|
|
203
|
-
*/
|
|
204
|
-
import UserView from '@girder/core/views/body/UserView';
|
|
205
208
|
router.route('user/:id', 'user', function (userId, params) {
|
|
206
209
|
UserView.fetchAndInit(userId, {
|
|
207
210
|
folderCreate: params.dialog === 'foldercreate',
|
|
@@ -218,11 +221,6 @@ router.route('user/:id/folder/:id', 'userFolder', function (userId, folderId, pa
|
|
|
218
221
|
itemCreate: params.dialog === 'itemcreate'
|
|
219
222
|
});
|
|
220
223
|
});
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
* SearchResults
|
|
224
|
-
*/
|
|
225
|
-
import SearchResultsView from '@girder/core/views/body/SearchResultsView';
|
|
226
224
|
router.route('search/results', 'SearchResults', function (params) {
|
|
227
225
|
events.trigger('g:navigateTo', SearchResultsView, {
|
|
228
226
|
query: params.query,
|
|
@@ -31,21 +31,6 @@
|
|
|
31
31
|
div
|
|
32
32
|
b File creation permissions (octal):
|
|
33
33
|
span.g-assetstore-perms #{(assetstore.get('perms') || 0o600).toString(8)}
|
|
34
|
-
else if assetstore.get('type') === types.GRIDFS
|
|
35
|
-
div
|
|
36
|
-
b Type:
|
|
37
|
-
span.g-assetstore-type GridFS
|
|
38
|
-
div
|
|
39
|
-
b Database name:
|
|
40
|
-
span.g-assetstore-root #{assetstore.get('db')}
|
|
41
|
-
if assetstore.get('mongohost')
|
|
42
|
-
div
|
|
43
|
-
b Mongo Host URI:
|
|
44
|
-
span.g-assetstore-mongohost #{assetstore.get('mongohost')}
|
|
45
|
-
if assetstore.get('replicaset')
|
|
46
|
-
div
|
|
47
|
-
b Replica Set:
|
|
48
|
-
span.g-assetstore-replicaset #{assetstore.get('replicaset')}
|
|
49
34
|
else if assetstore.get('type') === types.S3
|
|
50
35
|
div
|
|
51
36
|
b Type:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.g-frontpage-header
|
|
2
2
|
.g-frontpage-logo-container
|
|
3
|
-
img.g-frontpage-logo(src=
|
|
3
|
+
img.g-frontpage-logo(src='Girder_Mark.png')
|
|
4
4
|
.g-frontpage-title-container
|
|
5
5
|
.g-frontpage-title #{brandName}
|
|
6
6
|
.g-frontpage-subtitle Data management platform
|