@firestitch/block-editor 12.3.26 → 12.3.28

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.
@@ -10,11 +10,11 @@ export interface BlockEditorConfig {
10
10
  marginLeft?: number;
11
11
  blocks?: Block[];
12
12
  defaultValidation?: (block: Block, value: any) => Observable<any>;
13
- blockChanged?: (block: Block) => void;
13
+ blockChange?: (block: Block) => void;
14
14
  blockAdd?: (block: Block) => Observable<Block>;
15
15
  blockUpload?: (block: Block, file: Blob) => Observable<Block>;
16
16
  blocksRemove?: (block: Block[]) => Observable<any>;
17
17
  blocksLevelChanged?: (blocks: Block[]) => void;
18
- blocksSelected?: (blocks: Block[]) => void;
19
- blocksReordered?: (blocks: Block[]) => Observable<any>;
18
+ blocksSelect?: (blocks: Block[]) => void;
19
+ blocksReorder?: (blocks: Block[]) => Observable<any>;
20
20
  }
@@ -632,11 +632,11 @@
632
632
  var _this = this;
633
633
  this._config = config;
634
634
  this._setBlocks(this._config.blocks);
635
- if (this._config.blockChanged) {
635
+ if (this._config.blockChange) {
636
636
  this.blockChanged$
637
637
  .pipe(operators.groupBy(function (block) { return (block.guid); }), operators.map(function (group) { return group.pipe(operators.debounceTime(250)); }), operators.mergeAll())
638
638
  .subscribe(function (block) {
639
- _this._config.blockChanged(block);
639
+ _this._config.blockChange(block);
640
640
  });
641
641
  }
642
642
  };
@@ -921,8 +921,8 @@
921
921
  },
922
922
  set: function (blocks) {
923
923
  this._selectedBlocks$.next(blocks);
924
- if (this.config.blocksSelected) {
925
- this.config.blocksSelected(blocks);
924
+ if (this.config.blocksSelect) {
925
+ this.config.blocksSelect(blocks);
926
926
  }
927
927
  },
928
928
  enumerable: false,
@@ -967,7 +967,8 @@
967
967
  }
968
968
  })
969
969
  .afterClosed()
970
- .pipe(operators.filter(function (blocks) { return !!blocks; }), operators.switchMap(function (blocks) { return _this.config.blocksReordered(blocks); }), operators.takeUntil(this._destroy$))
970
+ .pipe(operators.filter(function (blocks) { return !!blocks; }), operators.switchMap(function (blocks) { return _this.config.blocksReorder(blocks)
971
+ .pipe(operators.mapTo(blocks)); }), operators.takeUntil(this._destroy$))
971
972
  .subscribe(function (blocks) {
972
973
  blocks
973
974
  .forEach(function (block, index) {
@@ -1644,7 +1645,7 @@
1644
1645
  .subscribe(function () {
1645
1646
  _this._cdRef.markForCheck();
1646
1647
  });
1647
- if (this._blockEditor.config.blocksReordered) {
1648
+ if (this._blockEditor.config.blocksReorder) {
1648
1649
  this.blocksReordered = function () {
1649
1650
  var _a;
1650
1651
  (_a = _this._document.defaultView) === null || _a === void 0 ? void 0 : _a.scrollTo(0, 0);