mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
Bump dependencies versions
This commit is contained in:
@@ -6,6 +6,7 @@ import {AppModel, reportError} from 'app/client/models/AppModel';
|
||||
import {IProgress} from 'app/client/models/NotifyModel';
|
||||
import {openFilePicker} from 'app/client/ui/FileDialog';
|
||||
import {byteString} from 'app/common/gutil';
|
||||
import { AxiosProgressEvent } from 'axios';
|
||||
import {Disposable} from 'grainjs';
|
||||
|
||||
/**
|
||||
@@ -39,9 +40,9 @@ export async function fileImport(
|
||||
const timezone = await guessTimezone();
|
||||
|
||||
if (workspaceId === "unsaved") {
|
||||
function onUploadProgress(ev: ProgressEvent) {
|
||||
if (ev.lengthComputable) {
|
||||
progress.setUploadProgress(ev.loaded / ev.total * 100); // percentage complete
|
||||
function onUploadProgress(ev: AxiosProgressEvent) {
|
||||
if (ev.event.lengthComputable) {
|
||||
progress.setUploadProgress(ev.event.loaded / ev.event.total * 100); // percentage complete
|
||||
}
|
||||
}
|
||||
return await app.api.importUnsavedDoc(files[0], {timezone, onUploadProgress});
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
WebhookUpdate
|
||||
} from 'app/common/Triggers';
|
||||
import {addCurrentOrgToPath, getGristConfig} from 'app/common/urlUtils';
|
||||
import { AxiosProgressEvent } from 'axios';
|
||||
import omitBy from 'lodash/omitBy';
|
||||
|
||||
|
||||
@@ -405,7 +406,7 @@ export interface UserAPI {
|
||||
importUnsavedDoc(material: UploadType, options?: {
|
||||
filename?: string,
|
||||
timezone?: string,
|
||||
onUploadProgress?: (ev: ProgressEvent) => void,
|
||||
onUploadProgress?: (ev: AxiosProgressEvent) => void,
|
||||
}): Promise<string>;
|
||||
deleteUser(userId: number, name: string): Promise<void>;
|
||||
getBaseUrl(): string; // Get the prefix for all the endpoints this object wraps.
|
||||
@@ -816,7 +817,7 @@ export class UserAPIImpl extends BaseAPI implements UserAPI {
|
||||
public async importUnsavedDoc(material: UploadType, options?: {
|
||||
filename?: string,
|
||||
timezone?: string,
|
||||
onUploadProgress?: (ev: ProgressEvent) => void,
|
||||
onUploadProgress?: (ev: AxiosProgressEvent) => void,
|
||||
}): Promise<string> {
|
||||
options = options || {};
|
||||
const formData = this.newFormData();
|
||||
|
||||
@@ -7,7 +7,7 @@ import * as minio from 'minio';
|
||||
|
||||
// The minio typings appear to be quite stale. Extend them here to avoid
|
||||
// lots of casts to any.
|
||||
type MinIOClient = minio.Client & {
|
||||
export type MinIOClient = minio.Client & {
|
||||
statObject(bucket: string, key: string, options: {versionId?: string}): Promise<MinIOBucketItemStat>;
|
||||
getObject(bucket: string, key: string, options: {versionId?: string}): Promise<IncomingMessage>;
|
||||
listObjects(bucket: string, key: string, recursive: boolean,
|
||||
@@ -132,7 +132,7 @@ export class MinIOExternalStorage implements ExternalStorage {
|
||||
v.lastModified && (v as any).versionId &&
|
||||
(options?.includeDeleteMarkers || !(v as any).isDeleteMarker))
|
||||
.map(v => ({
|
||||
lastModified: v.lastModified.toISOString(),
|
||||
lastModified: v.lastModified!.toISOString(),
|
||||
// Circumvent inconsistency of MinIO API with versionId by casting it to string
|
||||
// PR to MinIO so we don't have to do that anymore:
|
||||
// https://github.com/minio/minio-js/pull/1193
|
||||
|
||||
Reference in New Issue
Block a user