frst-components 0.22.13 → 0.22.15

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/dist/index.js CHANGED
@@ -3522,6 +3522,11 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
3522
3522
  // Find the last index of "@" in the text before the cursor
3523
3523
  const atIndex = completeText.lastIndexOf('@');
3524
3524
  hasSpaceBeForeKey = completeText.substring(atIndex - 1, atIndex).trim() === "";
3525
+ console.log(`teste - completeText = ${completeText}`);
3526
+ console.log(`teste textBeforeCursor ${textBeforeCursor}`);
3527
+ console.log(`teste - atIndex = ${atIndex}`);
3528
+ console.log(`teste - spaceBefore = ${completeText.substring(atIndex - 1, atIndex).trim() === ""}`);
3529
+ console.log(`teste hasSpaceBeForeKey ${hasSpaceBeForeKey}`);
3525
3530
  if (hasSpaceBeForeKey || textBeforeCursor === "@") {
3526
3531
  if (atIndex !== -1) {
3527
3532
  // Get the characters after the last "@"
@@ -3532,19 +3537,25 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
3532
3537
  inputSearch = afterAt.replace('@', '');
3533
3538
  }
3534
3539
  else {
3540
+ console.log(`teste esconde mention atIndex = ${atIndex}`);
3535
3541
  inputSearch = '';
3536
3542
  setShowMention(false);
3537
3543
  }
3538
3544
  }
3539
3545
  else {
3546
+ console.log(`teste esconde mention`);
3540
3547
  setShowMention(false);
3541
3548
  }
3542
3549
  }
3543
3550
  if ((hasSpaceBeForeKey && hasKeyPresent) || textBeforeCursor === "@") {
3551
+ console.log(`teste, chamar backend com ${inputSearch}`);
3544
3552
  setShowMention(true);
3545
3553
  setInputSearch(inputSearch);
3546
3554
  !!onChange && onChange(inputSearch);
3547
3555
  }
3556
+ else {
3557
+ console.log(`teste, não chamou o backend ${inputSearch}`);
3558
+ }
3548
3559
  countChars();
3549
3560
  createFormatAndTextContentToSaveComment();
3550
3561
  };
@@ -3564,6 +3575,8 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
3564
3575
  const clearDivContent = () => {
3565
3576
  if (!divInputRef.current)
3566
3577
  return;
3578
+ console.log('placeholder focus = ', focus);
3579
+ console.log('placeholder divInputRef.current.childNodes.length = ', divInputRef.current.childNodes.length);
3567
3580
  if ((divInputRef.current.childNodes.length === 0 && !focus)) {
3568
3581
  // create a textnode with the placeholder
3569
3582
  divInputRef.current.innerText = placeholder;
@@ -3578,6 +3591,7 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
3578
3591
  setPlaceholder(false);
3579
3592
  }
3580
3593
  });
3594
+ console.log('placeholder isEmpty = ', isEmpty);
3581
3595
  // if they are empty show the placeholder
3582
3596
  if (isEmpty) {
3583
3597
  // create a textnode with the placeholder
@@ -3587,11 +3601,15 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
3587
3601
  }
3588
3602
  else if (divInputRef.current.innerText === placeholder) {
3589
3603
  // create a paragraph node
3604
+ divInputRef.current.innerHTML = '';
3605
+ // clear complete the div
3606
+ divInputRef.current.innerText = '';
3607
+ console.log(`placeholder clear`);
3590
3608
  const p = document.createElement('p');
3591
3609
  const br = document.createElement('br');
3592
3610
  p.appendChild(br);
3593
- divInputRef.current.innerHTML = '';
3594
3611
  divInputRef.current.appendChild(p);
3612
+ console.log(`placeholder divInputRef.current.innerHtml= ${divInputRef.current.innerHTML}`);
3595
3613
  setPlaceholder(false);
3596
3614
  }
3597
3615
  };
@@ -3614,6 +3632,7 @@ const useInputHook = ({ limit, placeholder, onSendMentions, onContentFormat, onC
3614
3632
  const spaceNode = document.createTextNode('\u00A0'); // Unicode for non-breaking space
3615
3633
  addMentionToRangeAndSpaceNode(range, spaceNode, mentionedUser);
3616
3634
  createNewRangeAndMoveCursorToTheEnd(selection, spaceNode);
3635
+ divInputRef.current?.focus();
3617
3636
  }
3618
3637
  }, [replyMentionedUser]);
3619
3638
  React.useEffect(() => {
@@ -4575,7 +4594,7 @@ const Button$3 = styled__default["default"].div `
4575
4594
  &:hover {
4576
4595
  background: ${({ theme }) => disabled ? theme.colors.borderPrimary : theme.colors.primary1};
4577
4596
  color: ${({ theme }) => theme.colors.shadeWhite};
4578
- box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.2);
4597
+ box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.3);
4579
4598
  }
4580
4599
 
4581
4600
  ${(isTooltipActive || active) && `color : ${theme.colors.shadeWhite};`}
@@ -4610,10 +4629,11 @@ const ButtonMore$1 = styled__default["default"](Button__default["default"]) `
4610
4629
  display: flex !important;
4611
4630
  justify-content: center !important;
4612
4631
  border-radius: 12px !important;
4632
+ background-color: transparent !important;
4613
4633
  ${({ isHover }) => isHover && `&:hover {
4614
4634
  background-color: #FFF9 !important;
4615
4635
  }`};
4616
- }`;
4636
+ `;
4617
4637
  const MenuCustom$2 = styled__default["default"](Menu__default["default"]) `
4618
4638
  margin-top: 8px;
4619
4639
  margin-left: 30px;
@@ -19500,7 +19520,7 @@ function FiltroGaleriaDesafios({ placeholderSelect, handleValueSelect, optionLab
19500
19520
  const lengthList = selectedItems ? selectedItems.length : 0;
19501
19521
  return listItems.length >= maxListItems ? (jsxRuntime.jsxs(searchAndButton$1, { children: [jsxRuntime.jsx("div", { children: jsxRuntime.jsx(SearchField, { placeholder: textBusca, className: null, handleClickButton: null, isButton: true, hasSearchIcon: true, onChange: (e) => {
19502
19522
  setTextFilter(e.target.value);
19503
- } }) }), lengthList >= 1 ? (jsxRuntime.jsx(Button$4, { style: { marginTop: "1rem" }, variant: 'link', label: textButtonClear, disabled: false, handleClick: () => {
19523
+ } }) }), lengthList >= 2 ? (jsxRuntime.jsx(Button$4, { style: { marginTop: "1rem" }, variant: 'link', label: textButtonClear, disabled: false, handleClick: () => {
19504
19524
  setSelectedListItems(null);
19505
19525
  handleValueSelect([]);
19506
19526
  } })) : (jsxRuntime.jsx("div", {}))] })) : lengthList >= 1 ? (jsxRuntime.jsx(searchAndButton$1, { children: jsxRuntime.jsx(Button$4, { variant: 'link', label: textButtonClear, disabled: false, handleClick: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"useInputHook.d.ts","sourceRoot":"","sources":["../../../../src/components/input-comment/useInputHook.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,UAAU,UAAU;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC5C,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,IAAI,CAAA;CAC5B;AAED,eAAO,MAAM,YAAY,oHAAqH,UAAU;yBA2HxH,mBAAmB;;;;;;;;;8BA/Ed,IAAI;;;;CA4RxC,CAAA"}
1
+ {"version":3,"file":"useInputHook.d.ts","sourceRoot":"","sources":["../../../../src/components/input-comment/useInputHook.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAE/B,UAAU,UAAU;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IAC5C,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC1C,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,kBAAkB,CAAC,EAAE,IAAI,CAAA;CAC5B;AAED,eAAO,MAAM,YAAY,oHAAqH,UAAU;yBA2HxH,mBAAmB;;;;;;;;;8BA/Ed,IAAI;;;;CA+SxC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"menuMoreStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-more/menuMoreStyles.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,oBAAoB,CAAA;AAGrC,eAAO,MAAM,QAAQ,kEAIpB,CAAA;AAED,eAAO,MAAM,UAAU;aAA8B,OAAO;SAa1D,CAAA;AAGF,eAAO,MAAM,UAAU,0EAgDtB,CAAA;AAED,eAAO,MAAM,cAAc,mKAa1B,CAAA;AAED,eAAO,MAAM,iBAAiB,mKAS7B,CAAA;AAED,eAAO,MAAM,UAAU,oEAQtB,CAAA;AAED,eAAO,MAAM,UAAU,oEAMtB,CAAA"}
1
+ {"version":3,"file":"menuMoreStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/menu-more/menuMoreStyles.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,oBAAoB,CAAA;AAIrC,eAAO,MAAM,QAAQ,kEAIpB,CAAA;AAED,eAAO,MAAM,UAAU;aAA8B,OAAO;SAc3D,CAAA;AAGD,eAAO,MAAM,UAAU,0EAgDtB,CAAA;AAED,eAAO,MAAM,cAAc,mKAa1B,CAAA;AAED,eAAO,MAAM,iBAAiB,mKAS7B,CAAA;AAED,eAAO,MAAM,UAAU,oEAQtB,CAAA;AAED,eAAO,MAAM,UAAU,oEAMtB,CAAA"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.22.13",
4
+ "version": "0.22.15",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",