UNPKG

rizzo-next

Version:

The next generation of Lonely Planet's style guide and pattern library.

1,404 lines (1,403 loc) 197 kB
{ "type": "Program", "start": 0, "end": 2638, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 97, "column": 0 } }, "sourceType": "module", "body": [ { "type": "ImportDeclaration", "start": 0, "end": 23, "loc": { "start": { "line": 1, "column": 0 }, "end": { "line": 1, "column": 23 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "local": { "type": "Identifier", "start": 7, "end": 8, "loc": { "start": { "line": 1, "column": 7 }, "end": { "line": 1, "column": 8 } }, "name": "$" } } ], "importKind": "value", "source": { "type": "Literal", "start": 14, "end": 22, "loc": { "start": { "line": 1, "column": 14 }, "end": { "line": 1, "column": 22 } }, "value": "jquery", "rawValue": "jquery", "raw": "\"jquery\"" } }, { "type": "ImportDeclaration", "start": 24, "end": 76, "loc": { "start": { "line": 2, "column": 0 }, "end": { "line": 2, "column": 52 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 31, "end": 38, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "local": { "type": "Identifier", "start": 31, "end": 38, "loc": { "start": { "line": 2, "column": 7 }, "end": { "line": 2, "column": 14 } }, "name": "publish" } } ], "importKind": "value", "source": { "type": "Literal", "start": 44, "end": 75, "loc": { "start": { "line": 2, "column": 20 }, "end": { "line": 2, "column": 51 } }, "value": "../../core/decorators/publish", "rawValue": "../../core/decorators/publish", "raw": "\"../../core/decorators/publish\"" } }, { "type": "ImportDeclaration", "start": 77, "end": 103, "loc": { "start": { "line": 3, "column": 0 }, "end": { "line": 3, "column": 26 } }, "specifiers": [ { "type": "ImportDefaultSpecifier", "start": 84, "end": 88, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 11 } }, "local": { "type": "Identifier", "start": 84, "end": 88, "loc": { "start": { "line": 3, "column": 7 }, "end": { "line": 3, "column": 11 } }, "name": "User" } } ], "importKind": "value", "source": { "type": "Literal", "start": 94, "end": 102, "loc": { "start": { "line": 3, "column": 17 }, "end": { "line": 3, "column": 25 } }, "value": "./user", "rawValue": "./user", "raw": "\"./user\"" } }, { "type": "ExportDefaultDeclaration", "start": 105, "end": 2637, "loc": { "start": { "line": 5, "column": 0 }, "end": { "line": 96, "column": 1 } }, "declaration": { "type": "ClassDeclaration", "start": 120, "end": 2637, "loc": { "start": { "line": 5, "column": 15 }, "end": { "line": 96, "column": 1 } }, "id": { "type": "Identifier", "start": 126, "end": 138, "loc": { "start": { "line": 5, "column": 21 }, "end": { "line": 5, "column": 33 } }, "name": "LoginManager" }, "superClass": null, "body": { "type": "ClassBody", "start": 139, "end": 2637, "loc": { "start": { "line": 5, "column": 34 }, "end": { "line": 96, "column": 1 } }, "body": [ { "type": "MethodDefinition", "start": 143, "end": 335, "loc": { "start": { "line": 6, "column": 2 }, "end": { "line": 11, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 143, "end": 154, "loc": { "start": { "line": 6, "column": 2 }, "end": { "line": 6, "column": 13 } }, "name": "constructor" }, "static": false, "kind": "constructor", "value": { "type": "FunctionExpression", "start": 154, "end": 335, "loc": { "start": { "line": 6, "column": 13 }, "end": { "line": 11, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 157, "end": 335, "loc": { "start": { "line": 6, "column": 16 }, "end": { "line": 11, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 163, "end": 230, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 71 } }, "expression": { "type": "AssignmentExpression", "start": 163, "end": 229, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 70 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 163, "end": 177, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 18 } }, "object": { "type": "ThisExpression", "start": 163, "end": 167, "loc": { "start": { "line": 7, "column": 4 }, "end": { "line": 7, "column": 8 } } }, "property": { "type": "Identifier", "start": 168, "end": 177, "loc": { "start": { "line": 7, "column": 9 }, "end": { "line": 7, "column": 18 } }, "name": "statusUrl" }, "computed": false }, "right": { "type": "Literal", "start": 180, "end": 229, "loc": { "start": { "line": 7, "column": 21 }, "end": { "line": 7, "column": 70 } }, "value": "https://auth.lonelyplanet.com/users/status.json", "rawValue": "https://auth.lonelyplanet.com/users/status.json", "raw": "\"https://auth.lonelyplanet.com/users/status.json\"" } } }, { "type": "ExpressionStatement", "start": 235, "end": 302, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 71 } }, "expression": { "type": "AssignmentExpression", "start": 235, "end": 301, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 70 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 235, "end": 247, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 16 } }, "object": { "type": "ThisExpression", "start": 235, "end": 239, "loc": { "start": { "line": 8, "column": 4 }, "end": { "line": 8, "column": 8 } } }, "property": { "type": "Identifier", "start": 240, "end": 247, "loc": { "start": { "line": 8, "column": 9 }, "end": { "line": 8, "column": 16 } }, "name": "feedUrl" }, "computed": false }, "right": { "type": "Literal", "start": 250, "end": 301, "loc": { "start": { "line": 8, "column": 19 }, "end": { "line": 8, "column": 70 } }, "value": "https://www.lonelyplanet.com/thorntree/users/feed", "rawValue": "https://www.lonelyplanet.com/thorntree/users/feed", "raw": "\"https://www.lonelyplanet.com/thorntree/users/feed\"" } } }, { "type": "ExpressionStatement", "start": 312, "end": 331, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 23 } }, "expression": { "type": "CallExpression", "start": 312, "end": 330, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 22 } }, "callee": { "type": "MemberExpression", "start": 312, "end": 328, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 20 } }, "object": { "type": "ThisExpression", "start": 312, "end": 316, "loc": { "start": { "line": 10, "column": 4 }, "end": { "line": 10, "column": 8 } } }, "property": { "type": "Identifier", "start": 317, "end": 328, "loc": { "start": { "line": 10, "column": 9 }, "end": { "line": 10, "column": 20 } }, "name": "checkStatus" }, "computed": false }, "arguments": [] } } ], "trailingComments": null }, "trailingComments": null }, "trailingComments": [ { "type": "Block", "value": "*\n * Check to see if the user is currently logged in.\n * @return {jQuery.Deferred}\n ", "start": 338, "end": 432, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 15, "column": 5 } }, "range": [ 338, 432 ] } ] }, { "type": "MethodDefinition", "start": 435, "end": 615, "loc": { "start": { "line": 16, "column": 2 }, "end": { "line": 23, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 435, "end": 446, "loc": { "start": { "line": 16, "column": 2 }, "end": { "line": 16, "column": 13 } }, "name": "checkStatus", "leadingComments": null }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 446, "end": 615, "loc": { "start": { "line": 16, "column": 13 }, "end": { "line": 23, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [], "body": { "type": "BlockStatement", "start": 449, "end": 615, "loc": { "start": { "line": 16, "column": 16 }, "end": { "line": 23, "column": 3 } }, "body": [ { "type": "ReturnStatement", "start": 455, "end": 611, "loc": { "start": { "line": 17, "column": 4 }, "end": { "line": 22, "column": 7 } }, "argument": { "type": "CallExpression", "start": 462, "end": 610, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 22, "column": 6 } }, "callee": { "type": "MemberExpression", "start": 462, "end": 468, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 17 } }, "object": { "type": "Identifier", "start": 462, "end": 463, "loc": { "start": { "line": 17, "column": 11 }, "end": { "line": 17, "column": 12 } }, "name": "$" }, "property": { "type": "Identifier", "start": 464, "end": 468, "loc": { "start": { "line": 17, "column": 13 }, "end": { "line": 17, "column": 17 } }, "name": "ajax" }, "computed": false }, "arguments": [ { "type": "ObjectExpression", "start": 469, "end": 609, "loc": { "start": { "line": 17, "column": 18 }, "end": { "line": 22, "column": 5 } }, "properties": [ { "type": "Property", "start": 477, "end": 496, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 25 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 477, "end": 480, "loc": { "start": { "line": 18, "column": 6 }, "end": { "line": 18, "column": 9 } }, "name": "url" }, "value": { "type": "MemberExpression", "start": 482, "end": 496, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 25 } }, "object": { "type": "ThisExpression", "start": 482, "end": 486, "loc": { "start": { "line": 18, "column": 11 }, "end": { "line": 18, "column": 15 } } }, "property": { "type": "Identifier", "start": 487, "end": 496, "loc": { "start": { "line": 18, "column": 16 }, "end": { "line": 18, "column": 25 } }, "name": "statusUrl" }, "computed": false }, "kind": "init" }, { "type": "Property", "start": 504, "end": 521, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 23 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 504, "end": 512, "loc": { "start": { "line": 19, "column": 6 }, "end": { "line": 19, "column": 14 } }, "name": "dataType" }, "value": { "type": "Literal", "start": 514, "end": 521, "loc": { "start": { "line": 19, "column": 16 }, "end": { "line": 19, "column": 23 } }, "value": "jsonp", "rawValue": "jsonp", "raw": "\"jsonp\"" }, "kind": "init" }, { "type": "Property", "start": 529, "end": 567, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 44 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 529, "end": 536, "loc": { "start": { "line": 20, "column": 6 }, "end": { "line": 20, "column": 13 } }, "name": "success" }, "value": { "type": "CallExpression", "start": 538, "end": 567, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 44 } }, "callee": { "type": "MemberExpression", "start": 538, "end": 561, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 38 } }, "object": { "type": "MemberExpression", "start": 538, "end": 556, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 33 } }, "object": { "type": "ThisExpression", "start": 538, "end": 542, "loc": { "start": { "line": 20, "column": 15 }, "end": { "line": 20, "column": 19 } } }, "property": { "type": "Identifier", "start": 543, "end": 556, "loc": { "start": { "line": 20, "column": 20 }, "end": { "line": 20, "column": 33 } }, "name": "statusFetched" }, "computed": false }, "property": { "type": "Identifier", "start": 557, "end": 561, "loc": { "start": { "line": 20, "column": 34 }, "end": { "line": 20, "column": 38 } }, "name": "bind" }, "computed": false }, "arguments": [ { "type": "ThisExpression", "start": 562, "end": 566, "loc": { "start": { "line": 20, "column": 39 }, "end": { "line": 20, "column": 43 } } } ] }, "kind": "init" }, { "type": "Property", "start": 575, "end": 603, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 34 } }, "method": false, "shorthand": false, "computed": false, "key": { "type": "Identifier", "start": 575, "end": 580, "loc": { "start": { "line": 21, "column": 6 }, "end": { "line": 21, "column": 11 } }, "name": "error" }, "value": { "type": "CallExpression", "start": 582, "end": 603, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 21, "column": 34 } }, "callee": { "type": "MemberExpression", "start": 582, "end": 597, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 21, "column": 28 } }, "object": { "type": "MemberExpression", "start": 582, "end": 592, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 21, "column": 23 } }, "object": { "type": "ThisExpression", "start": 582, "end": 586, "loc": { "start": { "line": 21, "column": 13 }, "end": { "line": 21, "column": 17 } } }, "property": { "type": "Identifier", "start": 587, "end": 592, "loc": { "start": { "line": 21, "column": 18 }, "end": { "line": 21, "column": 23 } }, "name": "error" }, "computed": false }, "property": { "type": "Identifier", "start": 593, "end": 597, "loc": { "start": { "line": 21, "column": 24 }, "end": { "line": 21, "column": 28 } }, "name": "bind" }, "computed": false }, "arguments": [ { "type": "ThisExpression", "start": 598, "end": 602, "loc": { "start": { "line": 21, "column": 29 }, "end": { "line": 21, "column": 33 } } } ] }, "kind": "init" } ] } ] } } ], "trailingComments": null }, "trailingComments": null }, "leadingComments": [ { "type": "Block", "value": "*\n * Check to see if the user is currently logged in.\n * @return {jQuery.Deferred}\n ", "start": 338, "end": 432, "loc": { "start": { "line": 12, "column": 2 }, "end": { "line": 15, "column": 5 } }, "range": [ 338, 432 ] } ], "trailingComments": [ { "type": "Block", "value": "*\n * Callback from checking the user's login status.\n * If the user is not logged in, it will publish a user with a null id.\n * Will check for user notifications if the user is logged in.\n * @param {Object} user User login information\n ", "start": 618, "end": 869, "loc": { "start": { "line": 24, "column": 2 }, "end": { "line": 29, "column": 5 } }, "range": [ 618, 869 ] } ] }, { "type": "MethodDefinition", "start": 872, "end": 1174, "loc": { "start": { "line": 30, "column": 2 }, "end": { "line": 42, "column": 3 } }, "computed": false, "key": { "type": "Identifier", "start": 872, "end": 885, "loc": { "start": { "line": 30, "column": 2 }, "end": { "line": 30, "column": 15 } }, "name": "statusFetched", "leadingComments": null }, "static": false, "kind": "method", "value": { "type": "FunctionExpression", "start": 885, "end": 1174, "loc": { "start": { "line": 30, "column": 15 }, "end": { "line": 42, "column": 3 } }, "id": null, "generator": false, "expression": false, "async": false, "params": [ { "type": "Identifier", "start": 886, "end": 890, "loc": { "start": { "line": 30, "column": 16 }, "end": { "line": 30, "column": 20 } }, "name": "user" } ], "body": { "type": "BlockStatement", "start": 892, "end": 1174, "loc": { "start": { "line": 30, "column": 22 }, "end": { "line": 42, "column": 3 } }, "body": [ { "type": "ExpressionStatement", "start": 898, "end": 956, "loc": { "start": { "line": 31, "column": 4 }, "end": { "line": 31, "column": 62 } }, "expression": { "type": "AssignmentExpression", "start": 898, "end": 955, "loc": { "start": { "line": 31, "column": 4 }, "end": { "line": 31, "column": 61 } }, "operator": "=", "left": { "type": "MemberExpression", "start": 898, "end": 907, "loc": {