@abp/ng.theme.shared 9.3.6 → 9.3.7
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.
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Input, Component, ChangeDetectionStrategy, EventEmitter, ViewChild, Output, InjectionToken, Inject,
|
|
2
|
+
import { Injectable, inject, LOCALE_ID, Input, Component, ChangeDetectionStrategy, EventEmitter, ViewChild, Output, InjectionToken, Inject, DestroyRef, createComponent, ViewEncapsulation, HostListener, RendererFactory2, Injector, EnvironmentInjector, ApplicationRef, model, input, viewChild, contentChild, output, effect, Optional, Directive, forwardRef, HostBinding, NgModule, ChangeDetectorRef, ViewContainerRef, Renderer2, Host, provideAppInitializer, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { formatDate, CommonModule, DOCUMENT } from '@angular/common';
|
|
5
|
-
import { NgbDateAdapter, NgbTimeAdapter, NgbModal, NgbTooltip, NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
|
|
5
|
+
import { NgbDateAdapter, NgbDatepickerI18n, NgbTimeAdapter, NgbTimepickerI18n, NgbModal, NgbTooltip, NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter } from '@ng-bootstrap/ng-bootstrap';
|
|
6
|
+
import * as i2 from '@abp/ng.core';
|
|
7
|
+
import { ConfigStateService, LocalizationPipe, getRoutePath, SubscriptionService, StopPropagationDirective, PROJECTION_STRATEGY, SORT_COMPARE_FUNC, InternalStore, ContentProjectionService, RouterEvents, AuthService, SessionStateService, DomInsertionService, CONTENT_STRATEGY, uuid, AbstractNgModelComponent, InternetConnectionService, LocalizationModule, LocalizationService, getLocaleDirection, HttpErrorReporterService, RoutesService, TENANT_NOT_FOUND_BY_NAME } from '@abp/ng.core';
|
|
6
8
|
import { animation, style, animate, keyframes, trigger, state, transition, useAnimation, query } from '@angular/animations';
|
|
7
9
|
import * as i1$1 from '@angular/router';
|
|
8
10
|
import { RouterModule, Router, ResolveEnd } from '@angular/router';
|
|
9
|
-
import * as i2 from '@abp/ng.core';
|
|
10
|
-
import { LocalizationPipe, getRoutePath, SubscriptionService, PROJECTION_STRATEGY, SORT_COMPARE_FUNC, InternalStore, ContentProjectionService, RouterEvents, AuthService, SessionStateService, DomInsertionService, CONTENT_STRATEGY, ConfigStateService, uuid, AbstractNgModelComponent, InternetConnectionService, LocalizationModule, LocalizationService, getLocaleDirection, HttpErrorReporterService, RoutesService, TENANT_NOT_FOUND_BY_NAME } from '@abp/ng.core';
|
|
11
11
|
import { startWith, map, debounceTime, filter, takeUntil, take, switchMap } from 'rxjs/operators';
|
|
12
12
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
13
13
|
import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject, BehaviorSubject, distinctUntilChanged, of, from, Observable, EMPTY } from 'rxjs';
|
|
@@ -100,6 +100,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
100
100
|
type: Injectable
|
|
101
101
|
}] });
|
|
102
102
|
|
|
103
|
+
class DatepickerI18nAdapter extends NgbDatepickerI18n {
|
|
104
|
+
constructor() {
|
|
105
|
+
super(...arguments);
|
|
106
|
+
this.configState = inject(ConfigStateService, { optional: true });
|
|
107
|
+
this.defaultLocale = inject(LOCALE_ID);
|
|
108
|
+
}
|
|
109
|
+
get locale() {
|
|
110
|
+
return this.configState?.getDeep('localization.currentCulture.cultureName') || this.defaultLocale;
|
|
111
|
+
}
|
|
112
|
+
getWeekdayLabel(weekday) {
|
|
113
|
+
const date = new Date(2017, 0, weekday + 1); // Monday = 1
|
|
114
|
+
return formatDate(date, 'EEEEE', this.locale);
|
|
115
|
+
}
|
|
116
|
+
getWeekLabel() {
|
|
117
|
+
return '';
|
|
118
|
+
}
|
|
119
|
+
getMonthShortName(month) {
|
|
120
|
+
const date = new Date(2017, month - 1, 1);
|
|
121
|
+
return formatDate(date, 'MMM', this.locale);
|
|
122
|
+
}
|
|
123
|
+
getMonthFullName(month) {
|
|
124
|
+
const date = new Date(2017, month - 1, 1);
|
|
125
|
+
return formatDate(date, 'MMMM', this.locale);
|
|
126
|
+
}
|
|
127
|
+
getDayAriaLabel(date) {
|
|
128
|
+
const d = new Date(date.year, date.month - 1, date.day);
|
|
129
|
+
return formatDate(d, 'fullDate', this.locale);
|
|
130
|
+
}
|
|
131
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DatepickerI18nAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
132
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DatepickerI18nAdapter }); }
|
|
133
|
+
}
|
|
134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: DatepickerI18nAdapter, decorators: [{
|
|
135
|
+
type: Injectable
|
|
136
|
+
}] });
|
|
137
|
+
|
|
103
138
|
class TimeAdapter extends NgbTimeAdapter {
|
|
104
139
|
fromModel(value) {
|
|
105
140
|
if (!value)
|
|
@@ -133,6 +168,30 @@ function isTimeStr(value) {
|
|
|
133
168
|
return /^((2[123])|[01][0-9])(:[0-5][0-9]){1,2}$/.test(String(value));
|
|
134
169
|
}
|
|
135
170
|
|
|
171
|
+
class TimepickerI18nAdapter extends NgbTimepickerI18n {
|
|
172
|
+
constructor() {
|
|
173
|
+
super(...arguments);
|
|
174
|
+
this.configState = inject(ConfigStateService, { optional: true });
|
|
175
|
+
this.defaultLocale = inject(LOCALE_ID);
|
|
176
|
+
}
|
|
177
|
+
get locale() {
|
|
178
|
+
return this.configState?.getDeep('localization.currentCulture.cultureName') || this.defaultLocale;
|
|
179
|
+
}
|
|
180
|
+
getMorningPeriod() {
|
|
181
|
+
const date = new Date(2000, 0, 1, 10, 0, 0);
|
|
182
|
+
return formatDate(date, 'a', this.locale);
|
|
183
|
+
}
|
|
184
|
+
getAfternoonPeriod() {
|
|
185
|
+
const date = new Date(2000, 0, 1, 22, 0, 0);
|
|
186
|
+
return formatDate(date, 'a', this.locale);
|
|
187
|
+
}
|
|
188
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: TimepickerI18nAdapter, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
189
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: TimepickerI18nAdapter }); }
|
|
190
|
+
}
|
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: TimepickerI18nAdapter, decorators: [{
|
|
192
|
+
type: Injectable
|
|
193
|
+
}] });
|
|
194
|
+
|
|
136
195
|
const bounceIn = animation([
|
|
137
196
|
style({ opacity: '0', display: '{{ display }}' }),
|
|
138
197
|
animate('{{ time}} {{ easing }}', keyframes([
|
|
@@ -356,7 +415,7 @@ class ButtonComponent {
|
|
|
356
415
|
>
|
|
357
416
|
<i [ngClass]="icon" class="me-1" aria-hidden="true"></i><ng-content></ng-content>
|
|
358
417
|
</button>
|
|
359
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
418
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }] }); }
|
|
360
419
|
}
|
|
361
420
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
362
421
|
type: Component,
|
|
@@ -377,7 +436,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
377
436
|
<i [ngClass]="icon" class="me-1" aria-hidden="true"></i><ng-content></ng-content>
|
|
378
437
|
</button>
|
|
379
438
|
`,
|
|
380
|
-
imports: [CommonModule],
|
|
439
|
+
imports: [CommonModule, StopPropagationDirective],
|
|
381
440
|
}]
|
|
382
441
|
}], ctorParameters: () => [{ type: i0.Renderer2 }], propDecorators: { buttonId: [{
|
|
383
442
|
type: Input
|
|
@@ -2834,6 +2893,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
2834
2893
|
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
2835
2894
|
|
|
2836
2895
|
const NG_BOOTSTRAP_CONFIG_PROVIDERS = [
|
|
2896
|
+
{
|
|
2897
|
+
provide: NgbDatepickerI18n,
|
|
2898
|
+
useClass: DatepickerI18nAdapter,
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
provide: NgbTimepickerI18n,
|
|
2902
|
+
useClass: TimepickerI18nAdapter,
|
|
2903
|
+
},
|
|
2837
2904
|
provideAppInitializer(() => {
|
|
2838
2905
|
configureNgBootstrap();
|
|
2839
2906
|
}),
|
|
@@ -3263,5 +3330,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
3263
3330
|
* Generated bundle index. Do not edit.
|
|
3264
3331
|
*/
|
|
3265
3332
|
|
|
3266
|
-
export { AbpAuthenticationErrorHandler, AbpFormatErrorHandlerService, AbpVisibleDirective, BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, CARD_COMPONENTS, CARD_DIRECTIVES, CONFIRMATION_ICONS, CUSTOM_ERROR_HANDLERS, CUSTOM_HTTP_ERROR_HANDLER_PRIORITY, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardHeaderDirective, CardImgTopDirective, CardModule, CardSubtitleDirective, CardTitleDirective, Confirmation, ConfirmationComponent, ConfirmationService, CreateErrorComponentService, DEFAULT_CONFIRMATION_ICONS, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_HANDLERS_PROVIDERS, DEFAULT_VALIDATION_BLUEPRINTS, DateAdapter, DateParserFormatter, DateTimeAdapter, DisabledDirective, DocumentDirHandlerService, EllipsisDirective, ErrorHandler, FormCheckboxComponent, FormInputComponent, HTTP_ERROR_CONFIG, HTTP_ERROR_DETAIL, HTTP_ERROR_HANDLER, HTTP_ERROR_STATUS, HttpErrorWrapperComponent, InternetConnectionStatusComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, RouterErrorHandlerService, SUPPRESS_UNSAVED_CHANGES_WARNING, SpinnerComponent, StatusCodeErrorHandlerService, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_EXPORTS, THEME_SHARED_ROUTE_PROVIDERS, TenantResolveErrorHandlerService, ThemeSharedFeatureKind, ThemeSharedModule, TimeAdapter, ToastComponent, ToastContainerComponent, ToasterService, UnknownStatusCodeErrorHandlerService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, eFormComponets, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getErrorFromRequestBody, getPasswordValidators, provideAbpThemeShared, slideFromBottom, tenantNotFoundProvider, toastInOut, validatePassword, withConfirmationIcon, withHttpErrorConfig, withValidateOnSubmit, withValidationBluePrint, withValidationMapErrorsFn };
|
|
3333
|
+
export { AbpAuthenticationErrorHandler, AbpFormatErrorHandlerService, AbpVisibleDirective, BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, CARD_COMPONENTS, CARD_DIRECTIVES, CONFIRMATION_ICONS, CUSTOM_ERROR_HANDLERS, CUSTOM_HTTP_ERROR_HANDLER_PRIORITY, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CardHeaderDirective, CardImgTopDirective, CardModule, CardSubtitleDirective, CardTitleDirective, Confirmation, ConfirmationComponent, ConfirmationService, CreateErrorComponentService, DEFAULT_CONFIRMATION_ICONS, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_HANDLERS_PROVIDERS, DEFAULT_VALIDATION_BLUEPRINTS, DateAdapter, DateParserFormatter, DateTimeAdapter, DatepickerI18nAdapter, DisabledDirective, DocumentDirHandlerService, EllipsisDirective, ErrorHandler, FormCheckboxComponent, FormInputComponent, HTTP_ERROR_CONFIG, HTTP_ERROR_DETAIL, HTTP_ERROR_HANDLER, HTTP_ERROR_STATUS, HttpErrorWrapperComponent, InternetConnectionStatusComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, RouterErrorHandlerService, SUPPRESS_UNSAVED_CHANGES_WARNING, SpinnerComponent, StatusCodeErrorHandlerService, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_EXPORTS, THEME_SHARED_ROUTE_PROVIDERS, TenantResolveErrorHandlerService, ThemeSharedFeatureKind, ThemeSharedModule, TimeAdapter, TimepickerI18nAdapter, ToastComponent, ToastContainerComponent, ToasterService, UnknownStatusCodeErrorHandlerService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, eFormComponets, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getErrorFromRequestBody, getPasswordValidators, provideAbpThemeShared, slideFromBottom, tenantNotFoundProvider, toastInOut, validatePassword, withConfirmationIcon, withHttpErrorConfig, withValidateOnSubmit, withValidationBluePrint, withValidationMapErrorsFn };
|
|
3267
3334
|
//# sourceMappingURL=abp-ng.theme.shared.mjs.map
|