-
Notifications
You must be signed in to change notification settings - Fork 249
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Krasimir Tsonev
committed
Jan 13, 2021
1 parent
a7367d0
commit c13a7d6
Showing
22 changed files
with
163 additions
and
343 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"ignore": ["node_modules/**/*"], | ||
"presets": [ | ||
["@babel/preset-typescript"], | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"loose": true, | ||
"modules": false | ||
} | ||
], | ||
"@babel/preset-react" | ||
], | ||
"plugins": [ | ||
"@babel/plugin-proposal-class-properties", | ||
"babel-plugin-add-module-exports", | ||
"@babel/plugin-transform-classes" | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
## 8.6.1 | ||
|
||
Proper ES modules build. | ||
|
||
## 8.6.0 | ||
|
||
Introducing `callHooks` flag to the `navigate` options. | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,8 @@ | ||
"use strict"; | ||
|
||
exports.__esModule = true; | ||
exports.MATCH_REGEXP_FLAGS = exports.START_BY_SLASH_REGEXP = exports.REPLACE_NOT_SURE = exports.NOT_SURE_REGEXP = exports.REPLACE_WILDCARD = exports.WILDCARD_REGEXP = exports.REPLACE_VARIABLE_REGEXP = exports.PARAMETER_REGEXP = void 0; | ||
var PARAMETER_REGEXP = /([:*])(\w+)/g; | ||
exports.PARAMETER_REGEXP = PARAMETER_REGEXP; | ||
var REPLACE_VARIABLE_REGEXP = "([^/]+)"; | ||
exports.REPLACE_VARIABLE_REGEXP = REPLACE_VARIABLE_REGEXP; | ||
var WILDCARD_REGEXP = /\*/g; | ||
exports.WILDCARD_REGEXP = WILDCARD_REGEXP; | ||
var REPLACE_WILDCARD = "(?:.*)"; | ||
exports.REPLACE_WILDCARD = REPLACE_WILDCARD; | ||
var NOT_SURE_REGEXP = /\/\?/g; | ||
exports.NOT_SURE_REGEXP = NOT_SURE_REGEXP; | ||
var REPLACE_NOT_SURE = "/?([^/]+|)"; | ||
exports.REPLACE_NOT_SURE = REPLACE_NOT_SURE; | ||
var START_BY_SLASH_REGEXP = "(?:/^|^)"; | ||
exports.START_BY_SLASH_REGEXP = START_BY_SLASH_REGEXP; | ||
var MATCH_REGEXP_FLAGS = ""; | ||
exports.MATCH_REGEXP_FLAGS = MATCH_REGEXP_FLAGS; | ||
export var PARAMETER_REGEXP = /([:*])(\w+)/g; | ||
export var REPLACE_VARIABLE_REGEXP = "([^/]+)"; | ||
export var WILDCARD_REGEXP = /\*/g; | ||
export var REPLACE_WILDCARD = "(?:.*)"; | ||
export var NOT_SURE_REGEXP = /\/\?/g; | ||
export var REPLACE_NOT_SURE = "/?([^/]+|)"; | ||
export var START_BY_SLASH_REGEXP = "(?:/^|^)"; | ||
export var MATCH_REGEXP_FLAGS = ""; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,14 @@ | ||
"use strict"; | ||
|
||
exports.__esModule = true; | ||
exports.notFoundLifeCycle = exports.foundLifecycle = void 0; | ||
|
||
var _Q = _interopRequireDefault(require("./Q")); | ||
|
||
var _checkForLeaveHook = _interopRequireDefault(require("./middlewares/checkForLeaveHook")); | ||
|
||
var _checkForBeforeHook = _interopRequireDefault(require("./middlewares/checkForBeforeHook")); | ||
|
||
var _callHandler = _interopRequireDefault(require("./middlewares/callHandler")); | ||
|
||
var _checkForAfterHook = _interopRequireDefault(require("./middlewares/checkForAfterHook")); | ||
|
||
var _checkForAlreadyHook = _interopRequireDefault(require("./middlewares/checkForAlreadyHook")); | ||
|
||
var _checkForNotFoundHandler = _interopRequireDefault(require("./middlewares/checkForNotFoundHandler")); | ||
|
||
var _errorOut = _interopRequireDefault(require("./middlewares/errorOut")); | ||
|
||
var _flushCurrent = _interopRequireDefault(require("./middlewares/flushCurrent")); | ||
|
||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
|
||
var foundLifecycle = [_checkForAlreadyHook.default, _checkForLeaveHook.default, _checkForBeforeHook.default, _callHandler.default, _checkForAfterHook.default]; | ||
exports.foundLifecycle = foundLifecycle; | ||
var notFoundLifeCycle = [_checkForNotFoundHandler.default, _Q.default.if(function (_ref) { | ||
import Q from "./Q"; | ||
import checkForLeaveHook from "./middlewares/checkForLeaveHook"; | ||
import checkForBeforeHook from "./middlewares/checkForBeforeHook"; | ||
import callHandler from "./middlewares/callHandler"; | ||
import checkForAfterHook from "./middlewares/checkForAfterHook"; | ||
import checkForAlreadyHook from "./middlewares/checkForAlreadyHook"; | ||
import checkForNotFoundHandler from "./middlewares/checkForNotFoundHandler"; | ||
import errorOut from "./middlewares/errorOut"; | ||
import flushCurrent from "./middlewares/flushCurrent"; | ||
export var foundLifecycle = [checkForAlreadyHook, checkForLeaveHook, checkForBeforeHook, callHandler, checkForAfterHook]; | ||
export var notFoundLifeCycle = [checkForNotFoundHandler, Q["if"](function (_ref) { | ||
var notFoundHandled = _ref.notFoundHandled; | ||
return notFoundHandled; | ||
}, foundLifecycle, [_errorOut.default, _checkForLeaveHook.default]), _flushCurrent.default]; | ||
exports.notFoundLifeCycle = notFoundLifeCycle; | ||
}, foundLifecycle, [errorOut, checkForLeaveHook]), flushCurrent]; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,13 @@ | ||
"use strict"; | ||
|
||
exports.__esModule = true; | ||
exports.default = callHandler; | ||
|
||
var _utils = require("../utils"); | ||
|
||
function callHandler(context, done) { | ||
if ((0, _utils.undefinedOrTrue)(context.navigateOptions, "updateState")) { | ||
import { undefinedOrTrue } from "../utils"; | ||
export default function callHandler(context, done) { | ||
if (undefinedOrTrue(context.navigateOptions, "updateState")) { | ||
context.instance._setCurrent(context.matches); | ||
} | ||
|
||
if ((0, _utils.undefinedOrTrue)(context.navigateOptions, "callHandler")) { | ||
if (undefinedOrTrue(context.navigateOptions, "callHandler")) { | ||
context.match.route.handler(context.match); | ||
} | ||
|
||
context.instance.updatePageLinks(); | ||
done(); | ||
} | ||
|
||
module.exports = exports.default; | ||
} |
Oops, something went wrong.