rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,467 lines • 542 kB
JSON
[
{
"__docId__": 0,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/action_sheet/index.js",
"memberof": null,
"longname": "src/components/action_sheet/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import { Component } from \"../../core/bane\";\nimport $ from \"jquery\";\nimport urlencode from \"urlencode\";\nimport \"./action_sheet.scss\";\n\nclass ActionSheetComponent extends Component {\n initialize() {\n this.isActionSheetMenuHidden = false;\n\n this.events = {\n \"click .js-action-sheet-menu-control\": \"actionSheetMenuControlClicked\",\n \"click .js-action-sheet-share-control\": \"actionSheetShareControlClicked\"\n };\n }\n\n actionSheetMenuControlClicked(event) {\n let $el = $(event.currentTarget);\n let id = \"#\" + $el.attr(\"aria-owns\"),\n $menu = $el.siblings(id);\n\n if (this.isActionSheetMenuHidden) {\n this._hideActionSheetMenu($menu);\n this.isActionSheetMenuHidden = false;\n } else {\n this._showActionSheetMenu($menu);\n this.isActionSheetMenuHidden = true;\n }\n\n event.preventDefault();\n }\n\n actionSheetShareControlClicked(event) {\n let $el = $(event.currentTarget);\n\n let width = 550,\n height = 420,\n winHeight = $(window).height(),\n winWidth = $(window).width(),\n left,\n top;\n\n let title = $el.closest(\".article\").find(\"meta[itemprop=\\\"headline\\\"]\")[0].content,\n url = window.location.href,\n network = $el.data(\"network\");\n\n let tweet = `${urlencode(title)} ${urlencode(url)} via @lonelyplanet`;\n\n left = Math.round((winWidth / 2) - (width / 2));\n top = 0;\n\n if (winHeight > height) {\n top = Math.round((winHeight / 2) - (height / 2));\n }\n\n let windowOptions = \"toolbar=no,menubar=no,location=yes,resizable=no,scrollbars=yes\",\n windowSize = `width=${width},height=${height},left=${left},left=${top}`;\n\n if (network === \"twitter\") {\n window.open(\"https://twitter.com/intent/tweet?text=\" + tweet, \"share\", windowOptions + \",\" + windowSize);\n }\n\n if (network === \"facebook\") {\n window.open(\"https://www.facebook.com/sharer/sharer.php?u=\" + url, \"share\", windowOptions + \",\" + windowSize);\n }\n }\n\n _showActionSheetMenu($menu) {\n $menu\n .addClass(\"is-open\")\n .prop(\"hidden\", false)\n .attr(\"aria-hidden\", \"false\");\n }\n\n _hideActionSheetMenu($menu) {\n $menu\n .removeClass(\"is-open\")\n .prop(\"hidden\", true)\n .attr(\"aria-hidden\", \"true\");\n }\n}\n\nexport default ActionSheetComponent;\n"
},
{
"__docId__": 1,
"kind": "class",
"static": true,
"variation": null,
"name": "ActionSheetComponent",
"memberof": "src/components/action_sheet/index.js",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/action_sheet/index.js",
"importStyle": "ActionSheetComponent",
"description": null,
"lineNumber": 6,
"undocument": true,
"interface": false,
"extends": [
"src/core/bane~Component"
]
},
{
"__docId__": 2,
"kind": "method",
"static": false,
"variation": null,
"name": "initialize",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#initialize",
"access": null,
"description": null,
"lineNumber": 7,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 3,
"kind": "member",
"static": false,
"variation": null,
"name": "isActionSheetMenuHidden",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#isActionSheetMenuHidden",
"access": null,
"description": null,
"lineNumber": 8,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 4,
"kind": "member",
"static": false,
"variation": null,
"name": "events",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#events",
"access": null,
"description": null,
"lineNumber": 10,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 5,
"kind": "method",
"static": false,
"variation": null,
"name": "actionSheetMenuControlClicked",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#actionSheetMenuControlClicked",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"params": [
{
"name": "event",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 6,
"kind": "member",
"static": false,
"variation": null,
"name": "isActionSheetMenuHidden",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#isActionSheetMenuHidden",
"access": null,
"description": null,
"lineNumber": 23,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 7,
"kind": "member",
"static": false,
"variation": null,
"name": "isActionSheetMenuHidden",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#isActionSheetMenuHidden",
"access": null,
"description": null,
"lineNumber": 26,
"undocument": true,
"type": {
"types": [
"boolean"
]
}
},
{
"__docId__": 8,
"kind": "method",
"static": false,
"variation": null,
"name": "actionSheetShareControlClicked",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#actionSheetShareControlClicked",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"params": [
{
"name": "event",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 9,
"kind": "method",
"static": false,
"variation": null,
"name": "_showActionSheetMenu",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#_showActionSheetMenu",
"access": null,
"description": null,
"lineNumber": 67,
"undocument": true,
"params": [
{
"name": "$menu",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 10,
"kind": "method",
"static": false,
"variation": null,
"name": "_hideActionSheetMenu",
"memberof": "src/components/action_sheet/index.js~ActionSheetComponent",
"longname": "src/components/action_sheet/index.js~ActionSheetComponent#_hideActionSheetMenu",
"access": null,
"description": null,
"lineNumber": 74,
"undocument": true,
"params": [
{
"name": "$menu",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 11,
"kind": "variable",
"static": true,
"variation": null,
"name": "actionSheetComponent",
"memberof": "src/components/action_sheet/index.js",
"longname": "src/components/action_sheet/index.js~actionSheetComponent",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/action_sheet/index.js",
"importStyle": "actionSheetComponent",
"description": null,
"lineNumber": 82,
"undocument": true,
"type": {
"types": [
"src/components/action_sheet/index.js~ActionSheetComponent"
]
}
},
{
"__docId__": 12,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/analytics/index.js",
"memberof": null,
"longname": "src/components/analytics/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Flamsteed from \"flamsteed\";\nimport CookieUtil from \"../../core/cookie_util\";\n\nwindow.lp = window.lp || {};\n\nwindow.lp.fs = {\n buffer: [],\n now: () => (Date.now ? Date.now() : new Date().getTime()),\n log: (x) => this.buffer.push({ e: x, t: this.now() }),\n time: (x) => !!window.performance && !!window.performance.now && this.buffer.push( { e: x, t: this.now()})\n};\n\nif (window.location.protocol !== \"https:\") {\n window.lp.fs = new Flamsteed({\n events: window.lp.fs.buffer,\n u: new CookieUtil().getCookie(\"lpUid\") || \"\",\n schema: \"0.3\"\n });\n}\n"
},
{
"__docId__": 13,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/article/index.js",
"memberof": null,
"longname": "src/components/article/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./article.scss\");\n"
},
{
"__docId__": 14,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/article_body/index.js",
"memberof": null,
"longname": "src/components/article_body/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import { Component } from \"../../core/bane\";\nimport $ from \"jquery\";\nimport ImageGallery from \"../image_gallery\";\nimport moment from \"moment\";\nimport \"./article_body.scss\";\n\n/**\n * Enhances the body of articles with a gallery and more\n */\nexport default class ArticleBodyComponent extends Component {\n initialize() {\n this.imageContainerSelector = \".stack__article__image-container\";\n\n this.loadImages().then(() => {\n this.gallery = new ImageGallery({ el: \".article\" });\n });\n\n this.formatAndPositionDate();\n }\n /**\n * Loads all the images in the body of the article\n * @return {Promise} A promise for when all of the images have loaded\n */\n loadImages() {\n let promises = [];\n\n this.$el.find(this.imageContainerSelector).each((index, el) => {\n let $img = $(el).find(\"img\"),\n $a = $(el).find(\"a\"),\n src = $($img).attr(\"src\");\n\n let promise = this.loadImage(src).then((image) => {\n $a.attr(\"data-size\", `${image.width}x${image.height}`);\n\n if(image.width > 1000 && $img.hasClass(\"is-landscape\")) {\n $a.closest(this.imageContainerSelector)\n .addClass(\"is-wide\");\n }\n\n $a.closest(this.imageContainerSelector)\n .addClass(\"is-visible\");\n });\n promises.push(promise);\n });\n\n return Promise.all(promises);\n }\n /**\n * Preload an image\n * @param {String} url Url of the image to load\n * @return {Promise} A promise for when the image loads\n */\n loadImage(url) {\n let image = new Image();\n\n return new Promise((resolve, reject) => {\n image.src = url;\n image.onload = function() {\n resolve(image);\n };\n image.onerror = function() {\n reject();\n };\n\n if (!url) {\n reject();\n }\n });\n }\n /**\n * Format the post date with moment.js and append it to the bottom of the article\n */\n formatAndPositionDate() {\n let date = this.$el.data(\"post-date\"),\n formattedDate = moment(date).format(\"MMMM YYYY\");\n\n this.$el.find(\".article-body__content\").last()\n .find(\"p:not(.stack__article__image-container)\").last()\n .append(\"<span class=\\\"article-post-date\\\">Published <time datetime=\\\"\" + date + \"\\\">\" + formattedDate + \"</time></span>\");\n }\n}\n"
},
{
"__docId__": 15,
"kind": "class",
"static": true,
"variation": null,
"name": "ArticleBodyComponent",
"memberof": "src/components/article_body/index.js",
"longname": "src/components/article_body/index.js~ArticleBodyComponent",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/article_body/index.js",
"importStyle": "ArticleBodyComponent",
"description": "Enhances the body of articles with a gallery and more",
"lineNumber": 10,
"interface": false,
"extends": [
"src/core/bane~Component"
]
},
{
"__docId__": 16,
"kind": "method",
"static": false,
"variation": null,
"name": "initialize",
"memberof": "src/components/article_body/index.js~ArticleBodyComponent",
"longname": "src/components/article_body/index.js~ArticleBodyComponent#initialize",
"access": null,
"description": null,
"lineNumber": 11,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 17,
"kind": "member",
"static": false,
"variation": null,
"name": "imageContainerSelector",
"memberof": "src/components/article_body/index.js~ArticleBodyComponent",
"longname": "src/components/article_body/index.js~ArticleBodyComponent#imageContainerSelector",
"access": null,
"description": null,
"lineNumber": 12,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 18,
"kind": "member",
"static": false,
"variation": null,
"name": "gallery",
"memberof": "src/components/article_body/index.js~ArticleBodyComponent",
"longname": "src/components/article_body/index.js~ArticleBodyComponent#gallery",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 19,
"kind": "method",
"static": false,
"variation": null,
"name": "loadImages",
"memberof": "src/components/article_body/index.js~ArticleBodyComponent",
"longname": "src/components/article_body/index.js~ArticleBodyComponent#loadImages",
"access": null,
"description": "Loads all the images in the body of the article",
"lineNumber": 24,
"params": [],
"return": {
"nullable": null,
"types": [
"Promise"
],
"spread": false,
"description": "A promise for when all of the images have loaded"
},
"generator": false
},
{
"__docId__": 20,
"kind": "method",
"static": false,
"variation": null,
"name": "loadImage",
"memberof": "src/components/article_body/index.js~ArticleBodyComponent",
"longname": "src/components/article_body/index.js~ArticleBodyComponent#loadImage",
"access": null,
"description": "Preload an image",
"lineNumber": 53,
"params": [
{
"nullable": null,
"types": [
"String"
],
"spread": false,
"optional": false,
"name": "url",
"description": "Url of the image to load"
}
],
"return": {
"nullable": null,
"types": [
"Promise"
],
"spread": false,
"description": "A promise for when the image loads"
},
"generator": false
},
{
"__docId__": 21,
"kind": "method",
"static": false,
"variation": null,
"name": "formatAndPositionDate",
"memberof": "src/components/article_body/index.js~ArticleBodyComponent",
"longname": "src/components/article_body/index.js~ArticleBodyComponent#formatAndPositionDate",
"access": null,
"description": "Format the post date with moment.js and append it to the bottom of the article",
"lineNumber": 73,
"params": [],
"generator": false
},
{
"__docId__": 22,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/article_footer/index.js",
"memberof": null,
"longname": "src/components/article_footer/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./article_footer.scss\");\n"
},
{
"__docId__": 23,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/article_header/index.js",
"memberof": null,
"longname": "src/components/article_header/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./article_header.scss\");\n"
},
{
"__docId__": 24,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/article_pagination/index.js",
"memberof": null,
"longname": "src/components/article_pagination/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./article_pagination.scss\");\n"
},
{
"__docId__": 25,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/articles/index.js",
"memberof": null,
"longname": "src/components/articles/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import { Component } from \"../../core/bane\";\nimport $clamp from \"clamp-js/clamp.js\";\nimport Tabs from \"../tabs/tabs_component\";\nimport $ from \"jquery\";\n\nimport \"./_articles.scss\";\n\nclass ArticlesComponent extends Component {\n initialize(options) {\n this.articles = this.$el.find(\".article\");\n this.maxLines = options.maxLines || 6;\n // Retrieved via getComputedStyle($0)[\"line-height\"] ish\n this.titleLineHeight = options.titleLineHeight || { desktop: 35, mobile: 23 };\n this.blurbLineHeight = options.blurbLineHeight || { desktop: 27, mobile: 18 };\n this.mobileWidth = options.mobileWidth || 717;\n this.screen = \"mobile\";\n this.tabs = new Tabs({\n el: $(\".articles\").find(\".tabs\")\n });\n\n if (!$(\"html\").hasClass(\"ie9\")) {\n this._detectScreen();\n this._clampText();\n\n this.listenTo(this.tabs, \"tabs.activate\", this._reclamp.bind(this));\n $(window).on(\"resize\", this._reclamp.bind(this));\n }\n }\n widthWindow() {\n return $(window).width();\n }\n isDesktop() {\n return this.widthWindow() >= this.mobileWidth;\n }\n _reclamp() {\n this._detectScreen();\n this._clampText();\n }\n _detectScreen() {\n return this.screen = this.isDesktop() ? \"desktop\" : \"mobile\";\n }\n _clampText() {\n this.articles.each((index, article) => {\n let {\n titleLines,\n teaserLines,\n teaser,\n blurb\n } = this._findElements(article);\n\n // aka 2 + 5 or something\n if (titleLines + teaserLines > this.maxLines) {\n let teaserClamp = Math.ceil(this.maxLines - titleLines);\n $clamp(teaser.get(0), { clamp: teaserClamp });\n teaser.addClass(\"article__info__teaser--small\");\n blurb.prop(\"hidden\", true);\n } else {\n // Only clamp the blurb\n let blurbClamp = Math.ceil(this.maxLines - titleLines - teaserLines);\n $clamp(blurb.get(0), { clamp: blurbClamp });\n }\n });\n }\n _findElements(article) {\n // Select all necessary elements\n let $article = $(article),\n title = $article.find(\".article__info__title\"),\n teaser = $article.find(\".article__info__teaser\"),\n blurb = $article.find(\".article__info__blurb\"),\n // Find elements heights\n titleHeight = parseInt(title.height(), 10) || 0,\n teaserHeight = parseInt(teaser.height(), 10) || 0,\n blurbHeight = parseInt(blurb.height(), 10) || 0,\n // Figure out how many lines each element actually is based on line heights and height\n blurbLines = blurbHeight / this.blurbLineHeight[this.screen],\n teaserLines = teaserHeight / this.blurbLineHeight[this.screen],\n titleLines = titleHeight / this.titleLineHeight[this.screen],\n\n // Figure out how many lines need to be removed\n linesAllowed = this.maxLines - titleLines,\n removeLines = Math.floor(blurbLines + teaserLines - linesAllowed);\n\n return {\n removeLines: removeLines,\n titleLines: titleLines,\n teaserLines: teaserLines,\n blurbLines: blurbLines,\n teaser: teaser,\n blurb: blurb\n };\n }\n}\n\nexport default ArticlesComponent;\n"
},
{
"__docId__": 26,
"kind": "class",
"static": true,
"variation": null,
"name": "ArticlesComponent",
"memberof": "src/components/articles/index.js",
"longname": "src/components/articles/index.js~ArticlesComponent",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/articles/index.js",
"importStyle": "ArticlesComponent",
"description": null,
"lineNumber": 8,
"undocument": true,
"interface": false,
"extends": [
"src/core/bane~Component"
]
},
{
"__docId__": 27,
"kind": "method",
"static": false,
"variation": null,
"name": "initialize",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#initialize",
"access": null,
"description": null,
"lineNumber": 9,
"undocument": true,
"params": [
{
"name": "options",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 28,
"kind": "member",
"static": false,
"variation": null,
"name": "articles",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#articles",
"access": null,
"description": null,
"lineNumber": 10,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 29,
"kind": "member",
"static": false,
"variation": null,
"name": "maxLines",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#maxLines",
"access": null,
"description": null,
"lineNumber": 11,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 30,
"kind": "member",
"static": false,
"variation": null,
"name": "titleLineHeight",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#titleLineHeight",
"access": null,
"description": null,
"lineNumber": 13,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 31,
"kind": "member",
"static": false,
"variation": null,
"name": "blurbLineHeight",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#blurbLineHeight",
"access": null,
"description": null,
"lineNumber": 14,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 32,
"kind": "member",
"static": false,
"variation": null,
"name": "mobileWidth",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#mobileWidth",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 33,
"kind": "member",
"static": false,
"variation": null,
"name": "screen",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#screen",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"string"
]
}
},
{
"__docId__": 34,
"kind": "member",
"static": false,
"variation": null,
"name": "tabs",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#tabs",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 35,
"kind": "method",
"static": false,
"variation": null,
"name": "widthWindow",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#widthWindow",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 36,
"kind": "method",
"static": false,
"variation": null,
"name": "isDesktop",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#isDesktop",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 37,
"kind": "method",
"static": false,
"variation": null,
"name": "_reclamp",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#_reclamp",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 38,
"kind": "method",
"static": false,
"variation": null,
"name": "_detectScreen",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#_detectScreen",
"access": null,
"description": null,
"lineNumber": 39,
"undocument": true,
"params": [],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 39,
"kind": "method",
"static": false,
"variation": null,
"name": "_clampText",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#_clampText",
"access": null,
"description": null,
"lineNumber": 42,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 40,
"kind": "method",
"static": false,
"variation": null,
"name": "_findElements",
"memberof": "src/components/articles/index.js~ArticlesComponent",
"longname": "src/components/articles/index.js~ArticlesComponent#_findElements",
"access": null,
"description": null,
"lineNumber": 64,
"undocument": true,
"params": [
{
"name": "article",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 41,
"kind": "variable",
"static": true,
"variation": null,
"name": "articlesComponent",
"memberof": "src/components/articles/index.js",
"longname": "src/components/articles/index.js~articlesComponent",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/articles/index.js",
"importStyle": "articlesComponent",
"description": null,
"lineNumber": 94,
"undocument": true,
"type": {
"types": [
"src/components/articles/index.js~ArticlesComponent"
]
}
},
{
"__docId__": 42,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/author/index.js",
"memberof": null,
"longname": "src/components/author/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./author.scss\");\n"
},
{
"__docId__": 43,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/avatar/index.js",
"memberof": null,
"longname": "src/components/avatar/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./_avatar.scss\");\n"
},
{
"__docId__": 44,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/category_list/index.js",
"memberof": null,
"longname": "src/components/category_list/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./category_list.scss\");\n"
},
{
"__docId__": 45,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/food_and_drink/index.js",
"memberof": null,
"longname": "src/components/food_and_drink/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./_food_and_drink.scss\");\n"
},
{
"__docId__": 46,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/footer/footer_component.js",
"memberof": null,
"longname": "src/components/footer/footer_component.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import { Component } from \"../../core/bane\";\nimport $ from \"jquery\";\n\nclass Footer extends Component {\n initialize() {\n this.updateLocationOnChange();\n }\n\n updateLocationOnChange() {\n $(\".js-language-select\").on(\"change\", function(event) {\n let url = \"http://\" + $(this).val();\n\n window.location = url;\n\n event.preventDefault();\n });\n }\n}\n\nexport default Footer;\n"
},
{
"__docId__": 47,
"kind": "class",
"static": true,
"variation": null,
"name": "Footer",
"memberof": "src/components/footer/footer_component.js",
"longname": "src/components/footer/footer_component.js~Footer",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/footer/footer_component.js",
"importStyle": "Footer",
"description": null,
"lineNumber": 4,
"undocument": true,
"interface": false,
"extends": [
"src/core/bane~Component"
]
},
{
"__docId__": 48,
"kind": "method",
"static": false,
"variation": null,
"name": "initialize",
"memberof": "src/components/footer/footer_component.js~Footer",
"longname": "src/components/footer/footer_component.js~Footer#initialize",
"access": null,
"description": null,
"lineNumber": 5,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 49,
"kind": "method",
"static": false,
"variation": null,
"name": "updateLocationOnChange",
"memberof": "src/components/footer/footer_component.js~Footer",
"longname": "src/components/footer/footer_component.js~Footer#updateLocationOnChange",
"access": null,
"description": null,
"lineNumber": 9,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 50,
"kind": "variable",
"static": true,
"variation": null,
"name": "footer",
"memberof": "src/components/footer/footer_component.js",
"longname": "src/components/footer/footer_component.js~footer",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/footer/footer_component.js",
"importStyle": "footer",
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"src/components/footer/footer_component.js~Footer"
]
}
},
{
"__docId__": 51,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/footer/index.js",
"memberof": null,
"longname": "src/components/footer/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import Footer from \"./footer_component\";\n\nrequire(\"./_footer.scss\");\n\nexport default Footer;\n"
},
{
"__docId__": 52,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/guidebook/index.js",
"memberof": null,
"longname": "src/components/guidebook/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "require(\"./_guidebook.scss\");\n"
},
{
"__docId__": 53,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/header/header_component.js",
"memberof": null,
"longname": "src/components/header/header_component.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import { Component } from \"../../core/bane\";\nimport SearchComponent from \"../search\";\nimport NavigationComponent from \"../navigation\";\nimport $ from \"jquery\";\n\nimport debounce from \"lodash/function/debounce\";\n\n/**\n * The page header which contains both search and navigation.\n * Clicking on the search icons opens the search.\n * Will re-render when the browser changes sizes\n */\nclass Header extends Component {\n\n initialize() {\n this.search = new SearchComponent();\n this.navigation = new NavigationComponent({\n el: $(\".navigation\")\n });\n\n this.events = {\n \"click .js-search\": \"onSearchClick\",\n \"click .js-search .navigation__link\": \"onSearchClick\",\n \"click .js-menu\": \"onMobileMenuClick\"\n };\n\n this.$search = this.$el.find(\".header__search\");\n this.$inner = this.$el.find(\".header__inner\");\n\n $(window).resize(debounce(this.render.bind(this), 100));\n this.render();\n }\n /**\n * Add a class to the search when it's too big for the screen\n * @return {Header} The instance of the header\n */\n render() {\n let fadeClassName = \"header__search--fade\";\n\n this.$search\n .removeClass(fadeClassName)\n .toggleClass(fadeClassName, this.isTooBig());\n\n return this;\n }\n /**\n * If the search box is too big based on the screen width\n * @return {Boolean} \n */\n isTooBig() {\n return this.$search.width() > this.$inner.width() * .42;\n }\n \n onSearchClick(e) {\n e.preventDefault();\n\n this.search.show();\n }\n\n onMobileMenuClick(){\n this.navigation._clickNav();\n }\n}\n\nexport default Header;\n"
},
{
"__docId__": 54,
"kind": "class",
"static": true,
"variation": null,
"name": "Header",
"memberof": "src/components/header/header_component.js",
"longname": "src/components/header/header_component.js~Header",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/header/header_component.js",
"importStyle": "Header",
"description": "The page header which contains both search and navigation.\nClicking on the search icons opens the search.\nWill re-render when the browser changes sizes",
"lineNumber": 13,
"interface": false,
"extends": [
"src/core/bane~Component"
]
},
{
"__docId__": 55,
"kind": "method",
"static": false,
"variation": null,
"name": "initialize",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#initialize",
"access": null,
"description": null,
"lineNumber": 15,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 56,
"kind": "member",
"static": false,
"variation": null,
"name": "search",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#search",
"access": null,
"description": null,
"lineNumber": 16,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 57,
"kind": "member",
"static": false,
"variation": null,
"name": "navigation",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#navigation",
"access": null,
"description": null,
"lineNumber": 17,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 58,
"kind": "member",
"static": false,
"variation": null,
"name": "events",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#events",
"access": null,
"description": null,
"lineNumber": 21,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 59,
"kind": "member",
"static": false,
"variation": null,
"name": "$search",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#$search",
"access": null,
"description": null,
"lineNumber": 27,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 60,
"kind": "member",
"static": false,
"variation": null,
"name": "$inner",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#$inner",
"access": null,
"description": null,
"lineNumber": 28,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 61,
"kind": "method",
"static": false,
"variation": null,
"name": "render",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#render",
"access": null,
"description": "Add a class to the search when it's too big for the screen",
"lineNumber": 37,
"params": [],
"return": {
"nullable": null,
"types": [
"Header"
],
"spread": false,
"description": "The instance of the header"
},
"generator": false
},
{
"__docId__": 62,
"kind": "method",
"static": false,
"variation": null,
"name": "isTooBig",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#isTooBig",
"access": null,
"description": "If the search box is too big based on the screen width",
"lineNumber": 50,
"params": [],
"return": {
"nullable": null,
"types": [
"Boolean"
],
"spread": false,
"description": ""
},
"generator": false
},
{
"__docId__": 63,
"kind": "method",
"static": false,
"variation": null,
"name": "onSearchClick",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#onSearchClick",
"access": null,
"description": null,
"lineNumber": 54,
"undocument": true,
"params": [
{
"name": "e",
"types": [
"*"
]
}
],
"generator": false
},
{
"__docId__": 64,
"kind": "method",
"static": false,
"variation": null,
"name": "onMobileMenuClick",
"memberof": "src/components/header/header_component.js~Header",
"longname": "src/components/header/header_component.js~Header#onMobileMenuClick",
"access": null,
"description": null,
"lineNumber": 60,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 65,
"kind": "variable",
"static": true,
"variation": null,
"name": "header",
"memberof": "src/components/header/header_component.js",
"longname": "src/components/header/header_component.js~header",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/header/header_component.js",
"importStyle": "header",
"description": null,
"lineNumber": 65,
"undocument": true,
"type": {
"types": [
"src/components/header/header_component.js~Header"
]
}
},
{
"__docId__": 66,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/header/index.js",
"memberof": null,
"longname": "src/components/header/index.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import HeaderComponent from \"./header_component\";\nimport \"./_header.scss\";\n\nexport default HeaderComponent;\n"
},
{
"__docId__": 67,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/hotels/hotels.events.js",
"memberof": null,
"longname": "src/components/hotels/hotels.events.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "export default {\n SEARCH: \"hotels.search\"\n};\n"
},
{
"__docId__": 68,
"kind": "file",
"static": true,
"variation": null,
"name": "src/components/hotels/hotels_widget.js",
"memberof": null,
"longname": "src/components/hotels/hotels_widget.js",
"access": null,
"description": null,
"lineNumber": 1,
"content": "import { Component } from \"../../core/bane\";\nimport assign from \"lodash/object/assign\";\nimport \"pickadate/lib/picker.date\";\nimport HotelsEvents from \"./hotels.events\";\nimport publish from \"../../core/decorators/publish\";\nimport $ from \"jquery\";\nlet _ = { assign };\n\nconst dateDefaults = {\n format: \"mm/d/yyyy\",\n formatSubmit: \"dd/mm/yyyy\",\n hiddenName: true,\n labelMonthNext: \"Go to the next month\",\n labelMonthPrev: \"Go to the previous month\",\n labelMonthSelect: \"Pick a month from the dropdown\",\n labelYearSelect: \"Pick a year from the dropdown\"\n};\n\nclass HotelsWidget extends Component {\n get booking() {\n let guests = this.$el.find(\"#js-guests\");\n\n return {\n startDate: new Date(this.startDate),\n endDate: new Date(this.endDate),\n guests: parseInt(guests.val(), 10)\n };\n }\n get startDate() {\n return this.$startDate.pickadate(\"picker\").get();\n }\n get endDate() {\n return this.$endDate.pickadate(\"picker\").get();\n }\n initialize() {\n this.events = {\n \"submit #hotel-search-form\": \"searchHotels\"\n };\n\n let dates = this.$el.find(\"input[type='date']\"),\n startDate = $(dates[0]),\n endDate = $(dates[1]),\n today = new Date();\n\n this.$startDate = startDate.pickadate(_.assign({\n min: today,\n }, dateDefaults));\n\n this.$endDate = endDate.pickadate(_.assign({\n min: this.nextDate(today)\n }, dateDefaults));\n\n startDate.change(() => this.changeDate(this.endDate, this.startDate));\n }\n nextDate(date) {\n let tmpDate = new Date(date);\n tmpDate.setDate(date.getDate() + 1);\n return tmpDate;\n }\n changeDate (endDate, startDate){\n let existingEndDate = new Date(endDate),\n newStartDate = new Date(startDate);\n \n if (existingEndDate.toString() === \"Invalid Date\" || newStartDate > existingEndDate) {\n let newMinimumEndDate = new Date(newStartDate.getTime() + 24 * 60 * 60 * 1000);\n this.updateEndDate(newMinimumEndDate);\n return newMinimumEndDate;\n }\n }\n updateEndDate(date) {\n this.$endDate.pickadate(\"picker\").set({\n \"min\": date,\n \"select\": date\n });\n }\n @publish(HotelsEvents.SEARCH)\n searchHotels() {\n return {\n booking: this.booking\n };\n }\n}\n\nexport default HotelsWidget;\n"
},
{
"__docId__": 69,
"kind": "variable",
"static": true,
"variation": null,
"name": "_",
"memberof": "src/components/hotels/hotels_widget.js",
"longname": "src/components/hotels/hotels_widget.js~_",
"access": null,
"export": false,
"importPath": "rizzo-next/src/components/hotels/hotels_widget.js",
"importStyle": null,
"description": null,
"lineNumber": 7,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 70,
"kind": "variable",
"static": true,
"variation": null,
"name": "dateDefaults",
"memberof": "src/components/hotels/hotels_widget.js",
"longname": "src/components/hotels/hotels_widget.js~dateDefaults",
"access": null,
"export": false,
"importPath": "rizzo-next/src/components/hotels/hotels_widget.js",
"importStyle": null,
"description": null,
"lineNumber": 9,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 71,
"kind": "class",
"static": true,
"variation": null,
"name": "HotelsWidget",
"memberof": "src/components/hotels/hotels_widget.js",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget",
"access": null,
"export": true,
"importPath": "rizzo-next/src/components/hotels/hotels_widget.js",
"importStyle": "HotelsWidget",
"description": null,
"lineNumber": 19,
"undocument": true,
"interface": false,
"extends": [
"src/core/bane~Component"
]
},
{
"__docId__": 72,
"kind": "get",
"static": false,
"variation": null,
"name": "booking",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#booking",
"access": null,
"description": null,
"lineNumber": 20,
"undocument": true,
"type": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 73,
"kind": "get",
"static": false,
"variation": null,
"name": "startDate",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#startDate",
"access": null,
"description": null,
"lineNumber": 29,
"undocument": true,
"type": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 74,
"kind": "get",
"static": false,
"variation": null,
"name": "endDate",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#endDate",
"access": null,
"description": null,
"lineNumber": 32,
"undocument": true,
"type": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 75,
"kind": "method",
"static": false,
"variation": null,
"name": "initialize",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#initialize",
"access": null,
"description": null,
"lineNumber": 35,
"undocument": true,
"params": [],
"generator": false
},
{
"__docId__": 76,
"kind": "member",
"static": false,
"variation": null,
"name": "events",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#events",
"access": null,
"description": null,
"lineNumber": 36,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 77,
"kind": "member",
"static": false,
"variation": null,
"name": "$startDate",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#$startDate",
"access": null,
"description": null,
"lineNumber": 45,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 78,
"kind": "member",
"static": false,
"variation": null,
"name": "$endDate",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#$endDate",
"access": null,
"description": null,
"lineNumber": 49,
"undocument": true,
"type": {
"types": [
"*"
]
}
},
{
"__docId__": 79,
"kind": "method",
"static": false,
"variation": null,
"name": "nextDate",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#nextDate",
"access": null,
"description": null,
"lineNumber": 55,
"undocument": true,
"params": [
{
"name": "date",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 80,
"kind": "method",
"static": false,
"variation": null,
"name": "changeDate",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#changeDate",
"access": null,
"description": null,
"lineNumber": 60,
"undocument": true,
"params": [
{
"name": "endDate",
"types": [
"*"
]
},
{
"name": "startDate",
"types": [
"*"
]
}
],
"return": {
"types": [
"*"
]
},
"generator": false
},
{
"__docId__": 81,
"kind": "method",
"static": false,
"variation": null,
"name": "updateEndDate",
"memberof": "src/components/hotels/hotels_widget.js~HotelsWidget",
"longname": "src/components/hotels/hotels_widget.js~HotelsWidget#updateEndDate",
"access": null,
"description": null,
"lineNumber": 70,
"undocument": true,
"p