@cool-office/collaboration-client 0.0.0-stage → 1.2.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.
- package/LICENSE +176 -0
- package/README.md +2 -2
- package/lib/cjs/chunk-4MGIQFAJ.js +40 -0
- package/lib/cjs/chunk-JHTS3PZO.js +1882 -0
- package/lib/cjs/facade.js +98 -0
- package/lib/cjs/index.js +209 -0
- package/lib/cjs/locale/ar-SA.js +25 -0
- package/lib/cjs/locale/ca-ES.js +25 -0
- package/lib/cjs/locale/de-DE.js +25 -0
- package/lib/cjs/locale/en-US.js +25 -0
- package/lib/cjs/locale/es-ES.js +25 -0
- package/lib/cjs/locale/fa-IR.js +25 -0
- package/lib/cjs/locale/fr-FR.js +25 -0
- package/lib/cjs/locale/id-ID.js +25 -0
- package/lib/cjs/locale/it-IT.js +25 -0
- package/lib/cjs/locale/ja-JP.js +25 -0
- package/lib/cjs/locale/ko-KR.js +25 -0
- package/lib/cjs/locale/pl-PL.js +25 -0
- package/lib/cjs/locale/pt-BR.js +25 -0
- package/lib/cjs/locale/ru-RU.js +25 -0
- package/lib/cjs/locale/sk-SK.js +25 -0
- package/lib/cjs/locale/vi-VN.js +25 -0
- package/lib/cjs/locale/zh-CN.js +25 -0
- package/lib/cjs/locale/zh-HK.js +25 -0
- package/lib/cjs/locale/zh-TW.js +25 -0
- package/lib/cjs/package.json +1 -0
- package/lib/es/chunk-4MGIQFAJ.js +16 -0
- package/lib/es/chunk-JHTS3PZO.js +1832 -0
- package/lib/es/facade.js +80 -0
- package/lib/es/index.js +186 -0
- package/lib/es/locale/ar-SA.js +7 -0
- package/lib/es/locale/ca-ES.js +7 -0
- package/lib/es/locale/de-DE.js +7 -0
- package/lib/es/locale/en-US.js +7 -0
- package/lib/es/locale/es-ES.js +7 -0
- package/lib/es/locale/fa-IR.js +7 -0
- package/lib/es/locale/fr-FR.js +7 -0
- package/lib/es/locale/id-ID.js +7 -0
- package/lib/es/locale/it-IT.js +7 -0
- package/lib/es/locale/ja-JP.js +7 -0
- package/lib/es/locale/ko-KR.js +7 -0
- package/lib/es/locale/pl-PL.js +7 -0
- package/lib/es/locale/pt-BR.js +7 -0
- package/lib/es/locale/ru-RU.js +7 -0
- package/lib/es/locale/sk-SK.js +7 -0
- package/lib/es/locale/vi-VN.js +7 -0
- package/lib/es/locale/zh-CN.js +7 -0
- package/lib/es/locale/zh-HK.js +7 -0
- package/lib/es/locale/zh-TW.js +7 -0
- package/lib/types/src/assets.d.ts +41 -0
- package/lib/types/src/authorization.d.ts +31 -0
- package/lib/types/src/changeset-submitter.d.ts +80 -0
- package/lib/types/src/document-object-resources.d.ts +4 -0
- package/lib/types/src/document-recovery.d.ts +82 -0
- package/lib/types/src/document-undo.d.ts +9 -0
- package/lib/types/src/facade/index.d.ts +46 -0
- package/lib/types/src/index.d.ts +14 -0
- package/lib/types/src/locale/ar-SA.d.ts +20 -0
- package/lib/types/src/locale/ca-ES.d.ts +20 -0
- package/lib/types/src/locale/de-DE.d.ts +20 -0
- package/lib/types/src/locale/en-US.d.ts +20 -0
- package/lib/types/src/locale/es-ES.d.ts +20 -0
- package/lib/types/src/locale/fa-IR.d.ts +20 -0
- package/lib/types/src/locale/fr-FR.d.ts +20 -0
- package/lib/types/src/locale/id-ID.d.ts +20 -0
- package/lib/types/src/locale/it-IT.d.ts +20 -0
- package/lib/types/src/locale/ja-JP.d.ts +20 -0
- package/lib/types/src/locale/ko-KR.d.ts +20 -0
- package/lib/types/src/locale/pl-PL.d.ts +20 -0
- package/lib/types/src/locale/pt-BR.d.ts +20 -0
- package/lib/types/src/locale/ru-RU.d.ts +20 -0
- package/lib/types/src/locale/sk-SK.d.ts +20 -0
- package/lib/types/src/locale/vi-VN.d.ts +20 -0
- package/lib/types/src/locale/zh-CN.d.ts +20 -0
- package/lib/types/src/locale/zh-HK.d.ts +20 -0
- package/lib/types/src/locale/zh-TW.d.ts +20 -0
- package/lib/types/src/revision-recovery.d.ts +93 -0
- package/lib/types/src/session.d.ts +85 -0
- package/lib/types/src/snapshot-server.d.ts +25 -0
- package/lib/types/src/socket.d.ts +46 -0
- package/lib/types/src/workspace.d.ts +100 -0
- package/package.json +160 -4
package/lib/es/facade.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CollaborationController,
|
|
3
|
+
CollaborationStatus,
|
|
4
|
+
MemberService
|
|
5
|
+
} from "./chunk-JHTS3PZO.js";
|
|
6
|
+
import "./chunk-4MGIQFAJ.js";
|
|
7
|
+
|
|
8
|
+
// src/facade/index.ts
|
|
9
|
+
import { SnapshotService } from "@cool-office/collaboration";
|
|
10
|
+
import { IUniverInstanceService, toDisposable } from "@cool-office/core";
|
|
11
|
+
import { FEnum, FEventName, FUniver } from "@cool-office/core/facade";
|
|
12
|
+
import { UniverType } from "@cool-office/protocol";
|
|
13
|
+
import { of, switchMap } from "rxjs";
|
|
14
|
+
var FCollaboration = class {
|
|
15
|
+
constructor(api, injector) {
|
|
16
|
+
this.api = api;
|
|
17
|
+
this.injector = injector;
|
|
18
|
+
}
|
|
19
|
+
async load(type, getter, unitId, context) {
|
|
20
|
+
const instances = this.injector.get(IUniverInstanceService);
|
|
21
|
+
const unit = instances.getUnit(unitId, type) ?? await this.injector.get(SnapshotService).loadUnit(type, unitId, 0, context);
|
|
22
|
+
await this.injector.get(CollaborationController).readyForCollab(unitId);
|
|
23
|
+
const api = this.api;
|
|
24
|
+
return api[getter] ? api[getter](unitId) : unit;
|
|
25
|
+
}
|
|
26
|
+
loadSheetAsync(id, context) {
|
|
27
|
+
return this.load(UniverType.UNIVER_SHEET, "getWorkbook", id, context);
|
|
28
|
+
}
|
|
29
|
+
loadDocAsync(id, context) {
|
|
30
|
+
return this.load(UniverType.UNIVER_DOC, "getDocument", id, context);
|
|
31
|
+
}
|
|
32
|
+
loadSlideAsync(id, context) {
|
|
33
|
+
return this.load(UniverType.UNIVER_SLIDE, "getPresentation", id, context);
|
|
34
|
+
}
|
|
35
|
+
loadBoardAsync(id, context) {
|
|
36
|
+
return this.load(UniverType.UNIVER_BOARD, "getBoard", id, context);
|
|
37
|
+
}
|
|
38
|
+
loadBaseAsync(id, context) {
|
|
39
|
+
return this.load(UniverType.UNIVER_BASE, "getBase", id, context);
|
|
40
|
+
}
|
|
41
|
+
focusedId() {
|
|
42
|
+
return this.injector.get(IUniverInstanceService).getFocusedUnit()?.getUnitId();
|
|
43
|
+
}
|
|
44
|
+
getCollaborationStatus(id = this.focusedId()) {
|
|
45
|
+
return id ? this.injector.get(CollaborationController).getStatus(id) : "not_collab" /* NOT_COLLAB */;
|
|
46
|
+
}
|
|
47
|
+
async flush(id = this.focusedId(), options) {
|
|
48
|
+
if (id) await this.injector.get(CollaborationController).flush(id, { timeoutMs: options?.timeout });
|
|
49
|
+
}
|
|
50
|
+
subscribeCollaborators(id, callback) {
|
|
51
|
+
const subscription = this.injector.get(MemberService).waitForRoom$(id).pipe(
|
|
52
|
+
switchMap((room) => room?.members$ ?? of(/* @__PURE__ */ new Map()))
|
|
53
|
+
).subscribe((members) => callback(Array.from(members.values())));
|
|
54
|
+
return toDisposable(() => subscription.unsubscribe());
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
var CollaborationUniverFacade = class extends FUniver {
|
|
58
|
+
getCollaboration() {
|
|
59
|
+
return new FCollaboration(this, this._injector);
|
|
60
|
+
}
|
|
61
|
+
_initialize(injector) {
|
|
62
|
+
this.disposeWithMe(this.registerEventHandler(this.Event.CollaborationStatusChanged, () => injector.get(CollaborationController).statusChanged$.subscribe((event) => this.fireEvent(this.Event.CollaborationStatusChanged, event))));
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
var CollaborationEventName = class extends FEventName {
|
|
66
|
+
get CollaborationStatusChanged() {
|
|
67
|
+
return "CollaborationStatusChanged";
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var CollaborationEnum = class extends FEnum {
|
|
71
|
+
get CollaborationStatus() {
|
|
72
|
+
return CollaborationStatus;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
FEnum.extend(CollaborationEnum);
|
|
76
|
+
FEventName.extend(CollaborationEventName);
|
|
77
|
+
FUniver.extend(CollaborationUniverFacade);
|
|
78
|
+
export {
|
|
79
|
+
FCollaboration
|
|
80
|
+
};
|
package/lib/es/index.js
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import {
|
|
2
|
+
COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,
|
|
3
|
+
CollaborationAttachmentIoService,
|
|
4
|
+
CollaborationController,
|
|
5
|
+
CollaborationImageIoService,
|
|
6
|
+
CollaborationRevisionRecovery,
|
|
7
|
+
CollaborationRevisionRecoveryService,
|
|
8
|
+
CollaborationSession,
|
|
9
|
+
CollaborationSessionService,
|
|
10
|
+
CollaborationSocketService,
|
|
11
|
+
CollaborationStatus,
|
|
12
|
+
CollaborationUIEventId,
|
|
13
|
+
CollaborationUIEventService,
|
|
14
|
+
CommentService,
|
|
15
|
+
DEFAULT_SNAPSHOT_SERVER_URL,
|
|
16
|
+
DocumentCollaborationRecovery,
|
|
17
|
+
DocumentCollaborationUndoService,
|
|
18
|
+
IAttachmentIoService,
|
|
19
|
+
ICollaborationSocketService,
|
|
20
|
+
MemberService,
|
|
21
|
+
SNAPSHOT_URL_KEY,
|
|
22
|
+
SessionStatus,
|
|
23
|
+
SnapshotServerOverHTTPService,
|
|
24
|
+
UniverCollaborationClientPlugin,
|
|
25
|
+
deserializeToCombResponse,
|
|
26
|
+
serializeCombRequest
|
|
27
|
+
} from "./chunk-JHTS3PZO.js";
|
|
28
|
+
import "./chunk-4MGIQFAJ.js";
|
|
29
|
+
|
|
30
|
+
// src/changeset-submitter.ts
|
|
31
|
+
import { HTTPResponseError } from "@cool-office/network";
|
|
32
|
+
import { TimeoutError } from "rxjs";
|
|
33
|
+
var DEFAULT_ACK_TIMEOUT = 2e4;
|
|
34
|
+
var MAX_ACK_TIMEOUT = 12e4;
|
|
35
|
+
var MAX_RETRY_TIMEOUT = 2e4;
|
|
36
|
+
function getRetryDelay(error, backoff) {
|
|
37
|
+
if (error instanceof TimeoutError) return null;
|
|
38
|
+
if (!(error instanceof HTTPResponseError)) return backoff;
|
|
39
|
+
const status = error.status ?? 0;
|
|
40
|
+
if (status !== 0 && status !== 408 && status !== 429 && status < 500) return null;
|
|
41
|
+
const header = error.headers?.get("retry-after")?.[0];
|
|
42
|
+
const seconds = header === void 0 ? NaN : Number(header);
|
|
43
|
+
return Math.max(backoff, Number.isFinite(seconds) && seconds > 0 ? seconds * 1e3 : 0);
|
|
44
|
+
}
|
|
45
|
+
var ChangesetSubmitter = class {
|
|
46
|
+
constructor(reqId, _send, _options = {}) {
|
|
47
|
+
this._send = _send;
|
|
48
|
+
this._options = _options;
|
|
49
|
+
this._attempt = 0;
|
|
50
|
+
this._retryBackoff = 0;
|
|
51
|
+
this._nextDelay = 0;
|
|
52
|
+
this._timer = null;
|
|
53
|
+
this._pendingReason = null;
|
|
54
|
+
this._source = null;
|
|
55
|
+
this._sendToken = 0;
|
|
56
|
+
this._disposed = false;
|
|
57
|
+
this._reqId = reqId;
|
|
58
|
+
this._ackTimeout = _options.ackTimeout ?? DEFAULT_ACK_TIMEOUT;
|
|
59
|
+
this._maxAckTimeout = Math.max(_options.maxAckTimeout ?? MAX_ACK_TIMEOUT, this._ackTimeout);
|
|
60
|
+
this._now = _options.now ?? Date.now;
|
|
61
|
+
this._firstSentAt = this._now();
|
|
62
|
+
}
|
|
63
|
+
get reqId() {
|
|
64
|
+
return this._reqId;
|
|
65
|
+
}
|
|
66
|
+
get attempt() {
|
|
67
|
+
return this._attempt;
|
|
68
|
+
}
|
|
69
|
+
get nextDelayMs() {
|
|
70
|
+
return this._nextDelay;
|
|
71
|
+
}
|
|
72
|
+
get elapsedMs() {
|
|
73
|
+
return this._now() - this._firstSentAt;
|
|
74
|
+
}
|
|
75
|
+
bind(source) {
|
|
76
|
+
if (this._disposed) return;
|
|
77
|
+
this._source = source;
|
|
78
|
+
const reason = this._pendingReason;
|
|
79
|
+
if (reason) {
|
|
80
|
+
this._pendingReason = null;
|
|
81
|
+
this._resend(reason);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
unbind() {
|
|
85
|
+
this._source = null;
|
|
86
|
+
}
|
|
87
|
+
submit(changeset, unsyncedMutationCount, reason) {
|
|
88
|
+
if (this._disposed) return;
|
|
89
|
+
if (reason) this._countResend(reason);
|
|
90
|
+
this.armAckTimeout();
|
|
91
|
+
this._deliver(changeset);
|
|
92
|
+
this._reqId = changeset.reqId ?? this._reqId;
|
|
93
|
+
if (reason) this._notifyResend(reason, unsyncedMutationCount);
|
|
94
|
+
}
|
|
95
|
+
armAckTimeout() {
|
|
96
|
+
this._schedule(this._ackTimeout, "ack_timeout");
|
|
97
|
+
}
|
|
98
|
+
requestRetry() {
|
|
99
|
+
this._schedule(this._retryBackoff, "should_retry");
|
|
100
|
+
}
|
|
101
|
+
dispose() {
|
|
102
|
+
this._disposed = true;
|
|
103
|
+
this._clearTimer();
|
|
104
|
+
this._source = null;
|
|
105
|
+
this._pendingReason = null;
|
|
106
|
+
this._sendToken++;
|
|
107
|
+
}
|
|
108
|
+
_deliver(changeset) {
|
|
109
|
+
const token = ++this._sendToken;
|
|
110
|
+
try {
|
|
111
|
+
const result = this._send(changeset, { timeout: this._ackTimeout });
|
|
112
|
+
if (result) void Promise.resolve(result).catch((error) => this._onRequestFailed(token, error));
|
|
113
|
+
} catch (error) {
|
|
114
|
+
this._onRequestFailed(token, error);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
_onRequestFailed(token, error) {
|
|
118
|
+
if (this._disposed || token !== this._sendToken) return;
|
|
119
|
+
const delay = getRetryDelay(error, this._retryBackoff);
|
|
120
|
+
if (delay !== null) this._schedule(delay, "request_failed");
|
|
121
|
+
}
|
|
122
|
+
_schedule(delay, reason) {
|
|
123
|
+
if (this._disposed) return;
|
|
124
|
+
this._clearTimer();
|
|
125
|
+
this._pendingReason = null;
|
|
126
|
+
this._nextDelay = delay;
|
|
127
|
+
this._timer = setTimeout(() => {
|
|
128
|
+
this._timer = null;
|
|
129
|
+
if (this._source) this._resend(reason);
|
|
130
|
+
else this._pendingReason = reason;
|
|
131
|
+
}, delay);
|
|
132
|
+
}
|
|
133
|
+
_resend(reason) {
|
|
134
|
+
if (this._disposed || !this._source) return;
|
|
135
|
+
const { changeset, unsyncedMutationCount } = this._source();
|
|
136
|
+
this._countResend(reason);
|
|
137
|
+
this.armAckTimeout();
|
|
138
|
+
this._deliver(changeset);
|
|
139
|
+
this._reqId = changeset.reqId ?? this._reqId;
|
|
140
|
+
this._notifyResend(reason, unsyncedMutationCount);
|
|
141
|
+
}
|
|
142
|
+
_countResend(reason) {
|
|
143
|
+
this._attempt++;
|
|
144
|
+
if (reason === "should_retry" || reason === "request_failed") this._retryBackoff = this._retryBackoff === 0 ? 1e3 : Math.min(this._retryBackoff * 2, MAX_RETRY_TIMEOUT);
|
|
145
|
+
else if (reason === "ack_timeout") this._ackTimeout = Math.min(this._ackTimeout * 2, this._maxAckTimeout);
|
|
146
|
+
}
|
|
147
|
+
_notifyResend(reason, unsyncedMutationCount) {
|
|
148
|
+
if (!this._disposed) this._options.onResend?.({ reqId: this._reqId, reason, attempt: this._attempt, elapsedMs: this.elapsedMs, unsyncedMutationCount, nextDelayMs: this._ackTimeout });
|
|
149
|
+
}
|
|
150
|
+
_clearTimer() {
|
|
151
|
+
if (this._timer !== null) {
|
|
152
|
+
clearTimeout(this._timer);
|
|
153
|
+
this._timer = null;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
export {
|
|
158
|
+
COLLABORATION_CLIENT_PLUGIN_CONFIG_KEY,
|
|
159
|
+
ChangesetSubmitter,
|
|
160
|
+
CollaborationAttachmentIoService,
|
|
161
|
+
CollaborationController,
|
|
162
|
+
CollaborationImageIoService,
|
|
163
|
+
CollaborationRevisionRecovery,
|
|
164
|
+
CollaborationRevisionRecoveryService,
|
|
165
|
+
CollaborationSession,
|
|
166
|
+
CollaborationSessionService,
|
|
167
|
+
CollaborationSocketService,
|
|
168
|
+
CollaborationStatus,
|
|
169
|
+
CollaborationUIEventId,
|
|
170
|
+
CollaborationUIEventService,
|
|
171
|
+
CommentService,
|
|
172
|
+
DEFAULT_ACK_TIMEOUT,
|
|
173
|
+
DEFAULT_SNAPSHOT_SERVER_URL,
|
|
174
|
+
DocumentCollaborationRecovery,
|
|
175
|
+
DocumentCollaborationUndoService,
|
|
176
|
+
IAttachmentIoService,
|
|
177
|
+
ICollaborationSocketService,
|
|
178
|
+
MAX_ACK_TIMEOUT,
|
|
179
|
+
MemberService,
|
|
180
|
+
SNAPSHOT_URL_KEY,
|
|
181
|
+
SessionStatus,
|
|
182
|
+
SnapshotServerOverHTTPService,
|
|
183
|
+
UniverCollaborationClientPlugin,
|
|
184
|
+
deserializeToCombResponse,
|
|
185
|
+
serializeCombRequest
|
|
186
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/ar-SA.ts
|
|
4
|
+
var ar_SA_default = { collaborationClient: { status: { synced: "\u0645\u062A\u0635\u0644", connecting: "\u062C\u0627\u0631\u064D \u0627\u0644\u0627\u062A\u0635\u0627\u0644", pending: "\u062C\u0627\u0631\u064D \u0627\u0644\u062D\u0641\u0638", offline: "\u063A\u064A\u0631 \u0645\u062A\u0635\u0644", conflict: "\u062A\u0639\u0627\u0631\u0636 \u0627\u0644\u0645\u0632\u0627\u0645\u0646\u0629", conflictDetail: "\u062A\u0648\u062C\u062F \u062A\u0639\u062F\u064A\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u062D\u0641\u0648\u0638\u0629. \u0623\u0628\u0642\u0650 \u0647\u0630\u0647 \u0627\u0644\u0635\u0641\u062D\u0629 \u0645\u0641\u062A\u0648\u062D\u0629.", readonly: "\u0644\u0644\u0642\u0631\u0627\u0621\u0629 \u0641\u0642\u0637", denied: "\u0631\u064F\u0641\u0636 \u0627\u0644\u0648\u0635\u0648\u0644", localVersion: "\u0646\u0633\u062E\u062A\u0643", remoteVersion: "\u0646\u0633\u062E\u0629 \u0627\u0644\u062E\u0627\u062F\u0645", useRemote: "\u0627\u0633\u062A\u062E\u062F\u0645 \u0646\u0633\u062E\u0629 \u0627\u0644\u062E\u0627\u062F\u0645", useLocal: "\u0627\u0646\u0634\u0631 \u0646\u0633\u062E\u062A\u0643", reviewAgain: "\u062A\u063A\u064A\u0651\u0631\u062A \u0627\u0644\u0635\u0644\u0627\u062D\u064A\u0627\u062A \u0623\u0648 \u0627\u0644\u0645\u0631\u0627\u062C\u0639\u0629. \u062A\u062D\u0642\u0651\u0642 \u0645\u062C\u062F\u062F\u064B\u0627." } } };
|
|
5
|
+
export {
|
|
6
|
+
ar_SA_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/ca-ES.ts
|
|
4
|
+
var ca_ES_default = { collaborationClient: { status: { synced: "Connectat", connecting: "Connectant", pending: "Desant", offline: "Fora de l\xEDnia", conflict: "Conflicte de sincronitzaci\xF3", conflictDetail: "Hi ha canvis sense desar. Mant\xE9n aquesta p\xE0gina oberta.", readonly: "Nom\xE9s lectura", denied: "Acc\xE9s denegat", localVersion: "La teva versi\xF3", remoteVersion: "Versi\xF3 del servidor", useRemote: "Utilitza la versi\xF3 del servidor", useLocal: "Publica la teva versi\xF3", reviewAgain: "Han canviat els permisos o la revisi\xF3. Torna-ho a comprovar." } } };
|
|
5
|
+
export {
|
|
6
|
+
ca_ES_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/de-DE.ts
|
|
4
|
+
var de_DE_default = { collaborationClient: { status: { synced: "Verbunden", connecting: "Verbindung wird hergestellt", pending: "Wird gespeichert", offline: "Offline", conflict: "Synchronisierungskonflikt", conflictDetail: "Nicht gespeicherte \xC4nderungen. Lassen Sie diese Seite ge\xF6ffnet.", readonly: "Schreibgesch\xFCtzt", denied: "Zugriff verweigert", localVersion: "Ihre Version", remoteVersion: "Serverversion", useRemote: "Serverversion \xFCbernehmen", useLocal: "Ihre Version ver\xF6ffentlichen", reviewAgain: "Berechtigung oder Version ge\xE4ndert. Bitte erneut pr\xFCfen." } } };
|
|
5
|
+
export {
|
|
6
|
+
de_DE_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/en-US.ts
|
|
4
|
+
var en_US_default = { collaborationClient: { status: { synced: "Connected", connecting: "Connecting", pending: "Saving", offline: "Offline", conflict: "Sync conflict", conflictDetail: "Unsaved edits need attention. Keep this page open.", readonly: "Read only", denied: "Access denied", localVersion: "Your version", remoteVersion: "Server version", useRemote: "Use server version", useLocal: "Publish your version", reviewAgain: "Access or revision changed. Review again before applying." } } };
|
|
5
|
+
export {
|
|
6
|
+
en_US_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/es-ES.ts
|
|
4
|
+
var es_ES_default = { collaborationClient: { status: { synced: "Conectado", connecting: "Conectando", pending: "Guardando", offline: "Sin conexi\xF3n", conflict: "Conflicto de sincronizaci\xF3n", conflictDetail: "Hay cambios sin guardar. Mant\xE9n esta p\xE1gina abierta.", readonly: "Solo lectura", denied: "Acceso denegado", localVersion: "Tu versi\xF3n", remoteVersion: "Versi\xF3n del servidor", useRemote: "Usar la versi\xF3n del servidor", useLocal: "Publicar tu versi\xF3n", reviewAgain: "Han cambiado los permisos o la revisi\xF3n. Vuelve a comprobarlos." } } };
|
|
5
|
+
export {
|
|
6
|
+
es_ES_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/fa-IR.ts
|
|
4
|
+
var fa_IR_default = { collaborationClient: { status: { synced: "\u0645\u062A\u0635\u0644", connecting: "\u062F\u0631 \u062D\u0627\u0644 \u0627\u062A\u0635\u0627\u0644", pending: "\u062F\u0631 \u062D\u0627\u0644 \u0630\u062E\u06CC\u0631\u0647", offline: "\u0622\u0641\u0644\u0627\u06CC\u0646", conflict: "\u062A\u062F\u0627\u062E\u0644 \u0647\u0645\u06AF\u0627\u0645\u200C\u0633\u0627\u0632\u06CC", conflictDetail: "\u0648\u06CC\u0631\u0627\u06CC\u0634\u200C\u0647\u0627\u06CC \u0630\u062E\u06CC\u0631\u0647\u200C\u0646\u0634\u062F\u0647 \u062F\u0627\u0631\u06CC\u062F. \u0627\u06CC\u0646 \u0635\u0641\u062D\u0647 \u0631\u0627 \u0628\u0627\u0632 \u0646\u06AF\u0647 \u062F\u0627\u0631\u06CC\u062F.", readonly: "\u0641\u0642\u0637 \u062E\u0648\u0627\u0646\u062F\u0646\u06CC", denied: "\u062F\u0633\u062A\u0631\u0633\u06CC \u0631\u062F \u0634\u062F", localVersion: "\u0646\u0633\u062E\u0647\u0654 \u0634\u0645\u0627", remoteVersion: "\u0646\u0633\u062E\u0647\u0654 \u0633\u0631\u0648\u0631", useRemote: "\u0627\u0633\u062A\u0641\u0627\u062F\u0647 \u0627\u0632 \u0646\u0633\u062E\u0647\u0654 \u0633\u0631\u0648\u0631", useLocal: "\u0627\u0646\u062A\u0634\u0627\u0631 \u0646\u0633\u062E\u0647\u0654 \u0634\u0645\u0627", reviewAgain: "\u0645\u062C\u0648\u0632 \u06CC\u0627 \u0646\u0633\u062E\u0647 \u062A\u063A\u06CC\u06CC\u0631 \u06A9\u0631\u062F\u0647 \u0627\u0633\u062A. \u062F\u0648\u0628\u0627\u0631\u0647 \u0628\u0631\u0631\u0633\u06CC \u06A9\u0646\u06CC\u062F." } } };
|
|
5
|
+
export {
|
|
6
|
+
fa_IR_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/fr-FR.ts
|
|
4
|
+
var fr_FR_default = { collaborationClient: { status: { synced: "Connect\xE9", connecting: "Connexion", pending: "Enregistrement", offline: "Hors ligne", conflict: "Conflit de synchronisation", conflictDetail: "Des modifications ne sont pas enregistr\xE9es. Gardez cette page ouverte.", readonly: "Lecture seule", denied: "Acc\xE8s refus\xE9", localVersion: "Votre version", remoteVersion: "Version du serveur", useRemote: "Utiliser la version du serveur", useLocal: "Publier votre version", reviewAgain: "Les droits ou la r\xE9vision ont chang\xE9. V\xE9rifiez \xE0 nouveau." } } };
|
|
5
|
+
export {
|
|
6
|
+
fr_FR_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/id-ID.ts
|
|
4
|
+
var id_ID_default = { collaborationClient: { status: { synced: "Terhubung", connecting: "Menghubungkan", pending: "Menyimpan", offline: "Luring", conflict: "Konflik sinkronisasi", conflictDetail: "Ada perubahan belum disimpan. Biarkan halaman ini terbuka.", readonly: "Hanya baca", denied: "Akses ditolak", localVersion: "Versi Anda", remoteVersion: "Versi server", useRemote: "Gunakan versi server", useLocal: "Terbitkan versi Anda", reviewAgain: "Izin atau revisi berubah. Periksa kembali." } } };
|
|
5
|
+
export {
|
|
6
|
+
id_ID_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/it-IT.ts
|
|
4
|
+
var it_IT_default = { collaborationClient: { status: { synced: "Connesso", connecting: "Connessione", pending: "Salvataggio", offline: "Offline", conflict: "Conflitto di sincronizzazione", conflictDetail: "Ci sono modifiche non salvate. Mantieni aperta questa pagina.", readonly: "Sola lettura", denied: "Accesso negato", localVersion: "La tua versione", remoteVersion: "Versione del server", useRemote: "Usa la versione del server", useLocal: "Pubblica la tua versione", reviewAgain: "Permessi o revisione modificati. Verifica di nuovo." } } };
|
|
5
|
+
export {
|
|
6
|
+
it_IT_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/ja-JP.ts
|
|
4
|
+
var ja_JP_default = { collaborationClient: { status: { synced: "\u63A5\u7D9A\u6E08\u307F", connecting: "\u63A5\u7D9A\u4E2D", pending: "\u4FDD\u5B58\u4E2D", offline: "\u30AA\u30D5\u30E9\u30A4\u30F3", conflict: "\u540C\u671F\u306E\u7AF6\u5408", conflictDetail: "\u672A\u4FDD\u5B58\u306E\u7DE8\u96C6\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u3092\u958B\u3044\u305F\u307E\u307E\u306B\u3057\u3066\u304F\u3060\u3055\u3044\u3002", readonly: "\u8AAD\u307F\u53D6\u308A\u5C02\u7528", denied: "\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093", localVersion: "\u30ED\u30FC\u30AB\u30EB\u7248", remoteVersion: "\u30B5\u30FC\u30D0\u30FC\u7248", useRemote: "\u30B5\u30FC\u30D0\u30FC\u7248\u3092\u4F7F\u7528", useLocal: "\u30ED\u30FC\u30AB\u30EB\u7248\u3092\u516C\u958B", reviewAgain: "\u6A29\u9650\u307E\u305F\u306F\u7248\u304C\u5909\u308F\u308A\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002" } } };
|
|
5
|
+
export {
|
|
6
|
+
ja_JP_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/ko-KR.ts
|
|
4
|
+
var ko_KR_default = { collaborationClient: { status: { synced: "\uC5F0\uACB0\uB428", connecting: "\uC5F0\uACB0 \uC911", pending: "\uC800\uC7A5 \uC911", offline: "\uC624\uD504\uB77C\uC778", conflict: "\uB3D9\uAE30\uD654 \uCDA9\uB3CC", conflictDetail: "\uC800\uC7A5\uB418\uC9C0 \uC54A\uC740 \uC218\uC815 \uC0AC\uD56D\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC774 \uD398\uC774\uC9C0\uB97C \uC5F4\uC5B4 \uB450\uC138\uC694.", readonly: "\uC77D\uAE30 \uC804\uC6A9", denied: "\uC811\uADFC \uAC70\uBD80", localVersion: "\uB0B4 \uBC84\uC804", remoteVersion: "\uC11C\uBC84 \uBC84\uC804", useRemote: "\uC11C\uBC84 \uBC84\uC804 \uC0AC\uC6A9", useLocal: "\uB0B4 \uBC84\uC804 \uAC8C\uC2DC", reviewAgain: "\uAD8C\uD55C\uC774\uB098 \uBC84\uC804\uC774 \uBCC0\uACBD\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uD655\uC778\uD558\uC138\uC694." } } };
|
|
5
|
+
export {
|
|
6
|
+
ko_KR_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/pl-PL.ts
|
|
4
|
+
var pl_PL_default = { collaborationClient: { status: { synced: "Po\u0142\u0105czono", connecting: "\u0141\u0105czenie", pending: "Zapisywanie", offline: "Offline", conflict: "Konflikt synchronizacji", conflictDetail: "S\u0105 niezapisane zmiany. Nie zamykaj tej strony.", readonly: "Tylko do odczytu", denied: "Brak dost\u0119pu", localVersion: "Twoja wersja", remoteVersion: "Wersja serwera", useRemote: "U\u017Cyj wersji serwera", useLocal: "Opublikuj swoj\u0105 wersj\u0119", reviewAgain: "Zmieniono uprawnienia lub wersj\u0119. Sprawd\u017A ponownie." } } };
|
|
5
|
+
export {
|
|
6
|
+
pl_PL_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/pt-BR.ts
|
|
4
|
+
var pt_BR_default = { collaborationClient: { status: { synced: "Conectado", connecting: "Conectando", pending: "Salvando", offline: "Offline", conflict: "Conflito de sincroniza\xE7\xE3o", conflictDetail: "H\xE1 altera\xE7\xF5es n\xE3o salvas. Mantenha esta p\xE1gina aberta.", readonly: "Somente leitura", denied: "Acesso negado", localVersion: "Sua vers\xE3o", remoteVersion: "Vers\xE3o do servidor", useRemote: "Usar a vers\xE3o do servidor", useLocal: "Publicar sua vers\xE3o", reviewAgain: "As permiss\xF5es ou a revis\xE3o mudaram. Confira novamente." } } };
|
|
5
|
+
export {
|
|
6
|
+
pt_BR_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/ru-RU.ts
|
|
4
|
+
var ru_RU_default = { collaborationClient: { status: { synced: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E", connecting: "\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435", pending: "\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u0438\u0435", offline: "\u041D\u0435\u0442 \u0441\u0435\u0442\u0438", conflict: "\u041A\u043E\u043D\u0444\u043B\u0438\u043A\u0442 \u0441\u0438\u043D\u0445\u0440\u043E\u043D\u0438\u0437\u0430\u0446\u0438\u0438", conflictDetail: "\u0415\u0441\u0442\u044C \u043D\u0435\u0441\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F. \u041D\u0435 \u0437\u0430\u043A\u0440\u044B\u0432\u0430\u0439\u0442\u0435 \u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0443.", readonly: "\u0422\u043E\u043B\u044C\u043A\u043E \u0447\u0442\u0435\u043D\u0438\u0435", denied: "\u0414\u043E\u0441\u0442\u0443\u043F \u0437\u0430\u043F\u0440\u0435\u0449\u0451\u043D", localVersion: "\u0412\u0430\u0448\u0430 \u0432\u0435\u0440\u0441\u0438\u044F", remoteVersion: "\u0412\u0435\u0440\u0441\u0438\u044F \u0441\u0435\u0440\u0432\u0435\u0440\u0430", useRemote: "\u041F\u0440\u0438\u043D\u044F\u0442\u044C \u0432\u0435\u0440\u0441\u0438\u044E \u0441\u0435\u0440\u0432\u0435\u0440\u0430", useLocal: "\u041E\u043F\u0443\u0431\u043B\u0438\u043A\u043E\u0432\u0430\u0442\u044C \u0441\u0432\u043E\u044E \u0432\u0435\u0440\u0441\u0438\u044E", reviewAgain: "\u041F\u0440\u0430\u0432\u0430 \u0438\u043B\u0438 \u0432\u0435\u0440\u0441\u0438\u044F \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0438\u0441\u044C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0438\u0445 \u0435\u0449\u0451 \u0440\u0430\u0437." } } };
|
|
5
|
+
export {
|
|
6
|
+
ru_RU_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/sk-SK.ts
|
|
4
|
+
var sk_SK_default = { collaborationClient: { status: { synced: "Pripojen\xE9", connecting: "Prip\xE1janie", pending: "Ukladanie", offline: "Offline", conflict: "Konflikt synchroniz\xE1cie", conflictDetail: "M\xE1te neulo\u017Een\xE9 zmeny. Nechajte t\xFAto str\xE1nku otvoren\xFA.", readonly: "Iba na \u010D\xEDtanie", denied: "Pr\xEDstup zamietnut\xFD", localVersion: "Va\u0161a verzia", remoteVersion: "Verzia na serveri", useRemote: "Pou\u017Ei\u0165 verziu zo servera", useLocal: "Zverejni\u0165 va\u0161u verziu", reviewAgain: "Opr\xE1vnenia alebo verzia sa zmenili. Skontrolujte ich znova." } } };
|
|
5
|
+
export {
|
|
6
|
+
sk_SK_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/vi-VN.ts
|
|
4
|
+
var vi_VN_default = { collaborationClient: { status: { synced: "\u0110\xE3 k\u1EBFt n\u1ED1i", connecting: "\u0110ang k\u1EBFt n\u1ED1i", pending: "\u0110ang l\u01B0u", offline: "Ngo\u1EA1i tuy\u1EBFn", conflict: "Xung \u0111\u1ED9t \u0111\u1ED3ng b\u1ED9", conflictDetail: "C\xF3 thay \u0111\u1ED5i ch\u01B0a l\u01B0u. H\xE3y gi\u1EEF trang n\xE0y m\u1EDF.", readonly: "Ch\u1EC9 \u0111\u1ECDc", denied: "Kh\xF4ng c\xF3 quy\u1EC1n truy c\u1EADp", localVersion: "Phi\xEAn b\u1EA3n c\u1EE7a b\u1EA1n", remoteVersion: "Phi\xEAn b\u1EA3n m\xE1y ch\u1EE7", useRemote: "D\xF9ng phi\xEAn b\u1EA3n m\xE1y ch\u1EE7", useLocal: "\u0110\u0103ng phi\xEAn b\u1EA3n c\u1EE7a b\u1EA1n", reviewAgain: "Quy\u1EC1n ho\u1EB7c phi\xEAn b\u1EA3n \u0111\xE3 thay \u0111\u1ED5i. H\xE3y ki\u1EC3m tra l\u1EA1i." } } };
|
|
5
|
+
export {
|
|
6
|
+
vi_VN_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/zh-CN.ts
|
|
4
|
+
var zh_CN_default = { collaborationClient: { status: { synced: "\u5DF2\u8FDE\u63A5", connecting: "\u8FDE\u63A5\u4E2D", pending: "\u4FDD\u5B58\u4E2D", offline: "\u5DF2\u79BB\u7EBF", conflict: "\u540C\u6B65\u51B2\u7A81", conflictDetail: "\u6709\u672A\u4FDD\u5B58\u7684\u7F16\u8F91\uFF0C\u8BF7\u4FDD\u7559\u5F53\u524D\u9875\u9762\u3002", readonly: "\u53EA\u8BFB", denied: "\u65E0\u8BBF\u95EE\u6743\u9650", localVersion: "\u672C\u5730\u7248\u672C", remoteVersion: "\u670D\u52A1\u7AEF\u7248\u672C", useRemote: "\u91C7\u7528\u670D\u52A1\u7AEF\u7248\u672C", useLocal: "\u53D1\u5E03\u672C\u5730\u7248\u672C", reviewAgain: "\u6743\u9650\u6216\u4FEE\u8BA2\u5DF2\u53D8\u5316\uFF0C\u8BF7\u91CD\u65B0\u6838\u5BF9\u3002" } } };
|
|
5
|
+
export {
|
|
6
|
+
zh_CN_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/zh-HK.ts
|
|
4
|
+
var zh_HK_default = { collaborationClient: { status: { synced: "\u5DF2\u9023\u7DDA", connecting: "\u9023\u7DDA\u4E2D", pending: "\u5132\u5B58\u4E2D", offline: "\u5DF2\u96E2\u7DDA", conflict: "\u540C\u6B65\u885D\u7A81", conflictDetail: "\u6709\u672A\u5132\u5B58\u7684\u7DE8\u8F2F\uFF0C\u8ACB\u4FDD\u7559\u76EE\u524D\u9801\u9762\u3002", readonly: "\u552F\u8B80", denied: "\u6C92\u6709\u5B58\u53D6\u6B0A\u9650", localVersion: "\u672C\u6A5F\u7248\u672C", remoteVersion: "\u4F3A\u670D\u5668\u7248\u672C", useRemote: "\u4F7F\u7528\u4F3A\u670D\u5668\u7248\u672C", useLocal: "\u767C\u4F48\u672C\u6A5F\u7248\u672C", reviewAgain: "\u6B0A\u9650\u6216\u7248\u672C\u5DF2\u66F4\u6539\uFF0C\u8ACB\u91CD\u65B0\u6838\u5C0D\u3002" } } };
|
|
5
|
+
export {
|
|
6
|
+
zh_HK_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import "../chunk-4MGIQFAJ.js";
|
|
2
|
+
|
|
3
|
+
// src/locale/zh-TW.ts
|
|
4
|
+
var zh_TW_default = { collaborationClient: { status: { synced: "\u5DF2\u9023\u7DDA", connecting: "\u9023\u7DDA\u4E2D", pending: "\u5132\u5B58\u4E2D", offline: "\u5DF2\u96E2\u7DDA", conflict: "\u540C\u6B65\u885D\u7A81", conflictDetail: "\u6709\u672A\u5132\u5B58\u7684\u7DE8\u8F2F\uFF0C\u8ACB\u4FDD\u7559\u76EE\u524D\u9801\u9762\u3002", readonly: "\u552F\u8B80", denied: "\u6C92\u6709\u5B58\u53D6\u6B0A\u9650", localVersion: "\u672C\u6A5F\u7248\u672C", remoteVersion: "\u4F3A\u670D\u5668\u7248\u672C", useRemote: "\u63A1\u7528\u4F3A\u670D\u5668\u7248\u672C", useLocal: "\u767C\u4F48\u672C\u6A5F\u7248\u672C", reviewAgain: "\u6B0A\u9650\u6216\u7248\u672C\u5DF2\u8B8A\u66F4\uFF0C\u8ACB\u91CD\u65B0\u6838\u5C0D\u3002" } } };
|
|
5
|
+
export {
|
|
6
|
+
zh_TW_default as default
|
|
7
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IBaseAttachment, IImageIoService } from '@cool-office/core';
|
|
2
|
+
import { createIdentifier, Disposable, IConfigService, ImageSourceType, ImageUploadStatusType, IUniverInstanceService } from '@cool-office/core';
|
|
3
|
+
export interface IAttachmentUploadOptions {
|
|
4
|
+
maxSize?: number;
|
|
5
|
+
accept?: string[];
|
|
6
|
+
upload?: (file: File) => Promise<IBaseAttachment>;
|
|
7
|
+
}
|
|
8
|
+
export interface IAttachmentIoService {
|
|
9
|
+
getUploadOptions(): IAttachmentUploadOptions;
|
|
10
|
+
saveAttachment(file: File): Promise<IBaseAttachment>;
|
|
11
|
+
getAttachmentUrl(source: string, type: ImageSourceType): Promise<string>;
|
|
12
|
+
}
|
|
13
|
+
export declare const IAttachmentIoService: ReturnType<typeof createIdentifier<IAttachmentIoService>>;
|
|
14
|
+
export declare class CollaborationAttachmentIoService implements IAttachmentIoService {
|
|
15
|
+
private readonly settings;
|
|
16
|
+
private readonly units;
|
|
17
|
+
constructor(settings: IConfigService, units: IUniverInstanceService);
|
|
18
|
+
private get config();
|
|
19
|
+
getUploadOptions(): IAttachmentUploadOptions;
|
|
20
|
+
saveAttachment(file: File): Promise<IBaseAttachment>;
|
|
21
|
+
getAttachmentUrl(source: string, type: ImageSourceType): Promise<string>;
|
|
22
|
+
}
|
|
23
|
+
export declare class CollaborationImageIoService extends Disposable implements IImageIoService {
|
|
24
|
+
private readonly assets;
|
|
25
|
+
private readonly waiting;
|
|
26
|
+
readonly change$: import("rxjs").Observable<number>;
|
|
27
|
+
private readonly cache;
|
|
28
|
+
constructor(assets: CollaborationAttachmentIoService);
|
|
29
|
+
setWaitCount(count: number): void;
|
|
30
|
+
getImage(id: string): Promise<string>;
|
|
31
|
+
saveImage(file: File): Promise<{
|
|
32
|
+
imageId: string;
|
|
33
|
+
source: string;
|
|
34
|
+
base64Cache: string;
|
|
35
|
+
imageSourceType: ImageSourceType;
|
|
36
|
+
status: ImageUploadStatusType;
|
|
37
|
+
}>;
|
|
38
|
+
getImageSourceCache(source: string, type: ImageSourceType): HTMLImageElement | undefined;
|
|
39
|
+
addImageSourceCache(source: string, type: ImageSourceType, image?: HTMLImageElement | null): void;
|
|
40
|
+
dispose(): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { IListMentionParam, IListMentionResponse } from '@cool-office/core';
|
|
2
|
+
import { IAuthzIoService, IConfigService, IMentionIOService, IUniverInstanceService } from '@cool-office/core';
|
|
3
|
+
import type { IAllowedResponse, IBatchAllowedResponse, IListCollaboratorResponse, IListPermPointResponse } from '@cool-office/protocol';
|
|
4
|
+
type Input<K extends keyof IAuthzIoService> = Parameters<NonNullable<IAuthzIoService[K]>>[0];
|
|
5
|
+
export declare class CollaborationMentionService implements IMentionIOService {
|
|
6
|
+
private readonly grants;
|
|
7
|
+
private readonly units;
|
|
8
|
+
constructor(grants: IAuthzIoService, units: IUniverInstanceService);
|
|
9
|
+
list(params: IListMentionParam): Promise<IListMentionResponse>;
|
|
10
|
+
}
|
|
11
|
+
/** Every editor reads object grants from the authenticated workspace, including anonymous shared files. */
|
|
12
|
+
export declare class RemoteAuthorizationService implements IAuthzIoService {
|
|
13
|
+
private readonly config;
|
|
14
|
+
private inherit;
|
|
15
|
+
constructor(config: IConfigService);
|
|
16
|
+
private request;
|
|
17
|
+
create(input: Input<'create'>): Promise<string>;
|
|
18
|
+
allowed(input: Input<'allowed'>): Promise<IAllowedResponse['actions']>;
|
|
19
|
+
batchAllowed(requests: Input<'batchAllowed'>): Promise<IBatchAllowedResponse['objectActions']>;
|
|
20
|
+
list(input: Input<'list'>): Promise<IListPermPointResponse['objects']>;
|
|
21
|
+
listRoles(input: Input<'listRoles'>): ReturnType<IAuthzIoService['listRoles']>;
|
|
22
|
+
update(input: Input<'update'>): Promise<void>;
|
|
23
|
+
listCollaborators(input: Input<'listCollaborators'>): Promise<IListCollaboratorResponse['collaborators']>;
|
|
24
|
+
updateCollaborator(input: Input<'updateCollaborator'>): Promise<void>;
|
|
25
|
+
deleteCollaborator(input: Input<'deleteCollaborator'>): Promise<void>;
|
|
26
|
+
createCollaborator(input: Input<'createCollaborator'>): Promise<void>;
|
|
27
|
+
putCollaborators(input: Input<'putCollaborators'>): Promise<void>;
|
|
28
|
+
setCfgEnableObjInherit(value: boolean): void;
|
|
29
|
+
getCfgEnableObjInherit(): boolean;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { IMutationInfo, UniverInstanceType } from '@cool-office/core';
|
|
2
|
+
export interface ICollaborationChangeset {
|
|
3
|
+
unitID: string;
|
|
4
|
+
type: UniverInstanceType;
|
|
5
|
+
baseRev: number;
|
|
6
|
+
revision: number;
|
|
7
|
+
userID: string;
|
|
8
|
+
memberID: string;
|
|
9
|
+
mutations: IMutationInfo[];
|
|
10
|
+
sid?: string;
|
|
11
|
+
reqId?: number;
|
|
12
|
+
mutationSize?: number;
|
|
13
|
+
additionalFields?: string;
|
|
14
|
+
createTime?: number;
|
|
15
|
+
}
|
|
16
|
+
export type ChangesetResendReason = 'ack_timeout' | 'should_retry' | 'reconnect' | 'request_failed';
|
|
17
|
+
export interface IChangesetResendEvent {
|
|
18
|
+
unitID: string;
|
|
19
|
+
reqId: number;
|
|
20
|
+
reason: ChangesetResendReason;
|
|
21
|
+
attempt: number;
|
|
22
|
+
elapsedMs: number;
|
|
23
|
+
unsyncedMutationCount: number;
|
|
24
|
+
nextDelayMs: number;
|
|
25
|
+
}
|
|
26
|
+
export type ChangesetResendInfo = Omit<IChangesetResendEvent, 'unitID'>;
|
|
27
|
+
export declare const DEFAULT_ACK_TIMEOUT = 20000;
|
|
28
|
+
export declare const MAX_ACK_TIMEOUT = 120000;
|
|
29
|
+
export declare const MAX_RETRY_TIMEOUT = 20000;
|
|
30
|
+
export type SendChangeset = (changeset: ICollaborationChangeset, options: {
|
|
31
|
+
timeout?: number;
|
|
32
|
+
}) => void | Promise<void>;
|
|
33
|
+
export interface IChangesetSubmitterSource {
|
|
34
|
+
changeset: ICollaborationChangeset;
|
|
35
|
+
unsyncedMutationCount: number;
|
|
36
|
+
}
|
|
37
|
+
export interface IChangesetSubmitterOptions {
|
|
38
|
+
ackTimeout?: number;
|
|
39
|
+
maxAckTimeout?: number;
|
|
40
|
+
onResend?: (info: ChangesetResendInfo) => void;
|
|
41
|
+
now?: () => number;
|
|
42
|
+
}
|
|
43
|
+
/** Returns null for permanent failures and the transport's own acknowledgement timeout. */
|
|
44
|
+
export declare function getRetryDelay(error: unknown, backoff: number): number | null;
|
|
45
|
+
/** Owns delivery of one awaiting changeset; acknowledgement is handled by the caller. */
|
|
46
|
+
export declare class ChangesetSubmitter {
|
|
47
|
+
private readonly _send;
|
|
48
|
+
private readonly _options;
|
|
49
|
+
private _attempt;
|
|
50
|
+
private readonly _firstSentAt;
|
|
51
|
+
private _ackTimeout;
|
|
52
|
+
private readonly _maxAckTimeout;
|
|
53
|
+
private _retryBackoff;
|
|
54
|
+
private _nextDelay;
|
|
55
|
+
private _timer;
|
|
56
|
+
private _pendingReason;
|
|
57
|
+
private _source;
|
|
58
|
+
private _sendToken;
|
|
59
|
+
private _disposed;
|
|
60
|
+
private readonly _now;
|
|
61
|
+
private _reqId;
|
|
62
|
+
constructor(reqId: number, _send: SendChangeset, _options?: IChangesetSubmitterOptions);
|
|
63
|
+
get reqId(): number;
|
|
64
|
+
get attempt(): number;
|
|
65
|
+
get nextDelayMs(): number;
|
|
66
|
+
get elapsedMs(): number;
|
|
67
|
+
bind(source: () => IChangesetSubmitterSource): void;
|
|
68
|
+
unbind(): void;
|
|
69
|
+
submit(changeset: ICollaborationChangeset, unsyncedMutationCount: number, reason?: ChangesetResendReason): void;
|
|
70
|
+
armAckTimeout(): void;
|
|
71
|
+
requestRetry(): void;
|
|
72
|
+
dispose(): void;
|
|
73
|
+
private _deliver;
|
|
74
|
+
private _onRequestFailed;
|
|
75
|
+
private _schedule;
|
|
76
|
+
private _resend;
|
|
77
|
+
private _countResend;
|
|
78
|
+
private _notifyResend;
|
|
79
|
+
private _clearTimer;
|
|
80
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { IDocumentData, IResourceManagerService, JSONXActions } from '@cool-office/core';
|
|
2
|
+
export declare function isDocumentObjectMutation(id: string): boolean;
|
|
3
|
+
export declare function documentObjectEdit(before: IDocumentData, id: string, params: Record<string, unknown>, resources?: IResourceManagerService): JSONXActions | undefined;
|
|
4
|
+
export declare function refreshDocumentObjectResources(unitID: string, before: IDocumentData['resources'], after: IDocumentData['resources'], manager?: IResourceManagerService): void;
|