@ones-editor/editor 2.1.8-beta.1 → 2.1.8-beta.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/@ones-editor/core/src/core/block-renderers/block-renderers.d.ts +1 -0
- package/@ones-editor/core/src/core/doc/doc.d.ts +1 -1
- package/@ones-editor/core/src/core/types.d.ts +2 -0
- package/@ones-editor/sharedb-doc/src/versions/sharedb-server.d.ts +1 -1
- package/@ones-editor/sharedb-doc/src/versions/simple-client.d.ts +1 -1
- package/@ones-editor/tsconfig.tsbuildinfo +1 -1
- package/@ones-editor/versions/src/history-render/index.d.ts +14 -0
- package/@ones-editor/versions/src/types.d.ts +4 -0
- package/@ones-editor/versions/src/utils/block-text.d.ts +3 -1
- package/@ones-editor/versions/src/utils/index.d.ts +1 -0
- package/dist/index.js +479 -212
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4795,158 +4795,87 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
4795
4795
|
--editor-version-button-border: black;
|
|
4796
4796
|
--editor-bg-color: #ffffff;
|
|
4797
4797
|
--editor-version-list-bg-color: white;
|
|
4798
|
-
--editor-version-select-bg-color: #
|
|
4798
|
+
--editor-version-select-bg-color: #f0f6ff;
|
|
4799
4799
|
}
|
|
4800
|
-
.
|
|
4801
|
-
display: flex;
|
|
4802
|
-
background-color: var(--editor-bg-color);
|
|
4803
|
-
width: 100%;
|
|
4804
|
-
height: 100%;
|
|
4805
|
-
color: var(--editor-color);
|
|
4806
|
-
}
|
|
4807
|
-
.version-dialog * {
|
|
4808
|
-
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
|
4809
|
-
box-sizing: border-box;
|
|
4810
|
-
}
|
|
4811
|
-
.version-dialog.loading .version-viewer .version-info-container {
|
|
4800
|
+
.editor-root.history .root-container .editor-block .text-element .inline-plugin.editor-box-loading {
|
|
4812
4801
|
display: none;
|
|
4813
4802
|
}
|
|
4814
|
-
.
|
|
4815
|
-
|
|
4816
|
-
flex: 1;
|
|
4817
|
-
align-items: center;
|
|
4818
|
-
justify-content: center;
|
|
4803
|
+
.editor-root.history .editor-content {
|
|
4804
|
+
padding: 30px 75px;
|
|
4819
4805
|
}
|
|
4820
|
-
.
|
|
4821
|
-
|
|
4822
|
-
height: 28px;
|
|
4806
|
+
.editor-root.history .table-block.history-inserted-block table, .editor-root.history .table-block.history-updated-block table {
|
|
4807
|
+
position: relative;
|
|
4823
4808
|
}
|
|
4824
|
-
.
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4809
|
+
.editor-root.history .table-block.history-inserted-block table::before, .editor-root.history .table-block.history-updated-block table::before {
|
|
4810
|
+
content: "";
|
|
4811
|
+
position: absolute;
|
|
4812
|
+
top: -5px;
|
|
4813
|
+
bottom: -5px;
|
|
4814
|
+
left: -5px;
|
|
4815
|
+
right: -5px;
|
|
4816
|
+
background-color: var(--op-selected-color);
|
|
4830
4817
|
border-radius: 3px;
|
|
4831
|
-
|
|
4832
|
-
align-items: center;
|
|
4833
|
-
font-size: 12px;
|
|
4834
|
-
font-weight: normal;
|
|
4835
|
-
margin-left: 10px;
|
|
4836
|
-
}
|
|
4837
|
-
.version-dialog .version-viewer {
|
|
4838
|
-
flex: 1;
|
|
4839
|
-
display: flex;
|
|
4840
|
-
flex-direction: column;
|
|
4841
|
-
width: 0;
|
|
4842
|
-
padding: 0;
|
|
4843
|
-
min-width: 0;
|
|
4844
|
-
}
|
|
4845
|
-
.version-dialog .version-viewer .version-dialog-editor {
|
|
4846
|
-
overflow-y: auto;
|
|
4847
|
-
}
|
|
4848
|
-
.version-dialog .version-viewer .version-info-container {
|
|
4849
|
-
height: 50px;
|
|
4850
|
-
border-bottom: #e8e8e8 1px solid;
|
|
4851
|
-
display: flex;
|
|
4852
|
-
align-items: center;
|
|
4853
|
-
flex-shrink: 0;
|
|
4854
|
-
padding-left: 20px;
|
|
4855
|
-
font-size: 14px;
|
|
4856
|
-
color: #303030;
|
|
4857
|
-
}
|
|
4858
|
-
.version-dialog .version-viewer .version-info-container .version-info-right .text-3 {
|
|
4859
|
-
color: #909090;
|
|
4860
|
-
}
|
|
4861
|
-
.version-dialog .version-viewer .version-info-container .version-info-left {
|
|
4862
|
-
display: flex;
|
|
4863
|
-
align-items: center;
|
|
4864
|
-
}
|
|
4865
|
-
.version-dialog .version-viewer .version-info-container .version-info-left .text-1,
|
|
4866
|
-
.version-dialog .version-viewer .version-info-container .version-info-left .text-2 {
|
|
4867
|
-
color: #909090;
|
|
4868
|
-
}
|
|
4869
|
-
.version-dialog .version-viewer .version-info-container .version-info-left .name {
|
|
4870
|
-
padding-left: 5px;
|
|
4871
|
-
padding-right: 10px;
|
|
4872
|
-
font-weight: 500;
|
|
4873
|
-
}
|
|
4874
|
-
.version-dialog .version-viewer .version-info-container .version-info-left .name .version-item-latest {
|
|
4875
|
-
margin-left: 5px;
|
|
4876
|
-
}
|
|
4877
|
-
.version-dialog .version-viewer .version-info-container .editor-dropdown {
|
|
4878
|
-
margin-left: 10px;
|
|
4879
|
-
margin-right: 10px;
|
|
4880
|
-
}
|
|
4881
|
-
.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version] {
|
|
4882
|
-
min-width: 200px;
|
|
4883
|
-
border: 1px solid #f0f0f0;
|
|
4884
|
-
}
|
|
4885
|
-
.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version] .toolbar-item-name-container {
|
|
4886
|
-
flex-grow: 1;
|
|
4887
|
-
}
|
|
4888
|
-
.version-dialog .version-viewer .dialog-button-text {
|
|
4889
|
-
margin-top: 1px;
|
|
4890
|
-
margin-left: -4px;
|
|
4891
|
-
}
|
|
4892
|
-
.version-dialog .version-viewer .dialog-text-button {
|
|
4893
|
-
outline: none;
|
|
4894
|
-
background: transparent;
|
|
4895
|
-
border: none;
|
|
4896
|
-
display: flex;
|
|
4897
|
-
align-items: center;
|
|
4898
|
-
color: var(--editor-color);
|
|
4899
|
-
font-size: 16px;
|
|
4900
|
-
font-weight: 500;
|
|
4901
|
-
padding: 4px 0px;
|
|
4902
|
-
cursor: pointer;
|
|
4818
|
+
pointer-events: none;
|
|
4903
4819
|
}
|
|
4904
|
-
.
|
|
4905
|
-
|
|
4906
|
-
width: 24px;
|
|
4907
|
-
height: 24px;
|
|
4820
|
+
.editor-root.history .table-block.history-inserted-block table .child, .editor-root.history .table-block.history-updated-block table .child {
|
|
4821
|
+
pointer-events: none;
|
|
4908
4822
|
}
|
|
4909
|
-
.
|
|
4910
|
-
|
|
4823
|
+
.editor-root.history .table-block.history-deleted-block table {
|
|
4824
|
+
position: relative;
|
|
4911
4825
|
}
|
|
4912
|
-
.editor-root.history .
|
|
4913
|
-
|
|
4826
|
+
.editor-root.history .table-block.history-deleted-block table::after {
|
|
4827
|
+
content: "";
|
|
4828
|
+
position: absolute;
|
|
4829
|
+
top: -5px;
|
|
4830
|
+
bottom: -5px;
|
|
4831
|
+
left: -5px;
|
|
4832
|
+
right: -5px;
|
|
4833
|
+
background-color: var(--op-selected-color);
|
|
4834
|
+
border-radius: 3px;
|
|
4835
|
+
pointer-events: none;
|
|
4836
|
+
background-repeat: no-repeat;
|
|
4837
|
+
background-position: center;
|
|
4838
|
+
background-size: auto clamp(20px, 10%, 60px);
|
|
4839
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
4914
4840
|
}
|
|
4915
|
-
.editor-root.history .
|
|
4916
|
-
|
|
4841
|
+
.editor-root.history .table-block.history-deleted-block table .child {
|
|
4842
|
+
pointer-events: none;
|
|
4917
4843
|
}
|
|
4918
|
-
.editor-root.history .history-inserted-
|
|
4844
|
+
.editor-root.history .table-block .history-inserted-container {
|
|
4919
4845
|
position: relative;
|
|
4920
4846
|
}
|
|
4921
|
-
.editor-root.history .history-inserted-
|
|
4847
|
+
.editor-root.history .table-block .history-inserted-container::before {
|
|
4922
4848
|
content: "";
|
|
4923
4849
|
position: absolute;
|
|
4924
|
-
top:
|
|
4925
|
-
bottom:
|
|
4926
|
-
left:
|
|
4927
|
-
right:
|
|
4850
|
+
top: 8px;
|
|
4851
|
+
bottom: 8px;
|
|
4852
|
+
left: 8px;
|
|
4853
|
+
right: 8px;
|
|
4928
4854
|
background-color: var(--op-selected-color);
|
|
4929
4855
|
border-radius: 0px;
|
|
4930
4856
|
pointer-events: none;
|
|
4931
4857
|
}
|
|
4932
|
-
.editor-root.history .
|
|
4858
|
+
.editor-root.history .table-block div[data-type=block-content] {
|
|
4859
|
+
overflow-x: revert;
|
|
4860
|
+
}
|
|
4861
|
+
.editor-root.history .layout-block.history-inserted-block {
|
|
4933
4862
|
position: relative;
|
|
4934
4863
|
}
|
|
4935
|
-
.editor-root.history .history-inserted-block
|
|
4864
|
+
.editor-root.history .layout-block.history-inserted-block::before {
|
|
4936
4865
|
content: "";
|
|
4937
4866
|
position: absolute;
|
|
4938
|
-
top:
|
|
4939
|
-
bottom:
|
|
4940
|
-
left:
|
|
4941
|
-
right:
|
|
4867
|
+
top: -5px;
|
|
4868
|
+
bottom: -5px;
|
|
4869
|
+
left: -5px;
|
|
4870
|
+
right: -5px;
|
|
4942
4871
|
background-color: var(--op-selected-color);
|
|
4943
|
-
border-radius:
|
|
4872
|
+
border-radius: 3px;
|
|
4944
4873
|
pointer-events: none;
|
|
4945
4874
|
}
|
|
4946
|
-
.editor-root.history .
|
|
4875
|
+
.editor-root.history .layout-block.history-deleted-block {
|
|
4947
4876
|
position: relative;
|
|
4948
4877
|
}
|
|
4949
|
-
.editor-root.history .
|
|
4878
|
+
.editor-root.history .layout-block.history-deleted-block::after {
|
|
4950
4879
|
content: "";
|
|
4951
4880
|
position: absolute;
|
|
4952
4881
|
top: -5px;
|
|
@@ -4956,17 +4885,15 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
4956
4885
|
background-color: var(--op-selected-color);
|
|
4957
4886
|
border-radius: 3px;
|
|
4958
4887
|
pointer-events: none;
|
|
4888
|
+
background-repeat: no-repeat;
|
|
4889
|
+
background-position: center;
|
|
4890
|
+
background-size: auto clamp(20px, 10%, 60px);
|
|
4891
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
4959
4892
|
}
|
|
4960
|
-
.editor-root.history .
|
|
4961
|
-
pointer-events: none;
|
|
4962
|
-
}
|
|
4963
|
-
.editor-root.history .history-inserted-block[data-type=editor-block].table-block:hover::after {
|
|
4964
|
-
top: 0;
|
|
4965
|
-
}
|
|
4966
|
-
.editor-root.history .history-inserted-block[data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block) {
|
|
4893
|
+
.editor-root.history .layout-block.history-updated-block {
|
|
4967
4894
|
position: relative;
|
|
4968
4895
|
}
|
|
4969
|
-
.editor-root.history .
|
|
4896
|
+
.editor-root.history .layout-block.history-updated-block::before {
|
|
4970
4897
|
content: "";
|
|
4971
4898
|
position: absolute;
|
|
4972
4899
|
top: -5px;
|
|
@@ -4977,10 +4904,38 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
4977
4904
|
border-radius: 3px;
|
|
4978
4905
|
pointer-events: none;
|
|
4979
4906
|
}
|
|
4980
|
-
.editor-root.history .
|
|
4907
|
+
.editor-root.history .layout-block .history-inserted-container {
|
|
4908
|
+
position: relative;
|
|
4909
|
+
}
|
|
4910
|
+
.editor-root.history .layout-block .history-inserted-container::before {
|
|
4911
|
+
content: "";
|
|
4912
|
+
position: absolute;
|
|
4913
|
+
top: 0;
|
|
4914
|
+
bottom: 0;
|
|
4915
|
+
left: 0;
|
|
4916
|
+
right: 0;
|
|
4917
|
+
background-color: var(--op-selected-color);
|
|
4918
|
+
border-radius: 0px;
|
|
4919
|
+
pointer-events: none;
|
|
4920
|
+
}
|
|
4921
|
+
.editor-root.history .list-block.history-inserted-block {
|
|
4922
|
+
position: relative;
|
|
4923
|
+
}
|
|
4924
|
+
.editor-root.history .list-block.history-inserted-block::before {
|
|
4925
|
+
content: "";
|
|
4926
|
+
position: absolute;
|
|
4927
|
+
top: 2px;
|
|
4928
|
+
bottom: 2px;
|
|
4929
|
+
left: 0px;
|
|
4930
|
+
right: 0px;
|
|
4931
|
+
background-color: var(--op-selected-color);
|
|
4932
|
+
border-radius: 0px;
|
|
4933
|
+
pointer-events: none;
|
|
4934
|
+
}
|
|
4935
|
+
.editor-root.history .list-block.history-deleted-block {
|
|
4981
4936
|
position: relative;
|
|
4982
4937
|
}
|
|
4983
|
-
.editor-root.history .history-deleted-block
|
|
4938
|
+
.editor-root.history .list-block.history-deleted-block::after {
|
|
4984
4939
|
content: "";
|
|
4985
4940
|
position: absolute;
|
|
4986
4941
|
top: 2px;
|
|
@@ -4990,11 +4945,17 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
4990
4945
|
background-color: var(--op-selected-color);
|
|
4991
4946
|
border-radius: 0px;
|
|
4992
4947
|
pointer-events: none;
|
|
4948
|
+
background-repeat: no-repeat;
|
|
4949
|
+
background-position: center;
|
|
4950
|
+
background-size: auto clamp(20px, 10%, 60px);
|
|
4951
|
+
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
4993
4952
|
}
|
|
4994
|
-
.editor-root.history .
|
|
4953
|
+
.editor-root.history .text-block.history-inserted-block,
|
|
4954
|
+
.editor-root.history [data-style-quoted=true].history-inserted-block {
|
|
4995
4955
|
position: relative;
|
|
4996
4956
|
}
|
|
4997
|
-
.editor-root.history .
|
|
4957
|
+
.editor-root.history .text-block.history-inserted-block::before,
|
|
4958
|
+
.editor-root.history [data-style-quoted=true].history-inserted-block::before {
|
|
4998
4959
|
content: "";
|
|
4999
4960
|
position: absolute;
|
|
5000
4961
|
top: 0px;
|
|
@@ -5005,38 +4966,51 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5005
4966
|
border-radius: 0px;
|
|
5006
4967
|
pointer-events: none;
|
|
5007
4968
|
}
|
|
5008
|
-
.editor-root.history .history-deleted-block
|
|
4969
|
+
.editor-root.history .text-block.history-deleted-block,
|
|
4970
|
+
.editor-root.history [data-style-quoted=true].history-deleted-block {
|
|
5009
4971
|
position: relative;
|
|
5010
4972
|
}
|
|
5011
|
-
.editor-root.history .history-deleted-block
|
|
4973
|
+
.editor-root.history .text-block.history-deleted-block::after,
|
|
4974
|
+
.editor-root.history [data-style-quoted=true].history-deleted-block::after {
|
|
5012
4975
|
content: "";
|
|
5013
4976
|
position: absolute;
|
|
5014
|
-
top:
|
|
5015
|
-
bottom:
|
|
5016
|
-
left:
|
|
5017
|
-
right:
|
|
4977
|
+
top: 0px;
|
|
4978
|
+
bottom: 0px;
|
|
4979
|
+
left: 0px;
|
|
4980
|
+
right: 0px;
|
|
5018
4981
|
background-color: var(--op-selected-color);
|
|
5019
|
-
border-radius:
|
|
4982
|
+
border-radius: 0px;
|
|
5020
4983
|
pointer-events: none;
|
|
5021
4984
|
background-repeat: no-repeat;
|
|
5022
4985
|
background-position: center;
|
|
5023
4986
|
background-size: auto clamp(20px, 10%, 60px);
|
|
5024
4987
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5025
4988
|
}
|
|
5026
|
-
.editor-root.history
|
|
4989
|
+
.editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-inserted-block {
|
|
4990
|
+
position: relative;
|
|
4991
|
+
}
|
|
4992
|
+
.editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-inserted-block::before {
|
|
4993
|
+
content: "";
|
|
4994
|
+
position: absolute;
|
|
4995
|
+
top: -5px;
|
|
4996
|
+
bottom: -5px;
|
|
4997
|
+
left: -5px;
|
|
4998
|
+
right: -5px;
|
|
4999
|
+
background-color: var(--op-selected-color);
|
|
5000
|
+
border-radius: 3px;
|
|
5027
5001
|
pointer-events: none;
|
|
5028
5002
|
}
|
|
5029
|
-
.editor-root.history
|
|
5003
|
+
.editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-deleted-block {
|
|
5030
5004
|
position: relative;
|
|
5031
5005
|
}
|
|
5032
|
-
.editor-root.history
|
|
5006
|
+
.editor-root.history [data-type=editor-block]:not(.list-block, .text-block, [data-style-quoted=true], .table-block, .layout-block).history-deleted-block::after {
|
|
5033
5007
|
content: "";
|
|
5034
5008
|
position: absolute;
|
|
5035
5009
|
top: -5px;
|
|
5036
5010
|
bottom: -5px;
|
|
5037
5011
|
left: -5px;
|
|
5038
5012
|
right: -5px;
|
|
5039
|
-
background-color: var(--op-color);
|
|
5013
|
+
background-color: var(--op-selected-color);
|
|
5040
5014
|
border-radius: 3px;
|
|
5041
5015
|
pointer-events: none;
|
|
5042
5016
|
background-repeat: no-repeat;
|
|
@@ -5044,35 +5018,34 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5044
5018
|
background-size: auto clamp(20px, 10%, 60px);
|
|
5045
5019
|
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5046
5020
|
}
|
|
5047
|
-
.editor-root.history .
|
|
5048
|
-
background-color: unset
|
|
5049
|
-
text-decoration: unset !important;
|
|
5050
|
-
}
|
|
5051
|
-
.editor-root.history .history-deleted-block.history-deleted-box:hover::after {
|
|
5052
|
-
opacity: 0;
|
|
5021
|
+
.editor-root.history .status-box.history-inserted-box {
|
|
5022
|
+
background-color: unset;
|
|
5053
5023
|
}
|
|
5054
|
-
.editor-root.history .history-
|
|
5024
|
+
.editor-root.history .status-box.history-inserted-box [data-type=box-content] {
|
|
5055
5025
|
position: relative;
|
|
5056
5026
|
}
|
|
5057
|
-
.editor-root.history .history-
|
|
5027
|
+
.editor-root.history .status-box.history-inserted-box [data-type=box-content]::before {
|
|
5058
5028
|
content: "";
|
|
5059
5029
|
position: absolute;
|
|
5060
|
-
top:
|
|
5061
|
-
bottom:
|
|
5062
|
-
left:
|
|
5063
|
-
right:
|
|
5030
|
+
top: 0px;
|
|
5031
|
+
bottom: 0px;
|
|
5032
|
+
left: 2.5px;
|
|
5033
|
+
right: 2.5px;
|
|
5064
5034
|
background-color: var(--op-selected-color);
|
|
5065
5035
|
border-radius: 0px;
|
|
5066
5036
|
pointer-events: none;
|
|
5067
|
-
background-repeat: no-repeat;
|
|
5068
|
-
background-position: center;
|
|
5069
|
-
background-size: auto clamp(20px, 10%, 60px);
|
|
5070
|
-
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5071
5037
|
}
|
|
5072
|
-
.editor-root.history .history-deleted-
|
|
5038
|
+
.editor-root.history .file-box.history-deleted-box {
|
|
5039
|
+
text-decoration: line-through;
|
|
5040
|
+
color: var(--primary-color);
|
|
5041
|
+
}
|
|
5042
|
+
.editor-root.history .math-box.history-inserted-box {
|
|
5043
|
+
background-color: unset;
|
|
5044
|
+
}
|
|
5045
|
+
.editor-root.history .math-box.history-inserted-box [data-type=box-content] {
|
|
5073
5046
|
position: relative;
|
|
5074
5047
|
}
|
|
5075
|
-
.editor-root.history .history-
|
|
5048
|
+
.editor-root.history .math-box.history-inserted-box [data-type=box-content]::before {
|
|
5076
5049
|
content: "";
|
|
5077
5050
|
position: absolute;
|
|
5078
5051
|
top: 0px;
|
|
@@ -5082,17 +5055,23 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5082
5055
|
background-color: var(--op-selected-color);
|
|
5083
5056
|
border-radius: 0px;
|
|
5084
5057
|
pointer-events: none;
|
|
5085
|
-
background-repeat: no-repeat;
|
|
5086
|
-
background-position: center;
|
|
5087
|
-
background-size: auto clamp(20px, 10%, 60px);
|
|
5088
|
-
background-image: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNjAiIGhlaWdodD0iNjAiIHZpZXdCb3g9IjAgMCA2MCA2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTMwLjAzMjggMjkuNjIzMkw0OC41NjE2IDExLjA2MTZNMzAuMDMyOCAyOS42MjMyTDQ4LjU2MTYgNDguMTg0N00zMC4wMzI4IDI5LjYyMzJMMTEuNDM4NCA0OC4xODQ3TTMwLjAzMjggMjkuNjIzMkwxMS40Mzg0IDExLjA2MTYiIHN0cm9rZT0iI0IyMUI1NyIgc3Ryb2tlLXdpZHRoPSI1IiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+Cjwvc3ZnPgo=);
|
|
5089
5058
|
}
|
|
5090
|
-
.editor-root.history .
|
|
5091
|
-
|
|
5092
|
-
pointer-events: none;
|
|
5059
|
+
.editor-root.history .math-box.history-deleted-box {
|
|
5060
|
+
text-decoration: none;
|
|
5093
5061
|
}
|
|
5094
|
-
.editor-root.history .
|
|
5095
|
-
|
|
5062
|
+
.editor-root.history .math-box.history-deleted-box [data-type=box-content] {
|
|
5063
|
+
position: relative;
|
|
5064
|
+
}
|
|
5065
|
+
.editor-root.history .math-box.history-deleted-box [data-type=box-content]::before {
|
|
5066
|
+
content: "";
|
|
5067
|
+
position: absolute;
|
|
5068
|
+
top: 0px;
|
|
5069
|
+
bottom: 0px;
|
|
5070
|
+
left: 0px;
|
|
5071
|
+
right: 0px;
|
|
5072
|
+
background-color: var(--op-selected-color);
|
|
5073
|
+
border-radius: 0px;
|
|
5074
|
+
pointer-events: none;
|
|
5096
5075
|
}
|
|
5097
5076
|
.editor-root.history .history-inserted-text, .editor-root.history .history-inserted-box {
|
|
5098
5077
|
line-height: revert !important;
|
|
@@ -5104,19 +5083,197 @@ div.editor-root:not(.mobile) div.editor-content div[data-type=editor-container]
|
|
|
5104
5083
|
.editor-root.history .history-deleted-box[class=history-deleted-box] {
|
|
5105
5084
|
color: var(--op-color);
|
|
5106
5085
|
}
|
|
5107
|
-
.editor-root.history .history-deleted-box.math-box {
|
|
5108
|
-
text-decoration: none;
|
|
5109
|
-
background-color: var(--op-selected-color);
|
|
5110
|
-
}
|
|
5111
|
-
.editor-root.history .history-deleted-box.file-box {
|
|
5112
|
-
color: var(--primary-color);
|
|
5113
|
-
}
|
|
5114
5086
|
.editor-root.history [data-box-type=history-deleted-box] > span[data-type=box-content] {
|
|
5115
5087
|
border: none !important;
|
|
5116
5088
|
margin: 0 !important;
|
|
5117
5089
|
}
|
|
5118
|
-
.editor-root.history
|
|
5119
|
-
|
|
5090
|
+
.editor-root.history .history-inserted-container .history-inserted-container,
|
|
5091
|
+
.editor-root.history .history-inserted-container .history-inserted-text,
|
|
5092
|
+
.editor-root.history .history-inserted-container .history-inserted-box,
|
|
5093
|
+
.editor-root.history .history-inserted-container .history-deleted-box,
|
|
5094
|
+
.editor-root.history .history-inserted-container .history-deleted-block,
|
|
5095
|
+
.editor-root.history .history-inserted-container .history-inserted-block,
|
|
5096
|
+
.editor-root.history .history-deleted-block .history-inserted-container,
|
|
5097
|
+
.editor-root.history .history-deleted-block .history-inserted-text,
|
|
5098
|
+
.editor-root.history .history-deleted-block .history-inserted-box,
|
|
5099
|
+
.editor-root.history .history-deleted-block .history-deleted-box,
|
|
5100
|
+
.editor-root.history .history-deleted-block .history-deleted-block,
|
|
5101
|
+
.editor-root.history .history-deleted-block .history-inserted-block,
|
|
5102
|
+
.editor-root.history .history-inserted-block .history-inserted-container,
|
|
5103
|
+
.editor-root.history .history-inserted-block .history-inserted-text,
|
|
5104
|
+
.editor-root.history .history-inserted-block .history-inserted-box,
|
|
5105
|
+
.editor-root.history .history-inserted-block .history-deleted-box,
|
|
5106
|
+
.editor-root.history .history-inserted-block .history-deleted-block,
|
|
5107
|
+
.editor-root.history .history-inserted-block .history-inserted-block,
|
|
5108
|
+
.editor-root.history .history-updated-block .history-inserted-container,
|
|
5109
|
+
.editor-root.history .history-updated-block .history-inserted-text,
|
|
5110
|
+
.editor-root.history .history-updated-block .history-inserted-box,
|
|
5111
|
+
.editor-root.history .history-updated-block .history-deleted-box,
|
|
5112
|
+
.editor-root.history .history-updated-block .history-deleted-block,
|
|
5113
|
+
.editor-root.history .history-updated-block .history-inserted-block {
|
|
5114
|
+
background-color: unset;
|
|
5115
|
+
pointer-events: none;
|
|
5116
|
+
}
|
|
5117
|
+
.editor-root.history .history-inserted-container .history-inserted-container::before, .editor-root.history .history-inserted-container .history-inserted-container::after,
|
|
5118
|
+
.editor-root.history .history-inserted-container .history-inserted-text::before,
|
|
5119
|
+
.editor-root.history .history-inserted-container .history-inserted-text::after,
|
|
5120
|
+
.editor-root.history .history-inserted-container .history-inserted-box::before,
|
|
5121
|
+
.editor-root.history .history-inserted-container .history-inserted-box::after,
|
|
5122
|
+
.editor-root.history .history-inserted-container .history-deleted-box::before,
|
|
5123
|
+
.editor-root.history .history-inserted-container .history-deleted-box::after,
|
|
5124
|
+
.editor-root.history .history-inserted-container .history-deleted-block::before,
|
|
5125
|
+
.editor-root.history .history-inserted-container .history-deleted-block::after,
|
|
5126
|
+
.editor-root.history .history-inserted-container .history-inserted-block::before,
|
|
5127
|
+
.editor-root.history .history-inserted-container .history-inserted-block::after,
|
|
5128
|
+
.editor-root.history .history-deleted-block .history-inserted-container::before,
|
|
5129
|
+
.editor-root.history .history-deleted-block .history-inserted-container::after,
|
|
5130
|
+
.editor-root.history .history-deleted-block .history-inserted-text::before,
|
|
5131
|
+
.editor-root.history .history-deleted-block .history-inserted-text::after,
|
|
5132
|
+
.editor-root.history .history-deleted-block .history-inserted-box::before,
|
|
5133
|
+
.editor-root.history .history-deleted-block .history-inserted-box::after,
|
|
5134
|
+
.editor-root.history .history-deleted-block .history-deleted-box::before,
|
|
5135
|
+
.editor-root.history .history-deleted-block .history-deleted-box::after,
|
|
5136
|
+
.editor-root.history .history-deleted-block .history-deleted-block::before,
|
|
5137
|
+
.editor-root.history .history-deleted-block .history-deleted-block::after,
|
|
5138
|
+
.editor-root.history .history-deleted-block .history-inserted-block::before,
|
|
5139
|
+
.editor-root.history .history-deleted-block .history-inserted-block::after,
|
|
5140
|
+
.editor-root.history .history-inserted-block .history-inserted-container::before,
|
|
5141
|
+
.editor-root.history .history-inserted-block .history-inserted-container::after,
|
|
5142
|
+
.editor-root.history .history-inserted-block .history-inserted-text::before,
|
|
5143
|
+
.editor-root.history .history-inserted-block .history-inserted-text::after,
|
|
5144
|
+
.editor-root.history .history-inserted-block .history-inserted-box::before,
|
|
5145
|
+
.editor-root.history .history-inserted-block .history-inserted-box::after,
|
|
5146
|
+
.editor-root.history .history-inserted-block .history-deleted-box::before,
|
|
5147
|
+
.editor-root.history .history-inserted-block .history-deleted-box::after,
|
|
5148
|
+
.editor-root.history .history-inserted-block .history-deleted-block::before,
|
|
5149
|
+
.editor-root.history .history-inserted-block .history-deleted-block::after,
|
|
5150
|
+
.editor-root.history .history-inserted-block .history-inserted-block::before,
|
|
5151
|
+
.editor-root.history .history-inserted-block .history-inserted-block::after,
|
|
5152
|
+
.editor-root.history .history-updated-block .history-inserted-container::before,
|
|
5153
|
+
.editor-root.history .history-updated-block .history-inserted-container::after,
|
|
5154
|
+
.editor-root.history .history-updated-block .history-inserted-text::before,
|
|
5155
|
+
.editor-root.history .history-updated-block .history-inserted-text::after,
|
|
5156
|
+
.editor-root.history .history-updated-block .history-inserted-box::before,
|
|
5157
|
+
.editor-root.history .history-updated-block .history-inserted-box::after,
|
|
5158
|
+
.editor-root.history .history-updated-block .history-deleted-box::before,
|
|
5159
|
+
.editor-root.history .history-updated-block .history-deleted-box::after,
|
|
5160
|
+
.editor-root.history .history-updated-block .history-deleted-block::before,
|
|
5161
|
+
.editor-root.history .history-updated-block .history-deleted-block::after,
|
|
5162
|
+
.editor-root.history .history-updated-block .history-inserted-block::before,
|
|
5163
|
+
.editor-root.history .history-updated-block .history-inserted-block::after {
|
|
5164
|
+
display: none;
|
|
5165
|
+
}
|
|
5166
|
+
.version-dialog {
|
|
5167
|
+
display: flex;
|
|
5168
|
+
background-color: var(--editor-bg-color);
|
|
5169
|
+
width: 100%;
|
|
5170
|
+
height: 100%;
|
|
5171
|
+
color: var(--editor-color);
|
|
5172
|
+
}
|
|
5173
|
+
.version-dialog * {
|
|
5174
|
+
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
|
|
5175
|
+
box-sizing: border-box;
|
|
5176
|
+
}
|
|
5177
|
+
.version-dialog.loading .version-viewer .version-info-container {
|
|
5178
|
+
display: none;
|
|
5179
|
+
}
|
|
5180
|
+
.version-dialog .version-loading {
|
|
5181
|
+
display: flex;
|
|
5182
|
+
flex: 1;
|
|
5183
|
+
align-items: center;
|
|
5184
|
+
justify-content: center;
|
|
5185
|
+
}
|
|
5186
|
+
.version-dialog .version-loading svg {
|
|
5187
|
+
width: 28px;
|
|
5188
|
+
height: 28px;
|
|
5189
|
+
}
|
|
5190
|
+
.version-dialog .version-item-latest {
|
|
5191
|
+
border-radius: 3px;
|
|
5192
|
+
color: #0064ff;
|
|
5193
|
+
background-color: #e3eeff;
|
|
5194
|
+
height: 20px;
|
|
5195
|
+
padding: 0 5px;
|
|
5196
|
+
border-radius: 3px;
|
|
5197
|
+
display: inline-flex;
|
|
5198
|
+
align-items: center;
|
|
5199
|
+
font-size: 12px;
|
|
5200
|
+
font-weight: normal;
|
|
5201
|
+
margin-left: 10px;
|
|
5202
|
+
}
|
|
5203
|
+
.version-dialog .version-viewer {
|
|
5204
|
+
flex: 1;
|
|
5205
|
+
display: flex;
|
|
5206
|
+
flex-direction: column;
|
|
5207
|
+
width: 0;
|
|
5208
|
+
padding: 0;
|
|
5209
|
+
min-width: 0;
|
|
5210
|
+
}
|
|
5211
|
+
.version-dialog .version-viewer .version-dialog-editor {
|
|
5212
|
+
overflow-y: auto;
|
|
5213
|
+
}
|
|
5214
|
+
.version-dialog .version-viewer .version-info-container {
|
|
5215
|
+
height: 50px;
|
|
5216
|
+
border-bottom: #e8e8e8 1px solid;
|
|
5217
|
+
display: flex;
|
|
5218
|
+
align-items: center;
|
|
5219
|
+
flex-shrink: 0;
|
|
5220
|
+
padding-left: 20px;
|
|
5221
|
+
font-size: 14px;
|
|
5222
|
+
color: #303030;
|
|
5223
|
+
}
|
|
5224
|
+
.version-dialog .version-viewer .version-info-container .version-info-right .text-3 {
|
|
5225
|
+
color: #909090;
|
|
5226
|
+
}
|
|
5227
|
+
.version-dialog .version-viewer .version-info-container .version-info-left {
|
|
5228
|
+
display: flex;
|
|
5229
|
+
align-items: center;
|
|
5230
|
+
}
|
|
5231
|
+
.version-dialog .version-viewer .version-info-container .version-info-left .text-1,
|
|
5232
|
+
.version-dialog .version-viewer .version-info-container .version-info-left .text-2 {
|
|
5233
|
+
color: #909090;
|
|
5234
|
+
}
|
|
5235
|
+
.version-dialog .version-viewer .version-info-container .version-info-left .name {
|
|
5236
|
+
padding-left: 5px;
|
|
5237
|
+
padding-right: 10px;
|
|
5238
|
+
font-weight: 500;
|
|
5239
|
+
}
|
|
5240
|
+
.version-dialog .version-viewer .version-info-container .version-info-left .name .version-item-latest {
|
|
5241
|
+
margin-left: 5px;
|
|
5242
|
+
}
|
|
5243
|
+
.version-dialog .version-viewer .version-info-container .editor-dropdown {
|
|
5244
|
+
margin-left: 10px;
|
|
5245
|
+
margin-right: 10px;
|
|
5246
|
+
}
|
|
5247
|
+
.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version] {
|
|
5248
|
+
min-width: 200px;
|
|
5249
|
+
border: 1px solid #f0f0f0;
|
|
5250
|
+
}
|
|
5251
|
+
.version-dialog .version-viewer .version-info-container .command-item[data-id=current-version] .toolbar-item-name-container {
|
|
5252
|
+
flex-grow: 1;
|
|
5253
|
+
}
|
|
5254
|
+
.version-dialog .version-viewer .dialog-button-text {
|
|
5255
|
+
margin-top: 1px;
|
|
5256
|
+
margin-left: -4px;
|
|
5257
|
+
}
|
|
5258
|
+
.version-dialog .version-viewer .dialog-text-button {
|
|
5259
|
+
outline: none;
|
|
5260
|
+
background: transparent;
|
|
5261
|
+
border: none;
|
|
5262
|
+
display: flex;
|
|
5263
|
+
align-items: center;
|
|
5264
|
+
color: var(--editor-color);
|
|
5265
|
+
font-size: 16px;
|
|
5266
|
+
font-weight: 500;
|
|
5267
|
+
padding: 4px 0px;
|
|
5268
|
+
cursor: pointer;
|
|
5269
|
+
}
|
|
5270
|
+
.version-dialog .version-viewer .dialog-text-button .dialog-button-icon {
|
|
5271
|
+
margin-right: 0;
|
|
5272
|
+
width: 24px;
|
|
5273
|
+
height: 24px;
|
|
5274
|
+
}
|
|
5275
|
+
.version-dialog .version-viewer .dialog-text-button .dialog-button-icon svg {
|
|
5276
|
+
fill: currentColor;
|
|
5120
5277
|
}.editor-dialog-root {
|
|
5121
5278
|
position: absolute;
|
|
5122
5279
|
left: 0;
|
|
@@ -10020,6 +10177,34 @@ var __publicField = (obj, key, value) => {
|
|
|
10020
10177
|
(_a = render.updateBlock) == null ? void 0 : _a.call(render, editor, path, blockElement, blockData);
|
|
10021
10178
|
});
|
|
10022
10179
|
}
|
|
10180
|
+
renderChildContainer(editor, path, containerId) {
|
|
10181
|
+
const result = {
|
|
10182
|
+
classes: [],
|
|
10183
|
+
attributes: {},
|
|
10184
|
+
styles: {}
|
|
10185
|
+
};
|
|
10186
|
+
this.renders.forEach((render) => {
|
|
10187
|
+
if (render.renderChildContainer) {
|
|
10188
|
+
const ret = render.renderChildContainer(editor, path, containerId);
|
|
10189
|
+
if (ret.classes) {
|
|
10190
|
+
result.classes.push(...ret.classes);
|
|
10191
|
+
}
|
|
10192
|
+
if (ret.attributes) {
|
|
10193
|
+
result.attributes = {
|
|
10194
|
+
...result.attributes,
|
|
10195
|
+
...ret.attributes
|
|
10196
|
+
};
|
|
10197
|
+
}
|
|
10198
|
+
if (ret.styles) {
|
|
10199
|
+
result.styles = {
|
|
10200
|
+
...result.styles,
|
|
10201
|
+
...ret.styles
|
|
10202
|
+
};
|
|
10203
|
+
}
|
|
10204
|
+
}
|
|
10205
|
+
});
|
|
10206
|
+
return result;
|
|
10207
|
+
}
|
|
10023
10208
|
}
|
|
10024
10209
|
const logger$4l = getLogger("block-class");
|
|
10025
10210
|
function getBlockClass(editor, block) {
|
|
@@ -11149,6 +11334,20 @@ var __publicField = (obj, key, value) => {
|
|
|
11149
11334
|
return exists;
|
|
11150
11335
|
}
|
|
11151
11336
|
const container = createContainerElement(parent, "child", containerId);
|
|
11337
|
+
const ret = editor.editorBlockRenders.renderChildContainer(editor, path, containerId);
|
|
11338
|
+
if (ret.classes) {
|
|
11339
|
+
addClass(container, ...ret.classes);
|
|
11340
|
+
}
|
|
11341
|
+
if (ret.attributes) {
|
|
11342
|
+
Object.entries(ret.attributes).forEach(([key, value]) => {
|
|
11343
|
+
container.setAttribute(key, value);
|
|
11344
|
+
});
|
|
11345
|
+
}
|
|
11346
|
+
if (ret.styles) {
|
|
11347
|
+
Object.entries(ret.styles).forEach(([key, value]) => {
|
|
11348
|
+
container.style.setProperty(key, value);
|
|
11349
|
+
});
|
|
11350
|
+
}
|
|
11152
11351
|
loadBlocks(editor, container, path);
|
|
11153
11352
|
return container;
|
|
11154
11353
|
}
|
|
@@ -37501,10 +37700,19 @@ ${codeText}
|
|
|
37501
37700
|
throw err;
|
|
37502
37701
|
}
|
|
37503
37702
|
}
|
|
37504
|
-
async getVersions() {
|
|
37703
|
+
async getVersions(showPublished) {
|
|
37505
37704
|
const server = this.apiServer();
|
|
37506
|
-
const api = `${server}/versions
|
|
37507
|
-
const
|
|
37705
|
+
const api = `${server}/versions`;
|
|
37706
|
+
const params = {
|
|
37707
|
+
withExtra: true,
|
|
37708
|
+
published: void 0
|
|
37709
|
+
};
|
|
37710
|
+
if (showPublished) {
|
|
37711
|
+
params.published = true;
|
|
37712
|
+
}
|
|
37713
|
+
const ret = await this.request(api, {
|
|
37714
|
+
params
|
|
37715
|
+
});
|
|
37508
37716
|
const versions = ret.data.versions;
|
|
37509
37717
|
versions.forEach((v) => {
|
|
37510
37718
|
if (v.extra) {
|
|
@@ -37634,8 +37842,8 @@ ${codeText}
|
|
|
37634
37842
|
getVersionHelper() {
|
|
37635
37843
|
return this;
|
|
37636
37844
|
}
|
|
37637
|
-
getVersions() {
|
|
37638
|
-
return this.client.getVersions();
|
|
37845
|
+
getVersions(showPublished = false) {
|
|
37846
|
+
return this.client.getVersions(showPublished);
|
|
37639
37847
|
}
|
|
37640
37848
|
async getVersion(ver) {
|
|
37641
37849
|
const data2 = await this.client.getVersion(ver);
|
|
@@ -73361,14 +73569,15 @@ ${content}
|
|
|
73361
73569
|
onSelectVersion(version);
|
|
73362
73570
|
});
|
|
73363
73571
|
__publicField(this, "handleEndEditItemMemo", (value, isCancel) => {
|
|
73364
|
-
var _a, _b, _c;
|
|
73572
|
+
var _a, _b, _c, _d;
|
|
73365
73573
|
const versionItem = (_a = this.memoInput) == null ? void 0 : _a.root.closest(".version-item");
|
|
73366
73574
|
if (this.isVersionElement(versionItem)) {
|
|
73367
73575
|
removeClass(versionItem, "editing");
|
|
73368
73576
|
if (!isCancel) {
|
|
73369
73577
|
const version = this.getVersionFromElement(versionItem);
|
|
73370
73578
|
const filterValue2 = value.replace(/[\n\r]+/g, " ");
|
|
73371
|
-
|
|
73579
|
+
const hasChanged = typeof ((_b = version.extra) == null ? void 0 : _b.memo) !== "undefined" && ((_c = version.extra) == null ? void 0 : _c.memo) !== filterValue2;
|
|
73580
|
+
if (hasChanged) {
|
|
73372
73581
|
version.extra = { memo: filterValue2 };
|
|
73373
73582
|
this.options.versionHelper.updateVersionExtra(version.version, version.tagId, version.extra).then(() => {
|
|
73374
73583
|
var _a2, _b2;
|
|
@@ -73380,7 +73589,7 @@ ${content}
|
|
|
73380
73589
|
}
|
|
73381
73590
|
}
|
|
73382
73591
|
}
|
|
73383
|
-
(
|
|
73592
|
+
(_d = this.memoInput) == null ? void 0 : _d.root.remove();
|
|
73384
73593
|
});
|
|
73385
73594
|
__publicField(this, "handleRevert", (version, versionItem) => {
|
|
73386
73595
|
const { onRevert } = this.options;
|
|
@@ -74114,6 +74323,15 @@ ${content}
|
|
|
74114
74323
|
}
|
|
74115
74324
|
onCreateContainer(containerId, data2, user) {
|
|
74116
74325
|
this.docObject.blocks[containerId] = cloneDeep__default.default(data2);
|
|
74326
|
+
const { meta } = this.docObject;
|
|
74327
|
+
if (typeof meta.containerId === "undefined") {
|
|
74328
|
+
meta[containerId] = {
|
|
74329
|
+
createBy: user
|
|
74330
|
+
};
|
|
74331
|
+
} else {
|
|
74332
|
+
const existHistoryDocMeta = meta[containerId];
|
|
74333
|
+
existHistoryDocMeta.createBy = user;
|
|
74334
|
+
}
|
|
74117
74335
|
this.callbacks.forEach((cb) => {
|
|
74118
74336
|
var _a;
|
|
74119
74337
|
return (_a = cb.onInsertChildContainer) == null ? void 0 : _a.call(cb, containerId, data2, true);
|
|
@@ -74122,6 +74340,11 @@ ${content}
|
|
|
74122
74340
|
}
|
|
74123
74341
|
const { t } = i18n$1;
|
|
74124
74342
|
function getOpDescription(user, type) {
|
|
74343
|
+
if (type === "update") {
|
|
74344
|
+
return t("version.update", {
|
|
74345
|
+
name: user.displayName
|
|
74346
|
+
});
|
|
74347
|
+
}
|
|
74125
74348
|
if (type === "insert") {
|
|
74126
74349
|
return t("version.insert", {
|
|
74127
74350
|
name: user.displayName
|
|
@@ -74131,6 +74354,12 @@ ${content}
|
|
|
74131
74354
|
name: user.displayName
|
|
74132
74355
|
});
|
|
74133
74356
|
}
|
|
74357
|
+
function removeOpacityFromHexColor(hexColor) {
|
|
74358
|
+
if (hexColor.length === 9) {
|
|
74359
|
+
return hexColor.slice(0, 7);
|
|
74360
|
+
}
|
|
74361
|
+
return hexColor;
|
|
74362
|
+
}
|
|
74134
74363
|
function getUserColors(users, user) {
|
|
74135
74364
|
const { userId } = user;
|
|
74136
74365
|
const types2 = ["flag", "selection"];
|
|
@@ -74147,8 +74376,11 @@ ${content}
|
|
|
74147
74376
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74148
74377
|
return {
|
|
74149
74378
|
classes: ["history-deleted-box"],
|
|
74379
|
+
attributes: {
|
|
74380
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "delete")
|
|
74381
|
+
},
|
|
74150
74382
|
styles: {
|
|
74151
|
-
[OpColor]: flag,
|
|
74383
|
+
[OpColor]: removeOpacityFromHexColor(flag),
|
|
74152
74384
|
[OpSelectedColor]: selection
|
|
74153
74385
|
}
|
|
74154
74386
|
};
|
|
@@ -74190,16 +74422,8 @@ ${content}
|
|
|
74190
74422
|
if (blockData.deletedBy) {
|
|
74191
74423
|
const user = blockData.deletedBy;
|
|
74192
74424
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74193
|
-
const blockType = blockData.type;
|
|
74194
|
-
let classes = ["history-deleted-block"];
|
|
74195
|
-
if (isTextKindBlockType(editor, blockType)) {
|
|
74196
|
-
const blockText = blockData.text;
|
|
74197
|
-
if (blockText.length === 0) {
|
|
74198
|
-
classes = ["history-deleted-empty-text-block"];
|
|
74199
|
-
}
|
|
74200
|
-
}
|
|
74201
74425
|
return {
|
|
74202
|
-
classes,
|
|
74426
|
+
classes: ["history-deleted-block"],
|
|
74203
74427
|
attributes: {
|
|
74204
74428
|
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "delete")
|
|
74205
74429
|
},
|
|
@@ -74215,7 +74439,6 @@ ${content}
|
|
|
74215
74439
|
return {
|
|
74216
74440
|
classes: ["history-inserted-block"],
|
|
74217
74441
|
attributes: {
|
|
74218
|
-
"data-op-description": getOpDescription(user, "insert"),
|
|
74219
74442
|
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
|
|
74220
74443
|
},
|
|
74221
74444
|
styles: {
|
|
@@ -74224,6 +74447,20 @@ ${content}
|
|
|
74224
74447
|
}
|
|
74225
74448
|
};
|
|
74226
74449
|
}
|
|
74450
|
+
if (blockData.updatedBy) {
|
|
74451
|
+
const user = blockData.updatedBy;
|
|
74452
|
+
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74453
|
+
return {
|
|
74454
|
+
classes: ["history-updated-block"],
|
|
74455
|
+
attributes: {
|
|
74456
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "update")
|
|
74457
|
+
},
|
|
74458
|
+
styles: {
|
|
74459
|
+
[OpColor]: flag,
|
|
74460
|
+
[OpSelectedColor]: selection
|
|
74461
|
+
}
|
|
74462
|
+
};
|
|
74463
|
+
}
|
|
74227
74464
|
return {};
|
|
74228
74465
|
}
|
|
74229
74466
|
updateBlock(editor, path, blockElement, blockData) {
|
|
@@ -74251,7 +74488,42 @@ ${content}
|
|
|
74251
74488
|
[OpColor]: flag,
|
|
74252
74489
|
[OpSelectedColor]: selection
|
|
74253
74490
|
});
|
|
74491
|
+
return;
|
|
74492
|
+
}
|
|
74493
|
+
if (blockData.updatedBy) {
|
|
74494
|
+
const user = blockData.updatedBy;
|
|
74495
|
+
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74496
|
+
addClass(blockElement, "history-updated-block");
|
|
74497
|
+
setAttributes(blockElement, {
|
|
74498
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "update")
|
|
74499
|
+
});
|
|
74500
|
+
setStyles(blockElement, {
|
|
74501
|
+
[OpColor]: flag,
|
|
74502
|
+
[OpSelectedColor]: selection
|
|
74503
|
+
});
|
|
74504
|
+
}
|
|
74505
|
+
}
|
|
74506
|
+
renderChildContainer(editor, path, containerId) {
|
|
74507
|
+
const meta = editor.doc.toJSON().meta;
|
|
74508
|
+
const historyDocMeta = meta[containerId];
|
|
74509
|
+
if (historyDocMeta) {
|
|
74510
|
+
const { createBy } = historyDocMeta;
|
|
74511
|
+
if (createBy) {
|
|
74512
|
+
const user = createBy;
|
|
74513
|
+
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74514
|
+
return {
|
|
74515
|
+
classes: ["history-inserted-container"],
|
|
74516
|
+
attributes: {
|
|
74517
|
+
[HISTORY_TOOLTIP_IDENTIFIER]: getOpDescription(user, "insert")
|
|
74518
|
+
},
|
|
74519
|
+
styles: {
|
|
74520
|
+
[OpColor]: flag,
|
|
74521
|
+
[OpSelectedColor]: selection
|
|
74522
|
+
}
|
|
74523
|
+
};
|
|
74524
|
+
}
|
|
74254
74525
|
}
|
|
74526
|
+
return {};
|
|
74255
74527
|
}
|
|
74256
74528
|
}
|
|
74257
74529
|
const logger$t = getLogger("history-deleted-box");
|
|
@@ -74264,7 +74536,7 @@ ${content}
|
|
|
74264
74536
|
const { flag, selection } = getUserColors(editor.doc.getRemoteUsers(), user);
|
|
74265
74537
|
span.setAttribute("history-deleted-by", user.displayName);
|
|
74266
74538
|
span.setAttribute(HISTORY_TOOLTIP_IDENTIFIER, getOpDescription(user, "delete"));
|
|
74267
|
-
span.style.setProperty(OpColor, flag);
|
|
74539
|
+
span.style.setProperty(OpColor, removeOpacityFromHexColor(flag));
|
|
74268
74540
|
span.style.setProperty(OpSelectedColor, selection);
|
|
74269
74541
|
}
|
|
74270
74542
|
function convertTo$9(editor, boxData, doc2, type) {
|
|
@@ -74546,21 +74818,16 @@ ${content}
|
|
|
74546
74818
|
}
|
|
74547
74819
|
}
|
|
74548
74820
|
const index$5 = "";
|
|
74549
|
-
function removeHexColorOpacity(color) {
|
|
74550
|
-
return color.slice(0, -2);
|
|
74551
|
-
}
|
|
74552
74821
|
class OnesEditorHistoryTooltip {
|
|
74553
74822
|
constructor() {
|
|
74554
74823
|
__publicField(this, "createContent", (reference) => {
|
|
74555
74824
|
var _a;
|
|
74556
74825
|
const style2 = getComputedStyle(reference);
|
|
74557
|
-
const color = style2.getPropertyValue(OpColor);
|
|
74558
74826
|
const selectedColor = style2.getPropertyValue(OpSelectedColor);
|
|
74559
74827
|
const text2 = (_a = reference.getAttribute(HISTORY_TOOLTIP_IDENTIFIER)) != null ? _a : "";
|
|
74560
74828
|
const contentEl = createElement("div", ["editor-history-tooltip-content"], null);
|
|
74561
74829
|
contentEl.textContent = text2;
|
|
74562
|
-
contentEl.style.setProperty(
|
|
74563
|
-
contentEl.style.setProperty(OpSelectedColor, removeHexColorOpacity(selectedColor));
|
|
74830
|
+
contentEl.style.setProperty(OpSelectedColor, removeOpacityFromHexColor(selectedColor));
|
|
74564
74831
|
return contentEl;
|
|
74565
74832
|
});
|
|
74566
74833
|
__publicField(this, "getPropsFromDifferentBlock", (reference) => {
|
|
@@ -74816,7 +75083,7 @@ ${content}
|
|
|
74816
75083
|
this.dialog = new Dialog$1(root2);
|
|
74817
75084
|
}
|
|
74818
75085
|
this.dialog.show(options.container);
|
|
74819
|
-
this.versions = await this.versionHelper.getVersions();
|
|
75086
|
+
this.versions = await this.versionHelper.getVersions(options.showPublishedVersions);
|
|
74820
75087
|
removeClass(this.components.root, "loading");
|
|
74821
75088
|
if (this.versionOptions.onVersionsLoaded) {
|
|
74822
75089
|
this.versionOptions.onVersionsLoaded(this, this.versions);
|
|
@@ -83272,7 +83539,7 @@ ${data2.flowchartText}
|
|
|
83272
83539
|
}
|
|
83273
83540
|
}
|
|
83274
83541
|
});
|
|
83275
|
-
editor.version = "2.1.8-beta.
|
|
83542
|
+
editor.version = "2.1.8-beta.2";
|
|
83276
83543
|
if (Logger$2.level === LogLevel.DEBUG) {
|
|
83277
83544
|
window.setReauthFail = (fail) => {
|
|
83278
83545
|
window.isReauthError = fail;
|
|
@@ -83367,7 +83634,7 @@ ${data2.flowchartText}
|
|
|
83367
83634
|
if (!clientType.isMobile) {
|
|
83368
83635
|
OnesEditorToolbar.register(editor);
|
|
83369
83636
|
}
|
|
83370
|
-
editor.version = "2.1.8-beta.
|
|
83637
|
+
editor.version = "2.1.8-beta.2";
|
|
83371
83638
|
return editor;
|
|
83372
83639
|
}
|
|
83373
83640
|
async function showDocVersions(editor, options, serverUrl) {
|