@happyvertical/smrt-content 0.34.6 → 0.34.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +2 -2
- package/dist/smrt-knowledge.json +4 -4
- package/dist/svelte/components/ContentAgentChat.svelte +17 -16
- package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyEditor.svelte +4 -3
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentClaimAuditTool.svelte +1 -0
- package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionForm.svelte +73 -68
- package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionInbox.svelte +9 -7
- package/dist/svelte/components/ContentContributionInbox.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributionTypeManager.svelte +117 -91
- package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentContributorManager.svelte +34 -31
- package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentCorrectionsTool.svelte +11 -22
- package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentEditor.svelte +40 -64
- package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +76 -74
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePanel.svelte +20 -31
- package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +42 -44
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +66 -67
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentList.svelte +12 -18
- package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentMetadataFields.svelte +8 -23
- package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentReferencesPanel.svelte +11 -7
- package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentStatusFields.svelte +8 -19
- package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentTitleField.svelte +16 -12
- package/dist/svelte/components/ContentTitleField.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentContributionsRoute.svelte +26 -23
- package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
- package/dist/svelte/routes/ContentFactsRoute.svelte +10 -7
- package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
- package/package.json +15 -15
package/dist/manifest.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": "1.0.0",
|
|
3
|
-
"timestamp":
|
|
3
|
+
"timestamp": 1782318307223,
|
|
4
4
|
"packageName": "@happyvertical/smrt-content",
|
|
5
|
-
"packageVersion": "0.34.
|
|
5
|
+
"packageVersion": "0.34.8",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-content:ContentAsset": {
|
|
8
8
|
"name": "contentasset",
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-06-
|
|
3
|
+
"generatedAt": "2026-06-24T16:25:08.246Z",
|
|
4
4
|
"packageName": "@happyvertical/smrt-content",
|
|
5
|
-
"packageVersion": "0.34.
|
|
5
|
+
"packageVersion": "0.34.8",
|
|
6
6
|
"sourceManifestPath": "dist/manifest.json",
|
|
7
7
|
"agentDocPath": "AGENTS.md",
|
|
8
8
|
"sourceHashes": {
|
|
9
|
-
"manifest": "
|
|
10
|
-
"packageJson": "
|
|
9
|
+
"manifest": "0d6ed76b1508e6b1c7ca1cb10dcca4cb27697a7679285e805845ed11870756ae",
|
|
10
|
+
"packageJson": "a8585686629a111eeaa678dc99718adbbb0e4dc06848d5b16ac53f4efb2e30c5",
|
|
11
11
|
"agents": "d3e1fdba8cf8c8f393e682616c56fefcc789c44018407bbdf7332d5f06cfbb5c"
|
|
12
12
|
},
|
|
13
13
|
"exports": [
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
import { AgentChat } from '@happyvertical/smrt-chat/svelte';
|
|
9
|
+
import { Input, Select } from '@happyvertical/smrt-ui/forms';
|
|
9
10
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
10
11
|
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
11
12
|
import type {
|
|
@@ -432,11 +433,11 @@ async function handleSendMessage(content: string) {
|
|
|
432
433
|
</div>
|
|
433
434
|
{:else if session}
|
|
434
435
|
<div class="model-bar">
|
|
435
|
-
<
|
|
436
|
+
<Select class="smrt-select model-select" bind:value={selectedModelId}>
|
|
436
437
|
{#each availableAIModels as model}
|
|
437
438
|
<option value={model.id}>{model.label}</option>
|
|
438
439
|
{/each}
|
|
439
|
-
</
|
|
440
|
+
</Select>
|
|
440
441
|
</div>
|
|
441
442
|
|
|
442
443
|
<div class="chat-main">
|
|
@@ -465,9 +466,9 @@ async function handleSendMessage(content: string) {
|
|
|
465
466
|
<div class="topic-footer">
|
|
466
467
|
{#if showNewTopicInput}
|
|
467
468
|
<div class="new-topic-row">
|
|
468
|
-
<
|
|
469
|
-
class="new-topic-input"
|
|
470
|
-
type="text"
|
|
469
|
+
<Input
|
|
470
|
+
class="new-topic-input"
|
|
471
|
+
type="text"
|
|
471
472
|
placeholder={t(M['content.content_agent_chat.topic_name_placeholder'])}
|
|
472
473
|
bind:value={newTopicTitle}
|
|
473
474
|
onkeydown={(e: KeyboardEvent) => { if (e.key === 'Enter') { createNewTopic(); showNewTopicInput = false; } }}
|
|
@@ -478,9 +479,9 @@ async function handleSendMessage(content: string) {
|
|
|
478
479
|
<Button variant="ghost" size="sm" type="button" class="topic-action-btn topic-cancel-btn" onclick={() => { showNewTopicInput = false; }} aria-label={t(M['content.content_agent_chat.cancel'])} title={t(M['content.content_agent_chat.cancel'])}>✕</Button>
|
|
479
480
|
</div>
|
|
480
481
|
{:else}
|
|
481
|
-
<
|
|
482
|
-
class="smrt-select topic-select"
|
|
483
|
-
|
|
482
|
+
<Select
|
|
483
|
+
class="smrt-select topic-select"
|
|
484
|
+
value={activeThreadId ?? ''}
|
|
484
485
|
onchange={(e: Event) => loadThread((e.currentTarget as HTMLSelectElement).value)}
|
|
485
486
|
disabled={!threads.length}
|
|
486
487
|
>
|
|
@@ -490,7 +491,7 @@ async function handleSendMessage(content: string) {
|
|
|
490
491
|
{#each threads as thread}
|
|
491
492
|
<option value={thread.id}>{thread.title || t(M['content.content_agent_chat.untitled_topic'])}</option>
|
|
492
493
|
{/each}
|
|
493
|
-
</
|
|
494
|
+
</Select>
|
|
494
495
|
<Button variant="ghost" size="sm" type="button" class="topic-action-btn" onclick={() => { showNewTopicInput = true; newTopicTitle = ''; }} title={t(M['content.content_agent_chat.new_topic'])}>
|
|
495
496
|
<svg viewBox="0 0 24 24" width="14" height="14" stroke="currentColor" stroke-width="2.5" fill="none" stroke-linecap="round" stroke-linejoin="round"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
|
|
496
497
|
{t(M['content.content_agent_chat.new'])}
|
|
@@ -541,7 +542,7 @@ async function handleSendMessage(content: string) {
|
|
|
541
542
|
background: var(--smrt-color-surface-container-lowest, #ffffff);
|
|
542
543
|
}
|
|
543
544
|
|
|
544
|
-
.smrt-select {
|
|
545
|
+
.content-agent-chat-container :global(.smrt-select) {
|
|
545
546
|
width: 100%;
|
|
546
547
|
padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
|
|
547
548
|
border-radius: var(--smrt-radius-md, 8px);
|
|
@@ -552,15 +553,15 @@ async function handleSendMessage(content: string) {
|
|
|
552
553
|
outline: none;
|
|
553
554
|
cursor: pointer;
|
|
554
555
|
}
|
|
555
|
-
|
|
556
|
-
.smrt-select:disabled {
|
|
556
|
+
|
|
557
|
+
.content-agent-chat-container :global(.smrt-select:disabled) {
|
|
557
558
|
background: var(--smrt-color-surface-container, #f3f4f9);
|
|
558
559
|
color: var(--smrt-color-on-surface-variant, #43474e);
|
|
559
560
|
cursor: not-allowed;
|
|
560
561
|
opacity: 0.7;
|
|
561
562
|
}
|
|
562
563
|
|
|
563
|
-
.smrt-select:focus {
|
|
564
|
+
.content-agent-chat-container :global(.smrt-select:focus) {
|
|
564
565
|
background: var(--smrt-color-surface-variant, #e1e2ec);
|
|
565
566
|
}
|
|
566
567
|
|
|
@@ -589,7 +590,7 @@ async function handleSendMessage(content: string) {
|
|
|
589
590
|
background: var(--smrt-color-surface-container-lowest, #ffffff);
|
|
590
591
|
}
|
|
591
592
|
|
|
592
|
-
.topic-footer .smrt-select {
|
|
593
|
+
.topic-footer :global(.smrt-select) {
|
|
593
594
|
flex: 1;
|
|
594
595
|
}
|
|
595
596
|
|
|
@@ -626,7 +627,7 @@ async function handleSendMessage(content: string) {
|
|
|
626
627
|
width: 100%;
|
|
627
628
|
}
|
|
628
629
|
|
|
629
|
-
.new-topic-input {
|
|
630
|
+
.new-topic-row :global(.new-topic-input) {
|
|
630
631
|
flex: 1;
|
|
631
632
|
padding: var(--smrt-spacing-1, 4px) var(--smrt-spacing-2, 8px);
|
|
632
633
|
border: 1px solid var(--smrt-color-outline-variant, #c4c6d0);
|
|
@@ -637,7 +638,7 @@ async function handleSendMessage(content: string) {
|
|
|
637
638
|
color: var(--smrt-color-on-surface, #1a1c1e);
|
|
638
639
|
}
|
|
639
640
|
|
|
640
|
-
.new-topic-input:focus {
|
|
641
|
+
.new-topic-row :global(.new-topic-input:focus) {
|
|
641
642
|
border-color: var(--smrt-color-primary, #005ac1);
|
|
642
643
|
}
|
|
643
644
|
</style>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentAgentChat.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentAgentChat.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentAgentChat.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentAgentChat.svelte.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,6BAA6B,EAC7B,0CAA0C,EAC3C,MAAM,gCAAgC,CAAC;AASxC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,uBAAuB,CAAC,EAAE,0CAA0C,CAAC;IACrE,aAAa,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,IAAI,CAAC;IACzD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAodD,QAAA,MAAM,gBAAgB,2CAAwC,CAAC;AAC/D,KAAK,gBAAgB,GAAG,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAC5D,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { ImageLike } from '@happyvertical/smrt-images/svelte';
|
|
3
|
+
import { Select } from '@happyvertical/smrt-ui/forms';
|
|
3
4
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
4
5
|
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
5
6
|
import {
|
|
@@ -1026,13 +1027,13 @@ function handleEditorDragEnd() {
|
|
|
1026
1027
|
|
|
1027
1028
|
<label class="format-select">
|
|
1028
1029
|
<span>{t(M['content.content_body_editor.save_as'])}</span>
|
|
1029
|
-
<
|
|
1030
|
+
<Select
|
|
1030
1031
|
value={currentFormat}
|
|
1031
1032
|
onchange={(event) => setBodyFormat((event.currentTarget as HTMLSelectElement).value as ContentBodyFormat)}
|
|
1032
1033
|
>
|
|
1033
1034
|
<option value="html">HTML</option>
|
|
1034
1035
|
<option value="markdown">Markdown</option>
|
|
1035
|
-
</
|
|
1036
|
+
</Select>
|
|
1036
1037
|
</label>
|
|
1037
1038
|
</div>
|
|
1038
1039
|
|
|
@@ -1247,7 +1248,7 @@ function handleEditorDragEnd() {
|
|
|
1247
1248
|
color: var(--smrt-color-on-surface-variant);
|
|
1248
1249
|
}
|
|
1249
1250
|
|
|
1250
|
-
.format-select select {
|
|
1251
|
+
.format-select :global(.select) {
|
|
1251
1252
|
min-height: 2rem;
|
|
1252
1253
|
border: 1px solid var(--smrt-color-outline-variant);
|
|
1253
1254
|
border-radius: 0.45rem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentBodyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentBodyEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"ContentBodyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentBodyEditor.svelte.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mCAAmC,CAAC;AAInE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAOtB,MAAM,mBAAmB,CAAC;AAI3B,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,iBAAiB,CAAC;IAC9B,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAC5B;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACrD,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,cAAc,CAAC,EAAE,CACf,QAAQ,EAAE,SAAS,GAAG,IAAI,GAAG,MAAM,KAChC,OAAO,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;CACvC;AAwlCD,QAAA,MAAM,iBAAiB;8BArdW,GAAG;wBAIT,MAAM;MAid6B,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
|
|
@@ -245,6 +245,7 @@ async function recheckFactClaims(claimIds: string[]) {
|
|
|
245
245
|
<details class="tool-card">
|
|
246
246
|
<summary>
|
|
247
247
|
<label class="claim-audit-select">
|
|
248
|
+
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
248
249
|
<input
|
|
249
250
|
type="checkbox"
|
|
250
251
|
checked={isClaimSelected(claim)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentClaimAuditTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentClaimAuditTool.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAMhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;CAChE;
|
|
1
|
+
{"version":3,"file":"ContentClaimAuditTool.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentClaimAuditTool.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAEV,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAMhC,MAAM,WAAW,KAAK;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,GAAG,IAAI,KAAK,IAAI,CAAC;CAChE;AAgSD,QAAA,MAAM,qBAAqB;;MAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { Form, Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
|
|
2
3
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
4
|
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
4
5
|
import type {
|
|
@@ -119,83 +120,87 @@ function handleSubmit(event: SubmitEvent) {
|
|
|
119
120
|
}
|
|
120
121
|
</script>
|
|
121
122
|
|
|
122
|
-
<form
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
{t(M['content.contribution_form.contribution_type'])}
|
|
133
|
-
<select name="typeKey" bind:value={draft.typeKey} required>
|
|
134
|
-
{#each types.filter((type) => type.enabled !== false) as type (type.key)}
|
|
135
|
-
<option value={type.key}>{type.label}</option>
|
|
136
|
-
{/each}
|
|
137
|
-
</select>
|
|
138
|
-
</label>
|
|
139
|
-
|
|
140
|
-
{#if showContributorFields}
|
|
141
|
-
<div class="grid">
|
|
142
|
-
<label>
|
|
143
|
-
Email
|
|
144
|
-
<input name="contributorEmail" type="email" bind:value={draft.contributorEmail} required />
|
|
145
|
-
</label>
|
|
146
|
-
<label>
|
|
147
|
-
Name
|
|
148
|
-
<input name="contributorName" type="text" bind:value={draft.contributorName} />
|
|
149
|
-
</label>
|
|
150
|
-
</div>
|
|
151
|
-
{/if}
|
|
123
|
+
<div class="contribution-form-shell">
|
|
124
|
+
<Form
|
|
125
|
+
class="contribution-form"
|
|
126
|
+
method="post"
|
|
127
|
+
enctype="multipart/form-data"
|
|
128
|
+
{action}
|
|
129
|
+
preventDefault={false}
|
|
130
|
+
onsubmit={handleSubmit}
|
|
131
|
+
>
|
|
132
|
+
<h3>{t(M['content.contribution_form.heading'])}</h3>
|
|
152
133
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
134
|
+
<label>
|
|
135
|
+
{t(M['content.contribution_form.contribution_type'])}
|
|
136
|
+
<Select name="typeKey" bind:value={draft.typeKey} required>
|
|
137
|
+
{#each types.filter((type) => type.enabled !== false) as type (type.key)}
|
|
138
|
+
<option value={type.key}>{type.label}</option>
|
|
139
|
+
{/each}
|
|
140
|
+
</Select>
|
|
141
|
+
</label>
|
|
157
142
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
143
|
+
{#if showContributorFields}
|
|
144
|
+
<div class="grid">
|
|
145
|
+
<label>
|
|
146
|
+
Email
|
|
147
|
+
<Input name="contributorEmail" type="email" bind:value={draft.contributorEmail} required />
|
|
148
|
+
</label>
|
|
149
|
+
<label>
|
|
150
|
+
Name
|
|
151
|
+
<Input name="contributorName" type="text" bind:value={draft.contributorName} />
|
|
152
|
+
</label>
|
|
153
|
+
</div>
|
|
154
|
+
{/if}
|
|
162
155
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
156
|
+
<label>
|
|
157
|
+
Title
|
|
158
|
+
<Input name="title" type="text" bind:value={draft.title} />
|
|
159
|
+
</label>
|
|
167
160
|
|
|
168
|
-
{#if activeType?.allowFiles !== false}
|
|
169
161
|
<label>
|
|
170
|
-
|
|
171
|
-
<
|
|
172
|
-
name="files"
|
|
173
|
-
type="file"
|
|
174
|
-
multiple
|
|
175
|
-
onchange={handleFileChange}
|
|
176
|
-
/>
|
|
162
|
+
Description
|
|
163
|
+
<Textarea name="description" bind:value={draft.description} rows={2}></Textarea>
|
|
177
164
|
</label>
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
{
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
165
|
+
|
|
166
|
+
<label>
|
|
167
|
+
Body
|
|
168
|
+
<Textarea name="body" bind:value={draft.body} rows={8}></Textarea>
|
|
169
|
+
</label>
|
|
170
|
+
|
|
171
|
+
{#if activeType?.allowFiles !== false}
|
|
172
|
+
<label>
|
|
173
|
+
{t(M['content.contribution_form.attach_files'])}
|
|
174
|
+
<!-- raw-primitive-allow: native file input — the Input primitive binds value, which is invalid for type=file (throws InvalidStateError on the bind write-back) and renders a visible control; a file picker stays native -->
|
|
175
|
+
<input
|
|
176
|
+
name="files"
|
|
177
|
+
type="file"
|
|
178
|
+
multiple
|
|
179
|
+
onchange={handleFileChange}
|
|
180
|
+
/>
|
|
181
|
+
</label>
|
|
182
|
+
{#if draft.files.length > 0}
|
|
183
|
+
<div class="file-list">
|
|
184
|
+
{#each draft.files as file (file.name + file.size)}
|
|
185
|
+
<span>{file.name} ({Math.max(1, Math.round(file.size / 1024))} KB)</span>
|
|
186
|
+
{/each}
|
|
187
|
+
</div>
|
|
188
|
+
{/if}
|
|
193
189
|
{/if}
|
|
194
|
-
|
|
195
|
-
|
|
190
|
+
|
|
191
|
+
<div class="actions">
|
|
192
|
+
<Button variant="primary" type="submit">{submitLabel}</Button>
|
|
193
|
+
{#if onCancel}
|
|
194
|
+
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
195
|
+
Cancel
|
|
196
|
+
</Button>
|
|
197
|
+
{/if}
|
|
198
|
+
</div>
|
|
199
|
+
</Form>
|
|
200
|
+
</div>
|
|
196
201
|
|
|
197
202
|
<style>
|
|
198
|
-
.contribution-form {
|
|
203
|
+
.contribution-form-shell :global(.contribution-form) {
|
|
199
204
|
display: grid;
|
|
200
205
|
gap: 0.85rem;
|
|
201
206
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContributionForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionForm.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentContributionForm.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionForm.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,uBAAuB,EACvB,2BAA2B,EAC5B,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,IAAI,EAAE,CAAC;CACf;AAED,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,2BAA2B,EAAE,CAAC;IACtC,OAAO,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC3C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iCAAiC,KAAK,IAAI,CAAC;IAChE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA6KD,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
+
import { Form, Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
|
|
2
3
|
import { useI18n } from '@happyvertical/smrt-ui/i18n';
|
|
3
4
|
import { Button } from '@happyvertical/smrt-ui/ui';
|
|
4
5
|
import type { ContentContributionData } from '../../mock-smrt-client';
|
|
@@ -183,28 +184,29 @@ $effect(() => {
|
|
|
183
184
|
{/if}
|
|
184
185
|
</dl>
|
|
185
186
|
|
|
186
|
-
<
|
|
187
|
+
<Form
|
|
187
188
|
method="post"
|
|
188
189
|
action={workflowFormAction}
|
|
190
|
+
preventDefault={false}
|
|
189
191
|
onsubmit={handleWorkflowSubmit}
|
|
190
192
|
>
|
|
191
193
|
{#if selectedContribution.id}
|
|
192
|
-
<
|
|
194
|
+
<Input type="hidden" name="contributionId" value={selectedContribution.id} />
|
|
193
195
|
{/if}
|
|
194
196
|
|
|
195
197
|
<label>
|
|
196
198
|
{t(M['content.contribution_inbox.editorial_note'])}
|
|
197
|
-
<
|
|
199
|
+
<Textarea name="editorNote" bind:value={note} rows={4}></Textarea>
|
|
198
200
|
</label>
|
|
199
201
|
|
|
200
202
|
<div class="actions">
|
|
201
203
|
{#if onApprove || workflowFormAction}
|
|
202
204
|
<label class="inline">
|
|
203
205
|
{t(M['content.contribution_inbox.promote_to'])}
|
|
204
|
-
<
|
|
206
|
+
<Select name="targetStatus" bind:value={targetStatus}>
|
|
205
207
|
<option value="draft">draft</option>
|
|
206
208
|
<option value="review">review</option>
|
|
207
|
-
</
|
|
209
|
+
</Select>
|
|
208
210
|
</label>
|
|
209
211
|
<Button
|
|
210
212
|
variant="primary"
|
|
@@ -241,7 +243,7 @@ $effect(() => {
|
|
|
241
243
|
</Button>
|
|
242
244
|
{/if}
|
|
243
245
|
</div>
|
|
244
|
-
</
|
|
246
|
+
</Form>
|
|
245
247
|
</article>
|
|
246
248
|
{/if}
|
|
247
249
|
</div>
|
|
@@ -253,7 +255,7 @@ $effect(() => {
|
|
|
253
255
|
.inbox__header,
|
|
254
256
|
.inbox__layout,
|
|
255
257
|
.inbox__detail,
|
|
256
|
-
.inbox__detail form {
|
|
258
|
+
.inbox__detail :global(.form) {
|
|
257
259
|
display: grid;
|
|
258
260
|
gap: 1rem;
|
|
259
261
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentContributionInbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionInbox.svelte.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ContentContributionInbox.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentContributionInbox.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAC3D,SAAS,CAAC,EAAE,CACV,YAAY,EAAE,uBAAuB,EACrC,OAAO,EAAE;QAAE,YAAY,EAAE,OAAO,GAAG,QAAQ,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,KACxD,IAAI,CAAC;IACV,gBAAgB,CAAC,EAAE,CACjB,YAAY,EAAE,uBAAuB,EACrC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,IAAI,CAAC;IACV,QAAQ,CAAC,EAAE,CACT,YAAY,EAAE,uBAAuB,EACrC,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KACtB,IAAI,CAAC;CACX;AAmND,QAAA,MAAM,wBAAwB,2CAAwC,CAAC;AACvE,KAAK,wBAAwB,GAAG,UAAU,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAC5E,eAAe,wBAAwB,CAAC"}
|