@rkosafo/cai.components 0.0.78 → 0.0.80
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 -8
- package/dist/baseEditor/index.svelte +32 -32
- package/dist/builders/filters/FilterBuilder.svelte +641 -641
- package/dist/forms/FormCheckbox/FormCheckbox.svelte +53 -53
- package/dist/forms/FormClEditor/ClEdito.svelte +68 -68
- package/dist/forms/FormDatepicker/FormDatepicker.svelte +159 -159
- package/dist/forms/FormFileUpload/FormFileUplad.svelte +134 -134
- package/dist/forms/FormInput/FormInput.svelte +87 -87
- package/dist/forms/FormRadio/FormRadio.svelte +53 -53
- package/dist/forms/FormSelect/FormSelect.svelte +88 -88
- package/dist/forms/FormTextarea/FormTextarea.svelte +78 -78
- package/dist/forms/button-toggle/ButtonToggle.svelte +119 -119
- package/dist/forms/button-toggle/CheckIcon.svelte +28 -28
- package/dist/forms/checkbox/Checkbox.svelte +82 -82
- package/dist/forms/checkbox/CheckboxButton.svelte +92 -92
- package/dist/forms/datepicker/Datepicker.svelte +707 -707
- package/dist/forms/form/Form.svelte +69 -69
- package/dist/forms/input/Input.svelte +363 -363
- package/dist/forms/label/Label.svelte +38 -38
- package/dist/forms/radio/Radio.svelte +48 -48
- package/dist/forms/radio/RadioButton.svelte +22 -22
- package/dist/forms/select/Select.svelte +56 -56
- package/dist/forms/textarea/Textarea.svelte +165 -165
- package/dist/forms/toggle/Toggle.svelte +70 -70
- package/dist/layout/Chat/CategorySelector.svelte +52 -52
- package/dist/layout/Chat/ChatEntry.svelte +246 -246
- package/dist/layout/Chat/ChatEntrySkeleton.svelte +81 -81
- package/dist/layout/Chat/ChatHeader.svelte +172 -172
- package/dist/layout/Chat/ChatInput.svelte +207 -207
- package/dist/layout/Chat/DraggableWindow.svelte +230 -230
- package/dist/layout/Chat/PreviewPage.svelte +182 -182
- package/dist/layout/Chat/RichText.svelte +216 -216
- package/dist/layout/ComponentCanvas/Canvas.svelte +40 -40
- package/dist/layout/ComponentCanvas/ComponentRenderer.svelte +85 -85
- package/dist/layout/TF/Content/Content.svelte +21 -21
- package/dist/layout/TF/Header/Header.svelte +166 -166
- package/dist/layout/TF/Sidebar/Sidebar.svelte +148 -148
- package/dist/layout/TF/Wrapper/Wrapper.svelte +17 -17
- package/dist/layout/mailing/MailPaginator.svelte +36 -36
- package/dist/layout/mailing/MailSidebar.svelte +39 -39
- package/dist/layout/mailing/MailToolBar.svelte +174 -174
- package/dist/layout/mailing/MailingContent.svelte +10 -10
- package/dist/layout/mailing/MailingHeader.svelte +55 -55
- package/dist/layout/mailing/MailingMessageCard.svelte +112 -112
- package/dist/layout/mailing/MailingMessageViewer.svelte +87 -87
- package/dist/layout/mailing/MailingModule.svelte +448 -448
- package/dist/styles/docs.css +615 -615
- package/dist/styles/tf-layout.css +185 -185
- package/dist/themes/ThemeProvider.svelte +20 -20
- package/dist/types/index.d.ts +2 -0
- package/dist/typography/heading/Heading.svelte +35 -35
- package/dist/ui/accordion/Accordion.svelte +49 -49
- package/dist/ui/accordion/AccordionItem.svelte +173 -173
- package/dist/ui/alert/Alert.svelte +83 -83
- package/dist/ui/alertDialog/AlertDialog.svelte +40 -40
- package/dist/ui/avatar/Avatar.svelte +77 -77
- package/dist/ui/box/Box.svelte +28 -28
- package/dist/ui/breadcrumb/Breadcrumb.svelte +39 -39
- package/dist/ui/buttons/ActionButton.svelte +234 -234
- package/dist/ui/buttons/Button.svelte +102 -102
- package/dist/ui/buttons/GradientButton.svelte +59 -59
- package/dist/ui/datatable/Datatable.svelte +525 -525
- package/dist/ui/drawer/Drawer.svelte +300 -300
- package/dist/ui/dropdown/Dropdown.svelte +36 -36
- package/dist/ui/dropdown/DropdownDivider.svelte +11 -11
- package/dist/ui/dropdown/DropdownGroup.svelte +14 -14
- package/dist/ui/dropdown/DropdownHeader.svelte +14 -14
- package/dist/ui/dropdown/DropdownItem.svelte +52 -52
- package/dist/ui/footer/Footer.svelte +15 -15
- package/dist/ui/footer/FooterBrand.svelte +37 -37
- package/dist/ui/footer/FooterCopyright.svelte +45 -45
- package/dist/ui/footer/FooterIcon.svelte +22 -22
- package/dist/ui/footer/FooterLink.svelte +33 -33
- package/dist/ui/footer/FooterLinkGroup.svelte +13 -13
- package/dist/ui/icons/IconifyIcon.svelte +7 -7
- package/dist/ui/indicator/Indicator.svelte +42 -42
- package/dist/ui/modal/Modal.svelte +265 -265
- package/dist/ui/notificationList/NotificationList.svelte +123 -123
- package/dist/ui/pageLoader/PageLoader.svelte +14 -14
- package/dist/ui/pageLoader/PageLoader2.svelte +99 -0
- package/dist/ui/pageLoader/PageLoader2.svelte.d.ts +24 -0
- package/dist/ui/pageLoader/index.d.ts +2 -1
- package/dist/ui/pageLoader/index.js +2 -1
- package/dist/ui/paginate/Paginate.svelte +96 -96
- package/dist/ui/speedDial/SpeedDial.svelte +77 -77
- package/dist/ui/speedDial/SpeedDialButton.svelte +75 -75
- package/dist/ui/speedDial/SpeedDialTrigger.svelte +79 -79
- package/dist/ui/tab/Tab.svelte +93 -67
- package/dist/ui/table/Table.svelte +396 -396
- package/dist/ui/tableLoader/TableLoader.svelte +24 -24
- package/dist/ui/toast/Toast.svelte +337 -337
- package/dist/ui/toast/Toast.svelte.d.ts +10 -10
- package/dist/ui/toolbar/Toolbar.svelte +59 -59
- package/dist/ui/toolbar/ToolbarButton.svelte +56 -56
- package/dist/ui/toolbar/ToolbarGroup.svelte +43 -43
- package/dist/ui/tooltip/Tooltip.svelte +51 -51
- package/dist/utils/Popper.svelte +257 -257
- package/dist/utils/closeButton/CloseButton.svelte +88 -88
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.js +3 -3
- package/dist/utils/singleSelection.svelte.js +48 -48
- package/dist/youtube/index.svelte +12 -12
- package/package.json +1 -1
|
@@ -1,174 +1,174 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import IconifyIcon from '../../ui/icons/IconifyIcon.svelte';
|
|
3
|
-
import { scale, slide } from 'svelte/transition';
|
|
4
|
-
import type { MailToolBarProps } from './index.js';
|
|
5
|
-
import { Input } from '../../forms/input/index.js';
|
|
6
|
-
import MailPaginator from './MailPaginator.svelte';
|
|
7
|
-
import { Tooltip } from '../../ui/tooltip/index.js';
|
|
8
|
-
|
|
9
|
-
let {
|
|
10
|
-
onBackClick,
|
|
11
|
-
onRefreshClick,
|
|
12
|
-
onComposeClick,
|
|
13
|
-
selectedMails = [],
|
|
14
|
-
showComposeButton = true,
|
|
15
|
-
showBackButton = true,
|
|
16
|
-
pageInfo = {
|
|
17
|
-
currentPage: 0,
|
|
18
|
-
pageSize: 0,
|
|
19
|
-
totalCount: 0,
|
|
20
|
-
hasNextPage: false,
|
|
21
|
-
hasPreviousPage: false
|
|
22
|
-
},
|
|
23
|
-
showPagination = true,
|
|
24
|
-
showSearch = true,
|
|
25
|
-
customFilterComponent,
|
|
26
|
-
onsearchChange,
|
|
27
|
-
onNextPageClick,
|
|
28
|
-
onPrevPageClick,
|
|
29
|
-
showArchiveButton = true,
|
|
30
|
-
onArchiveClick,
|
|
31
|
-
showDeleteButton = true,
|
|
32
|
-
onDeleteClick,
|
|
33
|
-
showMarkReadButton = true,
|
|
34
|
-
onToggleMarkReadClick,
|
|
35
|
-
isReadActive = false,
|
|
36
|
-
showFavoriteButton = true,
|
|
37
|
-
onToggleFavoriteClick,
|
|
38
|
-
showMarkAsSpamButton = true,
|
|
39
|
-
onMarkAsSpamClick,
|
|
40
|
-
isFavoriteActive = true
|
|
41
|
-
}: MailToolBarProps = $props();
|
|
42
|
-
|
|
43
|
-
let openFilter = $state(false);
|
|
44
|
-
</script>
|
|
45
|
-
|
|
46
|
-
<div class="flex h-full w-full items-center justify-between">
|
|
47
|
-
<div class="flex items-center">
|
|
48
|
-
<div class="flex items-center">
|
|
49
|
-
<div class:hidden={!showBackButton} class="ml-3 flex items-center">
|
|
50
|
-
<button
|
|
51
|
-
onclick={onBackClick}
|
|
52
|
-
class="grid h-8 w-8 place-content-center rounded-full border border-gray-300 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
53
|
-
>
|
|
54
|
-
<IconifyIcon icon="ic:round-arrow-back-ios-new" class="flex h-5 w-5 justify-center" />
|
|
55
|
-
</button>
|
|
56
|
-
<Tooltip placement="bottom">Back</Tooltip>
|
|
57
|
-
</div>
|
|
58
|
-
<div class="ml-3 flex items-center">
|
|
59
|
-
<button
|
|
60
|
-
onclick={onRefreshClick}
|
|
61
|
-
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
62
|
-
>
|
|
63
|
-
<IconifyIcon icon="mdi:refresh" class="flex h-5 w-5 justify-center" />
|
|
64
|
-
</button>
|
|
65
|
-
<Tooltip placement="bottom">Refresh</Tooltip>
|
|
66
|
-
</div>
|
|
67
|
-
<span class:hidden={selectedMails.length === 0} in:scale class="mx-3 h-6 w-[.5px] bg-gray-300"
|
|
68
|
-
></span>
|
|
69
|
-
<div class="flex items-center space-x-2" class:hidden={selectedMails.length === 0} in:scale>
|
|
70
|
-
<button
|
|
71
|
-
onclick={() => onArchiveClick?.()}
|
|
72
|
-
class:hidden={!showArchiveButton}
|
|
73
|
-
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
74
|
-
>
|
|
75
|
-
<IconifyIcon icon="mdi:archive-arrow-down-outline" class="flex h-5 w-5 justify-center" />
|
|
76
|
-
</button>
|
|
77
|
-
<Tooltip placement="bottom">Archive</Tooltip>
|
|
78
|
-
|
|
79
|
-
<button
|
|
80
|
-
class:hidden={!showMarkAsSpamButton}
|
|
81
|
-
onclick={() => onMarkAsSpamClick?.()}
|
|
82
|
-
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
83
|
-
>
|
|
84
|
-
<IconifyIcon icon="solar:danger-triangle-outline" class="flex h-5 w-5 justify-center" />
|
|
85
|
-
</button>
|
|
86
|
-
<Tooltip placement="bottom">Mark As Spam</Tooltip>
|
|
87
|
-
|
|
88
|
-
<button
|
|
89
|
-
class:hidden={!showDeleteButton}
|
|
90
|
-
onclick={() => onDeleteClick?.()}
|
|
91
|
-
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
92
|
-
>
|
|
93
|
-
<IconifyIcon icon="mdi:delete-outline" class="flex h-5 w-5 justify-center" />
|
|
94
|
-
</button>
|
|
95
|
-
<Tooltip placement="bottom">Delete</Tooltip>
|
|
96
|
-
</div>
|
|
97
|
-
<span class:hidden={selectedMails.length === 0} in:scale class="mx-3 h-6 w-[.5px] bg-gray-300"
|
|
98
|
-
></span>
|
|
99
|
-
<div class:hidden={selectedMails.length === 0} in:scale class="flex items-center space-x-2">
|
|
100
|
-
<button
|
|
101
|
-
class:hidden={!showMarkReadButton}
|
|
102
|
-
onclick={() => onToggleMarkReadClick?.(isReadActive ? 'unread' : 'read')}
|
|
103
|
-
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
104
|
-
>
|
|
105
|
-
<IconifyIcon
|
|
106
|
-
icon={isReadActive ? 'mdi:email-outline' : 'mdi:email-open-outline'}
|
|
107
|
-
class="flex h-5 w-5 justify-center"
|
|
108
|
-
/>
|
|
109
|
-
</button>
|
|
110
|
-
<Tooltip placement="bottom">{isReadActive ? 'Mark As Unread' : 'Mark As Read'}</Tooltip>
|
|
111
|
-
|
|
112
|
-
<button
|
|
113
|
-
class:hidden={!showFavoriteButton}
|
|
114
|
-
onclick={() => onToggleFavoriteClick?.(isFavoriteActive ? 'unfavorite' : 'favorite')}
|
|
115
|
-
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
116
|
-
>
|
|
117
|
-
<IconifyIcon
|
|
118
|
-
icon={isFavoriteActive ? 'mdi:star' : 'mdi:star-outline'}
|
|
119
|
-
class="flex h-5 w-5 justify-center"
|
|
120
|
-
/>
|
|
121
|
-
</button>
|
|
122
|
-
<Tooltip placement="bottom">{isFavoriteActive ? 'Unfavorite' : 'Favorite'}</Tooltip>
|
|
123
|
-
</div>
|
|
124
|
-
<span class:hidden={!showSearch} class="mx-3 h-6 w-[.5px] bg-gray-300"></span>
|
|
125
|
-
<div
|
|
126
|
-
class:hidden={!showSearch}
|
|
127
|
-
class="flex items-center justify-center rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100"
|
|
128
|
-
>
|
|
129
|
-
<IconifyIcon icon="iconamoon:search-thin" style="font-size: 16px;" />
|
|
130
|
-
<Input
|
|
131
|
-
type="search"
|
|
132
|
-
class="h-5 w-44 border-none text-xs outline-none placeholder:text-xs focus:ring-0"
|
|
133
|
-
placeholder="Search..."
|
|
134
|
-
oninput={(e) => onsearchChange?.((e.target as HTMLInputElement).value)}
|
|
135
|
-
/>
|
|
136
|
-
</div>
|
|
137
|
-
<div class:hidden={!customFilterComponent} class="relative pl-2">
|
|
138
|
-
<button
|
|
139
|
-
onclick={() => (openFilter = !openFilter)}
|
|
140
|
-
class="flex items-center justify-center gap-2 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
141
|
-
>
|
|
142
|
-
<IconifyIcon icon="mage:filter" />
|
|
143
|
-
<span>Filters</span>
|
|
144
|
-
</button>
|
|
145
|
-
{#if openFilter}
|
|
146
|
-
<div transition:slide class="absolute z-20 mt-2 w-80 rounded-md bg-white shadow">
|
|
147
|
-
{@render customFilterComponent?.()}
|
|
148
|
-
</div>
|
|
149
|
-
{/if}
|
|
150
|
-
</div>
|
|
151
|
-
<span class:hidden={!showComposeButton} class="mx-3 h-6 w-[.5px] bg-gray-300"></span>
|
|
152
|
-
<div class:hidden={!showComposeButton} class="flex h-8 items-center">
|
|
153
|
-
<button
|
|
154
|
-
onclick={() => onComposeClick?.()}
|
|
155
|
-
class="flex items-center justify-center space-x-2 rounded bg-blue-600 px-6 py-1.5 text-gray-100 transition duration-150 hover:bg-blue-700"
|
|
156
|
-
>
|
|
157
|
-
<IconifyIcon icon="ic:round-add" style="font-size: 16px;" />
|
|
158
|
-
<span class="text-sm">Compose</span>
|
|
159
|
-
</button>
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
</div>
|
|
163
|
-
<div class:hidden={!showPagination}>
|
|
164
|
-
<MailPaginator
|
|
165
|
-
currentPage={pageInfo.currentPage}
|
|
166
|
-
totalCount={pageInfo.totalCount}
|
|
167
|
-
pageSize={pageInfo.pageSize}
|
|
168
|
-
hasNextPage={pageInfo.hasNextPage}
|
|
169
|
-
hasPreviousPage={pageInfo.hasPreviousPage}
|
|
170
|
-
onNextClick={() => onNextPageClick?.()}
|
|
171
|
-
onPreviousClick={() => onPrevPageClick?.()}
|
|
172
|
-
/>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import IconifyIcon from '../../ui/icons/IconifyIcon.svelte';
|
|
3
|
+
import { scale, slide } from 'svelte/transition';
|
|
4
|
+
import type { MailToolBarProps } from './index.js';
|
|
5
|
+
import { Input } from '../../forms/input/index.js';
|
|
6
|
+
import MailPaginator from './MailPaginator.svelte';
|
|
7
|
+
import { Tooltip } from '../../ui/tooltip/index.js';
|
|
8
|
+
|
|
9
|
+
let {
|
|
10
|
+
onBackClick,
|
|
11
|
+
onRefreshClick,
|
|
12
|
+
onComposeClick,
|
|
13
|
+
selectedMails = [],
|
|
14
|
+
showComposeButton = true,
|
|
15
|
+
showBackButton = true,
|
|
16
|
+
pageInfo = {
|
|
17
|
+
currentPage: 0,
|
|
18
|
+
pageSize: 0,
|
|
19
|
+
totalCount: 0,
|
|
20
|
+
hasNextPage: false,
|
|
21
|
+
hasPreviousPage: false
|
|
22
|
+
},
|
|
23
|
+
showPagination = true,
|
|
24
|
+
showSearch = true,
|
|
25
|
+
customFilterComponent,
|
|
26
|
+
onsearchChange,
|
|
27
|
+
onNextPageClick,
|
|
28
|
+
onPrevPageClick,
|
|
29
|
+
showArchiveButton = true,
|
|
30
|
+
onArchiveClick,
|
|
31
|
+
showDeleteButton = true,
|
|
32
|
+
onDeleteClick,
|
|
33
|
+
showMarkReadButton = true,
|
|
34
|
+
onToggleMarkReadClick,
|
|
35
|
+
isReadActive = false,
|
|
36
|
+
showFavoriteButton = true,
|
|
37
|
+
onToggleFavoriteClick,
|
|
38
|
+
showMarkAsSpamButton = true,
|
|
39
|
+
onMarkAsSpamClick,
|
|
40
|
+
isFavoriteActive = true
|
|
41
|
+
}: MailToolBarProps = $props();
|
|
42
|
+
|
|
43
|
+
let openFilter = $state(false);
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<div class="flex h-full w-full items-center justify-between">
|
|
47
|
+
<div class="flex items-center">
|
|
48
|
+
<div class="flex items-center">
|
|
49
|
+
<div class:hidden={!showBackButton} class="ml-3 flex items-center">
|
|
50
|
+
<button
|
|
51
|
+
onclick={onBackClick}
|
|
52
|
+
class="grid h-8 w-8 place-content-center rounded-full border border-gray-300 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
53
|
+
>
|
|
54
|
+
<IconifyIcon icon="ic:round-arrow-back-ios-new" class="flex h-5 w-5 justify-center" />
|
|
55
|
+
</button>
|
|
56
|
+
<Tooltip placement="bottom">Back</Tooltip>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="ml-3 flex items-center">
|
|
59
|
+
<button
|
|
60
|
+
onclick={onRefreshClick}
|
|
61
|
+
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
62
|
+
>
|
|
63
|
+
<IconifyIcon icon="mdi:refresh" class="flex h-5 w-5 justify-center" />
|
|
64
|
+
</button>
|
|
65
|
+
<Tooltip placement="bottom">Refresh</Tooltip>
|
|
66
|
+
</div>
|
|
67
|
+
<span class:hidden={selectedMails.length === 0} in:scale class="mx-3 h-6 w-[.5px] bg-gray-300"
|
|
68
|
+
></span>
|
|
69
|
+
<div class="flex items-center space-x-2" class:hidden={selectedMails.length === 0} in:scale>
|
|
70
|
+
<button
|
|
71
|
+
onclick={() => onArchiveClick?.()}
|
|
72
|
+
class:hidden={!showArchiveButton}
|
|
73
|
+
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
74
|
+
>
|
|
75
|
+
<IconifyIcon icon="mdi:archive-arrow-down-outline" class="flex h-5 w-5 justify-center" />
|
|
76
|
+
</button>
|
|
77
|
+
<Tooltip placement="bottom">Archive</Tooltip>
|
|
78
|
+
|
|
79
|
+
<button
|
|
80
|
+
class:hidden={!showMarkAsSpamButton}
|
|
81
|
+
onclick={() => onMarkAsSpamClick?.()}
|
|
82
|
+
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
83
|
+
>
|
|
84
|
+
<IconifyIcon icon="solar:danger-triangle-outline" class="flex h-5 w-5 justify-center" />
|
|
85
|
+
</button>
|
|
86
|
+
<Tooltip placement="bottom">Mark As Spam</Tooltip>
|
|
87
|
+
|
|
88
|
+
<button
|
|
89
|
+
class:hidden={!showDeleteButton}
|
|
90
|
+
onclick={() => onDeleteClick?.()}
|
|
91
|
+
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
92
|
+
>
|
|
93
|
+
<IconifyIcon icon="mdi:delete-outline" class="flex h-5 w-5 justify-center" />
|
|
94
|
+
</button>
|
|
95
|
+
<Tooltip placement="bottom">Delete</Tooltip>
|
|
96
|
+
</div>
|
|
97
|
+
<span class:hidden={selectedMails.length === 0} in:scale class="mx-3 h-6 w-[.5px] bg-gray-300"
|
|
98
|
+
></span>
|
|
99
|
+
<div class:hidden={selectedMails.length === 0} in:scale class="flex items-center space-x-2">
|
|
100
|
+
<button
|
|
101
|
+
class:hidden={!showMarkReadButton}
|
|
102
|
+
onclick={() => onToggleMarkReadClick?.(isReadActive ? 'unread' : 'read')}
|
|
103
|
+
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
104
|
+
>
|
|
105
|
+
<IconifyIcon
|
|
106
|
+
icon={isReadActive ? 'mdi:email-outline' : 'mdi:email-open-outline'}
|
|
107
|
+
class="flex h-5 w-5 justify-center"
|
|
108
|
+
/>
|
|
109
|
+
</button>
|
|
110
|
+
<Tooltip placement="bottom">{isReadActive ? 'Mark As Unread' : 'Mark As Read'}</Tooltip>
|
|
111
|
+
|
|
112
|
+
<button
|
|
113
|
+
class:hidden={!showFavoriteButton}
|
|
114
|
+
onclick={() => onToggleFavoriteClick?.(isFavoriteActive ? 'unfavorite' : 'favorite')}
|
|
115
|
+
class="rounded-lg border border-gray-300 px-2 py-1 text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
116
|
+
>
|
|
117
|
+
<IconifyIcon
|
|
118
|
+
icon={isFavoriteActive ? 'mdi:star' : 'mdi:star-outline'}
|
|
119
|
+
class="flex h-5 w-5 justify-center"
|
|
120
|
+
/>
|
|
121
|
+
</button>
|
|
122
|
+
<Tooltip placement="bottom">{isFavoriteActive ? 'Unfavorite' : 'Favorite'}</Tooltip>
|
|
123
|
+
</div>
|
|
124
|
+
<span class:hidden={!showSearch} class="mx-3 h-6 w-[.5px] bg-gray-300"></span>
|
|
125
|
+
<div
|
|
126
|
+
class:hidden={!showSearch}
|
|
127
|
+
class="flex items-center justify-center rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100"
|
|
128
|
+
>
|
|
129
|
+
<IconifyIcon icon="iconamoon:search-thin" style="font-size: 16px;" />
|
|
130
|
+
<Input
|
|
131
|
+
type="search"
|
|
132
|
+
class="h-5 w-44 border-none text-xs outline-none placeholder:text-xs focus:ring-0"
|
|
133
|
+
placeholder="Search..."
|
|
134
|
+
oninput={(e) => onsearchChange?.((e.target as HTMLInputElement).value)}
|
|
135
|
+
/>
|
|
136
|
+
</div>
|
|
137
|
+
<div class:hidden={!customFilterComponent} class="relative pl-2">
|
|
138
|
+
<button
|
|
139
|
+
onclick={() => (openFilter = !openFilter)}
|
|
140
|
+
class="flex items-center justify-center gap-2 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
141
|
+
>
|
|
142
|
+
<IconifyIcon icon="mage:filter" />
|
|
143
|
+
<span>Filters</span>
|
|
144
|
+
</button>
|
|
145
|
+
{#if openFilter}
|
|
146
|
+
<div transition:slide class="absolute z-20 mt-2 w-80 rounded-md bg-white shadow">
|
|
147
|
+
{@render customFilterComponent?.()}
|
|
148
|
+
</div>
|
|
149
|
+
{/if}
|
|
150
|
+
</div>
|
|
151
|
+
<span class:hidden={!showComposeButton} class="mx-3 h-6 w-[.5px] bg-gray-300"></span>
|
|
152
|
+
<div class:hidden={!showComposeButton} class="flex h-8 items-center">
|
|
153
|
+
<button
|
|
154
|
+
onclick={() => onComposeClick?.()}
|
|
155
|
+
class="flex items-center justify-center space-x-2 rounded bg-blue-600 px-6 py-1.5 text-gray-100 transition duration-150 hover:bg-blue-700"
|
|
156
|
+
>
|
|
157
|
+
<IconifyIcon icon="ic:round-add" style="font-size: 16px;" />
|
|
158
|
+
<span class="text-sm">Compose</span>
|
|
159
|
+
</button>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
<div class:hidden={!showPagination}>
|
|
164
|
+
<MailPaginator
|
|
165
|
+
currentPage={pageInfo.currentPage}
|
|
166
|
+
totalCount={pageInfo.totalCount}
|
|
167
|
+
pageSize={pageInfo.pageSize}
|
|
168
|
+
hasNextPage={pageInfo.hasNextPage}
|
|
169
|
+
hasPreviousPage={pageInfo.hasPreviousPage}
|
|
170
|
+
onNextClick={() => onNextPageClick?.()}
|
|
171
|
+
onPreviousClick={() => onPrevPageClick?.()}
|
|
172
|
+
/>
|
|
173
|
+
</div>
|
|
174
|
+
</div>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
interface Props {
|
|
3
|
-
content: any;
|
|
4
|
-
}
|
|
5
|
-
let { content }: Props = $props();
|
|
6
|
-
</script>
|
|
7
|
-
|
|
8
|
-
<div class="h-full w-full">
|
|
9
|
-
{@html content}
|
|
10
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
content: any;
|
|
4
|
+
}
|
|
5
|
+
let { content }: Props = $props();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<div class="h-full w-full">
|
|
9
|
+
{@html content}
|
|
10
|
+
</div>
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Avatar } from '../../ui/avatar/index.js';
|
|
3
|
-
import DropdownDivider from '../../ui/dropdown/DropdownDivider.svelte';
|
|
4
|
-
import { IconifyIcon } from '../../ui/icons/index.js';
|
|
5
|
-
import type { MailingHeaderProps } from './types.js';
|
|
6
|
-
|
|
7
|
-
let { data, replyType = $bindable(undefined), showReplies }: MailingHeaderProps = $props();
|
|
8
|
-
</script>
|
|
9
|
-
|
|
10
|
-
<div class=" w-full bg-white p-4">
|
|
11
|
-
<div class="flex h-full w-full flex-col">
|
|
12
|
-
<p class="text-xl font-light">{data?.subject}</p>
|
|
13
|
-
<DropdownDivider />
|
|
14
|
-
<div class="flex justify-between pt-3">
|
|
15
|
-
<div class="flex items-center gap-2">
|
|
16
|
-
<Avatar class="h-10 w-10 bg-blue-600 text-white">{data?.user?.initials}</Avatar>
|
|
17
|
-
<div>
|
|
18
|
-
<p class="text-sm">
|
|
19
|
-
{`${data?.user?.firstName} ${data?.user?.surname} - ${data?.user?.staffNumber}`}
|
|
20
|
-
</p>
|
|
21
|
-
<div class="flex items-center gap-1">
|
|
22
|
-
<p class="text-xs text-gray-500 antialiased">to {data?.to}</p>
|
|
23
|
-
<button class="grid place-content-center rounded-full p-1.5 hover:bg-gray-200">
|
|
24
|
-
<IconifyIcon icon="solar:alt-arrow-down-bold" style="font-size: 14px;" />
|
|
25
|
-
</button>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
<div class="flex items-center gap-3" class:hidden={!showReplies}>
|
|
30
|
-
<button
|
|
31
|
-
class="flex items-center gap-1 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
32
|
-
onclick={() => (replyType = 'reply')}
|
|
33
|
-
>
|
|
34
|
-
<IconifyIcon icon="bi:reply" style="font-size: 17px;" />
|
|
35
|
-
Reply
|
|
36
|
-
</button>
|
|
37
|
-
<button
|
|
38
|
-
class="flex items-center gap-1 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
39
|
-
onclick={() => (replyType = 'reply-all')}
|
|
40
|
-
>
|
|
41
|
-
<IconifyIcon icon="ri:reply-all-line" style="font-size: 17px;" />
|
|
42
|
-
Reply all
|
|
43
|
-
</button>
|
|
44
|
-
<button
|
|
45
|
-
class="flex items-center gap-1 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
46
|
-
onclick={() => (replyType = 'forward')}
|
|
47
|
-
>
|
|
48
|
-
<IconifyIcon icon="mdi:forward-outline" style="font-size: 17px;" />
|
|
49
|
-
Forward
|
|
50
|
-
</button>
|
|
51
|
-
</div>
|
|
52
|
-
</div>
|
|
53
|
-
<!-- <Divider morePadding={false} /> -->
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Avatar } from '../../ui/avatar/index.js';
|
|
3
|
+
import DropdownDivider from '../../ui/dropdown/DropdownDivider.svelte';
|
|
4
|
+
import { IconifyIcon } from '../../ui/icons/index.js';
|
|
5
|
+
import type { MailingHeaderProps } from './types.js';
|
|
6
|
+
|
|
7
|
+
let { data, replyType = $bindable(undefined), showReplies }: MailingHeaderProps = $props();
|
|
8
|
+
</script>
|
|
9
|
+
|
|
10
|
+
<div class=" w-full bg-white p-4">
|
|
11
|
+
<div class="flex h-full w-full flex-col">
|
|
12
|
+
<p class="text-xl font-light">{data?.subject}</p>
|
|
13
|
+
<DropdownDivider />
|
|
14
|
+
<div class="flex justify-between pt-3">
|
|
15
|
+
<div class="flex items-center gap-2">
|
|
16
|
+
<Avatar class="h-10 w-10 bg-blue-600 text-white">{data?.user?.initials}</Avatar>
|
|
17
|
+
<div>
|
|
18
|
+
<p class="text-sm">
|
|
19
|
+
{`${data?.user?.firstName} ${data?.user?.surname} - ${data?.user?.staffNumber}`}
|
|
20
|
+
</p>
|
|
21
|
+
<div class="flex items-center gap-1">
|
|
22
|
+
<p class="text-xs text-gray-500 antialiased">to {data?.to}</p>
|
|
23
|
+
<button class="grid place-content-center rounded-full p-1.5 hover:bg-gray-200">
|
|
24
|
+
<IconifyIcon icon="solar:alt-arrow-down-bold" style="font-size: 14px;" />
|
|
25
|
+
</button>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="flex items-center gap-3" class:hidden={!showReplies}>
|
|
30
|
+
<button
|
|
31
|
+
class="flex items-center gap-1 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
32
|
+
onclick={() => (replyType = 'reply')}
|
|
33
|
+
>
|
|
34
|
+
<IconifyIcon icon="bi:reply" style="font-size: 17px;" />
|
|
35
|
+
Reply
|
|
36
|
+
</button>
|
|
37
|
+
<button
|
|
38
|
+
class="flex items-center gap-1 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
39
|
+
onclick={() => (replyType = 'reply-all')}
|
|
40
|
+
>
|
|
41
|
+
<IconifyIcon icon="ri:reply-all-line" style="font-size: 17px;" />
|
|
42
|
+
Reply all
|
|
43
|
+
</button>
|
|
44
|
+
<button
|
|
45
|
+
class="flex items-center gap-1 rounded-lg border border-gray-300 px-2 py-1 text-sm text-gray-700 shadow transition duration-100 hover:bg-gray-200"
|
|
46
|
+
onclick={() => (replyType = 'forward')}
|
|
47
|
+
>
|
|
48
|
+
<IconifyIcon icon="mdi:forward-outline" style="font-size: 17px;" />
|
|
49
|
+
Forward
|
|
50
|
+
</button>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
<!-- <Divider morePadding={false} /> -->
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|