@angular-wave/angular.ts 0.8.4 → 0.9.1
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/@types/core/scope/scope.d.ts +1 -4
- package/@types/interface.d.ts +17 -3
- package/@types/shared/interface.d.ts +17 -0
- package/@types/shared/utils.d.ts +4 -19
- package/dist/angular-ts.esm.js +42 -160
- package/dist/angular-ts.umd.js +42 -160
- package/dist/angular-ts.umd.min.js +1 -1
- package/docs/layouts/shortcodes/version.html +1 -1
- package/docs/static/typedoc/assets/hierarchy.js +1 -1
- package/docs/static/typedoc/assets/main.js +2 -2
- package/docs/static/typedoc/assets/navigation.js +1 -1
- package/docs/static/typedoc/assets/search.js +1 -1
- package/docs/static/typedoc/assets/style.css +2 -9
- package/docs/static/typedoc/classes/Location.html +20 -20
- package/docs/static/typedoc/classes/LocationProvider.html +5 -5
- package/docs/static/typedoc/classes/LogProvider.html +3 -3
- package/docs/static/typedoc/classes/PubSub.html +21 -21
- package/docs/static/typedoc/classes/PubSubProvider.html +1 -1
- package/docs/static/typedoc/classes/TemplateCacheProvider.html +2 -2
- package/docs/static/typedoc/hierarchy.html +1 -1
- package/docs/static/typedoc/index.html +1 -1
- package/docs/static/typedoc/interfaces/ChangesObject.html +3 -3
- package/docs/static/typedoc/interfaces/ComponentOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Controller.html +6 -6
- package/docs/static/typedoc/interfaces/DefaultPorts.html +1 -1
- package/docs/static/typedoc/interfaces/Directive.html +18 -18
- package/docs/static/typedoc/interfaces/DirectivePrePost.html +1 -1
- package/docs/static/typedoc/interfaces/Html5Mode.html +1 -1
- package/docs/static/typedoc/interfaces/HttpProviderDefaults.html +7 -7
- package/docs/static/typedoc/interfaces/HttpService.html +21 -21
- package/docs/static/typedoc/interfaces/LogService.html +6 -6
- package/docs/static/typedoc/interfaces/NgModelController.html +15 -15
- package/docs/static/typedoc/interfaces/NgModelOptions.html +8 -8
- package/docs/static/typedoc/interfaces/Provider.html +17 -17
- package/docs/static/typedoc/interfaces/RequestConfig.html +15 -15
- package/docs/static/typedoc/interfaces/RequestShortcutConfig.html +11 -11
- package/docs/static/typedoc/interfaces/ServiceProvider.html +1 -1
- package/docs/static/typedoc/interfaces/TemplateCache.html +1 -1
- package/docs/static/typedoc/interfaces/TranscludeFunctionObject.html +4 -4
- package/docs/static/typedoc/interfaces/UrlParts.html +4 -4
- package/docs/static/typedoc/types/AnnotatedFactory.html +1 -1
- package/docs/static/typedoc/types/CloneAttachFunction.html +1 -1
- package/docs/static/typedoc/types/ControllerConstructor.html +1 -1
- package/docs/static/typedoc/types/DirectiveCompileFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveController.html +1 -1
- package/docs/static/typedoc/types/DirectiveFactoryFn.html +1 -1
- package/docs/static/typedoc/types/DirectiveLinkFn.html +1 -1
- package/docs/static/typedoc/types/Expression.html +1 -1
- package/docs/static/typedoc/types/FilterFactory.html +1 -1
- package/docs/static/typedoc/types/FilterFn.html +1 -1
- package/docs/static/typedoc/types/Injectable.html +1 -1
- package/docs/static/typedoc/types/InjectableFactory.html +1 -1
- package/docs/static/typedoc/types/LogCall.html +1 -1
- package/docs/static/typedoc/types/LogServiceFactory.html +1 -1
- package/docs/static/typedoc/types/OnChangesObject.html +1 -1
- package/docs/static/typedoc/types/SwapModeType.html +1 -1
- package/docs/static/typedoc/types/TController.html +1 -1
- package/docs/static/typedoc/types/UrlChangeListener.html +4 -4
- package/docs/static/typedoc/variables/SwapMode.html +10 -10
- package/legacy.d.ts +0 -82
- package/package.json +2 -2
- package/src/animations/animate-js.js +2 -1
- package/src/animations/animate-queue.js +7 -6
- package/src/core/parse/interpreter.js +11 -6
- package/src/core/parse/parse.spec.js +6 -8
- package/src/core/scope/scope.js +10 -12
- package/src/core/scope/scope.spec.js +4 -4
- package/src/directive/http/form-router-test.html +44 -0
- package/src/directive/options/options-example.html +7 -3
- package/src/directive/options/options.js +1 -0
- package/src/directive/options/options.spec.js +117 -170
- package/src/interface.ts +20 -3
- package/src/router/directives/view-directive.js +0 -1
- package/src/router/directives/view-directive.spec.js +10 -9
- package/src/router/resolve/resolve-context.js +0 -19
- package/src/router/state/state-registry.js +3 -10
- package/src/router/state/state-service.js +5 -5
- package/src/router/transition/transition.js +1 -86
- package/src/router/view-hook.spec.js +1 -1
- package/src/shared/interface.ts +19 -0
- package/src/shared/utils.js +3 -12
- package/tsconfig.types.json +2 -2
- package/@types/angular.d.ts +0 -150
- package/@types/animations/animate-cache.d.ts +0 -50
- package/@types/animations/animate-children-directive.d.ts +0 -10
- package/@types/animations/animate-css-driver.d.ts +0 -18
- package/@types/animations/animate-css.d.ts +0 -18
- package/@types/animations/animate-js-driver.d.ts +0 -14
- package/@types/animations/animate-js.d.ts +0 -23
- package/@types/animations/animate-queue.d.ts +0 -28
- package/@types/animations/animate-runner.d.ts +0 -31
- package/@types/animations/animate-swap.d.ts +0 -9
- package/@types/animations/animate.d.ts +0 -450
- package/@types/animations/animation.d.ts +0 -14
- package/@types/animations/interface.d.ts +0 -17
- package/@types/animations/raf-scheduler.d.ts +0 -37
- package/@types/animations/shared.d.ts +0 -74
- package/@types/core/compile/compile.d.ts +0 -201
- package/@types/core/controller/controller.d.ts +0 -54
- package/@types/core/di/injector.d.ts +0 -22
- package/@types/core/filter/filter.d.ts +0 -23
- package/@types/core/interpolate/interpolate.d.ts +0 -38
- package/@types/core/parse/ast/ast-node.d.ts +0 -56
- package/@types/core/parse/ast/ast.d.ts +0 -164
- package/@types/core/parse/lexer/lexer.d.ts +0 -119
- package/@types/core/parse/lexer/token.d.ts +0 -17
- package/@types/core/parse/parse.d.ts +0 -33
- package/@types/core/parse/parser/parser.d.ts +0 -41
- package/@types/core/sanitize/interface.d.ts +0 -10
- package/@types/core/sanitize/sanitize-uri.d.ts +0 -40
- package/@types/directive/aria/aria.d.ts +0 -104
- package/@types/directive/attrs/attrs.d.ts +0 -8
- package/@types/directive/bind/bind.d.ts +0 -18
- package/@types/directive/channel/channel.d.ts +0 -10
- package/@types/directive/class/class.d.ts +0 -3
- package/@types/directive/cloak/cloak.d.ts +0 -4
- package/@types/directive/controller/controller.d.ts +0 -4
- package/@types/directive/events/events.d.ts +0 -21
- package/@types/directive/form/form.d.ts +0 -264
- package/@types/directive/http/http.d.ts +0 -46
- package/@types/directive/if/if.d.ts +0 -10
- package/@types/directive/include/include.d.ts +0 -28
- package/@types/directive/init/init.d.ts +0 -4
- package/@types/directive/input/input.d.ts +0 -70
- package/@types/directive/messages/messages.d.ts +0 -63
- package/@types/directive/model/model.d.ts +0 -515
- package/@types/directive/model-options/model-options.d.ts +0 -56
- package/@types/directive/non-bindable/non-bindable.d.ts +0 -4
- package/@types/directive/observe/observe.d.ts +0 -9
- package/@types/directive/options/options.d.ts +0 -13
- package/@types/directive/ref/ref.d.ts +0 -11
- package/@types/directive/repeat/repeat.d.ts +0 -11
- package/@types/directive/script/script.d.ts +0 -10
- package/@types/directive/select/select.d.ts +0 -15
- package/@types/directive/setter/setter.d.ts +0 -12
- package/@types/directive/show-hide/show-hide.d.ts +0 -19
- package/@types/directive/style/style.d.ts +0 -4
- package/@types/directive/switch/switch.d.ts +0 -18
- package/@types/directive/transclude/transclude.d.ts +0 -10
- package/@types/directive/validators/validators.d.ts +0 -149
- package/@types/filters/filter.d.ts +0 -4
- package/@types/filters/filters.d.ts +0 -38
- package/@types/filters/limit-to.d.ts +0 -4
- package/@types/filters/order-by.d.ts +0 -7
- package/@types/index.d.ts +0 -2
- package/@types/ng.d.ts +0 -8
- package/@types/router/common/trace.d.ts +0 -66
- package/@types/router/directives/state-directives.d.ts +0 -46
- package/@types/router/directives/view-directive.d.ts +0 -138
- package/@types/router/glob/glob.d.ts +0 -81
- package/@types/router/hooks/core-resolvables.d.ts +0 -2
- package/@types/router/hooks/ignored-transition.d.ts +0 -1
- package/@types/router/hooks/invalid-transition.d.ts +0 -1
- package/@types/router/hooks/lazy-load.d.ts +0 -42
- package/@types/router/hooks/on-enter-exit-retain.d.ts +0 -3
- package/@types/router/hooks/redirect-to.d.ts +0 -4
- package/@types/router/hooks/resolve.d.ts +0 -4
- package/@types/router/hooks/update-globals.d.ts +0 -1
- package/@types/router/hooks/url.d.ts +0 -5
- package/@types/router/hooks/views.d.ts +0 -5
- package/@types/router/params/interface.d.ts +0 -606
- package/@types/router/params/param-factory.d.ts +0 -16
- package/@types/router/params/param-type.d.ts +0 -59
- package/@types/router/params/param-types.d.ts +0 -36
- package/@types/router/params/param.d.ts +0 -71
- package/@types/router/params/state-params.d.ts +0 -12
- package/@types/router/path/path-node.d.ts +0 -38
- package/@types/router/path/path-utils.d.ts +0 -88
- package/@types/router/resolve/interface.d.ts +0 -200
- package/@types/router/resolve/resolvable.d.ts +0 -50
- package/@types/router/resolve/resolve-context.d.ts +0 -102
- package/@types/router/router.d.ts +0 -47
- package/@types/router/state/interface.d.ts +0 -983
- package/@types/router/state/state-builder.d.ts +0 -95
- package/@types/router/state/state-matcher.d.ts +0 -7
- package/@types/router/state/state-object.d.ts +0 -83
- package/@types/router/state/state-queue-manager.d.ts +0 -29
- package/@types/router/state/state-registry.d.ts +0 -134
- package/@types/router/state/state-service.d.ts +0 -419
- package/@types/router/state/target-state.d.ts +0 -102
- package/@types/router/state/views.d.ts +0 -58
- package/@types/router/state-filters.d.ts +0 -39
- package/@types/router/template-factory.d.ts +0 -117
- package/@types/router/transition/hook-builder.d.ts +0 -45
- package/@types/router/transition/hook-registry.d.ts +0 -102
- package/@types/router/transition/interface.d.ts +0 -880
- package/@types/router/transition/reject-factory.d.ts +0 -43
- package/@types/router/transition/transition-event-type.d.ts +0 -24
- package/@types/router/transition/transition-hook.d.ts +0 -86
- package/@types/router/transition/transition-service.d.ts +0 -116
- package/@types/router/transition/transition.d.ts +0 -396
- package/@types/router/url/url-config.d.ts +0 -99
- package/@types/router/url/url-matcher.d.ts +0 -174
- package/@types/router/url/url-rule.d.ts +0 -161
- package/@types/router/url/url-rules.d.ts +0 -249
- package/@types/router/url/url-service.d.ts +0 -254
- package/@types/router/view/interface.d.ts +0 -44
- package/@types/router/view/view.d.ts +0 -149
- package/@types/router/view-scroll.d.ts +0 -10
- package/@types/services/anchor-scroll.d.ts +0 -25
- package/@types/services/cookie-reader.d.ts +0 -4
- package/@types/services/http/http.d.ts +0 -134
- package/@types/services/http-backend/http-backend.d.ts +0 -58
- package/@types/services/sce/sce.d.ts +0 -238
- package/@types/services/template-request.d.ts +0 -55
- package/@types/shared/common.d.ts +0 -197
- package/@types/shared/hof.d.ts +0 -108
- package/@types/shared/predicates.d.ts +0 -17
- package/@types/shared/queue.d.ts +0 -64
- package/@types/shared/strings.d.ts +0 -58
- package/@types/shared/test-utils.d.ts +0 -18
- package/docs/static/typedoc/classes/NgModule.html +0 -32
- package/src/router/params/README.md +0 -8
package/dist/angular-ts.umd.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* Version: 0.
|
|
1
|
+
/* Version: 0.9.1 - October 8, 2025 04:11:26 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
|
@@ -912,16 +912,7 @@
|
|
|
912
912
|
return arg;
|
|
913
913
|
}
|
|
914
914
|
|
|
915
|
-
/**
|
|
916
|
-
* @typedef {Object} ErrorHandlingConfig
|
|
917
|
-
* Error configuration object. May only contain the options that need to be updated.
|
|
918
|
-
* @property {number=} objectMaxDepth - The max depth for stringifying objects. Setting to a
|
|
919
|
-
* non-positive or non-numeric value removes the max depth limit. Default: 5.
|
|
920
|
-
* @property {boolean=} urlErrorParamsEnabled - Specifies whether the generated error URL will
|
|
921
|
-
* contain the parameters of the thrown error. Default: true. When used without argument, it returns the current value.
|
|
922
|
-
*/
|
|
923
|
-
|
|
924
|
-
/** @type {ErrorHandlingConfig} */
|
|
915
|
+
/** @type {import("./interface.js").ErrorHandlingConfig} */
|
|
925
916
|
const minErrConfig = {
|
|
926
917
|
objectMaxDepth: 5,
|
|
927
918
|
urlErrorParamsEnabled: true,
|
|
@@ -933,8 +924,8 @@
|
|
|
933
924
|
*
|
|
934
925
|
* Omitted or undefined options will leave the corresponding configuration values unchanged.
|
|
935
926
|
*
|
|
936
|
-
* @param {ErrorHandlingConfig} [config]
|
|
937
|
-
* @returns {ErrorHandlingConfig}
|
|
927
|
+
* @param {import("./interface.ts").ErrorHandlingConfig} [config]
|
|
928
|
+
* @returns {import("./interface.ts").ErrorHandlingConfig}
|
|
938
929
|
*/
|
|
939
930
|
function errorHandlingConfig(config) {
|
|
940
931
|
if (isObject(config)) {
|
|
@@ -12392,6 +12383,7 @@
|
|
|
12392
12383
|
|
|
12393
12384
|
const NG_OPTIONS_REGEXP =
|
|
12394
12385
|
/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/;
|
|
12386
|
+
|
|
12395
12387
|
// 1: value expression (valueFn)
|
|
12396
12388
|
// 2: label expression (displayFn)
|
|
12397
12389
|
// 3: group by expression (groupByFn)
|
|
@@ -15459,7 +15451,11 @@
|
|
|
15459
15451
|
? (scope, locals, assign) => {
|
|
15460
15452
|
const values = [];
|
|
15461
15453
|
for (let i = 0; i < args.length; ++i) {
|
|
15462
|
-
const res = args[i](
|
|
15454
|
+
const res = args[i](
|
|
15455
|
+
scope && scope.$target ? scope.$target : scope,
|
|
15456
|
+
locals,
|
|
15457
|
+
assign,
|
|
15458
|
+
);
|
|
15463
15459
|
values.push(res);
|
|
15464
15460
|
}
|
|
15465
15461
|
const value = () => {
|
|
@@ -15547,7 +15543,7 @@
|
|
|
15547
15543
|
return context ? { value } : value;
|
|
15548
15544
|
};
|
|
15549
15545
|
case ASTType.ThisExpression:
|
|
15550
|
-
return (scope) => (context ? { value: scope } : scope);
|
|
15546
|
+
return (scope) => (context ? { value: scope } : scope.$proxy);
|
|
15551
15547
|
case ASTType.LocalsExpression:
|
|
15552
15548
|
// @ts-ignore
|
|
15553
15549
|
return (scope, locals) => (context ? { value: locals } : locals);
|
|
@@ -15823,9 +15819,9 @@
|
|
|
15823
15819
|
*/
|
|
15824
15820
|
"ternary?:"(test, alternate, consequent, context) {
|
|
15825
15821
|
return (scope, locals, assign) => {
|
|
15826
|
-
const arg = test(scope
|
|
15827
|
-
? alternate(scope
|
|
15828
|
-
: consequent(scope
|
|
15822
|
+
const arg = test(scope, locals, assign)
|
|
15823
|
+
? alternate(scope, locals, assign)
|
|
15824
|
+
: consequent(scope, locals, assign);
|
|
15829
15825
|
return context ? { value: arg } : arg;
|
|
15830
15826
|
};
|
|
15831
15827
|
}
|
|
@@ -15850,7 +15846,8 @@
|
|
|
15850
15846
|
*/
|
|
15851
15847
|
identifier(name, context, create) {
|
|
15852
15848
|
return (scope, locals) => {
|
|
15853
|
-
const base =
|
|
15849
|
+
const base =
|
|
15850
|
+
locals && name in locals ? locals : ((scope && scope.$proxy) ?? scope);
|
|
15854
15851
|
if (create && create !== 1 && base && base[name] == null) {
|
|
15855
15852
|
base[name] = {};
|
|
15856
15853
|
}
|
|
@@ -20214,6 +20211,7 @@
|
|
|
20214
20211
|
* Scope class for the Proxy. It intercepts operations like property access (get)
|
|
20215
20212
|
* and property setting (set), and adds support for deep change tracking and
|
|
20216
20213
|
* observer-like behavior.
|
|
20214
|
+
* @extends {Record<string, any>}
|
|
20217
20215
|
*/
|
|
20218
20216
|
class Scope {
|
|
20219
20217
|
/**
|
|
@@ -20629,6 +20627,7 @@
|
|
|
20629
20627
|
return true;
|
|
20630
20628
|
}
|
|
20631
20629
|
|
|
20630
|
+
/** @internal **/
|
|
20632
20631
|
#checkeListenersForAllKeys(value) {
|
|
20633
20632
|
if (isUndefined(value)) {
|
|
20634
20633
|
return;
|
|
@@ -20866,8 +20865,8 @@
|
|
|
20866
20865
|
keySet.push(prop.value.name);
|
|
20867
20866
|
listener.property.push(key);
|
|
20868
20867
|
} else {
|
|
20869
|
-
|
|
20870
|
-
|
|
20868
|
+
const target = get.decoratedNode.body[0].expression.toWatch[0];
|
|
20869
|
+
key = target.property ? target.property.name : target.name;
|
|
20871
20870
|
listener.property.push(key);
|
|
20872
20871
|
}
|
|
20873
20872
|
}
|
|
@@ -20968,6 +20967,7 @@
|
|
|
20968
20967
|
return proxy;
|
|
20969
20968
|
}
|
|
20970
20969
|
|
|
20970
|
+
/** @internal **/
|
|
20971
20971
|
#registerKey(key, listener) {
|
|
20972
20972
|
if (this.watchers.has(key)) {
|
|
20973
20973
|
this.watchers.get(key).push(listener);
|
|
@@ -20976,6 +20976,7 @@
|
|
|
20976
20976
|
}
|
|
20977
20977
|
}
|
|
20978
20978
|
|
|
20979
|
+
/** @internal **/
|
|
20979
20980
|
#registerForeignKey(key, listener) {
|
|
20980
20981
|
if (this.foreignListeners.has(key)) {
|
|
20981
20982
|
this.foreignListeners.get(key).push(listener);
|
|
@@ -21107,7 +21108,8 @@
|
|
|
21107
21108
|
}
|
|
21108
21109
|
|
|
21109
21110
|
/**
|
|
21110
|
-
* @
|
|
21111
|
+
* @internal
|
|
21112
|
+
* @returns {any}
|
|
21111
21113
|
*/
|
|
21112
21114
|
#eventHelper({ name, event, broadcast }, ...args) {
|
|
21113
21115
|
if (!broadcast) {
|
|
@@ -21188,6 +21190,7 @@
|
|
|
21188
21190
|
}
|
|
21189
21191
|
|
|
21190
21192
|
/**
|
|
21193
|
+
* @internal
|
|
21191
21194
|
* @returns {boolean}
|
|
21192
21195
|
*/
|
|
21193
21196
|
#isRoot() {
|
|
@@ -21222,6 +21225,7 @@
|
|
|
21222
21225
|
}
|
|
21223
21226
|
|
|
21224
21227
|
/**
|
|
21228
|
+
* @internal
|
|
21225
21229
|
* @param {Listener} listener - The property path that was changed.
|
|
21226
21230
|
*/
|
|
21227
21231
|
#notifyListener(listener, target) {
|
|
@@ -23257,15 +23261,15 @@
|
|
|
23257
23261
|
});
|
|
23258
23262
|
|
|
23259
23263
|
this.$get = [
|
|
23260
|
-
|
|
23261
|
-
|
|
23262
|
-
|
|
23263
|
-
|
|
23264
|
-
|
|
23264
|
+
$injectTokens.$rootScope,
|
|
23265
|
+
$injectTokens.$injector,
|
|
23266
|
+
$injectTokens.$$animation,
|
|
23267
|
+
$injectTokens.$$AnimateRunner,
|
|
23268
|
+
$injectTokens.$templateRequest,
|
|
23265
23269
|
/**
|
|
23266
23270
|
*
|
|
23267
23271
|
* @param {import('../core/scope/scope.js').Scope} $rootScope
|
|
23268
|
-
* @param {
|
|
23272
|
+
* @param {import('../core/di/internal-injector.js').InjectorService} $injector
|
|
23269
23273
|
* @param {*} $$animation
|
|
23270
23274
|
* @param {*} $$AnimateRunner
|
|
23271
23275
|
* @param {*} $templateRequest
|
|
@@ -23978,7 +23982,7 @@
|
|
|
23978
23982
|
AnimateJsProvider.$inject = ["$animateProvider"];
|
|
23979
23983
|
function AnimateJsProvider($animateProvider) {
|
|
23980
23984
|
this.$get = [
|
|
23981
|
-
|
|
23985
|
+
$injectTokens.$injector,
|
|
23982
23986
|
"$$AnimateRunner",
|
|
23983
23987
|
/**
|
|
23984
23988
|
*
|
|
@@ -25836,20 +25840,6 @@
|
|
|
25836
25840
|
* ```
|
|
25837
25841
|
*/
|
|
25838
25842
|
const unnestR = (memo, elem) => memo.concat(elem);
|
|
25839
|
-
/**
|
|
25840
|
-
* Reduce function which recursively un-nests all arrays
|
|
25841
|
-
*
|
|
25842
|
-
* @example
|
|
25843
|
-
* ```
|
|
25844
|
-
*
|
|
25845
|
-
* let input = [ [ "a", "b" ], [ "c", "d" ], [ [ "double", "nested" ] ] ];
|
|
25846
|
-
* input.reduce(unnestR, []) // [ "a", "b", "c", "d", "double, "nested" ]
|
|
25847
|
-
* ```
|
|
25848
|
-
*/
|
|
25849
|
-
const flattenR = (memo, elem) =>
|
|
25850
|
-
Array.isArray(elem)
|
|
25851
|
-
? memo.concat(elem.reduce(flattenR, []))
|
|
25852
|
-
: pushR(memo, elem);
|
|
25853
25843
|
/**
|
|
25854
25844
|
* Reduce function that pushes an object to an array, then returns the array.
|
|
25855
25845
|
* Mostly just for [[flattenR]] and [[uniqR]]
|
|
@@ -27950,10 +27940,6 @@
|
|
|
27950
27940
|
return Promise.all(promises);
|
|
27951
27941
|
}
|
|
27952
27942
|
|
|
27953
|
-
injector() {
|
|
27954
|
-
return this._injector || (this._injector = new UIInjectorImpl());
|
|
27955
|
-
}
|
|
27956
|
-
|
|
27957
27943
|
findNode(resolvable) {
|
|
27958
27944
|
return find(this._path, (node) => node.resolvables.includes(resolvable));
|
|
27959
27945
|
}
|
|
@@ -27988,21 +27974,6 @@
|
|
|
27988
27974
|
}
|
|
27989
27975
|
}
|
|
27990
27976
|
|
|
27991
|
-
class UIInjectorImpl {
|
|
27992
|
-
constructor() {
|
|
27993
|
-
this.native = window["angular"].$injector;
|
|
27994
|
-
}
|
|
27995
|
-
get(token) {
|
|
27996
|
-
return window["angular"].$injector.get(token);
|
|
27997
|
-
}
|
|
27998
|
-
getAsync(token) {
|
|
27999
|
-
return Promise.resolve(window["angular"].$injector.get(token));
|
|
28000
|
-
}
|
|
28001
|
-
getNative(token) {
|
|
28002
|
-
return window["angular"].$injector.get(token);
|
|
28003
|
-
}
|
|
28004
|
-
}
|
|
28005
|
-
|
|
28006
27977
|
function getViewConfigFactory() {
|
|
28007
27978
|
let templateFactory = null;
|
|
28008
27979
|
return (path, view) => {
|
|
@@ -29704,90 +29675,7 @@
|
|
|
29704
29675
|
.reduce((acc, obj) => ({ ...acc, ...obj }), {}),
|
|
29705
29676
|
);
|
|
29706
29677
|
}
|
|
29707
|
-
|
|
29708
|
-
const fromParams = this.params("from");
|
|
29709
|
-
const toParams = this.params("to");
|
|
29710
|
-
// All the parameters declared on both the "to" and "from" paths
|
|
29711
|
-
const allParamDescriptors = []
|
|
29712
|
-
.concat(this._treeChanges.to)
|
|
29713
|
-
.concat(this._treeChanges.from)
|
|
29714
|
-
.map((pathNode) => pathNode.paramSchema)
|
|
29715
|
-
.reduce(flattenR, [])
|
|
29716
|
-
.reduce(uniqR, []);
|
|
29717
|
-
const changedParamDescriptors = Param.changed(
|
|
29718
|
-
allParamDescriptors,
|
|
29719
|
-
fromParams,
|
|
29720
|
-
toParams,
|
|
29721
|
-
);
|
|
29722
|
-
return changedParamDescriptors.reduce((changedValues, descriptor) => {
|
|
29723
|
-
changedValues[descriptor.id] = toParams[descriptor.id];
|
|
29724
|
-
return changedValues;
|
|
29725
|
-
}, {});
|
|
29726
|
-
}
|
|
29727
|
-
/**
|
|
29728
|
-
* Creates a [[UIInjector]] Dependency Injector
|
|
29729
|
-
*
|
|
29730
|
-
* Returns a Dependency Injector for the Transition's target state (to state).
|
|
29731
|
-
* The injector provides resolve values which the target state has access to.
|
|
29732
|
-
*
|
|
29733
|
-
* The `UIInjector` can also provide values from the native root/global injector (ng1/ng2).
|
|
29734
|
-
*
|
|
29735
|
-
* #### Example:
|
|
29736
|
-
* ```js
|
|
29737
|
-
* .onEnter({ entering: 'myState' }, trans => {
|
|
29738
|
-
* var myResolveValue = trans.injector().get('myResolve');
|
|
29739
|
-
* // Inject a global service from the global/native injector (if it exists)
|
|
29740
|
-
* var MyService = trans.injector().get('MyService');
|
|
29741
|
-
* })
|
|
29742
|
-
* ```
|
|
29743
|
-
*
|
|
29744
|
-
* In some cases (such as `onBefore`), you may need access to some resolve data but it has not yet been fetched.
|
|
29745
|
-
* You can use [[UIInjector.getAsync]] to get a promise for the data.
|
|
29746
|
-
* #### Example:
|
|
29747
|
-
* ```js
|
|
29748
|
-
* .onBefore({}, trans => {
|
|
29749
|
-
* return trans.injector().getAsync('myResolve').then(myResolveValue =>
|
|
29750
|
-
* return myResolveValue !== 'ABORT';
|
|
29751
|
-
* });
|
|
29752
|
-
* });
|
|
29753
|
-
* ```
|
|
29754
|
-
*
|
|
29755
|
-
* If a `state` is provided, the injector that is returned will be limited to resolve values that the provided state has access to.
|
|
29756
|
-
* This can be useful if both a parent state `foo` and a child state `foo.bar` have both defined a resolve such as `data`.
|
|
29757
|
-
* #### Example:
|
|
29758
|
-
* ```js
|
|
29759
|
-
* .onEnter({ to: 'foo.bar' }, trans => {
|
|
29760
|
-
* // returns result of `foo` state's `myResolve` resolve
|
|
29761
|
-
* // even though `foo.bar` also has a `myResolve` resolve
|
|
29762
|
-
* var fooData = trans.injector('foo').get('myResolve');
|
|
29763
|
-
* });
|
|
29764
|
-
* ```
|
|
29765
|
-
*
|
|
29766
|
-
* If you need resolve data from the exiting states, pass `'from'` as `pathName`.
|
|
29767
|
-
* The resolve data from the `from` path will be returned.
|
|
29768
|
-
* #### Example:
|
|
29769
|
-
* ```js
|
|
29770
|
-
* .onExit({ exiting: 'foo.bar' }, trans => {
|
|
29771
|
-
* // Gets the resolve value of `myResolve` from the state being exited
|
|
29772
|
-
* var fooData = trans.injector(null, 'from').get('myResolve');
|
|
29773
|
-
* });
|
|
29774
|
-
* ```
|
|
29775
|
-
*
|
|
29776
|
-
*
|
|
29777
|
-
* @param state Limits the resolves provided to only the resolves the provided state has access to.
|
|
29778
|
-
* @param pathName Default: `'to'`: Chooses the path for which to create the injector. Use this to access resolves for `exiting` states.
|
|
29779
|
-
*
|
|
29780
|
-
* @returns a [[UIInjector]]
|
|
29781
|
-
*/
|
|
29782
|
-
injector(state, pathName = "to") {
|
|
29783
|
-
let path = this._treeChanges[pathName];
|
|
29784
|
-
if (state)
|
|
29785
|
-
path = PathUtils.subPath(
|
|
29786
|
-
path,
|
|
29787
|
-
(node) => node.state === state || node.state.name === state,
|
|
29788
|
-
);
|
|
29789
|
-
return new ResolveContext(path).injector();
|
|
29790
|
-
}
|
|
29678
|
+
|
|
29791
29679
|
/**
|
|
29792
29680
|
* Gets all available resolve tokens (keys)
|
|
29793
29681
|
*
|
|
@@ -31020,19 +30908,20 @@
|
|
|
31020
30908
|
return this.globals.$current;
|
|
31021
30909
|
}
|
|
31022
30910
|
|
|
31023
|
-
|
|
30911
|
+
static $inject = ["$routerProvider", "$transitionsProvider"];
|
|
31024
30912
|
|
|
31025
|
-
// Needs access to urlService, stateRegistry
|
|
31026
30913
|
/**
|
|
31027
30914
|
*
|
|
31028
30915
|
* @param {import('../router.js').Router} globals
|
|
31029
30916
|
* @param {*} transitionService
|
|
30917
|
+
* @param {import('../../core/di/internal-injector.js').InjectorService} $injector
|
|
31030
30918
|
*/
|
|
31031
|
-
constructor(globals, transitionService) {
|
|
30919
|
+
constructor(globals, transitionService, $injector) {
|
|
31032
30920
|
this.stateRegistry = undefined;
|
|
31033
30921
|
this.urlService = undefined;
|
|
31034
30922
|
this.globals = globals;
|
|
31035
30923
|
this.transitionService = transitionService;
|
|
30924
|
+
this.$injector = $injector;
|
|
31036
30925
|
this.invalidCallbacks = [];
|
|
31037
30926
|
|
|
31038
30927
|
this._defaultErrorHandler = function $defaultErrorHandler($error$) {
|
|
@@ -31189,7 +31078,7 @@
|
|
|
31189
31078
|
const latest = latestThing();
|
|
31190
31079
|
/** @type {Queue<Function>} */
|
|
31191
31080
|
const callbackQueue = new Queue(this.invalidCallbacks.slice());
|
|
31192
|
-
const injector =
|
|
31081
|
+
const injector = this.$injector;
|
|
31193
31082
|
const checkForRedirect = (result) => {
|
|
31194
31083
|
if (!(result instanceof TargetState)) {
|
|
31195
31084
|
return;
|
|
@@ -34117,12 +34006,7 @@
|
|
|
34117
34006
|
*
|
|
34118
34007
|
*/
|
|
34119
34008
|
class StateRegistryProvider {
|
|
34120
|
-
|
|
34121
|
-
$injectTokens.$url,
|
|
34122
|
-
$injectTokens.$state,
|
|
34123
|
-
$injectTokens.$router,
|
|
34124
|
-
$injectTokens.$view,
|
|
34125
|
-
]);
|
|
34009
|
+
static $inject = provider([$injectTokens.$url, $injectTokens.$state, $injectTokens.$router, $injectTokens.$view]);
|
|
34126
34010
|
|
|
34127
34011
|
/**
|
|
34128
34012
|
* @param urlService
|
|
@@ -34161,11 +34045,9 @@
|
|
|
34161
34045
|
globals.current = globals.$current.self;
|
|
34162
34046
|
}
|
|
34163
34047
|
|
|
34164
|
-
/** @type {import('../../interface.ts').AnnotatedFactory} */
|
|
34165
34048
|
$get = [
|
|
34166
|
-
|
|
34049
|
+
$injectTokens.$injector,
|
|
34167
34050
|
/**
|
|
34168
|
-
*
|
|
34169
34051
|
* @param {import("../../core/di/internal-injector").InjectorService} $injector
|
|
34170
34052
|
* @returns {StateRegistryProvider}
|
|
34171
34053
|
*/
|
|
@@ -35826,7 +35708,7 @@
|
|
|
35826
35708
|
/**
|
|
35827
35709
|
* @type {string} `version` from `package.json`
|
|
35828
35710
|
*/
|
|
35829
|
-
this.version = "0.
|
|
35711
|
+
this.version = "0.9.1"; //inserted via rollup plugin
|
|
35830
35712
|
|
|
35831
35713
|
/** @type {!Array<string|any>} */
|
|
35832
35714
|
this.bootsrappedModules = [];
|