@stacksjs/defaults 0.75.611 → 0.75.613
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/ai/skills/stacks-actions/SKILL.md +208 -0
- package/ai/skills/stacks-api/SKILL.md +1 -1
- package/ai/skills/stacks-buddy/SKILL.md +1 -1
- package/ai/skills/stacks-dashboard/SKILL.md +79 -0
- package/ai/skills/stacks-middleware/SKILL.md +4 -1
- package/ai/skills/stacks-native/CATALOG.md +12 -12
- package/ai/skills/stacks-validation/SKILL.md +7 -0
- package/app/Actions/Storefront/AddToCartAction.ts +12 -15
- package/app/Actions/Storefront/CheckoutContactAction.ts +18 -10
- package/app/Actions/Storefront/CheckoutShippingAction.ts +20 -10
- package/app/Actions/Storefront/PlaceOrderAction.ts +9 -12
- package/app/Actions/Storefront/UpdateCartItemAction.ts +11 -9
- package/app/Middleware/Abilities.ts +4 -3
- package/app/Middleware/Csrf.ts +10 -1
- package/app/Middleware/Throttle.ts +4 -4
- package/ide/vscode/package.json +1 -1
- package/package.json +5 -5
- package/resources/components/Dashboard/Analytics/AnalyticsPageHeader.stx +3 -13
- package/resources/components/Dashboard/App/RequestsOverview.stx +3 -20
- package/resources/components/Dashboard/App/SourceInventory.stx +1 -5
- package/resources/components/Dashboard/Auth/AccessTokenCreateDialog.stx +11 -28
- package/resources/components/Dashboard/Commerce/CommerceCategoriesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceCategoryDialog.stx +9 -9
- package/resources/components/Dashboard/Commerce/CommerceCouponDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceCouponsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceCustomerDialog.stx +7 -7
- package/resources/components/Dashboard/Commerce/CommerceCustomersDashboard.stx +3 -7
- package/resources/components/Dashboard/Commerce/CommerceGiftCardDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceGiftCardsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/CommerceManufacturerDialog.stx +12 -15
- package/resources/components/Dashboard/Commerce/CommerceManufacturersDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceOrderDialog.stx +15 -15
- package/resources/components/Dashboard/Commerce/CommerceOrdersDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceOverviewDashboard.stx +3 -11
- package/resources/components/Dashboard/Commerce/CommercePaymentsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/CommercePosCatalog.stx +3 -20
- package/resources/components/Dashboard/Commerce/CommercePosCheckoutDialog.stx +4 -4
- package/resources/components/Dashboard/Commerce/CommerceProductDialog.stx +14 -14
- package/resources/components/Dashboard/Commerce/CommerceProductsDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/CommerceReviewEditDialog.stx +14 -24
- package/resources/components/Dashboard/Commerce/CommerceReviewsDashboard.stx +5 -43
- package/resources/components/Dashboard/Commerce/CommerceTaxDialog.stx +22 -38
- package/resources/components/Dashboard/Commerce/CommerceTaxesDashboard.stx +5 -33
- package/resources/components/Dashboard/Commerce/CommerceUnitDialog.stx +16 -30
- package/resources/components/Dashboard/Commerce/CommerceUnitsDashboard.stx +4 -28
- package/resources/components/Dashboard/Commerce/CommerceVariantDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/CommerceVariantsDashboard.stx +8 -9
- package/resources/components/Dashboard/Commerce/Delivery/CourierDialog.stx +14 -12
- package/resources/components/Dashboard/Commerce/Delivery/DeliveryRouteDialog.stx +9 -11
- package/resources/components/Dashboard/Commerce/Delivery/DigitalDeliveryDialog.stx +15 -9
- package/resources/components/Dashboard/Commerce/Delivery/LicenseKeyDialog.stx +11 -7
- package/resources/components/Dashboard/Commerce/Delivery/ShippingMethodDialog.stx +14 -8
- package/resources/components/Dashboard/Commerce/Delivery/ShippingRateDialog.stx +11 -17
- package/resources/components/Dashboard/Commerce/Delivery/ShippingZoneDialog.stx +18 -12
- package/resources/components/Dashboard/Commerce/PaymentRefundDialog.stx +1 -1
- package/resources/components/Dashboard/Commerce/PrintDeviceDialog.stx +5 -5
- package/resources/components/Dashboard/Commerce/PrintDevicesDashboard.stx +4 -8
- package/resources/components/Dashboard/Commerce/PrintLogsDashboard.stx +5 -9
- package/resources/components/Dashboard/Commerce/ProductWaitlistDashboard.stx +2 -10
- package/resources/components/Dashboard/Commerce/ProductWaitlistEntryDialog.stx +14 -67
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistDashboard.stx +3 -18
- package/resources/components/Dashboard/Commerce/RestaurantWaitlistEntryDialog.stx +23 -69
- package/resources/components/Dashboard/Content/AuthorEditorDialog.stx +4 -16
- package/resources/components/Dashboard/Content/BlogDashboard.stx +2 -19
- package/resources/components/Dashboard/Content/BlogPostEditorDialog.stx +31 -51
- package/resources/components/Dashboard/Content/CommentsDashboard.stx +1 -1
- package/resources/components/Dashboard/Content/ContentDashboard.stx +1 -11
- package/resources/components/Dashboard/Content/CreateFolderDialog.stx +1 -4
- package/resources/components/Dashboard/Content/FileManagerDashboard.stx +2 -2
- package/resources/components/Dashboard/Content/PageEditorDialog.stx +8 -17
- package/resources/components/Dashboard/Content/PostEditorDialog.stx +35 -45
- package/resources/components/Dashboard/Content/PostsDashboard.stx +1 -13
- package/resources/components/Dashboard/Content/SeoDashboard.stx +2 -20
- package/resources/components/Dashboard/Content/SeoEditorDialog.stx +4 -38
- package/resources/components/Dashboard/Content/TaxonomyEditorDialog.stx +8 -15
- package/resources/components/Dashboard/Data/ActivityLog.stx +1 -5
- package/resources/components/Dashboard/Deployments/DeploymentList.stx +2 -11
- package/resources/components/Dashboard/Email/InboxMessageList.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/DnsDashboard.stx +2 -16
- package/resources/components/Dashboard/Infrastructure/LogsDashboard.stx +6 -10
- package/resources/components/Dashboard/Infrastructure/MailboxesDashboard.stx +1 -5
- package/resources/components/Dashboard/Infrastructure/ServersDashboard.stx +1 -5
- package/resources/components/Dashboard/Jobs/JobHistory.stx +3 -12
- package/resources/components/Dashboard/Kanban/KanbanCardDialog.stx +57 -51
- package/resources/components/Dashboard/Library/ComponentsDashboard.stx +4 -14
- package/resources/components/Dashboard/Library/DependenciesDashboard.stx +2 -15
- package/resources/components/Dashboard/Library/PackagesDashboard.stx +1 -8
- package/resources/components/Dashboard/Library/SourceScaffoldDialog.stx +1 -12
- package/resources/components/Dashboard/Management/PermissionsDashboard.stx +3 -3
- package/resources/components/Dashboard/Marketing/AbandonedCartsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/CampaignDeliveryDialog.stx +3 -5
- package/resources/components/Dashboard/Marketing/CampaignDialog.stx +59 -93
- package/resources/components/Dashboard/Marketing/CampaignsDashboard.stx +5 -5
- package/resources/components/Dashboard/Marketing/MarketingListDialog.stx +12 -26
- package/resources/components/Dashboard/Marketing/MarketingListsDashboard.stx +4 -4
- package/resources/components/Dashboard/Marketing/RecoveryCampaignDialog.stx +12 -43
- package/resources/components/Dashboard/Marketing/SocialPostDialog.stx +7 -41
- package/resources/components/Dashboard/Marketing/SocialPostsDashboard.stx +5 -5
- package/resources/components/Dashboard/Models/ModelRecordsDashboard.stx +7 -23
- package/resources/components/Dashboard/Models/ModelsOverview.stx +2 -12
- package/resources/components/Dashboard/Notifications/NotificationDeliveries.stx +4 -27
- package/resources/components/Dashboard/Notifications/NotificationDeliveryHistory.stx +4 -36
- package/resources/components/Dashboard/Operations/RecoveryDestinationDialog.stx +18 -47
- package/resources/components/Dashboard/Operations/RecoveryPolicyDialog.stx +24 -78
- package/resources/components/Dashboard/Operations/RecoveryRestoreDialog.stx +8 -19
- package/resources/components/Dashboard/Queries/QueryDashboard.stx +3 -21
- package/resources/components/Dashboard/Releases/ReleaseDashboard.stx +2 -9
- package/resources/components/Dashboard/Settings/SettingsDashboard.stx +1 -11
- package/resources/components/Dashboard/UI/Input.stx +50 -1
- package/resources/components/Dashboard/UI/SearchFilter.stx +27 -17
- package/resources/components/Dashboard/UI/Select.stx +4 -1
- package/resources/components/Dashboard/UI/Textarea.stx +16 -1
- package/resources/views/cart.stx +14 -0
- package/resources/views/checkout/contact.stx +15 -1
- package/resources/views/checkout/payment.stx +7 -0
- package/resources/views/checkout/shipping.stx +39 -5
|
@@ -71,6 +71,52 @@ function close(): void {
|
|
|
71
71
|
kanban.closeCardDetail()
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
+
/*
|
|
75
|
+
* The shared fields hand over the key event itself, so each says here what
|
|
76
|
+
* its keys do, as the native fields' modifiers did.
|
|
77
|
+
*/
|
|
78
|
+
|
|
79
|
+
/** Enter ends a title edit: the field loses focus, which saves it. */
|
|
80
|
+
function blurOnEnter(event: KeyboardEvent): void {
|
|
81
|
+
if (event.key !== 'Enter')
|
|
82
|
+
return
|
|
83
|
+
event.preventDefault()
|
|
84
|
+
;(event.target as HTMLElement).blur()
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** Command+Enter, or Ctrl+Enter, sends the comment being written. */
|
|
88
|
+
function sendCommentOnCommandEnter(event: KeyboardEvent): void {
|
|
89
|
+
if (event.key !== 'Enter' || !(event.metaKey || event.ctrlKey))
|
|
90
|
+
return
|
|
91
|
+
event.preventDefault()
|
|
92
|
+
void submitComment()
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Escape stops editing a comment without closing the card, and
|
|
97
|
+
* Command+Enter, or Ctrl+Enter, saves it.
|
|
98
|
+
*/
|
|
99
|
+
function editCommentKey(commentId: number, event: KeyboardEvent): void {
|
|
100
|
+
if (event.key === 'Escape') {
|
|
101
|
+
event.preventDefault()
|
|
102
|
+
event.stopPropagation()
|
|
103
|
+
cancelCommentEditWithoutClosing()
|
|
104
|
+
return
|
|
105
|
+
}
|
|
106
|
+
if (event.key === 'Enter' && (event.metaKey || event.ctrlKey)) {
|
|
107
|
+
event.preventDefault()
|
|
108
|
+
void saveCommentEdit(commentId)
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/** Enter creates the label being named. */
|
|
113
|
+
function createLabelOnEnter(event: KeyboardEvent): void {
|
|
114
|
+
if (event.key !== 'Enter')
|
|
115
|
+
return
|
|
116
|
+
event.preventDefault()
|
|
117
|
+
void submitNewLabel()
|
|
118
|
+
}
|
|
119
|
+
|
|
74
120
|
async function commitTitle(): Promise<void> {
|
|
75
121
|
const card = openCard()
|
|
76
122
|
if (!card)
|
|
@@ -252,18 +298,7 @@ function formatTimestamp(iso: string | null | undefined): string {
|
|
|
252
298
|
@close="close"
|
|
253
299
|
>
|
|
254
300
|
<div :if="openCard()" class="grid gap-6">
|
|
255
|
-
<label
|
|
256
|
-
<span class="font-medium text-xs text-zinc-500 tracking-wide uppercase">Title</span>
|
|
257
|
-
<input
|
|
258
|
-
x-model="titleDraft"
|
|
259
|
-
name="card_title"
|
|
260
|
-
required
|
|
261
|
-
autofocus
|
|
262
|
-
@blur="commitTitle()"
|
|
263
|
-
@keydown.enter.prevent="$event.currentTarget.blur()"
|
|
264
|
-
class="px-3 py-2 font-semibold text-lg text-zinc-900 dark:text-zinc-100 bg-white dark:bg-zinc-950 border border-zinc-200 rounded-md dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600"
|
|
265
|
-
/>
|
|
266
|
-
</label>
|
|
301
|
+
<Input v-model:value="titleDraft" name="card_title" label="Title" :required="true" :autofocus="true" @blur="commitTitle" @keydown="blurOnEnter" />
|
|
267
302
|
|
|
268
303
|
<div :if="loadingCard()" role="status" class="flex gap-2 items-center text-sm text-zinc-500">
|
|
269
304
|
<span class="h-4 w-4 animate-spin i-hugeicons-loading-03"></span>
|
|
@@ -278,14 +313,7 @@ function formatTimestamp(iso: string | null | undefined): string {
|
|
|
278
313
|
<div class="md:col-span-2 space-y-6">
|
|
279
314
|
<section>
|
|
280
315
|
<h4 class="mb-2 font-medium text-xs text-zinc-500 tracking-wide uppercase">Description</h4>
|
|
281
|
-
<
|
|
282
|
-
x-model="descDraft"
|
|
283
|
-
name="card_description"
|
|
284
|
-
@blur="commitDescription()"
|
|
285
|
-
rows="4"
|
|
286
|
-
placeholder="Add a more detailed description"
|
|
287
|
-
class="px-3 py-2 w-full text-sm text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600 resize-y"
|
|
288
|
-
></textarea>
|
|
316
|
+
<Textarea v-model:value="descDraft" name="card_description" ariaLabel="Description" :rows="4" placeholder="Add a more detailed description" @blur="commitDescription" />
|
|
289
317
|
</section>
|
|
290
318
|
|
|
291
319
|
<section :if="cardAttachments().length">
|
|
@@ -311,15 +339,7 @@ function formatTimestamp(iso: string | null | undefined): string {
|
|
|
311
339
|
<section>
|
|
312
340
|
<h4 class="mb-2 font-medium text-xs text-zinc-500 tracking-wide uppercase">Activity</h4>
|
|
313
341
|
<div class="mb-4">
|
|
314
|
-
<
|
|
315
|
-
x-model="commentDraft"
|
|
316
|
-
name="card_comment"
|
|
317
|
-
@keydown.meta.enter.prevent="submitComment()"
|
|
318
|
-
@keydown.ctrl.enter.prevent="submitComment()"
|
|
319
|
-
rows="2"
|
|
320
|
-
placeholder="Add a comment, then press Command+Enter to send"
|
|
321
|
-
class="px-3 py-2 w-full text-sm text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600 resize-none"
|
|
322
|
-
></textarea>
|
|
342
|
+
<Textarea v-model:value="commentDraft" name="card_comment" ariaLabel="Add a comment" :rows="2" resize="none" placeholder="Add a comment, then press Command+Enter to send" @keydown="sendCommentOnCommandEnter" />
|
|
323
343
|
<div class="flex justify-end mt-2">
|
|
324
344
|
<Button size="sm" :disabled="!commentDraft().trim()" @click="submitComment()">Comment</Button>
|
|
325
345
|
</div>
|
|
@@ -340,16 +360,7 @@ function formatTimestamp(iso: string | null | undefined): string {
|
|
|
340
360
|
</div>
|
|
341
361
|
<p :if="editingCommentId() !== comment.id" class="mt-0.5 text-xs text-zinc-700 whitespace-pre-wrap dark:text-zinc-300" :text="comment.body"></p>
|
|
342
362
|
<div :if="editingCommentId() === comment.id" class="mt-2">
|
|
343
|
-
<
|
|
344
|
-
x-model="commentEditDraft"
|
|
345
|
-
@keydown.escape.stop.prevent="cancelCommentEditWithoutClosing()"
|
|
346
|
-
@keydown.meta.enter.prevent="saveCommentEdit(comment.id)"
|
|
347
|
-
@keydown.ctrl.enter.prevent="saveCommentEdit(comment.id)"
|
|
348
|
-
rows="3"
|
|
349
|
-
maxlength="10000"
|
|
350
|
-
:aria-label="'Edit comment by ' + (comment.authorName || comment.authorEmail || 'Unknown')"
|
|
351
|
-
class="px-3 py-2 w-full text-sm text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none dark:focus:border-violet-600 resize-y"
|
|
352
|
-
></textarea>
|
|
363
|
+
<Textarea v-model:value="commentEditDraft" :rows="3" :maxLength="10000" :ariaLabel="'Edit comment by ' + (comment.authorName || comment.authorEmail || 'Unknown')" @keydown="editCommentKey(comment.id, $event)" />
|
|
353
364
|
<div class="flex gap-2 justify-end mt-2">
|
|
354
365
|
<Button variant="secondary" size="xs" :disabled="savingCommentId() === comment.id" @click="cancelCommentEdit()">Cancel</Button>
|
|
355
366
|
<Button size="xs" :loading="savingCommentId() === comment.id" :disabled="!commentEditDraft().trim()" @click="saveCommentEdit(comment.id)">Save comment</Button>
|
|
@@ -388,7 +399,9 @@ function formatTimestamp(iso: string | null | undefined): string {
|
|
|
388
399
|
</div>
|
|
389
400
|
|
|
390
401
|
<div :if="showNewLabelComposer()" class="pt-2 space-y-2 border-t border-zinc-200 dark:border-zinc-800">
|
|
391
|
-
<
|
|
402
|
+
<div>
|
|
403
|
+
<Input v-model:value="newLabelName" name="label_name" ariaLabel="Label name" size="sm" placeholder="Label name" @keydown="createLabelOnEnter" />
|
|
404
|
+
</div>
|
|
392
405
|
<div class="flex gap-1 items-center" role="group" aria-label="Label color">
|
|
393
406
|
<button :for="color in labelColors" type="button" @click="newLabelColor.set(color)" :class="`w-5 h-5 rounded ${labelChipClass(color)} ${newLabelColor() === color ? 'ring-2 ring-offset-1 ring-violet-500 dark:ring-offset-zinc-900' : ''}`" :aria-label="'Use ' + color + ' label color'" :aria-pressed="String(newLabelColor() === color)"></button>
|
|
394
407
|
</div>
|
|
@@ -418,16 +431,9 @@ function formatTimestamp(iso: string | null | undefined): string {
|
|
|
418
431
|
<span :if="cardAssignees().length === 0" class="italic text-xs text-zinc-500 dark:text-zinc-400">Unassigned</span>
|
|
419
432
|
</div>
|
|
420
433
|
|
|
421
|
-
<
|
|
422
|
-
:
|
|
423
|
-
|
|
424
|
-
name="assignee_search"
|
|
425
|
-
aria-label="Search users to assign"
|
|
426
|
-
placeholder="Search by name or email"
|
|
427
|
-
x-model="assigneeQuery"
|
|
428
|
-
@input="searchAssigneesSoon()"
|
|
429
|
-
class="mb-2 px-2 py-1 w-full text-xs text-zinc-800 dark:text-zinc-200 bg-white dark:bg-zinc-950 border border-zinc-200 rounded dark:border-zinc-800 focus:border-violet-400 focus:outline-none"
|
|
430
|
-
/>
|
|
434
|
+
<div :if="showAssigneePicker()" class="mb-2">
|
|
435
|
+
<Input v-model:value="assigneeQuery" type="search" name="assignee_search" ariaLabel="Search users to assign" size="sm" placeholder="Search by name or email" @input="searchAssigneesSoon" />
|
|
436
|
+
</div>
|
|
431
437
|
<p :if="showAssigneePicker() && moreAssigneesLabel()" class="mb-2 text-[11px] text-zinc-500 dark:text-zinc-400" :text="moreAssigneesLabel()"></p>
|
|
432
438
|
<div :if="showAssigneePicker()" class="overflow-y-auto space-y-1 max-h-48">
|
|
433
439
|
<p :if="kanban.users().length === 0 && !kanban.userSearch()" class="italic text-xs text-zinc-500 dark:text-zinc-400">No users to assign.</p>
|
|
@@ -442,7 +448,7 @@ function formatTimestamp(iso: string | null | undefined): string {
|
|
|
442
448
|
|
|
443
449
|
<section>
|
|
444
450
|
<h4 class="mb-2 font-medium text-xs text-zinc-500 tracking-wide uppercase">Due date</h4>
|
|
445
|
-
<
|
|
451
|
+
<Input v-model:value="dueDateDraft" type="date" name="due_date" ariaLabel="Due date" size="sm" @change="commitDueDate" />
|
|
446
452
|
</section>
|
|
447
453
|
|
|
448
454
|
<section class="pt-3 border-t border-zinc-200 dark:border-zinc-800">
|
|
@@ -184,20 +184,10 @@ onMount(() => {
|
|
|
184
184
|
empty-description="Adjust the search or category filter."
|
|
185
185
|
>
|
|
186
186
|
<template #toolbar>
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
stx, while the attribute forms read the loop variable fine.
|
|
192
|
-
See stacksjs/stx#2095. --}}
|
|
193
|
-
<select
|
|
194
|
-
x-model="selectedCategory"
|
|
195
|
-
aria-label="Filter by category"
|
|
196
|
-
class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600"
|
|
197
|
-
>
|
|
198
|
-
<option :for="category in categories()" :value="category" x-text="category"></option>
|
|
199
|
-
</select>
|
|
200
|
-
</label>
|
|
187
|
+
{{-- The options are bound as an attribute: an interpolation inside slot
|
|
188
|
+
content is preserved but never evaluated on the installed stx.
|
|
189
|
+
See stacksjs/stx#2095. --}}
|
|
190
|
+
<Select v-model:value="selectedCategory" ariaLabel="Filter by category" placeholder="" :options="[...categories().map(category => ({ value: category, label: category }))]" />
|
|
201
191
|
</template>
|
|
202
192
|
</Table>
|
|
203
193
|
</section>
|
|
@@ -125,21 +125,8 @@ onMount(() => { void loadDependencies() })
|
|
|
125
125
|
empty-description="Adjust the dataset, scope, or search."
|
|
126
126
|
>
|
|
127
127
|
<template #toolbar>
|
|
128
|
-
<label
|
|
129
|
-
|
|
130
|
-
<select x-model="dataset" class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600">
|
|
131
|
-
<option value="declared">Declared</option>
|
|
132
|
-
<option value="transitive">Transitive</option>
|
|
133
|
-
</select>
|
|
134
|
-
</label>
|
|
135
|
-
<label>
|
|
136
|
-
<span class="sr-only">Filter dependency scope</span>
|
|
137
|
-
<select x-model="scope" :disabled="dataset() === 'transitive'" class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600 disabled:opacity-50">
|
|
138
|
-
<option value="all">All scopes</option>
|
|
139
|
-
<option value="workspace">Workspace</option>
|
|
140
|
-
<option value="third-party">Third-party</option>
|
|
141
|
-
</select>
|
|
142
|
-
</label>
|
|
128
|
+
<Select v-model:value="dataset" ariaLabel="Choose dependency dataset" placeholder="" :options="[{ value: 'declared', label: 'Declared' }, { value: 'transitive', label: 'Transitive' }]" />
|
|
129
|
+
<Select v-model:value="scope" ariaLabel="Filter dependency scope" placeholder="" :options="[{ value: 'all', label: 'All scopes' }, { value: 'workspace', label: 'Workspace' }, { value: 'third-party', label: 'Third-party' }]" :disabled="dataset() === 'transitive'" />
|
|
143
130
|
</template>
|
|
144
131
|
</Table>
|
|
145
132
|
</section>
|
|
@@ -117,14 +117,7 @@ onMount(() => { void loadPackages() })
|
|
|
117
117
|
empty-description="Adjust the search or visibility filter."
|
|
118
118
|
>
|
|
119
119
|
<template #toolbar>
|
|
120
|
-
<label
|
|
121
|
-
<span class="sr-only">Filter package visibility</span>
|
|
122
|
-
<select x-model="visibility" class="px-2.5 py-1.5 text-sm bg-white dark:bg-neutral-800 border border-stone-300 rounded-lg dark:border-neutral-600">
|
|
123
|
-
<option value="all">All workspaces</option>
|
|
124
|
-
<option value="public">Public</option>
|
|
125
|
-
<option value="private">Private</option>
|
|
126
|
-
</select>
|
|
127
|
-
</label>
|
|
120
|
+
<Select v-model:value="visibility" ariaLabel="Filter package visibility" placeholder="" :options="[{ value: 'all', label: 'All workspaces' }, { value: 'public', label: 'Public' }, { value: 'private', label: 'Private' }]" />
|
|
128
121
|
</template>
|
|
129
122
|
|
|
130
123
|
<template #cell="{ row }">
|
|
@@ -66,18 +66,7 @@ function submit(): void {
|
|
|
66
66
|
@close="close"
|
|
67
67
|
>
|
|
68
68
|
<form id="source-scaffold-form" @submit.prevent="submit">
|
|
69
|
-
<label
|
|
70
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Name</span>
|
|
71
|
-
<input
|
|
72
|
-
x-model.trim="sourceName"
|
|
73
|
-
name="name"
|
|
74
|
-
required
|
|
75
|
-
:pattern="pattern()"
|
|
76
|
-
:placeholder="placeholder()"
|
|
77
|
-
class="mt-1 px-3 py-2 w-full font-mono text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"
|
|
78
|
-
>
|
|
79
|
-
<span class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">{{ hint() }}</span>
|
|
80
|
-
</label>
|
|
69
|
+
<Input v-model:value="sourceName" name="name" label="Name" :required="true" :pattern="pattern()" :placeholder="placeholder()" :hint="hint()" :spellcheck="false" :monospace="true" />
|
|
81
70
|
</form>
|
|
82
71
|
|
|
83
72
|
<div :if="error()" role="alert" class="mt-4 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">
|
|
@@ -376,7 +376,7 @@
|
|
|
376
376
|
<div class="bg-white dark:bg-neutral-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
|
|
377
377
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between px-5 py-3 border-b border-zinc-200 dark:border-zinc-800">
|
|
378
378
|
<h2 class="font-medium text-sm text-zinc-700 dark:text-zinc-300">Roles (<span :text="roles().length"></span>)</h2>
|
|
379
|
-
<
|
|
379
|
+
<SearchFilter v-model:searchValue="roleFilter" placeholder="Filter roles…" ariaLabel="Filter roles" class="w-full sm:w-64" />
|
|
380
380
|
</div>
|
|
381
381
|
<div :if="filteredRoles().length === 0" class="px-5 py-8 text-center text-sm text-zinc-500" :text="roles().length === 0 ? 'No roles yet.' : 'No matching roles.'"></div>
|
|
382
382
|
<div :if="filteredRoles().length > 0" class="overflow-x-auto">
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
<div class="bg-white dark:bg-neutral-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
|
|
425
425
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between px-5 py-3 border-b border-zinc-200 dark:border-zinc-800">
|
|
426
426
|
<h2 class="font-medium text-sm text-zinc-700 dark:text-zinc-300">Permissions (<span :text="permissions().length"></span>)</h2>
|
|
427
|
-
<
|
|
427
|
+
<SearchFilter v-model:searchValue="permissionFilter" placeholder="Filter permissions…" ariaLabel="Filter permissions" class="w-full sm:w-64" />
|
|
428
428
|
</div>
|
|
429
429
|
<div :if="filteredPermissions().length === 0" class="px-5 py-8 text-center text-sm text-zinc-500" :text="permissions().length === 0 ? 'No permissions yet.' : 'No matching permissions.'"></div>
|
|
430
430
|
<div :if="filteredPermissions().length > 0" class="overflow-x-auto">
|
|
@@ -459,7 +459,7 @@
|
|
|
459
459
|
<div class="bg-white dark:bg-neutral-900 border border-zinc-200 rounded-lg dark:border-zinc-800">
|
|
460
460
|
<div class="flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between px-5 py-3 border-b border-zinc-200 dark:border-zinc-800">
|
|
461
461
|
<h2 class="font-medium text-sm text-zinc-700 dark:text-zinc-300">Users (<span :text="users().length"></span>)</h2>
|
|
462
|
-
<
|
|
462
|
+
<SearchFilter v-model:searchValue="userFilter" placeholder="Filter users…" ariaLabel="Filter users" class="w-full sm:w-64" />
|
|
463
463
|
</div>
|
|
464
464
|
<div :if="filteredUsers().length === 0" class="px-5 py-8 text-center text-sm text-zinc-500" :text="users().length === 0 ? 'No users found.' : 'No matching users.'"></div>
|
|
465
465
|
<div :if="filteredUsers().length > 0" class="overflow-x-auto">
|
|
@@ -191,10 +191,10 @@ onMount(() => {
|
|
|
191
191
|
|
|
192
192
|
<section class="flex flex-col gap-3">
|
|
193
193
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-4">
|
|
194
|
-
<
|
|
195
|
-
<
|
|
196
|
-
<
|
|
197
|
-
<
|
|
194
|
+
<SearchFilter v-model:searchValue="search" placeholder="Search by customer or product" ariaLabel="Search carts" />
|
|
195
|
+
<Select v-model:value="stateFilter" ariaLabel="Filter cart state" placeholder="" :options="[{ value: 'open', label: 'Still out there' }, { value: 'cold', label: 'Never chased' }, { value: 'chased', label: 'Already chased' }, { value: 'recovered', label: 'Recovered' }, { value: 'all', label: 'Everything' }]" />
|
|
196
|
+
<Select v-model:value="idleFilter" ariaLabel="Filter by how long the cart has been idle" placeholder="" :options="[{ value: 'all', label: 'Any age' }, { value: '4', label: 'Idle 4h or more' }, { value: '24', label: 'Idle a day or more' }, { value: '72', label: 'Idle 3 days or more' }]" />
|
|
197
|
+
<Select v-model:value="sort" ariaLabel="Sort carts" placeholder="" :options="[{ value: 'value', label: 'Highest value' }, { value: 'idle', label: 'Longest idle' }, { value: 'customer', label: 'Customer' }]" />
|
|
198
198
|
</div>
|
|
199
199
|
<AbandonedCartsTable :sort-reset-key="sort()" :page-reset-key="viewKey()" :records="filteredRecords()" :loading="loading()" />
|
|
200
200
|
</section>
|
|
@@ -71,11 +71,9 @@ function submit(): void {
|
|
|
71
71
|
<p class="font-medium text-gray-900 text-sm dark:text-white">{{ record()?.name || '' }}</p>
|
|
72
72
|
<p class="mt-1 text-gray-500 text-xs dark:text-neutral-400">{{ record()?.emailListName || 'Not assigned' }} · {{ record()?.audienceSize.toLocaleString() || '0' }} active recipients</p>
|
|
73
73
|
</div>
|
|
74
|
-
<
|
|
75
|
-
<
|
|
76
|
-
|
|
77
|
-
<span class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">Uses your browser’s local time.</span>
|
|
78
|
-
</label>
|
|
74
|
+
<div :if="mode() === 'schedule'" class="mt-4">
|
|
75
|
+
<Input v-model:value="scheduledAt" label="Delivery time" type="datetime-local" :required="true" hint="Uses your browser’s local time." />
|
|
76
|
+
</div>
|
|
79
77
|
<div :if="error()" role="alert" class="mt-4 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">{{ error() }}</div>
|
|
80
78
|
<template #footer>
|
|
81
79
|
<div class="flex gap-2 justify-end w-full">
|
|
@@ -16,7 +16,9 @@ const busy = useReactiveProp('busy', false)
|
|
|
16
16
|
const error = useReactiveProp('error', '')
|
|
17
17
|
const emit = defineEmits(['submit', 'close'])
|
|
18
18
|
const name = state('')
|
|
19
|
-
|
|
19
|
+
// Not `description`: a field bound inside the Modal is first read as the
|
|
20
|
+
// Modal's own `description` prop (stacksjs/stacks#3310).
|
|
21
|
+
const descriptionText = state('')
|
|
20
22
|
const type = state<CampaignType>('email')
|
|
21
23
|
const status = state<CampaignStatus>('draft')
|
|
22
24
|
const subject = state('')
|
|
@@ -63,7 +65,7 @@ effect(() => {
|
|
|
63
65
|
return
|
|
64
66
|
hydrationKey = key
|
|
65
67
|
name.set(current?.name || '')
|
|
66
|
-
|
|
68
|
+
descriptionText.set(current?.description || '')
|
|
67
69
|
type.set(current?.type || 'email')
|
|
68
70
|
status.set(current?.status || 'draft')
|
|
69
71
|
subject.set(current?.subject || '')
|
|
@@ -89,8 +91,30 @@ function spentError(): string {
|
|
|
89
91
|
return moneyInputError(spent(), currency(), { required: false })
|
|
90
92
|
}
|
|
91
93
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
+
/**
|
|
95
|
+
* The statuses this campaign may be set to. An email campaign is scheduled,
|
|
96
|
+
* sent and sending by its delivery, so those are shown only while it is one.
|
|
97
|
+
*/
|
|
98
|
+
const statusOptions = derived(() => {
|
|
99
|
+
const email = type() === 'email'
|
|
100
|
+
const current = status()
|
|
101
|
+
return [
|
|
102
|
+
{ value: 'draft', label: 'Draft', shown: true },
|
|
103
|
+
{ value: 'scheduled', label: 'Scheduled', shown: !email },
|
|
104
|
+
{ value: 'active', label: 'Active', shown: !email },
|
|
105
|
+
{ value: 'paused', label: 'Paused', shown: true },
|
|
106
|
+
{ value: 'cancelled', label: 'Cancelled', shown: true },
|
|
107
|
+
{ value: 'failed', label: 'Failed', shown: true },
|
|
108
|
+
{ value: 'completed', label: 'Completed', shown: !email },
|
|
109
|
+
{ value: 'archived', label: 'Archived', shown: !email },
|
|
110
|
+
{ value: 'scheduled', label: 'Scheduled', shown: email && current === 'scheduled' },
|
|
111
|
+
{ value: 'sending', label: 'Sending', shown: email && current === 'sending' },
|
|
112
|
+
{ value: 'sent', label: 'Sent', shown: email && current === 'sent' },
|
|
113
|
+
].filter(option => option.shown).map(({ value, label }) => ({ value, label }))
|
|
114
|
+
})
|
|
115
|
+
|
|
116
|
+
function normalizeType(next: string): void {
|
|
117
|
+
const nextType = next as CampaignType
|
|
94
118
|
if (nextType === 'email')
|
|
95
119
|
status.set('draft')
|
|
96
120
|
else if (['sending', 'sent'].includes(status()))
|
|
@@ -103,7 +127,7 @@ function submit(): void {
|
|
|
103
127
|
const code = currency().trim().toUpperCase()
|
|
104
128
|
emit('submit', {
|
|
105
129
|
name: name().trim(),
|
|
106
|
-
description:
|
|
130
|
+
description: descriptionText().trim(),
|
|
107
131
|
type: type(),
|
|
108
132
|
status: type() === 'email' && mode() === 'add' ? 'draft' : status(),
|
|
109
133
|
subject: subject().trim(),
|
|
@@ -133,100 +157,42 @@ function submit(): void {
|
|
|
133
157
|
<div :if="error()" role="alert" class="mb-5 p-3 text-red-700 text-sm dark:text-red-300 bg-red-50 dark:bg-red-950/30 border border-red-200 rounded-lg dark:border-red-900">{{ error() }}</div>
|
|
134
158
|
|
|
135
159
|
<div class="grid gap-4 sm:grid-cols-2">
|
|
136
|
-
<
|
|
137
|
-
<
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<label class="block">
|
|
145
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Type</span>
|
|
146
|
-
<select x-model="type" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" @change="normalizeType($event)">
|
|
147
|
-
<option value="email">Email</option>
|
|
148
|
-
<option value="sms">SMS</option>
|
|
149
|
-
<option value="push">Push</option>
|
|
150
|
-
<option value="social">Social</option>
|
|
151
|
-
<option value="multi-channel">Multi-channel</option>
|
|
152
|
-
</select>
|
|
153
|
-
</label>
|
|
154
|
-
<label class="block">
|
|
155
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Status</span>
|
|
156
|
-
<select x-model="status" :disabled="type() === 'email' && (mode() === 'add' || ['scheduled', 'sending', 'sent'].includes(status()))" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700 disabled:opacity-60">
|
|
157
|
-
<option value="draft">Draft</option>
|
|
158
|
-
<option :if="type() !== 'email'" value="scheduled">Scheduled</option>
|
|
159
|
-
<option :if="type() !== 'email'" value="active">Active</option>
|
|
160
|
-
<option value="paused">Paused</option>
|
|
161
|
-
<option value="cancelled">Cancelled</option>
|
|
162
|
-
<option value="failed">Failed</option>
|
|
163
|
-
<option :if="type() !== 'email'" value="completed">Completed</option>
|
|
164
|
-
<option :if="type() !== 'email'" value="archived">Archived</option>
|
|
165
|
-
<option :if="type() === 'email' && status() === 'scheduled'" value="scheduled">Scheduled</option>
|
|
166
|
-
<option :if="type() === 'email' && status() === 'sending'" value="sending">Sending</option>
|
|
167
|
-
<option :if="type() === 'email' && status() === 'sent'" value="sent">Sent</option>
|
|
168
|
-
</select>
|
|
169
|
-
</label>
|
|
160
|
+
<div class="sm:col-span-2">
|
|
161
|
+
<Input v-model:value="name" label="Name" :minLength="3" :maxLength="255" :required="true" autocomplete="off" />
|
|
162
|
+
</div>
|
|
163
|
+
<div class="sm:col-span-2">
|
|
164
|
+
<Textarea v-model:value="descriptionText" label="Description" :rows="2" :maxLength="1000" />
|
|
165
|
+
</div>
|
|
166
|
+
<Select v-model:value="type" label="Type" placeholder="" :options="[{ value: 'email', label: 'Email' }, { value: 'sms', label: 'SMS' }, { value: 'push', label: 'Push' }, { value: 'social', label: 'Social' }, { value: 'multi-channel', label: 'Multi-channel' }]" @change="normalizeType" />
|
|
167
|
+
<Select v-model:value="status" label="Status" placeholder="" :options="statusOptions()" :disabled="type() === 'email' && (mode() === 'add' || ['scheduled', 'sending', 'sent'].includes(status()))" />
|
|
170
168
|
|
|
171
169
|
<div :if="type() === 'email'" class="grid gap-4 sm:col-span-2 sm:grid-cols-2 p-4 bg-gray-50 dark:bg-neutral-900/50 border border-gray-200 rounded-lg dark:border-neutral-700">
|
|
172
|
-
<
|
|
173
|
-
<
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
</label>
|
|
187
|
-
<label class="block sm:col-span-2">
|
|
188
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Plain-text fallback</span>
|
|
189
|
-
<textarea x-model="text" rows="3" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700"></textarea>
|
|
190
|
-
</label>
|
|
191
|
-
<label class="block">
|
|
192
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">From name</span>
|
|
193
|
-
<input x-model="fromName" type="text" maxlength="100" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
194
|
-
</label>
|
|
195
|
-
<label class="block">
|
|
196
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">From address</span>
|
|
197
|
-
<input x-model="fromAddress" type="email" maxlength="255" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
198
|
-
</label>
|
|
170
|
+
<div class="sm:col-span-2">
|
|
171
|
+
<Select v-model:value="emailListId" label="Email list" :required="true" placeholder="Select a list" :options="lists().map(list => ({ value: list.id, label: list.name + ' - ' + list.activeMembers.toLocaleString() + ' active' }))" />
|
|
172
|
+
</div>
|
|
173
|
+
<div class="sm:col-span-2">
|
|
174
|
+
<Input v-model:value="subject" label="Subject" :maxLength="255" :required="true" />
|
|
175
|
+
</div>
|
|
176
|
+
<div class="sm:col-span-2">
|
|
177
|
+
<Textarea v-model:value="template" label="Template name or raw HTML" :rows="3" :required="true" :monospace="true" />
|
|
178
|
+
</div>
|
|
179
|
+
<div class="sm:col-span-2">
|
|
180
|
+
<Textarea v-model:value="text" label="Plain-text fallback" :rows="3" />
|
|
181
|
+
</div>
|
|
182
|
+
<Input v-model:value="fromName" label="From name" :maxLength="100" />
|
|
183
|
+
<Input v-model:value="fromAddress" label="From address" type="email" :maxLength="255" />
|
|
199
184
|
</div>
|
|
200
185
|
|
|
201
|
-
<
|
|
202
|
-
<
|
|
203
|
-
|
|
204
|
-
<span :if="type() === 'email'" class="block mt-1 text-gray-500 text-xs dark:text-neutral-400">Email scheduling is managed by the delivery pipeline.</span>
|
|
205
|
-
</label>
|
|
186
|
+
<div :if="status() === 'scheduled'" class="sm:col-span-2">
|
|
187
|
+
<Input v-model:value="scheduledAt" label="Scheduled for" type="datetime-local" :required="true" :disabled="type() === 'email'" :hint="type() === 'email' ? 'Email scheduling is managed by the delivery pipeline.' : ''" />
|
|
188
|
+
</div>
|
|
206
189
|
|
|
207
|
-
<label
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
</label>
|
|
211
|
-
<label class="block">
|
|
212
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Ends</span>
|
|
213
|
-
<input x-model="endDate" type="datetime-local" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
214
|
-
</label>
|
|
215
|
-
<label class="block">
|
|
216
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Budget</span>
|
|
217
|
-
<input x-model="budget" type="number" min="0" :step="moneyInputStep(currency())" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
218
|
-
<span :if="budgetError()" class="block mt-1 text-red-600 text-xs dark:text-red-400">{{ budgetError() }}</span>
|
|
219
|
-
</label>
|
|
190
|
+
<Input v-model:value="startDate" label="Starts" type="datetime-local" />
|
|
191
|
+
<Input v-model:value="endDate" label="Ends" type="datetime-local" />
|
|
192
|
+
<Input v-model:value="budget" label="Budget" type="number" min="0" :step="moneyInputStep(currency())" inputmode="decimal" :error="budgetError()" />
|
|
220
193
|
<div class="grid gap-3 grid-cols-[1fr_7rem]">
|
|
221
|
-
<label
|
|
222
|
-
|
|
223
|
-
<input x-model="spent" type="number" min="0" :step="moneyInputStep(currency())" class="mt-1 px-3 py-2 w-full text-gray-900 text-sm dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
224
|
-
<span :if="spentError()" class="block mt-1 text-red-600 text-xs dark:text-red-400">{{ spentError() }}</span>
|
|
225
|
-
</label>
|
|
226
|
-
<label class="block">
|
|
227
|
-
<span class="font-medium text-gray-700 text-sm dark:text-neutral-200">Currency</span>
|
|
228
|
-
<input x-model="currency" type="text" minlength="3" maxlength="3" required class="mt-1 px-3 py-2 w-full text-gray-900 text-sm uppercase dark:text-white bg-white dark:bg-neutral-900 border border-gray-300 rounded-md dark:border-neutral-700" />
|
|
229
|
-
</label>
|
|
194
|
+
<Input v-model:value="spent" label="Spent" type="number" min="0" :step="moneyInputStep(currency())" inputmode="decimal" :error="spentError()" />
|
|
195
|
+
<Input v-model:value="currency" label="Currency" :minLength="3" :maxLength="3" :required="true" class="uppercase" :spellcheck="false" />
|
|
230
196
|
</div>
|
|
231
197
|
</div>
|
|
232
198
|
</form>
|
|
@@ -282,11 +282,11 @@ onMount(() => {
|
|
|
282
282
|
|
|
283
283
|
<section class="flex flex-col gap-3">
|
|
284
284
|
<div class="grid gap-3 grid-cols-1 sm:grid-cols-2 xl:grid-cols-5">
|
|
285
|
-
<
|
|
286
|
-
<
|
|
287
|
-
<
|
|
288
|
-
<
|
|
289
|
-
<
|
|
285
|
+
<SearchFilter v-model:searchValue="search" placeholder="Search campaigns" ariaLabel="Search campaigns" />
|
|
286
|
+
<Select v-model:value="typeFilter" ariaLabel="Filter campaign type" placeholder="" :options="[{ value: 'all', label: 'All types' }, { value: 'email', label: 'Email' }, { value: 'sms', label: 'SMS' }, { value: 'push', label: 'Push' }, { value: 'social', label: 'Social' }, { value: 'multi-channel', label: 'Multi-channel' }]" />
|
|
287
|
+
<Select v-model:value="statusFilter" ariaLabel="Filter campaign status" placeholder="" :options="[{ value: 'all', label: 'All statuses' }, { value: 'draft', label: 'Draft' }, { value: 'scheduled', label: 'Scheduled' }, { value: 'sending', label: 'Sending' }, { value: 'sent', label: 'Sent' }, { value: 'active', label: 'Active' }, { value: 'completed', label: 'Completed' }, { value: 'paused', label: 'Paused' }, { value: 'cancelled', label: 'Cancelled' }, { value: 'failed', label: 'Failed' }, { value: 'archived', label: 'Archived' }]" />
|
|
288
|
+
<Select v-model:value="listFilter" ariaLabel="Filter campaign list" placeholder="" :options="[{ value: 'all', label: 'All email lists' }, ...lists().map(list => ({ value: list.id, label: list.name }))]" />
|
|
289
|
+
<Select v-model:value="sort" ariaLabel="Sort campaigns" placeholder="" :options="[{ value: 'newest', label: 'Newest' }, { value: 'name', label: 'Name' }, { value: 'audience', label: 'Largest audience' }, { value: 'sent', label: 'Most sent' }]" />
|
|
290
290
|
</div>
|
|
291
291
|
<CampaignsTable :sort-reset-key="sort()" :page-reset-key="viewKey()" :records="filteredRecords()" :loading="loading()" @edit="openEdit" @delete="openDelete" @deliver="openDelivery" />
|
|
292
292
|
</section>
|