@dereekb/dbx-web 8.13.9 → 8.15.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/esm2020/lib/extension/index.mjs +2 -1
- package/esm2020/lib/extension/widget/index.mjs +7 -0
- package/esm2020/lib/extension/widget/widget.component.mjs +54 -0
- package/esm2020/lib/extension/widget/widget.directive.mjs +17 -0
- package/esm2020/lib/extension/widget/widget.list.component.mjs +66 -0
- package/esm2020/lib/extension/widget/widget.mjs +2 -0
- package/esm2020/lib/extension/widget/widget.module.mjs +38 -0
- package/esm2020/lib/extension/widget/widget.service.mjs +45 -0
- package/esm2020/lib/layout/list/list.grid.view.component.mjs +60 -24
- package/esm2020/lib/layout/list/list.layout.module.mjs +6 -2
- package/fesm2015/dereekb-dbx-web.mjs +261 -25
- package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-web.mjs +255 -25
- package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
- package/lib/extension/index.d.ts +1 -0
- package/lib/extension/widget/index.d.ts +6 -0
- package/lib/extension/widget/widget.component.d.ts +20 -0
- package/lib/extension/widget/widget.d.ts +13 -0
- package/lib/extension/widget/widget.directive.d.ts +7 -0
- package/lib/extension/widget/widget.list.component.d.ts +21 -0
- package/lib/extension/widget/widget.module.d.ts +14 -0
- package/lib/extension/widget/widget.service.d.ts +32 -0
- package/lib/layout/list/list.grid.view.component.d.ts +26 -8
- package/lib/layout/list/list.layout.module.d.ts +1 -1
- package/package.json +5 -5
package/lib/extension/index.d.ts
CHANGED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { Maybe } from '@dereekb/util';
|
|
4
|
+
import { DbxInjectionComponentConfig } from '@dereekb/dbx-core';
|
|
5
|
+
import { DbxWidgetDataPair } from './widget';
|
|
6
|
+
import { DbxWidgetService } from './widget.service';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
/**
|
|
9
|
+
* Used to display a corresponding widget based on the input data.
|
|
10
|
+
*/
|
|
11
|
+
export declare class DbxWidgetViewComponent implements OnDestroy {
|
|
12
|
+
readonly dbxWidgetService: DbxWidgetService;
|
|
13
|
+
private _config;
|
|
14
|
+
readonly config$: Observable<Maybe<DbxInjectionComponentConfig>>;
|
|
15
|
+
constructor(dbxWidgetService: DbxWidgetService);
|
|
16
|
+
ngOnDestroy(): void;
|
|
17
|
+
set config(config: Maybe<DbxWidgetDataPair>);
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxWidgetViewComponent, never>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxWidgetViewComponent, "dbx-widget-view", never, { "config": "config"; }, {}, never, never>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ModelTypeDataPair, MapFunction } from '@dereekb/util';
|
|
2
|
+
/**
|
|
3
|
+
* Widget type identifier
|
|
4
|
+
*/
|
|
5
|
+
export declare type DbxWidgetType = string;
|
|
6
|
+
/**
|
|
7
|
+
* Type and data pair for a DbxWidget.
|
|
8
|
+
*/
|
|
9
|
+
export declare type DbxWidgetDataPair<T = unknown> = ModelTypeDataPair<T>;
|
|
10
|
+
/**
|
|
11
|
+
* Used for converting the input data into a DbxWidgetDataPair value.
|
|
12
|
+
*/
|
|
13
|
+
export declare type DbxWidgetDataPairFactory<T> = MapFunction<T, DbxWidgetDataPair<T>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare abstract class AbstractDbxWidgetComponent<T> {
|
|
3
|
+
readonly data: T;
|
|
4
|
+
constructor(data: T);
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AbstractDbxWidgetComponent<any>, never>;
|
|
6
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AbstractDbxWidgetComponent<any>, never, never, {}, {}, never>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { AbstractDbxListWrapperDirective, DbxValueListGridViewConfig, AbstractDbxValueListViewItemComponent, DbxValueAsListItem, AbstractDbxListGridViewDirective } from '../../layout/list';
|
|
2
|
+
import { DbxWidgetDataPair } from './widget';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare type DbxWidgetDataPairWithSelection = DbxValueAsListItem<DbxWidgetDataPair>;
|
|
5
|
+
/**
|
|
6
|
+
* Demo DbxSelectionListWrapperDirective
|
|
7
|
+
*/
|
|
8
|
+
export declare class DbxWidgetListGridComponent extends AbstractDbxListWrapperDirective<DbxWidgetDataPair> {
|
|
9
|
+
constructor();
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxWidgetListGridComponent, never>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxWidgetListGridComponent, "dbx-widget-grid", never, {}, {}, never, ["[top]", "[bottom]", "[empty]"]>;
|
|
12
|
+
}
|
|
13
|
+
export declare class DbxWidgetListGridViewComponent extends AbstractDbxListGridViewDirective<DbxWidgetDataPair> {
|
|
14
|
+
readonly config: DbxValueListGridViewConfig<DbxWidgetDataPairWithSelection>;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxWidgetListGridViewComponent, never>;
|
|
16
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxWidgetListGridViewComponent, "ng-component", never, {}, {}, never, never>;
|
|
17
|
+
}
|
|
18
|
+
export declare class DbxWidgetListGridViewItemComponent extends AbstractDbxValueListViewItemComponent<DbxWidgetDataPair> {
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxWidgetListGridViewItemComponent, never>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DbxWidgetListGridViewItemComponent, "ng-component", never, {}, {}, never, never>;
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./widget.component";
|
|
3
|
+
import * as i2 from "./widget.list.component";
|
|
4
|
+
import * as i3 from "@angular/common";
|
|
5
|
+
import * as i4 from "../../layout/list/list.layout.module";
|
|
6
|
+
import * as i5 from "@dereekb/dbx-core";
|
|
7
|
+
/**
|
|
8
|
+
* Contains components related to displaying "widgets" for pieces of data.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DbxWidgetModule {
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxWidgetModule, never>;
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxWidgetModule, [typeof i1.DbxWidgetViewComponent, typeof i2.DbxWidgetListGridComponent, typeof i2.DbxWidgetListGridViewComponent, typeof i2.DbxWidgetListGridViewItemComponent], [typeof i3.CommonModule, typeof i4.DbxListLayoutModule, typeof i5.DbxInjectionComponentModule], [typeof i1.DbxWidgetViewComponent, typeof i2.DbxWidgetListGridComponent, typeof i2.DbxWidgetListGridViewComponent, typeof i2.DbxWidgetListGridViewItemComponent]>;
|
|
13
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<DbxWidgetModule>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Type } from '@angular/core';
|
|
2
|
+
import { Maybe } from '@dereekb/util';
|
|
3
|
+
import { DbxWidgetType } from './widget';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export interface DbxWidgetEntry {
|
|
6
|
+
/**
|
|
7
|
+
* Widget type to respond to.
|
|
8
|
+
*/
|
|
9
|
+
readonly type: DbxWidgetType;
|
|
10
|
+
/**
|
|
11
|
+
* Widget component class to use.
|
|
12
|
+
*/
|
|
13
|
+
readonly componentClass: Type<unknown>;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Service used to register widgets.
|
|
17
|
+
*/
|
|
18
|
+
export declare class DbxWidgetService {
|
|
19
|
+
private _entries;
|
|
20
|
+
/**
|
|
21
|
+
* Used to register an entry. If an entry with the same type is already registered, this will override it by default.
|
|
22
|
+
*
|
|
23
|
+
* @param entry
|
|
24
|
+
* @param override
|
|
25
|
+
*/
|
|
26
|
+
register(entry: DbxWidgetEntry, override?: boolean): boolean;
|
|
27
|
+
getWidgetIdentifiers(): DbxWidgetType[];
|
|
28
|
+
getWidgetEntry(type: DbxWidgetType): Maybe<DbxWidgetEntry>;
|
|
29
|
+
getWidgetEntries(types: Iterable<DbxWidgetType>): DbxWidgetEntry[];
|
|
30
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxWidgetService, never>;
|
|
31
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DbxWidgetService>;
|
|
32
|
+
}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
1
3
|
import { DbxValueListItem } from './list.view.value';
|
|
2
4
|
import { AbstractDbxValueListViewDirective } from './list.view.value.directive';
|
|
3
5
|
import { Maybe } from '@dereekb/util';
|
|
4
6
|
import { DbxValueListItemViewComponent, DbxValueListViewConfig } from './list.view.value.component';
|
|
7
|
+
import { DbxListView } from './list.view';
|
|
5
8
|
import * as i0 from "@angular/core";
|
|
6
9
|
export interface DbxValueListGridViewConfig<T, I extends DbxValueListItem<T> = DbxValueListItem<T>, V = unknown> extends DbxValueListViewConfig<T, I, V> {
|
|
7
10
|
grid?: Maybe<Partial<DbxValueListGridItemViewGridSizeConfig>>;
|
|
@@ -10,8 +13,8 @@ export interface DbxValueListGridViewConfig<T, I extends DbxValueListItem<T> = D
|
|
|
10
13
|
* Renders a grid view using input configuration. Requires a parent DbxListView.
|
|
11
14
|
*/
|
|
12
15
|
export declare class DbxValueListGridViewComponent<T, I extends DbxValueListItem<T> = DbxValueListItem<T>, V = unknown, C extends DbxValueListGridViewConfig<T, I, V> = DbxValueListGridViewConfig<T, I, V>> extends AbstractDbxValueListViewDirective<T, I, V, C> {
|
|
13
|
-
readonly grid$:
|
|
14
|
-
readonly emitAllClicks$:
|
|
16
|
+
readonly grid$: Observable<Maybe<Partial<DbxValueListGridItemViewGridSizeConfig>>>;
|
|
17
|
+
readonly emitAllClicks$: Observable<boolean | undefined>;
|
|
15
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxValueListGridViewComponent<any, any, any, any>, never>;
|
|
16
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxValueListGridViewComponent<any, any, any, any>, "dbx-list-grid-view", never, {}, {}, never, never>;
|
|
17
20
|
}
|
|
@@ -28,15 +31,30 @@ export interface DbxValueListGridItemViewGridSizeConfig {
|
|
|
28
31
|
columns: string;
|
|
29
32
|
}
|
|
30
33
|
export declare const DEFAULT_LIST_GRID_SIZE_CONFIG: DbxValueListGridItemViewGridSizeConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Optional parent directive used to control grid size.
|
|
36
|
+
*/
|
|
37
|
+
export declare class DbxValueListGridSizeDirective implements OnDestroy {
|
|
38
|
+
private _gridSize;
|
|
39
|
+
readonly gridSize$: Observable<Maybe<Partial<DbxValueListGridItemViewGridSizeConfig>>>;
|
|
40
|
+
get gridSize(): Maybe<Partial<DbxValueListGridItemViewGridSizeConfig>>;
|
|
41
|
+
set gridSize(gridSize: Maybe<Partial<DbxValueListGridItemViewGridSizeConfig>>);
|
|
42
|
+
ngOnDestroy(): void;
|
|
43
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxValueListGridSizeDirective, never>;
|
|
44
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DbxValueListGridSizeDirective, "[dbxListGridSize]", never, { "gridSize": "dbxListGridSize"; }, {}, never>;
|
|
45
|
+
}
|
|
31
46
|
/**
|
|
32
47
|
* Content view for a DbxValueListGridView. It can be used directly in cases where the items are already configured, or want to be configured in a non-standard fashion.
|
|
33
48
|
*/
|
|
34
|
-
export declare class DbxValueListGridItemViewComponent<T, I extends DbxValueListItem<T> = DbxValueListItem<T>> extends DbxValueListItemViewComponent<T, I> {
|
|
35
|
-
private
|
|
36
|
-
|
|
49
|
+
export declare class DbxValueListGridItemViewComponent<T, I extends DbxValueListItem<T> = DbxValueListItem<T>> extends DbxValueListItemViewComponent<T, I> implements OnDestroy {
|
|
50
|
+
private _gridSizeOverride?;
|
|
51
|
+
private _defaultGrid;
|
|
52
|
+
readonly grid$: Observable<DbxValueListGridItemViewGridSizeConfig>;
|
|
53
|
+
readonly gap$: Observable<string>;
|
|
54
|
+
readonly columns$: Observable<string>;
|
|
55
|
+
constructor(dbxListView: DbxListView<T>, _gridSizeOverride?: DbxValueListGridSizeDirective | undefined);
|
|
37
56
|
set grid(grid: Maybe<Partial<DbxValueListGridItemViewGridSizeConfig>>);
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<DbxValueListGridItemViewComponent<any, any>, never>;
|
|
57
|
+
ngOnDestroy(): void;
|
|
58
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DbxValueListGridItemViewComponent<any, any>, [null, { optional: true; }]>;
|
|
41
59
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbxValueListGridItemViewComponent<any, any>, "dbx-list-grid-view-content", never, { "grid": "grid"; }, {}, never, never>;
|
|
42
60
|
}
|
|
@@ -17,6 +17,6 @@ import * as i15 from "@angular/material/list";
|
|
|
17
17
|
import * as i16 from "@angular/material/icon";
|
|
18
18
|
export declare class DbxListLayoutModule {
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<DbxListLayoutModule, never>;
|
|
20
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxListLayoutModule, [typeof i1.DbxListComponent, typeof i1.DbxListInternalContentDirective, typeof i2.DbxListEmptyContentComponent, typeof i3.DbxValueListViewComponent, typeof i3.DbxValueListItemViewComponent, typeof i4.DbxValueListGridViewComponent, typeof i4.DbxValueListGridItemViewComponent, typeof i5.DbxSelectionValueListViewComponent, typeof i5.DbxSelectionValueListItemViewComponent, typeof i6.DbxValueListItemModifierDirective, typeof i7.DbxListItemDisableRippleModifierDirective], [typeof i8.CommonModule, typeof i9.MatRippleModule, typeof i10.FlexLayoutModule, typeof i11.DbxLoadingModule, typeof i12.DbxRouterAnchorModule, typeof i13.InfiniteScrollModule, typeof i14.DbxInjectionComponentModule, typeof i15.MatListModule, typeof i16.MatIconModule], [typeof i1.DbxListComponent, typeof i2.DbxListEmptyContentComponent, typeof i3.DbxValueListViewComponent, typeof i3.DbxValueListItemViewComponent, typeof i4.DbxValueListGridViewComponent, typeof i4.DbxValueListGridItemViewComponent, typeof i5.DbxSelectionValueListViewComponent, typeof i5.DbxSelectionValueListItemViewComponent, typeof i6.DbxValueListItemModifierDirective, typeof i7.DbxListItemDisableRippleModifierDirective]>;
|
|
20
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DbxListLayoutModule, [typeof i1.DbxListComponent, typeof i1.DbxListInternalContentDirective, typeof i2.DbxListEmptyContentComponent, typeof i3.DbxValueListViewComponent, typeof i3.DbxValueListItemViewComponent, typeof i4.DbxValueListGridSizeDirective, typeof i4.DbxValueListGridViewComponent, typeof i4.DbxValueListGridItemViewComponent, typeof i5.DbxSelectionValueListViewComponent, typeof i5.DbxSelectionValueListItemViewComponent, typeof i6.DbxValueListItemModifierDirective, typeof i7.DbxListItemDisableRippleModifierDirective], [typeof i8.CommonModule, typeof i9.MatRippleModule, typeof i10.FlexLayoutModule, typeof i11.DbxLoadingModule, typeof i12.DbxRouterAnchorModule, typeof i13.InfiniteScrollModule, typeof i14.DbxInjectionComponentModule, typeof i15.MatListModule, typeof i16.MatIconModule], [typeof i1.DbxListComponent, typeof i2.DbxListEmptyContentComponent, typeof i3.DbxValueListViewComponent, typeof i3.DbxValueListItemViewComponent, typeof i4.DbxValueListGridSizeDirective, typeof i4.DbxValueListGridViewComponent, typeof i4.DbxValueListGridItemViewComponent, typeof i5.DbxSelectionValueListViewComponent, typeof i5.DbxSelectionValueListItemViewComponent, typeof i6.DbxValueListItemModifierDirective, typeof i7.DbxListItemDisableRippleModifierDirective]>;
|
|
21
21
|
static ɵinj: i0.ɵɵInjectorDeclaration<DbxListLayoutModule>;
|
|
22
22
|
}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dereekb/dbx-web",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.15.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^13.0.0",
|
|
6
6
|
"@angular/core": "^13.0.0",
|
|
7
7
|
"@angular/material": "^13.0.0",
|
|
8
|
-
"@dereekb/rxjs": "8.
|
|
9
|
-
"@dereekb/dbx-core": "8.
|
|
10
|
-
"angular-calendar": "
|
|
8
|
+
"@dereekb/rxjs": "8.15.1",
|
|
9
|
+
"@dereekb/dbx-core": "8.15.1",
|
|
10
|
+
"angular-calendar": "~0.29.0",
|
|
11
11
|
"@angular/flex-layout": "^13.0.0-beta.38",
|
|
12
12
|
"ng-overlay-container": "^13.0.2",
|
|
13
13
|
"@angular/cdk": "^13.0.0",
|
|
14
|
-
"angular-resize-event": "
|
|
14
|
+
"angular-resize-event": "~3.1.1",
|
|
15
15
|
"ngx-infinite-scroll": "^13.0.2",
|
|
16
16
|
"linkify-string": "4.0.0-beta.5",
|
|
17
17
|
"@uirouter/angular": "^9.1.0"
|