@happyvertical/smrt-content 0.34.6 → 0.34.8

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.
Files changed (43) hide show
  1. package/dist/manifest.json +2 -2
  2. package/dist/smrt-knowledge.json +4 -4
  3. package/dist/svelte/components/ContentAgentChat.svelte +17 -16
  4. package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
  5. package/dist/svelte/components/ContentBodyEditor.svelte +4 -3
  6. package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
  7. package/dist/svelte/components/ContentClaimAuditTool.svelte +1 -0
  8. package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
  9. package/dist/svelte/components/ContentContributionForm.svelte +73 -68
  10. package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
  11. package/dist/svelte/components/ContentContributionInbox.svelte +9 -7
  12. package/dist/svelte/components/ContentContributionInbox.svelte.d.ts.map +1 -1
  13. package/dist/svelte/components/ContentContributionTypeManager.svelte +117 -91
  14. package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
  15. package/dist/svelte/components/ContentContributorManager.svelte +34 -31
  16. package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
  17. package/dist/svelte/components/ContentCorrectionsTool.svelte +11 -22
  18. package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
  19. package/dist/svelte/components/ContentEditor.svelte +40 -64
  20. package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
  21. package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +76 -74
  22. package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts.map +1 -1
  23. package/dist/svelte/components/ContentGovernancePanel.svelte +20 -31
  24. package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
  25. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +42 -44
  26. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
  27. package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +66 -67
  28. package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts.map +1 -1
  29. package/dist/svelte/components/ContentList.svelte +12 -18
  30. package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
  31. package/dist/svelte/components/ContentMetadataFields.svelte +8 -23
  32. package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
  33. package/dist/svelte/components/ContentReferencesPanel.svelte +11 -7
  34. package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
  35. package/dist/svelte/components/ContentStatusFields.svelte +8 -19
  36. package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
  37. package/dist/svelte/components/ContentTitleField.svelte +16 -12
  38. package/dist/svelte/components/ContentTitleField.svelte.d.ts.map +1 -1
  39. package/dist/svelte/routes/ContentContributionsRoute.svelte +26 -23
  40. package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
  41. package/dist/svelte/routes/ContentFactsRoute.svelte +10 -7
  42. package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
  43. package/package.json +15 -15
@@ -1,6 +1,7 @@
1
1
  <script lang="ts">
2
2
  import type { ImageLike } from '@happyvertical/smrt-images/svelte';
3
3
  import { ImageUploader } from '@happyvertical/smrt-images/svelte';
4
+ import { Form, Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
4
5
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
5
6
  import { Button } from '@happyvertical/smrt-ui/ui';
6
7
  import { untrack } from 'svelte';
@@ -75,10 +76,17 @@ let {
75
76
  onCancel,
76
77
  }: Props = $props();
77
78
 
78
- let editForm = $state<HTMLFormElement | null>(null);
79
+ // Unique per-instance form id so triggerSave() targets THIS editor's form even
80
+ // when multiple ContentEditor / GovernedContentEditor instances are mounted
81
+ // (a hardcoded id + getElementById would resolve to the first match in the DOM).
82
+ const formId = $props.id();
79
83
 
80
84
  export function triggerSave() {
81
85
  if (saveDisabled) return;
86
+ const editForm =
87
+ typeof document !== 'undefined'
88
+ ? (document.getElementById(formId) as HTMLFormElement | null)
89
+ : null;
82
90
  if (editForm?.requestSubmit) {
83
91
  editForm.requestSubmit();
84
92
  return;
@@ -921,9 +929,8 @@ function removeAsset(id: string) {
921
929
  <div class="form-container">
922
930
  <div class="editor-grid" class:editor-grid--with-sidebar={showChatSidebar}>
923
931
  <!-- LEFT COLUMN (Document Canvas) -->
924
- <form
925
- bind:this={editForm}
926
- id="content-edit-form"
932
+ <Form
933
+ id={formId}
927
934
  class="editor-main-col"
928
935
  onsubmit={handleSubmit}
929
936
  >
@@ -947,31 +954,31 @@ function removeAsset(id: string) {
947
954
  <div class="editor-toolbar">
948
955
  <div class="editor-toolbar-left">
949
956
  <div class="mui-field">
950
- <select id="type-select" bind:value={formData.type} class="mui-input">
957
+ <Select id="type-select" bind:value={formData.type} class="mui-input">
951
958
  <option value="article">Article</option>
952
959
  <option value="document">Document</option>
953
960
  <option value="mirror">Mirror</option>
954
- </select>
961
+ </Select>
955
962
  <label for="type-select">Type</label>
956
963
  </div>
957
964
  <div class="mui-field">
958
- <select id="state-select" bind:value={formData.state} class="mui-input">
965
+ <Select id="state-select" bind:value={formData.state} class="mui-input">
959
966
  <option value="active">Active</option>
960
967
  <option value="highlighted">Highlighted</option>
961
968
  <option value="deprecated">Deprecated</option>
962
- </select>
969
+ </Select>
963
970
  <label for="state-select">State</label>
964
971
  </div>
965
972
  <div class="mui-field">
966
- <select id="status-select" bind:value={formData.status} class="mui-input">
973
+ <Select id="status-select" bind:value={formData.status} class="mui-input">
967
974
  <option value="draft">Draft</option>
968
975
  <option value="published">Published</option>
969
976
  <option value="archived">Archived</option>
970
- </select>
977
+ </Select>
971
978
  <label for="status-select">Status</label>
972
979
  </div>
973
980
  <div class="mui-field">
974
- <input id="publish-date-input" type="datetime-local" bind:value={formData.publish_date} class="mui-input" />
981
+ <Input id="publish-date-input" type="datetime-local" bind:value={formData.publish_date} class="mui-input" />
975
982
  <label for="publish-date-input">{t(M['content.content_editor.publish_date'])}</label>
976
983
  </div>
977
984
  </div>
@@ -989,12 +996,12 @@ function removeAsset(id: string) {
989
996
  <p class="save-notice">{saveNotice}</p>
990
997
  {/if}
991
998
 
992
- <input
993
- type="text"
994
- class="document-title-input"
999
+ <Input
1000
+ type="text"
1001
+ class="document-title-input"
995
1002
  bind:value={formData.title}
996
1003
  placeholder={t(M['content.content_editor.document_title_placeholder'])}
997
- required
1004
+ required
998
1005
  />
999
1006
 
1000
1007
  {#if showUndoBanner}
@@ -1139,15 +1146,15 @@ function removeAsset(id: string) {
1139
1146
  <div class="editor-drawer-content">
1140
1147
  <label>
1141
1148
  Author:
1142
- <input type="text" bind:value={formData.author} placeholder={t(M['content.content_editor.author_name_placeholder'])} />
1149
+ <Input type="text" bind:value={formData.author} placeholder={t(M['content.content_editor.author_name_placeholder'])} />
1143
1150
  </label>
1144
1151
  <label>
1145
1152
  Description:
1146
- <textarea bind:value={formData.description} rows="2" placeholder={t(M['content.content_editor.brief_summary_placeholder'])}></textarea>
1153
+ <Textarea bind:value={formData.description} rows={2} placeholder={t(M['content.content_editor.brief_summary_placeholder'])}></Textarea>
1147
1154
  </label>
1148
1155
  <label>
1149
1156
  {t(M['content.content_editor.tags_comma_separated'])}
1150
- <input
1157
+ <Input
1151
1158
  type="text"
1152
1159
  value={(formData.tags || []).join(', ')}
1153
1160
  placeholder={t(M['content.content_editor.tags_placeholder'])}
@@ -1205,11 +1212,11 @@ function removeAsset(id: string) {
1205
1212
  : M['content.content_editor.evidence_item_plural'],
1206
1213
  ),
1207
1214
  })}</span>
1208
- <select bind:value={bulkEvidenceStatus} disabled={selectedEvidenceCount === 0 || Boolean(evidenceBusy)}>
1215
+ <Select bind:value={bulkEvidenceStatus} disabled={selectedEvidenceCount === 0 || Boolean(evidenceBusy)}>
1209
1216
  {#each evidenceStatuses as status}
1210
1217
  <option value={status}>{status}</option>
1211
1218
  {/each}
1212
- </select>
1219
+ </Select>
1213
1220
  <Button
1214
1221
  variant="ghost"
1215
1222
  size="sm"
@@ -1273,6 +1280,7 @@ function removeAsset(id: string) {
1273
1280
  <details class="resource-claim">
1274
1281
  <summary>
1275
1282
  <label class="evidence-select">
1283
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
1276
1284
  <input
1277
1285
  type="checkbox"
1278
1286
  checked={isResourceClaimSelected(claim)}
@@ -1356,22 +1364,22 @@ function removeAsset(id: string) {
1356
1364
  </div>
1357
1365
  {/if}
1358
1366
  <div class="add-reference-row">
1359
- <input type="text" bind:value={newReferenceId} placeholder={t(M['content.content_editor.reference_id_or_url_placeholder'])} />
1367
+ <Input type="text" bind:value={newReferenceId} placeholder={t(M['content.content_editor.reference_id_or_url_placeholder'])} />
1360
1368
  <Button variant="ghost" type="button" class="add-reference-button" onclick={addReference}>Add</Button>
1361
1369
  </div>
1362
1370
  </div>
1363
1371
 
1364
1372
  <label>
1365
1373
  URL:
1366
- <input type="url" bind:value={formData.url} />
1374
+ <Input type="url" bind:value={formData.url} />
1367
1375
  </label>
1368
1376
  <label>
1369
1377
  {t(M['content.content_editor.file_key'])}
1370
- <input type="text" bind:value={formData.fileKey} />
1378
+ <Input type="text" bind:value={formData.fileKey} />
1371
1379
  </label>
1372
1380
  </div>
1373
1381
  </details>
1374
- </form>
1382
+ </Form>
1375
1383
 
1376
1384
  {#if showChatSidebar}
1377
1385
  <aside class="editor-sidebar-col">
@@ -1430,7 +1438,7 @@ function removeAsset(id: string) {
1430
1438
  }
1431
1439
  }
1432
1440
 
1433
- .document-title-input {
1441
+ .form-container :global(.document-title-input) {
1434
1442
  width: 100%;
1435
1443
  font-size: var(--smrt-typography-display-medium-size, 2.5rem);
1436
1444
  font-weight: var(--smrt-typography-weight-bold, 800);
@@ -1445,7 +1453,7 @@ function removeAsset(id: string) {
1445
1453
  font-family: inherit;
1446
1454
  }
1447
1455
 
1448
- .document-title-input::placeholder {
1456
+ .form-container :global(.document-title-input)::placeholder {
1449
1457
  color: var(--smrt-color-outline-variant);
1450
1458
  }
1451
1459
 
@@ -1504,7 +1512,7 @@ function removeAsset(id: string) {
1504
1512
  z-index: 1;
1505
1513
  }
1506
1514
 
1507
- .mui-input {
1515
+ .mui-field :global(.mui-input) {
1508
1516
  padding: 0.5rem 0.75rem;
1509
1517
  border-radius: 0.375rem;
1510
1518
  border: 1px solid var(--smrt-color-outline-variant);
@@ -1518,15 +1526,16 @@ function removeAsset(id: string) {
1518
1526
  transition: border-color 0.2s;
1519
1527
  }
1520
1528
 
1521
- .mui-input:focus {
1529
+ .mui-field :global(.mui-input:focus) {
1522
1530
  outline: none;
1523
1531
  border-color: var(--smrt-color-primary);
1524
1532
  }
1525
1533
 
1526
- .editor-main-col {
1534
+ .form-container :global(.editor-main-col) {
1527
1535
  display: flex;
1528
1536
  flex-direction: column;
1529
1537
  background: transparent;
1538
+ width: 100%;
1530
1539
  }
1531
1540
 
1532
1541
  .editor-sidebar-col {
@@ -1612,11 +1621,6 @@ function removeAsset(id: string) {
1612
1621
  font-size: var(--smrt-typography-headline-small-size, 1.5rem);
1613
1622
  }
1614
1623
 
1615
- .form-container form {
1616
- display: block;
1617
- width: 100%;
1618
- }
1619
-
1620
1624
  .form-container label {
1621
1625
  display: flex;
1622
1626
  flex-direction: column;
@@ -1626,34 +1630,6 @@ function removeAsset(id: string) {
1626
1630
  font-size: var(--smrt-typography-label-large-size, 0.875rem);
1627
1631
  }
1628
1632
 
1629
- .form-container input,
1630
- .form-container select,
1631
- .form-container textarea {
1632
- padding: 0.75rem;
1633
- border: 1px solid var(--smrt-color-outline);
1634
- border-radius: 0.5rem;
1635
- font-size: var(--smrt-typography-body-medium-size, 0.875rem);
1636
- transition: border-color 0.2s, box-shadow 0.2s;
1637
- font-family: inherit;
1638
- box-sizing: border-box;
1639
- width: 100%;
1640
- background: var(--smrt-color-surface-container-low);
1641
- color: var(--smrt-color-on-surface);
1642
- }
1643
-
1644
- .form-container input:focus,
1645
- .form-container select:focus,
1646
- .form-container textarea:focus {
1647
- outline: none;
1648
- border-color: var(--smrt-color-primary);
1649
- box-shadow: 0 0 0 3px color-mix(in srgb, var(--smrt-color-primary) 10%, transparent);
1650
- }
1651
-
1652
- .form-container textarea {
1653
- resize: vertical;
1654
- min-height: 120px;
1655
- }
1656
-
1657
1633
  .references-section {
1658
1634
  display: flex;
1659
1635
  flex-direction: column;
@@ -1775,7 +1751,7 @@ function removeAsset(id: string) {
1775
1751
  font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
1776
1752
  }
1777
1753
 
1778
- .evidence-bulk-toolbar select {
1754
+ .evidence-bulk-toolbar :global(.select) {
1779
1755
  border: 1px solid var(--smrt-color-outline-variant);
1780
1756
  border-radius: 0.375rem;
1781
1757
  padding: 0.25rem 0.5rem;
@@ -1953,7 +1929,7 @@ function removeAsset(id: string) {
1953
1929
  gap: 0.5rem;
1954
1930
  }
1955
1931
 
1956
- .add-reference-row input {
1932
+ .add-reference-row :global(.input) {
1957
1933
  flex: 1;
1958
1934
  }
1959
1935
 
@@ -1 +1 @@
1
- {"version":3,"file":"ContentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentEditor.svelte.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAEV,mCAAmC,EACnC,0CAA0C,EAE3C,MAAM,gCAAgC,CAAC;AAKxC,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,wBAAwB,CAAC;AAiBhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,0CAA0C,CAAC;IACrE,wBAAwB,CAAC,EAAE,mCAAmC,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAwuCD,QAAA,MAAM,aAAa;;MAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"ContentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentEditor.svelte.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAEV,mCAAmC,EACnC,0CAA0C,EAE3C,MAAM,gCAAgC,CAAC;AAKxC,OAAO,KAAK,EAEV,kBAAkB,EAEnB,MAAM,wBAAwB,CAAC;AAiBhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,uBAAuB,CAAC,EAAE,0CAA0C,CAAC;IACrE,wBAAwB,CAAC,EAAE,mCAAmC,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/D,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5B,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAivCD,QAAA,MAAM,aAAa;;MAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Form, Input, Select } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { Button } from '@happyvertical/smrt-ui/ui';
4
5
  import type {
@@ -95,81 +96,87 @@ function handleSubmit() {
95
96
  }
96
97
  </script>
97
98
 
98
- <form class="governance-editor" onsubmit={(event) => {
99
- event.preventDefault();
100
- handleSubmit();
101
- }}>
102
- <label>
103
- Label
104
- <input type="text" bind:value={draft.label} />
105
- </label>
106
- <label>
107
- {t(M['content.governance_assignment_editor.content_type'])}
108
- <input type="text" bind:value={draft.contentType} required />
109
- </label>
110
- <label>
111
- {t(M['content.governance_assignment_editor.content_variant'])}
112
- <input type="text" bind:value={draft.contentVariant} />
113
- </label>
114
- <label>
115
- {t(M['content.governance_assignment_editor.publication_profile'])}
116
- <select bind:value={draft.publicationProfileKey}>
117
- <option value="" disabled={profiles.length > 0}>{t(M['content.governance_assignment_editor.select_a_profile'])}</option>
118
- {#each profiles as profile (profile.key)}
119
- <option value={profile.key}>{profile.label}</option>
120
- {/each}
121
- </select>
122
- </label>
123
- <label>
124
- {t(M['content.governance_assignment_editor.correction_profile'])}
125
- <select bind:value={draft.correctionProfileKey}>
126
- <option value="" disabled={profiles.length > 0}>{t(M['content.governance_assignment_editor.select_a_profile'])}</option>
127
- {#each profiles as profile (profile.key)}
128
- <option value={profile.key}>{profile.label}</option>
129
- {/each}
130
- </select>
131
- </label>
132
- <label>
133
- {t(M['content.governance_assignment_editor.default_fact_relationship'])}
134
- <select bind:value={draft.defaultFactRelationship}>
135
- <option value="supports">supports</option>
136
- <option value="referenced_in">referenced_in</option>
137
- <option value="contradicts">contradicts</option>
138
- <option value="related">related</option>
139
- </select>
140
- </label>
141
-
142
- <div class="checkbox-grid">
143
- <label class="checkbox">
144
- <input type="checkbox" bind:checked={draft.enabled} />
145
- Enabled
99
+ <div class="governance-editor-shell">
100
+ <Form class="governance-editor" onsubmit={(event) => {
101
+ event.preventDefault();
102
+ handleSubmit();
103
+ }}>
104
+ <label>
105
+ Label
106
+ <Input type="text" bind:value={draft.label} />
146
107
  </label>
147
- <label class="checkbox">
148
- <input type="checkbox" bind:checked={draft.factLinkingEnabled} />
149
- {t(M['content.governance_assignment_editor.fact_linking'])}
108
+ <label>
109
+ {t(M['content.governance_assignment_editor.content_type'])}
110
+ <Input type="text" bind:value={draft.contentType} required />
150
111
  </label>
151
- <label class="checkbox">
152
- <input type="checkbox" bind:checked={draft.transparencyEnabled} />
153
- Transparency
112
+ <label>
113
+ {t(M['content.governance_assignment_editor.content_variant'])}
114
+ <Input type="text" bind:value={draft.contentVariant} />
154
115
  </label>
155
- <label class="checkbox">
156
- <input type="checkbox" bind:checked={draft.enforcePublishReadiness} />
157
- {t(M['content.governance_assignment_editor.enforce_publish_readiness'])}
116
+ <label>
117
+ {t(M['content.governance_assignment_editor.publication_profile'])}
118
+ <Select bind:value={draft.publicationProfileKey}>
119
+ <option value="" disabled={profiles.length > 0}>{t(M['content.governance_assignment_editor.select_a_profile'])}</option>
120
+ {#each profiles as profile (profile.key)}
121
+ <option value={profile.key}>{profile.label}</option>
122
+ {/each}
123
+ </Select>
158
124
  </label>
159
- </div>
160
-
161
- <div class="actions">
162
- <Button variant="primary" type="submit">{t(M['content.governance_assignment_editor.save_assignment'])}</Button>
163
- {#if onCancel}
164
- <Button variant="secondary" type="button" onclick={() => onCancel?.()}>
165
- Cancel
166
- </Button>
167
- {/if}
168
- </div>
169
- </form>
125
+ <label>
126
+ {t(M['content.governance_assignment_editor.correction_profile'])}
127
+ <Select bind:value={draft.correctionProfileKey}>
128
+ <option value="" disabled={profiles.length > 0}>{t(M['content.governance_assignment_editor.select_a_profile'])}</option>
129
+ {#each profiles as profile (profile.key)}
130
+ <option value={profile.key}>{profile.label}</option>
131
+ {/each}
132
+ </Select>
133
+ </label>
134
+ <label>
135
+ {t(M['content.governance_assignment_editor.default_fact_relationship'])}
136
+ <Select bind:value={draft.defaultFactRelationship}>
137
+ <option value="supports">supports</option>
138
+ <option value="referenced_in">referenced_in</option>
139
+ <option value="contradicts">contradicts</option>
140
+ <option value="related">related</option>
141
+ </Select>
142
+ </label>
143
+
144
+ <div class="checkbox-grid">
145
+ <label class="checkbox">
146
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
147
+ <input type="checkbox" bind:checked={draft.enabled} />
148
+ Enabled
149
+ </label>
150
+ <label class="checkbox">
151
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
152
+ <input type="checkbox" bind:checked={draft.factLinkingEnabled} />
153
+ {t(M['content.governance_assignment_editor.fact_linking'])}
154
+ </label>
155
+ <label class="checkbox">
156
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
157
+ <input type="checkbox" bind:checked={draft.transparencyEnabled} />
158
+ Transparency
159
+ </label>
160
+ <label class="checkbox">
161
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
162
+ <input type="checkbox" bind:checked={draft.enforcePublishReadiness} />
163
+ {t(M['content.governance_assignment_editor.enforce_publish_readiness'])}
164
+ </label>
165
+ </div>
166
+
167
+ <div class="actions">
168
+ <Button variant="primary" type="submit">{t(M['content.governance_assignment_editor.save_assignment'])}</Button>
169
+ {#if onCancel}
170
+ <Button variant="secondary" type="button" onclick={() => onCancel?.()}>
171
+ Cancel
172
+ </Button>
173
+ {/if}
174
+ </div>
175
+ </Form>
176
+ </div>
170
177
 
171
178
  <style>
172
- .governance-editor {
179
+ .governance-editor-shell :global(.governance-editor) {
173
180
  display: grid;
174
181
  gap: 0.75rem;
175
182
  }
@@ -180,11 +187,6 @@ function handleSubmit() {
180
187
  font-size: var(--smrt-typography-label-large-size, 0.9rem);
181
188
  }
182
189
 
183
- input,
184
- select {
185
- width: 100%;
186
- }
187
-
188
190
  .checkbox-grid,
189
191
  .actions {
190
192
  display: flex;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGovernanceAssignmentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceAssignmentEditor.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,+BAA+B,EAC/B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC1C,MAAM,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,+BAA+B,CAAC,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAsKD,QAAA,MAAM,iCAAiC,2CAAwC,CAAC;AAChF,KAAK,iCAAiC,GAAG,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC9F,eAAe,iCAAiC,CAAC"}
1
+ {"version":3,"file":"ContentGovernanceAssignmentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceAssignmentEditor.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,+BAA+B,EAC/B,4BAA4B,EAC7B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACtD,QAAQ,CAAC,EAAE,4BAA4B,EAAE,CAAC;IAC1C,MAAM,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC,+BAA+B,CAAC,KAAK,IAAI,CAAC;IACvE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA6KD,QAAA,MAAM,iCAAiC,2CAAwC,CAAC;AAChF,KAAK,iCAAiC,GAAG,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC;AAC9F,eAAe,iCAAiC,CAAC"}
@@ -1,5 +1,6 @@
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';
4
5
  import { Button } from '@happyvertical/smrt-ui/ui';
5
6
  import {
@@ -1128,6 +1129,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
1128
1129
  <details class="claim-audit-item">
1129
1130
  <summary>
1130
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) -->
1131
1133
  <input
1132
1134
  type="checkbox"
1133
1135
  checked={isClaimSelected(claim)}
@@ -1251,7 +1253,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
1251
1253
 
1252
1254
  {#if showFactCatalog}
1253
1255
  <div class="fact-search">
1254
- <input
1256
+ <Input
1255
1257
  type="text"
1256
1258
  bind:value={factQuery}
1257
1259
  placeholder={t(M['content.governance_panel.search_fact_catalog'])}
@@ -1361,13 +1363,13 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
1361
1363
  {#if reviewProfiles.length > 0}
1362
1364
  <label class="workflow-field">
1363
1365
  {t(M['content.governance_panel.review_profile'])}
1364
- <select bind:value={activeReviewProfileKey}>
1366
+ <Select bind:value={activeReviewProfileKey}>
1365
1367
  {#each reviewProfiles as profile (profile.profileKey)}
1366
1368
  <option value={profile.profileKey}>
1367
1369
  {formatProfileLabel(profile.profileKey)}
1368
1370
  </option>
1369
1371
  {/each}
1370
- </select>
1372
+ </Select>
1371
1373
  </label>
1372
1374
  {/if}
1373
1375
 
@@ -1440,23 +1442,23 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
1440
1442
  {#if availableCustomPolicies.length > 0}
1441
1443
  <label class="workflow-field">
1442
1444
  {t(M['content.governance_panel.app_review_policy'])}
1443
- <select bind:value={activeCustomPolicyKey}>
1445
+ <Select bind:value={activeCustomPolicyKey}>
1444
1446
  {#each availableCustomPolicies as policy (policy.key)}
1445
1447
  <option value={policy.key}>
1446
1448
  {policy.label}
1447
1449
  </option>
1448
1450
  {/each}
1449
- </select>
1451
+ </Select>
1450
1452
  </label>
1451
1453
  {/if}
1452
1454
 
1453
1455
  <label class="workflow-field">
1454
1456
  {customReviewButtonLabel}
1455
- <textarea
1456
- rows="3"
1457
+ <Textarea
1458
+ rows={3}
1457
1459
  bind:value={customReviewText}
1458
1460
  placeholder={t(M['content.governance_panel.optional_review_instructions'])}
1459
- ></textarea>
1461
+ ></Textarea>
1460
1462
  </label>
1461
1463
  <Button
1462
1464
  variant="primary"
@@ -1666,7 +1668,7 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
1666
1668
 
1667
1669
  <label class="workflow-field">
1668
1670
  Summary
1669
- <input
1671
+ <Input
1670
1672
  type="text"
1671
1673
  bind:value={correctionSummary}
1672
1674
  placeholder={t(M['content.governance_panel.what_was_wrong'])}
@@ -1675,33 +1677,34 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
1675
1677
 
1676
1678
  <label class="workflow-field">
1677
1679
  {t(M['content.governance_panel.related_fact'])}
1678
- <select bind:value={correctionFactId}>
1680
+ <Select bind:value={correctionFactId}>
1679
1681
  <option value="">{t(M['content.governance_panel.general_correction'])}</option>
1680
1682
  {#each selectedFactsResolved as fact (fact.id)}
1681
1683
  <option value={fact.id ?? ''}>{fact.textRefined}</option>
1682
1684
  {/each}
1683
- </select>
1685
+ </Select>
1684
1686
  </label>
1685
1687
 
1686
1688
  <label class="workflow-field">
1687
1689
  {t(M['content.governance_panel.corrected_fact_text'])}
1688
- <textarea
1689
- rows="4"
1690
+ <Textarea
1691
+ rows={4}
1690
1692
  bind:value={correctedFactText}
1691
1693
  placeholder={t(M['content.governance_panel.provide_corrected_wording'])}
1692
- ></textarea>
1694
+ ></Textarea>
1693
1695
  </label>
1694
1696
 
1695
1697
  <label class="workflow-field">
1696
1698
  {t(M['content.governance_panel.public_note'])}
1697
- <textarea
1698
- rows="3"
1699
+ <Textarea
1700
+ rows={3}
1699
1701
  bind:value={correctionPublicNote}
1700
1702
  placeholder={t(M['content.governance_panel.optional_public_correction_note'])}
1701
- ></textarea>
1703
+ ></Textarea>
1702
1704
  </label>
1703
1705
 
1704
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) -->
1705
1708
  <input type="checkbox" bind:checked={publishCorrection} />
1706
1709
  {t(M['content.governance_panel.publish_immediately'])}
1707
1710
  </label>
@@ -1930,20 +1933,6 @@ function getVersionProvenanceCopy(version: ContentVersionData) {
1930
1933
  font-size: var(--smrt-typography-body-medium-size, 0.85rem);
1931
1934
  }
1932
1935
 
1933
- .fact-search input,
1934
- .workflow-field input,
1935
- .workflow-field textarea,
1936
- .workflow-field select {
1937
- width: 100%;
1938
- box-sizing: border-box;
1939
- padding: 0.75rem;
1940
- border-radius: 0.5rem;
1941
- border: 1px solid var(--smrt-color-outline);
1942
- background: var(--smrt-color-surface);
1943
- color: var(--smrt-color-on-surface);
1944
- font-family: inherit;
1945
- }
1946
-
1947
1936
  .workflow-field {
1948
1937
  display: flex;
1949
1938
  flex-direction: column;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGovernancePanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePanel.svelte.ts"],"names":[],"mappings":"AAMA,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;AAioDD,QAAA,MAAM,sBAAsB;gCA34Bc,MAAM;MA24BoB,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
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"}