@limetech/lime-crm-building-blocks 2.2.1 → 2.3.1
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 +18 -0
- package/dist/cjs/lime-crm-building-blocks.cjs.js +1 -1
- package/dist/cjs/limebb-alert-dialog.cjs.entry.js +1 -1
- package/dist/cjs/limebb-browser.cjs.entry.js +2 -2
- package/dist/cjs/limebb-chat-icon-list_3.cjs.entry.js +4 -4
- package/dist/cjs/limebb-chat-list.cjs.entry.js +82 -103
- package/dist/cjs/limebb-color-palette-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-color-palette-swatches.cjs.entry.js +1 -1
- package/dist/cjs/limebb-composer-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/limebb-currency-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-dashboard-widget.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-date-range.cjs.entry.js +1 -1
- package/dist/cjs/limebb-document-chips.cjs.entry.js +1 -1
- package/dist/cjs/limebb-document-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-document-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-item-thumbnail-file-info.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed-timeline-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-feed.cjs.entry.js +1 -1
- package/dist/cjs/limebb-filter-chip_6.cjs.entry.js +7 -7
- package/dist/cjs/limebb-icon-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile-format.cjs.entry.js +1 -1
- package/dist/cjs/limebb-info-tile.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-group.cjs.entry.js +1 -1
- package/dist/cjs/limebb-kanban-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-builder.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-filter-comparison_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-order-by-editor_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-order-by-item.cjs.entry.js +2 -2
- package/dist/cjs/limebb-lime-query-response-format-builder.cjs.entry.js +1 -1
- package/dist/cjs/limebb-lime-query-response-format-editor_2.cjs.entry.js +1 -1
- package/dist/cjs/limebb-live-docs-info.cjs.entry.js +2 -2
- package/dist/cjs/limebb-locale-picker.cjs.entry.js +1 -1
- package/dist/cjs/limebb-mention-group-counter.cjs.entry.js +2 -2
- package/dist/cjs/limebb-navigation-button_2.cjs.entry.js +2 -2
- package/dist/cjs/limebb-notification-item.cjs.entry.js +1 -1
- package/dist/cjs/limebb-percentage-visualizer.cjs.entry.js +2 -2
- package/dist/cjs/limebb-rule-chip-popover.cjs.entry.js +1 -1
- package/dist/cjs/limebb-rule-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-rule-gate.cjs.entry.js +1 -1
- package/dist/cjs/limebb-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/limebb-trend-indicator.cjs.entry.js +1 -1
- package/dist/cjs/limebb-value-comparison-editor.cjs.entry.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/alert-dialog/alert-dialog.js +1 -1
- package/dist/collection/components/browser/browser.js +2 -2
- package/dist/collection/components/chat-list/chat-icon-list/chat-icon-list.js +1 -1
- package/dist/collection/components/chat-list/chat-item/chat-item.js +2 -2
- package/dist/collection/components/chat-list/chat-list.css +23 -1
- package/dist/collection/components/chat-list/chat-list.js +50 -23
- package/dist/collection/components/chat-list/scroll-anchor.js +33 -38
- package/dist/collection/components/chat-list/typing-indicator/typing-indicator.js +1 -1
- package/dist/collection/components/color-palette-picker/color-palette-picker.js +1 -1
- package/dist/collection/components/color-palette-picker/color-palette-swatches/color-palette-swatches.js +1 -1
- package/dist/collection/components/composer-toolbar/composer-toolbar.js +2 -2
- package/dist/collection/components/currency-picker/currency-picker.js +1 -1
- package/dist/collection/components/dashboard-widget/dashboard-widget.js +1 -1
- package/dist/collection/components/date-picker/date-picker.js +1 -1
- package/dist/collection/components/date-range/date-range.js +1 -1
- package/dist/collection/components/document-chips/document-chips.js +1 -1
- package/dist/collection/components/document-picker/document-item/document-item.js +2 -2
- package/dist/collection/components/document-picker/document-picker.js +1 -1
- package/dist/collection/components/feed/feed-item/feed-timeline-item.js +1 -1
- package/dist/collection/components/feed/feed-item-thumbnail-file-info/feed-item-thumbnail-file-info.js +1 -1
- package/dist/collection/components/feed/feed.js +1 -1
- package/dist/collection/components/filter-chip/filter-chip.js +2 -2
- package/dist/collection/components/filter-condition-picker/filter-condition-picker.js +1 -1
- package/dist/collection/components/icon-picker/icon-picker.js +1 -1
- package/dist/collection/components/info-tile/format/config/info-tile-format.js +1 -1
- package/dist/collection/components/info-tile/info-tile.js +1 -1
- package/dist/collection/components/kanban/kanban-group/kanban-group.js +1 -1
- package/dist/collection/components/kanban/kanban-item/kanban-item.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison-editor.js +1 -1
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-comparison.js +2 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-group.js +2 -2
- package/dist/collection/components/lime-query-builder/expressions/lime-query-filter-not.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/lime-query-response-format-builder.js +1 -1
- package/dist/collection/components/lime-query-builder/limetype-field/limetype-field.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-editor.js +1 -1
- package/dist/collection/components/lime-query-builder/order-by/order-by-item.js +2 -2
- package/dist/collection/components/lime-query-builder/response-format/response-format-item.js +1 -1
- package/dist/collection/components/limeobject/file-viewer/live-docs-info.js +2 -2
- package/dist/collection/components/locale-picker/locale-picker.js +1 -1
- package/dist/collection/components/notification-list/notification-item/notification-item.js +1 -1
- package/dist/collection/components/percentage-visualizer/percentage-visualizer.js +2 -2
- package/dist/collection/components/rule-editor/rule-chip-popover/rule-chip-popover.js +1 -1
- package/dist/collection/components/rule-editor/rule-editor.js +1 -1
- package/dist/collection/components/rule-editor/value-comparison-editor/value-comparison-editor.js +1 -1
- package/dist/collection/components/rule-gate/rule-gate.js +1 -1
- package/dist/collection/components/summary-popover/summary-popover.js +2 -2
- package/dist/collection/components/text-editor/mention-group-counter.js +2 -2
- package/dist/collection/components/text-editor/text-editor.js +1 -1
- package/dist/collection/components/trend-indicator/trend-indicator.js +1 -1
- package/dist/components/chat-icon-list.js +1 -1
- package/dist/components/chat-item.js +1 -1
- package/dist/components/currency-picker.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/document-item.js +1 -1
- package/dist/components/feed-item-thumbnail-file-info.js +1 -1
- package/dist/components/feed-timeline-item.js +1 -1
- package/dist/components/filter-chip.js +1 -1
- package/dist/components/filter-condition-picker.js +1 -1
- package/dist/components/kanban-group.js +1 -1
- package/dist/components/kanban-item.js +1 -1
- package/dist/components/lime-query-filter-comparison-editor.js +1 -1
- package/dist/components/lime-query-filter-comparison.js +1 -1
- package/dist/components/lime-query-filter-expression.js +1 -1
- package/dist/components/limebb-alert-dialog.js +1 -1
- package/dist/components/limebb-browser.js +1 -1
- package/dist/components/limebb-chat-list.js +1 -1
- package/dist/components/limebb-color-palette-picker.js +1 -1
- package/dist/components/limebb-color-palette-swatches.js +1 -1
- package/dist/components/limebb-composer-toolbar.js +1 -1
- package/dist/components/limebb-dashboard-widget.js +1 -1
- package/dist/components/limebb-date-range.js +1 -1
- package/dist/components/limebb-document-chips.js +1 -1
- package/dist/components/limebb-document-picker.js +1 -1
- package/dist/components/limebb-feed.js +1 -1
- package/dist/components/limebb-icon-picker.js +1 -1
- package/dist/components/limebb-info-tile-format.js +1 -1
- package/dist/components/limebb-info-tile.js +1 -1
- package/dist/components/limebb-lime-query-builder.js +1 -1
- package/dist/components/limebb-lime-query-response-format-builder.js +1 -1
- package/dist/components/limebb-locale-picker.js +1 -1
- package/dist/components/limebb-mention-group-counter.js +1 -1
- package/dist/components/limebb-rule-editor.js +1 -1
- package/dist/components/limebb-rule-gate.js +1 -1
- package/dist/components/limebb-text-editor.js +1 -1
- package/dist/components/limebb-trend-indicator.js +1 -1
- package/dist/components/limebb-value-comparison-editor.js +1 -1
- package/dist/components/limetype-field.js +1 -1
- package/dist/components/live-docs-info.js +1 -1
- package/dist/components/notification-item.js +1 -1
- package/dist/components/order-by-editor.js +1 -1
- package/dist/components/order-by-item.js +1 -1
- package/dist/components/percentage-visualizer.js +1 -1
- package/dist/components/response-format-item.js +1 -1
- package/dist/components/rule-chip-popover.js +1 -1
- package/dist/components/summary-popover.js +1 -1
- package/dist/components/typing-indicator.js +1 -1
- package/dist/esm/lime-crm-building-blocks.js +1 -1
- package/dist/esm/limebb-alert-dialog.entry.js +1 -1
- package/dist/esm/limebb-browser.entry.js +2 -2
- package/dist/esm/limebb-chat-icon-list_3.entry.js +4 -4
- package/dist/esm/limebb-chat-list.entry.js +82 -103
- package/dist/esm/limebb-color-palette-picker.entry.js +1 -1
- package/dist/esm/limebb-color-palette-swatches.entry.js +1 -1
- package/dist/esm/limebb-composer-toolbar.entry.js +2 -2
- package/dist/esm/limebb-currency-picker.entry.js +1 -1
- package/dist/esm/limebb-dashboard-widget.entry.js +1 -1
- package/dist/esm/limebb-date-picker.entry.js +1 -1
- package/dist/esm/limebb-date-range.entry.js +1 -1
- package/dist/esm/limebb-document-chips.entry.js +1 -1
- package/dist/esm/limebb-document-item.entry.js +2 -2
- package/dist/esm/limebb-document-picker.entry.js +1 -1
- package/dist/esm/limebb-feed-item-thumbnail-file-info.entry.js +1 -1
- package/dist/esm/limebb-feed-timeline-item.entry.js +1 -1
- package/dist/esm/limebb-feed.entry.js +1 -1
- package/dist/esm/limebb-filter-chip_6.entry.js +7 -7
- package/dist/esm/limebb-icon-picker.entry.js +1 -1
- package/dist/esm/limebb-info-tile-format.entry.js +1 -1
- package/dist/esm/limebb-info-tile.entry.js +1 -1
- package/dist/esm/limebb-kanban-group.entry.js +1 -1
- package/dist/esm/limebb-kanban-item.entry.js +1 -1
- package/dist/esm/limebb-lime-query-builder.entry.js +1 -1
- package/dist/esm/limebb-lime-query-filter-comparison_2.entry.js +2 -2
- package/dist/esm/limebb-lime-query-order-by-editor_2.entry.js +2 -2
- package/dist/esm/limebb-lime-query-order-by-item.entry.js +2 -2
- package/dist/esm/limebb-lime-query-response-format-builder.entry.js +1 -1
- package/dist/esm/limebb-lime-query-response-format-editor_2.entry.js +1 -1
- package/dist/esm/limebb-live-docs-info.entry.js +2 -2
- package/dist/esm/limebb-locale-picker.entry.js +1 -1
- package/dist/esm/limebb-mention-group-counter.entry.js +2 -2
- package/dist/esm/limebb-navigation-button_2.entry.js +2 -2
- package/dist/esm/limebb-notification-item.entry.js +1 -1
- package/dist/esm/limebb-percentage-visualizer.entry.js +2 -2
- package/dist/esm/limebb-rule-chip-popover.entry.js +1 -1
- package/dist/esm/limebb-rule-editor.entry.js +1 -1
- package/dist/esm/limebb-rule-gate.entry.js +1 -1
- package/dist/esm/limebb-text-editor.entry.js +1 -1
- package/dist/esm/limebb-trend-indicator.entry.js +1 -1
- package/dist/esm/limebb-value-comparison-editor.entry.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/lime-crm-building-blocks/lime-crm-building-blocks.esm.js +1 -1
- package/dist/lime-crm-building-blocks/p-08797129.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-0a05b3e9.entry.js → p-0cbe2180.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-0cc47cad.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-54735042.entry.js → p-1990e369.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-0dd64440.entry.js → p-229d018c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7cd8dffd.entry.js → p-28550961.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-568c4e76.entry.js → p-32a81271.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-3babfbe0.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-de7724f0.entry.js → p-402a9c97.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-97e2e5c9.entry.js → p-46aec244.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f102f169.entry.js → p-551a36f6.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-615770be.entry.js → p-6331f9c5.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c46802cd.entry.js → p-635a45ad.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d8d32cb1.entry.js → p-6f923112.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-79d743bb.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-4e4d096c.entry.js → p-7ae27308.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b48d7d23.entry.js → p-81783bd4.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-657b89d4.entry.js → p-8c36b847.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-5b97d4f4.entry.js → p-8e9fcf3c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-c635f826.entry.js → p-90f0c96b.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b6807166.entry.js → p-95ba7a84.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-2d1c7b6f.entry.js → p-97e75dee.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-170ab4be.entry.js → p-a201df35.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-a716b3a8.entry.js → p-a953d48e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ee7bd504.entry.js → p-ab0f8170.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/p-ad5dcefd.entry.js +1 -0
- package/dist/lime-crm-building-blocks/{p-73f23d08.entry.js → p-b44b9dbc.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f024c185.entry.js → p-bf05d9de.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-e910963c.entry.js → p-c0d49532.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d8ce3497.entry.js → p-cc53a8ca.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-45dd8663.entry.js → p-cf03a756.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-27b9c824.entry.js → p-cf66256a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f3905fa2.entry.js → p-d3c58bc1.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-d816fcc8.entry.js → p-dcb49a62.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b3529254.entry.js → p-dd02821e.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-fc372344.entry.js → p-ddc4ede8.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-f1060c88.entry.js → p-dfaef740.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-3fd84800.entry.js → p-e6cc320a.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-7c5ecffe.entry.js → p-f3539042.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-b6c2d93b.entry.js → p-f5c1ed0c.entry.js} +1 -1
- package/dist/lime-crm-building-blocks/{p-ea6ab8b0.entry.js → p-f9991c35.entry.js} +1 -1
- package/dist/types/components/chat-list/chat-list.d.ts +8 -2
- package/dist/types/components/chat-list/scroll-anchor.d.ts +8 -31
- package/dist/types/components.d.ts +4 -0
- package/package.json +1 -1
- package/dist/collection/components/chat-list/typing-indicator-scroll.js +0 -41
- package/dist/lime-crm-building-blocks/p-02fba38e.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-0445035f.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-6d8efe87.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-93af3e81.entry.js +0 -1
- package/dist/lime-crm-building-blocks/p-a2b9c410.entry.js +0 -1
- package/dist/types/components/chat-list/typing-indicator-scroll.d.ts +0 -18
|
@@ -199,54 +199,45 @@ function insertDateGroups(context) {
|
|
|
199
199
|
// position as "stuck to newest" and re-pin on each items update.
|
|
200
200
|
const NEAR_NEWEST_THRESHOLD_PX = 50;
|
|
201
201
|
/**
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
* so DOM order matches visual order (copy/paste, screen readers, tab
|
|
207
|
-
* order all align with what the user sees). CSS `overflow-anchor: auto`
|
|
208
|
-
* — the default and left enabled here — solves a different problem:
|
|
209
|
-
* preserving scroll position when content is inserted *above* the
|
|
210
|
-
* viewport. It doesn't stick the scroll to the newest edge when items
|
|
211
|
-
* arrive below the viewport, which is what chat typically needs; that
|
|
212
|
-
* requires the imperative approach in this class.
|
|
213
|
-
*
|
|
214
|
-
* Lifecycle:
|
|
215
|
-
* - `beforeRender()` in `componentWillRender` — snapshot whether the
|
|
216
|
-
* user is near the newest edge, using the order the scroll position
|
|
217
|
-
* was last measured against. Capturing here (synchronously, before
|
|
218
|
-
* the new DOM lands) avoids the race a scroll-event listener would
|
|
219
|
-
* have with `componentDidRender`.
|
|
220
|
-
* - `afterRender()` in `componentDidRender` — if the snapshot said
|
|
221
|
-
* "near newest", re-pin to the newest edge (new `scrollHeight`).
|
|
222
|
-
* - `repinIfSticky()` for out-of-band re-pins (e.g. after the typing
|
|
223
|
-
* indicator's height transition finishes — its `scrollHeight`
|
|
224
|
-
* change lands after `componentDidRender`).
|
|
225
|
-
*
|
|
226
|
-
* Scroll-container contract: the passed element must itself be the
|
|
227
|
-
* scrolling ancestor (the element whose `scrollTop` / `scrollHeight`
|
|
228
|
-
* / `clientHeight` reflect the chat list's scroll state). In practice
|
|
229
|
-
* that is the component's host, which sets `overflow: hidden auto` on
|
|
230
|
-
* itself. If future refactors introduce an inner scrolling wrapper,
|
|
231
|
-
* pass that wrapper instead.
|
|
202
|
+
* Follows the newest edge until the reader scrolls away. Content growth
|
|
203
|
+
* does not change that choice, including growth after a component render.
|
|
204
|
+
* The container must own scrolling and receive handleScroll calls.
|
|
205
|
+
* The owner must disable native scroll anchoring while following.
|
|
232
206
|
*/
|
|
233
207
|
class ScrollAnchor {
|
|
234
|
-
constructor(scrollContainer, getOrder, initialOrder) {
|
|
208
|
+
constructor(scrollContainer, getOrder, initialOrder, onFollowingChanged) {
|
|
209
|
+
var _a;
|
|
235
210
|
this.scrollContainer = scrollContainer;
|
|
236
211
|
this.getOrder = getOrder;
|
|
212
|
+
this.onFollowingChanged = onFollowingChanged;
|
|
237
213
|
this.isSticky = true;
|
|
238
214
|
this.paintedOrder = initialOrder;
|
|
215
|
+
(_a = this.onFollowingChanged) === null || _a === void 0 ? void 0 : _a.call(this, this.isSticky);
|
|
239
216
|
}
|
|
240
217
|
beforeRender() {
|
|
241
218
|
if (!this.scrollContainer.isConnected) {
|
|
242
219
|
return;
|
|
243
220
|
}
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
221
|
+
this.handleScroll();
|
|
222
|
+
}
|
|
223
|
+
handleScroll() {
|
|
224
|
+
var _a;
|
|
225
|
+
if (!this.scrollContainer.isConnected) {
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
const scrollTop = this.scrollContainer.scrollTop;
|
|
229
|
+
// Content can grow without moving the scroll position. Recomputing
|
|
230
|
+
// the distance then would mistake layout growth for a reader scroll.
|
|
231
|
+
if (scrollTop === this.lastScrollTop) {
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
const following = this.distanceFromNewestEdge(this.paintedOrder) <
|
|
235
|
+
NEAR_NEWEST_THRESHOLD_PX;
|
|
236
|
+
if (following !== this.isSticky) {
|
|
237
|
+
this.isSticky = following;
|
|
238
|
+
(_a = this.onFollowingChanged) === null || _a === void 0 ? void 0 : _a.call(this, following);
|
|
239
|
+
}
|
|
240
|
+
this.lastScrollTop = scrollTop;
|
|
250
241
|
}
|
|
251
242
|
afterRender() {
|
|
252
243
|
if (!this.scrollContainer.isConnected) {
|
|
@@ -261,13 +252,16 @@ class ScrollAnchor {
|
|
|
261
252
|
if (!this.scrollContainer.isConnected) {
|
|
262
253
|
return;
|
|
263
254
|
}
|
|
255
|
+
// A scroll event may still be queued when ResizeObserver runs.
|
|
256
|
+
this.handleScroll();
|
|
264
257
|
if (this.isSticky) {
|
|
265
258
|
this.scrollToNewest();
|
|
266
259
|
}
|
|
267
260
|
}
|
|
268
261
|
scrollToNewest() {
|
|
269
262
|
const target = this.getOrder() === 'oldest-on-top'
|
|
270
|
-
? this.scrollContainer.scrollHeight
|
|
263
|
+
? Math.max(0, this.scrollContainer.scrollHeight -
|
|
264
|
+
this.scrollContainer.clientHeight)
|
|
271
265
|
: 0;
|
|
272
266
|
// Reading `scrollTop` is a cheap (already-measured) lookup, and
|
|
273
267
|
// short-circuiting avoids forcing a layout when we'd write the
|
|
@@ -277,6 +271,7 @@ class ScrollAnchor {
|
|
|
277
271
|
return;
|
|
278
272
|
}
|
|
279
273
|
this.scrollContainer.scrollTop = target;
|
|
274
|
+
this.lastScrollTop = this.scrollContainer.scrollTop;
|
|
280
275
|
}
|
|
281
276
|
distanceFromNewestEdge(order) {
|
|
282
277
|
return order === 'oldest-on-top'
|
|
@@ -287,49 +282,7 @@ class ScrollAnchor {
|
|
|
287
282
|
}
|
|
288
283
|
}
|
|
289
284
|
|
|
290
|
-
|
|
291
|
-
// Mirrored from chat-list.scss `.typing-indicator-height-animation
|
|
292
|
-
// { transition: grid-template-rows ... }`. The runtime verifier below
|
|
293
|
-
// guards against the SCSS and the handler-side filter silently
|
|
294
|
-
// disagreeing.
|
|
295
|
-
const HEIGHT_ANIMATION_PROPERTY = 'grid-template-rows';
|
|
296
|
-
/**
|
|
297
|
-
* Returns a `transitionend` listener for the typing indicator's
|
|
298
|
-
* height transition. Filters by property name so unrelated
|
|
299
|
-
* transitions on the same element (e.g. opacity) don't trigger the
|
|
300
|
-
* callback.
|
|
301
|
-
* @param onHeightTransitionEnd
|
|
302
|
-
*/
|
|
303
|
-
function createHeightTransitionEndHandler(onHeightTransitionEnd) {
|
|
304
|
-
return (event) => {
|
|
305
|
-
if (event.propertyName !== HEIGHT_ANIMATION_PROPERTY) {
|
|
306
|
-
return;
|
|
307
|
-
}
|
|
308
|
-
onHeightTransitionEnd();
|
|
309
|
-
};
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Verifies that the passed element actually transitions on the
|
|
313
|
-
* property the height-transition handler filters on. Surfaces SCSS
|
|
314
|
-
* drift loudly instead of silently breaking auto-scroll-on-indicator-
|
|
315
|
-
* appearance.
|
|
316
|
-
* @param element
|
|
317
|
-
*/
|
|
318
|
-
function verifyHeightAnimationProperty(element) {
|
|
319
|
-
if (!element) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
const transitionProperty = globalThis.getComputedStyle(element).transitionProperty;
|
|
323
|
-
if (!transitionProperty) {
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
const properties = new Set(transitionProperty.split(',').map((p) => p.trim()));
|
|
327
|
-
if (!properties.has('all') && !properties.has(HEIGHT_ANIMATION_PROPERTY)) {
|
|
328
|
-
console.warn(`[limebb-chat-list] Typing indicator is transitioning \`${transitionProperty}\` instead of \`${HEIGHT_ANIMATION_PROPERTY}\`. The auto-scroll on indicator appearance will not fire. Update the CSS or the handler so they match.`);
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
const chatListCss = () => `@charset "UTF-8";:host(limebb-chat-list){--limel-top-edge-fade-height:0.75rem;isolation:isolate;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);box-sizing:border-box;display:flex;flex-direction:column;gap:0.5rem;height:100%;width:100%;min-width:0;min-height:0;padding:var(--limel-top-edge-fade-height) 0.5rem;overflow:hidden auto}:host(limebb-chat-list.is-empty){padding:0}*{box-sizing:border-box}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:inherit;gap:0.5rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end;margin:0.25rem 0}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0 1rem;font-size:small;line-height:0.75rem;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:rgb(var(--contrast-100))}.typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.1s;--limebb-chat-typing-opacity-transition-delay:0s;--limebb-chat-typing-grid-template-rows-transition-speed:0.3s;position:sticky;z-index:1;transition:grid-template-rows var(--limebb-chat-typing-grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0}.typing-indicator-height-animation div{transition:opacity var(--limebb-chat-typing-opacity-transition-speed) ease var(--limebb-chat-typing-opacity-transition-delay);overflow:hidden;opacity:0}:host(limebb-chat-list[order=oldest-on-top]) .typing-indicator-height-animation{bottom:0}:host(limebb-chat-list[order=newest-on-top]) .typing-indicator-height-animation{top:0}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.4s;--limebb-chat-typing-opacity-transition-delay:0.3s;--limebb-chat-typing-grid-template-rows-transition-speed:0.46s;grid-template-rows:1.5rem}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation div{opacity:1}.date-group limebb-chat-item{--limebb-promoted-action-bar-grid-template-rows:0fr}:host(limebb-chat-list[order=oldest-on-top]) .date-group:last-of-type limebb-chat-item:last-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}:host(limebb-chat-list[order=newest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}`;
|
|
285
|
+
const chatListCss = () => `@charset "UTF-8";:host(limebb-chat-list){--limel-top-edge-fade-height:0.75rem;isolation:isolate;--limel-overflow-mask-vertical:linear-gradient( to bottom, transparent 0%, black calc(0% + var(--limel-top-edge-fade-height, 1rem)), black calc(100% - var(--limel-bottom-edge-fade-height, 1rem)), transparent 100% );-webkit-mask-image:var(--limel-overflow-mask-vertical);mask-image:var(--limel-overflow-mask-vertical);padding-top:var(--limel-top-edge-fade-height, 1rem);padding-bottom:var(--limel-bottom-edge-fade-height, 1rem);box-sizing:border-box;display:flex;flex-direction:column;height:100%;width:100%;min-width:0;min-height:0;padding:var(--limel-top-edge-fade-height) 0.5rem;overflow:hidden auto}:host(limebb-chat-list.is-empty){padding:0}:host(limebb-chat-list.is-following){overflow-anchor:none}*{box-sizing:border-box}.content{display:flex;flex-direction:column;flex:1 0 auto;gap:0.5rem;min-width:0}.messages{display:flex;flex-direction:column;flex-shrink:0;gap:0.5rem}:host(limebb-chat-list[loading]) .messages{flex-grow:1}limel-spinner{align-self:center;justify-self:center;margin:auto}.date-group{isolation:isolate;display:flex;flex-direction:inherit;gap:0.5rem}.date-heading{position:sticky;z-index:1;top:0.25rem;display:flex;border-radius:9rem;padding:0.25rem 0.5rem;margin:0 auto;width:fit-content;font-size:0.75rem;line-height:1;color:rgb(var(--contrast-900));backdrop-filter:blur(0.5rem);-webkit-backdrop-filter:blur(0.5rem);transition:color 0.2s ease, border-color 0.4s ease}.date-heading:hover{color:rgb(var(--contrast-1000));border-color:rgb(var(--contrast-500))}.date-heading:hover:before{opacity:1}.date-heading:before{transition:opacity 0.2s ease;content:"";position:absolute;z-index:-1;inset:0;opacity:0.6;border-radius:inherit;background-color:rgb(var(--contrast-100))}.new-items-indicator{position:relative;isolation:isolate;display:flex;align-items:center;justify-content:flex-end;margin:0.25rem 0}.new-items-indicator hr{border:none;position:absolute;width:100%;height:1px;background-color:rgb(var(--color-red-lighter))}.new-items-indicator h3{z-index:1;padding:0 0.5rem;border-radius:1rem;margin:0 1rem;font-size:small;line-height:0.75rem;text-transform:lowercase;color:rgb(var(--color-red-default));background-color:rgb(var(--contrast-100))}.typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.1s;--limebb-chat-typing-opacity-transition-delay:0s;--limebb-chat-typing-grid-template-rows-transition-speed:0.3s;position:sticky;z-index:1;transition:grid-template-rows var(--limebb-chat-typing-grid-template-rows-transition-speed) ease;display:grid;grid-template-rows:0}.typing-indicator-height-animation div{transition:opacity var(--limebb-chat-typing-opacity-transition-speed) ease var(--limebb-chat-typing-opacity-transition-delay);overflow:hidden;opacity:0}:host(limebb-chat-list[order=oldest-on-top]) .typing-indicator-height-animation{bottom:0}:host(limebb-chat-list[order=newest-on-top]) .typing-indicator-height-animation{top:0}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation{--limebb-chat-typing-opacity-transition-speed:0.4s;--limebb-chat-typing-opacity-transition-delay:0.3s;--limebb-chat-typing-grid-template-rows-transition-speed:0.46s;grid-template-rows:1.5rem}:host(limebb-chat-list[is-typing-indicator-visible]) .typing-indicator-height-animation div{opacity:1}.date-group limebb-chat-item{--limebb-promoted-action-bar-grid-template-rows:0fr}:host(limebb-chat-list[order=oldest-on-top]) .date-group:last-of-type limebb-chat-item:last-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}:host(limebb-chat-list[order=newest-on-top]) .date-group:first-of-type limebb-chat-item:first-of-type{--limebb-promoted-action-bar-grid-template-rows:1fr}`;
|
|
333
286
|
|
|
334
287
|
const ChatList = class {
|
|
335
288
|
constructor(hostRef) {
|
|
@@ -360,7 +313,12 @@ const ChatList = class {
|
|
|
360
313
|
*/
|
|
361
314
|
this.order = 'oldest-on-top';
|
|
362
315
|
this.processedItems = [];
|
|
363
|
-
this.
|
|
316
|
+
this.handleScroll = (event) => {
|
|
317
|
+
var _a;
|
|
318
|
+
if (event.target === this.host) {
|
|
319
|
+
(_a = this.scrollAnchor) === null || _a === void 0 ? void 0 : _a.handleScroll();
|
|
320
|
+
}
|
|
321
|
+
};
|
|
364
322
|
}
|
|
365
323
|
handleItemsChange() {
|
|
366
324
|
let lastVisited = null;
|
|
@@ -375,34 +333,55 @@ const ChatList = class {
|
|
|
375
333
|
}
|
|
376
334
|
componentWillLoad() {
|
|
377
335
|
this.handleItemsChange();
|
|
378
|
-
|
|
336
|
+
}
|
|
337
|
+
connectedCallback() {
|
|
338
|
+
this.observeSize();
|
|
379
339
|
}
|
|
380
340
|
componentDidLoad() {
|
|
341
|
+
this.observeSize();
|
|
342
|
+
}
|
|
343
|
+
disconnectedCallback() {
|
|
381
344
|
var _a;
|
|
382
|
-
|
|
345
|
+
(_a = this.resizeObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
346
|
+
this.resizeObserver = undefined;
|
|
383
347
|
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
// render still pins correctly.
|
|
348
|
+
observeSize() {
|
|
349
|
+
var _a;
|
|
350
|
+
const content = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.content');
|
|
351
|
+
if (!content || this.resizeObserver) {
|
|
389
352
|
return;
|
|
390
353
|
}
|
|
391
|
-
this.scrollAnchor.
|
|
354
|
+
this.resizeObserver = new ResizeObserver(() => { var _a; return (_a = this.scrollAnchor) === null || _a === void 0 ? void 0 : _a.repinIfSticky(); });
|
|
355
|
+
this.resizeObserver.observe(content);
|
|
356
|
+
this.resizeObserver.observe(this.host);
|
|
392
357
|
}
|
|
393
|
-
|
|
358
|
+
componentWillRender() {
|
|
394
359
|
if (this.items.length === 0) {
|
|
360
|
+
if (this.scrollAnchor) {
|
|
361
|
+
this.host.scrollTop = 0;
|
|
362
|
+
}
|
|
363
|
+
this.scrollAnchor = undefined;
|
|
364
|
+
this.host.classList.remove('is-following');
|
|
395
365
|
return;
|
|
396
366
|
}
|
|
397
|
-
this.scrollAnchor
|
|
367
|
+
if (this.scrollAnchor) {
|
|
368
|
+
this.scrollAnchor.beforeRender();
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
this.scrollAnchor = new ScrollAnchor(this.host, () => this.order, this.order, (following) => this.host.classList.toggle('is-following', following));
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
componentDidRender() {
|
|
375
|
+
var _a;
|
|
376
|
+
(_a = this.scrollAnchor) === null || _a === void 0 ? void 0 : _a.afterRender();
|
|
398
377
|
}
|
|
399
378
|
render() {
|
|
400
|
-
return (h(Host, { key: '
|
|
379
|
+
return (h(Host, { key: 'f99cc3baf1dd34c6a8949976c71042ce0d809046', class: {
|
|
401
380
|
'is-empty': this.items.length === 0 &&
|
|
402
381
|
!this.isTypingIndicatorVisible,
|
|
403
|
-
},
|
|
382
|
+
}, onScroll: this.handleScroll }, h("div", { key: '1d77b03beb2c5d61b4e50f15d7458f9b28f35d67', class: "content" }, h("div", { key: '7d1b5577c5f79ef49fe8f1fe33513b60576ee3b4', class: "messages", role: "log", "aria-busy": this.isBusy() }, this.renderSpinner(), this.order === 'newest-on-top' &&
|
|
404
383
|
this.renderTypingIndicatorBlock(), this.renderChatItems(), this.order === 'oldest-on-top' &&
|
|
405
|
-
this.renderTypingIndicatorBlock()));
|
|
384
|
+
this.renderTypingIndicatorBlock()), h("slot", { key: '04ae84b855377c9407f266ca9edffaefdd69f721', name: "after" }))));
|
|
406
385
|
}
|
|
407
386
|
renderSpinner() {
|
|
408
387
|
if (!this.loading) {
|
|
@@ -411,12 +390,7 @@ const ChatList = class {
|
|
|
411
390
|
return h("limel-spinner", null);
|
|
412
391
|
}
|
|
413
392
|
renderTypingIndicatorBlock() {
|
|
414
|
-
|
|
415
|
-
// container over ~0.46s. `componentDidRender` fires before the
|
|
416
|
-
// transition starts, so `scrollHeight` at that moment doesn't
|
|
417
|
-
// include the final height. `handleHeightTransitionEnd` re-pins
|
|
418
|
-
// once the transition lands.
|
|
419
|
-
return (h("div", { class: "typing-indicator-height-animation", onTransitionEnd: this.handleHeightTransitionEnd }, h("div", null, this.renderTypingIndicator())));
|
|
393
|
+
return (h("div", { class: "typing-indicator-height-animation" }, h("div", null, this.renderTypingIndicator())));
|
|
420
394
|
}
|
|
421
395
|
renderTypingIndicator() {
|
|
422
396
|
if (!this.isTypingIndicatorVisible) {
|
|
@@ -483,11 +457,16 @@ const ChatList = class {
|
|
|
483
457
|
const dateHeading = (h("a", { id: headingId, class: "date-heading", role: "heading", "aria-level": 2 }, group.heading));
|
|
484
458
|
return (h("section", { class: "date-group", key: sectionKey, "aria-labelledby": headingId }, dateHeading, chatItems));
|
|
485
459
|
}
|
|
460
|
+
// Keys carry the item kind because Stencil builds the replacement
|
|
461
|
+
// for a key that changed tag from the wrong vnode, corrupting the
|
|
462
|
+
// list. Consumers reuse ids across item kinds (and across the
|
|
463
|
+
// conversations they render into one list), so a bare id can name
|
|
464
|
+
// a bubble in one render and an icon row in the next.
|
|
486
465
|
renderChatItem(item) {
|
|
487
|
-
return (h("limebb-chat-item", { platform: this.platform, context: this.context, item: item, helperText: item.helperText, hasError: item.hasError, key: item.id }));
|
|
466
|
+
return (h("limebb-chat-item", { platform: this.platform, context: this.context, item: item, helperText: item.helperText, hasError: item.hasError, key: `chat-${item.id}` }));
|
|
488
467
|
}
|
|
489
468
|
renderIconList(item) {
|
|
490
|
-
return h("limebb-chat-icon-list", { item: item, key: item.id });
|
|
469
|
+
return (h("limebb-chat-icon-list", { item: item, key: `icon-list-${item.id}` }));
|
|
491
470
|
}
|
|
492
471
|
renderIndicator() {
|
|
493
472
|
return (h("div", { class: "new-items-indicator", role: "separator" }, h("hr", null), h("h3", null, this.translator.get('webclient.new'))));
|
|
@@ -31,7 +31,7 @@ const ColorPalettePicker = class {
|
|
|
31
31
|
this.optionsById = new Map(this.options.map((option) => [option.value, option]));
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '5144d7eed8495f7880a5b9b84f6d21e057823f6f' }, h("limel-select", { key: '592ba7009714d5585c3ec4051ff87780bfaf7ce0', label: this.label, helperText: this.helperText, disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, required: this.required, options: this.options, value: this.getSelectedOption(), onChange: this.handleChange })));
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
37
|
* Resolve `this.value` against the cached options map. Returns
|
|
@@ -11,7 +11,7 @@ const ColorPaletteSwatches = class {
|
|
|
11
11
|
this.colors = [];
|
|
12
12
|
}
|
|
13
13
|
render() {
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '0a9f6954afe6a8378b9a9dfebf4b6509ee6bc3b6', "aria-hidden": "true" }, h("ol", { key: 'ed8ce5aa8220f66888cdf349d15367447973bf00' }, this.colors.map((color, index) => (h("li", { key: index, style: { backgroundColor: color } }))))));
|
|
15
15
|
}
|
|
16
16
|
};
|
|
17
17
|
ColorPaletteSwatches.style = colorPaletteSwatchesCss();
|
|
@@ -64,8 +64,8 @@ const ComposerToolbar = class {
|
|
|
64
64
|
}
|
|
65
65
|
render() {
|
|
66
66
|
return [
|
|
67
|
-
h("div", { key: '
|
|
68
|
-
h("slot", { key: '
|
|
67
|
+
h("div", { key: '838a9bb908a59ea4d7667ce54578277ef2733426', class: "actions" }, h("slot", { key: '09f4969bdf3c01b86e54708e105e93812c8e5e69', name: "leading" }), this.renderFileInput(), this.renderTriggerActions(), h("slot", { key: 'f0f58aeb42a17784c1343e94f9ee51c0f85b7a8a', name: "trailing" })),
|
|
68
|
+
h("slot", { key: '76a69ca163d0c92a1fd27f9aaf5ce1644d9ed4b4', name: "primary-action" }),
|
|
69
69
|
];
|
|
70
70
|
}
|
|
71
71
|
get translator() {
|
|
@@ -1968,7 +1968,7 @@ const CurrencyPicker = class {
|
|
|
1968
1968
|
};
|
|
1969
1969
|
}
|
|
1970
1970
|
render() {
|
|
1971
|
-
return (h("limel-picker", { key: '
|
|
1971
|
+
return (h("limel-picker", { key: 'a27f9d7eb1a3c5b351f7fbf3754a2ffff6c50e96', label: this.label || this.defaultLabel, value: this.createListItem(this.value), helperText: this.helperText, onChange: this.handleChange, badgeIcons: false, disabled: this.disabled, required: this.required, readonly: this.readonly, invalid: this.readonly, searcher: this.search }));
|
|
1972
1972
|
}
|
|
1973
1973
|
getCurrencyName(code) {
|
|
1974
1974
|
var _a;
|
|
@@ -16,7 +16,7 @@ const DashboardComponent = class {
|
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
18
|
render() {
|
|
19
|
-
return [this.renderHeader(), h("slot", { key: '
|
|
19
|
+
return [this.renderHeader(), h("slot", { key: '909b0c9589ee8e78c1cc8e9ab348527fea2d802c', name: "content" })];
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
DashboardComponent.style = dashboardWidgetCss();
|
|
@@ -73,7 +73,7 @@ const DatePicker = class {
|
|
|
73
73
|
if (this.value) {
|
|
74
74
|
this.shouldEmitValueAsString = typeof this.value === 'string';
|
|
75
75
|
}
|
|
76
|
-
return (h("limel-date-picker", { key: '
|
|
76
|
+
return (h("limel-date-picker", { key: '5b73d026cdc90f74cab3889f75a1049152db9281', disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, label: this.label, placeholder: this.placeholder, helperText: this.helperText, required: this.required, value: this.parseDateValue(), type: this.type, language: this.language, formatter: this.formatter, onChange: this.handleChange }));
|
|
77
77
|
}
|
|
78
78
|
parseDateValue() {
|
|
79
79
|
const value = this.value;
|
|
@@ -21,7 +21,7 @@ const DateRange = class {
|
|
|
21
21
|
this.originalEndTime = this.endTime;
|
|
22
22
|
}
|
|
23
23
|
render() {
|
|
24
|
-
return (h("div", { key: '
|
|
24
|
+
return (h("div", { key: 'b7061f4bc5dbca336514fcf45ff4560c4aa91403', class: "date-pickers" }, this.renderStartDatePicker(), this.renderEndDatePicker()));
|
|
25
25
|
}
|
|
26
26
|
renderStartDatePicker() {
|
|
27
27
|
if (!this.originalStartTime) {
|
|
@@ -345,7 +345,7 @@ const DocumentChips = class {
|
|
|
345
345
|
this.revokeAllBlobUrls();
|
|
346
346
|
}
|
|
347
347
|
render() {
|
|
348
|
-
return (h(Host, { key: '
|
|
348
|
+
return (h(Host, { key: '6ae3555251d692d23e010e717df9b7d6b938e47e', role: "list", "aria-label": this.accessibleLabel }, this.files.map((file) => this.renderFile(file))));
|
|
349
349
|
}
|
|
350
350
|
renderFile(file) {
|
|
351
351
|
const isReady = !file.uploadState || file.uploadState === 'done';
|
|
@@ -114,10 +114,10 @@ const DocumentItemComponent = class {
|
|
|
114
114
|
render() {
|
|
115
115
|
const isUnavailable = this.isUnavailable();
|
|
116
116
|
const image = this.getImage();
|
|
117
|
-
return (h(Host, { key: '
|
|
117
|
+
return (h(Host, { key: 'd43c632328fced71fd52672150fc33304b172212', id: String(this.item.file.id), class: {
|
|
118
118
|
'has-image': !!image,
|
|
119
119
|
'has-error': !!this.item.hasError,
|
|
120
|
-
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: '
|
|
120
|
+
}, role: this.type === 'radio' ? 'radio' : 'checkbox', "aria-checked": this.item.selected ? 'true' : 'false', "aria-disabled": isUnavailable ? 'true' : 'false', tabIndex: isUnavailable ? -1 : 0 }, h("limel-card", { key: '9e3348decfcd8cae2011ee8d6a677529a8eeba81', image: image, clickable: isUnavailable ? false : true, onClick: this.handleDocumentItemClick, onKeyDown: this.handleKeyDown }, h("div", { key: 'e748c2fd4e5cf0d97870fb7b4cbda71ae79c2209', slot: "component" }, this.renderFileSize(), this.renderBooleanInput())), this.renderHelp()));
|
|
121
121
|
}
|
|
122
122
|
renderBooleanInput() {
|
|
123
123
|
const id = this.getControlId();
|
|
@@ -66,7 +66,7 @@ const DocumentPicker = class {
|
|
|
66
66
|
this.labelId = createRandomString();
|
|
67
67
|
}
|
|
68
68
|
render() {
|
|
69
|
-
return (h(Host, { key: '
|
|
69
|
+
return (h(Host, { key: '54de1e83d59de262b8e8e7f81c5505bd288d4e75' }, h("limel-notched-outline", { key: '54502e0f4eb3105746aaf1f7ba80c6e88e687acb', labelId: this.labelId, label: this.label, required: this.required, invalid: this.invalid, hasFloatingLabel: true }, h("limel-masonry-layout", { key: 'c782d54540e6a1d66743796983b4f14997725bdc', slot: "content", role: this.type === 'radio' ? 'radiogroup' : 'group', "aria-labelledby": this.label ? this.labelId : undefined, "aria-describedby": this.helperText ? this.helperTextId : undefined }, this.renderItems())), this.renderHelperLine()));
|
|
70
70
|
}
|
|
71
71
|
renderItems() {
|
|
72
72
|
return this.items.map((item) => (h("limebb-document-item", { platform: this.platform, context: this.context, item: item, key: item.file.id, type: this.type, onInteract: this.handleItemInteract })));
|
|
@@ -7,7 +7,7 @@ const FeedItemThumbnailFileInfo = class {
|
|
|
7
7
|
registerInstance(this, hostRef);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return h("span", { key: '
|
|
10
|
+
return h("span", { key: 'a19af68f2f240a1bb36645509e42b337cec8be01' }, this.description);
|
|
11
11
|
}
|
|
12
12
|
};
|
|
13
13
|
FeedItemThumbnailFileInfo.style = feedItemThumbnailFileInfoCss();
|
|
@@ -216,7 +216,7 @@ const FeedTimelineItem = class {
|
|
|
216
216
|
render() {
|
|
217
217
|
var _a, _b;
|
|
218
218
|
const helperTextId = `helper-text-${this.item.id}`;
|
|
219
|
-
return (h(Host, { key: '
|
|
219
|
+
return (h(Host, { key: 'ad9ac13f47bda162ecdd9df62a2393d4b34ca76d', id: this.item.id, class: {
|
|
220
220
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
221
221
|
'has-author-picture': !!((_b = this.item.author) === null || _b === void 0 ? void 0 : _b.picture),
|
|
222
222
|
'shows-less': !this.showMore,
|
|
@@ -556,7 +556,7 @@ const Feed = class {
|
|
|
556
556
|
this.highlighter.unregisterFeed(this.feedItemElement);
|
|
557
557
|
}
|
|
558
558
|
render() {
|
|
559
|
-
return (h(Host, { key: '
|
|
559
|
+
return (h(Host, { key: 'f2ffe4bbef2e7371d0b1c51e81f2246a16a2615e', role: "log", "aria-busy": this.loading ? 'true' : 'false', style: {
|
|
560
560
|
'--limebb-feed-highlight-duration': `${ITEM_HIGHLIGHT_DURATION}ms`,
|
|
561
561
|
} }, this.renderLoadMore(), this.renderEmptyFeedMessage(), this.renderSpinner(), this.renderFeedItems()));
|
|
562
562
|
}
|
|
@@ -89,8 +89,8 @@ const FilterChip = class {
|
|
|
89
89
|
const items = this.getDisplayItems();
|
|
90
90
|
const conjunction = this.getConjunctionText();
|
|
91
91
|
const helperLabel = this.getHelperLabel(items, conjunction);
|
|
92
|
-
return (h(Host, { key: '
|
|
93
|
-
this.getFilterLabel(), "aria-pressed": this.getAriaPressed(), onKeyDown: this.handleKeyDown, disabled: this.disabled }, this.renderIcon(), this.renderValue(items, conjunction)), this.renderRemoveButton(chipId), h("limel-tooltip", { key: '
|
|
92
|
+
return (h(Host, { key: '0a9928cddf2b33b2c7e9141b76ef6114966bcf5f' }, this.renderLabel(), h("button", { key: '087a97e9a0e3bed2f926ac7e72096a0fd2224d5b', class: { chip: true }, type: "button", id: chipId, "aria-label": [this.label, helperLabel].filter(Boolean).join(', ') ||
|
|
93
|
+
this.getFilterLabel(), "aria-pressed": this.getAriaPressed(), onKeyDown: this.handleKeyDown, disabled: this.disabled }, this.renderIcon(), this.renderValue(items, conjunction)), this.renderRemoveButton(chipId), h("limel-tooltip", { key: 'ee48543757e7bde9f31c58c00b7e46f0a0c38b83', elementId: chipId, label: this.label || this.getFilterLabel(), helperLabel: helperLabel })));
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* `aria-pressed` only makes sense for an interactive toggle. A readonly
|
|
@@ -317,7 +317,7 @@ const FilterConditionPicker = class {
|
|
|
317
317
|
render() {
|
|
318
318
|
const items = this.buildItems();
|
|
319
319
|
const selected = this.selectedOption(items);
|
|
320
|
-
return (h(Host, { key: '
|
|
320
|
+
return (h(Host, { key: '5883ce6193714207687cf7f5ad05aba1a0dc6a87' }, h("limel-select", { key: '1a4b9c6ce47cb89ff9d98fe0bbcc51d01db8a69e', class: "condition", label: this.accessibleLabel, disabled: this.disabled, options: items, value: selected, onChange: this.handleChange })));
|
|
321
321
|
}
|
|
322
322
|
buildItems() {
|
|
323
323
|
var _a;
|
|
@@ -441,7 +441,7 @@ const LimeQueryFilterComparisonEditorComponent = class {
|
|
|
441
441
|
(_a = this.propertySelectorEl) === null || _a === void 0 ? void 0 : _a.focus();
|
|
442
442
|
}
|
|
443
443
|
render() {
|
|
444
|
-
return (h(Host, { key: '
|
|
444
|
+
return (h(Host, { key: '6adf494d70409b6fd0b41760646d5c6c6501a48f' }, this.renderPropertySelector(), this.renderConditionPicker(), this.renderValueInput()));
|
|
445
445
|
}
|
|
446
446
|
renderPropertySelector() {
|
|
447
447
|
return (h("limebb-property-selector", { ref: (el) => (this.propertySelectorEl = el), class: "property", label: "Property", platform: this.platform, context: this.context, limetype: this.limetype, value: this.expression.key, required: true, onChange: this.handlePropertyChange }));
|
|
@@ -543,9 +543,9 @@ const LimeQueryFilterGroupComponent = class {
|
|
|
543
543
|
const combinator = getCombinator(this.expression);
|
|
544
544
|
const inner = getInnerAndOr(this.expression);
|
|
545
545
|
const selected = COMBINATOR_OPTIONS.find((o) => o.value === combinator);
|
|
546
|
-
return (h(Host, { key: '
|
|
546
|
+
return (h(Host, { key: '92c46da043467cc08a6832b1b3d8efb902d0202f', "data-op": combinator, style: {
|
|
547
547
|
'--limebb-query-filter-group-color-code': OP_STYLE[combinator].color,
|
|
548
|
-
} }, h("div", { key: '
|
|
548
|
+
} }, h("div", { key: '9bdd072b62abf3707be294845f0b852bcef6ff30', class: "group" }, h("div", { key: 'b543e0aec068144ebcc1af3f2024c1823bfe4cac', class: "group-header" }, h("limel-select", { key: 'cf5094130a5776d194d1678d2f09405732bb075a', class: "combinator", label: "Match", value: selected, options: COMBINATOR_OPTIONS, onChange: this.handleCombinatorChange }), h("limel-icon-button", { key: 'f1e9d60319a303754231f51fb15a0141d456878e', class: "delete-group", icon: "trash", label: "Delete this group", onClick: this.handleDeleteGroup })), h("ul", { key: '38120502709887cfd904781da2cf7ca96dc663dc', class: "rows" }, inner.exp.map(this.renderChildExpression), h("limel-chip", { key: 'ddbaed450c74d5113ac1d227d04da353237ee3f7', role: "listitem", class: "add-condition", text: "Condition", icon: { name: 'plus_math', title: 'Add' }, onClick: this.handleAddChildExpression })), h("limel-chip", { key: 'b1a2506e6d5da147e2b2e4ecfa755cda5f86c395', class: "add-group", size: "small", text: "Group", icon: {
|
|
549
549
|
name: 'plus_math',
|
|
550
550
|
title: 'Add',
|
|
551
551
|
color: 'var(--group-rail-color)',
|
|
@@ -585,7 +585,7 @@ const LimeQueryFilterNotComponent = class {
|
|
|
585
585
|
};
|
|
586
586
|
}
|
|
587
587
|
render() {
|
|
588
|
-
return (h("div", { key: '
|
|
588
|
+
return (h("div", { key: 'c2419ca2da5c2e99b4462bec483f62f3272b826e', class: "expression" }, this.label && h("limel-header", { key: '58b93b01e0607a52b22e56379cba36dae6113513', heading: this.label }), h("limebb-lime-query-filter-expression", { key: '72165139bfa1e0236a0048c2f59c1638dfd950d9', platform: this.platform, context: this.context, label: "Not", limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression.exp, onExpressionChange: this.handleExpressionChange })));
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
591
|
LimeQueryFilterNotComponent.style = limeQueryFilterNotCss();
|
|
@@ -53110,7 +53110,7 @@ const IconPicker = class {
|
|
|
53110
53110
|
icon: this.value,
|
|
53111
53111
|
};
|
|
53112
53112
|
}
|
|
53113
|
-
return (h("limel-picker", { key: '
|
|
53113
|
+
return (h("limel-picker", { key: 'f123d92ec72fecdc8056319b8d2fb7c63b644232', label: this.label, helperText: this.helperText, disabled: this.disabled, readonly: this.readonly, invalid: this.invalid, required: this.required, value: value, searcher: this.search, onChange: this.handleChange, badgeIcons: false, leadingIcon: "search", searchLabel: "Start typing to find the right icon" }));
|
|
53114
53114
|
}
|
|
53115
53115
|
};
|
|
53116
53116
|
|
|
@@ -91,7 +91,7 @@ const InfoTileAdminConfig = class {
|
|
|
91
91
|
},
|
|
92
92
|
];
|
|
93
93
|
return [
|
|
94
|
-
h("limel-button-group", { key: '
|
|
94
|
+
h("limel-button-group", { key: 'af628fd7209c35426f94257b9d01751132eb7062', value: buttons.filter(this.isValidButton), onChange: this.handleChangeType }),
|
|
95
95
|
this.renderFormatConfig(),
|
|
96
96
|
];
|
|
97
97
|
}
|
|
@@ -484,7 +484,7 @@ const InfoTile = class {
|
|
|
484
484
|
const errorProps = Object.assign(Object.assign({}, baseProps), { icon: 'error', prefix: 'ERROR', loading: true, label: this.getLabel(filter) });
|
|
485
485
|
const normalProps = Object.assign(Object.assign({}, baseProps), { label: this.getLabel(filter), link: this.getLink(filter), loading: this.loading, value: value === null || value === void 0 ? void 0 : value.value.trim() });
|
|
486
486
|
const props = !filter || this.error ? errorProps : normalProps;
|
|
487
|
-
return (h("limel-info-tile", Object.assign({ key: '
|
|
487
|
+
return (h("limel-info-tile", Object.assign({ key: '50e9fba6bf058bc41f8596f42fba5b2a20762adc', class: { error: !filter || this.error } }, props)));
|
|
488
488
|
}
|
|
489
489
|
/**
|
|
490
490
|
* Effective `reducedPresence` for this render. The boolean prop
|
|
@@ -27,7 +27,7 @@ const KanbanGroup = class {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
render() {
|
|
30
|
-
return (h(Host, { key: '
|
|
30
|
+
return (h(Host, { key: '0854f6e541983cfac72eaf884c51ffb17f99f122' }, this.renderHelp(), this.renderGroupHeading(), this.renderGroupSummary(), this.renderItems()));
|
|
31
31
|
}
|
|
32
32
|
renderGroupSummary() {
|
|
33
33
|
if (!this.summary || !this.totalCount) {
|
|
@@ -55,7 +55,7 @@ const KanbanItemComponent = class {
|
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
57
|
var _a, _b;
|
|
58
|
-
return (h(Host, { key: '
|
|
58
|
+
return (h(Host, { key: '4f5094240ee414b67254301be60b096e83d9c7af', id: this.item.id.toString(), class: {
|
|
59
59
|
'has-unpromoted-actions': !!((_a = this.item.unpromotedActions) === null || _a === void 0 ? void 0 : _a.length),
|
|
60
60
|
'is-selected': !!((_b = this.item) === null || _b === void 0 ? void 0 : _b.selected),
|
|
61
61
|
}, style: {
|
|
@@ -149,7 +149,7 @@ const LimeQueryBuilder = class {
|
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
render() {
|
|
152
|
-
return (h(Host, { key: '
|
|
152
|
+
return (h(Host, { key: '798c1d0486dae6e06663e9a64913cc5d614a6351' }, this.renderHeader(), this.renderContent()));
|
|
153
153
|
}
|
|
154
154
|
renderContent() {
|
|
155
155
|
const visualModeSupported = this.checkVisualModeSupport();
|
|
@@ -39,11 +39,11 @@ const LimeQueryFilterComparisonComponent = class {
|
|
|
39
39
|
const propertyType = hasKey
|
|
40
40
|
? this.getPropertyType(this.expression.key)
|
|
41
41
|
: undefined;
|
|
42
|
-
return (h(Host, { key: '
|
|
42
|
+
return (h(Host, { key: '11a87b46a1273aadb654a13a08351b2114b5c77d' }, this.renderHeader(), h("limel-popover", { key: 'c407e0d0672a4302cc96e452baeca8009359856c', open: this.isOpen, openDirection: "bottom-start", onClose: this.handleClose }, h("limebb-filter-chip", { key: '530e38e1d326614c13324a7efd2e08db62712450', slot: "trigger", platform: this.platform, label: hasKey
|
|
43
43
|
? this.getPropertyLabel(this.expression.key)
|
|
44
44
|
: undefined, condition: hasKey
|
|
45
45
|
? operatorToCondition(this.expression.op)
|
|
46
|
-
: undefined, propertyType: propertyType, value: hasKey ? this.chipValue() : 'New condition', conjunction: isList ? 'or' : undefined, selected: this.isOpen, removable: true, onClick: this.handleOpen, onRemove: this.removeExpression }), h("limebb-lime-query-filter-comparison-editor", { key: '
|
|
46
|
+
: undefined, propertyType: propertyType, value: hasKey ? this.chipValue() : 'New condition', conjunction: isList ? 'or' : undefined, selected: this.isOpen, removable: true, onClick: this.handleOpen, onRemove: this.removeExpression }), h("limebb-lime-query-filter-comparison-editor", { key: 'e736c00aa2f6c750da34a08f671d50dc97f6f452', platform: this.platform, context: this.context, limetype: this.limetype, activeLimetype: this.activeLimetype, expression: this.expression, propertyType: propertyType, onExpressionChange: this.handleEditorChange }))));
|
|
47
47
|
}
|
|
48
48
|
getPropertyLabel(key) {
|
|
49
49
|
return this.resolveProperty(key).labels.join(' › ');
|
|
@@ -119,7 +119,7 @@ const OrderByEditor = class {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
render() {
|
|
122
|
-
return (h(Host, { key: '
|
|
122
|
+
return (h(Host, { key: '6538465113c62786cad0c02a6ab3196dcc0635a1' }, this.renderEmptyState(), this.renderOrderByEditor()));
|
|
123
123
|
}
|
|
124
124
|
renderEmptyState() {
|
|
125
125
|
if (this.limetype) {
|
|
@@ -249,7 +249,7 @@ const LimetypeField = class {
|
|
|
249
249
|
value: '',
|
|
250
250
|
};
|
|
251
251
|
options.unshift(emptyOption);
|
|
252
|
-
return (h("limel-select", { key: '
|
|
252
|
+
return (h("limel-select", { key: '1bb0d48ee4613baef033cea5f6f610261a67972f', label: this.label, options: options, value: selectedOption, required: this.required, helperText: this.helperText, invalid: invalid, disabled: this.disabled || this.readonly, onChange: this.handleChange }));
|
|
253
253
|
}
|
|
254
254
|
componentWillRender() {
|
|
255
255
|
this.updatePropertyFields(this.value || '');
|
|
@@ -36,9 +36,9 @@ const OrderByItemComponent = class {
|
|
|
36
36
|
render() {
|
|
37
37
|
const propertyPath = Object.keys(this.item)[0] || '';
|
|
38
38
|
const direction = this.item[propertyPath] || 'ASC';
|
|
39
|
-
return (h(Host, { key: '
|
|
39
|
+
return (h(Host, { key: 'd406aa6128f42fa11b92a5755554efa0218f42b1' }, h("limebb-property-selector", { key: '54140307a6762e05c782c2b54288d941a7cd419a', platform: this.platform, context: this.context, limetype: this.limetype, label: "Property", value: propertyPath, required: true, onChange: this.handlePathChange }), h("div", { key: 'ef219a25a4d8a61e1295524533c7a7937b8b9320', class: "control-buttons" }, h("limel-icon-button", { key: '2eec9ff17a503c0c08b4faa80efc32f379d5c2c9', icon: direction === 'ASC'
|
|
40
40
|
? 'sort_ascending'
|
|
41
|
-
: 'sort_descending', label: direction === 'ASC' ? 'Ascending' : 'Descending', onClick: this.handleToggleDirection }), h("limel-icon-button", { key: '
|
|
41
|
+
: 'sort_descending', label: direction === 'ASC' ? 'Ascending' : 'Descending', onClick: this.handleToggleDirection }), h("limel-icon-button", { key: '17ce23ee6b4ec9916a852b4a4612268be974055d', icon: "trash", label: "Remove", onClick: this.handleRemove }))));
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
OrderByItemComponent.style = orderByItemCss();
|