rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,653 lines • 397 kB
JSON
{
"type": "Program",
"start": 0,
"end": 2248,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 85,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 44,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 44
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"imported": {
"type": "Identifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"name": "Component"
},
"local": {
"type": "Identifier",
"start": 9,
"end": 18,
"loc": {
"start": {
"line": 1,
"column": 9
},
"end": {
"line": 1,
"column": 18
}
},
"name": "Component"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 26,
"end": 43,
"loc": {
"start": {
"line": 1,
"column": 26
},
"end": {
"line": 1,
"column": 43
}
},
"value": "../../core/bane",
"rawValue": "../../core/bane",
"raw": "\"../../core/bane\""
}
},
{
"type": "ImportDeclaration",
"start": 45,
"end": 87,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 42
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 52,
"end": 58,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"local": {
"type": "Identifier",
"start": 52,
"end": 58,
"loc": {
"start": {
"line": 2,
"column": 7
},
"end": {
"line": 2,
"column": 13
}
},
"name": "assign"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 64,
"end": 86,
"loc": {
"start": {
"line": 2,
"column": 19
},
"end": {
"line": 2,
"column": 41
}
},
"value": "lodash/object/assign",
"rawValue": "lodash/object/assign",
"raw": "\"lodash/object/assign\""
}
},
{
"type": "ImportDeclaration",
"start": 88,
"end": 123,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 35
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 95,
"end": 122,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 34
}
},
"value": "pickadate/lib/picker.date",
"rawValue": "pickadate/lib/picker.date",
"raw": "\"pickadate/lib/picker.date\""
}
},
{
"type": "ImportDeclaration",
"start": 124,
"end": 167,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 43
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 131,
"end": 143,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 19
}
},
"local": {
"type": "Identifier",
"start": 131,
"end": 143,
"loc": {
"start": {
"line": 4,
"column": 7
},
"end": {
"line": 4,
"column": 19
}
},
"name": "HotelsEvents"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 149,
"end": 166,
"loc": {
"start": {
"line": 4,
"column": 25
},
"end": {
"line": 4,
"column": 42
}
},
"value": "./hotels.events",
"rawValue": "./hotels.events",
"raw": "\"./hotels.events\""
}
},
{
"type": "ImportDeclaration",
"start": 168,
"end": 220,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 52
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 175,
"end": 182,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 14
}
},
"local": {
"type": "Identifier",
"start": 175,
"end": 182,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 14
}
},
"name": "publish"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 188,
"end": 219,
"loc": {
"start": {
"line": 5,
"column": 20
},
"end": {
"line": 5,
"column": 51
}
},
"value": "../../core/decorators/publish",
"rawValue": "../../core/decorators/publish",
"raw": "\"../../core/decorators/publish\""
}
},
{
"type": "ImportDeclaration",
"start": 221,
"end": 244,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 23
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 228,
"end": 229,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 8
}
},
"local": {
"type": "Identifier",
"start": 228,
"end": 229,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 8
}
},
"name": "$"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 235,
"end": 243,
"loc": {
"start": {
"line": 6,
"column": 14
},
"end": {
"line": 6,
"column": 22
}
},
"value": "jquery",
"rawValue": "jquery",
"raw": "\"jquery\""
}
},
{
"type": "VariableDeclaration",
"start": 245,
"end": 264,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 19
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 249,
"end": 263,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 18
}
},
"id": {
"type": "Identifier",
"start": 249,
"end": 250,
"loc": {
"start": {
"line": 7,
"column": 4
},
"end": {
"line": 7,
"column": 5
}
},
"name": "_"
},
"init": {
"type": "ObjectExpression",
"start": 253,
"end": 263,
"loc": {
"start": {
"line": 7,
"column": 8
},
"end": {
"line": 7,
"column": 18
}
},
"properties": [
{
"type": "Property",
"start": 255,
"end": 261,
"loc": {
"start": {
"line": 7,
"column": 10
},
"end": {
"line": 7,
"column": 16
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 255,
"end": 261,
"loc": {
"start": {
"line": 7,
"column": 10
},
"end": {
"line": 7,
"column": 16
}
},
"name": "assign"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 255,
"end": 261,
"loc": {
"start": {
"line": 7,
"column": 10
},
"end": {
"line": 7,
"column": 16
}
},
"name": "assign"
}
}
]
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 266,
"end": 557,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 17,
"column": 2
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 272,
"end": 556,
"loc": {
"start": {
"line": 9,
"column": 6
},
"end": {
"line": 17,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 272,
"end": 284,
"loc": {
"start": {
"line": 9,
"column": 6
},
"end": {
"line": 9,
"column": 18
}
},
"name": "dateDefaults"
},
"init": {
"type": "ObjectExpression",
"start": 287,
"end": 556,
"loc": {
"start": {
"line": 9,
"column": 21
},
"end": {
"line": 17,
"column": 1
}
},
"properties": [
{
"type": "Property",
"start": 291,
"end": 310,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 21
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 291,
"end": 297,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 8
}
},
"name": "format"
},
"value": {
"type": "Literal",
"start": 299,
"end": 310,
"loc": {
"start": {
"line": 10,
"column": 10
},
"end": {
"line": 10,
"column": 21
}
},
"value": "mm/d/yyyy",
"rawValue": "mm/d/yyyy",
"raw": "\"mm/d/yyyy\""
},
"kind": "init"
},
{
"type": "Property",
"start": 314,
"end": 340,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 28
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 314,
"end": 326,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 14
}
},
"name": "formatSubmit"
},
"value": {
"type": "Literal",
"start": 328,
"end": 340,
"loc": {
"start": {
"line": 11,
"column": 16
},
"end": {
"line": 11,
"column": 28
}
},
"value": "dd/mm/yyyy",
"rawValue": "dd/mm/yyyy",
"raw": "\"dd/mm/yyyy\""
},
"kind": "init"
},
{
"type": "Property",
"start": 344,
"end": 360,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 18
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 344,
"end": 354,
"loc": {
"start": {
"line": 12,
"column": 2
},
"end": {
"line": 12,
"column": 12
}
},
"name": "hiddenName"
},
"value": {
"type": "Literal",
"start": 356,
"end": 360,
"loc": {
"start": {
"line": 12,
"column": 14
},
"end": {
"line": 12,
"column": 18
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"kind": "init"
},
{
"type": "Property",
"start": 364,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 40
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 364,
"end": 378,
"loc": {
"start": {
"line": 13,
"column": 2
},
"end": {
"line": 13,
"column": 16
}
},
"name": "labelMonthNext"
},
"value": {
"type": "Literal",
"start": 380,
"end": 402,
"loc": {
"start": {
"line": 13,
"column": 18
},
"end": {
"line": 13,
"column": 40
}
},
"value": "Go to the next month",
"rawValue": "Go to the next month",
"raw": "\"Go to the next month\""
},
"kind": "init"
},
{
"type": "Property",
"start": 406,
"end": 448,
"loc": {
"start": {
"line": 14,
"column": 2
},
"end": {
"line": 14,
"column": 44
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 406,
"end": 420,
"loc": {
"start": {
"line": 14,
"column": 2
},
"end": {
"line": 14,
"column": 16
}
},
"name": "labelMonthPrev"
},
"value": {
"type": "Literal",
"start": 422,
"end": 448,
"loc": {
"start": {
"line": 14,
"column": 18
},
"end": {
"line": 14,
"column": 44
}
},
"value": "Go to the previous month",
"rawValue": "Go to the previous month",
"raw": "\"Go to the previous month\""
},
"kind": "init"
},
{
"type": "Property",
"start": 452,
"end": 502,
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 15,
"column": 52
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 452,
"end": 468,
"loc": {
"start": {
"line": 15,
"column": 2
},
"end": {
"line": 15,
"column": 18
}
},
"name": "labelMonthSelect"
},
"value": {
"type": "Literal",
"start": 470,
"end": 502,
"loc": {
"start": {
"line": 15,
"column": 20
},
"end": {
"line": 15,
"column": 52
}
},
"value": "Pick a month from the dropdown",
"rawValue": "Pick a month from the dropdown",
"raw": "\"Pick a month from the dropdown\""
},
"kind": "init"
},
{
"type": "Property",
"start": 506,
"end": 554,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 50
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 506,
"end": 521,
"loc": {
"start": {
"line": 16,
"column": 2
},
"end": {
"line": 16,
"column": 17
}
},
"name": "labelYearSelect"
},
"value": {
"type": "Literal",
"start": 523,
"end": 554,
"loc": {
"start": {
"line": 16,
"column": 19
},
"end": {
"line": 16,
"column": 50
}
},
"value": "Pick a year from the dropdown",
"rawValue": "Pick a year from the dropdown",
"raw": "\"Pick a year from the dropdown\""
},
"kind": "init"
}
]
}
}
],
"kind": "const"
},
{
"type": "Identifier",
"start": 559,
"end": 2217,
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 82,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 565,
"end": 577,
"loc": {
"start": {
"line": 19,
"column": 6
},
"end": {
"line": 19,
"column": 18
}
},
"name": "HotelsWidget"
},
"superClass": {
"type": "Identifier",
"start": 586,
"end": 595,
"loc": {
"start": {
"line": 19,
"column": 27
},
"end": {
"line": 19,
"column": 36
}
},
"name": "Component"
},
"body": {
"type": "ClassBody",
"start": 596,
"end": 2217,
"loc": {
"start": {
"line": 19,
"column": 37
},
"end": {
"line": 82,
"column": 1
}
},
"body": [
{
"type": "MethodDefinition",
"start": 600,
"end": 809,
"loc": {
"start": {
"line": 20,
"column": 2
},
"end": {
"line": 28,
"column": 3
}
},
"computed": false,
"key": {
"type": "Identifier",
"start": 604,
"end": 611,
"loc": {
"start": {
"line": 20,
"column": 6
},
"end": {
"line": 20,
"column": 13
}
},
"name": "booking"
},
"static": false,
"kind": "get",
"value": {
"type": "FunctionExpression",
"start": 611,
"end": 809,
"loc": {
"start": {
"line": 20,
"column": 13
},
"end": {
"line": 28,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 614,
"end": 809,
"loc": {
"start": {
"line": 20,
"column": 16
},
"end": {
"line": 28,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 620,
"end": 661,
"loc": {
"start": {
"line": 21,
"column": 4
},
"end": {
"line": 21,
"column": 45
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 624,
"end": 660,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 44
}
},
"id": {
"type": "Identifier",
"start": 624,
"end": 630,
"loc": {
"start": {
"line": 21,
"column": 8
},
"end": {
"line": 21,
"column": 14
}
},
"name": "guests"
},
"init": {
"type": "CallExpression",
"start": 633,
"end": 660,
"loc": {
"start": {
"line": 21,
"column": 17
},
"end": {
"line": 21,
"column": 44
}
},
"callee": {
"type": "MemberExpression",
"start": 633,
"end": 646,
"loc": {
"start": {
"line": 21,
"column": 17
},
"end": {
"line": 21,
"column": 30
}
},
"object": {
"type": "MemberExpression",
"start": 633,
"end": 641,
"loc": {
"start": {
"line": 21,
"column": 17
},
"end": {
"line": 21,
"column": 25
}
},
"object": {
"type": "ThisExpression",
"start": 633,
"end": 637,
"loc": {
"start": {
"line": 21,
"column": 17
},
"end": {
"line": 21,
"column": 21
}
}
},
"property": {
"type": "Identifier",
"start": 638,
"end": 641,
"loc": {
"start": {
"line": 21,
"column": 22
},
"end": {
"line": 21,
"column": 25
}
},
"name": "$el"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 642,
"end": 646,
"loc": {
"start": {
"line": 21,
"column": 26
},
"end": {
"line": 21,
"column": 30
}
},
"name": "find"
},
"computed": false
},
"arguments": [
{
"type": "Literal",
"start": 647,
"end": 659,
"loc": {
"start": {
"line": 21,
"column": 31
},
"end": {
"line": 21,
"column": 43
}
},
"value": "#js-guests",
"rawValue": "#js-guests",
"raw": "\"#js-guests\""
}
]
}
}
],
"kind": "let"
},
{
"type": "ReturnStatement",
"start": 667,
"end": 805,
"loc": {
"start": {
"line": 23,
"column": 4
},
"end": {
"line": 27,
"column": 6
}
},
"argument": {
"type": "ObjectExpression",
"start": 674,
"end": 804,
"loc": {
"start": {
"line": 23,
"column": 11
},
"end": {
"line": 27,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 682,
"end": 717,
"loc": {
"start": {
"line": 24,
"column": 6
},
"end": {
"line": 24,
"column": 41
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 682,
"end": 691,
"loc": {
"start": {
"line": 24,
"column": 6
},
"end": {
"line": 24,
"column": 15
}
},
"name": "startDate"
},
"value": {
"type": "NewExpression",
"start": 693,
"end": 717,
"loc": {
"start": {
"line": 24,
"column": 17
},
"end": {
"line": 24,
"column": 41
}
},
"callee": {
"type": "Identifier",
"start": 697,
"end": 701,
"loc": {
"start": {
"line": 24,
"column": 21
},
"end": {
"line": 24,
"column": 25
}
},
"name": "Date"
},
"arguments": [
{
"type": "MemberExpression",
"start": 702,
"end": 716,
"loc": {
"start": {
"line": 24,
"column": 26
},
"end": {
"line": 24,
"column": 40
}
},
"object": {
"type": "ThisExpression",
"start": 702,
"end": 706,
"loc": {
"start": {
"line": 24,
"column": 26
},
"end": {
"line": 24,
"column": 30
}
}
},
"property": {
"type": "Identifier",
"start": 707,
"end": 716,
"loc": {
"start": {
"line": 24,
"column": 31
},
"end": {
"line": 24,
"column": 40
}
},
"name": "startDate"
},
"computed": false
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 725,
"end": 756,
"loc": {
"start": {
"line": 25,
"column": 6
},
"end": {
"line": 25,
"column": 37
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 725,
"end": 732,
"loc": {
"start": {
"line": 25,
"column": 6
},
"end": {
"line": 25,
"column": 13
}
},
"name": "endDate"
},
"value": {
"type": "NewExpression",
"start": 734,
"end": 756,
"loc": {
"start": {
"line": 25,
"column": 15
},
"end": {
"line": 25,
"column": 37
}
},
"callee": {
"type": "Identifier",
"start": 738,
"end": 742,
"loc": {
"start": {
"line": 25,
"column": 19
},
"end": {
"line": 25,
"column": 23
}
},
"name": "Date"
},
"arguments": [
{
"type": "MemberExpression",
"start": 743,
"end": 755,
"loc": {
"start": {
"line": 25,
"column": 24
},
"end": {
"line": 25,
"column": 36
}
},
"object": {
"type": "ThisExpression",
"start": 743,
"end": 747,
"loc": {
"start": {
"line": 25,
"column": 24
},
"end": {
"line": 25,
"column": 28
}
}
},
"property": {
"type": "Identifier",
"start": 748,
"end": 755,
"loc": {
"start": {
"line": 25,
"column": 29
},
"end": {
"line": 25,
"column": 36
}
},
"name": "endDate"
},
"computed": false
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 764,
"end": 798,
"loc": {
"start": {
"line": 26,
"column": 6
},
"end": {
"line": 26,
"column": 40
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 764,
"end": 770,
"loc": {
"start": {
"line": 26,
"column": 6
},
"end": {
"line": 26,
"column": 12
}
},
"name": "guests"
},
"value": {
"type": "CallExpression",
"start": 772,
"end": 798,
"loc": {
"start": {
"line": 26,
"column": 14
},
"end": {
"line": 26,
"column": 40
}
},
"callee": {
"type": "Identifier",
"start": 772,
"end": 780,
"loc": {
"start": {
"line": 26,
"column": 14
},
"end": {
"line": 26,
"column": 22
}
},
"name": "parseInt"
},
"arguments": [
{
"type": "CallExpression",
"start": 781,
"end": 793,
"loc": {
"start": {
"line": 26,
"column": 23
},
"end": {
"line": 26,
"column": 35
}
},
"callee": {
"type": "MemberExpression",
"start": 781,
"end": 791,
"loc": {
"start": {
"line": 26,
"column": 23
},
"end": {
"line": 26,
"column": 33
}
},
"object": {
"type": "Identifier",
"start": 781,
"end": 787,
"loc": {
"start": {
"line": 26,
"column": 23
},
"end": {
"line": 26,
"column": 29
}
},
"name": "guests"
},
"property": {
"type": "Identifier",
"start": 788,
"end": 791,
"loc": {
"start": {
"line": 26,
"column": 30
},
"end": {
"line": 26,
"column": 33
}
},
"name": "val"
},
"computed": false
},
"arguments": []
},
{
"type": "Literal",
"start": 795,
"end": 797,
"loc": {
"start": {
"line": 26,
"column": 37
},
"end": {
"line": 26,
"column": 39
}
},
"value": 10,
"rawValue": 10,
"raw": "10"
}
]
},