@case-framework/survey-ui 0.3.4 → 0.4.0
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/dist/src/modules/survey-editor/hooks/useEditorStateChange.d.ts +2 -1
- package/dist/src/modules/survey-editor/store/editor-store.d.ts +2 -1
- package/dist/survey-ui.cjs.js +4 -4
- package/dist/survey-ui.cjs.js.map +1 -1
- package/dist/survey-ui.es.js +25 -5
- package/dist/survey-ui.es.js.map +1 -1
- package/package.json +1 -1
package/dist/survey-ui.es.js
CHANGED
|
@@ -22,7 +22,7 @@ var k = Object.create, A = Object.defineProperty, j = Object.getOwnPropertyDescr
|
|
|
22
22
|
enumerable: !0
|
|
23
23
|
}) : n, e));
|
|
24
24
|
//#endregion
|
|
25
|
-
//#region ../survey-core/build/survey-
|
|
25
|
+
//#region ../survey-core/build/survey-yXdl8xkf.mjs
|
|
26
26
|
function re(e) {
|
|
27
27
|
let t = 2166136261;
|
|
28
28
|
for (let n = 0; n < e.length; n++) t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
|
|
@@ -858,12 +858,12 @@ var dt = class e {
|
|
|
858
858
|
createItemFromRaw(e) {
|
|
859
859
|
return Je(e, this.pluginRegistry);
|
|
860
860
|
}
|
|
861
|
-
static createBlankSurvey(t, n
|
|
862
|
-
let
|
|
861
|
+
static createBlankSurvey(t, n) {
|
|
862
|
+
let r = n ?? ue(), i = {
|
|
863
863
|
$schema: Xe,
|
|
864
864
|
surveyItems: [{
|
|
865
865
|
id: I(),
|
|
866
|
-
key:
|
|
866
|
+
key: r,
|
|
867
867
|
itemType: "group",
|
|
868
868
|
config: {
|
|
869
869
|
isRoot: !0,
|
|
@@ -872,7 +872,7 @@ var dt = class e {
|
|
|
872
872
|
}
|
|
873
873
|
}]
|
|
874
874
|
};
|
|
875
|
-
return
|
|
875
|
+
return e.fromJson(i, t);
|
|
876
876
|
}
|
|
877
877
|
static fromJson(t, n) {
|
|
878
878
|
let r = new e(n), i = t;
|
|
@@ -22168,6 +22168,19 @@ var wL = class e {
|
|
|
22168
22168
|
isCurrent: t === this.currentIndex
|
|
22169
22169
|
}));
|
|
22170
22170
|
}
|
|
22171
|
+
getCommitsSinceInitial() {
|
|
22172
|
+
return this.history.slice(1, this.currentIndex + 1).map((e, t) => {
|
|
22173
|
+
let n = t + 1;
|
|
22174
|
+
return {
|
|
22175
|
+
index: n,
|
|
22176
|
+
kind: e.kind,
|
|
22177
|
+
meta: e.meta,
|
|
22178
|
+
timestamp: e.timestamp,
|
|
22179
|
+
memorySize: e.memorySize,
|
|
22180
|
+
isCurrent: n === this.currentIndex
|
|
22181
|
+
};
|
|
22182
|
+
});
|
|
22183
|
+
}
|
|
22171
22184
|
getCurrentIndex() {
|
|
22172
22185
|
return this.currentIndex;
|
|
22173
22186
|
}
|
|
@@ -22290,6 +22303,9 @@ var DL = class e {
|
|
|
22290
22303
|
getUndoRedoConfig() {
|
|
22291
22304
|
return this._undoRedo.getConfig();
|
|
22292
22305
|
}
|
|
22306
|
+
getCommitsSinceInitial() {
|
|
22307
|
+
return this._undoRedo.getCommitsSinceInitial();
|
|
22308
|
+
}
|
|
22293
22309
|
toJson() {
|
|
22294
22310
|
return {
|
|
22295
22311
|
version: "1.0.0",
|
|
@@ -42987,6 +43003,7 @@ function J3({ sessionId: e, editor: t, changeTick: n, persistDebounceMs: r, onEd
|
|
|
42987
43003
|
state: t.toJson(),
|
|
42988
43004
|
revision: n,
|
|
42989
43005
|
hasUncommittedChanges: t.hasUncommittedChanges,
|
|
43006
|
+
commitsSinceInitial: t.getCommitsSinceInitial(),
|
|
42990
43007
|
at: Date.now()
|
|
42991
43008
|
});
|
|
42992
43009
|
return;
|
|
@@ -42997,6 +43014,7 @@ function J3({ sessionId: e, editor: t, changeTick: n, persistDebounceMs: r, onEd
|
|
|
42997
43014
|
state: t.toJson(),
|
|
42998
43015
|
revision: n,
|
|
42999
43016
|
hasUncommittedChanges: t.hasUncommittedChanges,
|
|
43017
|
+
commitsSinceInitial: t.getCommitsSinceInitial(),
|
|
43000
43018
|
at: Date.now()
|
|
43001
43019
|
});
|
|
43002
43020
|
}, r), () => {
|
|
@@ -43015,6 +43033,7 @@ function J3({ sessionId: e, editor: t, changeTick: n, persistDebounceMs: r, onEd
|
|
|
43015
43033
|
state: e.editor.toJson(),
|
|
43016
43034
|
revision: e.changeTick,
|
|
43017
43035
|
hasUncommittedChanges: e.editor.hasUncommittedChanges,
|
|
43036
|
+
commitsSinceInitial: e.editor.getCommitsSinceInitial(),
|
|
43018
43037
|
at: Date.now()
|
|
43019
43038
|
});
|
|
43020
43039
|
}, []);
|
|
@@ -46539,6 +46558,7 @@ function Zae() {
|
|
|
46539
46558
|
getUndoMeta: () => n().editor?.getUndoMeta() ?? null,
|
|
46540
46559
|
getRedoMeta: () => n().editor?.getRedoMeta() ?? null,
|
|
46541
46560
|
getUndoRedoHistory: () => n().editor?.undoRedo.getHistory() ?? [],
|
|
46561
|
+
getCommitsSinceInitial: () => n().editor?.getCommitsSinceInitial() ?? [],
|
|
46542
46562
|
addItem: (r, i, a) => {
|
|
46543
46563
|
let { editor: o } = n();
|
|
46544
46564
|
if (!o) throw Error("No editor loaded");
|