@igo2/common 19.0.3 → 20.0.0-next.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/action/index.d.ts +194 -3
- package/backdrop/index.d.ts +20 -3
- package/badge/index.d.ts +44 -3
- package/clickout/index.d.ts +20 -3
- package/clone/index.d.ts +18 -3
- package/collapsible/index.d.ts +43 -3
- package/color/index.d.ts +38 -3
- package/confirm-dialog/index.d.ts +39 -5
- package/context-menu/index.d.ts +50 -3
- package/custom-html/index.d.ts +30 -3
- package/dom/index.d.ts +34 -3
- package/drag-drop/index.d.ts +124 -3
- package/dynamic-component/index.d.ts +186 -3
- package/entity/index.d.ts +1532 -3
- package/environment/index.d.ts +15 -5
- package/fesm2022/igo2-common-action.mjs +28 -38
- package/fesm2022/igo2-common-action.mjs.map +1 -1
- package/fesm2022/igo2-common-backdrop.mjs +7 -7
- package/fesm2022/igo2-common-backdrop.mjs.map +1 -1
- package/fesm2022/igo2-common-badge.mjs +10 -13
- package/fesm2022/igo2-common-badge.mjs.map +1 -1
- package/fesm2022/igo2-common-clickout.mjs +10 -13
- package/fesm2022/igo2-common-clickout.mjs.map +1 -1
- package/fesm2022/igo2-common-clone.mjs +7 -7
- package/fesm2022/igo2-common-clone.mjs.map +1 -1
- package/fesm2022/igo2-common-collapsible.mjs +14 -18
- package/fesm2022/igo2-common-collapsible.mjs.map +1 -1
- package/fesm2022/igo2-common-color.mjs +9 -9
- package/fesm2022/igo2-common-color.mjs.map +1 -1
- package/fesm2022/igo2-common-confirm-dialog.mjs +19 -26
- package/fesm2022/igo2-common-confirm-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-context-menu.mjs +16 -21
- package/fesm2022/igo2-common-context-menu.mjs.map +1 -1
- package/fesm2022/igo2-common-custom-html.mjs +14 -17
- package/fesm2022/igo2-common-custom-html.mjs.map +1 -1
- package/fesm2022/igo2-common-dom.mjs +11 -14
- package/fesm2022/igo2-common-dom.mjs.map +1 -1
- package/fesm2022/igo2-common-drag-drop.mjs +15 -17
- package/fesm2022/igo2-common-drag-drop.mjs.map +1 -1
- package/fesm2022/igo2-common-dynamic-component.mjs +20 -27
- package/fesm2022/igo2-common-dynamic-component.mjs.map +1 -1
- package/fesm2022/igo2-common-entity.mjs +69 -108
- package/fesm2022/igo2-common-entity.mjs.map +1 -1
- package/fesm2022/igo2-common-flexible.mjs +13 -18
- package/fesm2022/igo2-common-flexible.mjs.map +1 -1
- package/fesm2022/igo2-common-form.mjs +77 -112
- package/fesm2022/igo2-common-form.mjs.map +1 -1
- package/fesm2022/igo2-common-home-button.mjs +7 -7
- package/fesm2022/igo2-common-home-button.mjs.map +1 -1
- package/fesm2022/igo2-common-icon.mjs +14 -21
- package/fesm2022/igo2-common-icon.mjs.map +1 -1
- package/fesm2022/igo2-common-image.mjs +53 -57
- package/fesm2022/igo2-common-image.mjs.map +1 -1
- package/fesm2022/igo2-common-interactive-tour.mjs +43 -56
- package/fesm2022/igo2-common-interactive-tour.mjs.map +1 -1
- package/fesm2022/igo2-common-json-dialog.mjs +19 -28
- package/fesm2022/igo2-common-json-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-keyvalue.mjs +7 -7
- package/fesm2022/igo2-common-keyvalue.mjs.map +1 -1
- package/fesm2022/igo2-common-list.mjs +16 -23
- package/fesm2022/igo2-common-list.mjs.map +1 -1
- package/fesm2022/igo2-common-panel.mjs +9 -9
- package/fesm2022/igo2-common-panel.mjs.map +1 -1
- package/fesm2022/igo2-common-resizable-bar.mjs +6 -6
- package/fesm2022/igo2-common-resizable-bar.mjs.map +1 -1
- package/fesm2022/igo2-common-select-value-dialog.mjs +28 -44
- package/fesm2022/igo2-common-select-value-dialog.mjs.map +1 -1
- package/fesm2022/igo2-common-sidenav.mjs +10 -16
- package/fesm2022/igo2-common-sidenav.mjs.map +1 -1
- package/fesm2022/igo2-common-spinner.mjs +15 -21
- package/fesm2022/igo2-common-spinner.mjs.map +1 -1
- package/fesm2022/igo2-common-stop-propagation.mjs +10 -10
- package/fesm2022/igo2-common-stop-propagation.mjs.map +1 -1
- package/fesm2022/igo2-common-table.mjs +9 -11
- package/fesm2022/igo2-common-table.mjs.map +1 -1
- package/fesm2022/igo2-common-tool.mjs +16 -22
- package/fesm2022/igo2-common-tool.mjs.map +1 -1
- package/fesm2022/igo2-common-widget.mjs +19 -24
- package/fesm2022/igo2-common-widget.mjs.map +1 -1
- package/fesm2022/igo2-common-workspace.mjs +20 -20
- package/fesm2022/igo2-common-workspace.mjs.map +1 -1
- package/flexible/index.d.ts +54 -3
- package/form/index.d.ts +429 -3
- package/home-button/index.d.ts +18 -3
- package/icon/index.d.ts +42 -3
- package/image/index.d.ts +35 -3
- package/index.d.ts +16 -5
- package/interactive-tour/index.d.ts +116 -5
- package/json-dialog/index.d.ts +34 -5
- package/keyvalue/index.d.ts +18 -3
- package/list/index.d.ts +102 -3
- package/package.json +10 -13
- package/panel/index.d.ts +20 -3
- package/resizable-bar/index.d.ts +37 -5
- package/select-value-dialog/index.d.ts +65 -5
- package/sidenav/index.d.ts +29 -3
- package/spinner/index.d.ts +51 -3
- package/src/style/partial/common-utils.scss +1 -1
- package/stop-propagation/index.d.ts +26 -3
- package/table/index.d.ts +105 -3
- package/tool/index.d.ts +289 -3
- package/widget/index.d.ts +105 -3
- package/workspace/index.d.ts +237 -3
- package/action/action.module.d.ts +0 -10
- package/action/actionbar/actionbar-item.component.d.ts +0 -73
- package/action/actionbar/actionbar.component.d.ts +0 -148
- package/action/actionbar/actionbar.module.d.ts +0 -10
- package/action/public_api.d.ts +0 -4
- package/action/shared/action.enums.d.ts +0 -5
- package/action/shared/action.interfaces.d.ts +0 -16
- package/action/shared/index.d.ts +0 -3
- package/action/shared/store.d.ts +0 -8
- package/action/src/action.theming.scss +0 -9
- package/action/src/actionbar/actionbar-item.theming.scss +0 -20
- package/backdrop/backdrop.component.d.ts +0 -8
- package/backdrop/backdrop.module.d.ts +0 -12
- package/backdrop/public_api.d.ts +0 -2
- package/badge/badge-icon.directive.d.ts +0 -34
- package/badge/badge-icon.module.d.ts +0 -12
- package/badge/public_api.d.ts +0 -2
- package/clickout/clickout.directive.d.ts +0 -10
- package/clickout/clickout.module.d.ts +0 -12
- package/clickout/public_api.d.ts +0 -2
- package/clone/clone.module.d.ts +0 -12
- package/clone/clone.pipe.d.ts +0 -7
- package/clone/public_api.d.ts +0 -2
- package/collapsible/collapse.directive.d.ts +0 -19
- package/collapsible/collapsible.component.d.ts +0 -13
- package/collapsible/collapsible.module.d.ts +0 -13
- package/collapsible/public_api.d.ts +0 -6
- package/color/color-picker-form-field/color-picker-form-field.component.d.ts +0 -29
- package/color/color-picker-form-field/color-picker-form-field.module.d.ts +0 -10
- package/color/color-picker-form-field/index.d.ts +0 -2
- package/color/public_api.d.ts +0 -1
- package/confirm-dialog/confirm-dialog.component.d.ts +0 -12
- package/confirm-dialog/confirm-dialog.interface.d.ts +0 -4
- package/confirm-dialog/confirm-dialog.module.d.ts +0 -12
- package/confirm-dialog/confirm-dialog.service.d.ts +0 -11
- package/confirm-dialog/public_api.d.ts +0 -4
- package/context-menu/context-menu.directive.d.ts +0 -21
- package/context-menu/context-menu.module.d.ts +0 -13
- package/context-menu/long-press.directive.d.ts +0 -19
- package/context-menu/public_api.d.ts +0 -6
- package/custom-html/custom-html.component.d.ts +0 -8
- package/custom-html/custom-html.module.d.ts +0 -13
- package/custom-html/custom-html.pipe.d.ts +0 -10
- package/custom-html/public_api.d.ts +0 -6
- package/dom/dom.interfaces.d.ts +0 -10
- package/dom/dom.module.d.ts +0 -14
- package/dom/dom.service.d.ts +0 -10
- package/dom/public_api.d.ts +0 -3
- package/drag-drop/drag-drop.directive.d.ts +0 -14
- package/drag-drop/drag-drop.module.d.ts +0 -13
- package/drag-drop/public_api.d.ts +0 -3
- package/drag-drop/tree-drag-drop/index.d.ts +0 -2
- package/drag-drop/tree-drag-drop/tree-drag-drop.directive.d.ts +0 -85
- package/drag-drop/tree-drag-drop/tree-drag-drop.interface.d.ts +0 -15
- package/dynamic-component/dynamic-component.module.d.ts +0 -10
- package/dynamic-component/dynamic-outlet/dynamic-outlet.component.d.ts +0 -66
- package/dynamic-component/dynamic-outlet/dynamic-outlet.module.d.ts +0 -10
- package/dynamic-component/public_api.d.ts +0 -4
- package/dynamic-component/shared/dynamic-component.d.ts +0 -84
- package/dynamic-component/shared/dynamic-component.interfaces.d.ts +0 -3
- package/dynamic-component/shared/dynamic-component.service.d.ts +0 -18
- package/dynamic-component/shared/index.d.ts +0 -3
- package/entity/entity-selector/entity-selector.component.d.ts +0 -93
- package/entity/entity-selector/entity-selector.module.d.ts +0 -10
- package/entity/entity-selector/index.d.ts +0 -2
- package/entity/entity-table/entity-table-row.directive.d.ts +0 -69
- package/entity/entity-table/entity-table.component.d.ts +0 -330
- package/entity/entity-table/entity-table.module.d.ts +0 -10
- package/entity/entity-table/index.d.ts +0 -2
- package/entity/entity-table-paginator/entity-table-paginator.component.d.ts +0 -50
- package/entity/entity-table-paginator/entity-table-paginator.interface.d.ts +0 -8
- package/entity/entity-table-paginator/entity-table-paginator.module.d.ts +0 -10
- package/entity/entity-table-paginator/index.d.ts +0 -3
- package/entity/entity.module.d.ts +0 -16
- package/entity/public_api.d.ts +0 -5
- package/entity/shared/entity.enums.d.ts +0 -23
- package/entity/shared/entity.interfaces.d.ts +0 -92
- package/entity/shared/entity.utils.d.ts +0 -49
- package/entity/shared/index.d.ts +0 -9
- package/entity/shared/state.d.ts +0 -108
- package/entity/shared/store.d.ts +0 -180
- package/entity/shared/strategies/filter-custom-function.d.ts +0 -51
- package/entity/shared/strategies/filter-selection.d.ts +0 -48
- package/entity/shared/strategies/index.d.ts +0 -3
- package/entity/shared/strategies/strategy.d.ts +0 -56
- package/entity/shared/transaction.d.ts +0 -171
- package/entity/shared/view.d.ts +0 -193
- package/entity/shared/watcher.d.ts +0 -72
- package/entity/src/entity-selector/entity-selector.theming.scss +0 -21
- package/entity/src/entity-table/entity-table.theming.scss +0 -21
- package/entity/src/entity.theming.scss +0 -12
- package/environment/environment.interface.d.ts +0 -13
- package/environment/public_api.d.ts +0 -1
- package/flexible/flexible.component.d.ts +0 -42
- package/flexible/flexible.module.d.ts +0 -12
- package/flexible/flexible.type.d.ts +0 -2
- package/flexible/public_api.d.ts +0 -3
- package/form/form/form.component.d.ts +0 -46
- package/form/form/form.module.d.ts +0 -10
- package/form/form/index.d.ts +0 -2
- package/form/form-dialog/form-dialog.component.d.ts +0 -19
- package/form/form-dialog/form-dialog.interface.d.ts +0 -16
- package/form/form-dialog/form-dialog.module.d.ts +0 -16
- package/form/form-dialog/form-dialog.service.d.ts +0 -11
- package/form/form-dialog/index.d.ts +0 -4
- package/form/form-field/form-field-select.component.d.ts +0 -50
- package/form/form-field/form-field-text.component.d.ts +0 -49
- package/form/form-field/form-field-textarea.component.d.ts +0 -39
- package/form/form-field/form-field.component.d.ts +0 -29
- package/form/form-field/form-field.directive.d.ts +0 -5
- package/form/form-field/form-field.module.d.ts +0 -13
- package/form/form-field/index.d.ts +0 -6
- package/form/form-group/form-group.component.d.ts +0 -44
- package/form/form-group/form-group.module.d.ts +0 -10
- package/form/form-group/index.d.ts +0 -2
- package/form/form.module.d.ts +0 -18
- package/form/public_api.d.ts +0 -6
- package/form/shared/form-field-component.d.ts +0 -1
- package/form/shared/form-field.service.d.ts +0 -16
- package/form/shared/form.interfaces.d.ts +0 -60
- package/form/shared/form.service.d.ts +0 -15
- package/form/shared/form.utils.d.ts +0 -7
- package/form/shared/index.d.ts +0 -5
- package/home-button/home-button.component.d.ts +0 -8
- package/home-button/home-button.module.d.ts +0 -10
- package/home-button/public_api.d.ts +0 -2
- package/icon/icon/icon.component.d.ts +0 -15
- package/icon/icon.provider.d.ts +0 -4
- package/icon/public_api.d.ts +0 -3
- package/icon/shared/icon.interface.d.ts +0 -4
- package/icon/shared/icon.service.d.ts +0 -12
- package/icon/shared/icons.d.ts +0 -11
- package/icon/shared/index.d.ts +0 -3
- package/image/image-error.directive.d.ts +0 -11
- package/image/image.module.d.ts +0 -13
- package/image/public_api.d.ts +0 -6
- package/image/secure-image.pipe.d.ts +0 -13
- package/interactive-tour/interactive-tour.component.d.ts +0 -33
- package/interactive-tour/interactive-tour.interface.d.ts +0 -35
- package/interactive-tour/interactive-tour.loader.d.ts +0 -18
- package/interactive-tour/interactive-tour.module.d.ts +0 -7
- package/interactive-tour/interactive-tour.service.d.ts +0 -30
- package/interactive-tour/public_api.d.ts +0 -5
- package/json-dialog/json-dialog.component.d.ts +0 -13
- package/json-dialog/json-dialog.module.d.ts +0 -12
- package/json-dialog/json-dialog.service.d.ts +0 -10
- package/json-dialog/public_api.d.ts +0 -3
- package/keyvalue/keyvalue.module.d.ts +0 -12
- package/keyvalue/keyvalue.pipe.d.ts +0 -7
- package/keyvalue/public_api.d.ts +0 -2
- package/list/list-item.directive.d.ts +0 -43
- package/list/list.component.d.ts +0 -51
- package/list/list.module.d.ts +0 -13
- package/list/public_api.d.ts +0 -6
- package/panel/panel.component.d.ts +0 -10
- package/panel/panel.module.d.ts +0 -10
- package/panel/public_api.d.ts +0 -2
- package/panel/src/panel.theming.scss +0 -20
- package/public_api.d.ts +0 -16
- package/resizable-bar/public_api.d.ts +0 -2
- package/resizable-bar/resizable-bar.component.d.ts +0 -23
- package/resizable-bar/shared/resize.directive.d.ts +0 -12
- package/select-value-dialog/public_api.d.ts +0 -5
- package/select-value-dialog/select-value-check-radio-dialog.component.d.ts +0 -25
- package/select-value-dialog/select-value-dialog.enums.d.ts +0 -4
- package/select-value-dialog/select-value-dialog.interface.d.ts +0 -16
- package/select-value-dialog/select-value-dialog.module.d.ts +0 -12
- package/select-value-dialog/select-value-dialog.service.d.ts +0 -11
- package/sidenav/public_api.d.ts +0 -2
- package/sidenav/sidenav-shim.directive.d.ts +0 -20
- package/sidenav/sidenav.module.d.ts +0 -12
- package/spinner/public_api.d.ts +0 -3
- package/spinner/spinner-activity.directive.d.ts +0 -32
- package/spinner/spinner.component.d.ts +0 -11
- package/spinner/spinner.module.d.ts +0 -14
- package/src/common.theme.scss +0 -18
- package/stop-propagation/public_api.d.ts +0 -6
- package/stop-propagation/stop-drop-propagation.directive.d.ts +0 -6
- package/stop-propagation/stop-propagation.directive.d.ts +0 -6
- package/stop-propagation/stop-propagation.module.d.ts +0 -13
- package/table/public_api.d.ts +0 -6
- package/table/table-action-color.enum.d.ts +0 -5
- package/table/table-database.d.ts +0 -10
- package/table/table-datasource.d.ts +0 -18
- package/table/table-model.interface.d.ts +0 -24
- package/table/table.component.d.ts +0 -40
- package/table/table.module.d.ts +0 -12
- package/tool/public_api.d.ts +0 -3
- package/tool/shared/index.d.ts +0 -5
- package/tool/shared/tool-component.d.ts +0 -2
- package/tool/shared/tool.interface.d.ts +0 -16
- package/tool/shared/tool.service.d.ts +0 -28
- package/tool/shared/toolbox.d.ts +0 -96
- package/tool/shared/toolbox.enums.d.ts +0 -1
- package/tool/src/tool.theming.scss +0 -5
- package/tool/src/toolbox/toolbox.theming.scss +0 -22
- package/tool/tool.module.d.ts +0 -15
- package/tool/toolbox/index.d.ts +0 -2
- package/tool/toolbox/toolbox.animation.d.ts +0 -2
- package/tool/toolbox/toolbox.component.d.ts +0 -126
- package/tool/toolbox/toolbox.module.d.ts +0 -10
- package/widget/public_api.d.ts +0 -3
- package/widget/shared/index.d.ts +0 -3
- package/widget/shared/widget.d.ts +0 -4
- package/widget/shared/widget.interfaces.d.ts +0 -12
- package/widget/shared/widget.service.d.ts +0 -10
- package/widget/widget-outlet/index.d.ts +0 -2
- package/widget/widget-outlet/widget-outlet.component.d.ts +0 -64
- package/widget/widget-outlet/widget-outlet.module.d.ts +0 -10
- package/widget/widget.module.d.ts +0 -10
- package/workspace/public_api.d.ts +0 -4
- package/workspace/shared/index.d.ts +0 -3
- package/workspace/shared/store.d.ts +0 -20
- package/workspace/shared/workspace.d.ts +0 -98
- package/workspace/shared/workspace.interfaces.d.ts +0 -9
- package/workspace/workspace-selector/index.d.ts +0 -2
- package/workspace/workspace-selector/workspace-selector.component.d.ts +0 -38
- package/workspace/workspace-selector/workspace-selector.module.d.ts +0 -10
- package/workspace/workspace-widget-outlet/index.d.ts +0 -2
- package/workspace/workspace-widget-outlet/workspace-widget-outlet.component.d.ts +0 -52
- package/workspace/workspace-widget-outlet/workspace-widget-outlet.module.d.ts +0 -10
- package/workspace/workspace.module.d.ts +0 -14
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "./entity-table-paginator.component";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated import the EntityTablePaginatorComponent directly
|
|
5
|
-
*/
|
|
6
|
-
export declare class IgoEntityTablePaginatorModule {
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IgoEntityTablePaginatorModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoEntityTablePaginatorModule, never, [typeof i1.EntityTablePaginatorComponent], [typeof i1.EntityTablePaginatorComponent]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<IgoEntityTablePaginatorModule>;
|
|
10
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EntitySelectorComponent } from './entity-selector';
|
|
2
|
-
import { EntityTableComponent } from './entity-table';
|
|
3
|
-
import { EntityTablePaginatorComponent } from './entity-table-paginator';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "./entity-selector/entity-selector.component";
|
|
6
|
-
import * as i2 from "./entity-table/entity-table.component";
|
|
7
|
-
import * as i3 from "./entity-table-paginator/entity-table-paginator.component";
|
|
8
|
-
export declare const ENTITY_DIRECTIVES: readonly [typeof EntitySelectorComponent, typeof EntityTableComponent, typeof EntityTablePaginatorComponent];
|
|
9
|
-
/**
|
|
10
|
-
* @deprecated import the components directly or ENTITY_DIRECTIVES for every components/directives
|
|
11
|
-
*/
|
|
12
|
-
export declare class IgoEntityModule {
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<IgoEntityModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<IgoEntityModule, never, [typeof i1.EntitySelectorComponent, typeof i2.EntityTableComponent, typeof i3.EntityTablePaginatorComponent], [typeof i1.EntitySelectorComponent, typeof i2.EntityTableComponent, typeof i3.EntityTablePaginatorComponent]>;
|
|
15
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<IgoEntityModule>;
|
|
16
|
-
}
|
package/entity/public_api.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare enum EntityOperationType {
|
|
2
|
-
Insert = "Insert",
|
|
3
|
-
Update = "Update",
|
|
4
|
-
Delete = "Delete"
|
|
5
|
-
}
|
|
6
|
-
export declare enum EntityTableColumnRenderer {
|
|
7
|
-
Default = "Default",
|
|
8
|
-
HTML = "HTML",
|
|
9
|
-
UnsanitizedHTML = "UnsanitizedHTML",
|
|
10
|
-
Editable = "Editable",
|
|
11
|
-
Icon = "Icon",
|
|
12
|
-
ButtonGroup = "ButtonGroup"
|
|
13
|
-
}
|
|
14
|
-
export declare enum EntityTableScrollBehavior {
|
|
15
|
-
Auto = "auto",
|
|
16
|
-
Instant = "instant",
|
|
17
|
-
Smooth = "smooth"
|
|
18
|
-
}
|
|
19
|
-
export declare enum EntityTableSelectionState {
|
|
20
|
-
None = "None",
|
|
21
|
-
All = "All",
|
|
22
|
-
Some = "Some"
|
|
23
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
|
-
import { EntityTableColumnRenderer } from './entity.enums';
|
|
3
|
-
export type EntityKey = string | number;
|
|
4
|
-
export type EntityState = Record<string, any>;
|
|
5
|
-
export interface EntityRecord<E extends object, S extends EntityState = EntityState> {
|
|
6
|
-
entity: E;
|
|
7
|
-
state: S;
|
|
8
|
-
revision: number;
|
|
9
|
-
ref: string;
|
|
10
|
-
edition?: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface EntityStoreStrategyOptions {
|
|
13
|
-
}
|
|
14
|
-
export interface EntityStoreStrategyFuncOptions extends EntityStoreStrategyOptions {
|
|
15
|
-
filterClauseFunc: EntityFilterClause;
|
|
16
|
-
}
|
|
17
|
-
export interface EntityTransactionOptions {
|
|
18
|
-
getKey?: (entity: object) => EntityKey;
|
|
19
|
-
}
|
|
20
|
-
export type EntityFilterClause<E = object> = (entity: E) => boolean;
|
|
21
|
-
export interface EntitySortClause<E = object> {
|
|
22
|
-
valueAccessor: (entity: E) => string | number;
|
|
23
|
-
direction: string;
|
|
24
|
-
nullsFirst?: boolean;
|
|
25
|
-
}
|
|
26
|
-
export interface EntityJoinClause {
|
|
27
|
-
source: Observable<any | void>;
|
|
28
|
-
reduce: (param1: object, param2: any) => object;
|
|
29
|
-
}
|
|
30
|
-
export interface EntityOperationState {
|
|
31
|
-
added: boolean;
|
|
32
|
-
canceled: boolean;
|
|
33
|
-
}
|
|
34
|
-
export interface EntityTableTemplate {
|
|
35
|
-
columns: EntityTableColumn[];
|
|
36
|
-
selection?: boolean;
|
|
37
|
-
selectionCheckbox?: boolean;
|
|
38
|
-
selectMany?: boolean;
|
|
39
|
-
sort?: boolean;
|
|
40
|
-
fixedHeader?: boolean;
|
|
41
|
-
tableHeight?: string;
|
|
42
|
-
valueAccessor?: (entity: object, property: string, record: EntityRecord<object>) => any;
|
|
43
|
-
headerClassFunc?: () => Record<string, boolean>;
|
|
44
|
-
rowClassFunc?: (entity: object, record: EntityRecord<object>) => Record<string, boolean>;
|
|
45
|
-
cellClassFunc?: (entity: object, column: EntityTableColumn, record: EntityRecord<object>) => Record<string, boolean>;
|
|
46
|
-
}
|
|
47
|
-
export interface EntityTableColumnValidation {
|
|
48
|
-
readonly?: boolean;
|
|
49
|
-
mandatory?: boolean;
|
|
50
|
-
maxlength?: number;
|
|
51
|
-
minlength?: number;
|
|
52
|
-
minValue?: number;
|
|
53
|
-
maxValue?: number;
|
|
54
|
-
}
|
|
55
|
-
export interface TableRelation {
|
|
56
|
-
table: string;
|
|
57
|
-
}
|
|
58
|
-
export interface EntityTableColumn {
|
|
59
|
-
validation?: EntityTableColumnValidation;
|
|
60
|
-
name: string;
|
|
61
|
-
title: string;
|
|
62
|
-
renderer?: EntityTableColumnRenderer;
|
|
63
|
-
valueAccessor?: (entity: object, record: EntityRecord<object>) => any;
|
|
64
|
-
visible?: boolean;
|
|
65
|
-
linkColumnForce?: string;
|
|
66
|
-
sort?: boolean;
|
|
67
|
-
type?: string;
|
|
68
|
-
multiple?: boolean;
|
|
69
|
-
domainValues?: SelectOption[];
|
|
70
|
-
relation?: TableRelation;
|
|
71
|
-
tooltip?: string;
|
|
72
|
-
cellClassFunc?: (entity: object, record: EntityRecord<object>) => Record<string, boolean>;
|
|
73
|
-
step?: number;
|
|
74
|
-
icon?: string;
|
|
75
|
-
onBlur?: (event: Event) => void;
|
|
76
|
-
onChange?: (event: Event) => void;
|
|
77
|
-
onClick?: (event: Event) => void;
|
|
78
|
-
onFocus?: (event: Event) => void;
|
|
79
|
-
}
|
|
80
|
-
export interface SelectOption {
|
|
81
|
-
id: number;
|
|
82
|
-
value: string;
|
|
83
|
-
disabled?: boolean;
|
|
84
|
-
}
|
|
85
|
-
export interface EntityTableButton {
|
|
86
|
-
icon: string;
|
|
87
|
-
click: (entity: object, record: EntityRecord<object>) => void;
|
|
88
|
-
color?: 'primary' | 'accent' | 'warn';
|
|
89
|
-
disabled?: boolean;
|
|
90
|
-
style?: 'mat-mini-fab' | 'mat-icon-button';
|
|
91
|
-
editMode?: boolean;
|
|
92
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { EntityKey } from './entity.interfaces';
|
|
2
|
-
/**
|
|
3
|
-
* Get an entity's named property. Nested properties are supported
|
|
4
|
-
* with the dotted notation. (i.e 'author.name')
|
|
5
|
-
*
|
|
6
|
-
* Note: this method is a 'best attempt' at getting an entity's property.
|
|
7
|
-
* It fits the most common cases but you might need to explicitely define
|
|
8
|
-
* a property getter when using an EntityStore, for example.
|
|
9
|
-
* @param entity Entity
|
|
10
|
-
* @param property Property name
|
|
11
|
-
* @returns Property value
|
|
12
|
-
*/
|
|
13
|
-
export declare function getEntityProperty(entity: object, property: string): any;
|
|
14
|
-
/**
|
|
15
|
-
* Get an entity's id. An entity's id can be one of:
|
|
16
|
-
* 'entity.meta.id', 'entity.meta.idProperty' or 'entity.id'.
|
|
17
|
-
*
|
|
18
|
-
* Note: See the note in the 'getEntityProperty' documentation.
|
|
19
|
-
* @param entity Entity
|
|
20
|
-
* @returns Entity id
|
|
21
|
-
*/
|
|
22
|
-
export declare function getEntityId(entity: object): EntityKey;
|
|
23
|
-
/**
|
|
24
|
-
* Get an entity's title. An entity's title can be one of:
|
|
25
|
-
* 'entity.meta.title', 'entity.meta.titleProperty' or 'entity.title'.
|
|
26
|
-
* @param entity Entity
|
|
27
|
-
* @returns Entity title
|
|
28
|
-
*/
|
|
29
|
-
export declare function getEntityTitle(entity: object): string;
|
|
30
|
-
/**
|
|
31
|
-
* Get an entity's HTML title. An entity's HTML title can be one of:
|
|
32
|
-
* 'entity.meta.titleHtml', 'entity.meta.titleHtmlProperty' or 'entity.titleHtml'.
|
|
33
|
-
* @param entity Entity
|
|
34
|
-
* @returns Entity HTML title
|
|
35
|
-
*/
|
|
36
|
-
export declare function getEntityTitleHtml(entity: object): string;
|
|
37
|
-
/**
|
|
38
|
-
* Get an entity's icon. An entity's icon can be one of:
|
|
39
|
-
* 'entity.meta.icon', 'entity.meta.iconProperty' or 'entity.icon'.
|
|
40
|
-
* @param entity Entity
|
|
41
|
-
* @returns Entity icon
|
|
42
|
-
*/
|
|
43
|
-
export declare function getEntityIcon(entity: object): string;
|
|
44
|
-
/**
|
|
45
|
-
* Get an entity's revision.
|
|
46
|
-
* @param entity Entity
|
|
47
|
-
* @returns Entity revision
|
|
48
|
-
*/
|
|
49
|
-
export declare function getEntityRevision(entity: object): number;
|
package/entity/shared/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './entity.enums';
|
|
2
|
-
export * from './entity.interfaces';
|
|
3
|
-
export * from './entity.utils';
|
|
4
|
-
export * from './store';
|
|
5
|
-
export * from './state';
|
|
6
|
-
export * from './watcher';
|
|
7
|
-
export * from './transaction';
|
|
8
|
-
export * from './view';
|
|
9
|
-
export * from './strategies';
|
package/entity/shared/state.d.ts
DELETED
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { ReplaySubject } from 'rxjs';
|
|
2
|
-
import { EntityKey, EntityState } from './entity.interfaces';
|
|
3
|
-
interface EntityStateManagerOptions<E extends object> {
|
|
4
|
-
getKey?: (entity: object) => EntityKey;
|
|
5
|
-
index?: Map<EntityKey, E>;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* This class is used to track a store's entities state
|
|
9
|
-
*/
|
|
10
|
-
export declare class EntityStateManager<E extends object, S extends EntityState = EntityState> {
|
|
11
|
-
private options;
|
|
12
|
-
/**
|
|
13
|
-
* State index
|
|
14
|
-
*/
|
|
15
|
-
readonly index: Map<EntityKey, S>;
|
|
16
|
-
/**
|
|
17
|
-
* Change emitter
|
|
18
|
-
*/
|
|
19
|
-
readonly change$: ReplaySubject<void>;
|
|
20
|
-
/**
|
|
21
|
-
* Method to get an entity's id
|
|
22
|
-
*/
|
|
23
|
-
readonly getKey: (E: any) => EntityKey;
|
|
24
|
-
constructor(options?: EntityStateManagerOptions<E>);
|
|
25
|
-
/**
|
|
26
|
-
* Clear state
|
|
27
|
-
*/
|
|
28
|
-
clear(): void;
|
|
29
|
-
/**
|
|
30
|
-
* Get an entity's state
|
|
31
|
-
* @param entity Entity
|
|
32
|
-
* @returns State
|
|
33
|
-
*/
|
|
34
|
-
get(entity: E): S;
|
|
35
|
-
/**
|
|
36
|
-
* Set an entity's state
|
|
37
|
-
* @param entity Entity
|
|
38
|
-
* @param state State
|
|
39
|
-
*/
|
|
40
|
-
set(entity: E, state: S): void;
|
|
41
|
-
/**
|
|
42
|
-
* Set many entitie's state
|
|
43
|
-
* @param entitie Entities
|
|
44
|
-
* @param state State
|
|
45
|
-
*/
|
|
46
|
-
setMany(entities: E[], state: S): void;
|
|
47
|
-
/**
|
|
48
|
-
* Set state of all entities that already have a state. This is not
|
|
49
|
-
* the same as setting the state of all the store's entities.
|
|
50
|
-
* @param state State
|
|
51
|
-
*/
|
|
52
|
-
setAll(state: S): void;
|
|
53
|
-
/**
|
|
54
|
-
* Update an entity's state
|
|
55
|
-
* @param entity Entity
|
|
56
|
-
* @param changes State changes
|
|
57
|
-
*/
|
|
58
|
-
update(entity: E, changes: Partial<S>, exclusive?: boolean): void;
|
|
59
|
-
/**
|
|
60
|
-
* Update many entitie's state
|
|
61
|
-
* @param entitie Entities
|
|
62
|
-
* @param changes State changes
|
|
63
|
-
*/
|
|
64
|
-
updateMany(entities: E[], changes: Partial<S>, exclusive?: boolean): void;
|
|
65
|
-
/**
|
|
66
|
-
* Reversee an entity's state
|
|
67
|
-
* @param entity Entity
|
|
68
|
-
* @param keys State keys to reverse
|
|
69
|
-
*/
|
|
70
|
-
reverse(entity: E, keys: string[]): void;
|
|
71
|
-
/**
|
|
72
|
-
* Reverse many entitie's state
|
|
73
|
-
* @param entitie Entities
|
|
74
|
-
* @param keys State keys to reverse
|
|
75
|
-
*/
|
|
76
|
-
reverseMany(entities: E[], keys: string[]): void;
|
|
77
|
-
/**
|
|
78
|
-
* Update state of all entities that already have a state. This is not
|
|
79
|
-
* the same as updating the state of all the store's entities.
|
|
80
|
-
* @param changes State
|
|
81
|
-
*/
|
|
82
|
-
updateAll(changes: Partial<S>): void;
|
|
83
|
-
/**
|
|
84
|
-
* When some state changes are flagged as 'exclusive', reverse
|
|
85
|
-
* the state of all other entities. Changes are reversable when
|
|
86
|
-
* they are boolean.
|
|
87
|
-
* @param entitie Entities
|
|
88
|
-
* @param changes State changes
|
|
89
|
-
*/
|
|
90
|
-
private updateManyExclusive;
|
|
91
|
-
/**
|
|
92
|
-
* Compute a 'reversed' version of some state changes.
|
|
93
|
-
* Changes are reversable when they are boolean.
|
|
94
|
-
* @param changes State changes
|
|
95
|
-
* @returns Reversed state changes
|
|
96
|
-
*/
|
|
97
|
-
private reverseChanges;
|
|
98
|
-
/**
|
|
99
|
-
* Return all the keys in that state and in the store it's bound to, if any.
|
|
100
|
-
* @returns Set of keys
|
|
101
|
-
*/
|
|
102
|
-
private getAllKeys;
|
|
103
|
-
/**
|
|
104
|
-
* Emit 'change' event
|
|
105
|
-
*/
|
|
106
|
-
private next;
|
|
107
|
-
}
|
|
108
|
-
export {};
|
package/entity/shared/store.d.ts
DELETED
|
@@ -1,180 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { EntityKey, EntityRecord, EntityState } from './entity.interfaces';
|
|
3
|
-
import { EntityStateManager } from './state';
|
|
4
|
-
import type { EntityStoreStrategy } from './strategies/strategy';
|
|
5
|
-
import { EntityView } from './view';
|
|
6
|
-
export interface EntityStoreOptions {
|
|
7
|
-
getKey?: (entity: object) => EntityKey;
|
|
8
|
-
getProperty?: (entity: object, property: string) => any;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* An entity store class holds any number of entities
|
|
12
|
-
* as well as their state. It can be observed, filtered and sorted and
|
|
13
|
-
* provides methods to insert, update or delete entities.
|
|
14
|
-
*/
|
|
15
|
-
export declare class EntityStore<E extends object = object, S extends EntityState = EntityState> {
|
|
16
|
-
/**
|
|
17
|
-
* Observable of the raw entities
|
|
18
|
-
*/
|
|
19
|
-
readonly entities$: BehaviorSubject<E[]>;
|
|
20
|
-
/**
|
|
21
|
-
* Number of entities
|
|
22
|
-
*/
|
|
23
|
-
readonly count$: BehaviorSubject<number>;
|
|
24
|
-
get count(): number;
|
|
25
|
-
/**
|
|
26
|
-
* Whether the store is empty
|
|
27
|
-
*/
|
|
28
|
-
readonly empty$: BehaviorSubject<boolean>;
|
|
29
|
-
get empty(): boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Entity store state
|
|
32
|
-
*/
|
|
33
|
-
readonly state: EntityStateManager<E, S>;
|
|
34
|
-
/**
|
|
35
|
-
* View of all the entities
|
|
36
|
-
*/
|
|
37
|
-
readonly view: EntityView<E>;
|
|
38
|
-
/**
|
|
39
|
-
* View of all the entities and their state
|
|
40
|
-
*/
|
|
41
|
-
readonly stateView: EntityView<E, EntityRecord<E, S>>;
|
|
42
|
-
/**
|
|
43
|
-
* Method to get an entity's id
|
|
44
|
-
*/
|
|
45
|
-
readonly getKey: (E: any) => EntityKey;
|
|
46
|
-
/**
|
|
47
|
-
* Method to get an entity's named property
|
|
48
|
-
*/
|
|
49
|
-
readonly getProperty: (E: any, prop: string) => any;
|
|
50
|
-
/**
|
|
51
|
-
* Store index
|
|
52
|
-
*/
|
|
53
|
-
get index(): Map<EntityKey, E>;
|
|
54
|
-
private _index;
|
|
55
|
-
/**
|
|
56
|
-
* Store index
|
|
57
|
-
*/
|
|
58
|
-
get pristine(): boolean;
|
|
59
|
-
private _pristine;
|
|
60
|
-
/**
|
|
61
|
-
* Strategies
|
|
62
|
-
*/
|
|
63
|
-
private strategies;
|
|
64
|
-
constructor(entities: E[], options?: EntityStoreOptions);
|
|
65
|
-
/**
|
|
66
|
-
* Get an entity from the store by key
|
|
67
|
-
* @param key Key
|
|
68
|
-
* @returns Entity
|
|
69
|
-
*/
|
|
70
|
-
get(key: EntityKey): E;
|
|
71
|
-
/**
|
|
72
|
-
* Get all entities in the store
|
|
73
|
-
* @returns Array of entities
|
|
74
|
-
*/
|
|
75
|
-
all(): E[];
|
|
76
|
-
/**
|
|
77
|
-
* Set this store's entities
|
|
78
|
-
* @param entities Entities
|
|
79
|
-
*/
|
|
80
|
-
load(entities: E[], pristine?: boolean): void;
|
|
81
|
-
/**
|
|
82
|
-
* Clear the store's entities but keep the state and views intact.
|
|
83
|
-
* Views won't return any data but future data will be subject to the
|
|
84
|
-
* current views filter and sort
|
|
85
|
-
*/
|
|
86
|
-
softClear(): void;
|
|
87
|
-
/**
|
|
88
|
-
* Clear the store's entities, state and views
|
|
89
|
-
*/
|
|
90
|
-
clear(): void;
|
|
91
|
-
destroy(): void;
|
|
92
|
-
/**
|
|
93
|
-
* Insert an entity into the store
|
|
94
|
-
* @param entity Entity
|
|
95
|
-
*/
|
|
96
|
-
insert(entity: E): void;
|
|
97
|
-
/**
|
|
98
|
-
* Insert many entities into the store
|
|
99
|
-
* @param entities Entities
|
|
100
|
-
*/
|
|
101
|
-
insertMany(entities: E[]): void;
|
|
102
|
-
/**
|
|
103
|
-
* Update or insert an entity into the store
|
|
104
|
-
* @param entity Entity
|
|
105
|
-
*/
|
|
106
|
-
update(entity: E): void;
|
|
107
|
-
/**
|
|
108
|
-
* Update or insert many entities into the store
|
|
109
|
-
* @param entities Entities
|
|
110
|
-
*/
|
|
111
|
-
updateMany(entities: E[]): void;
|
|
112
|
-
/**
|
|
113
|
-
* Add a strategy to this store
|
|
114
|
-
* @param strategy Entity store strategy
|
|
115
|
-
* @returns Entity store
|
|
116
|
-
*/
|
|
117
|
-
addStrategy(strategy: EntityStoreStrategy, activate?: boolean): EntityStore;
|
|
118
|
-
/**
|
|
119
|
-
* Remove a strategy from this store
|
|
120
|
-
* @param strategy Entity store strategy
|
|
121
|
-
* @returns Entity store
|
|
122
|
-
*/
|
|
123
|
-
removeStrategy(strategy: EntityStoreStrategy): EntityStore;
|
|
124
|
-
/**
|
|
125
|
-
* Return strategies of a given type
|
|
126
|
-
* @param type Entity store strategy class
|
|
127
|
-
* @returns Strategies
|
|
128
|
-
*/
|
|
129
|
-
getStrategyOfType(type: typeof EntityStoreStrategy): EntityStoreStrategy;
|
|
130
|
-
/**
|
|
131
|
-
* Activate strategies of a given type
|
|
132
|
-
* @param type Entity store strategy class
|
|
133
|
-
*/
|
|
134
|
-
activateStrategyOfType(type: typeof EntityStoreStrategy): void;
|
|
135
|
-
/**
|
|
136
|
-
* Deactivate strategies of a given type
|
|
137
|
-
* @param type Entity store strategy class
|
|
138
|
-
*/
|
|
139
|
-
deactivateStrategyOfType(type: typeof EntityStoreStrategy): void;
|
|
140
|
-
/**
|
|
141
|
-
* Delete an entity from the store
|
|
142
|
-
* @param entity Entity
|
|
143
|
-
*/
|
|
144
|
-
delete(entity: E): void;
|
|
145
|
-
/**
|
|
146
|
-
* Delete many entities from the store
|
|
147
|
-
* @param entities Entities
|
|
148
|
-
*/
|
|
149
|
-
deleteMany(entities: E[]): void;
|
|
150
|
-
/**
|
|
151
|
-
* Generate a complete index of all the entities
|
|
152
|
-
* @param entities Entities
|
|
153
|
-
* @returns Index
|
|
154
|
-
*/
|
|
155
|
-
private generateIndex;
|
|
156
|
-
/**
|
|
157
|
-
* Push the index's entities into the entities$ observable
|
|
158
|
-
*/
|
|
159
|
-
private next;
|
|
160
|
-
/**
|
|
161
|
-
* Update the store's count and empty
|
|
162
|
-
*/
|
|
163
|
-
private updateCount;
|
|
164
|
-
/**
|
|
165
|
-
* Create the entity state manager
|
|
166
|
-
* @returns EntityStateManager
|
|
167
|
-
*/
|
|
168
|
-
private createStateManager;
|
|
169
|
-
/**
|
|
170
|
-
* Create the data view
|
|
171
|
-
* @returns EntityView<E>
|
|
172
|
-
*/
|
|
173
|
-
private createDataView;
|
|
174
|
-
/**
|
|
175
|
-
* Create the state view
|
|
176
|
-
* @returns EntityView<EntityRecord<E>>
|
|
177
|
-
*/
|
|
178
|
-
private createStateView;
|
|
179
|
-
private statesAreTheSame;
|
|
180
|
-
}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { EntityStoreStrategyFuncOptions } from '../entity.interfaces';
|
|
2
|
-
import { EntityStore } from '../store';
|
|
3
|
-
import { EntityStoreStrategy } from './strategy';
|
|
4
|
-
/**
|
|
5
|
-
* When active, this strategy filters a store's stateView to return
|
|
6
|
-
* selected entities only.
|
|
7
|
-
*/
|
|
8
|
-
export declare class EntityStoreFilterCustomFuncStrategy extends EntityStoreStrategy {
|
|
9
|
-
protected options: EntityStoreStrategyFuncOptions;
|
|
10
|
-
constructor(options: EntityStoreStrategyFuncOptions);
|
|
11
|
-
/**
|
|
12
|
-
* Store / filter ids map
|
|
13
|
-
*/
|
|
14
|
-
private filters;
|
|
15
|
-
/**
|
|
16
|
-
* Bind this strategy to a store and start filtering it
|
|
17
|
-
* @param store Entity store
|
|
18
|
-
*/
|
|
19
|
-
bindStore(store: EntityStore): void;
|
|
20
|
-
/**
|
|
21
|
-
* Unbind this strategy from a store and stop filtering it
|
|
22
|
-
* @param store Entity store
|
|
23
|
-
*/
|
|
24
|
-
unbindStore(store: EntityStore): void;
|
|
25
|
-
/**
|
|
26
|
-
* Start filtering all stores
|
|
27
|
-
* @internal
|
|
28
|
-
*/
|
|
29
|
-
protected doActivate(): void;
|
|
30
|
-
/**
|
|
31
|
-
* Stop filtering all stores
|
|
32
|
-
* @internal
|
|
33
|
-
*/
|
|
34
|
-
protected doDeactivate(): void;
|
|
35
|
-
/**
|
|
36
|
-
* Filter all stores
|
|
37
|
-
*/
|
|
38
|
-
private filterAll;
|
|
39
|
-
/**
|
|
40
|
-
* Unfilter all stores
|
|
41
|
-
*/
|
|
42
|
-
private unfilterAll;
|
|
43
|
-
/**
|
|
44
|
-
* Filter a store and add it to the filters map
|
|
45
|
-
*/
|
|
46
|
-
private filterStore;
|
|
47
|
-
/**
|
|
48
|
-
* Unfilter a store and delete it from the filters map
|
|
49
|
-
*/
|
|
50
|
-
private unfilterStore;
|
|
51
|
-
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { EntityStore } from '../store';
|
|
2
|
-
import { EntityStoreStrategy } from './strategy';
|
|
3
|
-
/**
|
|
4
|
-
* When active, this strategy filters a store's stateView to return
|
|
5
|
-
* selected entities only.
|
|
6
|
-
*/
|
|
7
|
-
export declare class EntityStoreFilterSelectionStrategy extends EntityStoreStrategy {
|
|
8
|
-
/**
|
|
9
|
-
* Store / filter ids map
|
|
10
|
-
*/
|
|
11
|
-
private filters;
|
|
12
|
-
/**
|
|
13
|
-
* Bind this strategy to a store and start filtering it
|
|
14
|
-
* @param store Entity store
|
|
15
|
-
*/
|
|
16
|
-
bindStore(store: EntityStore): void;
|
|
17
|
-
/**
|
|
18
|
-
* Unbind this strategy from a store and stop filtering it
|
|
19
|
-
* @param store Entity store
|
|
20
|
-
*/
|
|
21
|
-
unbindStore(store: EntityStore): void;
|
|
22
|
-
/**
|
|
23
|
-
* Start filtering all stores
|
|
24
|
-
* @internal
|
|
25
|
-
*/
|
|
26
|
-
protected doActivate(): void;
|
|
27
|
-
/**
|
|
28
|
-
* Stop filtering all stores
|
|
29
|
-
* @internal
|
|
30
|
-
*/
|
|
31
|
-
protected doDeactivate(): void;
|
|
32
|
-
/**
|
|
33
|
-
* Filter all stores
|
|
34
|
-
*/
|
|
35
|
-
private filterAll;
|
|
36
|
-
/**
|
|
37
|
-
* Unfilter all stores
|
|
38
|
-
*/
|
|
39
|
-
private unfilterAll;
|
|
40
|
-
/**
|
|
41
|
-
* Filter a store and add it to the filters map
|
|
42
|
-
*/
|
|
43
|
-
private filterStore;
|
|
44
|
-
/**
|
|
45
|
-
* Unfilter a store and delete it from the filters map
|
|
46
|
-
*/
|
|
47
|
-
private unfilterStore;
|
|
48
|
-
}
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
import { EntityStoreStrategyOptions } from '../entity.interfaces';
|
|
3
|
-
import type { EntityStore } from '../store';
|
|
4
|
-
/**
|
|
5
|
-
* Entity store strategies. They can do pretty much anything during a store's
|
|
6
|
-
* lifetime. For example, they may act as triggers when something happens.
|
|
7
|
-
* Sharing a strategy is a good idea when multiple strategies would have
|
|
8
|
-
* on cancelling effect on each other.
|
|
9
|
-
*
|
|
10
|
-
* At creation, strategy is inactive and needs to be manually activated.
|
|
11
|
-
*/
|
|
12
|
-
export declare class EntityStoreStrategy {
|
|
13
|
-
protected options: EntityStoreStrategyOptions;
|
|
14
|
-
/**
|
|
15
|
-
* Feature store
|
|
16
|
-
* @internal
|
|
17
|
-
*/
|
|
18
|
-
protected stores: EntityStore[];
|
|
19
|
-
/**
|
|
20
|
-
* Whether this strategy is active
|
|
21
|
-
* @internal
|
|
22
|
-
*/
|
|
23
|
-
get active(): boolean;
|
|
24
|
-
readonly active$: BehaviorSubject<boolean>;
|
|
25
|
-
constructor(options?: EntityStoreStrategyOptions);
|
|
26
|
-
/**
|
|
27
|
-
* Activate the strategy. If it's already active, it'll be deactivated
|
|
28
|
-
* and activated again.
|
|
29
|
-
*/
|
|
30
|
-
activate(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Activate the strategy. If it's already active, it'll be deactivated
|
|
33
|
-
* and activated again.
|
|
34
|
-
*/
|
|
35
|
-
deactivate(): void;
|
|
36
|
-
/**
|
|
37
|
-
* Bind this strategy to a store
|
|
38
|
-
* @param store Feature store
|
|
39
|
-
*/
|
|
40
|
-
bindStore(store: EntityStore): void;
|
|
41
|
-
/**
|
|
42
|
-
* Unbind this strategy from store
|
|
43
|
-
* @param store Feature store
|
|
44
|
-
*/
|
|
45
|
-
unbindStore(store: EntityStore): void;
|
|
46
|
-
/**
|
|
47
|
-
* Do the stataegy activation
|
|
48
|
-
* @internal
|
|
49
|
-
*/
|
|
50
|
-
protected doActivate(): void;
|
|
51
|
-
/**
|
|
52
|
-
* Do the strategy deactivation
|
|
53
|
-
* @internal
|
|
54
|
-
*/
|
|
55
|
-
protected doDeactivate(): void;
|
|
56
|
-
}
|