@happyvertical/smrt-content 0.60.16 → 0.60.17
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/README.md +8 -0
- package/dist/body-format.d.ts.map +1 -1
- package/dist/body-format.js +9 -5
- package/dist/body-format.js.map +1 -1
- package/dist/chunks/{content-query-DBPoyQ2f.js → content-query-YT83-Llc.js} +4 -4
- package/dist/chunks/{content-query-DBPoyQ2f.js.map → content-query-YT83-Llc.js.map} +1 -1
- package/dist/chunks/{content-versions-CwkvR0AU.js → content-versions-DPdLvWjx.js} +2 -2
- package/dist/chunks/{content-versions-CwkvR0AU.js.map → content-versions-DPdLvWjx.js.map} +1 -1
- package/dist/chunks/{contents--XgOmNqW.js → contents-vO5U0lE9.js} +2 -2
- package/dist/chunks/{contents--XgOmNqW.js.map → contents-vO5U0lE9.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/manifest.json +1 -1
- package/dist/server.js +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/ArticleCard.svelte +39 -36
- package/dist/svelte/components/ArticleList.svelte +10 -5
- package/dist/svelte/components/ContentAgentChat.svelte +90 -82
- package/dist/svelte/components/ContentBodyEditor.svelte +246 -231
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyRenderer.svelte +76 -82
- package/dist/svelte/components/ContentClaimAuditTool.svelte +100 -112
- package/dist/svelte/components/ContentContributionForm.svelte +17 -15
- package/dist/svelte/components/ContentContributionInbox.svelte +55 -51
- package/dist/svelte/components/ContentContributionPortal.svelte +50 -48
- package/dist/svelte/components/ContentContributionTypeManager.svelte +33 -31
- package/dist/svelte/components/ContentContributorManager.svelte +29 -27
- package/dist/svelte/components/ContentCorrectionsTool.svelte +76 -79
- package/dist/svelte/components/ContentEditor.svelte +523 -527
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +19 -16
- package/dist/svelte/components/ContentGovernanceManager.svelte +33 -33
- package/dist/svelte/components/ContentGovernancePanel.svelte +336 -359
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +14 -11
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +21 -19
- package/dist/svelte/components/ContentImageBrowser.svelte +72 -68
- package/dist/svelte/components/ContentImageChooser.svelte +30 -22
- package/dist/svelte/components/ContentList.svelte +504 -488
- package/dist/svelte/components/ContentListLifecyclePanel.svelte +19 -21
- package/dist/svelte/components/ContentMetadataFields.svelte +15 -12
- package/dist/svelte/components/ContentPictureDrawer.svelte +115 -112
- package/dist/svelte/components/ContentReferencesPanel.svelte +59 -54
- package/dist/svelte/components/ContentReviewStatusTray.svelte +40 -38
- package/dist/svelte/components/ContentStatusFields.svelte +12 -9
- package/dist/svelte/components/ContentTitleField.svelte +20 -20
- package/dist/svelte/components/ContentTransparencyReport.svelte +94 -92
- package/dist/svelte/components/ContentTransparencyTool.svelte +84 -87
- package/dist/svelte/components/ContentVersionsTool.svelte +60 -63
- package/dist/svelte/components/GovernedContentEditor.svelte +36 -35
- package/dist/svelte/components/ImageThumbnail.svelte +18 -12
- package/dist/svelte/components/Markdown.svelte +58 -55
- package/dist/svelte/routes/ContentContributionsRoute.svelte +206 -209
- package/dist/svelte/routes/ContentFactsRoute.svelte +239 -252
- package/dist/svelte/routes/ContentGovernanceRoute.svelte +77 -78
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte +98 -106
- package/dist/svelte/routes/PublishedArticleRoute.svelte +81 -77
- package/package.json +24 -24
|
@@ -127,46 +127,47 @@ $effect(() => {
|
|
|
127
127
|
});
|
|
128
128
|
</script>
|
|
129
129
|
|
|
130
|
-
<section class="
|
|
131
|
-
<header class="inbox__header">
|
|
130
|
+
<section class="smrt-content-contribution-inbox__root" data-smrt-component="ContentContributionInbox">
|
|
131
|
+
<header class="smrt-content-contribution-inbox__header" data-smrt-part="header">
|
|
132
132
|
<div>
|
|
133
133
|
<h3>{t(M['content.contribution_inbox.heading'])}</h3>
|
|
134
134
|
<p>{t(M['content.contribution_inbox.intro'])}</p>
|
|
135
135
|
</div>
|
|
136
|
-
<span class="
|
|
136
|
+
<span class="smrt-content-contribution-inbox__pill" data-smrt-part="badge">{contributions.length}</span>
|
|
137
137
|
</header>
|
|
138
138
|
|
|
139
139
|
{#if contributions.length === 0}
|
|
140
|
-
<p class="
|
|
140
|
+
<p class="smrt-content-contribution-inbox__empty" data-smrt-part="empty">{emptyMessage}</p>
|
|
141
141
|
{:else}
|
|
142
|
-
<div class="inbox__layout">
|
|
143
|
-
<div class="inbox__list">
|
|
142
|
+
<div class="smrt-content-contribution-inbox__layout" data-smrt-part="body">
|
|
143
|
+
<div class="smrt-content-contribution-inbox__list" data-smrt-part="list">
|
|
144
144
|
{#each contributions as contribution (contribution.id)}
|
|
145
145
|
<!-- raw-primitive-allow: large pressable selection card wrapping a title and metadata with a selected state -->
|
|
146
146
|
<button
|
|
147
147
|
type="button"
|
|
148
|
-
class:
|
|
148
|
+
class:smrt-content-contribution-inbox__selected={selectedContribution?.id === contribution.id}
|
|
149
|
+
data-smrt-part="item"
|
|
149
150
|
onclick={() => onSelect?.(contribution)}
|
|
150
151
|
>
|
|
151
152
|
<strong>{contribution.title || contribution.contributionTypeKey || 'Untitled submission'}</strong>
|
|
152
153
|
<span>{contribution.contributorName || contribution.contributorEmail || 'Unknown contributor'}</span>
|
|
153
|
-
<span class="
|
|
154
|
+
<span class="smrt-content-contribution-inbox__pill" data-smrt-part="badge">{workflowStatus(contribution)}</span>
|
|
154
155
|
</button>
|
|
155
156
|
{/each}
|
|
156
157
|
</div>
|
|
157
158
|
|
|
158
159
|
{#if selectedContribution}
|
|
159
|
-
<article class="inbox__detail">
|
|
160
|
+
<article class="smrt-content-contribution-inbox__detail" data-smrt-part="panel">
|
|
160
161
|
<header>
|
|
161
162
|
<div>
|
|
162
163
|
<h4>{selectedContribution.title || 'Untitled submission'}</h4>
|
|
163
164
|
<p>{selectedContribution.contributorName || selectedContribution.contributorEmail || 'Unknown contributor'}</p>
|
|
164
165
|
</div>
|
|
165
|
-
<span class="
|
|
166
|
+
<span class="smrt-content-contribution-inbox__pill" data-smrt-part="badge">{workflowStatus(selectedContribution)}</span>
|
|
166
167
|
</header>
|
|
167
168
|
|
|
168
169
|
{#if selectedContribution.body}
|
|
169
|
-
<div class="
|
|
170
|
+
<div class="smrt-content-contribution-inbox__preview" data-smrt-part="panel">
|
|
170
171
|
{selectedContribution.body}
|
|
171
172
|
</div>
|
|
172
173
|
{/if}
|
|
@@ -207,9 +208,9 @@ $effect(() => {
|
|
|
207
208
|
<Textarea name="editorNote" bind:value={note} rows={4}></Textarea>
|
|
208
209
|
</label>
|
|
209
210
|
|
|
210
|
-
<div class="actions">
|
|
211
|
+
<div class="smrt-content-contribution-inbox__actions" data-smrt-part="actions">
|
|
211
212
|
{#if onApprove || workflowFormAction}
|
|
212
|
-
<label class="
|
|
213
|
+
<label class="smrt-content-contribution-inbox__inline" data-smrt-part="field">
|
|
213
214
|
{t(M['content.contribution_inbox.promote_to'])}
|
|
214
215
|
<Select name="targetStatus" bind:value={targetStatus}>
|
|
215
216
|
<option value="draft">draft</option>
|
|
@@ -260,79 +261,82 @@ $effect(() => {
|
|
|
260
261
|
|
|
261
262
|
<style>
|
|
262
263
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
263
|
-
@layer smrt.
|
|
264
|
-
.
|
|
265
|
-
.inbox__header,
|
|
266
|
-
.inbox__layout,
|
|
267
|
-
.inbox__detail,
|
|
268
|
-
.inbox__detail :global(
|
|
264
|
+
@layer smrt.structure {
|
|
265
|
+
.smrt-content-contribution-inbox__root,
|
|
266
|
+
.smrt-content-contribution-inbox__header,
|
|
267
|
+
.smrt-content-contribution-inbox__layout,
|
|
268
|
+
.smrt-content-contribution-inbox__detail,
|
|
269
|
+
.smrt-content-contribution-inbox__detail :global([data-smrt-component="Form"]) {
|
|
269
270
|
display: grid;
|
|
270
271
|
gap: 1rem;
|
|
271
272
|
}
|
|
272
|
-
|
|
273
|
-
.inbox__layout {
|
|
273
|
+
.smrt-content-contribution-inbox__layout {
|
|
274
274
|
grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
|
|
275
275
|
}
|
|
276
|
-
|
|
277
|
-
.inbox__list {
|
|
276
|
+
.smrt-content-contribution-inbox__list {
|
|
278
277
|
display: grid;
|
|
279
278
|
gap: 0.5rem;
|
|
280
279
|
}
|
|
281
|
-
|
|
282
|
-
.
|
|
283
|
-
.inbox__detail {
|
|
284
|
-
border: var(--smrt-hairline);
|
|
285
|
-
border-radius: 0.75rem;
|
|
280
|
+
.smrt-content-contribution-inbox__list button,
|
|
281
|
+
.smrt-content-contribution-inbox__detail {
|
|
286
282
|
padding: 0.85rem;
|
|
287
|
-
background: var(--smrt-color-surface);
|
|
288
283
|
}
|
|
289
|
-
|
|
290
|
-
.inbox__list button {
|
|
284
|
+
.smrt-content-contribution-inbox__list button {
|
|
291
285
|
display: grid;
|
|
292
286
|
gap: 0.35rem;
|
|
293
|
-
text-align: left;
|
|
294
287
|
}
|
|
295
|
-
|
|
296
|
-
.inbox__list button.selected {
|
|
297
|
-
border-color: var(--smrt-color-primary);
|
|
298
|
-
box-shadow: 0 0 0 1px var(--smrt-color-primary);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
.body-preview {
|
|
288
|
+
.smrt-content-contribution-inbox__preview {
|
|
302
289
|
padding: 0.85rem;
|
|
303
|
-
border-radius: 0.75rem;
|
|
304
|
-
background: var(--smrt-color-surface-container);
|
|
305
290
|
white-space: pre-wrap;
|
|
306
291
|
}
|
|
307
|
-
|
|
308
292
|
dl div {
|
|
309
293
|
display: flex;
|
|
310
294
|
justify-content: space-between;
|
|
311
295
|
gap: 1rem;
|
|
312
296
|
}
|
|
313
|
-
|
|
314
|
-
.
|
|
315
|
-
.inline {
|
|
297
|
+
.smrt-content-contribution-inbox__actions,
|
|
298
|
+
.smrt-content-contribution-inbox__inline {
|
|
316
299
|
display: flex;
|
|
317
300
|
gap: 0.75rem;
|
|
318
301
|
align-items: center;
|
|
319
302
|
flex-wrap: wrap;
|
|
320
303
|
}
|
|
321
|
-
|
|
322
|
-
.pill {
|
|
304
|
+
.smrt-content-contribution-inbox__pill {
|
|
323
305
|
display: inline-flex;
|
|
324
306
|
align-items: center;
|
|
325
307
|
justify-content: center;
|
|
326
308
|
min-width: 1.75rem;
|
|
327
309
|
padding: 0.15rem 0.5rem;
|
|
328
|
-
border-radius: var(--smrt-radius-full);
|
|
329
|
-
background: var(--smrt-color-primary-container);
|
|
330
310
|
}
|
|
331
|
-
|
|
332
311
|
@media (max-width: 720px) {
|
|
333
|
-
.inbox__layout {
|
|
312
|
+
.smrt-content-contribution-inbox__layout {
|
|
334
313
|
grid-template-columns: 1fr;
|
|
335
314
|
}
|
|
336
315
|
}
|
|
337
316
|
}
|
|
317
|
+
|
|
318
|
+
@layer smrt.theme {
|
|
319
|
+
.smrt-content-contribution-inbox__list button,
|
|
320
|
+
.smrt-content-contribution-inbox__detail {
|
|
321
|
+
border: var(--smrt-hairline);
|
|
322
|
+
border-radius: 0.75rem;
|
|
323
|
+
background: var(--smrt-color-surface);
|
|
324
|
+
}
|
|
325
|
+
.smrt-content-contribution-inbox__list button {
|
|
326
|
+
text-align: left;
|
|
327
|
+
}
|
|
328
|
+
.smrt-content-contribution-inbox__list button.smrt-content-contribution-inbox__selected {
|
|
329
|
+
border-color: var(--smrt-color-primary);
|
|
330
|
+
box-shadow: 0 0 0 1px var(--smrt-color-primary);
|
|
331
|
+
}
|
|
332
|
+
.smrt-content-contribution-inbox__preview {
|
|
333
|
+
border-radius: 0.75rem;
|
|
334
|
+
background: var(--smrt-color-surface-container);
|
|
335
|
+
}
|
|
336
|
+
.smrt-content-contribution-inbox__pill {
|
|
337
|
+
border-radius: var(--smrt-radius-full);
|
|
338
|
+
background: var(--smrt-color-primary-container);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
|
|
338
342
|
</style>
|
|
@@ -40,25 +40,26 @@ function canWithdraw(contribution: ContentContributionData) {
|
|
|
40
40
|
}
|
|
41
41
|
</script>
|
|
42
42
|
|
|
43
|
-
<section class="
|
|
44
|
-
<header class="portal__header">
|
|
43
|
+
<section class="smrt-content-contribution-portal__root" data-smrt-component="ContentContributionPortal">
|
|
44
|
+
<header class="smrt-content-contribution-portal__header" data-smrt-part="header">
|
|
45
45
|
<div>
|
|
46
46
|
<h3>{t(M['content.contribution_portal.heading'])}</h3>
|
|
47
47
|
<p>{t(M['content.contribution_portal.intro'])}</p>
|
|
48
48
|
</div>
|
|
49
|
-
<span class="
|
|
49
|
+
<span class="smrt-content-contribution-portal__pill" data-smrt-part="badge">{contributions.length}</span>
|
|
50
50
|
</header>
|
|
51
51
|
|
|
52
52
|
{#if contributions.length === 0}
|
|
53
|
-
<p class="
|
|
53
|
+
<p class="smrt-content-contribution-portal__empty" data-smrt-part="empty">{emptyMessage}</p>
|
|
54
54
|
{:else}
|
|
55
|
-
<div class="portal__layout">
|
|
56
|
-
<div class="portal__list">
|
|
55
|
+
<div class="smrt-content-contribution-portal__layout" data-smrt-part="body">
|
|
56
|
+
<div class="smrt-content-contribution-portal__list" data-smrt-part="list">
|
|
57
57
|
{#each contributions as contribution (contribution.id)}
|
|
58
58
|
<!-- raw-primitive-allow: large pressable selection card wrapping rich content (title, status) with selected state; no Button primitive owns this list-row selection pattern -->
|
|
59
59
|
<button
|
|
60
60
|
type="button"
|
|
61
|
-
class:
|
|
61
|
+
class:smrt-content-contribution-portal__selected={selectedContribution?.id === contribution.id}
|
|
62
|
+
data-smrt-part="item"
|
|
62
63
|
onclick={() => onSelect?.(contribution)}
|
|
63
64
|
>
|
|
64
65
|
<strong>{contribution.title || contribution.contributionTypeKey || 'Untitled submission'}</strong>
|
|
@@ -68,16 +69,16 @@ function canWithdraw(contribution: ContentContributionData) {
|
|
|
68
69
|
</div>
|
|
69
70
|
|
|
70
71
|
{#if selectedContribution}
|
|
71
|
-
<article class="portal__detail">
|
|
72
|
+
<article class="smrt-content-contribution-portal__detail" data-smrt-part="panel">
|
|
72
73
|
<header>
|
|
73
74
|
<h4>{selectedContribution.title || 'Untitled submission'}</h4>
|
|
74
|
-
<span class="
|
|
75
|
+
<span class="smrt-content-contribution-portal__pill" data-smrt-part="badge">{selectedContribution.status || 'submitted'}</span>
|
|
75
76
|
</header>
|
|
76
77
|
{#if selectedContribution.description}
|
|
77
78
|
<p>{selectedContribution.description}</p>
|
|
78
79
|
{/if}
|
|
79
80
|
{#if selectedContribution.editorNotes}
|
|
80
|
-
<div class="
|
|
81
|
+
<div class="smrt-content-contribution-portal__callout" data-smrt-part="status">
|
|
81
82
|
<strong>{t(M['content.contribution_portal.editor_notes'])}</strong>
|
|
82
83
|
<p>{selectedContribution.editorNotes}</p>
|
|
83
84
|
</div>
|
|
@@ -110,83 +111,84 @@ function canWithdraw(contribution: ContentContributionData) {
|
|
|
110
111
|
|
|
111
112
|
<style>
|
|
112
113
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
113
|
-
@layer smrt.
|
|
114
|
-
.
|
|
114
|
+
@layer smrt.structure {
|
|
115
|
+
.smrt-content-contribution-portal__root {
|
|
115
116
|
display: grid;
|
|
116
117
|
gap: 1rem;
|
|
117
118
|
}
|
|
118
|
-
|
|
119
|
-
.
|
|
120
|
-
.portal__layout {
|
|
119
|
+
.smrt-content-contribution-portal__header,
|
|
120
|
+
.smrt-content-contribution-portal__layout {
|
|
121
121
|
display: grid;
|
|
122
122
|
gap: 1rem;
|
|
123
123
|
}
|
|
124
|
-
|
|
125
|
-
.portal__layout {
|
|
124
|
+
.smrt-content-contribution-portal__layout {
|
|
126
125
|
grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
|
|
127
126
|
}
|
|
128
|
-
|
|
129
|
-
.portal__list {
|
|
127
|
+
.smrt-content-contribution-portal__list {
|
|
130
128
|
display: grid;
|
|
131
129
|
gap: 0.5rem;
|
|
132
130
|
}
|
|
133
|
-
|
|
134
|
-
.
|
|
135
|
-
.portal__detail {
|
|
136
|
-
border: var(--smrt-hairline);
|
|
137
|
-
border-radius: 0.75rem;
|
|
131
|
+
.smrt-content-contribution-portal__list button,
|
|
132
|
+
.smrt-content-contribution-portal__detail {
|
|
138
133
|
padding: 0.85rem;
|
|
139
|
-
background: var(--smrt-color-surface);
|
|
140
134
|
}
|
|
141
|
-
|
|
142
|
-
.portal__list button {
|
|
135
|
+
.smrt-content-contribution-portal__list button {
|
|
143
136
|
display: grid;
|
|
144
137
|
gap: 0.35rem;
|
|
145
|
-
text-align: left;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.portal__list button.selected {
|
|
149
|
-
border-color: var(--smrt-color-primary);
|
|
150
|
-
box-shadow: 0 0 0 1px var(--smrt-color-primary);
|
|
151
138
|
}
|
|
152
|
-
|
|
153
|
-
.portal__detail {
|
|
139
|
+
.smrt-content-contribution-portal__detail {
|
|
154
140
|
display: grid;
|
|
155
141
|
gap: 0.85rem;
|
|
156
142
|
}
|
|
157
|
-
|
|
158
|
-
.portal__detail header,
|
|
143
|
+
.smrt-content-contribution-portal__detail header,
|
|
159
144
|
dl {
|
|
160
145
|
display: grid;
|
|
161
146
|
gap: 0.5rem;
|
|
162
147
|
}
|
|
163
|
-
|
|
164
148
|
dl div {
|
|
165
149
|
display: flex;
|
|
166
150
|
justify-content: space-between;
|
|
167
151
|
gap: 1rem;
|
|
168
152
|
}
|
|
169
|
-
|
|
170
|
-
.pill {
|
|
153
|
+
.smrt-content-contribution-portal__pill {
|
|
171
154
|
display: inline-flex;
|
|
172
155
|
align-items: center;
|
|
173
156
|
justify-content: center;
|
|
174
157
|
min-width: 1.75rem;
|
|
175
158
|
padding: 0.15rem 0.5rem;
|
|
176
|
-
border-radius: var(--smrt-radius-full);
|
|
177
|
-
background: var(--smrt-color-primary-container);
|
|
178
159
|
}
|
|
179
|
-
|
|
180
|
-
.callout {
|
|
160
|
+
.smrt-content-contribution-portal__callout {
|
|
181
161
|
padding: 0.75rem;
|
|
182
|
-
border-radius: 0.75rem;
|
|
183
|
-
background: var(--smrt-color-surface-container);
|
|
184
162
|
}
|
|
185
|
-
|
|
186
163
|
@media (max-width: 720px) {
|
|
187
|
-
.portal__layout {
|
|
164
|
+
.smrt-content-contribution-portal__layout {
|
|
188
165
|
grid-template-columns: 1fr;
|
|
189
166
|
}
|
|
190
167
|
}
|
|
191
168
|
}
|
|
169
|
+
|
|
170
|
+
@layer smrt.theme {
|
|
171
|
+
.smrt-content-contribution-portal__list button,
|
|
172
|
+
.smrt-content-contribution-portal__detail {
|
|
173
|
+
border: var(--smrt-hairline);
|
|
174
|
+
border-radius: 0.75rem;
|
|
175
|
+
background: var(--smrt-color-surface);
|
|
176
|
+
}
|
|
177
|
+
.smrt-content-contribution-portal__list button {
|
|
178
|
+
text-align: left;
|
|
179
|
+
}
|
|
180
|
+
.smrt-content-contribution-portal__list button.smrt-content-contribution-portal__selected {
|
|
181
|
+
border-color: var(--smrt-color-primary);
|
|
182
|
+
box-shadow: 0 0 0 1px var(--smrt-color-primary);
|
|
183
|
+
}
|
|
184
|
+
.smrt-content-contribution-portal__pill {
|
|
185
|
+
border-radius: var(--smrt-radius-full);
|
|
186
|
+
background: var(--smrt-color-primary-container);
|
|
187
|
+
}
|
|
188
|
+
.smrt-content-contribution-portal__callout {
|
|
189
|
+
border-radius: 0.75rem;
|
|
190
|
+
background: var(--smrt-color-surface-container);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
192
194
|
</style>
|
|
@@ -115,7 +115,7 @@ function handleSubmit() {
|
|
|
115
115
|
}
|
|
116
116
|
</script>
|
|
117
117
|
|
|
118
|
-
<section class="
|
|
118
|
+
<section class="smrt-content-contribution-type-manager__root" data-smrt-component="ContentContributionTypeManager">
|
|
119
119
|
<header>
|
|
120
120
|
<div>
|
|
121
121
|
<h3>{t(M['content.contribution_type_manager.heading'])}</h3>
|
|
@@ -124,15 +124,15 @@ function handleSubmit() {
|
|
|
124
124
|
<Button variant="ghost" type="button" onclick={() => (editing = {})}>{t(M['content.contribution_type_manager.add_type'])}</Button>
|
|
125
125
|
</header>
|
|
126
126
|
|
|
127
|
-
<div class="
|
|
128
|
-
<div class="list">
|
|
127
|
+
<div class="smrt-content-contribution-type-manager__layout" data-smrt-part="group">
|
|
128
|
+
<div class="smrt-content-contribution-type-manager__list" data-smrt-part="list">
|
|
129
129
|
{#each types as type (type.id ?? type.key)}
|
|
130
|
-
<article class="
|
|
130
|
+
<article class="smrt-content-contribution-type-manager__card" data-smrt-part="item">
|
|
131
131
|
<div>
|
|
132
132
|
<strong>{type.label}</strong>
|
|
133
133
|
<div>{type.key}</div>
|
|
134
134
|
</div>
|
|
135
|
-
<div class="actions">
|
|
135
|
+
<div class="smrt-content-contribution-type-manager__actions" data-smrt-part="actions">
|
|
136
136
|
<Button variant="secondary" type="button" onclick={() => (editing = type)}>Edit</Button>
|
|
137
137
|
{#if onDelete && type.id}
|
|
138
138
|
<Button variant="danger" type="button" onclick={() => onDelete?.(type)}>Delete</Button>
|
|
@@ -142,7 +142,7 @@ function handleSubmit() {
|
|
|
142
142
|
{/each}
|
|
143
143
|
</div>
|
|
144
144
|
|
|
145
|
-
<div class="
|
|
145
|
+
<div class="smrt-content-contribution-type-manager__editor-shell" data-smrt-part="panel">
|
|
146
146
|
<Form
|
|
147
147
|
class="editor"
|
|
148
148
|
onsubmit={(event) => {
|
|
@@ -159,7 +159,7 @@ function handleSubmit() {
|
|
|
159
159
|
<Input type="text" bind:value={draft.label} required />
|
|
160
160
|
</label>
|
|
161
161
|
|
|
162
|
-
<div class="
|
|
162
|
+
<div class="smrt-content-contribution-type-manager__checkbox-grid" data-smrt-part="grid">
|
|
163
163
|
<label>
|
|
164
164
|
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
165
165
|
<input type="checkbox" bind:checked={draft.enabled} /> Enabled
|
|
@@ -178,7 +178,7 @@ function handleSubmit() {
|
|
|
178
178
|
</label>
|
|
179
179
|
</div>
|
|
180
180
|
|
|
181
|
-
<div class="
|
|
181
|
+
<div class="smrt-content-contribution-type-manager__checkbox-grid" data-smrt-part="grid">
|
|
182
182
|
<label>
|
|
183
183
|
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
184
184
|
<input
|
|
@@ -215,7 +215,7 @@ function handleSubmit() {
|
|
|
215
215
|
</Select>
|
|
216
216
|
</label>
|
|
217
217
|
|
|
218
|
-
<div class="
|
|
218
|
+
<div class="smrt-content-contribution-type-manager__checkbox-grid" data-smrt-part="grid">
|
|
219
219
|
<label>
|
|
220
220
|
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
221
221
|
<input type="checkbox" bind:checked={draft.promotion.autoPromoteTrusted} /> {t(M['content.contribution_type_manager.auto_promote_trusted'])}
|
|
@@ -259,7 +259,7 @@ function handleSubmit() {
|
|
|
259
259
|
<Textarea bind:value={draft.intakeRules.quarantineTextPatterns} rows={2}></Textarea>
|
|
260
260
|
</label>
|
|
261
261
|
|
|
262
|
-
<div class="actions">
|
|
262
|
+
<div class="smrt-content-contribution-type-manager__actions" data-smrt-part="actions">
|
|
263
263
|
<Button variant="primary" type="submit">{t(M['content.contribution_type_manager.save_type'])}</Button>
|
|
264
264
|
</div>
|
|
265
265
|
</Form>
|
|
@@ -269,46 +269,48 @@ function handleSubmit() {
|
|
|
269
269
|
|
|
270
270
|
<style>
|
|
271
271
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
272
|
-
@layer smrt.
|
|
273
|
-
.
|
|
274
|
-
.
|
|
275
|
-
.
|
|
276
|
-
.
|
|
272
|
+
@layer smrt.structure {
|
|
273
|
+
.smrt-content-contribution-type-manager__root,
|
|
274
|
+
.smrt-content-contribution-type-manager__layout,
|
|
275
|
+
.smrt-content-contribution-type-manager__list,
|
|
276
|
+
.smrt-content-contribution-type-manager__editor-shell :global(.editor) {
|
|
277
277
|
display: grid;
|
|
278
278
|
gap: 1rem;
|
|
279
279
|
}
|
|
280
|
-
|
|
281
|
-
.layout {
|
|
280
|
+
.smrt-content-contribution-type-manager__layout {
|
|
282
281
|
grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
|
|
283
282
|
}
|
|
284
|
-
|
|
285
|
-
.
|
|
286
|
-
.editor-shell :global(.editor) {
|
|
287
|
-
border: var(--smrt-hairline);
|
|
288
|
-
border-radius: 0.75rem;
|
|
283
|
+
.smrt-content-contribution-type-manager__card,
|
|
284
|
+
.smrt-content-contribution-type-manager__editor-shell :global(.editor) {
|
|
289
285
|
padding: 0.9rem;
|
|
290
|
-
background: var(--smrt-color-surface);
|
|
291
286
|
}
|
|
292
|
-
|
|
293
|
-
.
|
|
294
|
-
.
|
|
295
|
-
.checkbox-grid,
|
|
287
|
+
.smrt-content-contribution-type-manager__card,
|
|
288
|
+
.smrt-content-contribution-type-manager__actions,
|
|
289
|
+
.smrt-content-contribution-type-manager__checkbox-grid,
|
|
296
290
|
header {
|
|
297
291
|
display: flex;
|
|
298
292
|
justify-content: space-between;
|
|
299
293
|
gap: 0.75rem;
|
|
300
294
|
flex-wrap: wrap;
|
|
301
295
|
}
|
|
302
|
-
|
|
303
|
-
.editor-shell label {
|
|
296
|
+
.smrt-content-contribution-type-manager__editor-shell label {
|
|
304
297
|
display: grid;
|
|
305
298
|
gap: 0.35rem;
|
|
306
299
|
}
|
|
307
|
-
|
|
308
300
|
@media (max-width: 720px) {
|
|
309
|
-
.
|
|
301
|
+
.smrt-content-contribution-type-manager__layout {
|
|
310
302
|
grid-template-columns: 1fr;
|
|
311
303
|
}
|
|
312
304
|
}
|
|
313
305
|
}
|
|
306
|
+
|
|
307
|
+
@layer smrt.theme {
|
|
308
|
+
.smrt-content-contribution-type-manager__card,
|
|
309
|
+
.smrt-content-contribution-type-manager__editor-shell :global(.editor) {
|
|
310
|
+
border: var(--smrt-hairline);
|
|
311
|
+
border-radius: 0.75rem;
|
|
312
|
+
background: var(--smrt-color-surface);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
314
316
|
</style>
|
|
@@ -44,7 +44,7 @@ function handleSubmit() {
|
|
|
44
44
|
}
|
|
45
45
|
</script>
|
|
46
46
|
|
|
47
|
-
<section class="
|
|
47
|
+
<section class="smrt-content-contributor-manager__root" data-smrt-component="ContentContributorManager">
|
|
48
48
|
<header>
|
|
49
49
|
<div>
|
|
50
50
|
<h3>Contributors</h3>
|
|
@@ -53,15 +53,15 @@ function handleSubmit() {
|
|
|
53
53
|
<Button variant="ghost" type="button" onclick={() => (editing = {})}>{t(M['content.contributor_manager.add_contributor'])}</Button>
|
|
54
54
|
</header>
|
|
55
55
|
|
|
56
|
-
<div class="
|
|
57
|
-
<div class="list">
|
|
56
|
+
<div class="smrt-content-contributor-manager__layout" data-smrt-part="group">
|
|
57
|
+
<div class="smrt-content-contributor-manager__list" data-smrt-part="list">
|
|
58
58
|
{#each contributors as contributor (contributor.id ?? contributor.email)}
|
|
59
|
-
<article class="
|
|
59
|
+
<article class="smrt-content-contributor-manager__card" data-smrt-part="item">
|
|
60
60
|
<div>
|
|
61
61
|
<strong>{contributor.name || contributor.email}</strong>
|
|
62
62
|
<div>{contributor.trustLevel || 'standard'}</div>
|
|
63
63
|
</div>
|
|
64
|
-
<div class="actions">
|
|
64
|
+
<div class="smrt-content-contributor-manager__actions" data-smrt-part="actions">
|
|
65
65
|
<Button variant="secondary" type="button" onclick={() => (editing = contributor)}>Edit</Button>
|
|
66
66
|
{#if onDelete}
|
|
67
67
|
<Button variant="danger" type="button" onclick={() => onDelete?.(contributor)}>Delete</Button>
|
|
@@ -71,7 +71,7 @@ function handleSubmit() {
|
|
|
71
71
|
{/each}
|
|
72
72
|
</div>
|
|
73
73
|
|
|
74
|
-
<div class="
|
|
74
|
+
<div class="smrt-content-contributor-manager__editor-shell" data-smrt-part="panel">
|
|
75
75
|
<Form
|
|
76
76
|
class="editor"
|
|
77
77
|
onsubmit={(event) => {
|
|
@@ -96,7 +96,7 @@ function handleSubmit() {
|
|
|
96
96
|
</Select>
|
|
97
97
|
</label>
|
|
98
98
|
|
|
99
|
-
<div class="actions">
|
|
99
|
+
<div class="smrt-content-contributor-manager__actions" data-smrt-part="actions">
|
|
100
100
|
<Button variant="primary" type="submit">{t(M['content.contributor_manager.save_contributor'])}</Button>
|
|
101
101
|
</div>
|
|
102
102
|
</Form>
|
|
@@ -106,45 +106,47 @@ function handleSubmit() {
|
|
|
106
106
|
|
|
107
107
|
<style>
|
|
108
108
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
109
|
-
@layer smrt.
|
|
110
|
-
.
|
|
111
|
-
.
|
|
112
|
-
.
|
|
113
|
-
.
|
|
109
|
+
@layer smrt.structure {
|
|
110
|
+
.smrt-content-contributor-manager__root,
|
|
111
|
+
.smrt-content-contributor-manager__layout,
|
|
112
|
+
.smrt-content-contributor-manager__list,
|
|
113
|
+
.smrt-content-contributor-manager__editor-shell :global(.editor) {
|
|
114
114
|
display: grid;
|
|
115
115
|
gap: 1rem;
|
|
116
116
|
}
|
|
117
|
-
|
|
118
|
-
.layout {
|
|
117
|
+
.smrt-content-contributor-manager__layout {
|
|
119
118
|
grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr);
|
|
120
119
|
}
|
|
121
|
-
|
|
122
|
-
.
|
|
123
|
-
.editor-shell :global(.editor) {
|
|
124
|
-
border: var(--smrt-hairline);
|
|
125
|
-
border-radius: 0.75rem;
|
|
120
|
+
.smrt-content-contributor-manager__card,
|
|
121
|
+
.smrt-content-contributor-manager__editor-shell :global(.editor) {
|
|
126
122
|
padding: 0.9rem;
|
|
127
|
-
background: var(--smrt-color-surface);
|
|
128
123
|
}
|
|
129
|
-
|
|
130
|
-
.
|
|
131
|
-
.actions,
|
|
124
|
+
.smrt-content-contributor-manager__card,
|
|
125
|
+
.smrt-content-contributor-manager__actions,
|
|
132
126
|
header {
|
|
133
127
|
display: flex;
|
|
134
128
|
justify-content: space-between;
|
|
135
129
|
gap: 0.75rem;
|
|
136
130
|
flex-wrap: wrap;
|
|
137
131
|
}
|
|
138
|
-
|
|
139
|
-
.editor-shell label {
|
|
132
|
+
.smrt-content-contributor-manager__editor-shell label {
|
|
140
133
|
display: grid;
|
|
141
134
|
gap: 0.35rem;
|
|
142
135
|
}
|
|
143
|
-
|
|
144
136
|
@media (max-width: 720px) {
|
|
145
|
-
.
|
|
137
|
+
.smrt-content-contributor-manager__layout {
|
|
146
138
|
grid-template-columns: 1fr;
|
|
147
139
|
}
|
|
148
140
|
}
|
|
149
141
|
}
|
|
142
|
+
|
|
143
|
+
@layer smrt.theme {
|
|
144
|
+
.smrt-content-contributor-manager__card,
|
|
145
|
+
.smrt-content-contributor-manager__editor-shell :global(.editor) {
|
|
146
|
+
border: var(--smrt-hairline);
|
|
147
|
+
border-radius: 0.75rem;
|
|
148
|
+
background: var(--smrt-color-surface);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
150
152
|
</style>
|