@univerjs-pro/collaboration 0.1.10
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/README.md +17 -0
- package/lib/cjs/index.js +1 -0
- package/lib/es/index.js +1 -0
- package/lib/types/controllers/doc-transform/algorithms/doc-algo.d.ts +4 -0
- package/lib/types/controllers/doc-transform/doc-transform.controller.d.ts +10 -0
- package/lib/types/controllers/doc-transform/text-x-pro/__tests__/transform-position.spec.d.ts +1 -0
- package/lib/types/controllers/doc-transform/text-x-pro/__tests__/transform.spec.d.ts +1 -0
- package/lib/types/controllers/doc-transform/text-x-pro/text-x-pro.d.ts +34 -0
- package/lib/types/controllers/doc-transform/text-x-pro/utils.d.ts +3 -0
- package/lib/types/controllers/sheet-transform/algorithms/__tests__/transform-test-bed.d.ts +19 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-conditional-rule/__test__/add-conditional-rule.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-conditional-rule/add-conditional-formatting-rule.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/add-data-validation.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/update-data-validation.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/__test__/util.d.ts +14 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/add-data-validation.algo.d.ts +16 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-data-validation/update-data-validation.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/insert-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/insert-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/move-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/move-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/remove-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/remove-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/__test__/set-range-values.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/insert-col.algo.d.ts +6 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/insert-row.algo.d.ts +6 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/move-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/move-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/remove-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/remove-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/remove-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/set-selection.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/add-worksheet-merge/utils/merge-tools.d.ts +3 -0
- package/lib/types/controllers/sheet-transform/algorithms/delete-conditional-formatting-rule/delete-conditional-formatting-rule.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/insert-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/move-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/move-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/remove-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/remove-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-col-hidden.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-col-visible.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-range-values.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-sheets-filter-criteria.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/add-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/insert-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/move-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/remove-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/remove-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-col-hidden.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-col-visible.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-selection.algo.d.ts +8 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-sheets-filter-criteria.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-sheets-filter-range.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/set-worksheet-col-width.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-col/update-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/insert-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/move-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/move-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/remove-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/remove-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-range-values.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-row-hidden.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-row-visible.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/add-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/insert-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/move-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/remove-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/remove-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-row-hidden.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-row-visible.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-selection.algo.d.ts +8 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/set-sheets-filter-range.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/insert-row/update-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/move-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/move-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/remove-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-col-hidden.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-col-visible.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-range-values.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-sheets-filter-criteria.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/add-data-validation.algo.d.ts +7 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/move-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/remove-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-col-hidden.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-col-visible.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-selection.algo.d.ts +8 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-sheets-filter-criteria.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-sheets-filter-range.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/set-worksheet-col-width.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-col/update-data-validation.algo.d.ts +10 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-conditional-formatting-rule/__test__/move-conditional-formatting-rule.algo.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-conditional-formatting-rule/move-conditional-formatting-rule.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-range/add-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-range/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-range/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-range/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-range/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/add-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/move-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/move-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/remove-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-range-values.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-row-hidden.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-row-visible.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/__test__/set-sheets-filter-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/add-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/move-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/remove-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/set-row-hidden.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/set-row-visible.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/set-selection.algo.d.ts +8 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/set-sheets-filter-range.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/move-row/update-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/move-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/move-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/remove-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/remove-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-col-hidden.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-col-visible.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-range-values.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-sheets-filter-criteria.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/__tests__/set-sheets-filter-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/add-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/move-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/remove-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/remove-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-col-hidden.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-col-visible.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-selection.algo.d.ts +8 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-sheets-filter-criteria.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-sheets-filter-range.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/set-worksheet-col-width.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-col/update-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-data-validation/__test__/remove-data-validation.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-data-validation/remove-data-validation.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-numfmt/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-numfmt/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/move-range.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/move-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/remove-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/remove-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-range-value.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-row-hidden.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/__tests__/set-row-visible.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/add-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/move-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/remove-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/remove-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-row-hidden.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-row-visible.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-selection.algo.d.ts +8 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/set-sheets-filter-range.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-row/update-data-validation.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-sheets-filter/remove-sheets-filter.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-sheets-filter/set-sheets-filter-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/__tests__/add-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/__tests__/insert-col.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/__tests__/insert-row.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/insert-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/insert-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/move-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/move-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/remove-col.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/remove-row.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/remove-worksheet-merge/set-selection.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-conditional-formatting-rule/__test__/set-conditional-formatting-rule.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-conditional-formatting-rule/set-conditional-formatting-rule.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-frozen/__test__/set-frozen.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-frozen/set-frozen.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-numfmt/__test__/set-numfmt.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-numfmt/remove-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-numfmt/set-numfmt.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-range-values/__test__/set-range-valuea.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-range-values/add-worksheet-merge.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-range-values/move-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-range-values/set-range-values.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/move-range.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/remove-sheets-filter.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/set-range-values.algo.d.ts +5 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-criteria/set-sheets-filter-criteria.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-range/remove-sheets-filter.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-sheets-filter-range/set-sheets-filter-range.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-tab-color/__test__/set-tab-color.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-tab-color/set-tab-color.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-col-width/set-worksheet-col-width.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/set-worksheet-name/set-worksheet-name.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/__test__/add-data-validation.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/__test__/remove-data-validation.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/__test__/update-data-validation.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/add-data-validation.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/remove-data-validation.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/update-data-validation/update-data-validation.algo.d.ts +4 -0
- package/lib/types/controllers/sheet-transform/algorithms/utils.d.ts +29 -0
- package/lib/types/controllers/sheet-transform/algorithms/worksheet/__tests__/add-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/worksheet/__tests__/remove-worksheet-merge.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/worksheet/__tests__/worksheet.algo.spec.d.ts +1 -0
- package/lib/types/controllers/sheet-transform/algorithms/worksheet/add-worksheet-merge.algo.d.ts +3 -0
- package/lib/types/controllers/sheet-transform/algorithms/worksheet/remove-worksheet-merge.algo.d.ts +3 -0
- package/lib/types/controllers/sheet-transform/algorithms/worksheet/worksheet.algo.d.ts +9 -0
- package/lib/types/controllers/sheet-transform/sheet-transform.controller.d.ts +10 -0
- package/lib/types/index.d.ts +12 -0
- package/lib/types/models/changeset.d.ts +16 -0
- package/lib/types/models/collaboration-events.d.ts +211 -0
- package/lib/types/models/socket-events.d.ts +54 -0
- package/lib/types/plugin.d.ts +12 -0
- package/lib/types/services/compose-changesets/compose-changesets.service.d.ts +6 -0
- package/lib/types/services/compress-mutation/compress-mutation-service.d.ts +20 -0
- package/lib/types/services/compress-mutation/compress-mutations/__test__/set-range-values.spec.d.ts +16 -0
- package/lib/types/services/compress-mutation/compress-mutations/set-range-values.d.ts +14 -0
- package/lib/types/services/rev/__tests__/rev.service.spec.d.ts +20 -0
- package/lib/types/services/rev/rev.service.d.ts +23 -0
- package/lib/types/services/snapshot/__tests__/snapshot.service.spec.d.ts +12 -0
- package/lib/types/services/snapshot/snapshot.service.d.ts +22 -0
- package/lib/types/services/transform/__tests__/doc.transform.service.spec.d.ts +1 -0
- package/lib/types/services/transform/__tests__/transform.service.spec.d.ts +1 -0
- package/lib/types/services/transform/transform.service.d.ts +115 -0
- package/lib/types/services/transform/types.d.ts +48 -0
- package/lib/types/utils.d.ts +4 -0
- package/lib/umd/index.js +1 -0
- package/package.json +79 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Injector } from '@wendellhu/redi';
|
|
2
|
+
import { Plugin } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export interface ICollaborationPluginConfig {
|
|
5
|
+
}
|
|
6
|
+
export declare class CollaborationPlugin extends Plugin {
|
|
7
|
+
private _config;
|
|
8
|
+
protected _injector: Injector;
|
|
9
|
+
static pluginName: string;
|
|
10
|
+
constructor(_config: ICollaborationPluginConfig, _injector: Injector);
|
|
11
|
+
onStarting(injector: Injector): void;
|
|
12
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { InterceptorManager } from '@univerjs/core';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* During transmission, compression is performed for a specific operation,referencing during transport.
|
|
5
|
+
* Before send -> compress -> transmission -> ... -> node apply -> decompression -> apply.
|
|
6
|
+
* Before send -> compress -> transmission -> ... -> node transform -> decompression -> apply.
|
|
7
|
+
* Before send -> compress -> transmission -> ... -> take from server -> decompression -> apply.
|
|
8
|
+
* Before send -> compress -> save to local -> ... -> take from local -> decompression -> apply.
|
|
9
|
+
* @export
|
|
10
|
+
* @class CompressMutationService
|
|
11
|
+
*/
|
|
12
|
+
export declare class CompressMutationService {
|
|
13
|
+
interceptor: InterceptorManager<{
|
|
14
|
+
COMPRESS_MUTATION_APPLY: import('@univerjs/core').IInterceptor<import('@univerjs/core').IMutationInfo<object>[], null>;
|
|
15
|
+
COMPRESS_MUTATION_SEND: import('@univerjs/core').IInterceptor<import('@univerjs/core').IMutationInfo<object>[], null>;
|
|
16
|
+
}>;
|
|
17
|
+
constructor();
|
|
18
|
+
private _init;
|
|
19
|
+
private _initSetRangeValues;
|
|
20
|
+
}
|
package/lib/types/services/compress-mutation/compress-mutations/__test__/set-range-values.spec.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023-present DreamNum Inc.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ICellData, IObjectMatrixPrimitiveType, Nullable } from '@univerjs/core';
|
|
2
|
+
|
|
3
|
+
export declare const transformRefStyleFromCells: (matrix?: IObjectMatrixPrimitiveType<Nullable<ICellData>>) => {
|
|
4
|
+
cellValue: undefined;
|
|
5
|
+
styleRefMap: undefined;
|
|
6
|
+
} | {
|
|
7
|
+
cellValue: IObjectMatrixPrimitiveType<Nullable<ICellData>>;
|
|
8
|
+
styleRefMap: {
|
|
9
|
+
[id: string]: Nullable<string | import('@univerjs/core').IStyleData>;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const transformCellsFromRefStyle: (matrix?: IObjectMatrixPrimitiveType<Nullable<ICellData>>, styleRefMap?: {
|
|
13
|
+
[id: string]: ICellData['s'];
|
|
14
|
+
}) => IObjectMatrixPrimitiveType<Nullable<ICellData>> | undefined;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Dependency, Injector } from '@wendellhu/redi';
|
|
2
|
+
import { IWorkbookData, PluginCtor, Workbook, Plugin, Univer } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export interface ITestBed {
|
|
5
|
+
univer: Univer;
|
|
6
|
+
get: Injector['get'];
|
|
7
|
+
sheet: Workbook;
|
|
8
|
+
}
|
|
9
|
+
export declare function createCollaborationTestBed(workbookData?: IWorkbookData, dependencies?: Dependency[], plugins?: Array<PluginCtor<Plugin>>): {
|
|
10
|
+
univer: Univer;
|
|
11
|
+
get: {
|
|
12
|
+
<T>(id: import('@wendellhu/redi').DependencyIdentifier<T>, lookUp?: import('@wendellhu/redi').LookUp | undefined): T;
|
|
13
|
+
<T_1>(id: import('@wendellhu/redi').DependencyIdentifier<T_1>, quantity: import("@wendellhu/redi").Quantity.MANY, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_1[];
|
|
14
|
+
<T_2>(id: import('@wendellhu/redi').DependencyIdentifier<T_2>, quantity: import("@wendellhu/redi").Quantity.OPTIONAL, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_2 | null;
|
|
15
|
+
<T_3>(id: import('@wendellhu/redi').DependencyIdentifier<T_3>, quantity: import("@wendellhu/redi").Quantity.REQUIRED, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_3;
|
|
16
|
+
<T_4>(id: import('@wendellhu/redi').DependencyIdentifier<T_4>, quantity?: import('@wendellhu/redi').Quantity | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_4 | T_4[] | null;
|
|
17
|
+
<T_5>(id: import('@wendellhu/redi').DependencyIdentifier<T_5>, quantityOrLookup?: import('@wendellhu/redi').Quantity | import('@wendellhu/redi').LookUp | undefined, lookUp?: import('@wendellhu/redi').LookUp | undefined): T_5 | T_5[] | null;
|
|
18
|
+
};
|
|
19
|
+
sheet: Workbook;
|
|
20
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ILogService, IUniverInstanceService } from '@univerjs/core';
|
|
2
|
+
|
|
3
|
+
/** Some special mutations. It a changeset contains the following mutations it should create a snapshot immediately. */
|
|
4
|
+
export declare const SINGLE_SNAPSHOT_MUTATIONS: Set<string>;
|
|
5
|
+
/**
|
|
6
|
+
* This service provide util functions to get revision number of a document or increment the revision number.
|
|
7
|
+
*/
|
|
8
|
+
export declare class RevisionService {
|
|
9
|
+
private readonly _univerInstanceService;
|
|
10
|
+
private readonly _logService;
|
|
11
|
+
constructor(_univerInstanceService: IUniverInstanceService, _logService: ILogService);
|
|
12
|
+
/**
|
|
13
|
+
* Get the current revision of a document.
|
|
14
|
+
* @param unitID
|
|
15
|
+
*/
|
|
16
|
+
getCurrentRevForDocument(unitID: string): number;
|
|
17
|
+
/**
|
|
18
|
+
* Increment the revision number of a document.
|
|
19
|
+
* @param unitID
|
|
20
|
+
* @returns The revision number after increment.
|
|
21
|
+
*/
|
|
22
|
+
incrementRevForDocument(unitID: string): number;
|
|
23
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IFetchMissingChangesetsResponse, IGetResourcesResponse, IGetSheetBlockRequest, IGetSheetBlockResponse, IGetUnitOnRevRequest, IGetUnitOnRevResponse, ISaveChangesetResponse, ISaveSheetBlockResponse, ISaveSnapshotResponse } from '@univerjs/protocol';
|
|
2
|
+
import { ILogContext, ISnapshotServerService } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export declare class MockSnapshotServerService implements ISnapshotServerService {
|
|
5
|
+
getUnitOnRev(_context: ILogContext, params: IGetUnitOnRevRequest): Promise<IGetUnitOnRevResponse>;
|
|
6
|
+
getSheetBlock(_context: ILogContext, params: IGetSheetBlockRequest): Promise<IGetSheetBlockResponse>;
|
|
7
|
+
fetchMissingChangesets(): Promise<IFetchMissingChangesetsResponse>;
|
|
8
|
+
getResourcesRequest(): Promise<IGetResourcesResponse>;
|
|
9
|
+
saveSnapshot(): Promise<ISaveSnapshotResponse>;
|
|
10
|
+
saveSheetBlock(): Promise<ISaveSheetBlockResponse>;
|
|
11
|
+
saveChangeset(): Promise<ISaveChangesetResponse>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { RevisionService } from '../rev/rev.service';
|
|
2
|
+
import { CompressMutationService } from '../compress-mutation/compress-mutation-service';
|
|
3
|
+
import { Injector } from '@wendellhu/redi';
|
|
4
|
+
import { DocumentDataModel, IDocumentData, ILogContext, IWorkbookData, Workbook, ICommandService, IResourceManagerService, ISnapshotServerService, IUniverInstanceService } from '@univerjs/core';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* The service provides methods to load snapshots from the snapshot server.
|
|
8
|
+
*/
|
|
9
|
+
export declare class SnapshotService {
|
|
10
|
+
private readonly _revisionService;
|
|
11
|
+
private readonly _univerInstanceService;
|
|
12
|
+
private readonly _snapshotServerService;
|
|
13
|
+
private readonly _commandService;
|
|
14
|
+
private _injector;
|
|
15
|
+
private _compressMutationService;
|
|
16
|
+
private _resourceManagerService;
|
|
17
|
+
constructor(_revisionService: RevisionService, _univerInstanceService: IUniverInstanceService, _snapshotServerService: ISnapshotServerService, _commandService: ICommandService, _injector: Injector, _compressMutationService: CompressMutationService, _resourceManagerService: IResourceManagerService);
|
|
18
|
+
loadSheet(unitID: string, rev: number, context?: ILogContext): Promise<Workbook>;
|
|
19
|
+
loadDoc(unitID: string, rev: number, context?: ILogContext): Promise<DocumentDataModel>;
|
|
20
|
+
save(_context: ILogContext, workbook: Workbook): IWorkbookData;
|
|
21
|
+
saveDoc(_context: ILogContext, document: DocumentDataModel): IDocumentData;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { IFailureTransformChangesetsResult, IFailureTransformMutationResult, IFailureTransformMutationsResult, ISuccessTransformChangesetsResult, ISuccessTransformMutationResult, ISuccessTransformMutationsResult, ITransformChangesetsResult, ITransformMutationResult, ITransformMutationsResult, ITransformMutationsWithChangesetResult } from './types';
|
|
2
|
+
import { IChangeset } from '../../models/changeset';
|
|
3
|
+
import { IMutationInfo, Disposable } from '@univerjs/core';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A single transform algorithm. Algorithms are registered to the transform service in the form of `{m1}-{m2}`.
|
|
7
|
+
* When the transform service is transforming two mutations, it would find the algorithm by the form of `{m1}-{m2}`.
|
|
8
|
+
* `m1` is the mutation on the left side, and `m2` is the mutation on the right side.
|
|
9
|
+
*/
|
|
10
|
+
export interface IMutationTransformAlgorithm<M extends object = any, N extends object = any> {
|
|
11
|
+
m1: string;
|
|
12
|
+
m2?: string | 'any';
|
|
13
|
+
handler(m1: IMutationInfo<M>, m2: IMutationInfo<N>): ITransformMutationResult;
|
|
14
|
+
handler(m1: IMutationInfo<M>, m2: IMutationInfo<N>, onlyLater?: true): Omit<ISuccessTransformMutationResult, 'm1Prime'> | IFailureTransformMutationResult;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* This service's responsibility is to transform mutations (changesets).
|
|
18
|
+
*
|
|
19
|
+
* Features could register transform algorithms to this service, so this the service could transform more mutations.
|
|
20
|
+
*
|
|
21
|
+
* This should be used both on client and server.
|
|
22
|
+
*
|
|
23
|
+
* This service is also business-agnostic, so it could be used in docs, sheets and slides.
|
|
24
|
+
*/
|
|
25
|
+
export interface ITransformService {
|
|
26
|
+
/**
|
|
27
|
+
* Register an algorithm to transform two kinds of mutations.
|
|
28
|
+
*
|
|
29
|
+
* Note that this method is not the same as other registering methods in Univer, it wouldn't return a disposable,
|
|
30
|
+
* because it would cause critical problems if you unregister a transform algorithm.
|
|
31
|
+
*/
|
|
32
|
+
registerTransformAlgorithm: (algorithms: IMutationTransformAlgorithm) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Transform two single mutations. Note that m1Prime and m2Prime may not be single mutations. 1x1 may result in nxn.
|
|
35
|
+
*
|
|
36
|
+
* @internal
|
|
37
|
+
*
|
|
38
|
+
* Visualization:
|
|
39
|
+
*
|
|
40
|
+
* /\
|
|
41
|
+
* m1 / \ m2
|
|
42
|
+
* / \
|
|
43
|
+
* \ /
|
|
44
|
+
* m2Prime \ / m1Prime
|
|
45
|
+
* \/
|
|
46
|
+
*
|
|
47
|
+
* @param m1
|
|
48
|
+
* @param m2
|
|
49
|
+
* @param onlyLeft If set to true, the result would only contain m1Prime.
|
|
50
|
+
*/
|
|
51
|
+
transformMutation(m1: IMutationInfo, m2: IMutationInfo): IFailureTransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>;
|
|
52
|
+
transformMutation(m1: IMutationInfo, m2: IMutationInfo, onlyLater: false): ITransformMutationResult;
|
|
53
|
+
/**
|
|
54
|
+
* Transform two array of mutations. Not that the time complexity (also memory complexity) of this method is O(m*n),
|
|
55
|
+
* in which m & n are numbers of mutations in each array.
|
|
56
|
+
*
|
|
57
|
+
* @internal
|
|
58
|
+
*
|
|
59
|
+
* Visualization:
|
|
60
|
+
*
|
|
61
|
+
* /\
|
|
62
|
+
* m1 / \ m2
|
|
63
|
+
* / \
|
|
64
|
+
* /\ /\
|
|
65
|
+
* / \ / \
|
|
66
|
+
* / \/ \
|
|
67
|
+
* \ /\ /
|
|
68
|
+
* \ / \ /
|
|
69
|
+
* \/ \/
|
|
70
|
+
* \ /
|
|
71
|
+
* \ /
|
|
72
|
+
* m2Prime \/ m1Prime
|
|
73
|
+
*
|
|
74
|
+
* @param m1
|
|
75
|
+
* @param m2
|
|
76
|
+
*/
|
|
77
|
+
transformMutations(m1: IMutationInfo[], m2: IMutationInfo[]): IFailureTransformMutationsResult | Omit<ISuccessTransformMutationsResult, 'm1Prime'>;
|
|
78
|
+
transformMutations(m1: IMutationInfo[], m2: IMutationInfo[], onlyLater: boolean): ITransformMutationsResult;
|
|
79
|
+
/**
|
|
80
|
+
* Transform two arrays of changesets
|
|
81
|
+
*
|
|
82
|
+
* @internal
|
|
83
|
+
*/
|
|
84
|
+
transformChangesets(c1: IChangeset[], c2: IChangeset[]): IFailureTransformChangesetsResult | Omit<ISuccessTransformChangesetsResult, 'c1Prime'>;
|
|
85
|
+
transformChangesets(c1: IChangeset[], c2: IChangeset[], onlyLater: false): ITransformChangesetsResult;
|
|
86
|
+
/**
|
|
87
|
+
* Transform mutations with changesets. We only wants transformed mutations here.
|
|
88
|
+
*
|
|
89
|
+
* @internal
|
|
90
|
+
*/
|
|
91
|
+
transformMutationsWithChangeset: (c1: IChangeset, m2: IMutationInfo[]) => ITransformMutationsWithChangesetResult;
|
|
92
|
+
}
|
|
93
|
+
export declare const ITransformService: import('@wendellhu/redi').IdentifierDecorator<ITransformService>;
|
|
94
|
+
export declare class TransformService extends Disposable implements ITransformService {
|
|
95
|
+
private readonly _transformMap;
|
|
96
|
+
dispose(): void;
|
|
97
|
+
registerTransformAlgorithm(algorithm: IMutationTransformAlgorithm): void;
|
|
98
|
+
transformMutation(m1: IMutationInfo, m2: IMutationInfo): ITransformMutationResult;
|
|
99
|
+
transformMutation(m1: IMutationInfo, m2: IMutationInfo, onlyLater: true): IFailureTransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>;
|
|
100
|
+
transformMutations(m1: IMutationInfo[], m2: IMutationInfo[]): ITransformMutationsResult;
|
|
101
|
+
transformMutations(m1: IMutationInfo[], m2: IMutationInfo[], onlyLater: true): IFailureTransformMutationsResult | Omit<ISuccessTransformMutationsResult, 'm1Prime'>;
|
|
102
|
+
/**
|
|
103
|
+
* Assume `m1` has already applied to the document, we need m2Prime to be applied to the document.
|
|
104
|
+
*
|
|
105
|
+
* @param m1
|
|
106
|
+
* @param m2
|
|
107
|
+
* @returns transformed mutations of m2
|
|
108
|
+
*/
|
|
109
|
+
private _rightInclineTransformMutations;
|
|
110
|
+
private _leftInclineTransformMutations;
|
|
111
|
+
transformChangesets(c1: IChangeset[], c2: IChangeset[]): ITransformChangesetsResult;
|
|
112
|
+
transformChangesets(c1: IChangeset[], c2: IChangeset[], onlyLater: true): IFailureTransformChangesetsResult | Omit<ISuccessTransformChangesetsResult, 'c1Prime'>;
|
|
113
|
+
transformMutationsWithChangeset(c1: IChangeset, m2: IMutationInfo[]): ITransformMutationsWithChangesetResult;
|
|
114
|
+
}
|
|
115
|
+
export declare function makeArray<T>(input: T | T[]): T[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { IChangeset } from '../../models/changeset';
|
|
2
|
+
import { IMutationInfo } from '@univerjs/core';
|
|
3
|
+
|
|
4
|
+
export interface ISuccessTransformMutationResult {
|
|
5
|
+
m1Prime: IMutationInfo | IMutationInfo[];
|
|
6
|
+
m2Prime: IMutationInfo | IMutationInfo[];
|
|
7
|
+
}
|
|
8
|
+
export interface IFailureTransformMutationResult {
|
|
9
|
+
error: Error;
|
|
10
|
+
}
|
|
11
|
+
export type ITransformMutationResult = ISuccessTransformMutationResult | IFailureTransformMutationResult;
|
|
12
|
+
export declare function isTransformMutationFailure(result: ITransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>): result is IFailureTransformMutationResult;
|
|
13
|
+
export declare function isTransformMutationSuccess(result: ITransformMutationResult | Omit<ISuccessTransformMutationResult, 'm1Prime'>): result is ISuccessTransformMutationResult;
|
|
14
|
+
export interface IFailureInclineTransformMutationsResult {
|
|
15
|
+
error: Error;
|
|
16
|
+
}
|
|
17
|
+
export type IInclineTransformMutationsResult = IMutationInfo[] | IFailureInclineTransformMutationsResult;
|
|
18
|
+
export declare function isInclineTransformMutationsFailure(result: IInclineTransformMutationsResult): result is IFailureInclineTransformMutationsResult;
|
|
19
|
+
export interface ISuccessTransformMutationsResult {
|
|
20
|
+
m1Prime: IMutationInfo[];
|
|
21
|
+
m2Prime: IMutationInfo[];
|
|
22
|
+
}
|
|
23
|
+
export interface IFailureTransformMutationsResult {
|
|
24
|
+
error: Error;
|
|
25
|
+
}
|
|
26
|
+
export type ITransformMutationsResult = ISuccessTransformMutationsResult | IFailureTransformMutationsResult;
|
|
27
|
+
export declare function isTransformMutationsFailure(result: Partial<ITransformMutationsResult>): result is IFailureTransformMutationsResult;
|
|
28
|
+
export declare function isTransformMutationsSuccess(result: Partial<ITransformMutationsResult>): result is ISuccessTransformMutationsResult;
|
|
29
|
+
export interface ISuccessTransformChangesetsResult {
|
|
30
|
+
c1Prime: IChangeset[];
|
|
31
|
+
c2Prime: IChangeset[];
|
|
32
|
+
}
|
|
33
|
+
export interface IFailureTransformChangesetsResult {
|
|
34
|
+
error: Error;
|
|
35
|
+
}
|
|
36
|
+
export type ITransformChangesetsResult = ISuccessTransformChangesetsResult | IFailureTransformChangesetsResult;
|
|
37
|
+
export declare function isTransformChangesetsFailure(result: Partial<ITransformChangesetsResult>): result is IFailureTransformChangesetsResult;
|
|
38
|
+
export declare function isTransformChangesetsSuccess(result: Partial<ITransformChangesetsResult>): result is ISuccessTransformChangesetsResult;
|
|
39
|
+
export interface ISuccessTransformMutationsWithChangesetResult {
|
|
40
|
+
c1Prime: IChangeset;
|
|
41
|
+
m2Prime: IMutationInfo[];
|
|
42
|
+
}
|
|
43
|
+
export interface IFailureTransformMutationsWithChangesetResult {
|
|
44
|
+
error: Error;
|
|
45
|
+
}
|
|
46
|
+
export type ITransformMutationsWithChangesetResult = ISuccessTransformMutationsWithChangesetResult | IFailureTransformMutationsWithChangesetResult;
|
|
47
|
+
export declare function isTransformMutationsWithChangesetFailure(result: ITransformMutationsWithChangesetResult): result is IFailureTransformMutationsWithChangesetResult;
|
|
48
|
+
export declare function isTransformMutationsWithChangesetSuccess(result: ITransformMutationsWithChangesetResult): result is ISuccessTransformMutationsWithChangesetResult;
|