@abp/ng.theme.shared 7.1.0-rc.1 → 7.1.0-rc.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/esm2020/extensions/lib/adapters/date-time.adapter.mjs +3 -3
- package/esm2020/extensions/lib/components/abstract-actions/abstract-actions.component.mjs +1 -1
- package/esm2020/extensions/lib/components/extensible-form/extensible-form-prop.component.mjs +3 -3
- package/esm2020/extensions/lib/components/extensible-form/extensible-form.component.mjs +1 -1
- package/esm2020/extensions/lib/components/extensible-table/extensible-table.component.mjs +4 -4
- package/esm2020/extensions/lib/components/grid-actions/grid-actions.component.mjs +1 -1
- package/esm2020/extensions/lib/components/page-toolbar/page-toolbar.component.mjs +8 -3
- package/esm2020/extensions/lib/models/actions.mjs +2 -2
- package/esm2020/extensions/lib/models/entity-actions.mjs +2 -2
- package/esm2020/extensions/lib/models/entity-props.mjs +13 -6
- package/esm2020/extensions/lib/models/form-props.mjs +3 -3
- package/esm2020/extensions/lib/models/internal/object-extensions.mjs +1 -1
- package/esm2020/extensions/lib/models/props.mjs +1 -1
- package/esm2020/extensions/lib/models/toolbar-actions.mjs +1 -1
- package/esm2020/extensions/lib/pipes/create-injector.pipe.mjs +2 -2
- package/esm2020/extensions/lib/utils/actions.util.mjs +1 -1
- package/esm2020/extensions/lib/utils/enum.util.mjs +1 -1
- package/esm2020/extensions/lib/utils/form-props.util.mjs +2 -2
- package/esm2020/extensions/lib/utils/props.util.mjs +1 -1
- package/esm2020/extensions/lib/utils/state.util.mjs +11 -11
- package/esm2020/lib/components/breadcrumb/breadcrumb.component.mjs +2 -2
- package/esm2020/lib/components/confirmation/confirmation.component.mjs +5 -2
- package/esm2020/lib/components/password/password.component.mjs +1 -1
- package/esm2020/lib/directives/index.mjs +2 -1
- package/esm2020/lib/directives/visible.directive.mjs +63 -0
- package/esm2020/lib/models/nav-item.mjs +1 -2
- package/esm2020/lib/services/abstract-menu.service.mjs +1 -1
- package/esm2020/lib/services/confirmation.service.mjs +1 -1
- package/esm2020/lib/theme-shared.module.mjs +7 -3
- package/esm2020/lib/tokens/confirmation-icons.token.mjs +2 -1
- package/extensions/lib/adapters/date-time.adapter.d.ts +3 -3
- package/extensions/lib/components/abstract-actions/abstract-actions.component.d.ts +2 -2
- package/extensions/lib/components/extensible-form/extensible-form-prop.component.d.ts +1 -1
- package/extensions/lib/components/extensible-table/extensible-table.component.d.ts +1 -1
- package/extensions/lib/components/grid-actions/grid-actions.component.d.ts +1 -1
- package/extensions/lib/components/page-toolbar/page-toolbar.component.d.ts +5 -2
- package/extensions/lib/models/actions.d.ts +6 -5
- package/extensions/lib/models/entity-props.d.ts +3 -3
- package/extensions/lib/models/form-props.d.ts +2 -2
- package/extensions/lib/models/internal/object-extensions.d.ts +1 -1
- package/extensions/lib/models/props.d.ts +4 -3
- package/extensions/lib/models/toolbar-actions.d.ts +2 -2
- package/extensions/lib/tokens/extensions.token.d.ts +1 -1
- package/extensions/lib/utils/actions.util.d.ts +1 -1
- package/extensions/lib/utils/enum.util.d.ts +2 -2
- package/extensions/lib/utils/form-props.util.d.ts +2 -2
- package/extensions/lib/utils/props.util.d.ts +3 -2
- package/extensions/lib/utils/state.util.d.ts +3 -3
- package/fesm2015/abp-ng.theme.shared-extensions.mjs +33 -21
- package/fesm2015/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2015/abp-ng.theme.shared.mjs +73 -6
- package/fesm2015/abp-ng.theme.shared.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared-extensions.mjs +33 -21
- package/fesm2020/abp-ng.theme.shared-extensions.mjs.map +1 -1
- package/fesm2020/abp-ng.theme.shared.mjs +72 -6
- package/fesm2020/abp-ng.theme.shared.mjs.map +1 -1
- package/lib/components/confirmation/confirmation.component.d.ts +1 -1
- package/lib/components/password/password.component.d.ts +1 -1
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/visible.directive.d.ts +18 -0
- package/lib/models/nav-item.d.ts +4 -2
- package/lib/services/abstract-menu.service.d.ts +2 -1
- package/lib/theme-shared.module.d.ts +8 -7
- package/lib/tokens/confirmation-icons.token.d.ts +1 -0
- package/package.json +3 -3
|
@@ -9,7 +9,7 @@ import * as i2 from '@abp/ng.core';
|
|
|
9
9
|
import { getRoutePath, SubscriptionService, PROJECTION_STRATEGY, uuid, AbstractNgModelComponent, LocalizationService, getLocaleDirection, HttpErrorReporterService, RouterEvents, AuthService, RoutesService, InternalStore, DomInsertionService, CONTENT_STRATEGY, CoreModule, noop, ConfigStateService } from '@abp/ng.core';
|
|
10
10
|
import { __rest } from 'tslib';
|
|
11
11
|
import { startWith, map, debounceTime, filter, takeUntil, distinctUntilChanged, take, catchError, switchMap } from 'rxjs/operators';
|
|
12
|
-
import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject,
|
|
12
|
+
import { fromEvent, Subscription, combineLatest, timer, ReplaySubject, Subject, of, from, Observable, EMPTY, BehaviorSubject, throwError } from 'rxjs';
|
|
13
13
|
import * as i3 from '@ng-bootstrap/ng-bootstrap';
|
|
14
14
|
import { NgbInputDatepickerConfig, NgbTypeaheadConfig, NgbDateParserFormatter, NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap';
|
|
15
15
|
import * as i2$1 from '@angular/forms';
|
|
@@ -315,6 +315,7 @@ const DEFAULT_CONFIRMATION_ICONS = {
|
|
|
315
315
|
warning: 'fa fa-exclamation-triangle',
|
|
316
316
|
error: 'fa fa-times-circle',
|
|
317
317
|
default: 'fa fa-question-circle',
|
|
318
|
+
neutral: '',
|
|
318
319
|
};
|
|
319
320
|
|
|
320
321
|
class ConfirmationComponent {
|
|
@@ -334,7 +335,10 @@ class ConfirmationComponent {
|
|
|
334
335
|
if (!this.icons) {
|
|
335
336
|
return '';
|
|
336
337
|
}
|
|
337
|
-
|
|
338
|
+
if (severity) {
|
|
339
|
+
return this.icons[severity];
|
|
340
|
+
}
|
|
341
|
+
return this.icons.default;
|
|
338
342
|
}
|
|
339
343
|
isCustomIconExists({ options }) {
|
|
340
344
|
return !!(options && (options.iconTemplate || options.icon));
|
|
@@ -1287,6 +1291,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1287
1291
|
type: Input
|
|
1288
1292
|
}] } });
|
|
1289
1293
|
|
|
1294
|
+
class AbpVisibleDirective {
|
|
1295
|
+
constructor(viewContainerRef, templateRef) {
|
|
1296
|
+
this.viewContainerRef = viewContainerRef;
|
|
1297
|
+
this.templateRef = templateRef;
|
|
1298
|
+
this.condition$ = of(false);
|
|
1299
|
+
}
|
|
1300
|
+
set abpVisible(value) {
|
|
1301
|
+
this.condition$ = checkType(value);
|
|
1302
|
+
this.subscribeToCondition();
|
|
1303
|
+
}
|
|
1304
|
+
ngOnInit() {
|
|
1305
|
+
this.updateVisibility();
|
|
1306
|
+
}
|
|
1307
|
+
ngOnDestroy() {
|
|
1308
|
+
var _a;
|
|
1309
|
+
(_a = this.conditionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
1310
|
+
}
|
|
1311
|
+
subscribeToCondition() {
|
|
1312
|
+
this.conditionSubscription = this.condition$.subscribe(value => {
|
|
1313
|
+
this.isVisible = value;
|
|
1314
|
+
this.updateVisibility();
|
|
1315
|
+
});
|
|
1316
|
+
}
|
|
1317
|
+
updateVisibility() {
|
|
1318
|
+
this.viewContainerRef.clear();
|
|
1319
|
+
// it should be false not falsy
|
|
1320
|
+
if (this.isVisible === false) {
|
|
1321
|
+
return;
|
|
1322
|
+
}
|
|
1323
|
+
this.viewContainerRef.createEmbeddedView(this.templateRef);
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
AbpVisibleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpVisibleDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1327
|
+
AbpVisibleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.4", type: AbpVisibleDirective, selector: "[abpVisible]", inputs: { abpVisible: "abpVisible" }, ngImport: i0 });
|
|
1328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: AbpVisibleDirective, decorators: [{
|
|
1329
|
+
type: Directive,
|
|
1330
|
+
args: [{
|
|
1331
|
+
selector: '[abpVisible]',
|
|
1332
|
+
}]
|
|
1333
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, propDecorators: { abpVisible: [{
|
|
1334
|
+
type: Input,
|
|
1335
|
+
args: ['abpVisible']
|
|
1336
|
+
}] } });
|
|
1337
|
+
function checkType(value) {
|
|
1338
|
+
if (value instanceof Promise) {
|
|
1339
|
+
return from(value);
|
|
1340
|
+
}
|
|
1341
|
+
else if (value instanceof Observable) {
|
|
1342
|
+
return value;
|
|
1343
|
+
}
|
|
1344
|
+
else if (typeof value === 'boolean') {
|
|
1345
|
+
return of(value);
|
|
1346
|
+
}
|
|
1347
|
+
else if (value === undefined || value === null) {
|
|
1348
|
+
return of(true);
|
|
1349
|
+
}
|
|
1350
|
+
else {
|
|
1351
|
+
return EMPTY;
|
|
1352
|
+
}
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1290
1355
|
class DocumentDirHandlerService {
|
|
1291
1356
|
constructor(injector) {
|
|
1292
1357
|
this.injector = injector;
|
|
@@ -1607,7 +1672,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
|
|
|
1607
1672
|
|
|
1608
1673
|
class NavItem {
|
|
1609
1674
|
constructor(props) {
|
|
1610
|
-
props = Object.assign(Object.assign({}, props), { visible: props.visible || (() => true) });
|
|
1611
1675
|
Object.assign(this, props);
|
|
1612
1676
|
}
|
|
1613
1677
|
}
|
|
@@ -2106,6 +2170,7 @@ const declarationsWithExports = [
|
|
|
2106
2170
|
NgxDatatableListDirective,
|
|
2107
2171
|
LoadingDirective,
|
|
2108
2172
|
ModalCloseDirective,
|
|
2173
|
+
AbpVisibleDirective,
|
|
2109
2174
|
];
|
|
2110
2175
|
class BaseThemeSharedModule {
|
|
2111
2176
|
}
|
|
@@ -2123,7 +2188,8 @@ BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
|
|
|
2123
2188
|
NgxDatatableDefaultDirective,
|
|
2124
2189
|
NgxDatatableListDirective,
|
|
2125
2190
|
LoadingDirective,
|
|
2126
|
-
ModalCloseDirective,
|
|
2191
|
+
ModalCloseDirective,
|
|
2192
|
+
AbpVisibleDirective, HttpErrorWrapperComponent], imports: [CoreModule,
|
|
2127
2193
|
NgxDatatableModule,
|
|
2128
2194
|
NgxValidateCoreModule,
|
|
2129
2195
|
NgbPaginationModule,
|
|
@@ -2140,7 +2206,8 @@ BaseThemeSharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
|
|
|
2140
2206
|
NgxDatatableDefaultDirective,
|
|
2141
2207
|
NgxDatatableListDirective,
|
|
2142
2208
|
LoadingDirective,
|
|
2143
|
-
ModalCloseDirective
|
|
2209
|
+
ModalCloseDirective,
|
|
2210
|
+
AbpVisibleDirective] });
|
|
2144
2211
|
BaseThemeSharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: BaseThemeSharedModule, providers: [DatePipe], imports: [CoreModule,
|
|
2145
2212
|
NgxDatatableModule,
|
|
2146
2213
|
NgxValidateCoreModule,
|
|
@@ -2292,5 +2359,5 @@ function validatePassword(shouldContain) {
|
|
|
2292
2359
|
* Generated bundle index. Do not edit.
|
|
2293
2360
|
*/
|
|
2294
2361
|
|
|
2295
|
-
export { BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, Confirmation, ConfirmationComponent, ConfirmationService, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_VALIDATION_BLUEPRINTS, DateParserFormatter, DocumentDirHandlerService, EllipsisDirective, EllipsisModule, ErrorHandler, HTTP_ERROR_CONFIG, HTTP_ERROR_HANDLER, HttpErrorWrapperComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, SUPPRESS_UNSAVED_CHANGES_WARNING, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_ROUTE_PROVIDERS, ThemeSharedModule, ToastComponent, ToastContainerComponent, ToasterService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getPasswordValidators, httpErrorConfigFactory, slideFromBottom, toastInOut, validatePassword };
|
|
2362
|
+
export { AbpVisibleDirective, BaseThemeSharedModule, BreadcrumbComponent, BreadcrumbItemsComponent, ButtonComponent, Confirmation, ConfirmationComponent, ConfirmationService, DEFAULT_ERROR_LOCALIZATIONS, DEFAULT_ERROR_MESSAGES, DEFAULT_VALIDATION_BLUEPRINTS, DateParserFormatter, DocumentDirHandlerService, EllipsisDirective, EllipsisModule, ErrorHandler, HTTP_ERROR_CONFIG, HTTP_ERROR_HANDLER, HttpErrorWrapperComponent, LoaderBarComponent, LoadingComponent, LoadingDirective, ModalCloseDirective, ModalComponent, ModalRefService, NGX_DATATABLE_MESSAGES, NG_BOOTSTRAP_CONFIG_PROVIDERS, NavItem, NavItemsService, NgxDatatableDefaultDirective, NgxDatatableListDirective, PageAlertService, PasswordComponent, SUPPRESS_UNSAVED_CHANGES_WARNING, THEME_SHARED_APPEND_CONTENT, THEME_SHARED_ROUTE_PROVIDERS, ThemeSharedModule, ToastComponent, ToastContainerComponent, ToasterService, UserMenu, UserMenuService, bounceIn, collapse, collapseLinearWithMargin, collapseWithMargin, collapseX, collapseY, collapseYWithMargin, configureNgBootstrap, configureRoutes, defaultNgxDatatableMessages, dialogAnimation, expandX, expandY, expandYWithMargin, fadeAnimation, fadeIn, fadeInDown, fadeInLeft, fadeInRight, fadeInUp, fadeOut, fadeOutDown, fadeOutLeft, fadeOutRight, fadeOutUp, getPasswordValidators, httpErrorConfigFactory, slideFromBottom, toastInOut, validatePassword };
|
|
2296
2363
|
//# sourceMappingURL=abp-ng.theme.shared.mjs.map
|