microboard-temp 0.4.60 → 0.4.62

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.
@@ -18821,6 +18821,20 @@ class FrameCommand {
18821
18821
  children: frame2.getChildrenIds()
18822
18822
  };
18823
18823
  });
18824
+ case "addChildren":
18825
+ return mapItemsByOperation(frame, (item) => {
18826
+ return {
18827
+ ...this.operation,
18828
+ newData: { childIds: item.getChildrenIds() }
18829
+ };
18830
+ });
18831
+ case "removeChildren":
18832
+ return mapItemsByOperation(frame, (item) => {
18833
+ return {
18834
+ ...this.operation,
18835
+ newData: { childIds: item.getChildrenIds() }
18836
+ };
18837
+ });
18824
18838
  default:
18825
18839
  return mapItemsByOperation(frame, (item) => {
18826
18840
  const op = this.operation;
@@ -19482,23 +19496,40 @@ class BaseCommand {
19482
19496
  }
19483
19497
  getReverse() {
19484
19498
  const items = this.items;
19485
- return mapItemsByOperation(items, (item) => {
19486
- const op = this.operation;
19487
- let newData = {};
19488
- if (op.prevData) {
19489
- newData = { ...op.prevData };
19490
- } else {
19491
- Object.keys(op.newData).forEach((key) => {
19492
- if (item[key]) {
19493
- newData[key] = item[key];
19499
+ switch (this.operation.method) {
19500
+ case "addChildren":
19501
+ return mapItemsByOperation(items, (item) => {
19502
+ return {
19503
+ ...this.operation,
19504
+ newData: { childIds: item.getChildrenIds() }
19505
+ };
19506
+ });
19507
+ case "removeChildren":
19508
+ return mapItemsByOperation(items, (item) => {
19509
+ return {
19510
+ ...this.operation,
19511
+ newData: { childIds: item.getChildrenIds() }
19512
+ };
19513
+ });
19514
+ default:
19515
+ return mapItemsByOperation(items, (item) => {
19516
+ const op = this.operation;
19517
+ let newData = {};
19518
+ if (op.prevData) {
19519
+ newData = { ...op.prevData };
19520
+ } else {
19521
+ Object.keys(op.newData).forEach((key) => {
19522
+ if (item[key]) {
19523
+ newData[key] = item[key];
19524
+ }
19525
+ });
19494
19526
  }
19527
+ return {
19528
+ ...op,
19529
+ newData
19530
+ };
19495
19531
  });
19496
- }
19497
- return {
19498
- ...op,
19499
- newData
19500
- };
19501
- });
19532
+ }
19502
19533
  }
19503
19534
  }
19504
19535
  var itemCommandFactories = {
package/dist/cjs/index.js CHANGED
@@ -18821,6 +18821,20 @@ class FrameCommand {
18821
18821
  children: frame2.getChildrenIds()
18822
18822
  };
18823
18823
  });
18824
+ case "addChildren":
18825
+ return mapItemsByOperation(frame, (item) => {
18826
+ return {
18827
+ ...this.operation,
18828
+ newData: { childIds: item.getChildrenIds() }
18829
+ };
18830
+ });
18831
+ case "removeChildren":
18832
+ return mapItemsByOperation(frame, (item) => {
18833
+ return {
18834
+ ...this.operation,
18835
+ newData: { childIds: item.getChildrenIds() }
18836
+ };
18837
+ });
18824
18838
  default:
18825
18839
  return mapItemsByOperation(frame, (item) => {
18826
18840
  const op = this.operation;
@@ -19482,23 +19496,40 @@ class BaseCommand {
19482
19496
  }
19483
19497
  getReverse() {
19484
19498
  const items = this.items;
19485
- return mapItemsByOperation(items, (item) => {
19486
- const op = this.operation;
19487
- let newData = {};
19488
- if (op.prevData) {
19489
- newData = { ...op.prevData };
19490
- } else {
19491
- Object.keys(op.newData).forEach((key) => {
19492
- if (item[key]) {
19493
- newData[key] = item[key];
19499
+ switch (this.operation.method) {
19500
+ case "addChildren":
19501
+ return mapItemsByOperation(items, (item) => {
19502
+ return {
19503
+ ...this.operation,
19504
+ newData: { childIds: item.getChildrenIds() }
19505
+ };
19506
+ });
19507
+ case "removeChildren":
19508
+ return mapItemsByOperation(items, (item) => {
19509
+ return {
19510
+ ...this.operation,
19511
+ newData: { childIds: item.getChildrenIds() }
19512
+ };
19513
+ });
19514
+ default:
19515
+ return mapItemsByOperation(items, (item) => {
19516
+ const op = this.operation;
19517
+ let newData = {};
19518
+ if (op.prevData) {
19519
+ newData = { ...op.prevData };
19520
+ } else {
19521
+ Object.keys(op.newData).forEach((key) => {
19522
+ if (item[key]) {
19523
+ newData[key] = item[key];
19524
+ }
19525
+ });
19494
19526
  }
19527
+ return {
19528
+ ...op,
19529
+ newData
19530
+ };
19495
19531
  });
19496
- }
19497
- return {
19498
- ...op,
19499
- newData
19500
- };
19501
- });
19532
+ }
19502
19533
  }
19503
19534
  }
19504
19535
  var itemCommandFactories = {
package/dist/cjs/node.js CHANGED
@@ -21361,6 +21361,20 @@ class FrameCommand {
21361
21361
  children: frame2.getChildrenIds()
21362
21362
  };
21363
21363
  });
21364
+ case "addChildren":
21365
+ return mapItemsByOperation(frame, (item) => {
21366
+ return {
21367
+ ...this.operation,
21368
+ newData: { childIds: item.getChildrenIds() }
21369
+ };
21370
+ });
21371
+ case "removeChildren":
21372
+ return mapItemsByOperation(frame, (item) => {
21373
+ return {
21374
+ ...this.operation,
21375
+ newData: { childIds: item.getChildrenIds() }
21376
+ };
21377
+ });
21364
21378
  default:
21365
21379
  return mapItemsByOperation(frame, (item) => {
21366
21380
  const op = this.operation;
@@ -22021,23 +22035,40 @@ class BaseCommand {
22021
22035
  }
22022
22036
  getReverse() {
22023
22037
  const items = this.items;
22024
- return mapItemsByOperation(items, (item) => {
22025
- const op = this.operation;
22026
- let newData = {};
22027
- if (op.prevData) {
22028
- newData = { ...op.prevData };
22029
- } else {
22030
- Object.keys(op.newData).forEach((key) => {
22031
- if (item[key]) {
22032
- newData[key] = item[key];
22038
+ switch (this.operation.method) {
22039
+ case "addChildren":
22040
+ return mapItemsByOperation(items, (item) => {
22041
+ return {
22042
+ ...this.operation,
22043
+ newData: { childIds: item.getChildrenIds() }
22044
+ };
22045
+ });
22046
+ case "removeChildren":
22047
+ return mapItemsByOperation(items, (item) => {
22048
+ return {
22049
+ ...this.operation,
22050
+ newData: { childIds: item.getChildrenIds() }
22051
+ };
22052
+ });
22053
+ default:
22054
+ return mapItemsByOperation(items, (item) => {
22055
+ const op = this.operation;
22056
+ let newData = {};
22057
+ if (op.prevData) {
22058
+ newData = { ...op.prevData };
22059
+ } else {
22060
+ Object.keys(op.newData).forEach((key) => {
22061
+ if (item[key]) {
22062
+ newData[key] = item[key];
22063
+ }
22064
+ });
22033
22065
  }
22066
+ return {
22067
+ ...op,
22068
+ newData
22069
+ };
22034
22070
  });
22035
- }
22036
- return {
22037
- ...op,
22038
- newData
22039
- };
22040
- });
22071
+ }
22041
22072
  }
22042
22073
  }
22043
22074
  var itemCommandFactories = {
@@ -18671,6 +18671,20 @@ class FrameCommand {
18671
18671
  children: frame2.getChildrenIds()
18672
18672
  };
18673
18673
  });
18674
+ case "addChildren":
18675
+ return mapItemsByOperation(frame, (item) => {
18676
+ return {
18677
+ ...this.operation,
18678
+ newData: { childIds: item.getChildrenIds() }
18679
+ };
18680
+ });
18681
+ case "removeChildren":
18682
+ return mapItemsByOperation(frame, (item) => {
18683
+ return {
18684
+ ...this.operation,
18685
+ newData: { childIds: item.getChildrenIds() }
18686
+ };
18687
+ });
18674
18688
  default:
18675
18689
  return mapItemsByOperation(frame, (item) => {
18676
18690
  const op = this.operation;
@@ -19332,23 +19346,40 @@ class BaseCommand {
19332
19346
  }
19333
19347
  getReverse() {
19334
19348
  const items = this.items;
19335
- return mapItemsByOperation(items, (item) => {
19336
- const op = this.operation;
19337
- let newData = {};
19338
- if (op.prevData) {
19339
- newData = { ...op.prevData };
19340
- } else {
19341
- Object.keys(op.newData).forEach((key) => {
19342
- if (item[key]) {
19343
- newData[key] = item[key];
19349
+ switch (this.operation.method) {
19350
+ case "addChildren":
19351
+ return mapItemsByOperation(items, (item) => {
19352
+ return {
19353
+ ...this.operation,
19354
+ newData: { childIds: item.getChildrenIds() }
19355
+ };
19356
+ });
19357
+ case "removeChildren":
19358
+ return mapItemsByOperation(items, (item) => {
19359
+ return {
19360
+ ...this.operation,
19361
+ newData: { childIds: item.getChildrenIds() }
19362
+ };
19363
+ });
19364
+ default:
19365
+ return mapItemsByOperation(items, (item) => {
19366
+ const op = this.operation;
19367
+ let newData = {};
19368
+ if (op.prevData) {
19369
+ newData = { ...op.prevData };
19370
+ } else {
19371
+ Object.keys(op.newData).forEach((key) => {
19372
+ if (item[key]) {
19373
+ newData[key] = item[key];
19374
+ }
19375
+ });
19344
19376
  }
19377
+ return {
19378
+ ...op,
19379
+ newData
19380
+ };
19345
19381
  });
19346
- }
19347
- return {
19348
- ...op,
19349
- newData
19350
- };
19351
- });
19382
+ }
19352
19383
  }
19353
19384
  }
19354
19385
  var itemCommandFactories = {
package/dist/esm/index.js CHANGED
@@ -18664,6 +18664,20 @@ class FrameCommand {
18664
18664
  children: frame2.getChildrenIds()
18665
18665
  };
18666
18666
  });
18667
+ case "addChildren":
18668
+ return mapItemsByOperation(frame, (item) => {
18669
+ return {
18670
+ ...this.operation,
18671
+ newData: { childIds: item.getChildrenIds() }
18672
+ };
18673
+ });
18674
+ case "removeChildren":
18675
+ return mapItemsByOperation(frame, (item) => {
18676
+ return {
18677
+ ...this.operation,
18678
+ newData: { childIds: item.getChildrenIds() }
18679
+ };
18680
+ });
18667
18681
  default:
18668
18682
  return mapItemsByOperation(frame, (item) => {
18669
18683
  const op = this.operation;
@@ -19325,23 +19339,40 @@ class BaseCommand {
19325
19339
  }
19326
19340
  getReverse() {
19327
19341
  const items = this.items;
19328
- return mapItemsByOperation(items, (item) => {
19329
- const op = this.operation;
19330
- let newData = {};
19331
- if (op.prevData) {
19332
- newData = { ...op.prevData };
19333
- } else {
19334
- Object.keys(op.newData).forEach((key) => {
19335
- if (item[key]) {
19336
- newData[key] = item[key];
19342
+ switch (this.operation.method) {
19343
+ case "addChildren":
19344
+ return mapItemsByOperation(items, (item) => {
19345
+ return {
19346
+ ...this.operation,
19347
+ newData: { childIds: item.getChildrenIds() }
19348
+ };
19349
+ });
19350
+ case "removeChildren":
19351
+ return mapItemsByOperation(items, (item) => {
19352
+ return {
19353
+ ...this.operation,
19354
+ newData: { childIds: item.getChildrenIds() }
19355
+ };
19356
+ });
19357
+ default:
19358
+ return mapItemsByOperation(items, (item) => {
19359
+ const op = this.operation;
19360
+ let newData = {};
19361
+ if (op.prevData) {
19362
+ newData = { ...op.prevData };
19363
+ } else {
19364
+ Object.keys(op.newData).forEach((key) => {
19365
+ if (item[key]) {
19366
+ newData[key] = item[key];
19367
+ }
19368
+ });
19337
19369
  }
19370
+ return {
19371
+ ...op,
19372
+ newData
19373
+ };
19338
19374
  });
19339
- }
19340
- return {
19341
- ...op,
19342
- newData
19343
- };
19344
- });
19375
+ }
19345
19376
  }
19346
19377
  }
19347
19378
  var itemCommandFactories = {
package/dist/esm/node.js CHANGED
@@ -21199,6 +21199,20 @@ class FrameCommand {
21199
21199
  children: frame2.getChildrenIds()
21200
21200
  };
21201
21201
  });
21202
+ case "addChildren":
21203
+ return mapItemsByOperation(frame, (item) => {
21204
+ return {
21205
+ ...this.operation,
21206
+ newData: { childIds: item.getChildrenIds() }
21207
+ };
21208
+ });
21209
+ case "removeChildren":
21210
+ return mapItemsByOperation(frame, (item) => {
21211
+ return {
21212
+ ...this.operation,
21213
+ newData: { childIds: item.getChildrenIds() }
21214
+ };
21215
+ });
21202
21216
  default:
21203
21217
  return mapItemsByOperation(frame, (item) => {
21204
21218
  const op = this.operation;
@@ -21859,23 +21873,40 @@ class BaseCommand {
21859
21873
  }
21860
21874
  getReverse() {
21861
21875
  const items = this.items;
21862
- return mapItemsByOperation(items, (item) => {
21863
- const op = this.operation;
21864
- let newData = {};
21865
- if (op.prevData) {
21866
- newData = { ...op.prevData };
21867
- } else {
21868
- Object.keys(op.newData).forEach((key) => {
21869
- if (item[key]) {
21870
- newData[key] = item[key];
21876
+ switch (this.operation.method) {
21877
+ case "addChildren":
21878
+ return mapItemsByOperation(items, (item) => {
21879
+ return {
21880
+ ...this.operation,
21881
+ newData: { childIds: item.getChildrenIds() }
21882
+ };
21883
+ });
21884
+ case "removeChildren":
21885
+ return mapItemsByOperation(items, (item) => {
21886
+ return {
21887
+ ...this.operation,
21888
+ newData: { childIds: item.getChildrenIds() }
21889
+ };
21890
+ });
21891
+ default:
21892
+ return mapItemsByOperation(items, (item) => {
21893
+ const op = this.operation;
21894
+ let newData = {};
21895
+ if (op.prevData) {
21896
+ newData = { ...op.prevData };
21897
+ } else {
21898
+ Object.keys(op.newData).forEach((key) => {
21899
+ if (item[key]) {
21900
+ newData[key] = item[key];
21901
+ }
21902
+ });
21871
21903
  }
21904
+ return {
21905
+ ...op,
21906
+ newData
21907
+ };
21872
21908
  });
21873
- }
21874
- return {
21875
- ...op,
21876
- newData
21877
- };
21878
- });
21909
+ }
21879
21910
  }
21880
21911
  }
21881
21912
  var itemCommandFactories = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.60",
3
+ "version": "0.4.62",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",