@naniteninja/dashboard-components-lib 2.3.8 → 2.4.0

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/index.d.ts CHANGED
@@ -1342,7 +1342,6 @@ declare class LibMessageModalComponent implements OnInit {
1342
1342
  paddedMinutes: string;
1343
1343
  paddedSeconds: string;
1344
1344
  private replyDelayMs;
1345
- private pressTimer;
1346
1345
  options: {
1347
1346
  value: MessageOption;
1348
1347
  label: string;
@@ -1361,8 +1360,13 @@ declare class LibMessageModalComponent implements OnInit {
1361
1360
  clearTime(): void;
1362
1361
  pad(num: number): string;
1363
1362
  selectOption(option: MessageOption): void;
1364
- onPressStart(): void;
1365
- onPressEnd(): void;
1363
+ /**
1364
+ * Saves the options, sends, and closes — on one click, whatever the toggle says.
1365
+ *
1366
+ * This was gated on `!this.longPressOption`, so with the toggle set to Yes the button did nothing
1367
+ * on a normal click and the matcher had to press and hold it for 800ms to get out of the modal.
1368
+ * The toggle governs holding the *chat's* send icon on later messages, never this button.
1369
+ */
1366
1370
  onSendClick(): void;
1367
1371
  executeSend(): void;
1368
1372
  onSend(): void;
@@ -1445,6 +1449,14 @@ declare class ChatActionsService {
1445
1449
  onSend(): void;
1446
1450
  handleSendClick(): void;
1447
1451
  onKeyDown(event: KeyboardEvent): void;
1452
+ /**
1453
+ * Holding the send icon sends straight away with the options saved last time — no modal. Tapping
1454
+ * it is what opens the modal to change them.
1455
+ *
1456
+ * With nothing saved yet there is nothing to replay, so the modal opens instead. No guard or timer
1457
+ * wraps this: the template no longer binds (click) on the send icon, so a hold cannot also arrive
1458
+ * here as a tap, and anything that blocked a legitimate send would be worse than a rare double.
1459
+ */
1448
1460
  onLongPress(): void;
1449
1461
  onBlurPickerSpace(): void;
1450
1462
  private disconnectEmojiObserver;
@@ -1480,6 +1492,12 @@ declare class ChatComponent implements OnInit, AfterViewInit, OnChanges, OnDestr
1480
1492
  includeGifMessage: boolean;
1481
1493
  includeTime: boolean;
1482
1494
  set dateMessages(value: IMessage[]);
1495
+ /**
1496
+ * 100 was too short to be a message limit: a pasted paragraph or a location address dropped in by
1497
+ * the pill would be silently cut off mid-word, and the box could never grow past about two lines.
1498
+ * Raised so the textarea's own 120px cap is what bounds the input, not a truncation the matcher
1499
+ * never sees happen. Consumers can still narrow it per usage.
1500
+ */
1483
1501
  maxLength: number;
1484
1502
  enableGifPicker: boolean;
1485
1503
  prospectJoinDate: Date | null;
@@ -1494,7 +1512,24 @@ declare class ChatComponent implements OnInit, AfterViewInit, OnChanges, OnDestr
1494
1512
  inputPlaceholder: string;
1495
1513
  emojiPickerRef?: ElementRef<HTMLElement>;
1496
1514
  scrollableContainer?: ElementRef<HTMLElement>;
1497
- chatInput?: InputFieldComponent;
1515
+ nativeTextarea?: ElementRef<HTMLTextAreaElement>;
1516
+ /**
1517
+ * Adapts the native textarea to the shape the chat services expect.
1518
+ *
1519
+ * The input used to be a `lib-input-field`, and emoji insertion and focus still reach for
1520
+ * `chatInput.inputFieldRef.nativeElement` — a textarea either way. Exposing the same shape keeps
1521
+ * those paths working against the plain textarea the redesign needs, instead of threading a second
1522
+ * element type through three services.
1523
+ */
1524
+ get chatInput(): InputFieldComponent | undefined;
1525
+ /**
1526
+ * True while the text fits on one line, which is what lets the placeholder and caret sit centred.
1527
+ * Once it wraps the wrapper switches to top-aligned so the icons stay put as the box grows.
1528
+ */
1529
+ isSingleLine: boolean;
1530
+ /** Both mirror `.chat-textarea` in the SCSS; changing one without the other desyncs the growth. */
1531
+ private static readonly TEXTAREA_LINE_HEIGHT_PX;
1532
+ private static readonly MAX_TEXTAREA_HEIGHT_PX;
1498
1533
  emojiContainer?: ElementRef<HTMLElement>;
1499
1534
  messageSender?: ElementRef<HTMLElement>;
1500
1535
  readonly state: ChatStateService;
@@ -1531,6 +1566,13 @@ declare class ChatComponent implements OnInit, AfterViewInit, OnChanges, OnDestr
1531
1566
  get newTextMessage(): string;
1532
1567
  constructor();
1533
1568
  ngOnInit(): void;
1569
+ /**
1570
+ * Grows the textarea with its content, up to a cap, and reports whether it is still one line.
1571
+ *
1572
+ * Height is reset to `auto` first because scrollHeight only shrinks back once the element is not
1573
+ * already holding the taller height open — without it the box can grow but never shrink.
1574
+ */
1575
+ autoResize(): void;
1534
1576
  ngOnDestroy(): void;
1535
1577
  ngAfterViewInit(): void;
1536
1578
  ngOnChanges(changes: SimpleChanges): void;
@@ -2366,6 +2408,7 @@ declare class MatcherStatusesComponent implements OnChanges, OnDestroy {
2366
2408
  hideStatuses: boolean;
2367
2409
  messages: IMessage[];
2368
2410
  inputValue?: string;
2411
+ /** Matches lib-chat's default; 100 truncated pasted text and location addresses mid-word. */
2369
2412
  maxLength: number;
2370
2413
  responseTime?: string;
2371
2414
  disabled: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naniteninja/dashboard-components-lib",
3
- "version": "2.3.8",
3
+ "version": "2.4.0",
4
4
  "author": "naniteninja",
5
5
  "repository": {
6
6
  "type": "git"