@nyaruka/temba-components 0.159.3 → 0.159.4
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/CHANGELOG.md +6 -0
- package/dist/temba-components.js +627 -372
- package/dist/temba-components.js.map +1 -1
- package/package.json +1 -1
- package/src/form/Checkbox.ts +37 -11
- package/src/layout/PageHeader.ts +35 -13
- package/src/list/ContactList.ts +69 -19
- package/src/list/ContentList.ts +701 -270
- package/src/list/MsgList.ts +11 -11
package/src/list/MsgList.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { Msg } from '../interfaces';
|
|
|
8
8
|
* `msgs/msg_list.html` table. Reverse-chronological; the message
|
|
9
9
|
* cell carries the body text with its attachment thumbnails right
|
|
10
10
|
* after it and the flow / label pills pushed to the trailing edge,
|
|
11
|
-
* with a
|
|
11
|
+
* with a timedate timestamp closing the row.
|
|
12
12
|
*/
|
|
13
13
|
export class MsgList extends ContentList<Msg> {
|
|
14
14
|
static get styles() {
|
|
@@ -100,11 +100,13 @@ export class MsgList extends ContentList<Msg> {
|
|
|
100
100
|
this.searchPlaceholder = 'Search messages';
|
|
101
101
|
// Messages page 100 at a time, matching rapidpro's msg list.
|
|
102
102
|
this.pageSize = 100;
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
//
|
|
106
|
-
//
|
|
107
|
-
|
|
103
|
+
// Auto layout so the Contact / Sent columns size to their content
|
|
104
|
+
// (no stranded width on the short Sent value), while the Message
|
|
105
|
+
// column is a `grow` column — under auto layout it claims zero
|
|
106
|
+
// intrinsic width and ellipsis-truncates against the leftover space
|
|
107
|
+
// rather than stretching the table. minTableWidth lets the list
|
|
108
|
+
// scroll horizontally once the container is too narrow to keep the
|
|
109
|
+
// columns usable, rather than clipping anything.
|
|
108
110
|
this.minTableWidth = '640px';
|
|
109
111
|
this.columns = [
|
|
110
112
|
{
|
|
@@ -117,9 +119,7 @@ export class MsgList extends ContentList<Msg> {
|
|
|
117
119
|
{
|
|
118
120
|
key: 'created_on',
|
|
119
121
|
label: 'Sent',
|
|
120
|
-
|
|
121
|
-
align: 'right',
|
|
122
|
-
pinned: 'right'
|
|
122
|
+
align: 'right'
|
|
123
123
|
}
|
|
124
124
|
];
|
|
125
125
|
this.bulkActions = [
|
|
@@ -172,7 +172,7 @@ export class MsgList extends ContentList<Msg> {
|
|
|
172
172
|
`;
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
/** The sent cell —
|
|
175
|
+
/** The sent cell — timedate timestamp with an optional channel-log
|
|
176
176
|
* icon to its right. The icon is rendered when the server includes
|
|
177
177
|
* a logs_url on the row (permission- and retention-gated
|
|
178
178
|
* server-side). stopPropagation keeps the row's contact navigation
|
|
@@ -181,7 +181,7 @@ export class MsgList extends ContentList<Msg> {
|
|
|
181
181
|
if (!item.created_on) return '';
|
|
182
182
|
return html`
|
|
183
183
|
<div class="sent-cell">
|
|
184
|
-
<temba-date value=${item.created_on} display="
|
|
184
|
+
<temba-date value=${item.created_on} display="timedate"></temba-date>
|
|
185
185
|
${item.logs_url && this.isSafeHref(item.logs_url)
|
|
186
186
|
? html`
|
|
187
187
|
<a
|