@happyvertical/smrt-content 0.34.4 → 0.34.6
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 +10 -19
- package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyEditor.svelte +52 -38
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentClaimAuditTool.svelte +10 -24
- package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionForm.svelte +4 -3
- package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionInbox.svelte +11 -8
- 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 +5 -4
- package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributorManager.svelte +5 -4
- package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentCorrectionsTool.svelte +4 -17
- package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentEditor.svelte +66 -60
- package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +4 -3
- 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 +44 -58
- package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +4 -3
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +8 -7
- 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 +48 -34
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReferencesPanel.svelte +14 -5
- 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/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 +6 -5
- package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentFactsRoute.svelte +4 -3
- 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,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
4
|
import type { ContentContributorData } from '../../mock-smrt-client';
|
|
4
5
|
import { M } from '../i18n.contribution.js';
|
|
5
6
|
|
|
@@ -45,7 +46,7 @@ function handleSubmit() {
|
|
|
45
46
|
<h3>Contributors</h3>
|
|
46
47
|
<p>{t(M['content.contributor_manager.intro'])}</p>
|
|
47
48
|
</div>
|
|
48
|
-
<
|
|
49
|
+
<Button variant="ghost" type="button" onclick={() => (editing = {})}>{t(M['content.contributor_manager.add_contributor'])}</Button>
|
|
49
50
|
</header>
|
|
50
51
|
|
|
51
52
|
<div class="layout">
|
|
@@ -57,9 +58,9 @@ function handleSubmit() {
|
|
|
57
58
|
<div>{contributor.trustLevel || 'standard'}</div>
|
|
58
59
|
</div>
|
|
59
60
|
<div class="actions">
|
|
60
|
-
<
|
|
61
|
+
<Button variant="secondary" type="button" onclick={() => (editing = contributor)}>Edit</Button>
|
|
61
62
|
{#if onDelete}
|
|
62
|
-
<
|
|
63
|
+
<Button variant="danger" type="button" onclick={() => onDelete?.(contributor)}>Delete</Button>
|
|
63
64
|
{/if}
|
|
64
65
|
</div>
|
|
65
66
|
</article>
|
|
@@ -91,7 +92,7 @@ function handleSubmit() {
|
|
|
91
92
|
</label>
|
|
92
93
|
|
|
93
94
|
<div class="actions">
|
|
94
|
-
<
|
|
95
|
+
<Button variant="primary" type="submit">{t(M['content.contributor_manager.save_contributor'])}</Button>
|
|
95
96
|
</div>
|
|
96
97
|
</form>
|
|
97
98
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContributorManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributorManager.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentContributorManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributorManager.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACxC,MAAM,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC,sBAAsB,CAAC,KAAK,IAAI,CAAC;IAC/D,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,sBAAsB,KAAK,IAAI,CAAC;CAC1D;AAiGD,QAAA,MAAM,yBAAyB,2CAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
4
|
import type { ContentCorrectionData, FactData } from '../../mock-smrt-client';
|
|
4
5
|
import { createClient } from '../../mock-smrt-client';
|
|
5
6
|
import { normalizeApiBaseUrl } from '../api';
|
|
@@ -212,13 +213,14 @@ async function issueCorrection() {
|
|
|
212
213
|
{t(M['content.corrections_tool.publish_immediately'])}
|
|
213
214
|
</label>
|
|
214
215
|
|
|
215
|
-
<
|
|
216
|
+
<Button
|
|
217
|
+
variant="primary"
|
|
216
218
|
type="button"
|
|
217
219
|
disabled={busy || correctionSummary.trim().length === 0}
|
|
218
220
|
onclick={() => void issueCorrection()}
|
|
219
221
|
>
|
|
220
222
|
{busy ? 'Issuing correction...' : 'Issue correction'}
|
|
221
|
-
</
|
|
223
|
+
</Button>
|
|
222
224
|
|
|
223
225
|
<div class="tool-list">
|
|
224
226
|
<div class="section-caption">{t(M['content.corrections_tool.published_history'])}</div>
|
|
@@ -271,21 +273,6 @@ async function issueCorrection() {
|
|
|
271
273
|
font-family: inherit;
|
|
272
274
|
}
|
|
273
275
|
|
|
274
|
-
button {
|
|
275
|
-
border: none;
|
|
276
|
-
border-radius: 0.5rem;
|
|
277
|
-
padding: 0.7rem 0.95rem;
|
|
278
|
-
background: var(--smrt-color-primary);
|
|
279
|
-
color: var(--smrt-color-on-primary, white);
|
|
280
|
-
cursor: pointer;
|
|
281
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
button:disabled {
|
|
285
|
-
cursor: not-allowed;
|
|
286
|
-
opacity: 0.65;
|
|
287
|
-
}
|
|
288
|
-
|
|
289
276
|
.tool-card {
|
|
290
277
|
display: flex;
|
|
291
278
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentCorrectionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentCorrectionsTool.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentCorrectionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentCorrectionsTool.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,qBAAqB,EAAY,MAAM,wBAAwB,CAAC;AAM9E,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,CAAC,WAAW,EAAE,qBAAqB,EAAE,KAAK,IAAI,CAAC;CACtE;AAqOD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import type { ImageLike } from '@happyvertical/smrt-images/svelte';
|
|
3
3
|
import { ImageUploader } from '@happyvertical/smrt-images/svelte';
|
|
4
4
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
5
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
5
6
|
import { untrack } from 'svelte';
|
|
6
7
|
import { extractBodyImages, resolveBodyFormat } from '../../body-format';
|
|
7
8
|
import type {
|
|
@@ -929,7 +930,9 @@ function removeAsset(id: string) {
|
|
|
929
930
|
{#if editorError}
|
|
930
931
|
<div class="editor-message editor-message--error" role="alert" aria-live="assertive">
|
|
931
932
|
<span>{editorError}</span>
|
|
932
|
-
<
|
|
933
|
+
<Button
|
|
934
|
+
variant="ghost"
|
|
935
|
+
size="sm"
|
|
933
936
|
type="button"
|
|
934
937
|
class="editor-message__dismiss"
|
|
935
938
|
onclick={() => {
|
|
@@ -938,7 +941,7 @@ function removeAsset(id: string) {
|
|
|
938
941
|
aria-label={t(M['content.content_editor.dismiss_message'])}
|
|
939
942
|
>
|
|
940
943
|
×
|
|
941
|
-
</
|
|
944
|
+
</Button>
|
|
942
945
|
</div>
|
|
943
946
|
{/if}
|
|
944
947
|
<div class="editor-toolbar">
|
|
@@ -974,10 +977,10 @@ function removeAsset(id: string) {
|
|
|
974
977
|
</div>
|
|
975
978
|
{#if showActions}
|
|
976
979
|
<div class="editor-toolbar-right">
|
|
977
|
-
<
|
|
978
|
-
<
|
|
980
|
+
<Button variant="primary" type="submit" class="save-button" disabled={saveDisabled}>{content ? 'Update Content' : 'Save Content'}</Button>
|
|
981
|
+
<Button variant="secondary" type="button" onclick={handleCancel}>
|
|
979
982
|
Cancel
|
|
980
|
-
</
|
|
983
|
+
</Button>
|
|
981
984
|
</div>
|
|
982
985
|
{/if}
|
|
983
986
|
</div>
|
|
@@ -1008,9 +1011,9 @@ function removeAsset(id: string) {
|
|
|
1008
1011
|
fields: lastAppliedFields.join(', '),
|
|
1009
1012
|
})}
|
|
1010
1013
|
</span>
|
|
1011
|
-
<
|
|
1014
|
+
<Button variant="ghost" size="sm" type="button" class="undo-banner__btn" onclick={undoLastApply}>
|
|
1012
1015
|
Undo{fieldUndoStack.length > 1 ? ` (${fieldUndoStack.length})` : ''}
|
|
1013
|
-
</
|
|
1016
|
+
</Button>
|
|
1014
1017
|
</div>
|
|
1015
1018
|
{/if}
|
|
1016
1019
|
|
|
@@ -1083,14 +1086,14 @@ function removeAsset(id: string) {
|
|
|
1083
1086
|
<img class="media-item-image" src={getAssetImageSource(asset)} alt={asset.name || 'Asset image'} />
|
|
1084
1087
|
<div class="media-item-overlay">
|
|
1085
1088
|
{#if assetId && assetId !== formData.thumbnailAssetId}
|
|
1086
|
-
<
|
|
1089
|
+
<Button variant="ghost" size="sm" type="button" class="btn-make-thumbnail" aria-label={t(M['content.content_editor.make_thumbnail'])} title={t(M['content.content_editor.make_thumbnail'])} onclick={() => setThumbnail(assetId)}>
|
|
1087
1090
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>
|
|
1088
|
-
</
|
|
1091
|
+
</Button>
|
|
1089
1092
|
{/if}
|
|
1090
1093
|
{#if assetId}
|
|
1091
|
-
<
|
|
1094
|
+
<Button variant="ghost" size="sm" type="button" class="btn-remove-asset" aria-label={t(M['content.content_editor.remove'])} title={t(M['content.content_editor.remove'])} onclick={() => removeAsset(assetId)}>
|
|
1092
1095
|
<svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/></svg>
|
|
1093
|
-
</
|
|
1096
|
+
</Button>
|
|
1094
1097
|
{/if}
|
|
1095
1098
|
</div>
|
|
1096
1099
|
{#if assetId === formData.thumbnailAssetId}
|
|
@@ -1103,14 +1106,14 @@ function removeAsset(id: string) {
|
|
|
1103
1106
|
<p class="no-media-text">{t(M['content.content_editor.no_images_attached'])}</p>
|
|
1104
1107
|
{/if}
|
|
1105
1108
|
{#if !showImageUploader}
|
|
1106
|
-
<
|
|
1109
|
+
<Button variant="ghost" type="button" class="add-image-btn" onclick={() => showImageUploader = true} style="margin-top: 1rem;">
|
|
1107
1110
|
<svg viewBox="0 0 24 24" width="20" height="20" stroke="currentColor" stroke-width="2" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
|
1108
1111
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
1109
1112
|
<circle cx="8.5" cy="8.5" r="1.5"></circle>
|
|
1110
1113
|
<polyline points="21 15 16 10 5 21"></polyline>
|
|
1111
1114
|
</svg>
|
|
1112
1115
|
{t(M['content.content_editor.add_image'])}
|
|
1113
|
-
</
|
|
1116
|
+
</Button>
|
|
1114
1117
|
{/if}
|
|
1115
1118
|
|
|
1116
1119
|
{#if showImageUploader}
|
|
@@ -1178,7 +1181,7 @@ function removeAsset(id: string) {
|
|
|
1178
1181
|
{#each formData.referenceIds as refId}
|
|
1179
1182
|
<div class="reference-badge">
|
|
1180
1183
|
<span class="ref-id">{refId}</span>
|
|
1181
|
-
<
|
|
1184
|
+
<Button variant="ghost" size="sm" type="button" class="remove-ref-btn" aria-label={t(M['content.content_editor.remove'])} title={t(M['content.content_editor.remove'])} onclick={() => removeReference(refId)}>×</Button>
|
|
1182
1185
|
</div>
|
|
1183
1186
|
{/each}
|
|
1184
1187
|
{#if formData.referenceIds.length === 0 && auditReferences.length === 0}
|
|
@@ -1207,20 +1210,26 @@ function removeAsset(id: string) {
|
|
|
1207
1210
|
<option value={status}>{status}</option>
|
|
1208
1211
|
{/each}
|
|
1209
1212
|
</select>
|
|
1210
|
-
<
|
|
1213
|
+
<Button
|
|
1214
|
+
variant="ghost"
|
|
1215
|
+
size="sm"
|
|
1211
1216
|
type="button"
|
|
1217
|
+
class="evidence-action-button"
|
|
1212
1218
|
disabled={selectedEvidenceCount === 0 || Boolean(evidenceBusy)}
|
|
1213
1219
|
onclick={() => void updateSelectedEvidenceStatus()}
|
|
1214
1220
|
>
|
|
1215
1221
|
Mark
|
|
1216
|
-
</
|
|
1217
|
-
<
|
|
1222
|
+
</Button>
|
|
1223
|
+
<Button
|
|
1224
|
+
variant="ghost"
|
|
1225
|
+
size="sm"
|
|
1218
1226
|
type="button"
|
|
1227
|
+
class="evidence-action-button"
|
|
1219
1228
|
disabled={selectedEvidenceCount === 0 || Boolean(evidenceBusy)}
|
|
1220
1229
|
onclick={() => void repairSelectedReferenceEvidence()}
|
|
1221
1230
|
>
|
|
1222
1231
|
{t(M['content.content_editor.repair_resources'])}
|
|
1223
|
-
</
|
|
1232
|
+
</Button>
|
|
1224
1233
|
</div>
|
|
1225
1234
|
{#each auditReferences as reference, referenceIndex (reference._auditSourceId ?? reference.id ?? reference.url ?? reference.title)}
|
|
1226
1235
|
{@const resourceClaims = getResourceClaimsForReference(reference)}
|
|
@@ -1245,13 +1254,16 @@ function removeAsset(id: string) {
|
|
|
1245
1254
|
: M['content.content_editor.evidence_claim_plural'],
|
|
1246
1255
|
),
|
|
1247
1256
|
})}</span>
|
|
1248
|
-
<
|
|
1257
|
+
<Button
|
|
1258
|
+
variant="ghost"
|
|
1259
|
+
size="sm"
|
|
1249
1260
|
type="button"
|
|
1261
|
+
class="evidence-action-button"
|
|
1250
1262
|
disabled={Boolean(evidenceBusy)}
|
|
1251
1263
|
onclick={() => void repairReferenceEvidence(reference)}
|
|
1252
1264
|
>
|
|
1253
1265
|
{evidenceBusy === `repair:${reference.id}` ? 'Repairing...' : 'Repair'}
|
|
1254
|
-
</
|
|
1266
|
+
</Button>
|
|
1255
1267
|
</div>
|
|
1256
1268
|
</div>
|
|
1257
1269
|
{#if resourceClaims.length > 0}
|
|
@@ -1311,26 +1323,31 @@ function removeAsset(id: string) {
|
|
|
1311
1323
|
{/each}
|
|
1312
1324
|
<div class="resource-claim-actions">
|
|
1313
1325
|
{#each evidenceStatuses as status}
|
|
1314
|
-
<
|
|
1326
|
+
<Button
|
|
1327
|
+
variant="ghost"
|
|
1328
|
+
size="sm"
|
|
1315
1329
|
type="button"
|
|
1330
|
+
class="evidence-action-button"
|
|
1316
1331
|
disabled={evidenceIds.length === 0 || Boolean(evidenceBusy)}
|
|
1317
1332
|
onclick={() => void updateEvidenceStatus(evidenceIds, status)}
|
|
1318
1333
|
>
|
|
1319
1334
|
{status}
|
|
1320
|
-
</
|
|
1335
|
+
</Button>
|
|
1321
1336
|
{/each}
|
|
1322
1337
|
</div>
|
|
1323
1338
|
</div>
|
|
1324
1339
|
</details>
|
|
1325
1340
|
{/each}
|
|
1326
1341
|
{#if resourceClaims.length > 6}
|
|
1327
|
-
<
|
|
1342
|
+
<Button
|
|
1343
|
+
variant="ghost"
|
|
1344
|
+
size="sm"
|
|
1328
1345
|
type="button"
|
|
1329
1346
|
class="resource-claim-more"
|
|
1330
1347
|
onclick={() => toggleReferenceClaims(reference, referenceIndex)}
|
|
1331
1348
|
>
|
|
1332
1349
|
{resourceClaimsExpanded ? 'Show fewer' : `+ ${resourceClaims.length - 6} more`}
|
|
1333
|
-
</
|
|
1350
|
+
</Button>
|
|
1334
1351
|
{/if}
|
|
1335
1352
|
</div>
|
|
1336
1353
|
{/if}
|
|
@@ -1340,7 +1357,7 @@ function removeAsset(id: string) {
|
|
|
1340
1357
|
{/if}
|
|
1341
1358
|
<div class="add-reference-row">
|
|
1342
1359
|
<input type="text" bind:value={newReferenceId} placeholder={t(M['content.content_editor.reference_id_or_url_placeholder'])} />
|
|
1343
|
-
<
|
|
1360
|
+
<Button variant="ghost" type="button" class="add-reference-button" onclick={addReference}>Add</Button>
|
|
1344
1361
|
</div>
|
|
1345
1362
|
</div>
|
|
1346
1363
|
|
|
@@ -1664,7 +1681,7 @@ function removeAsset(id: string) {
|
|
|
1664
1681
|
color: var(--smrt-color-on-surface);
|
|
1665
1682
|
}
|
|
1666
1683
|
|
|
1667
|
-
.remove-ref-btn {
|
|
1684
|
+
.reference-badge :global(.remove-ref-btn) {
|
|
1668
1685
|
background: none;
|
|
1669
1686
|
border: none;
|
|
1670
1687
|
color: var(--smrt-color-outline);
|
|
@@ -1675,7 +1692,7 @@ function removeAsset(id: string) {
|
|
|
1675
1692
|
margin-left: 0.25rem;
|
|
1676
1693
|
}
|
|
1677
1694
|
|
|
1678
|
-
.remove-ref-btn:hover {
|
|
1695
|
+
.reference-badge :global(.remove-ref-btn:hover) {
|
|
1679
1696
|
color: var(--smrt-color-error);
|
|
1680
1697
|
}
|
|
1681
1698
|
|
|
@@ -1725,9 +1742,7 @@ function removeAsset(id: string) {
|
|
|
1725
1742
|
white-space: nowrap;
|
|
1726
1743
|
}
|
|
1727
1744
|
|
|
1728
|
-
.
|
|
1729
|
-
.resource-claim-actions button,
|
|
1730
|
-
.evidence-bulk-toolbar button {
|
|
1745
|
+
.references-section :global(.evidence-action-button) {
|
|
1731
1746
|
background: var(--smrt-color-surface);
|
|
1732
1747
|
border: 1px solid var(--smrt-color-outline-variant);
|
|
1733
1748
|
border-radius: 0.375rem;
|
|
@@ -1738,9 +1753,7 @@ function removeAsset(id: string) {
|
|
|
1738
1753
|
padding: 0.25rem 0.5rem;
|
|
1739
1754
|
}
|
|
1740
1755
|
|
|
1741
|
-
.
|
|
1742
|
-
.resource-claim-actions button:disabled,
|
|
1743
|
-
.evidence-bulk-toolbar button:disabled {
|
|
1756
|
+
.references-section :global(.evidence-action-button:disabled) {
|
|
1744
1757
|
cursor: not-allowed;
|
|
1745
1758
|
opacity: 0.55;
|
|
1746
1759
|
}
|
|
@@ -1796,7 +1809,7 @@ function removeAsset(id: string) {
|
|
|
1796
1809
|
background: color-mix(in srgb, var(--smrt-color-error) 12%, transparent);
|
|
1797
1810
|
}
|
|
1798
1811
|
|
|
1799
|
-
.editor-message__dismiss {
|
|
1812
|
+
.editor-message :global(.editor-message__dismiss) {
|
|
1800
1813
|
border: none;
|
|
1801
1814
|
background: transparent;
|
|
1802
1815
|
color: inherit;
|
|
@@ -1808,18 +1821,19 @@ function removeAsset(id: string) {
|
|
|
1808
1821
|
|
|
1809
1822
|
.reference-detail-header a,
|
|
1810
1823
|
.reference-detail-header span,
|
|
1811
|
-
.resource-claim-body
|
|
1812
|
-
.resource-claim-more {
|
|
1824
|
+
.resource-claim-body {
|
|
1813
1825
|
color: var(--smrt-color-on-surface-variant);
|
|
1814
1826
|
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
1815
1827
|
}
|
|
1816
1828
|
|
|
1817
|
-
.resource-claim-more {
|
|
1829
|
+
.references-section :global(.resource-claim-more) {
|
|
1818
1830
|
align-self: flex-start;
|
|
1819
1831
|
border: 0;
|
|
1820
1832
|
background: transparent;
|
|
1821
1833
|
padding: 0;
|
|
1822
1834
|
cursor: pointer;
|
|
1835
|
+
color: var(--smrt-color-on-surface-variant);
|
|
1836
|
+
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
1823
1837
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
1824
1838
|
}
|
|
1825
1839
|
|
|
@@ -1943,7 +1957,7 @@ function removeAsset(id: string) {
|
|
|
1943
1957
|
flex: 1;
|
|
1944
1958
|
}
|
|
1945
1959
|
|
|
1946
|
-
.add-reference-row button {
|
|
1960
|
+
.add-reference-row :global(.add-reference-button) {
|
|
1947
1961
|
background: var(--smrt-color-surface);
|
|
1948
1962
|
border: 1px solid var(--smrt-color-outline);
|
|
1949
1963
|
color: var(--smrt-color-on-surface-variant);
|
|
@@ -1953,11 +1967,11 @@ function removeAsset(id: string) {
|
|
|
1953
1967
|
font-weight: var(--smrt-typography-weight-medium, 500);
|
|
1954
1968
|
}
|
|
1955
1969
|
|
|
1956
|
-
.add-reference-row button:hover {
|
|
1970
|
+
.add-reference-row :global(.add-reference-button:hover) {
|
|
1957
1971
|
background: var(--smrt-color-surface-container-low, #f1f5f9);
|
|
1958
1972
|
}
|
|
1959
1973
|
|
|
1960
|
-
.add-image-btn {
|
|
1974
|
+
.media-gallery :global(.add-image-btn) {
|
|
1961
1975
|
display: flex;
|
|
1962
1976
|
align-items: center;
|
|
1963
1977
|
gap: 0.5rem;
|
|
@@ -1970,14 +1984,14 @@ function removeAsset(id: string) {
|
|
|
1970
1984
|
cursor: pointer;
|
|
1971
1985
|
transition: all 0.2s;
|
|
1972
1986
|
}
|
|
1973
|
-
|
|
1974
|
-
.add-image-btn:hover {
|
|
1987
|
+
|
|
1988
|
+
.media-gallery :global(.add-image-btn:hover) {
|
|
1975
1989
|
border-color: var(--smrt-color-primary, #94a3b8);
|
|
1976
1990
|
color: var(--smrt-color-on-surface, #1e293b);
|
|
1977
1991
|
background: var(--smrt-color-surface-container-low, #f1f5f9);
|
|
1978
1992
|
}
|
|
1979
1993
|
|
|
1980
|
-
.save-button {
|
|
1994
|
+
.editor-toolbar-right :global(.save-button) {
|
|
1981
1995
|
background: linear-gradient(
|
|
1982
1996
|
135deg,
|
|
1983
1997
|
var(--smrt-color-primary) 0%,
|
|
@@ -1992,27 +2006,17 @@ function removeAsset(id: string) {
|
|
|
1992
2006
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
1993
2007
|
}
|
|
1994
2008
|
|
|
1995
|
-
.save-button:hover {
|
|
2009
|
+
.editor-toolbar-right :global(.save-button:hover) {
|
|
1996
2010
|
transform: translateY(-1px);
|
|
1997
2011
|
box-shadow: 0 4px 6px -1px color-mix(in srgb, var(--smrt-color-primary) 40%, transparent);
|
|
1998
2012
|
}
|
|
1999
2013
|
|
|
2000
|
-
.save-button:disabled {
|
|
2014
|
+
.editor-toolbar-right :global(.save-button:disabled) {
|
|
2001
2015
|
opacity: 0.65;
|
|
2002
2016
|
transform: none;
|
|
2003
2017
|
box-shadow: none;
|
|
2004
2018
|
}
|
|
2005
2019
|
|
|
2006
|
-
.cancel-button {
|
|
2007
|
-
background: var(--smrt-color-surface);
|
|
2008
|
-
color: var(--smrt-color-on-surface);
|
|
2009
|
-
border: 1px solid var(--smrt-color-outline-variant);
|
|
2010
|
-
padding: 0.75rem 1.25rem;
|
|
2011
|
-
border-radius: 0.5rem;
|
|
2012
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
2013
|
-
cursor: pointer;
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
2020
|
.save-notice {
|
|
2017
2021
|
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
2018
2022
|
color: var(--smrt-color-primary, #3b82f6);
|
|
@@ -2069,7 +2073,7 @@ function removeAsset(id: string) {
|
|
|
2069
2073
|
flex-shrink: 0;
|
|
2070
2074
|
}
|
|
2071
2075
|
|
|
2072
|
-
.undo-banner__btn {
|
|
2076
|
+
.undo-banner :global(.undo-banner__btn) {
|
|
2073
2077
|
background: var(--smrt-color-surface);
|
|
2074
2078
|
color: var(--smrt-color-primary);
|
|
2075
2079
|
border: 1px solid var(--smrt-color-outline);
|
|
@@ -2082,7 +2086,7 @@ function removeAsset(id: string) {
|
|
|
2082
2086
|
transition: all 0.15s ease;
|
|
2083
2087
|
}
|
|
2084
2088
|
|
|
2085
|
-
.undo-banner__btn:hover {
|
|
2089
|
+
.undo-banner :global(.undo-banner__btn:hover) {
|
|
2086
2090
|
background: var(--smrt-color-surface-variant);
|
|
2087
2091
|
border-color: var(--smrt-color-primary);
|
|
2088
2092
|
}
|
|
@@ -2138,7 +2142,8 @@ function removeAsset(id: string) {
|
|
|
2138
2142
|
opacity: 1;
|
|
2139
2143
|
}
|
|
2140
2144
|
|
|
2141
|
-
.media-item-overlay
|
|
2145
|
+
.media-item-overlay :global(.btn-make-thumbnail),
|
|
2146
|
+
.media-item-overlay :global(.btn-remove-asset) {
|
|
2142
2147
|
padding: 0.4rem;
|
|
2143
2148
|
border: none;
|
|
2144
2149
|
border-radius: 0.375rem;
|
|
@@ -2151,12 +2156,13 @@ function removeAsset(id: string) {
|
|
|
2151
2156
|
justify-content: center;
|
|
2152
2157
|
}
|
|
2153
2158
|
|
|
2154
|
-
.media-item-overlay
|
|
2159
|
+
.media-item-overlay :global(.btn-make-thumbnail:hover),
|
|
2160
|
+
.media-item-overlay :global(.btn-remove-asset:hover) {
|
|
2155
2161
|
transform: scale(1.1);
|
|
2156
2162
|
background: var(--smrt-color-surface);
|
|
2157
2163
|
}
|
|
2158
2164
|
|
|
2159
|
-
.btn-remove-asset:hover {
|
|
2165
|
+
.media-item-overlay :global(.btn-remove-asset:hover) {
|
|
2160
2166
|
background: var(--smrt-color-error-container) !important;
|
|
2161
2167
|
color: var(--smrt-color-error) !important;
|
|
2162
2168
|
border-color: var(--smrt-color-error) !important;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentEditor.svelte.ts"],"names":[],"mappings":"
|
|
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,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
4
|
import type {
|
|
4
5
|
ContentGovernanceAssignmentData,
|
|
5
6
|
ContentGovernanceProfileData,
|
|
@@ -158,11 +159,11 @@ function handleSubmit() {
|
|
|
158
159
|
</div>
|
|
159
160
|
|
|
160
161
|
<div class="actions">
|
|
161
|
-
<
|
|
162
|
+
<Button variant="primary" type="submit">{t(M['content.governance_assignment_editor.save_assignment'])}</Button>
|
|
162
163
|
{#if onCancel}
|
|
163
|
-
<
|
|
164
|
+
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
164
165
|
Cancel
|
|
165
|
-
</
|
|
166
|
+
</Button>
|
|
166
167
|
{/if}
|
|
167
168
|
</div>
|
|
168
169
|
</form>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGovernanceAssignmentEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceAssignmentEditor.svelte.ts"],"names":[],"mappings":"
|
|
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,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
3
4
|
import { onMount } from 'svelte';
|
|
4
5
|
import {
|
|
5
6
|
type ContentGovernanceAssignmentData,
|
|
@@ -141,9 +142,9 @@ function cancelEditing() {
|
|
|
141
142
|
<h3>{t(M['content.governance_manager.content_governance'])}</h3>
|
|
142
143
|
<p>{t(M['content.governance_manager.manage_governed_content'])}</p>
|
|
143
144
|
</div>
|
|
144
|
-
<
|
|
145
|
+
<Button variant="secondary" type="button" onclick={() => void loadDefinitions()}>
|
|
145
146
|
Refresh
|
|
146
|
-
</
|
|
147
|
+
</Button>
|
|
147
148
|
</div>
|
|
148
149
|
|
|
149
150
|
{#if loading}
|
|
@@ -155,12 +156,12 @@ function cancelEditing() {
|
|
|
155
156
|
<section>
|
|
156
157
|
<div class="section-header">
|
|
157
158
|
<h4>Policies</h4>
|
|
158
|
-
<
|
|
159
|
+
<Button variant="primary" type="button" onclick={() => {
|
|
159
160
|
editMode = 'policy';
|
|
160
161
|
editingPolicy = null;
|
|
161
162
|
}}>
|
|
162
163
|
{t(M['content.governance_manager.add_policy'])}
|
|
163
|
-
</
|
|
164
|
+
</Button>
|
|
164
165
|
</div>
|
|
165
166
|
{#if editMode === 'policy'}
|
|
166
167
|
{#key editingPolicy?.id ?? editingPolicy?.key ?? 'new-policy'}
|
|
@@ -179,16 +180,16 @@ function cancelEditing() {
|
|
|
179
180
|
<span>{policy.key} · {policy.kind}</span>
|
|
180
181
|
</div>
|
|
181
182
|
<div class="actions">
|
|
182
|
-
<
|
|
183
|
+
<Button variant="secondary" type="button" onclick={() => {
|
|
183
184
|
editMode = 'policy';
|
|
184
185
|
editingPolicy = policy;
|
|
185
186
|
}}>
|
|
186
187
|
Edit
|
|
187
|
-
</
|
|
188
|
+
</Button>
|
|
188
189
|
{#if definitions.persisted.policies.some((item) => item.key === policy.key)}
|
|
189
|
-
<
|
|
190
|
+
<Button variant="danger" type="button" onclick={() => void deletePolicy(policy.id)}>
|
|
190
191
|
{t(M['content.governance_manager.delete_override'])}
|
|
191
|
-
</
|
|
192
|
+
</Button>
|
|
192
193
|
{/if}
|
|
193
194
|
</div>
|
|
194
195
|
</article>
|
|
@@ -199,12 +200,12 @@ function cancelEditing() {
|
|
|
199
200
|
<section>
|
|
200
201
|
<div class="section-header">
|
|
201
202
|
<h4>Profiles</h4>
|
|
202
|
-
<
|
|
203
|
+
<Button variant="primary" type="button" onclick={() => {
|
|
203
204
|
editMode = 'profile';
|
|
204
205
|
editingProfile = null;
|
|
205
206
|
}}>
|
|
206
207
|
{t(M['content.governance_manager.add_profile'])}
|
|
207
|
-
</
|
|
208
|
+
</Button>
|
|
208
209
|
</div>
|
|
209
210
|
{#if editMode === 'profile'}
|
|
210
211
|
{#key editingProfile?.id ?? editingProfile?.key ?? 'new-profile'}
|
|
@@ -224,16 +225,16 @@ function cancelEditing() {
|
|
|
224
225
|
<span>{profile.key} · {profile.requirements.length} requirement(s)</span>
|
|
225
226
|
</div>
|
|
226
227
|
<div class="actions">
|
|
227
|
-
<
|
|
228
|
+
<Button variant="secondary" type="button" onclick={() => {
|
|
228
229
|
editMode = 'profile';
|
|
229
230
|
editingProfile = profile;
|
|
230
231
|
}}>
|
|
231
232
|
Edit
|
|
232
|
-
</
|
|
233
|
+
</Button>
|
|
233
234
|
{#if definitions.persisted.profiles.some((item) => item.key === profile.key)}
|
|
234
|
-
<
|
|
235
|
+
<Button variant="danger" type="button" onclick={() => void deleteProfile(profile.id)}>
|
|
235
236
|
{t(M['content.governance_manager.delete_override'])}
|
|
236
|
-
</
|
|
237
|
+
</Button>
|
|
237
238
|
{/if}
|
|
238
239
|
</div>
|
|
239
240
|
</article>
|
|
@@ -244,12 +245,12 @@ function cancelEditing() {
|
|
|
244
245
|
<section>
|
|
245
246
|
<div class="section-header">
|
|
246
247
|
<h4>Assignments</h4>
|
|
247
|
-
<
|
|
248
|
+
<Button variant="primary" type="button" onclick={() => {
|
|
248
249
|
editMode = 'assignment';
|
|
249
250
|
editingAssignment = null;
|
|
250
251
|
}}>
|
|
251
252
|
{t(M['content.governance_manager.add_assignment'])}
|
|
252
|
-
</
|
|
253
|
+
</Button>
|
|
253
254
|
</div>
|
|
254
255
|
{#if editMode === 'assignment'}
|
|
255
256
|
{#key editingAssignment?.id ?? editingAssignment?.key ?? 'new-assignment'}
|
|
@@ -272,16 +273,16 @@ function cancelEditing() {
|
|
|
272
273
|
</span>
|
|
273
274
|
</div>
|
|
274
275
|
<div class="actions">
|
|
275
|
-
<
|
|
276
|
+
<Button variant="secondary" type="button" onclick={() => {
|
|
276
277
|
editMode = 'assignment';
|
|
277
278
|
editingAssignment = assignment;
|
|
278
279
|
}}>
|
|
279
280
|
Edit
|
|
280
|
-
</
|
|
281
|
+
</Button>
|
|
281
282
|
{#if assignment.id}
|
|
282
|
-
<
|
|
283
|
+
<Button variant="danger" type="button" onclick={() => void deleteAssignment(assignment.id)}>
|
|
283
284
|
Delete
|
|
284
|
-
</
|
|
285
|
+
</Button>
|
|
285
286
|
{/if}
|
|
286
287
|
</div>
|
|
287
288
|
</article>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentGovernanceManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceManager.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentGovernanceManager.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceManager.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,EAEL,KAAK,gCAAgC,EAItC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,8BAA8B,CAAC;AASnF,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,8BAA8B,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAE,gCAAgC,GAAG,IAAI,KAAK,IAAI,CAAC;CAC3E;AAkRD,QAAA,MAAM,wBAAwB,2CAAwC,CAAC;AACvE,KAAK,wBAAwB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC5E,eAAe,wBAAwB,CAAC"}
|