This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["es2015", "stage-2"], | |
"plugins": ["transform-runtime"], | |
"comments": false, | |
"env": { | |
"test": { | |
"plugins": [ "istanbul" ] | |
} | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package repositories | |
import javax.inject.{Singleton, Inject} | |
import com.os.shared.contentapi.api._ | |
import com.os.shared.contentapi._ | |
import com.sksamuel.elastic4s.ElasticDsl._ | |
import com.sksamuel.elastic4s.QueryDefinition | |
import common.Logging | |
import implicits.ESFormats |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { IntlProvider, FormattedMessage, addLocaleData } = ReactIntl; | |
// Import your json file containing the default messages | |
import defaultMessages from './defaultMessages.json!json'; | |
// Import your json file containing the translated messages, | |
// in this example we are importing the spanish version of our messages. | |
import spanishMessages from './en_ES.json!json'; | |
const { es } = ReactIntlLocaleData; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package client.components.select | |
import japgolly.scalajs.react._ | |
import japgolly.scalajs.react.extra.{LogLifecycle, Reusability, Px} | |
import japgolly.scalajs.react.vdom.prefix_<^._ | |
import org.scalajs.dom | |
import org.scalajs.dom.ext.KeyCode | |
import org.scalajs.dom.raw.HTMLInputElement | |
object Select { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package client.facades | |
import scala.scalajs.js | |
import scala.scalajs.js.annotation.{JSName, ScalaJSDefined} | |
import scala.scalajs.js.| | |
/* | |
Don't forget to include the GPT JS script fetching code (sync or async) at the head HTML tag! | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// controllers/Application.scala | |
object Application extends Controller { | |
def index = ActionWithAttrs { implicit request => | |
Ok(views.html.index()) | |
} | |
} | |
object ActionWithAttrs extends StackableAction |