rio-assist-widget 0.1.32 → 0.1.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rio-assist-widget",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "description": "Web Component do painel lateral Rio Insight, pronto para ser embutido em qualquer projeto.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -116,25 +116,21 @@ const renderConversationSurface = (
116
116
  'conversation-menu': true,
117
117
  'conversation-menu--above':
118
118
  component.conversationMenuPlacement === 'above',
119
- })}
120
- @click=${(event: Event) => event.stopPropagation()}
121
- >
122
- ${/* Renomear ocultado enquanto backend nao suporta */ false
123
- ? html`
124
- <button
125
- type="button"
126
- @click=${() =>
127
- component.handleConversationAction('rename', conversation.id)}
128
- >
129
- <img src=${editIconUrl} alt="" aria-hidden="true" />
130
- Renomear
131
- </button>
132
- `
133
- : null}
134
- <button
135
- type="button"
136
- @click=${() =>
137
- component.handleConversationAction('delete', conversation.id)}
119
+ })}
120
+ @click=${(event: Event) => event.stopPropagation()}
121
+ >
122
+ <button
123
+ type="button"
124
+ @click=${() =>
125
+ component.handleConversationAction('rename', conversation.id)}
126
+ >
127
+ <img src=${editIconUrl} alt="" aria-hidden="true" />
128
+ Renomear
129
+ </button>
130
+ <button
131
+ type="button"
132
+ @click=${() =>
133
+ component.handleConversationAction('delete', conversation.id)}
138
134
  >
139
135
  <img src=${trashIconUrl} alt="" aria-hidden="true" />
140
136
  Excluir
@@ -20,6 +20,9 @@ export const floatingButtonStyles = css`
20
20
  letter-spacing: -0.2px;
21
21
  border-radius: 32px 0 0 32px;
22
22
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
23
+ cursor: grab;
24
+ user-select: none;
25
+ touch-action: none;
23
26
  }
24
27
 
25
28
  .floating-button img {
@@ -41,6 +44,10 @@ export const floatingButtonStyles = css`
41
44
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.3);
42
45
  }
43
46
 
47
+ .floating-button:active {
48
+ cursor: grabbing;
49
+ }
50
+
44
51
  .canvas--fullscreen .floating-button {
45
52
  opacity: 0;
46
53
  pointer-events: none;
@@ -1,4 +1,5 @@
1
1
  import { html } from 'lit';
2
+ import { styleMap } from 'lit/directives/style-map.js';
2
3
  import type { RioAssistWidget } from '../rio-assist/rio-assist';
3
4
 
4
5
  const buttonIconUrl = new URL('../../assets/icons/iaButtonIcon.png', import.meta.url).href;
@@ -6,8 +7,15 @@ const buttonIconUrl = new URL('../../assets/icons/iaButtonIcon.png', import.meta
6
7
  export const renderFloatingButton = (component: RioAssistWidget) => html`
7
8
  <button
8
9
  class="floating-button"
9
- style="background:${component.accentColor}"
10
- @click=${() => component.togglePanel()}
10
+ style=${styleMap({
11
+ background: component.accentColor,
12
+ bottom: `${component.floatingButtonOffset}px`,
13
+ })}
14
+ @click=${(event: Event) => component.handleFloatingButtonClick(event)}
15
+ @pointerdown=${(event: PointerEvent) => component.handleFloatingButtonPointerDown(event)}
16
+ @pointermove=${(event: PointerEvent) => component.handleFloatingButtonPointerMove(event)}
17
+ @pointerup=${(event: PointerEvent) => component.handleFloatingButtonPointerUp(event)}
18
+ @pointercancel=${(event: PointerEvent) => component.handleFloatingButtonPointerCancel(event)}
11
19
  aria-expanded=${component.open}
12
20
  >
13
21
  <img src=${buttonIconUrl} alt="" aria-hidden="true" />