@blokkli/editor 2.0.0-alpha.41 → 2.0.0-alpha.42
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/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,43 +7,45 @@
|
|
|
7
7
|
:data-blokkli-provider-active="isInEditor ? 'true' : 'false'"
|
|
8
8
|
>
|
|
9
9
|
<BlokkliRootErrorBoundary v-if="isInEditor">
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
10
|
+
<ClientOnly>
|
|
11
|
+
<PreviewProvider
|
|
12
|
+
v-if="isPreviewing"
|
|
13
|
+
v-slot="{ mutatedEntity }"
|
|
14
|
+
:entity
|
|
15
|
+
:entity-type
|
|
16
|
+
:entity-uuid
|
|
17
|
+
:entity-bundle
|
|
18
|
+
:language
|
|
19
|
+
:provider-type
|
|
20
|
+
>
|
|
21
|
+
<slot
|
|
22
|
+
:entity="mutatedEntity"
|
|
23
|
+
:is-editing
|
|
24
|
+
:can-edit
|
|
25
|
+
:is-preview="isPreviewing"
|
|
26
|
+
/>
|
|
27
|
+
</PreviewProvider>
|
|
28
|
+
<EditProvider
|
|
29
|
+
v-else-if="isEditing && shouldRender && providerEl"
|
|
30
|
+
v-slot="{ mutatedEntity }"
|
|
31
|
+
:provider-el
|
|
32
|
+
:entity
|
|
33
|
+
:entity-type
|
|
34
|
+
:entity-uuid
|
|
35
|
+
:entity-bundle
|
|
36
|
+
:language
|
|
37
|
+
:isolate
|
|
38
|
+
:permissions
|
|
39
|
+
:provider-type
|
|
40
|
+
>
|
|
41
|
+
<slot
|
|
42
|
+
:is-editing
|
|
43
|
+
:can-edit
|
|
44
|
+
:is-preview="isPreviewing"
|
|
45
|
+
:entity="mutatedEntity"
|
|
46
|
+
/>
|
|
47
|
+
</EditProvider>
|
|
48
|
+
</ClientOnly>
|
|
47
49
|
</BlokkliRootErrorBoundary>
|
|
48
50
|
|
|
49
51
|
<slot
|
|
@@ -59,10 +59,20 @@ const { data, refresh, error } = await useAsyncData(
|
|
|
59
59
|
() => adapter.loadState().then((v) => adapter.mapState(v))
|
|
60
60
|
);
|
|
61
61
|
function updateMutatedFields(fields) {
|
|
62
|
-
|
|
62
|
+
const existingKeys = Object.keys(mutatedFieldsMap);
|
|
63
|
+
const newKeys = /* @__PURE__ */ new Set();
|
|
64
|
+
for (let i = 0; i < fields.length; i++) {
|
|
65
|
+
const field = fields[i];
|
|
63
66
|
const key = getFieldKey(field.entityUuid, field.name);
|
|
64
67
|
mutatedFieldsMap[key] = field;
|
|
65
|
-
|
|
68
|
+
newKeys.add(key);
|
|
69
|
+
}
|
|
70
|
+
for (let i = 0; i < existingKeys.length; i++) {
|
|
71
|
+
const key = existingKeys[i];
|
|
72
|
+
if (!newKeys.has(key)) {
|
|
73
|
+
delete mutatedFieldsMap[key];
|
|
74
|
+
}
|
|
75
|
+
}
|
|
66
76
|
}
|
|
67
77
|
const updateState = () => {
|
|
68
78
|
const fields = data.value?.mutatedState?.fields || [];
|
|
@@ -21,18 +21,18 @@ const SCORE_CONFIGS = {
|
|
|
21
21
|
label: "WSTF",
|
|
22
22
|
compute: (tr, text) => tr.wienerSachtextformel(text, 1),
|
|
23
23
|
direction: "higher_harder",
|
|
24
|
-
bands: { easy:
|
|
25
|
-
impactThresholds: [
|
|
24
|
+
bands: { easy: 7, ok: 14 },
|
|
25
|
+
impactThresholds: [12, 16, 20],
|
|
26
26
|
referenceTable: [
|
|
27
|
-
{ range: "4
|
|
28
|
-
{ range: "
|
|
29
|
-
{ range: "
|
|
30
|
-
{ range: "
|
|
27
|
+
{ range: "Below 4", label: "Very easy (children's books)" },
|
|
28
|
+
{ range: "4\u20137", label: "Easy (simple articles)" },
|
|
29
|
+
{ range: "7\u201311", label: "Medium (standard website content)" },
|
|
30
|
+
{ range: "11\u201314", label: "Moderately difficult (official documents)" },
|
|
31
31
|
{
|
|
32
|
-
range: "Above
|
|
33
|
-
label: "
|
|
32
|
+
range: "Above 14",
|
|
33
|
+
label: "Difficult \u2014 this is what gets flagged"
|
|
34
34
|
},
|
|
35
|
-
{ range: "Above
|
|
35
|
+
{ range: "Above 20", label: "Critical \u2014 must be simplified" }
|
|
36
36
|
]
|
|
37
37
|
},
|
|
38
38
|
fr: {
|