@cntrl-site/sdk-nextjs 1.0.12 → 1.0.14
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/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +15 -0
- package/lib/utils/RichTextConverter/RichTextConverter.js +1 -2
- package/package.json +1 -1
- package/src/utils/RichTextConverter/RichTextConverter.tsx +1 -2
- package/cntrl-site-sdk-nextjs-1.0.12.tgz +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<component name="InspectionProjectProfileManager">
|
|
2
|
+
<profile version="1.0">
|
|
3
|
+
<option name="myName" value="Project Default" />
|
|
4
|
+
<inspection_tool class="HtmlUnknownAttribute" enabled="true" level="WARNING" enabled_by_default="true">
|
|
5
|
+
<option name="myValues">
|
|
6
|
+
<value>
|
|
7
|
+
<list size="1">
|
|
8
|
+
<item index="0" class="java.lang.String" itemvalue="jsx" />
|
|
9
|
+
</list>
|
|
10
|
+
</value>
|
|
11
|
+
</option>
|
|
12
|
+
<option name="myCustomValuesEnabled" value="true" />
|
|
13
|
+
</inspection_tool>
|
|
14
|
+
</profile>
|
|
15
|
+
</component>
|
|
@@ -96,7 +96,6 @@ class RichTextConverter {
|
|
|
96
96
|
}
|
|
97
97
|
kids.push(...entityKids);
|
|
98
98
|
}
|
|
99
|
-
// sliceSymbols(content, style.start, style.end).forEach(c => console.log(c.charCodeAt(0)))
|
|
100
99
|
if (offset < getSymbolsCount(content)) {
|
|
101
100
|
kids.push(sliceSymbols(content, offset));
|
|
102
101
|
}
|
|
@@ -172,7 +171,7 @@ class RichTextConverter {
|
|
|
172
171
|
groupEntities(entities, styleGroups) {
|
|
173
172
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
174
173
|
const entitiesGroups = [];
|
|
175
|
-
if (!entities.length && !styleGroups)
|
|
174
|
+
if (!entities.length && (!styleGroups || !styleGroups.length))
|
|
176
175
|
return;
|
|
177
176
|
if (!styleGroups || styleGroups.length === 0) {
|
|
178
177
|
const dividersSet = entities.reduce((ds, e) => {
|
package/package.json
CHANGED
|
@@ -127,7 +127,6 @@ export class RichTextConverter {
|
|
|
127
127
|
}
|
|
128
128
|
kids.push(...entityKids);
|
|
129
129
|
}
|
|
130
|
-
// sliceSymbols(content, style.start, style.end).forEach(c => console.log(c.charCodeAt(0)))
|
|
131
130
|
if (offset < getSymbolsCount(content)) {
|
|
132
131
|
kids.push(sliceSymbols(content, offset));
|
|
133
132
|
}
|
|
@@ -203,7 +202,7 @@ export class RichTextConverter {
|
|
|
203
202
|
|
|
204
203
|
private groupEntities(entities: RichTextEntity[], styleGroups?: StyleGroup[]): EntitiesGroup[] | undefined {
|
|
205
204
|
const entitiesGroups: EntitiesGroup[] = [];
|
|
206
|
-
if (!entities.length && !styleGroups) return;
|
|
205
|
+
if (!entities.length && (!styleGroups || !styleGroups.length)) return;
|
|
207
206
|
if (!styleGroups || styleGroups.length === 0) {
|
|
208
207
|
const dividersSet = entities.reduce((ds, e) => {
|
|
209
208
|
// some entities may have no data, need to filter them out
|
|
Binary file
|