<commit_before>package client.modules

import client.components.{Icon}
import diode.react.ModelProxy
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._
import client.handlers.{RefreshMessages, SubscribeSearch, UpdateLabel, CreateLabels}
import client.rootmodels.{ SearchesRootModel}
import client.css._
import client.models.{LabelModel, UserModel}
import client.services.{CoreApi, LGCircuit}
import org.scalajs.dom._
import scalacss.ScalaCssReact._
import org.querki.facades.bootstrap.datepicker._
import scala.scalajs.js
import org.querki.jquery._
import org.denigma.selectize._


object Searches {

  case class Props(view: String, proxy: ModelProxy[SearchesRootModel])

  case class State(userModel: UserModel, tags: js.Array[String] = js.Array("scala", "scalajs"))

  def sidebar = Callback {
    val sidebtn: js.Object = "#searchContainer"
    $(sidebtn).toggleClass("sidebar-left sidebar-animate sidebar-md-show")
  }

  val selectState: js.Object = "#selectize"

  case class Backend(t: BackendScope[Props, State]) {

    def searchClick(props: Props): Unit = {
      val sidebtn: js.Object = "#searchContainer"
      $(sidebtn).toggleClass("sidebar-left sidebar-animate sidebar-md-show")
      window.sessionStorage.setItem("messageSearchLabel", "any([Spilicious])")
      LGCircuit.dispatch(SubscribeSearch())
      LGCircuit.dispatch(RefreshMessages())
    }

    /*val ref = RefHolder[ReactTagsInputM]*/

    val onChange: (js.Array[String]) => Callback =
      tags => t.modState(_.copy(tags = tags)) >> Callback.info(s"New state: $tags")

    def updateDate(e: ReactEventI) = {
      val value = e.target.value
      t.modState(s => s.copy(userModel = s.userModel.copy(email = value)))
    }

    def initializeTagsInput(): Unit = {<commit_msg>Fixed issue : on a narrow screen, when the search panel is expanded, the right-hand side showing the results should be masked with semi-transparent mask<commit_after>package client.modules

import client.components.{Icon}
import diode.react.ModelProxy
import japgolly.scalajs.react._
import japgolly.scalajs.react.vdom.prefix_<^._
import client.handlers.{RefreshMessages, SubscribeSearch, UpdateLabel, CreateLabels}
import client.rootmodels.{ SearchesRootModel}
import client.css._
import client.models.{LabelModel, UserModel}
import client.services.{CoreApi, LGCircuit}
import org.scalajs.dom._
import scalacss.ScalaCssReact._
import org.querki.facades.bootstrap.datepicker._
import scala.scalajs.js
import org.querki.jquery._
import org.denigma.selectize._


object Searches {

  case class Props(view: String, proxy: ModelProxy[SearchesRootModel])

  case class State(userModel: UserModel, tags: js.Array[String] = js.Array("scala", "scalajs"))

  def sidebar = Callback {
    val sidebtn: js.Object = "#searchContainer"
    $(sidebtn).toggleClass("sidebar-left sidebar-animate sidebar-md-show")
    if(!$(sidebtn).hasClass("sidebar-left sidebar-animate sidebar-md-show")){
      $(sidebtn).next().addClass("sidebarRightContainer")
    }else{
      $(sidebtn).next().removeClass("sidebarRightContainer")
    }
  }

  val selectState: js.Object = "#selectize"

  case class Backend(t: BackendScope[Props, State]) {

    def searchClick(props: Props): Unit = {
      val sidebtn: js.Object = "#searchContainer"
      $(sidebtn).toggleClass("sidebar-left sidebar-animate sidebar-md-show")
      window.sessionStorage.setItem("messageSearchLabel", "any([Spilicious])")
      LGCircuit.dispatch(SubscribeSearch())
      LGCircuit.dispatch(RefreshMessages())
    }

    /*val ref = RefHolder[ReactTagsInputM]*/

    val onChange: (js.Array[String]) => Callback =
      tags => t.modState(_.copy(tags = tags)) >> Callback.info(s"New state: $tags")

    def updateDate(e: ReactEventI) = {
      val value = e.target.value
      t.modState(s => s.copy(userModel = s.userModel.copy(email = value)))
    }

    def initializeTagsInput(): Unit = {
{'fraction_non_alphanumeric': 0.1289829212337497, 'fraction_numerical': 0.0, 'mean_word_length': 4.534555712270804, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4224156', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1214, 'n_words': 257}