@abp/ng.core 5.0.1 → 5.0.2
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/README.md +3 -3
- package/abp-ng.core.d.ts +5 -5
- package/bundles/abp-ng.core-locale.umd.js +361 -361
- package/bundles/abp-ng.core-locale.umd.js.map +1 -1
- package/bundles/abp-ng.core-testing.umd.js +442 -442
- package/bundles/abp-ng.core-testing.umd.js.map +1 -1
- package/bundles/abp-ng.core.umd.js +4873 -4868
- package/bundles/abp-ng.core.umd.js.map +1 -1
- package/esm2015/abp-ng.core.js +4 -4
- package/esm2015/lib/abstracts/index.js +2 -2
- package/esm2015/lib/abstracts/ng-model.component.js +59 -59
- package/esm2015/lib/components/dynamic-layout.component.js +89 -89
- package/esm2015/lib/components/index.js +4 -4
- package/esm2015/lib/components/replaceable-route-container.component.js +42 -42
- package/esm2015/lib/components/router-outlet.component.js +15 -15
- package/esm2015/lib/constants/different-locales.js +337 -337
- package/esm2015/lib/constants/index.js +2 -2
- package/esm2015/lib/core.module.js +281 -281
- package/esm2015/lib/directives/autofocus.directive.js +30 -30
- package/esm2015/lib/directives/debounce.directive.js +36 -36
- package/esm2015/lib/directives/for.directive.js +151 -151
- package/esm2015/lib/directives/form-submit.directive.js +69 -69
- package/esm2015/lib/directives/index.js +9 -9
- package/esm2015/lib/directives/init.directive.js +21 -21
- package/esm2015/lib/directives/permission.directive.js +48 -48
- package/esm2015/lib/directives/replaceable-template.directive.js +121 -121
- package/esm2015/lib/directives/stop-propagation.directive.js +32 -32
- package/esm2015/lib/enums/common.js +2 -2
- package/esm2015/lib/enums/index.js +2 -2
- package/esm2015/lib/guards/auth.guard.js +29 -29
- package/esm2015/lib/guards/index.js +3 -3
- package/esm2015/lib/guards/permission.guard.js +44 -44
- package/esm2015/lib/handlers/oauth-configuration.handler.js +37 -37
- package/esm2015/lib/handlers/routes.handler.js +47 -47
- package/esm2015/lib/interceptors/api.interceptor.js +54 -54
- package/esm2015/lib/interceptors/index.js +2 -2
- package/esm2015/lib/localization.module.js +16 -16
- package/esm2015/lib/models/auth.js +2 -2
- package/esm2015/lib/models/common.js +2 -2
- package/esm2015/lib/models/dtos.js +119 -119
- package/esm2015/lib/models/environment.js +2 -2
- package/esm2015/lib/models/index.js +10 -10
- package/esm2015/lib/models/localization.js +2 -2
- package/esm2015/lib/models/replaceable-components.js +2 -2
- package/esm2015/lib/models/rest.js +2 -2
- package/esm2015/lib/models/session.js +2 -2
- package/esm2015/lib/models/utility.js +2 -2
- package/esm2015/lib/pipes/index.js +3 -3
- package/esm2015/lib/pipes/localization.pipe.js +33 -33
- package/esm2015/lib/pipes/sort.pipe.js +49 -49
- package/esm2015/lib/providers/cookie-language.provider.js +22 -22
- package/esm2015/lib/providers/locale.provider.js +22 -22
- package/esm2015/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.js +29 -29
- package/esm2015/lib/proxy/pages/abp/multi-tenancy/index.js +2 -2
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.js +24 -24
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/index.js +2 -2
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.js +25 -25
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.js +5 -5
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/models.js +2 -2
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/index.js +2 -2
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/models.js +3 -3
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/index.js +2 -2
- package/esm2015/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models.js +2 -2
- package/esm2015/lib/proxy/volo/abp/http/modeling/index.js +2 -2
- package/esm2015/lib/proxy/volo/abp/http/modeling/models.js +3 -3
- package/esm2015/lib/proxy/volo/abp/localization/index.js +2 -2
- package/esm2015/lib/proxy/volo/abp/localization/models.js +2 -2
- package/esm2015/lib/proxy/volo/abp/models.js +2 -2
- package/esm2015/lib/services/auth.service.js +47 -47
- package/esm2015/lib/services/config-state.service.js +130 -130
- package/esm2015/lib/services/content-projection.service.js +17 -17
- package/esm2015/lib/services/dom-insertion.service.js +32 -32
- package/esm2015/lib/services/environment.service.js +35 -35
- package/esm2015/lib/services/http-error-reporter.service.js +29 -29
- package/esm2015/lib/services/http-wait.service.js +72 -72
- package/esm2015/lib/services/index.js +22 -22
- package/esm2015/lib/services/lazy-load.service.js +38 -38
- package/esm2015/lib/services/list.service.js +103 -103
- package/esm2015/lib/services/localization.service.js +182 -182
- package/esm2015/lib/services/multi-tenancy.service.js +48 -48
- package/esm2015/lib/services/permission.service.js +64 -64
- package/esm2015/lib/services/replaceable-components.service.js +49 -49
- package/esm2015/lib/services/resource-wait.service.js +39 -39
- package/esm2015/lib/services/rest.service.js +63 -63
- package/esm2015/lib/services/router-events.service.js +38 -38
- package/esm2015/lib/services/router-wait.service.js +51 -51
- package/esm2015/lib/services/routes.service.js +147 -147
- package/esm2015/lib/services/session-state.service.js +76 -76
- package/esm2015/lib/services/subscription.service.js +41 -41
- package/esm2015/lib/services/track-by.service.js +21 -21
- package/esm2015/lib/strategies/auth-flow.strategy.js +202 -202
- package/esm2015/lib/strategies/container.strategy.js +38 -38
- package/esm2015/lib/strategies/content-security.strategy.js +28 -28
- package/esm2015/lib/strategies/content.strategy.js +48 -48
- package/esm2015/lib/strategies/context.strategy.js +37 -37
- package/esm2015/lib/strategies/cross-origin.strategy.js +26 -26
- package/esm2015/lib/strategies/dom.strategy.js +27 -27
- package/esm2015/lib/strategies/index.js +9 -9
- package/esm2015/lib/strategies/loading.strategy.js +58 -58
- package/esm2015/lib/strategies/projection.strategy.js +80 -80
- package/esm2015/lib/tokens/app-config.token.js +3 -3
- package/esm2015/lib/tokens/cookie-language-key.token.js +5 -5
- package/esm2015/lib/tokens/index.js +9 -9
- package/esm2015/lib/tokens/list.token.js +3 -3
- package/esm2015/lib/tokens/localization.token.js +10 -10
- package/esm2015/lib/tokens/lodaer-delay.token.js +3 -3
- package/esm2015/lib/tokens/manage-profile.token.js +12 -12
- package/esm2015/lib/tokens/options.token.js +8 -8
- package/esm2015/lib/tokens/tenant-key.token.js +3 -3
- package/esm2015/lib/utils/array-utils.js +7 -7
- package/esm2015/lib/utils/auth-utils.js +42 -42
- package/esm2015/lib/utils/common-utils.js +29 -29
- package/esm2015/lib/utils/date-extensions.js +6 -6
- package/esm2015/lib/utils/date-utils.js +13 -13
- package/esm2015/lib/utils/environment-utils.js +36 -36
- package/esm2015/lib/utils/factory-utils.js +24 -24
- package/esm2015/lib/utils/file-utils.js +14 -14
- package/esm2015/lib/utils/form-utils.js +12 -12
- package/esm2015/lib/utils/generator-utils.js +34 -34
- package/esm2015/lib/utils/http-utils.js +19 -19
- package/esm2015/lib/utils/index.js +21 -21
- package/esm2015/lib/utils/initial-utils.js +64 -64
- package/esm2015/lib/utils/internal-store-utils.js +36 -36
- package/esm2015/lib/utils/lazy-load-utils.js +40 -40
- package/esm2015/lib/utils/localization-utils.js +50 -50
- package/esm2015/lib/utils/multi-tenancy-utils.js +83 -83
- package/esm2015/lib/utils/number-utils.js +4 -4
- package/esm2015/lib/utils/object-utils.js +37 -37
- package/esm2015/lib/utils/route-utils.js +27 -27
- package/esm2015/lib/utils/string-utils.js +25 -21
- package/esm2015/lib/utils/tree-utils.js +54 -54
- package/esm2015/lib/validators/age.validator.js +14 -14
- package/esm2015/lib/validators/credit-card.validator.js +21 -21
- package/esm2015/lib/validators/index.js +23 -23
- package/esm2015/lib/validators/range.validator.js +15 -15
- package/esm2015/lib/validators/required.validator.js +13 -13
- package/esm2015/lib/validators/string-length.validator.js +15 -15
- package/esm2015/lib/validators/url.validator.js +16 -16
- package/esm2015/locale/abp-ng.core-locale.js +4 -4
- package/esm2015/locale/public-api.js +2 -2
- package/esm2015/locale/utils/register-locale.js +43 -43
- package/esm2015/public-api.js +26 -26
- package/esm2015/testing/abp-ng.core-testing.js +4 -4
- package/esm2015/testing/lib/core-testing.module.js +62 -62
- package/esm2015/testing/lib/services/index.js +3 -3
- package/esm2015/testing/lib/services/mock-permission.service.js +35 -35
- package/esm2015/testing/lib/services/mock-rest.service.js +30 -30
- package/esm2015/testing/lib/utils/clear-page.util.js +10 -10
- package/esm2015/testing/lib/utils/index.js +3 -3
- package/esm2015/testing/lib/utils/wait.util.js +5 -5
- package/esm2015/testing/public-api.js +4 -4
- package/fesm2015/abp-ng.core-locale.js +40 -40
- package/fesm2015/abp-ng.core-locale.js.map +1 -1
- package/fesm2015/abp-ng.core-testing.js +113 -113
- package/fesm2015/abp-ng.core-testing.js.map +1 -1
- package/fesm2015/abp-ng.core.js +3979 -3975
- package/fesm2015/abp-ng.core.js.map +1 -1
- package/lib/abstracts/index.d.ts +1 -1
- package/lib/abstracts/ng-model.component.d.ts +25 -25
- package/lib/components/dynamic-layout.component.d.ts +27 -27
- package/lib/components/index.d.ts +3 -3
- package/lib/components/replaceable-route-container.component.d.ts +17 -17
- package/lib/components/router-outlet.component.d.ts +5 -5
- package/lib/constants/different-locales.d.ts +334 -334
- package/lib/constants/index.d.ts +1 -1
- package/lib/core.module.d.ts +56 -56
- package/lib/directives/autofocus.directive.d.ts +12 -12
- package/lib/directives/debounce.directive.d.ts +13 -13
- package/lib/directives/for.directive.d.ts +36 -36
- package/lib/directives/form-submit.directive.d.ts +19 -19
- package/lib/directives/index.d.ts +8 -8
- package/lib/directives/init.directive.d.ts +10 -10
- package/lib/directives/permission.directive.d.ts +18 -18
- package/lib/directives/replaceable-template.directive.d.ts +30 -30
- package/lib/directives/stop-propagation.directive.d.ts +12 -12
- package/lib/enums/common.d.ts +5 -5
- package/lib/enums/index.d.ts +1 -1
- package/lib/guards/auth.guard.d.ts +13 -13
- package/lib/guards/index.d.ts +2 -2
- package/lib/guards/permission.guard.d.ts +16 -16
- package/lib/handlers/oauth-configuration.handler.d.ts +13 -13
- package/lib/handlers/routes.handler.d.ts +11 -11
- package/lib/interceptors/api.interceptor.d.ts +16 -16
- package/lib/interceptors/index.d.ts +1 -1
- package/lib/localization.module.d.ts +7 -7
- package/lib/models/auth.d.ts +6 -6
- package/lib/models/common.d.ts +77 -77
- package/lib/models/dtos.d.ts +95 -95
- package/lib/models/environment.d.ts +35 -35
- package/lib/models/index.d.ts +9 -9
- package/lib/models/localization.d.ts +5 -5
- package/lib/models/replaceable-components.d.ts +45 -45
- package/lib/models/rest.d.ts +35 -35
- package/lib/models/session.d.ts +7 -7
- package/lib/models/utility.d.ts +14 -14
- package/lib/pipes/index.d.ts +2 -2
- package/lib/pipes/localization.pipe.d.ts +12 -12
- package/lib/pipes/sort.pipe.d.ts +9 -9
- package/lib/providers/cookie-language.provider.d.ts +3 -3
- package/lib/providers/locale.provider.d.ts +9 -9
- package/lib/proxy/pages/abp/multi-tenancy/abp-tenant.service.d.ts +12 -12
- package/lib/proxy/pages/abp/multi-tenancy/index.d.ts +1 -1
- package/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/abp-api-definition.service.d.ts +11 -11
- package/lib/proxy/volo/abp/asp-net-core/mvc/api-exploring/index.d.ts +1 -1
- package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/abp-application-configuration.service.d.ts +11 -11
- package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.d.ts +4 -4
- package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/models.d.ts +85 -85
- package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/index.d.ts +1 -1
- package/lib/proxy/volo/abp/asp-net-core/mvc/application-configurations/object-extending/models.d.ts +71 -71
- package/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/index.d.ts +1 -1
- package/lib/proxy/volo/abp/asp-net-core/mvc/multi-tenancy/models.d.ts +14 -14
- package/lib/proxy/volo/abp/http/modeling/index.d.ts +1 -1
- package/lib/proxy/volo/abp/http/modeling/models.d.ts +70 -70
- package/lib/proxy/volo/abp/localization/index.d.ts +1 -1
- package/lib/proxy/volo/abp/localization/models.d.ts +6 -6
- package/lib/proxy/volo/abp/models.d.ts +4 -4
- package/lib/services/auth.service.d.ts +17 -17
- package/lib/services/config-state.service.d.ts +339 -339
- package/lib/services/content-projection.service.d.ts +10 -10
- package/lib/services/dom-insertion.service.d.ts +10 -10
- package/lib/services/environment.service.d.ts +96 -96
- package/lib/services/http-error-reporter.service.d.ts +12 -12
- package/lib/services/http-wait.service.d.ts +30 -30
- package/lib/services/index.d.ts +21 -21
- package/lib/services/lazy-load.service.d.ts +13 -13
- package/lib/services/list.service.d.ts +39 -39
- package/lib/services/localization.service.d.ts +47 -47
- package/lib/services/multi-tenancy.service.d.ts +22 -22
- package/lib/services/permission.service.d.ts +19 -19
- package/lib/services/replaceable-components.service.d.ts +19 -19
- package/lib/services/resource-wait.service.d.ts +15 -15
- package/lib/services/rest.service.d.ts +20 -20
- package/lib/services/router-events.service.d.ts +29 -29
- package/lib/services/router-wait.service.d.ts +20 -20
- package/lib/services/routes.service.d.ts +50 -50
- package/lib/services/session-state.service.d.ts +25 -25
- package/lib/services/subscription.service.d.ts +17 -17
- package/lib/services/track-by.service.d.ts +11 -11
- package/lib/strategies/auth-flow.strategy.d.ts +367 -367
- package/lib/strategies/container.strategy.d.ts +22 -22
- package/lib/strategies/content-security.strategy.d.ts +17 -17
- package/lib/strategies/content.strategy.d.ts +26 -26
- package/lib/strategies/context.strategy.d.ts +23 -23
- package/lib/strategies/cross-origin.strategy.d.ts +14 -14
- package/lib/strategies/dom.strategy.d.ts +13 -13
- package/lib/strategies/index.d.ts +8 -8
- package/lib/strategies/loading.strategy.d.ts +28 -28
- package/lib/strategies/projection.strategy.d.ts +39 -39
- package/lib/tokens/app-config.token.d.ts +3 -3
- package/lib/tokens/cookie-language-key.token.d.ts +2 -2
- package/lib/tokens/index.d.ts +8 -8
- package/lib/tokens/list.token.d.ts +2 -2
- package/lib/tokens/localization.token.d.ts +6 -6
- package/lib/tokens/lodaer-delay.token.d.ts +2 -2
- package/lib/tokens/manage-profile.token.d.ts +2 -2
- package/lib/tokens/options.token.d.ts +4 -4
- package/lib/tokens/tenant-key.token.d.ts +2 -2
- package/lib/utils/array-utils.d.ts +1 -1
- package/lib/utils/auth-utils.d.ts +162 -162
- package/lib/utils/common-utils.d.ts +9 -9
- package/lib/utils/date-extensions.d.ts +6 -6
- package/lib/utils/date-utils.d.ts +4 -4
- package/lib/utils/environment-utils.d.ts +3 -3
- package/lib/utils/factory-utils.d.ts +9 -9
- package/lib/utils/file-utils.d.ts +1 -1
- package/lib/utils/form-utils.d.ts +2 -2
- package/lib/utils/generator-utils.d.ts +3 -3
- package/lib/utils/http-utils.d.ts +8 -8
- package/lib/utils/index.d.ts +20 -20
- package/lib/utils/initial-utils.d.ts +159 -159
- package/lib/utils/internal-store-utils.d.ts +14 -14
- package/lib/utils/lazy-load-utils.d.ts +4 -4
- package/lib/utils/localization-utils.d.ts +5 -5
- package/lib/utils/multi-tenancy-utils.d.ts +3 -3
- package/lib/utils/number-utils.d.ts +1 -1
- package/lib/utils/object-utils.d.ts +1 -1
- package/lib/utils/route-utils.d.ts +8 -8
- package/lib/utils/string-utils.d.ts +3 -2
- package/lib/utils/tree-utils.d.ts +19 -19
- package/lib/validators/age.validator.d.ts +10 -10
- package/lib/validators/credit-card.validator.d.ts +5 -5
- package/lib/validators/index.d.ts +22 -22
- package/lib/validators/range.validator.d.ts +12 -12
- package/lib/validators/required.validator.d.ts +8 -8
- package/lib/validators/string-length.validator.d.ts +14 -14
- package/lib/validators/url.validator.d.ts +5 -5
- package/locale/abp-ng.core-locale.d.ts +5 -5
- package/locale/public-api.d.ts +1 -1
- package/locale/utils/register-locale.d.ts +13 -13
- package/package.json +2 -2
- package/public-api.d.ts +24 -24
- package/testing/abp-ng.core-testing.d.ts +5 -5
- package/testing/lib/core-testing.module.d.ts +16 -16
- package/testing/lib/services/index.d.ts +2 -2
- package/testing/lib/services/mock-permission.service.d.ts +10 -10
- package/testing/lib/services/mock-rest.service.d.ts +13 -13
- package/testing/lib/utils/clear-page.util.d.ts +2 -2
- package/testing/lib/utils/index.d.ts +2 -2
- package/testing/lib/utils/wait.util.d.ts +2 -2
- package/testing/public-api.d.ts +3 -3
|
@@ -2,48 +2,48 @@ import { __awaiter } from 'tslib';
|
|
|
2
2
|
import { differentLocales } from '@abp/ng.core';
|
|
3
3
|
import { isDevMode } from '@angular/core';
|
|
4
4
|
|
|
5
|
-
let localeMap = {};
|
|
6
|
-
function registerLocale({ cultureNameLocaleFileMap = {}, errorHandlerFn = defaultLocalErrorHandlerFn, } = {}) {
|
|
7
|
-
return (locale) => {
|
|
8
|
-
localeMap = Object.assign(Object.assign({}, differentLocales), cultureNameLocaleFileMap);
|
|
9
|
-
return new Promise((resolve, reject) => {
|
|
10
|
-
return import(
|
|
11
|
-
/* webpackMode: "lazy-once" */
|
|
12
|
-
/* webpackChunkName: "locales"*/
|
|
13
|
-
/* webpackInclude: /[/\\](ar|cs|en|en-GB|es|de|fi|fr|hi|hu|is|it|pt|tr|ru|ro|sk|sl|zh-Hans|zh-Hant).js/ */
|
|
14
|
-
/* webpackExclude: /[/\\]global|extra/ */
|
|
15
|
-
`@angular/common/locales/${localeMap[locale] || locale}.js`)
|
|
16
|
-
.then(resolve)
|
|
17
|
-
.catch(error => {
|
|
18
|
-
errorHandlerFn({
|
|
19
|
-
resolve,
|
|
20
|
-
reject,
|
|
21
|
-
error,
|
|
22
|
-
locale,
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
});
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const extraLocales = {};
|
|
29
|
-
function storeLocaleData(data, localeId) {
|
|
30
|
-
extraLocales[localeId] = data;
|
|
31
|
-
}
|
|
32
|
-
function defaultLocalErrorHandlerFn({ locale, resolve }) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (extraLocales[locale]) {
|
|
35
|
-
resolve({ default: extraLocales[localeMap[locale] || locale] });
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (isDevMode) {
|
|
39
|
-
console.error(`Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-a-new-culture`);
|
|
40
|
-
}
|
|
41
|
-
resolve();
|
|
42
|
-
});
|
|
5
|
+
let localeMap = {};
|
|
6
|
+
function registerLocale({ cultureNameLocaleFileMap = {}, errorHandlerFn = defaultLocalErrorHandlerFn, } = {}) {
|
|
7
|
+
return (locale) => {
|
|
8
|
+
localeMap = Object.assign(Object.assign({}, differentLocales), cultureNameLocaleFileMap);
|
|
9
|
+
return new Promise((resolve, reject) => {
|
|
10
|
+
return import(
|
|
11
|
+
/* webpackMode: "lazy-once" */
|
|
12
|
+
/* webpackChunkName: "locales"*/
|
|
13
|
+
/* webpackInclude: /[/\\](ar|cs|en|en-GB|es|de|fi|fr|hi|hu|is|it|pt|tr|ru|ro|sk|sl|zh-Hans|zh-Hant).js/ */
|
|
14
|
+
/* webpackExclude: /[/\\]global|extra/ */
|
|
15
|
+
`@angular/common/locales/${localeMap[locale] || locale}.js`)
|
|
16
|
+
.then(resolve)
|
|
17
|
+
.catch(error => {
|
|
18
|
+
errorHandlerFn({
|
|
19
|
+
resolve,
|
|
20
|
+
reject,
|
|
21
|
+
error,
|
|
22
|
+
locale,
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
const extraLocales = {};
|
|
29
|
+
function storeLocaleData(data, localeId) {
|
|
30
|
+
extraLocales[localeId] = data;
|
|
31
|
+
}
|
|
32
|
+
function defaultLocalErrorHandlerFn({ locale, resolve }) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (extraLocales[locale]) {
|
|
35
|
+
resolve({ default: extraLocales[localeMap[locale] || locale] });
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
if (isDevMode) {
|
|
39
|
+
console.error(`Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-a-new-culture`);
|
|
40
|
+
}
|
|
41
|
+
resolve();
|
|
42
|
+
});
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
/**
|
|
46
|
-
* Generated bundle index. Do not edit.
|
|
45
|
+
/**
|
|
46
|
+
* Generated bundle index. Do not edit.
|
|
47
47
|
*/
|
|
48
48
|
|
|
49
49
|
export { defaultLocalErrorHandlerFn, registerLocale, storeLocaleData };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abp-ng.core-locale.js","sources":["../../../../packages/core/locale/src/utils/register-locale.ts","../../../../packages/core/locale/src/abp-ng.core-locale.ts"],"sourcesContent":["import { differentLocales } from '@abp/ng.core';\
|
|
1
|
+
{"version":3,"file":"abp-ng.core-locale.js","sources":["../../../../packages/core/locale/src/utils/register-locale.ts","../../../../packages/core/locale/src/abp-ng.core-locale.ts"],"sourcesContent":["import { differentLocales } from '@abp/ng.core';\nimport { isDevMode } from '@angular/core';\n\nexport interface LocaleErrorHandlerData {\n resolve: any;\n reject: any;\n error: any;\n locale: string;\n}\n\nlet localeMap = {};\n\nexport interface RegisterLocaleData {\n cultureNameLocaleFileMap?: Record<string, string>;\n errorHandlerFn?: (data: LocaleErrorHandlerData) => any;\n}\n\nexport function registerLocale(\n {\n cultureNameLocaleFileMap = {},\n errorHandlerFn = defaultLocalErrorHandlerFn,\n } = {} as RegisterLocaleData,\n) {\n return (locale: string): Promise<any> => {\n localeMap = { ...differentLocales, ...cultureNameLocaleFileMap };\n\n return new Promise((resolve, reject) => {\n return import(\n /* webpackMode: \"lazy-once\" */\n /* webpackChunkName: \"locales\"*/\n /* webpackInclude: /[/\\\\](ar|cs|en|en-GB|es|de|fi|fr|hi|hu|is|it|pt|tr|ru|ro|sk|sl|zh-Hans|zh-Hant).js/ */\n /* webpackExclude: /[/\\\\]global|extra/ */\n `@angular/common/locales/${localeMap[locale] || locale}.js`\n )\n .then(resolve)\n .catch(error => {\n errorHandlerFn({\n resolve,\n reject,\n error,\n locale,\n });\n });\n });\n };\n}\n\nconst extraLocales = {};\nexport function storeLocaleData(data: any, localeId: string) {\n extraLocales[localeId] = data;\n}\n\nexport async function defaultLocalErrorHandlerFn({ locale, resolve }: LocaleErrorHandlerData) {\n if (extraLocales[locale]) {\n resolve({ default: extraLocales[localeMap[locale] || locale] });\n return;\n }\n\n if (isDevMode) {\n console.error(\n `Cannot find the ${locale} locale file. You can check how can add new culture at https://docs.abp.io/en/abp/latest/UI/Angular/Localization#adding-a-new-culture`,\n );\n }\n\n resolve();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAUA,IAAI,SAAS,GAAG,EAAE,CAAC;SAOH,cAAc,CAC5B,EACE,wBAAwB,GAAG,EAAE,EAC7B,cAAc,GAAG,0BAA0B,MACzC,EAAwB;IAE5B,OAAO,CAAC,MAAc;QACpB,SAAS,mCAAQ,gBAAgB,GAAK,wBAAwB,CAAE,CAAC;QAEjE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM;YACjC,OAAO;;;;;YAKL,2BAA2B,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,KAAK,CAC5D;iBACE,IAAI,CAAC,OAAO,CAAC;iBACb,KAAK,CAAC,KAAK;gBACV,cAAc,CAAC;oBACb,OAAO;oBACP,MAAM;oBACN,KAAK;oBACL,MAAM;iBACP,CAAC,CAAC;aACJ,CAAC,CAAC;SACN,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC;AAED,MAAM,YAAY,GAAG,EAAE,CAAC;SACR,eAAe,CAAC,IAAS,EAAE,QAAgB;IACzD,YAAY,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;AAChC,CAAC;SAEqB,0BAA0B,CAAC,EAAE,MAAM,EAAE,OAAO,EAA0B;;QAC1F,IAAI,YAAY,CAAC,MAAM,CAAC,EAAE;YACxB,OAAO,CAAC,EAAE,OAAO,EAAE,YAAY,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC;YAChE,OAAO;SACR;QAED,IAAI,SAAS,EAAE;YACb,OAAO,CAAC,KAAK,CACX,mBAAmB,MAAM,uIAAuI,CACjK,CAAC;SACH;QAED,OAAO,EAAE,CAAC;KACX;;;ACjED;;;;;;"}
|
|
@@ -10,129 +10,129 @@ import { RouterTestingModule } from '@angular/router/testing';
|
|
|
10
10
|
import * as i1$1 from '@angular/common/http';
|
|
11
11
|
import { throwError } from 'rxjs';
|
|
12
12
|
|
|
13
|
-
class MockPermissionService extends PermissionService {
|
|
14
|
-
constructor(configState) {
|
|
15
|
-
super(configState);
|
|
16
|
-
this.configState = configState;
|
|
17
|
-
this.grantAllPolicies();
|
|
18
|
-
}
|
|
19
|
-
grantAllPolicies() {
|
|
20
|
-
const grantedPolicies = new Proxy({}, {
|
|
21
|
-
get() {
|
|
22
|
-
return true;
|
|
23
|
-
},
|
|
24
|
-
});
|
|
25
|
-
this.configState['store'].deepPatch({ auth: { grantedPolicies } });
|
|
26
|
-
}
|
|
27
|
-
grantPolicies(keys) {
|
|
28
|
-
const grantedPolicies = keys.reduce((policies, key) => {
|
|
29
|
-
policies[key] = true;
|
|
30
|
-
return policies;
|
|
31
|
-
}, {});
|
|
32
|
-
this.configState['store'].deepPatch({ auth: { grantedPolicies } });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
MockPermissionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockPermissionService, deps: [{ token: i1.ConfigStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
-
MockPermissionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockPermissionService, providedIn: 'root' });
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockPermissionService, decorators: [{
|
|
38
|
-
type: Injectable,
|
|
39
|
-
args: [{
|
|
40
|
-
providedIn: 'root',
|
|
41
|
-
}]
|
|
13
|
+
class MockPermissionService extends PermissionService {
|
|
14
|
+
constructor(configState) {
|
|
15
|
+
super(configState);
|
|
16
|
+
this.configState = configState;
|
|
17
|
+
this.grantAllPolicies();
|
|
18
|
+
}
|
|
19
|
+
grantAllPolicies() {
|
|
20
|
+
const grantedPolicies = new Proxy({}, {
|
|
21
|
+
get() {
|
|
22
|
+
return true;
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
this.configState['store'].deepPatch({ auth: { grantedPolicies } });
|
|
26
|
+
}
|
|
27
|
+
grantPolicies(keys) {
|
|
28
|
+
const grantedPolicies = keys.reduce((policies, key) => {
|
|
29
|
+
policies[key] = true;
|
|
30
|
+
return policies;
|
|
31
|
+
}, {});
|
|
32
|
+
this.configState['store'].deepPatch({ auth: { grantedPolicies } });
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
MockPermissionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockPermissionService, deps: [{ token: i1.ConfigStateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
|
+
MockPermissionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockPermissionService, providedIn: 'root' });
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockPermissionService, decorators: [{
|
|
38
|
+
type: Injectable,
|
|
39
|
+
args: [{
|
|
40
|
+
providedIn: 'root',
|
|
41
|
+
}]
|
|
42
42
|
}], ctorParameters: function () { return [{ type: i1.ConfigStateService }]; } });
|
|
43
43
|
|
|
44
|
-
class MockRestService extends RestService {
|
|
45
|
-
constructor(options, http, environment) {
|
|
46
|
-
super(options, http, environment, null);
|
|
47
|
-
this.options = options;
|
|
48
|
-
this.http = http;
|
|
49
|
-
this.environment = environment;
|
|
50
|
-
}
|
|
51
|
-
handleError(err) {
|
|
52
|
-
return throwError(err);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
MockRestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockRestService, deps: [{ token: CORE_OPTIONS }, { token: i1$1.HttpClient }, { token: i1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
56
|
-
MockRestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockRestService, providedIn: 'root' });
|
|
57
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockRestService, decorators: [{
|
|
58
|
-
type: Injectable,
|
|
59
|
-
args: [{
|
|
60
|
-
providedIn: 'root',
|
|
61
|
-
}]
|
|
62
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
63
|
-
type: Inject,
|
|
64
|
-
args: [CORE_OPTIONS]
|
|
44
|
+
class MockRestService extends RestService {
|
|
45
|
+
constructor(options, http, environment) {
|
|
46
|
+
super(options, http, environment, null);
|
|
47
|
+
this.options = options;
|
|
48
|
+
this.http = http;
|
|
49
|
+
this.environment = environment;
|
|
50
|
+
}
|
|
51
|
+
handleError(err) {
|
|
52
|
+
return throwError(err);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
MockRestService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockRestService, deps: [{ token: CORE_OPTIONS }, { token: i1$1.HttpClient }, { token: i1.EnvironmentService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
56
|
+
MockRestService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockRestService, providedIn: 'root' });
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: MockRestService, decorators: [{
|
|
58
|
+
type: Injectable,
|
|
59
|
+
args: [{
|
|
60
|
+
providedIn: 'root',
|
|
61
|
+
}]
|
|
62
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
63
|
+
type: Inject,
|
|
64
|
+
args: [CORE_OPTIONS]
|
|
65
65
|
}] }, { type: i1$1.HttpClient }, { type: i1.EnvironmentService }]; } });
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* CoreTestingModule is the module that will be used in tests
|
|
69
|
-
* and it provides mock alternatives
|
|
70
|
-
*/
|
|
71
|
-
class CoreTestingModule {
|
|
72
|
-
static withConfig(_a = {}) {
|
|
73
|
-
var { baseHref = '/', listQueryDebounceTime = 0, routes = [] } = _a, options = __rest(_a, ["baseHref", "listQueryDebounceTime", "routes"]);
|
|
74
|
-
return {
|
|
75
|
-
ngModule: CoreTestingModule,
|
|
76
|
-
providers: [
|
|
77
|
-
{ provide: APP_BASE_HREF, useValue: baseHref },
|
|
78
|
-
{
|
|
79
|
-
provide: 'CORE_OPTIONS',
|
|
80
|
-
useValue: Object.assign({ skipGetAppConfiguration: true }, options),
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
provide: CORE_OPTIONS,
|
|
84
|
-
useFactory: coreOptionsFactory,
|
|
85
|
-
deps: ['CORE_OPTIONS'],
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
provide: LIST_QUERY_DEBOUNCE_TIME,
|
|
89
|
-
useValue: listQueryDebounceTime,
|
|
90
|
-
},
|
|
91
|
-
{
|
|
92
|
-
provide: PermissionService,
|
|
93
|
-
useClass: MockPermissionService,
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
provide: RestService,
|
|
97
|
-
useClass: MockRestService,
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
provide: LOADER_DELAY,
|
|
101
|
-
useValue: 0,
|
|
102
|
-
},
|
|
103
|
-
provideRoutes(routes),
|
|
104
|
-
],
|
|
105
|
-
};
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
CoreTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
109
|
-
CoreTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, imports: [NoopAnimationsModule, RouterTestingModule, BaseCoreModule], exports: [RouterTestingModule, BaseCoreModule] });
|
|
110
|
-
CoreTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, imports: [[NoopAnimationsModule, RouterTestingModule, BaseCoreModule], RouterTestingModule, BaseCoreModule] });
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, decorators: [{
|
|
112
|
-
type: NgModule,
|
|
113
|
-
args: [{
|
|
114
|
-
exports: [RouterTestingModule, BaseCoreModule],
|
|
115
|
-
imports: [NoopAnimationsModule, RouterTestingModule, BaseCoreModule],
|
|
116
|
-
}]
|
|
67
|
+
/**
|
|
68
|
+
* CoreTestingModule is the module that will be used in tests
|
|
69
|
+
* and it provides mock alternatives
|
|
70
|
+
*/
|
|
71
|
+
class CoreTestingModule {
|
|
72
|
+
static withConfig(_a = {}) {
|
|
73
|
+
var { baseHref = '/', listQueryDebounceTime = 0, routes = [] } = _a, options = __rest(_a, ["baseHref", "listQueryDebounceTime", "routes"]);
|
|
74
|
+
return {
|
|
75
|
+
ngModule: CoreTestingModule,
|
|
76
|
+
providers: [
|
|
77
|
+
{ provide: APP_BASE_HREF, useValue: baseHref },
|
|
78
|
+
{
|
|
79
|
+
provide: 'CORE_OPTIONS',
|
|
80
|
+
useValue: Object.assign({ skipGetAppConfiguration: true }, options),
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
provide: CORE_OPTIONS,
|
|
84
|
+
useFactory: coreOptionsFactory,
|
|
85
|
+
deps: ['CORE_OPTIONS'],
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
provide: LIST_QUERY_DEBOUNCE_TIME,
|
|
89
|
+
useValue: listQueryDebounceTime,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
provide: PermissionService,
|
|
93
|
+
useClass: MockPermissionService,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
provide: RestService,
|
|
97
|
+
useClass: MockRestService,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
provide: LOADER_DELAY,
|
|
101
|
+
useValue: 0,
|
|
102
|
+
},
|
|
103
|
+
provideRoutes(routes),
|
|
104
|
+
],
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
CoreTestingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
109
|
+
CoreTestingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, imports: [NoopAnimationsModule, RouterTestingModule, BaseCoreModule], exports: [RouterTestingModule, BaseCoreModule] });
|
|
110
|
+
CoreTestingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, imports: [[NoopAnimationsModule, RouterTestingModule, BaseCoreModule], RouterTestingModule, BaseCoreModule] });
|
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0, type: CoreTestingModule, decorators: [{
|
|
112
|
+
type: NgModule,
|
|
113
|
+
args: [{
|
|
114
|
+
exports: [RouterTestingModule, BaseCoreModule],
|
|
115
|
+
imports: [NoopAnimationsModule, RouterTestingModule, BaseCoreModule],
|
|
116
|
+
}]
|
|
117
117
|
}] });
|
|
118
118
|
|
|
119
|
-
function clearPage(_fixture) {
|
|
120
|
-
if (!document)
|
|
121
|
-
return;
|
|
122
|
-
const elements = document.querySelectorAll('body > *');
|
|
123
|
-
elements.forEach(element => {
|
|
124
|
-
if (/^(abp|ngb)-/i.test(element.tagName))
|
|
125
|
-
document.body.removeChild(element);
|
|
126
|
-
});
|
|
119
|
+
function clearPage(_fixture) {
|
|
120
|
+
if (!document)
|
|
121
|
+
return;
|
|
122
|
+
const elements = document.querySelectorAll('body > *');
|
|
123
|
+
elements.forEach(element => {
|
|
124
|
+
if (/^(abp|ngb)-/i.test(element.tagName))
|
|
125
|
+
document.body.removeChild(element);
|
|
126
|
+
});
|
|
127
127
|
}
|
|
128
128
|
|
|
129
|
-
function wait(fixture, timeout = 0) {
|
|
130
|
-
fixture.detectChanges();
|
|
131
|
-
return new Promise(res => setTimeout(res, timeout));
|
|
129
|
+
function wait(fixture, timeout = 0) {
|
|
130
|
+
fixture.detectChanges();
|
|
131
|
+
return new Promise(res => setTimeout(res, timeout));
|
|
132
132
|
}
|
|
133
133
|
|
|
134
|
-
/**
|
|
135
|
-
* Generated bundle index. Do not edit.
|
|
134
|
+
/**
|
|
135
|
+
* Generated bundle index. Do not edit.
|
|
136
136
|
*/
|
|
137
137
|
|
|
138
138
|
export { CoreTestingModule, MockPermissionService, MockRestService, clearPage, wait };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abp-ng.core-testing.js","sources":["../../../../packages/core/testing/src/lib/services/mock-permission.service.ts","../../../../packages/core/testing/src/lib/services/mock-rest.service.ts","../../../../packages/core/testing/src/lib/core-testing.module.ts","../../../../packages/core/testing/src/lib/utils/clear-page.util.ts","../../../../packages/core/testing/src/lib/utils/wait.util.ts","../../../../packages/core/testing/src/abp-ng.core-testing.ts"],"sourcesContent":["import { ConfigStateService, PermissionService } from '@abp/ng.core';\
|
|
1
|
+
{"version":3,"file":"abp-ng.core-testing.js","sources":["../../../../packages/core/testing/src/lib/services/mock-permission.service.ts","../../../../packages/core/testing/src/lib/services/mock-rest.service.ts","../../../../packages/core/testing/src/lib/core-testing.module.ts","../../../../packages/core/testing/src/lib/utils/clear-page.util.ts","../../../../packages/core/testing/src/lib/utils/wait.util.ts","../../../../packages/core/testing/src/abp-ng.core-testing.ts"],"sourcesContent":["import { ConfigStateService, PermissionService } from '@abp/ng.core';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MockPermissionService extends PermissionService {\n constructor(protected configState: ConfigStateService) {\n super(configState);\n this.grantAllPolicies();\n }\n\n grantAllPolicies() {\n const grantedPolicies = new Proxy(\n {},\n {\n get() {\n return true;\n },\n },\n );\n\n this.configState['store'].deepPatch({ auth: { grantedPolicies } });\n }\n\n grantPolicies(keys: string[]) {\n const grantedPolicies = keys.reduce((policies, key) => {\n policies[key] = true;\n return policies;\n }, {});\n\n this.configState['store'].deepPatch({ auth: { grantedPolicies } });\n }\n}\n","import { ABP, CORE_OPTIONS, EnvironmentService, RestService } from '@abp/ng.core';\nimport { HttpClient } from '@angular/common/http';\nimport { Inject, Injectable } from '@angular/core';\nimport { Observable, throwError } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MockRestService extends RestService {\n constructor(\n @Inject(CORE_OPTIONS) protected options: ABP.Root,\n protected http: HttpClient,\n protected environment: EnvironmentService,\n ) {\n super(options, http, environment, null);\n }\n\n handleError(err: any): Observable<any> {\n return throwError(err);\n }\n}\n","import {\n ABP,\n BaseCoreModule,\n coreOptionsFactory,\n CORE_OPTIONS,\n LIST_QUERY_DEBOUNCE_TIME,\n LOADER_DELAY,\n PermissionService,\n RestService,\n} from '@abp/ng.core';\nimport { APP_BASE_HREF } from '@angular/common';\nimport { ModuleWithProviders, NgModule } from '@angular/core';\nimport { NoopAnimationsModule } from '@angular/platform-browser/animations';\nimport { provideRoutes } from '@angular/router';\nimport { RouterTestingModule } from '@angular/router/testing';\nimport { MockPermissionService } from './services/mock-permission.service';\nimport { MockRestService } from './services/mock-rest.service';\n\n/**\n * CoreTestingModule is the module that will be used in tests\n * and it provides mock alternatives\n */\n@NgModule({\n exports: [RouterTestingModule, BaseCoreModule],\n imports: [NoopAnimationsModule, RouterTestingModule, BaseCoreModule],\n})\nexport class CoreTestingModule {\n static withConfig(\n { baseHref = '/', listQueryDebounceTime = 0, routes = [], ...options } = {} as ABP.Test,\n ): ModuleWithProviders<CoreTestingModule> {\n return {\n ngModule: CoreTestingModule,\n providers: [\n { provide: APP_BASE_HREF, useValue: baseHref },\n {\n provide: 'CORE_OPTIONS',\n useValue: {\n skipGetAppConfiguration: true,\n ...options,\n },\n },\n {\n provide: CORE_OPTIONS,\n useFactory: coreOptionsFactory,\n deps: ['CORE_OPTIONS'],\n },\n {\n provide: LIST_QUERY_DEBOUNCE_TIME,\n useValue: listQueryDebounceTime,\n },\n {\n provide: PermissionService,\n useClass: MockPermissionService,\n },\n {\n provide: RestService,\n useClass: MockRestService,\n },\n {\n provide: LOADER_DELAY,\n useValue: 0,\n },\n provideRoutes(routes),\n ],\n };\n }\n}\n","import { ComponentFixture } from '@angular/core/testing';\n\nexport function clearPage<T extends any>(_fixture: ComponentFixture<T>) {\n if (!document) return;\n\n const elements = document.querySelectorAll('body > *');\n elements.forEach(element => {\n if (/^(abp|ngb)-/i.test(element.tagName)) document.body.removeChild(element);\n });\n}\n","import { ComponentFixture } from '@angular/core/testing';\n\nexport function wait<T extends any>(fixture: ComponentFixture<T>, timeout = 0) {\n fixture.detectChanges();\n return new Promise(res => setTimeout(res, timeout));\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;MAMa,qBAAsB,SAAQ,iBAAiB;IAC1D,YAAsB,WAA+B;QACnD,KAAK,CAAC,WAAW,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