@happyvertical/smrt-content 0.43.10 → 0.44.1
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/agents/content-list.md +61 -5
- package/dist/chunks/{content-corrections-BxfA3tW1.js → content-corrections-B4mPd_th.js} +6 -3
- package/dist/chunks/content-corrections-B4mPd_th.js.map +1 -0
- package/dist/chunks/content-query-D1bLBzMT.js +4092 -0
- package/dist/chunks/{content-query-4w62u5_0.js.map → content-query-D1bLBzMT.js.map} +1 -1
- package/dist/chunks/{content-reviews-BWrYEQc6.js → content-reviews-lBoqJY7Y.js} +6 -3
- package/dist/chunks/content-reviews-lBoqJY7Y.js.map +1 -0
- package/dist/chunks/{content-versions-Di3vcTgb.js → content-versions-B0OUI1ut.js} +6 -3
- package/dist/chunks/content-versions-B0OUI1ut.js.map +1 -0
- package/dist/chunks/{contents-BV8RoP_R.js → contents-CRG2Snrb.js} +2 -2
- package/dist/chunks/{contents-BV8RoP_R.js.map → contents-CRG2Snrb.js.map} +1 -1
- package/dist/content-contribution.d.ts +1 -1
- package/dist/content-contribution.d.ts.map +1 -1
- package/dist/index.js +12 -9
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +33 -6
- package/dist/server/content-list-actions.d.ts +10 -3
- package/dist/server/content-list-actions.d.ts.map +1 -1
- package/dist/server/content-list-lifecycle.d.ts +20 -0
- package/dist/server/content-list-lifecycle.d.ts.map +1 -0
- package/dist/server.d.ts +1 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +189 -25
- package/dist/server.js.map +1 -1
- package/dist/smrt-knowledge.json +17 -5
- package/dist/svelte/components/ContentAgentChat.svelte +10 -0
- package/dist/svelte/components/ContentAgentChat.svelte.d.ts +10 -0
- package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyEditor.svelte +9 -0
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts +9 -0
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyRenderer.svelte +3 -0
- package/dist/svelte/components/ContentBodyRenderer.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentBodyRenderer.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentClaimAuditTool.svelte +3 -0
- package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionForm.svelte +7 -0
- package/dist/svelte/components/ContentContributionForm.svelte.d.ts +7 -0
- package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionInbox.svelte +8 -0
- package/dist/svelte/components/ContentContributionInbox.svelte.d.ts +8 -0
- package/dist/svelte/components/ContentContributionInbox.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionPortal.svelte +5 -0
- package/dist/svelte/components/ContentContributionPortal.svelte.d.ts +5 -0
- package/dist/svelte/components/ContentContributionPortal.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionTypeManager.svelte +3 -0
- package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributorManager.svelte +3 -0
- package/dist/svelte/components/ContentContributorManager.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentCorrectionsTool.svelte +4 -0
- package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts +4 -0
- package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentEditor.svelte +16 -0
- package/dist/svelte/components/ContentEditor.svelte.d.ts +16 -0
- package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +4 -0
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts +4 -0
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceManager.svelte +3 -0
- package/dist/svelte/components/ContentGovernanceManager.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentGovernanceManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePanel.svelte +16 -0
- package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts +16 -0
- package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +3 -0
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +4 -0
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts +4 -0
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceTool.svelte +5 -0
- package/dist/svelte/components/ContentGovernanceTool.svelte.d.ts +5 -0
- package/dist/svelte/components/ContentGovernanceTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentImageBrowser.svelte +10 -0
- package/dist/svelte/components/ContentImageBrowser.svelte.d.ts +10 -0
- package/dist/svelte/components/ContentImageBrowser.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentImageChooser.svelte +4 -0
- package/dist/svelte/components/ContentImageChooser.svelte.d.ts +4 -0
- package/dist/svelte/components/ContentImageChooser.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentList.svelte +201 -22
- package/dist/svelte/components/ContentList.svelte.d.ts +13 -0
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentListLifecyclePanel.svelte +341 -0
- package/dist/svelte/components/ContentListLifecyclePanel.svelte.d.ts +17 -0
- package/dist/svelte/components/ContentListLifecyclePanel.svelte.d.ts.map +1 -0
- package/dist/svelte/components/ContentMetadataFields.svelte +2 -0
- package/dist/svelte/components/ContentMetadataFields.svelte.d.ts +2 -0
- package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReferencesPanel.svelte +3 -0
- package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReviewStatusTray.svelte +5 -0
- package/dist/svelte/components/ContentReviewStatusTray.svelte.d.ts +5 -0
- package/dist/svelte/components/ContentReviewStatusTray.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentStatusFields.svelte +2 -0
- package/dist/svelte/components/ContentStatusFields.svelte.d.ts +2 -0
- package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentTitleField.svelte +4 -0
- package/dist/svelte/components/ContentTitleField.svelte.d.ts +4 -0
- package/dist/svelte/components/ContentTitleField.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentTransparencyReport.svelte +3 -0
- package/dist/svelte/components/ContentTransparencyReport.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentTransparencyReport.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentTransparencyTool.svelte +3 -0
- package/dist/svelte/components/ContentTransparencyTool.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentTransparencyTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentVersionsTool.svelte +3 -0
- package/dist/svelte/components/ContentVersionsTool.svelte.d.ts +3 -0
- package/dist/svelte/components/ContentVersionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/GovernedContentEditor.svelte +20 -0
- package/dist/svelte/components/GovernedContentEditor.svelte.d.ts +20 -0
- package/dist/svelte/components/GovernedContentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/content-list-lifecycle.d.ts +132 -0
- package/dist/svelte/content-list-lifecycle.d.ts.map +1 -0
- package/dist/svelte/content-list-lifecycle.js +439 -0
- package/dist/svelte/i18n.contribution.d.ts +27 -0
- package/dist/svelte/i18n.contribution.d.ts.map +1 -1
- package/dist/svelte/i18n.contribution.js +27 -0
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.d.ts.map +1 -1
- package/dist/svelte/index.js +1 -0
- package/dist/svelte/routes/ContentContributionsRoute.svelte +4 -0
- package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts +4 -0
- package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentFactsRoute.svelte +5 -0
- package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts +5 -0
- package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentGovernanceRoute.svelte +4 -0
- package/dist/svelte/routes/ContentGovernanceRoute.svelte.d.ts +4 -0
- package/dist/svelte/routes/ContentGovernanceRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte +5 -0
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte.d.ts +5 -0
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/PublishedArticleRoute.svelte +3 -0
- package/dist/svelte/routes/PublishedArticleRoute.svelte.d.ts +3 -0
- package/dist/svelte/routes/PublishedArticleRoute.svelte.d.ts.map +1 -1
- package/package.json +16 -15
- package/dist/chunks/content-corrections-BxfA3tW1.js.map +0 -1
- package/dist/chunks/content-query-4w62u5_0.js +0 -4092
- package/dist/chunks/content-reviews-BWrYEQc6.js.map +0 -1
- package/dist/chunks/content-versions-Di3vcTgb.js.map +0 -1
|
@@ -0,0 +1,341 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type {
|
|
3
|
+
DataSurfaceActionResult,
|
|
4
|
+
DataSurfaceRowId,
|
|
5
|
+
} from '@happyvertical/smrt-ui/data';
|
|
6
|
+
import { Modal } from '@happyvertical/smrt-ui/feedback';
|
|
7
|
+
import { Input, Select } from '@happyvertical/smrt-ui/forms';
|
|
8
|
+
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
9
|
+
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
10
|
+
import { onDestroy, untrack } from 'svelte';
|
|
11
|
+
import {
|
|
12
|
+
type ContentListLifecycleActionId,
|
|
13
|
+
type ContentListLifecycleBinding,
|
|
14
|
+
type ContentListLifecycleSnapshot,
|
|
15
|
+
type ContentListRestoreStatus,
|
|
16
|
+
createContentListLifecycleController,
|
|
17
|
+
} from '../content-list-lifecycle.js';
|
|
18
|
+
import type { ContentListDataQueryRequest } from '../content-list-query.js';
|
|
19
|
+
import { M } from '../i18n.contribution.js';
|
|
20
|
+
|
|
21
|
+
const { t } = useI18n();
|
|
22
|
+
|
|
23
|
+
interface Props {
|
|
24
|
+
binding: ContentListLifecycleBinding;
|
|
25
|
+
mode: 'active' | 'trash';
|
|
26
|
+
selectedRowIds: DataSurfaceRowId[];
|
|
27
|
+
query?: ContentListDataQueryRequest;
|
|
28
|
+
queryFingerprint?: string;
|
|
29
|
+
exactMatchingCount?: number;
|
|
30
|
+
viewKey: string;
|
|
31
|
+
oncomplete: (result: DataSurfaceActionResult) => void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
let {
|
|
35
|
+
binding,
|
|
36
|
+
mode,
|
|
37
|
+
selectedRowIds,
|
|
38
|
+
query = undefined,
|
|
39
|
+
queryFingerprint = undefined,
|
|
40
|
+
exactMatchingCount = undefined,
|
|
41
|
+
viewKey,
|
|
42
|
+
oncomplete,
|
|
43
|
+
}: Props = $props();
|
|
44
|
+
|
|
45
|
+
const controller = createContentListLifecycleController(untrack(() => binding));
|
|
46
|
+
let snapshot = $state<ContentListLifecycleSnapshot>(controller.snapshot());
|
|
47
|
+
let lastResult = $state<ContentListLifecycleSnapshot['summary']>();
|
|
48
|
+
let dialogOpen = $state(false);
|
|
49
|
+
let countConfirmation = $state('');
|
|
50
|
+
let restoreStatus = $state<ContentListRestoreStatus>('draft');
|
|
51
|
+
let intent = $state<'selected' | 'all-matching'>('selected');
|
|
52
|
+
|
|
53
|
+
const unsubscribe = controller.subscribe((next) => {
|
|
54
|
+
snapshot = next;
|
|
55
|
+
});
|
|
56
|
+
onDestroy(unsubscribe);
|
|
57
|
+
|
|
58
|
+
$effect(() => {
|
|
59
|
+
controller.invalidate(viewKey);
|
|
60
|
+
if (snapshot.status === 'idle') {
|
|
61
|
+
dialogOpen = false;
|
|
62
|
+
countConfirmation = '';
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
const busy = $derived(
|
|
67
|
+
snapshot.status === 'previewing' ||
|
|
68
|
+
snapshot.status === 'applying' ||
|
|
69
|
+
snapshot.replayRequired === true,
|
|
70
|
+
);
|
|
71
|
+
const selectedCount = $derived(selectedRowIds.length);
|
|
72
|
+
const selectionLimit = $derived(binding.maxSelectionSize ?? 200);
|
|
73
|
+
const matchingSelectionTooLarge = $derived(
|
|
74
|
+
exactMatchingCount !== undefined && exactMatchingCount > selectionLimit,
|
|
75
|
+
);
|
|
76
|
+
const resolvedCount = $derived(snapshot.summary?.resolvedCount ?? 0);
|
|
77
|
+
const requiresTypedCount = $derived(snapshot.actionId === 'permanent-delete');
|
|
78
|
+
const confirmationValid = $derived(
|
|
79
|
+
!requiresTypedCount || countConfirmation.trim() === String(resolvedCount),
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
function selectionFor(scope: 'selected' | 'all-matching') {
|
|
83
|
+
return scope === 'selected'
|
|
84
|
+
? { scope: 'explicit-ids' as const, rowIds: [...selectedRowIds] }
|
|
85
|
+
: {
|
|
86
|
+
scope: 'all-matching' as const,
|
|
87
|
+
queryFingerprint: queryFingerprint ?? '',
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
async function begin(
|
|
92
|
+
actionId: ContentListLifecycleActionId,
|
|
93
|
+
scope: 'selected' | 'all-matching' = 'selected',
|
|
94
|
+
) {
|
|
95
|
+
intent = scope;
|
|
96
|
+
countConfirmation = '';
|
|
97
|
+
dialogOpen = true;
|
|
98
|
+
await controller.preview({
|
|
99
|
+
actionId,
|
|
100
|
+
selection: selectionFor(scope),
|
|
101
|
+
expectedCount:
|
|
102
|
+
scope === 'selected' ? selectedCount : (exactMatchingCount ?? -1),
|
|
103
|
+
...(scope === 'all-matching' && query ? { query } : {}),
|
|
104
|
+
...(actionId === 'restore' ? { restoreStatus } : {}),
|
|
105
|
+
viewKey,
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
async function apply() {
|
|
110
|
+
const next = await controller.apply(resolvedCount);
|
|
111
|
+
if (next.status !== 'succeeded' || !next.result) return;
|
|
112
|
+
lastResult = next.summary;
|
|
113
|
+
oncomplete(next.result);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function close() {
|
|
117
|
+
if (busy) return;
|
|
118
|
+
dialogOpen = false;
|
|
119
|
+
controller.reset();
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function retryPreview() {
|
|
123
|
+
if (!snapshot.actionId) return;
|
|
124
|
+
void begin(snapshot.actionId, intent);
|
|
125
|
+
}
|
|
126
|
+
</script>
|
|
127
|
+
|
|
128
|
+
<section
|
|
129
|
+
class="lifecycle"
|
|
130
|
+
aria-label={mode === 'trash'
|
|
131
|
+
? t(M['content.content_list.trash_actions'])
|
|
132
|
+
: t(M['content.content_list.lifecycle_actions'])}
|
|
133
|
+
>
|
|
134
|
+
{#if mode === 'active'}
|
|
135
|
+
<Button
|
|
136
|
+
variant="ghost"
|
|
137
|
+
size="sm"
|
|
138
|
+
type="button"
|
|
139
|
+
disabled={selectedCount === 0 || busy}
|
|
140
|
+
onclick={() => begin('move-to-trash')}
|
|
141
|
+
>{t(M['content.content_list.move_selected_to_trash'])}</Button>
|
|
142
|
+
{:else}
|
|
143
|
+
<Select
|
|
144
|
+
aria-label={t(M['content.content_list.restore_destination'])}
|
|
145
|
+
bind:value={restoreStatus}
|
|
146
|
+
disabled={busy || dialogOpen}
|
|
147
|
+
>
|
|
148
|
+
<option value="draft">{t(M['content.content_list.restore_as_draft'])}</option>
|
|
149
|
+
<option value="review">{t(M['content.content_list.restore_for_review'])}</option>
|
|
150
|
+
<option value="published">{t(M['content.content_list.restore_and_publish'])}</option>
|
|
151
|
+
</Select>
|
|
152
|
+
<Button
|
|
153
|
+
variant="ghost"
|
|
154
|
+
size="sm"
|
|
155
|
+
type="button"
|
|
156
|
+
disabled={selectedCount === 0 || busy}
|
|
157
|
+
onclick={() => begin('restore')}
|
|
158
|
+
>{t(M['content.content_list.restore_selected'])}</Button>
|
|
159
|
+
<Button
|
|
160
|
+
variant="ghost"
|
|
161
|
+
size="sm"
|
|
162
|
+
type="button"
|
|
163
|
+
disabled={selectedCount === 0 || busy}
|
|
164
|
+
onclick={() => begin('permanent-delete')}
|
|
165
|
+
>{t(M['content.content_list.delete_selected_permanently'])}</Button>
|
|
166
|
+
<Button
|
|
167
|
+
variant="ghost"
|
|
168
|
+
size="sm"
|
|
169
|
+
type="button"
|
|
170
|
+
disabled={exactMatchingCount === undefined || exactMatchingCount === 0 || matchingSelectionTooLarge || !query || !queryFingerprint || busy}
|
|
171
|
+
onclick={() => begin('permanent-delete', 'all-matching')}
|
|
172
|
+
>{t(M['content.content_list.empty_trash'])}</Button>
|
|
173
|
+
{/if}
|
|
174
|
+
</section>
|
|
175
|
+
{#if mode === 'trash' && matchingSelectionTooLarge}
|
|
176
|
+
<p class="selection-limit" role="status">
|
|
177
|
+
{t(M['content.content_list.empty_trash_limit'], { count: selectionLimit })}
|
|
178
|
+
</p>
|
|
179
|
+
{/if}
|
|
180
|
+
{#if lastResult}
|
|
181
|
+
<div class="lifecycle-result" aria-live="polite">
|
|
182
|
+
<p>
|
|
183
|
+
{t(M['content.content_list.lifecycle_completed_summary'], {
|
|
184
|
+
accepted: lastResult.accepted,
|
|
185
|
+
skipped: lastResult.skipped,
|
|
186
|
+
failed: lastResult.failed,
|
|
187
|
+
reference: lastResult.auditReference,
|
|
188
|
+
})}
|
|
189
|
+
</p>
|
|
190
|
+
{#if lastResult.skipped > 0 || lastResult.failed > 0}
|
|
191
|
+
<ul aria-label={t(M['content.content_list.lifecycle_exceptions'])}>
|
|
192
|
+
{#each lastResult.outcomes.filter((outcome) => outcome.status !== 'accepted') as outcome}
|
|
193
|
+
<li>{String(outcome.rowId)}: {outcome.reason ?? outcome.status}</li>
|
|
194
|
+
{/each}
|
|
195
|
+
</ul>
|
|
196
|
+
{/if}
|
|
197
|
+
</div>
|
|
198
|
+
{/if}
|
|
199
|
+
|
|
200
|
+
<Modal
|
|
201
|
+
open={dialogOpen}
|
|
202
|
+
title={snapshot.actionId === 'permanent-delete'
|
|
203
|
+
? t(M['content.content_list.permanent_delete_title'])
|
|
204
|
+
: snapshot.actionId === 'restore'
|
|
205
|
+
? t(M['content.content_list.restore_title'])
|
|
206
|
+
: t(M['content.content_list.move_to_trash_title'])}
|
|
207
|
+
size="md"
|
|
208
|
+
closeOnBackdrop={!busy}
|
|
209
|
+
closeOnEscape={!busy}
|
|
210
|
+
showClose={!busy}
|
|
211
|
+
onClose={close}
|
|
212
|
+
ariaDescribedBy="content-lifecycle-summary"
|
|
213
|
+
>
|
|
214
|
+
<div class="preview" aria-live="polite" aria-busy={busy}>
|
|
215
|
+
{#if snapshot.status === 'previewing'}
|
|
216
|
+
<p id="content-lifecycle-summary">
|
|
217
|
+
{t(M['content.content_list.lifecycle_resolving'])}
|
|
218
|
+
</p>
|
|
219
|
+
{:else if snapshot.status === 'applying'}
|
|
220
|
+
<p role="status">
|
|
221
|
+
{t(M['content.content_list.workflow_applying'])}
|
|
222
|
+
</p>
|
|
223
|
+
{#if snapshot.summary}
|
|
224
|
+
<p id="content-lifecycle-summary">
|
|
225
|
+
{t(M['content.content_list.lifecycle_resolved'], {
|
|
226
|
+
count: snapshot.summary.resolvedCount,
|
|
227
|
+
})}
|
|
228
|
+
</p>
|
|
229
|
+
{/if}
|
|
230
|
+
{:else if snapshot.summary}
|
|
231
|
+
<p id="content-lifecycle-summary">
|
|
232
|
+
{t(M['content.content_list.lifecycle_resolved'], {
|
|
233
|
+
count: snapshot.summary.resolvedCount,
|
|
234
|
+
})}
|
|
235
|
+
</p>
|
|
236
|
+
{#if snapshot.summary.representativeLabels.length > 0}
|
|
237
|
+
<p>{t(M['content.content_list.lifecycle_examples'], {
|
|
238
|
+
examples: snapshot.summary.representativeLabels.join(', '),
|
|
239
|
+
})}</p>
|
|
240
|
+
{/if}
|
|
241
|
+
<p>
|
|
242
|
+
{t(M['content.content_list.lifecycle_eligibility'], {
|
|
243
|
+
accepted: snapshot.summary.accepted,
|
|
244
|
+
skipped: snapshot.summary.skipped,
|
|
245
|
+
failed: snapshot.summary.failed,
|
|
246
|
+
})}
|
|
247
|
+
</p>
|
|
248
|
+
{#if snapshot.actionId === 'permanent-delete'}
|
|
249
|
+
<p>{t(M['content.content_list.permanent_delete_warning'], {
|
|
250
|
+
count: snapshot.summary.resolvedCount,
|
|
251
|
+
})}</p>
|
|
252
|
+
<Input
|
|
253
|
+
aria-label={t(M['content.content_list.permanent_delete_count_label'])}
|
|
254
|
+
inputmode="numeric"
|
|
255
|
+
autocomplete="off"
|
|
256
|
+
bind:value={countConfirmation}
|
|
257
|
+
disabled={busy || snapshot.status !== 'ready'}
|
|
258
|
+
/>
|
|
259
|
+
{/if}
|
|
260
|
+
{/if}
|
|
261
|
+
|
|
262
|
+
{#if snapshot.error}
|
|
263
|
+
<p class="error" role="alert">{snapshot.error}</p>
|
|
264
|
+
{/if}
|
|
265
|
+
{#if snapshot.status === 'succeeded' && snapshot.summary}
|
|
266
|
+
<p role="status">
|
|
267
|
+
{t(M['content.content_list.lifecycle_completed_audit'], {
|
|
268
|
+
reference: snapshot.summary.auditReference,
|
|
269
|
+
})}
|
|
270
|
+
</p>
|
|
271
|
+
{#if snapshot.summary.skipped > 0 || snapshot.summary.failed > 0}
|
|
272
|
+
<ul aria-label={t(M['content.content_list.lifecycle_exceptions'])}>
|
|
273
|
+
{#each snapshot.summary.outcomes.filter((outcome) => outcome.status !== 'accepted') as outcome}
|
|
274
|
+
<li>{String(outcome.rowId)}: {outcome.reason ?? outcome.status}</li>
|
|
275
|
+
{/each}
|
|
276
|
+
</ul>
|
|
277
|
+
{/if}
|
|
278
|
+
{/if}
|
|
279
|
+
|
|
280
|
+
<div class="actions">
|
|
281
|
+
<Button variant="ghost" type="button" disabled={busy} onclick={close}>
|
|
282
|
+
{snapshot.status === 'succeeded'
|
|
283
|
+
? t(M['content.content_list.lifecycle_close'])
|
|
284
|
+
: t(M['content.content_list.cancel'])}
|
|
285
|
+
</Button>
|
|
286
|
+
{#if snapshot.status === 'failed' && snapshot.renewalRequired}
|
|
287
|
+
<Button type="button" onclick={retryPreview}>
|
|
288
|
+
{t(M['content.content_list.lifecycle_renew_preview'])}
|
|
289
|
+
</Button>
|
|
290
|
+
{:else if snapshot.status === 'failed'}
|
|
291
|
+
<Button type="button" onclick={apply}>
|
|
292
|
+
{t(M['content.content_list.retry'])}
|
|
293
|
+
</Button>
|
|
294
|
+
{:else if snapshot.status === 'ready'}
|
|
295
|
+
<Button
|
|
296
|
+
type="button"
|
|
297
|
+
disabled={!confirmationValid || resolvedCount === 0}
|
|
298
|
+
onclick={apply}
|
|
299
|
+
>{t(M['content.content_list.lifecycle_confirm_count'], {
|
|
300
|
+
count: resolvedCount,
|
|
301
|
+
})}</Button>
|
|
302
|
+
{/if}
|
|
303
|
+
</div>
|
|
304
|
+
</div>
|
|
305
|
+
</Modal>
|
|
306
|
+
|
|
307
|
+
<style>
|
|
308
|
+
.lifecycle,
|
|
309
|
+
.actions {
|
|
310
|
+
display: flex;
|
|
311
|
+
align-items: center;
|
|
312
|
+
flex-wrap: wrap;
|
|
313
|
+
gap: 0.5rem;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.preview {
|
|
317
|
+
display: grid;
|
|
318
|
+
gap: 0.75rem;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
.preview p {
|
|
322
|
+
margin: 0;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
.lifecycle-result p {
|
|
326
|
+
margin: 0.5rem 0 0;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.selection-limit {
|
|
330
|
+
margin: 0.5rem 0 0;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.actions {
|
|
334
|
+
justify-content: flex-end;
|
|
335
|
+
margin-top: 0.5rem;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.error {
|
|
339
|
+
color: var(--smrt-color-error, #b3261e);
|
|
340
|
+
}
|
|
341
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { DataSurfaceActionResult, DataSurfaceRowId } from '@happyvertical/smrt-ui/data';
|
|
2
|
+
import { type ContentListLifecycleBinding } from '../content-list-lifecycle.js';
|
|
3
|
+
import type { ContentListDataQueryRequest } from '../content-list-query.js';
|
|
4
|
+
interface Props {
|
|
5
|
+
binding: ContentListLifecycleBinding;
|
|
6
|
+
mode: 'active' | 'trash';
|
|
7
|
+
selectedRowIds: DataSurfaceRowId[];
|
|
8
|
+
query?: ContentListDataQueryRequest;
|
|
9
|
+
queryFingerprint?: string;
|
|
10
|
+
exactMatchingCount?: number;
|
|
11
|
+
viewKey: string;
|
|
12
|
+
oncomplete: (result: DataSurfaceActionResult) => void;
|
|
13
|
+
}
|
|
14
|
+
declare const ContentListLifecyclePanel: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type ContentListLifecyclePanel = ReturnType<typeof ContentListLifecyclePanel>;
|
|
16
|
+
export default ContentListLifecyclePanel;
|
|
17
|
+
//# sourceMappingURL=ContentListLifecyclePanel.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ContentListLifecyclePanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentListLifecyclePanel.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAEL,KAAK,2BAA2B,EAIjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAI5E,UAAU,KAAK;IACb,OAAO,EAAE,2BAA2B,CAAC;IACrC,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;IACzB,cAAc,EAAE,gBAAgB,EAAE,CAAC;IACnC,KAAK,CAAC,EAAE,2BAA2B,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACvD;AAkPD,QAAA,MAAM,yBAAyB,2CAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
|
|
@@ -15,7 +15,9 @@ export interface ContentMetadataFieldData {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export interface Props {
|
|
18
|
+
/** Current metadata field values. */
|
|
18
19
|
data: ContentMetadataFieldData;
|
|
20
|
+
/** Invoked when the user modifies any metadata field. */
|
|
19
21
|
onChange?: (change: Record<string, unknown>) => void;
|
|
20
22
|
}
|
|
21
23
|
|
|
@@ -7,7 +7,9 @@ export interface ContentMetadataFieldData {
|
|
|
7
7
|
[key: string]: unknown;
|
|
8
8
|
}
|
|
9
9
|
export interface Props {
|
|
10
|
+
/** Current metadata field values. */
|
|
10
11
|
data: ContentMetadataFieldData;
|
|
12
|
+
/** Invoked when the user modifies any metadata field. */
|
|
11
13
|
onChange?: (change: Record<string, unknown>) => void;
|
|
12
14
|
}
|
|
13
15
|
declare const ContentMetadataFields: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentMetadataFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentMetadataFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,wBAAwB,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AA0DD,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentMetadataFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentMetadataFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,wBAAwB;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IACpB,qCAAqC;IACrC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,yDAAyD;IACzD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AA0DD,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
|
|
@@ -9,8 +9,11 @@ import { M } from '../i18n.editor.js';
|
|
|
9
9
|
const { t } = useI18n();
|
|
10
10
|
|
|
11
11
|
export interface Props {
|
|
12
|
+
/** IDs of referenced content items. */
|
|
12
13
|
referenceIds?: string[];
|
|
14
|
+
/** Resolved reference objects with metadata for display. */
|
|
13
15
|
references?: ContentEditorReference[];
|
|
16
|
+
/** Invoked when the user adds or removes a reference. */
|
|
14
17
|
onReferenceIdsChange?: (referenceIds: string[]) => void;
|
|
15
18
|
/**
|
|
16
19
|
* Optional snippet rendered inside the panel beneath the references list
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { ContentEditorReference } from '../content-editor-form';
|
|
3
3
|
export interface Props {
|
|
4
|
+
/** IDs of referenced content items. */
|
|
4
5
|
referenceIds?: string[];
|
|
6
|
+
/** Resolved reference objects with metadata for display. */
|
|
5
7
|
references?: ContentEditorReference[];
|
|
8
|
+
/** Invoked when the user adds or removes a reference. */
|
|
6
9
|
onReferenceIdsChange?: (referenceIds: string[]) => void;
|
|
7
10
|
/**
|
|
8
11
|
* Optional snippet rendered inside the panel beneath the references list
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentReferencesPanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReferencesPanel.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwHD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentReferencesPanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReferencesPanel.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,4DAA4D;IAC5D,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC,yDAAyD;IACzD,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwHD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
|
|
@@ -17,10 +17,15 @@ export interface ContentReviewStatusTrayItem {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export interface Props {
|
|
20
|
+
/** Review status items to display in the tray. */
|
|
20
21
|
items?: ContentReviewStatusTrayItem[];
|
|
22
|
+
/** ID of the currently selected status item. */
|
|
21
23
|
activeId?: string | null;
|
|
24
|
+
/** Whether the tray dropdown menu is displayed. */
|
|
22
25
|
open?: boolean;
|
|
26
|
+
/** Label text shown when the tray is collapsed. */
|
|
23
27
|
label?: string;
|
|
28
|
+
/** Invoked when the user selects a status item. */
|
|
24
29
|
onSelect?: (item: ContentReviewStatusTrayItem) => void;
|
|
25
30
|
}
|
|
26
31
|
|
|
@@ -8,10 +8,15 @@ export interface ContentReviewStatusTrayItem {
|
|
|
8
8
|
status: string;
|
|
9
9
|
}
|
|
10
10
|
export interface Props {
|
|
11
|
+
/** Review status items to display in the tray. */
|
|
11
12
|
items?: ContentReviewStatusTrayItem[];
|
|
13
|
+
/** ID of the currently selected status item. */
|
|
12
14
|
activeId?: string | null;
|
|
15
|
+
/** Whether the tray dropdown menu is displayed. */
|
|
13
16
|
open?: boolean;
|
|
17
|
+
/** Label text shown when the tray is collapsed. */
|
|
14
18
|
label?: string;
|
|
19
|
+
/** Invoked when the user selects a status item. */
|
|
15
20
|
onSelect?: (item: ContentReviewStatusTrayItem) => void;
|
|
16
21
|
}
|
|
17
22
|
declare const ContentReviewStatusTray: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentReviewStatusTray.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReviewStatusTray.svelte.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AACd,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,uBAAuB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;CACxD;AAiED,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentReviewStatusTray.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReviewStatusTray.svelte.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,uBAAuB,GAC/B,SAAS,GACT,QAAQ,GACR,SAAS,GACT,SAAS,CAAC;AACd,MAAM,MAAM,uBAAuB,GAAG,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhF,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,uBAAuB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,uBAAuB,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,KAAK;IACpB,kDAAkD;IAClD,KAAK,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACtC,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,mDAAmD;IACnD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;CACxD;AAiED,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
@@ -14,7 +14,9 @@ export interface ContentStatusFieldData {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
export interface Props {
|
|
17
|
+
/** Current status field values. */
|
|
17
18
|
data: ContentStatusFieldData;
|
|
19
|
+
/** Invoked when the user modifies any status field. */
|
|
18
20
|
onChange?: (change: Record<string, unknown>) => void;
|
|
19
21
|
}
|
|
20
22
|
|
|
@@ -6,7 +6,9 @@ export interface ContentStatusFieldData {
|
|
|
6
6
|
[key: string]: unknown;
|
|
7
7
|
}
|
|
8
8
|
export interface Props {
|
|
9
|
+
/** Current status field values. */
|
|
9
10
|
data: ContentStatusFieldData;
|
|
11
|
+
/** Invoked when the user modifies any status field. */
|
|
10
12
|
onChange?: (change: Record<string, unknown>) => void;
|
|
11
13
|
}
|
|
12
14
|
declare const ContentStatusFields: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentStatusFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentStatusFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,sBAAsB,CAAC;IAC7B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAsDD,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentStatusFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentStatusFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,KAAK;IACpB,mCAAmC;IACnC,IAAI,EAAE,sBAAsB,CAAC;IAC7B,uDAAuD;IACvD,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAsDD,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
import { Input } from '@happyvertical/smrt-ui/forms';
|
|
3
3
|
|
|
4
4
|
export interface Props {
|
|
5
|
+
/** Current title text value. */
|
|
5
6
|
value?: string;
|
|
7
|
+
/** Placeholder text shown when the field is empty. */
|
|
6
8
|
placeholder?: string;
|
|
9
|
+
/** Whether the title field must be filled before submission. */
|
|
7
10
|
required?: boolean;
|
|
11
|
+
/** Invoked when the user modifies the title text. */
|
|
8
12
|
onChange?: (value: string) => void;
|
|
9
13
|
}
|
|
10
14
|
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
export interface Props {
|
|
2
|
+
/** Current title text value. */
|
|
2
3
|
value?: string;
|
|
4
|
+
/** Placeholder text shown when the field is empty. */
|
|
3
5
|
placeholder?: string;
|
|
6
|
+
/** Whether the title field must be filled before submission. */
|
|
4
7
|
required?: boolean;
|
|
8
|
+
/** Invoked when the user modifies the title text. */
|
|
5
9
|
onChange?: (value: string) => void;
|
|
6
10
|
}
|
|
7
11
|
declare const ContentTitleField: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTitleField.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTitleField.svelte.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAqBD,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentTitleField.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTitleField.svelte.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,KAAK;IACpB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAqBD,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -6,8 +6,11 @@ import { M } from '../i18n.tools.js';
|
|
|
6
6
|
const { t } = useI18n();
|
|
7
7
|
|
|
8
8
|
export interface Props {
|
|
9
|
+
/** Transparency report data including facts and references. */
|
|
9
10
|
transparency?: ContentTransparencyData | null;
|
|
11
|
+
/** Title displayed at the top of the report. */
|
|
10
12
|
title?: string;
|
|
13
|
+
/** Message displayed when no transparency data is available. */
|
|
11
14
|
emptyCopy?: string;
|
|
12
15
|
}
|
|
13
16
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ContentTransparencyData } from '../../mock-smrt-client';
|
|
2
2
|
export interface Props {
|
|
3
|
+
/** Transparency report data including facts and references. */
|
|
3
4
|
transparency?: ContentTransparencyData | null;
|
|
5
|
+
/** Title displayed at the top of the report. */
|
|
4
6
|
title?: string;
|
|
7
|
+
/** Message displayed when no transparency data is available. */
|
|
5
8
|
emptyCopy?: string;
|
|
6
9
|
}
|
|
7
10
|
declare const ContentTransparencyReport: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTransparencyReport.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTransparencyReport.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiND,QAAA,MAAM,yBAAyB,2CAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentTransparencyReport.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTransparencyReport.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,+DAA+D;IAC/D,YAAY,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC9C,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiND,QAAA,MAAM,yBAAyB,2CAAwC,CAAC;AACxE,KAAK,yBAAyB,GAAG,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAC9E,eAAe,yBAAyB,CAAC"}
|
|
@@ -11,8 +11,11 @@ import { M } from '../i18n.tools.js';
|
|
|
11
11
|
const { t } = useI18n();
|
|
12
12
|
|
|
13
13
|
export interface Props {
|
|
14
|
+
/** Base URL for content API requests. */
|
|
14
15
|
apiBaseUrl?: string;
|
|
16
|
+
/** ID of the content item to analyze for transparency. */
|
|
15
17
|
contentId: string;
|
|
18
|
+
/** Invoked when the governance state of the content changes. */
|
|
16
19
|
onGovernanceStateChange?: (state: ContentGovernanceStateData | null) => void;
|
|
17
20
|
}
|
|
18
21
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ContentGovernanceStateData } from '../../mock-smrt-client';
|
|
2
2
|
export interface Props {
|
|
3
|
+
/** Base URL for content API requests. */
|
|
3
4
|
apiBaseUrl?: string;
|
|
5
|
+
/** ID of the content item to analyze for transparency. */
|
|
4
6
|
contentId: string;
|
|
7
|
+
/** Invoked when the governance state of the content changes. */
|
|
5
8
|
onGovernanceStateChange?: (state: ContentGovernanceStateData | null) => void;
|
|
6
9
|
}
|
|
7
10
|
declare const ContentTransparencyTool: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentTransparencyTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTransparencyTool.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,wBAAwB,CAAC;AAMhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9E;AAwND,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentTransparencyTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTransparencyTool.svelte.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,0BAA0B,EAE3B,MAAM,wBAAwB,CAAC;AAMhC,MAAM,WAAW,KAAK;IACpB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,uBAAuB,CAAC,EAAE,CAAC,KAAK,EAAE,0BAA0B,GAAG,IAAI,KAAK,IAAI,CAAC;CAC9E;AAwND,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
@@ -10,8 +10,11 @@ import { M } from '../i18n.tools.js';
|
|
|
10
10
|
const { t } = useI18n();
|
|
11
11
|
|
|
12
12
|
export interface Props {
|
|
13
|
+
/** Base URL for content API requests. */
|
|
13
14
|
apiBaseUrl?: string;
|
|
15
|
+
/** ID of the content item to retrieve versions for. */
|
|
14
16
|
contentId: string;
|
|
17
|
+
/** Invoked when the versions list changes. */
|
|
15
18
|
onVersionsChange?: (versions: ContentVersionData[]) => void;
|
|
16
19
|
}
|
|
17
20
|
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { ContentVersionData } from '../../mock-smrt-client';
|
|
2
2
|
export interface Props {
|
|
3
|
+
/** Base URL for content API requests. */
|
|
3
4
|
apiBaseUrl?: string;
|
|
5
|
+
/** ID of the content item to retrieve versions for. */
|
|
4
6
|
contentId: string;
|
|
7
|
+
/** Invoked when the versions list changes. */
|
|
5
8
|
onVersionsChange?: (versions: ContentVersionData[]) => void;
|
|
6
9
|
}
|
|
7
10
|
declare const ContentVersionsTool: import("svelte").Component<Props, {}, "">;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentVersionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentVersionsTool.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMjE,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;CAC7D;AA6ND,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ContentVersionsTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentVersionsTool.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAMjE,MAAM,WAAW,KAAK;IACpB,yCAAyC;IACzC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,kBAAkB,EAAE,KAAK,IAAI,CAAC;CAC7D;AA6ND,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
|