@angular-wave/angular.ts 0.0.14 → 0.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@angular-wave/angular.ts",
3
3
  "license": "MIT",
4
- "version": "0.0.14",
4
+ "version": "0.0.15",
5
5
  "type": "module",
6
6
  "main": "dist/angular-ts.esm.js",
7
7
  "browser": "dist/angular-ts.umd.js",
@@ -518,33 +518,33 @@ _ {@link module:ngMessages Click here} to learn more about`ngMessages`and`ngMess
518
518
  _ @param {string} ngMessageExp|whenExp an expression value corresponding to the message key.
519
519
  _/
520
520
 
521
- /**
522
- * @ngdoc directive
523
- * @name ngMessageDefault
524
- * @restrict AE
525
- * @scope
526
- *
527
- * @description
528
- * `ngMessageDefault` is a directive with the purpose to show and hide a default message for
529
- * {@link directive:ngMessages}, when none of provided messages matches.
530
- *
531
- * More information about using `ngMessageDefault` can be found in the
532
- * {@link module:ngMessages `ngMessages` module documentation}.
533
- *
534
- * @usage
535
- * ```html
536
- * <!-- using attribute directives -->
537
- * <ANY ng-messages="expression" role="alert">
538
- * <ANY ng-message="stringValue">...</ANY>
539
- * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
540
- * <ANY ng-message-default>...</ANY>
541
- * </ANY>
542
- *
543
- * <!-- or by using element directives -->
544
- * <ng-messages for="expression" role="alert">
545
- * <ng-message when="stringValue">...</ng-message>
546
- * <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
547
- * <ng-message-default>...</ng-message-default>
548
- * </ng-messages>
549
- *
550
- */
521
+ /**
522
+ * @ngdoc directive
523
+ * @name ngMessageDefault
524
+ * @restrict AE
525
+ * @scope
526
+ *
527
+ * @description
528
+ * `ngMessageDefault` is a directive with the purpose to show and hide a default message for
529
+ * {@link directive:ngMessages}, when none of provided messages matches.
530
+ *
531
+ * More information about using `ngMessageDefault` can be found in the
532
+ * {@link module:ngMessages `ngMessages` module documentation}.
533
+ *
534
+ * @usage
535
+ * ```html
536
+ * <!-- using attribute directives -->
537
+ * <ANY ng-messages="expression" role="alert">
538
+ * <ANY ng-message="stringValue">...</ANY>
539
+ * <ANY ng-message="stringValue1, stringValue2, ...">...</ANY>
540
+ * <ANY ng-message-default>...</ANY>
541
+ * </ANY>
542
+ *
543
+ * <!-- or by using element directives -->
544
+ * <ng-messages for="expression" role="alert">
545
+ * <ng-message when="stringValue">...</ng-message>
546
+ * <ng-message when="stringValue1, stringValue2, ...">...</ng-message>
547
+ * <ng-message-default>...</ng-message-default>
548
+ * </ng-messages>
549
+ *
550
+ */
@@ -6,7 +6,6 @@
6
6
  *
7
7
  */
8
8
  import {
9
- extend,
10
9
  forEach,
11
10
  tail,
12
11
  noop,
@@ -39,7 +38,7 @@ function stateContext(el) {
39
38
  /** @hidden */
40
39
  function processedDef($state, $element, def) {
41
40
  const uiState = def.uiState || $state.current.name;
42
- const uiStateOpts = extend(
41
+ const uiStateOpts = Object.assign(
43
42
  defaultOpts($element, $state),
44
43
  def.uiStateOpts || {},
45
44
  );
@@ -283,12 +282,12 @@ export let uiSrefDirective = [
283
282
  scope.$watch(
284
283
  ref.paramExpr,
285
284
  function (val) {
286
- rawDef.uiStateParams = extend({}, val);
285
+ rawDef.uiStateParams = Object.assign({}, val);
287
286
  update();
288
287
  },
289
288
  true,
290
289
  );
291
- rawDef.uiStateParams = extend({}, scope.$eval(ref.paramExpr));
290
+ rawDef.uiStateParams = Object.assign({}, scope.$eval(ref.paramExpr));
292
291
  }
293
292
  update();
294
293
  scope.$on("$destroy", $uiRouter.stateRegistry.onStatesChanged(update));
@@ -1,4 +1,4 @@
1
- import { extend, filter, tail, unnestR } from "../../core/common/common";
1
+ import { filter, tail, unnestR } from "../../core/common/common";
2
2
  import { isDefined, isFunction, isString } from "../../core/common/predicates";
3
3
  import { kebobString } from "../../core/common/strings";
4
4
  import { noop } from "../../core/common/common";
@@ -353,7 +353,7 @@ export function $ViewDirectiveFill(
353
353
  if (controller) {
354
354
  const controllerInstance = $controller(
355
355
  controller,
356
- extend({}, locals, { $scope: scope, $element: $element }),
356
+ Object.assign({}, locals, { $scope: scope, $element: $element }),
357
357
  );
358
358
  if (controllerAs) {
359
359
  scope[controllerAs] = controllerInstance;
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import { services } from "../core/common/coreservices";
12
12
  import { applyPairs, unnestR } from "../core/common/common";
13
- import { isString, extend } from "../../core/utils";
13
+ import { isString } from "../../core/utils";
14
14
  import { trace } from "../core/common/trace";
15
15
  import { UIRouter } from "../core/router";
16
16
  import {
@@ -100,7 +100,9 @@ export function runBlock($injector, $q, $uiRouter) {
100
100
  // $state service and $stateProvider
101
101
  // $urlRouter service and $urlRouterProvider
102
102
  export function getStateProvider() {
103
- return extend(router.stateProvider, { $get: () => router.stateService });
103
+ return Object.assign(router.stateProvider, {
104
+ $get: () => router.stateService,
105
+ });
104
106
  }
105
107
 
106
108
  watchDigests.$inject = ["$rootScope"];
@@ -1,7 +1,6 @@
1
1
  /** @publicapi @module ng1 */ /** */
2
2
  import { getLocals } from "../services";
3
3
  import { services } from "../../core/common/coreservices";
4
- import { extend } from "../../../core/utils";
5
4
  import { ResolveContext } from "../../core/resolve/resolveContext";
6
5
 
7
6
  /**
@@ -20,7 +19,7 @@ export const getStateHookBuilder = (hookName) =>
20
19
  function decoratedNg1Hook(trans, state) {
21
20
  const resolveContext = new ResolveContext(trans.treeChanges(pathname));
22
21
  const subContext = resolveContext.subContext(state.$$state());
23
- const locals = extend(getLocals(subContext), {
22
+ const locals = Object.assign(getLocals(subContext), {
24
23
  $state$: state,
25
24
  $transition$: trans,
26
25
  });
@@ -1,5 +1,4 @@
1
- /** @publicapi @module ng1 */ /** */
2
- import { pick, forEach, tail, extend } from "../../core/common/common";
1
+ import { pick, forEach, tail } from "../../core/common/common";
3
2
  import { isArray, isDefined, isString } from "../../../core/utils";
4
3
  import { isInjectable } from "../../core/common/predicates";
5
4
  import { services } from "../../core/common/coreservices";
@@ -69,7 +68,7 @@ export function ng1ViewsBuilder(state) {
69
68
  // Account for views: { header: "headerComponent" }
70
69
  if (isString(config)) config = { component: config };
71
70
  // Make a shallow copy of the config object
72
- config = extend({}, config);
71
+ config = Object.assign({}, config);
73
72
  // Do not allow a view to mix props for component-style view with props for template/controller-style view
74
73
  if (hasAnyKey(compKeys, config) && hasAnyKey(nonCompKeys, config)) {
75
74
  throw new Error(
@@ -114,7 +113,7 @@ export class Ng1ViewConfig {
114
113
  const $q = services.$q;
115
114
  const context = new ResolveContext(this.path);
116
115
  const params = this.path.reduce(
117
- (acc, node) => extend(acc, node.paramValues),
116
+ (acc, node) => Object.assign(acc, node.paramValues),
118
117
  {},
119
118
  );
120
119
  const promises = {
@@ -126,7 +125,7 @@ export class Ng1ViewConfig {
126
125
  return $q.all(promises).then((results) => {
127
126
  trace.traceViewServiceEvent("Loaded", this);
128
127
  this.controller = results.controller;
129
- extend(this, results.template); // Either { template: "tpl" } or { component: "cmpName" }
128
+ Object.assign(this, results.template); // Either { template: "tpl" } or { component: "cmpName" }
130
129
  return this;
131
130
  });
132
131
  }
@@ -13,12 +13,10 @@ export const root =
13
13
  (typeof self === "object" && self.self === self && self) ||
14
14
  (typeof global === "object" && global.global === global && global) ||
15
15
  this;
16
- const angular = root.angular || {};
17
- export const fromJson = angular.fromJson || JSON.parse.bind(JSON);
18
- export const toJson = angular.toJson || JSON.stringify.bind(JSON);
19
- export const forEach = angular.forEach || _forEach;
20
- export const extend = Object.assign || _extend;
21
- export const equals = angular.equals || _equals;
16
+ export const fromJson = JSON.parse.bind(JSON);
17
+ export const toJson = JSON.stringify.bind(JSON);
18
+ export const forEach = _forEach;
19
+ export const equals = _equals;
22
20
  export function identity(x) {
23
21
  return x;
24
22
  }
@@ -102,7 +100,7 @@ export function createProxyFunctions(
102
100
  * prototypal inheritance helper.
103
101
  * Creates a new object which has `parent` object as its prototype, and then copies the properties from `extra` onto it
104
102
  */
105
- export const inherit = (parent, extra) => extend(Object.create(parent), extra);
103
+ export const inherit = (parent, extra) => Object.setPrototypeOf(parent, extra);
106
104
  /** Given an array, returns true if the object is found in the array, (using indexOf) */
107
105
  export const inArray = curry(_inArray);
108
106
  export function _inArray(array, obj) {
@@ -135,11 +133,11 @@ export const deregAll = (functions) =>
135
133
  * Earlier objects in the defaultsList take precedence when applying defaults.
136
134
  */
137
135
  export function defaults(opts, ...defaultsList) {
138
- const defaultVals = extend({}, ...defaultsList.reverse());
139
- return extend(defaultVals, pick(opts || {}, Object.keys(defaultVals)));
136
+ const defaultVals = Object.assign({}, ...defaultsList.reverse());
137
+ return Object.assign(defaultVals, pick(opts || {}, Object.keys(defaultVals)));
140
138
  }
141
139
  /** Reduce function that merges each element of the list into a single object, using extend */
142
- export const mergeR = (memo, item) => extend(memo, item);
140
+ export const mergeR = (memo, item) => Object.assign(memo, item);
143
141
  /**
144
142
  * Finds the common ancestor path between two states.
145
143
  *
@@ -441,24 +439,14 @@ export function tail(arr) {
441
439
  export function copy(src, dest) {
442
440
  if (dest) Object.keys(dest).forEach((key) => delete dest[key]);
443
441
  if (!dest) dest = {};
444
- return extend(dest, src);
442
+ return Object.assign(dest, src);
445
443
  }
446
444
  /** Naive forEach implementation works with Objects or Arrays */
447
445
  function _forEach(obj, cb, _this) {
448
446
  if (isArray(obj)) return obj.forEach(cb, _this);
449
447
  Object.keys(obj).forEach((key) => cb(obj[key], key));
450
448
  }
451
- export function _extend(toObj) {
452
- for (let i = 1; i < arguments.length; i++) {
453
- const obj = arguments[i];
454
- if (!obj) continue;
455
- const keys = Object.keys(obj);
456
- for (let j = 0; j < keys.length; j++) {
457
- toObj[keys[j]] = obj[keys[j]];
458
- }
459
- }
460
- return toObj;
461
- }
449
+
462
450
  function _equals(o1, o2) {
463
451
  if (o1 === o2) return true;
464
452
  if (o1 === null || o2 === null) return false;
@@ -1,4 +1,4 @@
1
- import { extend, filter, map, allTrueR, find } from "../common/common";
1
+ import { filter, map, allTrueR, find } from "../common/common";
2
2
  import { prop } from "../common/hof";
3
3
  import {
4
4
  isInjectable,
@@ -29,7 +29,7 @@ function getParamDeclaration(paramName, location, state) {
29
29
  const paramConfig = unwrapShorthand(
30
30
  state && state.params && state.params[paramName],
31
31
  );
32
- return extend(defaultConfig, paramConfig);
32
+ return Object.assign(defaultConfig, paramConfig);
33
33
  }
34
34
  function unwrapShorthand(cfg) {
35
35
  cfg = isShorthand(cfg) ? { value: cfg } : cfg;
@@ -38,7 +38,7 @@ function unwrapShorthand(cfg) {
38
38
  return cfg.value;
39
39
  }
40
40
  const $$fn = isInjectable(cfg.value) ? cfg.value : getStaticDefaultValue;
41
- return extend(cfg, { $$fn });
41
+ return Object.assign(cfg, { $$fn });
42
42
  }
43
43
  function getType(cfg, urlType, location, id, paramTypes) {
44
44
  if (cfg.type && urlType && urlType.name !== "string")
@@ -157,9 +157,9 @@ export class Param {
157
157
  array: location === DefType.SEARCH ? "auto" : false,
158
158
  };
159
159
  const arrayParamNomenclature = id.match(/\[\]$/) ? { array: true } : {};
160
- return extend(arrayDefaults, arrayParamNomenclature, config).array;
160
+ return Object.assign(arrayDefaults, arrayParamNomenclature, config).array;
161
161
  }
162
- extend(this, {
162
+ Object.assign(this, {
163
163
  id,
164
164
  type,
165
165
  location,
@@ -1,4 +1,4 @@
1
- import { extend, filter, map } from "../common/common";
1
+ import { filter, map } from "../common/common";
2
2
  import { isArray, isDefined } from "../common/predicates";
3
3
  /**
4
4
  * An internal class which implements [[ParamTypeDefinition]].
@@ -34,7 +34,7 @@ export class ParamType {
34
34
  this.pattern = /.*/;
35
35
  /** @inheritdoc */
36
36
  this.inherit = true;
37
- extend(this, def);
37
+ Object.assign(this, def);
38
38
  }
39
39
  // consider these four methods to be "abstract methods" that should be overridden
40
40
  /** @inheritdoc */
@@ -127,7 +127,7 @@ function ArrayType(type, mode) {
127
127
  const wrapperFn = name === "equals" ? arrayEqualsHandler : arrayHandler;
128
128
  this[name] = wrapperFn(paramTypeFn);
129
129
  });
130
- extend(this, {
130
+ Object.assign(this, {
131
131
  dynamic: type.dynamic,
132
132
  name: type.name,
133
133
  pattern: type.pattern,
@@ -5,7 +5,6 @@ import {
5
5
  equals,
6
6
  inherit,
7
7
  map,
8
- extend,
9
8
  pick,
10
9
  } from "../common/common";
11
10
  import { isDefined, isNullOrUndefined } from "../common/predicates";
@@ -52,7 +51,7 @@ export class ParamTypes {
52
51
  ]);
53
52
  // Register default types. Store them in the prototype of this.types.
54
53
  const makeType = (definition, name) =>
55
- new ParamType(extend({ name }, definition));
54
+ new ParamType(Object.assign({ name }, definition));
56
55
  this.types = inherit(map(this.defaultTypes, makeType), {});
57
56
  }
58
57
  dispose() {
@@ -65,9 +64,9 @@ export class ParamTypes {
65
64
  */
66
65
  type(name, definition, definitionFn) {
67
66
  if (!isDefined(definition)) return this.types[name];
68
- if (this.types.hasOwnProperty(name))
67
+ if (Object.prototype.hasOwnProperty.call(this.types, name))
69
68
  throw new Error(`A type named '${name}' has already been defined.`);
70
- this.types[name] = new ParamType(extend({ name }, definition));
69
+ this.types[name] = new ParamType(Object.assign({ name }, definition));
71
70
  if (definitionFn) {
72
71
  this.typeQueue.push({ name, def: definitionFn });
73
72
  if (!this.enqueue) this._flushTypeQueue();
@@ -79,7 +78,7 @@ export class ParamTypes {
79
78
  const type = this.typeQueue.shift();
80
79
  if (type.pattern)
81
80
  throw new Error("You cannot override a type's .pattern at runtime.");
82
- extend(this.types[type.name], services.$injector.invoke(type.def));
81
+ Object.assign(this.types[type.name], services.$injector.invoke(type.def));
83
82
  }
84
83
  }
85
84
  }
@@ -94,10 +93,10 @@ function initDefaultTypes() {
94
93
  // tslint:disable-next-line:triple-equals
95
94
  equals: (a, b) => a == b, // allow coersion for null/undefined/""
96
95
  };
97
- return extend({}, defaultTypeBase, def);
96
+ return Object.assign({}, defaultTypeBase, def);
98
97
  };
99
98
  // Default Parameter Type Definitions
100
- extend(ParamTypes.prototype, {
99
+ Object.assign(ParamTypes.prototype, {
101
100
  string: makeDefaultType({}),
102
101
  path: makeDefaultType({
103
102
  pattern: /[^/]*/,
@@ -1,7 +1,7 @@
1
- import { extend, ancestors } from "../common/common";
1
+ import { ancestors } from "../common/common";
2
2
  export class StateParams {
3
3
  constructor(params = {}) {
4
- extend(this, params);
4
+ Object.assign(this, params);
5
5
  }
6
6
  /**
7
7
  * Merges a set of parameters with all parameters inherited between the common parents of the
@@ -30,6 +30,6 @@ export class StateParams {
30
30
  inherited[parentParamsKeys[j]] = this[parentParamsKeys[j]];
31
31
  }
32
32
  }
33
- return extend({}, inherited, newParams);
33
+ return Object.assign({}, inherited, newParams);
34
34
  }
35
35
  }
@@ -1,4 +1,4 @@
1
- import { extend, applyPairs, find } from "../common/common";
1
+ import { applyPairs, find } from "../common/common";
2
2
  import { propEq } from "../common/hof";
3
3
  import { Param } from "../params/param";
4
4
  /**
@@ -14,7 +14,7 @@ export class PathNode {
14
14
  const node = stateOrNode;
15
15
  this.state = node.state;
16
16
  this.paramSchema = node.paramSchema.slice();
17
- this.paramValues = extend({}, node.paramValues);
17
+ this.paramValues = Object.assign({}, node.paramValues);
18
18
  this.resolvables = node.resolvables.slice();
19
19
  this.views = node.views && node.views.slice();
20
20
  } else {
@@ -1,5 +1,4 @@
1
1
  import {
2
- extend,
3
2
  find,
4
3
  pick,
5
4
  omit,
@@ -76,7 +75,7 @@ export class PathUtils {
76
75
  static inheritParams(fromPath, toPath, toKeys = []) {
77
76
  function nodeParamVals(path, state) {
78
77
  const node = find(path, propEq("state", state));
79
- return extend({}, node && node.paramValues);
78
+ return Object.assign({}, node && node.paramValues);
80
79
  }
81
80
  const noInherit = fromPath
82
81
  .map((node) => node.paramSchema)
@@ -89,7 +88,7 @@ export class PathUtils {
89
88
  */
90
89
  function makeInheritedParamsNode(toNode) {
91
90
  // All param values for the node (may include default key/vals, when key was not found in toParams)
92
- let toParamVals = extend({}, toNode && toNode.paramValues);
91
+ let toParamVals = Object.assign({}, toNode && toNode.paramValues);
93
92
  // limited to only those keys found in toParams
94
93
  const incomingParamVals = pick(toParamVals, toKeys);
95
94
  toParamVals = omit(toParamVals, toKeys);
@@ -98,7 +97,7 @@ export class PathUtils {
98
97
  noInherit,
99
98
  );
100
99
  // extend toParamVals with any fromParamVals, then override any of those those with incomingParamVals
101
- const ownParamVals = extend(
100
+ const ownParamVals = Object.assign(
102
101
  toParamVals,
103
102
  fromParamVals,
104
103
  incomingParamVals,
@@ -196,4 +195,4 @@ PathUtils.nonDynamicParams = (node) =>
196
195
  node.state.parameters({ inherit: false }).filter((param) => !param.dynamic);
197
196
  /** Gets the raw parameter values from a path */
198
197
  PathUtils.paramValues = (path) =>
199
- path.reduce((acc, node) => extend(acc, node.paramValues), {});
198
+ path.reduce((acc, node) => Object.assign(acc, node.paramValues), {});
@@ -1,4 +1,4 @@
1
- import { extend, identity } from "../../../core/utils";
1
+ import { identity } from "../../../core/utils";
2
2
  import { services } from "../common/coreservices";
3
3
  import { trace } from "../common/trace";
4
4
  import { stringify } from "../common/strings";
@@ -26,7 +26,7 @@ export class Resolvable {
26
26
  this.resolved = false;
27
27
  this.promise = undefined;
28
28
  if (arg1 instanceof Resolvable) {
29
- extend(this, arg1);
29
+ Object.assign(this, arg1);
30
30
  } else if (isFunction(resolveFn)) {
31
31
  if (isNullOrUndefined(arg1))
32
32
  throw new Error("new Resolvable(): token argument is required");
@@ -1,6 +1,5 @@
1
1
  import {
2
2
  applyPairs,
3
- extend,
4
3
  identity,
5
4
  inherit,
6
5
  mapObj,
@@ -89,7 +88,7 @@ function pathBuilder(state) {
89
88
  return state.parent ? state.parent.path.concat(state) : /*root*/ [state];
90
89
  }
91
90
  function includesBuilder(state) {
92
- const includes = state.parent ? extend({}, state.parent.includes) : {};
91
+ const includes = state.parent ? Object.assign({}, state.parent.includes) : {};
93
92
  includes[state.name] = true;
94
93
  return includes;
95
94
  }
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  createProxyFunctions,
3
3
  defaults,
4
- extend,
5
4
  inArray,
6
5
  noop,
7
6
  removeFrom,
@@ -338,7 +337,7 @@ export class StateService {
338
337
  const globals = router.globals;
339
338
  options = defaults(options, defaultTransOpts);
340
339
  const getCurrent = () => globals.transition;
341
- options = extend(options, { current: getCurrent });
340
+ options = Object.assign(options, { current: getCurrent });
342
341
  const ref = this.target(to, toParams, options);
343
342
  const currentPath = this.getCurrentPath();
344
343
  if (!ref.exists()) return this._handleInvalidTargetState(currentPath, ref);
@@ -391,7 +390,7 @@ export class StateService {
391
390
  .catch(rejectedTransitionHandler(transition));
392
391
  silenceUncaughtInPromise(transitionToPromise); // issue #2676
393
392
  // Return a promise for the transition, which also has the transition object on it.
394
- return extend(transitionToPromise, { transition });
393
+ return Object.assign(transitionToPromise, { transition });
395
394
  }
396
395
  /**
397
396
  * Checks if the current state *is* the provided state
@@ -1,6 +1,5 @@
1
1
  import { isObject, isString } from "../common/predicates";
2
2
  import { stringify } from "../common/strings";
3
- import { extend } from "../common/common";
4
3
  /**
5
4
  * Encapsulate the target (destination) state/params/options of a [[Transition]].
6
5
  *
@@ -49,8 +48,8 @@ export class TargetState {
49
48
  this._stateRegistry = _stateRegistry;
50
49
  this._identifier = _identifier;
51
50
  this._identifier = _identifier;
52
- this._params = extend({}, _params || {});
53
- this._options = extend({}, _options || {});
51
+ this._params = Object.assign({}, _params || {});
52
+ this._options = Object.assign({}, _options || {});
54
53
  this._definition = _stateRegistry.matcher.find(
55
54
  _identifier,
56
55
  this._options.relative,
@@ -124,7 +123,9 @@ export class TargetState {
124
123
  * When true the parameter values will be used instead of the current values.
125
124
  */
126
125
  withParams(params, replace = false) {
127
- const newParams = replace ? params : extend({}, this._params, params);
126
+ const newParams = replace
127
+ ? params
128
+ : Object.assign({}, this._params, params);
128
129
  return new TargetState(
129
130
  this._stateRegistry,
130
131
  this._identifier,
@@ -140,7 +141,9 @@ export class TargetState {
140
141
  * When true the options will be used instead of the current options.
141
142
  */
142
143
  withOptions(options, replace = false) {
143
- const newOpts = replace ? options : extend({}, this._options, options);
144
+ const newOpts = replace
145
+ ? options
146
+ : Object.assign({}, this._options, options);
144
147
  return new TargetState(
145
148
  this._stateRegistry,
146
149
  this._identifier,
@@ -1,4 +1,4 @@
1
- import { extend, assertPredicate, unnestR, identity } from "../common/common";
1
+ import { assertPredicate, unnestR, identity } from "../common/common";
2
2
  import { isArray } from "../common/predicates";
3
3
  import { TransitionHookPhase, TransitionHookScope } from "./interface";
4
4
  import { TransitionHook } from "./transitionHook";
@@ -57,7 +57,7 @@ export class HookBuilder {
57
57
  const matchingNodes = matches[hookType.criteriaMatchPath.name];
58
58
  // Return an array of HookTuples
59
59
  return matchingNodes.map((node) => {
60
- const _options = extend(
60
+ const _options = Object.assign(
61
61
  {
62
62
  bind: hook.bind,
63
63
  traceData: { hookType: hookType.name, context: node },
@@ -1,4 +1,4 @@
1
- import { extend, removeFrom, tail, identity, mapObj } from "../common/common";
1
+ import { removeFrom, tail, identity, mapObj } from "../common/common";
2
2
  import { isString, isFunction } from "../common/predicates";
3
3
  import { Glob } from "../common/glob";
4
4
  import {
@@ -114,7 +114,7 @@ export class RegisteredHook {
114
114
  * ```
115
115
  */
116
116
  _getMatchingNodes(treeChanges, transition) {
117
- const criteria = extend(
117
+ const criteria = Object.assign(
118
118
  this._getDefaultMatchCriteria(),
119
119
  this.matchCriteria,
120
120
  );
@@ -1,5 +1,4 @@
1
- "use strict";
2
- import { extend, silentRejection } from "../common/common";
1
+ import { silentRejection } from "../common/common";
3
2
  import { stringify } from "../common/strings";
4
3
  import { is } from "../common/hof";
5
4
  /** An enum for Transition Rejection reasons */
@@ -117,6 +116,6 @@ export class Rejection {
117
116
  return `Transition Rejection($id: ${$id} type: ${type}, message: ${message}, detail: ${detail})`;
118
117
  }
119
118
  toPromise() {
120
- return extend(silentRejection(this), { _transitionRejection: this });
119
+ return Object.assign(silentRejection(this), { _transitionRejection: this });
121
120
  }
122
121
  }
@@ -4,7 +4,6 @@ import { stringify } from "../common/strings";
4
4
  import {
5
5
  map,
6
6
  find,
7
- extend,
8
7
  mergeR,
9
8
  tail,
10
9
  omit,
@@ -118,7 +117,10 @@ export class Transition {
118
117
  throw new Error(targetState.error());
119
118
  }
120
119
  // current() is assumed to come from targetState.options, but provide a naive implementation otherwise.
121
- this._options = extend({ current: val(this) }, targetState.options());
120
+ this._options = Object.assign(
121
+ { current: val(this) },
122
+ targetState.options(),
123
+ );
122
124
  this.$id = router.transitionService._transitionCount++;
123
125
  const toPath = PathUtils.buildToPath(fromPath, targetState);
124
126
  this._treeChanges = PathUtils.treeChanges(
@@ -496,7 +498,7 @@ export class Transition {
496
498
  ) {
497
499
  redirectOpts.location = "replace";
498
500
  }
499
- const newOptions = extend(
501
+ const newOptions = Object.assign(
500
502
  {},
501
503
  this.options(),
502
504
  targetState.options(),