@happyvertical/smrt-content 0.34.5 → 0.34.7
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/manifest.json +2 -2
- package/dist/smrt-knowledge.json +4 -4
- package/dist/svelte/components/ContentAgentChat.svelte +27 -35
- package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyEditor.svelte +56 -41
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentClaimAuditTool.svelte +11 -24
- package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionForm.svelte +74 -68
- package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionInbox.svelte +20 -15
- package/dist/svelte/components/ContentContributionInbox.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionPortal.svelte +4 -2
- package/dist/svelte/components/ContentContributionPortal.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionTypeManager.svelte +121 -94
- package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributorManager.svelte +38 -34
- package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentCorrectionsTool.svelte +15 -39
- package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentEditor.svelte +106 -124
- package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +77 -74
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceManager.svelte +21 -20
- package/dist/svelte/components/ContentGovernanceManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePanel.svelte +64 -89
- package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +43 -44
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +68 -68
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentImageBrowser.svelte +11 -10
- package/dist/svelte/components/ContentImageBrowser.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentImageChooser.svelte +19 -12
- package/dist/svelte/components/ContentImageChooser.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentList.svelte +60 -52
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentMetadataFields.svelte +8 -23
- package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReferencesPanel.svelte +24 -11
- package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReviewStatusTray.svelte +17 -13
- package/dist/svelte/components/ContentReviewStatusTray.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentStatusFields.svelte +8 -19
- package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentTitleField.svelte +16 -12
- package/dist/svelte/components/ContentTitleField.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentVersionsTool.svelte +7 -21
- package/dist/svelte/components/ContentVersionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/i18n.editor.d.ts +1 -0
- package/dist/svelte/i18n.editor.d.ts.map +1 -1
- package/dist/svelte/i18n.editor.js +1 -0
- package/dist/svelte/routes/ContentContributionsRoute.svelte +27 -23
- package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentFactsRoute.svelte +13 -9
- package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte +6 -4
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte.d.ts.map +1 -1
- package/package.json +15 -14
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { ConfirmDialog } from '@happyvertical/smrt-ui/feedback';
|
|
3
|
+
import { Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
|
|
3
4
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
5
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
4
6
|
import {
|
|
5
7
|
type ContentCorrectionData,
|
|
6
8
|
type ContentGovernanceDefinitionsData,
|
|
@@ -1078,22 +1080,22 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1078
1080
|
<span><strong>{factAudit?.counts.contradicted ?? 0}</strong> contradicted</span>
|
|
1079
1081
|
<span><strong>{factAudit?.counts.needs_review ?? 0}</strong> review</span>
|
|
1080
1082
|
</div>
|
|
1081
|
-
<
|
|
1083
|
+
<Button
|
|
1084
|
+
variant="secondary"
|
|
1082
1085
|
type="button"
|
|
1083
|
-
class="secondary-button"
|
|
1084
1086
|
disabled={factAuditBusy || selectedClaimCount === 0}
|
|
1085
1087
|
onclick={() => void recheckSelectedClaims()}
|
|
1086
1088
|
>
|
|
1087
1089
|
{factAuditBusy ? 'Checking...' : `Recheck selected (${selectedClaimCount})`}
|
|
1088
|
-
</
|
|
1089
|
-
<
|
|
1090
|
+
</Button>
|
|
1091
|
+
<Button
|
|
1092
|
+
variant="secondary"
|
|
1090
1093
|
type="button"
|
|
1091
|
-
class="secondary-button"
|
|
1092
1094
|
disabled={factAuditBusy}
|
|
1093
1095
|
onclick={() => void repairFactAudit()}
|
|
1094
1096
|
>
|
|
1095
1097
|
{factAuditBusy ? 'Repairing...' : 'Repair audit'}
|
|
1096
|
-
</
|
|
1098
|
+
</Button>
|
|
1097
1099
|
</div>
|
|
1098
1100
|
<p class="claim-audit-help">
|
|
1099
1101
|
{t(M['content.governance_panel.article_claims_help'])}
|
|
@@ -1127,6 +1129,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1127
1129
|
<details class="claim-audit-item">
|
|
1128
1130
|
<summary>
|
|
1129
1131
|
<label class="claim-audit-select">
|
|
1132
|
+
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
1130
1133
|
<input
|
|
1131
1134
|
type="checkbox"
|
|
1132
1135
|
checked={isClaimSelected(claim)}
|
|
@@ -1141,9 +1144,9 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1141
1144
|
</summary>
|
|
1142
1145
|
<div class="claim-audit-item__body">
|
|
1143
1146
|
<div class="claim-audit-item__actions">
|
|
1144
|
-
<
|
|
1147
|
+
<Button
|
|
1148
|
+
variant="secondary"
|
|
1145
1149
|
type="button"
|
|
1146
|
-
class="secondary-button"
|
|
1147
1150
|
disabled={factAuditBusy || !getClaimId(claim)}
|
|
1148
1151
|
onclick={() => {
|
|
1149
1152
|
const claimId = getClaimId(claim);
|
|
@@ -1151,7 +1154,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1151
1154
|
}}
|
|
1152
1155
|
>
|
|
1153
1156
|
{t(M['content.governance_panel.recheck_support'])}
|
|
1154
|
-
</
|
|
1157
|
+
</Button>
|
|
1155
1158
|
</div>
|
|
1156
1159
|
{#if claim.claimQuote}
|
|
1157
1160
|
<p><strong>{t(M['content.governance_panel.article_claim_label'])}</strong> {claim.claimQuote}</p>
|
|
@@ -1233,13 +1236,15 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1233
1236
|
{fact.status} · confidence {formatPercent(fact.confidence)}
|
|
1234
1237
|
</span>
|
|
1235
1238
|
</div>
|
|
1236
|
-
<
|
|
1239
|
+
<Button
|
|
1240
|
+
variant="ghost"
|
|
1241
|
+
size="sm"
|
|
1237
1242
|
type="button"
|
|
1238
1243
|
class="fact-chip__remove"
|
|
1239
1244
|
onclick={() => fact.id && removeFact(fact.id)}
|
|
1240
1245
|
>
|
|
1241
1246
|
Remove
|
|
1242
|
-
</
|
|
1247
|
+
</Button>
|
|
1243
1248
|
</div>
|
|
1244
1249
|
{/each}
|
|
1245
1250
|
</div>
|
|
@@ -1248,14 +1253,14 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1248
1253
|
|
|
1249
1254
|
{#if showFactCatalog}
|
|
1250
1255
|
<div class="fact-search">
|
|
1251
|
-
<
|
|
1256
|
+
<Input
|
|
1252
1257
|
type="text"
|
|
1253
1258
|
bind:value={factQuery}
|
|
1254
1259
|
placeholder={t(M['content.governance_panel.search_fact_catalog'])}
|
|
1255
1260
|
/>
|
|
1256
|
-
<
|
|
1261
|
+
<Button variant="primary" type="button" onclick={searchFactsFirstPage}>
|
|
1257
1262
|
Search
|
|
1258
|
-
</
|
|
1263
|
+
</Button>
|
|
1259
1264
|
</div>
|
|
1260
1265
|
|
|
1261
1266
|
{#if catalogError}
|
|
@@ -1278,13 +1283,15 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1278
1283
|
{fact.status} · {fact.domain || 'general'} · confidence {formatPercent(fact.confidence)}
|
|
1279
1284
|
</span>
|
|
1280
1285
|
</div>
|
|
1281
|
-
<
|
|
1286
|
+
<Button
|
|
1287
|
+
variant="ghost"
|
|
1288
|
+
size="sm"
|
|
1282
1289
|
type="button"
|
|
1283
1290
|
disabled={!fact.id || selectedFactIds.includes(fact.id ?? '')}
|
|
1284
1291
|
onclick={() => addFact(fact)}
|
|
1285
1292
|
>
|
|
1286
1293
|
{!fact.id || selectedFactIds.includes(fact.id ?? '') ? 'Selected' : 'Add'}
|
|
1287
|
-
</
|
|
1294
|
+
</Button>
|
|
1288
1295
|
</div>
|
|
1289
1296
|
{/each}
|
|
1290
1297
|
</div>
|
|
@@ -1299,22 +1306,24 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1299
1306
|
{/if}
|
|
1300
1307
|
</span>
|
|
1301
1308
|
<div class="fact-pagination__actions">
|
|
1302
|
-
<
|
|
1309
|
+
<Button
|
|
1310
|
+
variant="ghost"
|
|
1311
|
+
size="sm"
|
|
1303
1312
|
type="button"
|
|
1304
|
-
class="secondary-button"
|
|
1305
1313
|
disabled={catalogLoading || catalogPage <= 1}
|
|
1306
1314
|
onclick={browsePreviousFacts}
|
|
1307
1315
|
>
|
|
1308
1316
|
Previous
|
|
1309
|
-
</
|
|
1310
|
-
<
|
|
1317
|
+
</Button>
|
|
1318
|
+
<Button
|
|
1319
|
+
variant="ghost"
|
|
1320
|
+
size="sm"
|
|
1311
1321
|
type="button"
|
|
1312
|
-
class="secondary-button"
|
|
1313
1322
|
disabled={catalogLoading || !catalogHasNextPage}
|
|
1314
1323
|
onclick={browseNextFacts}
|
|
1315
1324
|
>
|
|
1316
1325
|
Next
|
|
1317
|
-
</
|
|
1326
|
+
</Button>
|
|
1318
1327
|
</div>
|
|
1319
1328
|
</div>
|
|
1320
1329
|
{/if}
|
|
@@ -1354,13 +1363,13 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1354
1363
|
{#if reviewProfiles.length > 0}
|
|
1355
1364
|
<label class="workflow-field">
|
|
1356
1365
|
{t(M['content.governance_panel.review_profile'])}
|
|
1357
|
-
<
|
|
1366
|
+
<Select bind:value={activeReviewProfileKey}>
|
|
1358
1367
|
{#each reviewProfiles as profile (profile.profileKey)}
|
|
1359
1368
|
<option value={profile.profileKey}>
|
|
1360
1369
|
{formatProfileLabel(profile.profileKey)}
|
|
1361
1370
|
</option>
|
|
1362
1371
|
{/each}
|
|
1363
|
-
</
|
|
1372
|
+
</Select>
|
|
1364
1373
|
</label>
|
|
1365
1374
|
{/if}
|
|
1366
1375
|
|
|
@@ -1414,7 +1423,8 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1414
1423
|
|
|
1415
1424
|
<div class="review-actions">
|
|
1416
1425
|
{#each activeProfileReviewActions as action (action.policyKey ?? action.kind)}
|
|
1417
|
-
<
|
|
1426
|
+
<Button
|
|
1427
|
+
variant="primary"
|
|
1418
1428
|
type="button"
|
|
1419
1429
|
disabled={reviewBusy !== null}
|
|
1420
1430
|
onclick={() => void runReview(action)}
|
|
@@ -1424,7 +1434,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1424
1434
|
{:else}
|
|
1425
1435
|
Run {action.label}
|
|
1426
1436
|
{/if}
|
|
1427
|
-
</
|
|
1437
|
+
</Button>
|
|
1428
1438
|
{/each}
|
|
1429
1439
|
</div>
|
|
1430
1440
|
|
|
@@ -1432,25 +1442,26 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1432
1442
|
{#if availableCustomPolicies.length > 0}
|
|
1433
1443
|
<label class="workflow-field">
|
|
1434
1444
|
{t(M['content.governance_panel.app_review_policy'])}
|
|
1435
|
-
<
|
|
1445
|
+
<Select bind:value={activeCustomPolicyKey}>
|
|
1436
1446
|
{#each availableCustomPolicies as policy (policy.key)}
|
|
1437
1447
|
<option value={policy.key}>
|
|
1438
1448
|
{policy.label}
|
|
1439
1449
|
</option>
|
|
1440
1450
|
{/each}
|
|
1441
|
-
</
|
|
1451
|
+
</Select>
|
|
1442
1452
|
</label>
|
|
1443
1453
|
{/if}
|
|
1444
1454
|
|
|
1445
1455
|
<label class="workflow-field">
|
|
1446
1456
|
{customReviewButtonLabel}
|
|
1447
|
-
<
|
|
1448
|
-
rows=
|
|
1457
|
+
<Textarea
|
|
1458
|
+
rows={3}
|
|
1449
1459
|
bind:value={customReviewText}
|
|
1450
1460
|
placeholder={t(M['content.governance_panel.optional_review_instructions'])}
|
|
1451
|
-
></
|
|
1461
|
+
></Textarea>
|
|
1452
1462
|
</label>
|
|
1453
|
-
<
|
|
1463
|
+
<Button
|
|
1464
|
+
variant="primary"
|
|
1454
1465
|
type="button"
|
|
1455
1466
|
disabled={reviewBusy !== null || !canRunCustomReview()}
|
|
1456
1467
|
onclick={() =>
|
|
@@ -1468,7 +1479,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1468
1479
|
{:else}
|
|
1469
1480
|
Run {customReviewButtonLabel}
|
|
1470
1481
|
{/if}
|
|
1471
|
-
</
|
|
1482
|
+
</Button>
|
|
1472
1483
|
</div>
|
|
1473
1484
|
|
|
1474
1485
|
<div class="review-list">
|
|
@@ -1657,7 +1668,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1657
1668
|
|
|
1658
1669
|
<label class="workflow-field">
|
|
1659
1670
|
Summary
|
|
1660
|
-
<
|
|
1671
|
+
<Input
|
|
1661
1672
|
type="text"
|
|
1662
1673
|
bind:value={correctionSummary}
|
|
1663
1674
|
placeholder={t(M['content.governance_panel.what_was_wrong'])}
|
|
@@ -1666,44 +1677,46 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1666
1677
|
|
|
1667
1678
|
<label class="workflow-field">
|
|
1668
1679
|
{t(M['content.governance_panel.related_fact'])}
|
|
1669
|
-
<
|
|
1680
|
+
<Select bind:value={correctionFactId}>
|
|
1670
1681
|
<option value="">{t(M['content.governance_panel.general_correction'])}</option>
|
|
1671
1682
|
{#each selectedFactsResolved as fact (fact.id)}
|
|
1672
1683
|
<option value={fact.id ?? ''}>{fact.textRefined}</option>
|
|
1673
1684
|
{/each}
|
|
1674
|
-
</
|
|
1685
|
+
</Select>
|
|
1675
1686
|
</label>
|
|
1676
1687
|
|
|
1677
1688
|
<label class="workflow-field">
|
|
1678
1689
|
{t(M['content.governance_panel.corrected_fact_text'])}
|
|
1679
|
-
<
|
|
1680
|
-
rows=
|
|
1690
|
+
<Textarea
|
|
1691
|
+
rows={4}
|
|
1681
1692
|
bind:value={correctedFactText}
|
|
1682
1693
|
placeholder={t(M['content.governance_panel.provide_corrected_wording'])}
|
|
1683
|
-
></
|
|
1694
|
+
></Textarea>
|
|
1684
1695
|
</label>
|
|
1685
1696
|
|
|
1686
1697
|
<label class="workflow-field">
|
|
1687
1698
|
{t(M['content.governance_panel.public_note'])}
|
|
1688
|
-
<
|
|
1689
|
-
rows=
|
|
1699
|
+
<Textarea
|
|
1700
|
+
rows={3}
|
|
1690
1701
|
bind:value={correctionPublicNote}
|
|
1691
1702
|
placeholder={t(M['content.governance_panel.optional_public_correction_note'])}
|
|
1692
|
-
></
|
|
1703
|
+
></Textarea>
|
|
1693
1704
|
</label>
|
|
1694
1705
|
|
|
1695
1706
|
<label class="checkbox-row">
|
|
1707
|
+
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
1696
1708
|
<input type="checkbox" bind:checked={publishCorrection} />
|
|
1697
1709
|
{t(M['content.governance_panel.publish_immediately'])}
|
|
1698
1710
|
</label>
|
|
1699
1711
|
|
|
1700
|
-
<
|
|
1712
|
+
<Button
|
|
1713
|
+
variant="primary"
|
|
1701
1714
|
type="button"
|
|
1702
1715
|
disabled={correctionBusy || correctionSummary.trim().length === 0}
|
|
1703
1716
|
onclick={() => void issueCorrection()}
|
|
1704
1717
|
>
|
|
1705
1718
|
{correctionBusy ? 'Issuing correction...' : 'Issue Correction'}
|
|
1706
|
-
</
|
|
1719
|
+
</Button>
|
|
1707
1720
|
|
|
1708
1721
|
<div class="review-list">
|
|
1709
1722
|
<div class="section-caption">{t(M['content.governance_panel.published_history'])}</div>
|
|
@@ -1736,14 +1749,14 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1736
1749
|
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
1737
1750
|
Versions
|
|
1738
1751
|
</div>
|
|
1739
|
-
<
|
|
1752
|
+
<Button
|
|
1753
|
+
variant="secondary"
|
|
1740
1754
|
type="button"
|
|
1741
|
-
class="secondary-button"
|
|
1742
1755
|
disabled={versionBusy}
|
|
1743
1756
|
onclick={(e) => { e.preventDefault(); void createSnapshot(); }}
|
|
1744
1757
|
>
|
|
1745
1758
|
{versionBusy ? 'Working...' : 'Create Snapshot'}
|
|
1746
|
-
</
|
|
1759
|
+
</Button>
|
|
1747
1760
|
</div>
|
|
1748
1761
|
<svg class="drawer-icon" style="margin-left: 1rem;" viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>
|
|
1749
1762
|
</summary>
|
|
@@ -1765,9 +1778,9 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1765
1778
|
{/if}
|
|
1766
1779
|
<div class="version-card__footer">
|
|
1767
1780
|
<span>{formatTimestamp(version.createdAt)}</span>
|
|
1768
|
-
<
|
|
1781
|
+
<Button
|
|
1782
|
+
variant="secondary"
|
|
1769
1783
|
type="button"
|
|
1770
|
-
class="secondary-button"
|
|
1771
1784
|
disabled={versionBusy || version.version === null || version.version === undefined}
|
|
1772
1785
|
onclick={() => {
|
|
1773
1786
|
if (
|
|
@@ -1779,7 +1792,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1779
1792
|
}}
|
|
1780
1793
|
>
|
|
1781
1794
|
Restore
|
|
1782
|
-
</
|
|
1795
|
+
</Button>
|
|
1783
1796
|
</div>
|
|
1784
1797
|
</div>
|
|
1785
1798
|
{/each}
|
|
@@ -1920,20 +1933,6 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1920
1933
|
font-size: var(--smrt-typography-body-medium-size, 0.85rem);
|
|
1921
1934
|
}
|
|
1922
1935
|
|
|
1923
|
-
.fact-search input,
|
|
1924
|
-
.workflow-field input,
|
|
1925
|
-
.workflow-field textarea,
|
|
1926
|
-
.workflow-field select {
|
|
1927
|
-
width: 100%;
|
|
1928
|
-
box-sizing: border-box;
|
|
1929
|
-
padding: 0.75rem;
|
|
1930
|
-
border-radius: 0.5rem;
|
|
1931
|
-
border: 1px solid var(--smrt-color-outline);
|
|
1932
|
-
background: var(--smrt-color-surface);
|
|
1933
|
-
color: var(--smrt-color-on-surface);
|
|
1934
|
-
font-family: inherit;
|
|
1935
|
-
}
|
|
1936
|
-
|
|
1937
1936
|
.workflow-field {
|
|
1938
1937
|
display: flex;
|
|
1939
1938
|
flex-direction: column;
|
|
@@ -1943,30 +1942,6 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
1943
1942
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
1944
1943
|
}
|
|
1945
1944
|
|
|
1946
|
-
.fact-search button,
|
|
1947
|
-
.review-actions button {
|
|
1948
|
-
border: none;
|
|
1949
|
-
border-radius: 0.5rem;
|
|
1950
|
-
padding: 0.7rem 0.95rem;
|
|
1951
|
-
background: var(--smrt-color-primary);
|
|
1952
|
-
color: var(--smrt-color-on-primary, white);
|
|
1953
|
-
cursor: pointer;
|
|
1954
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
.fact-search button:disabled,
|
|
1958
|
-
.review-actions button:disabled,
|
|
1959
|
-
.fact-pagination button:disabled {
|
|
1960
|
-
cursor: not-allowed;
|
|
1961
|
-
opacity: 0.65;
|
|
1962
|
-
}
|
|
1963
|
-
|
|
1964
|
-
.secondary-button {
|
|
1965
|
-
background: var(--smrt-color-surface);
|
|
1966
|
-
color: var(--smrt-color-on-surface);
|
|
1967
|
-
border: 1px solid var(--smrt-color-outline-variant);
|
|
1968
|
-
}
|
|
1969
|
-
|
|
1970
1945
|
.fact-chip-list,
|
|
1971
1946
|
.fact-catalog__list,
|
|
1972
1947
|
.claim-audit-group,
|
|
@@ -2060,7 +2035,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
|
|
|
2060
2035
|
gap: 0.25rem;
|
|
2061
2036
|
}
|
|
2062
2037
|
|
|
2063
|
-
.fact-chip__remove {
|
|
2038
|
+
.fact-chip :global(.fact-chip__remove) {
|
|
2064
2039
|
background: transparent !important;
|
|
2065
2040
|
color: var(--smrt-color-error) !important;
|
|
2066
2041
|
padding: 0 !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGovernancePanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePanel.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentGovernancePanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePanel.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,EAIL,KAAK,0BAA0B,EAQ/B,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EAEd,MAAM,wBAAwB,CAAC;AAMhC,MAAM,MAAM,6BAA6B,GACrC,WAAW,GACX,OAAO,GACP,SAAS,GACT,cAAc,GACd,aAAa,GACb,UAAU,CAAC;AASf,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,IAAI,CAAC;IAC/D,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,CAAC;IAC7E,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,cAAc,CAAC,EAAE,6BAA6B,EAAE,CAAC;CAClD;AAooDD,QAAA,MAAM,sBAAsB;gCA74Bc,MAAM;MA64BoB,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { Form, Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
|
|
2
3
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
4
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
5
|
import type { ContentReviewPolicyData } from '../../mock-smrt-client';
|
|
4
6
|
import { M } from '../i18n.tools.js';
|
|
5
7
|
|
|
@@ -41,46 +43,49 @@ function handleSubmit() {
|
|
|
41
43
|
}
|
|
42
44
|
</script>
|
|
43
45
|
|
|
44
|
-
<
|
|
45
|
-
event
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
46
|
+
<div class="governance-editor-shell">
|
|
47
|
+
<Form class="governance-editor" onsubmit={(event) => {
|
|
48
|
+
event.preventDefault();
|
|
49
|
+
handleSubmit();
|
|
50
|
+
}}>
|
|
51
|
+
<label>
|
|
52
|
+
Key
|
|
53
|
+
<Input type="text" bind:value={draft.key} required />
|
|
54
|
+
</label>
|
|
55
|
+
<label>
|
|
56
|
+
Label
|
|
57
|
+
<Input type="text" bind:value={draft.label} />
|
|
58
|
+
</label>
|
|
59
|
+
<label>
|
|
60
|
+
Kind
|
|
61
|
+
<Select bind:value={draft.kind}>
|
|
62
|
+
<option value="facts">Facts</option>
|
|
63
|
+
<option value="safety">Safety</option>
|
|
64
|
+
<option value="custom">Custom</option>
|
|
65
|
+
</Select>
|
|
66
|
+
</label>
|
|
67
|
+
<label>
|
|
68
|
+
Instructions
|
|
69
|
+
<Textarea rows={4} bind:value={draft.instructions}></Textarea>
|
|
70
|
+
</label>
|
|
71
|
+
<label class="checkbox">
|
|
72
|
+
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
73
|
+
<input type="checkbox" bind:checked={draft.enabled} />
|
|
74
|
+
Enabled
|
|
75
|
+
</label>
|
|
76
|
+
<div class="actions">
|
|
77
|
+
<Button variant="primary" type="submit">{t(M['content.governance_policy_editor.save_policy'])}</Button>
|
|
78
|
+
{#if onCancel}
|
|
79
|
+
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
80
|
+
Cancel
|
|
81
|
+
</Button>
|
|
82
|
+
{/if}
|
|
83
|
+
</div>
|
|
84
|
+
</Form>
|
|
85
|
+
</div>
|
|
81
86
|
|
|
82
87
|
<style>
|
|
83
|
-
.governance-editor {
|
|
88
|
+
.governance-editor-shell :global(.governance-editor) {
|
|
84
89
|
display: grid;
|
|
85
90
|
gap: 0.75rem;
|
|
86
91
|
}
|
|
@@ -91,12 +96,6 @@ function handleSubmit() {
|
|
|
91
96
|
font-size: var(--smrt-typography-label-large-size, 0.9rem);
|
|
92
97
|
}
|
|
93
98
|
|
|
94
|
-
input,
|
|
95
|
-
select,
|
|
96
|
-
textarea {
|
|
97
|
-
width: 100%;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
99
|
.checkbox {
|
|
101
100
|
display: flex;
|
|
102
101
|
align-items: center;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGovernancePolicyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePolicyEditor.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentGovernancePolicyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePolicyEditor.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC1C,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAsFD,QAAA,MAAM,6BAA6B,2CAAwC,CAAC;AAC5E,KAAK,6BAA6B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACtF,eAAe,6BAA6B,CAAC"}
|