@igo2/common 1.8.1 → 1.9.3
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/bundles/igo2-common.umd.js +10700 -10473
- package/bundles/igo2-common.umd.js.map +1 -1
- package/esm2015/igo2-common.js +5 -5
- package/esm2015/lib/action/action.module.js +29 -28
- package/esm2015/lib/action/actionbar/actionbar-item.component.js +257 -257
- package/esm2015/lib/action/actionbar/actionbar.component.js +385 -387
- package/esm2015/lib/action/actionbar/actionbar.module.js +59 -58
- package/esm2015/lib/action/index.js +3 -3
- package/esm2015/lib/action/shared/action.enums.js +7 -7
- package/esm2015/lib/action/shared/action.interfaces.js +2 -1
- package/esm2015/lib/action/shared/index.js +4 -4
- package/esm2015/lib/action/shared/store.js +8 -8
- package/esm2015/lib/backdrop/backdrop.component.js +30 -30
- package/esm2015/lib/backdrop/backdrop.module.js +25 -24
- package/esm2015/lib/backdrop/index.js +2 -2
- package/esm2015/lib/badge-icon/badge-icon.directive.js +125 -121
- package/esm2015/lib/badge-icon/badge-icon.module.js +26 -25
- package/esm2015/lib/badge-icon/index.js +2 -2
- package/esm2015/lib/clickout/clickout.directive.js +32 -32
- package/esm2015/lib/clickout/clickout.module.js +24 -23
- package/esm2015/lib/clickout/index.js +2 -2
- package/esm2015/lib/clone/clone.module.js +24 -23
- package/esm2015/lib/clone/clone.pipe.js +24 -24
- package/esm2015/lib/clone/index.js +2 -2
- package/esm2015/lib/collapsible/collapse.directive.js +55 -55
- package/esm2015/lib/collapsible/collapsible.component.js +63 -63
- package/esm2015/lib/collapsible/collapsible.module.js +27 -26
- package/esm2015/lib/collapsible/index.js +3 -3
- package/esm2015/lib/confirm-dialog/confirm-dialog.component.js +50 -51
- package/esm2015/lib/confirm-dialog/confirm-dialog.module.js +29 -28
- package/esm2015/lib/confirm-dialog/confirm-dialog.service.js +22 -23
- package/esm2015/lib/confirm-dialog/index.js +3 -3
- package/esm2015/lib/context-menu/context-menu.directive.js +135 -89
- package/esm2015/lib/context-menu/context-menu.module.js +24 -23
- package/esm2015/lib/context-menu/index.js +2 -2
- package/esm2015/lib/custom-html/custom-html.component.js +32 -32
- package/esm2015/lib/custom-html/custom-html.module.js +49 -48
- package/esm2015/lib/custom-html/custom-html.pipe.js +18 -19
- package/esm2015/lib/custom-html/index.js +3 -3
- package/esm2015/lib/drag-drop/drag-drop.directive.js +88 -88
- package/esm2015/lib/drag-drop/drag-drop.module.js +24 -23
- package/esm2015/lib/drag-drop/index.js +2 -2
- package/esm2015/lib/dynamic-component/dynamic-component.module.js +33 -32
- package/esm2015/lib/dynamic-component/dynamic-outlet/dynamic-outlet.component.js +124 -125
- package/esm2015/lib/dynamic-component/dynamic-outlet/dynamic-outlet.module.js +30 -29
- package/esm2015/lib/dynamic-component/index.js +3 -3
- package/esm2015/lib/dynamic-component/shared/dynamic-component.interfaces.js +2 -1
- package/esm2015/lib/dynamic-component/shared/dynamic-component.js +174 -174
- package/esm2015/lib/dynamic-component/shared/dynamic-component.service.js +29 -29
- package/esm2015/lib/dynamic-component/shared/index.js +4 -4
- package/esm2015/lib/entity/entity-selector/entity-selector.component.js +201 -202
- package/esm2015/lib/entity/entity-selector/entity-selector.module.js +34 -33
- package/esm2015/lib/entity/entity-table/entity-table-row.directive.js +137 -137
- package/esm2015/lib/entity/entity-table/entity-table.component.js +912 -916
- package/esm2015/lib/entity/entity-table/entity-table.module.js +77 -76
- package/esm2015/lib/entity/entity-table-paginator/entity-table-paginator.component.js +138 -140
- package/esm2015/lib/entity/entity-table-paginator/entity-table-paginator.interface.js +2 -1
- package/esm2015/lib/entity/entity-table-paginator/entity-table-paginator.module.js +30 -29
- package/esm2015/lib/entity/entity.module.js +33 -32
- package/esm2015/lib/entity/index.js +6 -6
- package/esm2015/lib/entity/shared/entity.enums.js +27 -27
- package/esm2015/lib/entity/shared/entity.interfaces.js +2 -1
- package/esm2015/lib/entity/shared/entity.utils.js +67 -67
- package/esm2015/lib/entity/shared/index.js +10 -10
- package/esm2015/lib/entity/shared/state.js +191 -191
- package/esm2015/lib/entity/shared/store.js +288 -288
- package/esm2015/lib/entity/shared/strategies/filter-custom-function.js +79 -79
- package/esm2015/lib/entity/shared/strategies/filter-selection.js +84 -84
- package/esm2015/lib/entity/shared/strategies/index.js +4 -4
- package/esm2015/lib/entity/shared/strategies/strategy.js +75 -75
- package/esm2015/lib/entity/shared/transaction.js +316 -316
- package/esm2015/lib/entity/shared/view.js +315 -315
- package/esm2015/lib/entity/shared/watcher.js +120 -120
- package/esm2015/lib/flexible/flexible.component.js +158 -159
- package/esm2015/lib/flexible/flexible.module.js +24 -23
- package/esm2015/lib/flexible/flexible.type.js +2 -1
- package/esm2015/lib/flexible/index.js +3 -3
- package/esm2015/lib/form/form/form.component.js +125 -125
- package/esm2015/lib/form/form/form.module.js +42 -41
- package/esm2015/lib/form/form-field/form-field-select.component.js +132 -132
- package/esm2015/lib/form/form-field/form-field-text.component.js +108 -108
- package/esm2015/lib/form/form-field/form-field-textarea.component.js +110 -110
- package/esm2015/lib/form/form-field/form-field.component.js +77 -78
- package/esm2015/lib/form/form-field/form-field.module.js +76 -75
- package/esm2015/lib/form/form-field/index.js +5 -5
- package/esm2015/lib/form/form-group/form-group.component.js +110 -110
- package/esm2015/lib/form/form-group/form-group.module.js +42 -41
- package/esm2015/lib/form/form.module.js +51 -50
- package/esm2015/lib/form/index.js +5 -5
- package/esm2015/lib/form/shared/form-field-component.js +7 -7
- package/esm2015/lib/form/shared/form-field.service.js +29 -29
- package/esm2015/lib/form/shared/form.interfaces.js +2 -1
- package/esm2015/lib/form/shared/form.service.js +77 -77
- package/esm2015/lib/form/shared/form.utils.js +40 -40
- package/esm2015/lib/form/shared/index.js +6 -6
- package/esm2015/lib/home-button/home-button.component.js +35 -0
- package/esm2015/lib/home-button/home-button.module.js +43 -0
- package/esm2015/lib/home-button/index.js +2 -0
- package/esm2015/lib/image/image.module.js +24 -23
- package/esm2015/lib/image/index.js +2 -2
- package/esm2015/lib/image/secure-image.pipe.js +48 -51
- package/esm2015/lib/interactive-tour/index.js +5 -5
- package/esm2015/lib/interactive-tour/interactive-tour.component.js +140 -142
- package/esm2015/lib/interactive-tour/interactive-tour.interface.js +2 -1
- package/esm2015/lib/interactive-tour/interactive-tour.loader.js +44 -46
- package/esm2015/lib/interactive-tour/interactive-tour.module.js +42 -41
- package/esm2015/lib/interactive-tour/interactive-tour.service.js +285 -288
- package/esm2015/lib/json-dialog/index.js +3 -3
- package/esm2015/lib/json-dialog/json-dialog.component.js +116 -117
- package/esm2015/lib/json-dialog/json-dialog.module.js +29 -28
- package/esm2015/lib/json-dialog/json-dialog.service.js +24 -25
- package/esm2015/lib/keyvalue/index.js +2 -2
- package/esm2015/lib/keyvalue/keyvalue.module.js +24 -23
- package/esm2015/lib/keyvalue/keyvalue.pipe.js +18 -18
- package/esm2015/lib/list/index.js +3 -3
- package/esm2015/lib/list/list-item.directive.js +165 -165
- package/esm2015/lib/list/list.component.js +266 -266
- package/esm2015/lib/list/list.module.js +29 -28
- package/esm2015/lib/panel/index.js +2 -2
- package/esm2015/lib/panel/panel.component.js +67 -67
- package/esm2015/lib/panel/panel.module.js +19 -18
- package/esm2015/lib/sidenav/index.js +2 -2
- package/esm2015/lib/sidenav/sidenav-shim.directive.js +55 -56
- package/esm2015/lib/sidenav/sidenav.module.js +24 -23
- package/esm2015/lib/spinner/index.js +3 -3
- package/esm2015/lib/spinner/spinner-activity.directive.js +47 -49
- package/esm2015/lib/spinner/spinner.component.js +40 -40
- package/esm2015/lib/spinner/spinner.module.js +21 -20
- package/esm2015/lib/stop-propagation/index.js +3 -3
- package/esm2015/lib/stop-propagation/stop-drop-propagation.directive.js +22 -22
- package/esm2015/lib/stop-propagation/stop-propagation.directive.js +21 -21
- package/esm2015/lib/stop-propagation/stop-propagation.module.js +25 -24
- package/esm2015/lib/table/index.js +6 -6
- package/esm2015/lib/table/table-action-color.enum.js +7 -7
- package/esm2015/lib/table/table-database.js +28 -28
- package/esm2015/lib/table/table-datasource.js +61 -61
- package/esm2015/lib/table/table-model.interface.js +2 -1
- package/esm2015/lib/table/table.component.js +310 -311
- package/esm2015/lib/table/table.module.js +69 -68
- package/esm2015/lib/tool/index.js +3 -3
- package/esm2015/lib/tool/shared/index.js +6 -6
- package/esm2015/lib/tool/shared/tool-component.js +9 -9
- package/esm2015/lib/tool/shared/tool.interface.js +2 -1
- package/esm2015/lib/tool/shared/tool.service.js +43 -43
- package/esm2015/lib/tool/shared/toolbox.enums.js +7 -7
- package/esm2015/lib/tool/shared/toolbox.js +179 -179
- package/esm2015/lib/tool/tool.module.js +34 -33
- package/esm2015/lib/tool/toolbox/toolbox.animation.js +10 -10
- package/esm2015/lib/tool/toolbox/toolbox.component.js +261 -262
- package/esm2015/lib/tool/toolbox/toolbox.module.js +38 -37
- package/esm2015/lib/widget/index.js +3 -3
- package/esm2015/lib/widget/shared/index.js +4 -4
- package/esm2015/lib/widget/shared/widget.interfaces.js +2 -1
- package/esm2015/lib/widget/shared/widget.js +4 -4
- package/esm2015/lib/widget/shared/widget.service.js +20 -21
- package/esm2015/lib/widget/widget-outlet/widget-outlet.component.js +121 -122
- package/esm2015/lib/widget/widget-outlet/widget-outlet.module.js +34 -33
- package/esm2015/lib/widget/widget.module.js +34 -33
- package/esm2015/lib/workspace/index.js +4 -4
- package/esm2015/lib/workspace/shared/index.js +4 -4
- package/esm2015/lib/workspace/shared/store.js +40 -40
- package/esm2015/lib/workspace/shared/workspace.interfaces.js +2 -1
- package/esm2015/lib/workspace/shared/workspace.js +117 -117
- package/esm2015/lib/workspace/workspace-selector/workspace-selector.component.js +54 -55
- package/esm2015/lib/workspace/workspace-selector/workspace-selector.module.js +34 -33
- package/esm2015/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.component.js +93 -94
- package/esm2015/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.module.js +34 -33
- package/esm2015/lib/workspace/workspace.module.js +29 -28
- package/esm2015/public_api.js +72 -70
- package/fesm2015/igo2-common.js +9015 -8846
- package/fesm2015/igo2-common.js.map +1 -1
- package/igo2-common.d.ts +5 -5
- package/lib/action/action.module.d.ts +8 -7
- package/lib/action/actionbar/actionbar-item.component.d.ts +78 -78
- package/lib/action/actionbar/actionbar.component.d.ts +146 -146
- package/lib/action/actionbar/actionbar.module.d.ts +20 -19
- package/lib/action/index.d.ts +2 -2
- package/lib/action/shared/action.enums.d.ts +5 -5
- package/lib/action/shared/action.interfaces.d.ts +17 -17
- package/lib/action/shared/index.d.ts +3 -3
- package/lib/action/shared/store.d.ts +8 -8
- package/lib/backdrop/backdrop.component.d.ts +9 -9
- package/lib/backdrop/backdrop.module.d.ts +10 -9
- package/lib/backdrop/index.d.ts +1 -1
- package/lib/badge-icon/badge-icon.directive.d.ts +32 -27
- package/lib/badge-icon/badge-icon.module.d.ts +11 -10
- package/lib/badge-icon/index.d.ts +1 -1
- package/lib/clickout/clickout.directive.d.ts +10 -10
- package/lib/clickout/clickout.module.d.ts +9 -8
- package/lib/clickout/index.d.ts +1 -1
- package/lib/clone/clone.module.d.ts +9 -8
- package/lib/clone/clone.pipe.d.ts +7 -7
- package/lib/clone/index.d.ts +1 -1
- package/lib/collapsible/collapse.directive.d.ts +19 -19
- package/lib/collapsible/collapsible.component.d.ts +13 -13
- package/lib/collapsible/collapsible.module.d.ts +12 -11
- package/lib/collapsible/index.d.ts +2 -2
- package/lib/confirm-dialog/confirm-dialog.component.d.ts +9 -9
- package/lib/confirm-dialog/confirm-dialog.module.d.ts +12 -11
- package/lib/confirm-dialog/confirm-dialog.service.d.ts +10 -10
- package/lib/confirm-dialog/index.d.ts +2 -2
- package/lib/context-menu/context-menu.directive.d.ts +27 -21
- package/lib/context-menu/context-menu.module.d.ts +9 -8
- package/lib/context-menu/index.d.ts +1 -1
- package/lib/custom-html/custom-html.component.d.ts +9 -9
- package/lib/custom-html/custom-html.module.d.ts +16 -15
- package/lib/custom-html/custom-html.pipe.d.ts +10 -10
- package/lib/custom-html/index.d.ts +2 -2
- package/lib/drag-drop/drag-drop.directive.d.ts +14 -14
- package/lib/drag-drop/drag-drop.module.d.ts +9 -8
- package/lib/drag-drop/index.d.ts +1 -1
- package/lib/dynamic-component/dynamic-component.module.d.ts +8 -7
- package/lib/dynamic-component/dynamic-outlet/dynamic-outlet.component.d.ts +70 -70
- package/lib/dynamic-component/dynamic-outlet/dynamic-outlet.module.d.ts +11 -10
- package/lib/dynamic-component/index.d.ts +2 -2
- package/lib/dynamic-component/shared/dynamic-component.d.ts +88 -88
- package/lib/dynamic-component/shared/dynamic-component.interfaces.d.ts +3 -3
- package/lib/dynamic-component/shared/dynamic-component.service.d.ts +18 -18
- package/lib/dynamic-component/shared/index.d.ts +3 -3
- package/lib/entity/entity-selector/entity-selector.component.d.ts +92 -92
- package/lib/entity/entity-selector/entity-selector.module.d.ts +13 -12
- package/lib/entity/entity-table/entity-table-row.directive.d.ts +69 -69
- package/lib/entity/entity-table/entity-table.component.d.ts +275 -275
- package/lib/entity/entity-table/entity-table.module.d.ts +23 -22
- package/lib/entity/entity-table-paginator/entity-table-paginator.component.d.ts +49 -49
- package/lib/entity/entity-table-paginator/entity-table-paginator.interface.d.ts +8 -8
- package/lib/entity/entity-table-paginator/entity-table-paginator.module.d.ts +11 -10
- package/lib/entity/entity.module.d.ts +10 -9
- package/lib/entity/index.d.ts +5 -5
- package/lib/entity/shared/entity.enums.d.ts +22 -22
- package/lib/entity/shared/entity.interfaces.d.ts +88 -88
- package/lib/entity/shared/entity.utils.d.ts +49 -49
- package/lib/entity/shared/index.d.ts +9 -9
- package/lib/entity/shared/state.d.ts +103 -103
- package/lib/entity/shared/store.d.ts +176 -176
- package/lib/entity/shared/strategies/filter-custom-function.d.ts +51 -51
- package/lib/entity/shared/strategies/filter-selection.d.ts +48 -48
- package/lib/entity/shared/strategies/index.d.ts +3 -3
- package/lib/entity/shared/strategies/strategy.d.ts +56 -56
- package/lib/entity/shared/transaction.d.ts +168 -168
- package/lib/entity/shared/view.d.ts +193 -193
- package/lib/entity/shared/watcher.d.ts +72 -72
- package/lib/flexible/flexible.component.d.ts +41 -41
- package/lib/flexible/flexible.module.d.ts +9 -8
- package/lib/flexible/flexible.type.d.ts +2 -2
- package/lib/flexible/index.d.ts +2 -2
- package/lib/form/form/form.component.d.ts +53 -53
- package/lib/form/form/form.module.d.ts +12 -11
- package/lib/form/form-field/form-field-select.component.d.ts +48 -48
- package/lib/form/form-field/form-field-text.component.d.ts +41 -41
- package/lib/form/form-field/form-field-textarea.component.d.ts +41 -41
- package/lib/form/form-field/form-field.component.d.ts +34 -34
- package/lib/form/form-field/form-field.module.d.ts +21 -20
- package/lib/form/form-field/index.d.ts +4 -4
- package/lib/form/form-group/form-group.component.d.ts +49 -49
- package/lib/form/form-group/form-group.module.d.ts +14 -13
- package/lib/form/form.module.d.ts +13 -12
- package/lib/form/index.d.ts +4 -4
- package/lib/form/shared/form-field-component.d.ts +1 -1
- package/lib/form/shared/form-field.service.d.ts +19 -19
- package/lib/form/shared/form.interfaces.d.ts +57 -57
- package/lib/form/shared/form.service.d.ts +15 -15
- package/lib/form/shared/form.utils.d.ts +11 -11
- package/lib/form/shared/index.d.ts +5 -5
- package/lib/home-button/home-button.component.d.ts +9 -0
- package/lib/home-button/home-button.module.d.ts +15 -0
- package/lib/home-button/index.d.ts +1 -0
- package/lib/image/image.module.d.ts +9 -8
- package/lib/image/index.d.ts +1 -1
- package/lib/image/secure-image.pipe.d.ts +11 -11
- package/lib/interactive-tour/index.d.ts +4 -4
- package/lib/interactive-tour/interactive-tour.component.d.ts +30 -30
- package/lib/interactive-tour/interactive-tour.interface.d.ts +32 -32
- package/lib/interactive-tour/interactive-tour.loader.d.ts +18 -18
- package/lib/interactive-tour/interactive-tour.module.d.ts +12 -11
- package/lib/interactive-tour/interactive-tour.service.d.ts +29 -29
- package/lib/json-dialog/index.d.ts +2 -2
- package/lib/json-dialog/json-dialog.component.d.ts +13 -13
- package/lib/json-dialog/json-dialog.module.d.ts +13 -12
- package/lib/json-dialog/json-dialog.service.d.ts +10 -10
- package/lib/keyvalue/index.d.ts +1 -1
- package/lib/keyvalue/keyvalue.module.d.ts +9 -8
- package/lib/keyvalue/keyvalue.pipe.d.ts +7 -7
- package/lib/list/index.d.ts +2 -2
- package/lib/list/list-item.directive.d.ts +43 -43
- package/lib/list/list.component.d.ts +51 -51
- package/lib/list/list.module.d.ts +14 -13
- package/lib/panel/index.d.ts +1 -1
- package/lib/panel/panel.component.d.ts +11 -11
- package/lib/panel/panel.module.d.ts +8 -7
- package/lib/sidenav/index.d.ts +1 -1
- package/lib/sidenav/sidenav-shim.directive.d.ts +20 -20
- package/lib/sidenav/sidenav.module.d.ts +9 -8
- package/lib/spinner/index.d.ts +2 -2
- package/lib/spinner/spinner-activity.directive.d.ts +32 -32
- package/lib/spinner/spinner.component.d.ts +12 -12
- package/lib/spinner/spinner.module.d.ts +10 -9
- package/lib/stop-propagation/index.d.ts +2 -2
- package/lib/stop-propagation/stop-drop-propagation.directive.d.ts +6 -6
- package/lib/stop-propagation/stop-propagation.directive.d.ts +6 -6
- package/lib/stop-propagation/stop-propagation.module.d.ts +10 -9
- package/lib/table/index.d.ts +5 -5
- package/lib/table/table-action-color.enum.d.ts +5 -5
- package/lib/table/table-database.d.ts +10 -10
- package/lib/table/table-datasource.d.ts +17 -17
- package/lib/table/table-model.interface.d.ts +28 -28
- package/lib/table/table.component.d.ts +40 -40
- package/lib/table/table.module.d.ts +20 -19
- package/lib/tool/index.d.ts +2 -2
- package/lib/tool/shared/index.d.ts +5 -5
- package/lib/tool/shared/tool-component.d.ts +2 -2
- package/lib/tool/shared/tool.interface.d.ts +18 -18
- package/lib/tool/shared/tool.service.d.ts +30 -30
- package/lib/tool/shared/toolbox.d.ts +95 -95
- package/lib/tool/shared/toolbox.enums.d.ts +5 -5
- package/lib/tool/tool.module.d.ts +10 -9
- package/lib/tool/toolbox/toolbox.animation.d.ts +2 -2
- package/lib/tool/toolbox/toolbox.component.d.ts +127 -127
- package/lib/tool/toolbox/toolbox.module.d.ts +13 -12
- package/lib/widget/index.d.ts +2 -2
- package/lib/widget/shared/index.d.ts +3 -3
- package/lib/widget/shared/widget.d.ts +4 -4
- package/lib/widget/shared/widget.interfaces.d.ts +12 -12
- package/lib/widget/shared/widget.service.d.ts +10 -10
- package/lib/widget/widget-outlet/widget-outlet.component.d.ts +71 -71
- package/lib/widget/widget-outlet/widget-outlet.module.d.ts +12 -11
- package/lib/widget/widget.module.d.ts +8 -7
- package/lib/workspace/index.d.ts +3 -3
- package/lib/workspace/shared/index.d.ts +3 -3
- package/lib/workspace/shared/store.d.ts +20 -20
- package/lib/workspace/shared/workspace.d.ts +108 -108
- package/lib/workspace/shared/workspace.interfaces.d.ts +11 -11
- package/lib/workspace/workspace-selector/workspace-selector.component.d.ts +35 -35
- package/lib/workspace/workspace-selector/workspace-selector.module.d.ts +12 -11
- package/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.component.d.ts +57 -57
- package/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.module.d.ts +12 -11
- package/lib/workspace/workspace.module.d.ts +9 -8
- package/package.json +8 -7
- package/public_api.d.ts +68 -66
- package/style/common.theming.scss +12 -236
- package/style/partial/action.scss +18 -18
- package/style/partial/common.variables.scss +8 -8
- package/bundles/igo2-common.umd.min.js +0 -17
- package/bundles/igo2-common.umd.min.js.map +0 -1
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
import { EntityStoreStrategy } from './strategy';
|
|
2
|
-
/**
|
|
3
|
-
* When active, this strategy filters a store's stateView to return
|
|
4
|
-
* selected entities only.
|
|
5
|
-
*/
|
|
6
|
-
export class EntityStoreFilterCustomFuncStrategy extends EntityStoreStrategy {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
super(options);
|
|
9
|
-
this.options = options;
|
|
10
|
-
/**
|
|
11
|
-
* Store / filter ids map
|
|
12
|
-
*/
|
|
13
|
-
this.filters = new Map();
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Bind this strategy to a store and start filtering it
|
|
17
|
-
* @param store Entity store
|
|
18
|
-
*/
|
|
19
|
-
bindStore(store) {
|
|
20
|
-
super.bindStore(store);
|
|
21
|
-
if (this.active === true) {
|
|
22
|
-
this.filterStore(store);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Unbind this strategy from a store and stop filtering it
|
|
27
|
-
* @param store Entity store
|
|
28
|
-
*/
|
|
29
|
-
unbindStore(store) {
|
|
30
|
-
super.unbindStore(store);
|
|
31
|
-
if (this.active === true) {
|
|
32
|
-
this.unfilterStore(store);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Start filtering all stores
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
doActivate() {
|
|
40
|
-
this.filterAll();
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Stop filtering all stores
|
|
44
|
-
* @internal
|
|
45
|
-
*/
|
|
46
|
-
doDeactivate() {
|
|
47
|
-
this.unfilterAll();
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Filter all stores
|
|
51
|
-
*/
|
|
52
|
-
filterAll() {
|
|
53
|
-
this.stores.forEach((store) => this.filterStore(store));
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Unfilter all stores
|
|
57
|
-
*/
|
|
58
|
-
unfilterAll() {
|
|
59
|
-
this.stores.forEach((store) => this.unfilterStore(store));
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* Filter a store and add it to the filters map
|
|
63
|
-
*/
|
|
64
|
-
filterStore(store) {
|
|
65
|
-
this.filters.set(store, store.stateView.addFilter(this.options.filterClauseFunc));
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Unfilter a store and delete it from the filters map
|
|
69
|
-
*/
|
|
70
|
-
unfilterStore(store) {
|
|
71
|
-
const filterId = this.filters.get(store);
|
|
72
|
-
if (filterId === undefined) {
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
store.stateView.removeFilter(filterId);
|
|
76
|
-
this.filters.delete(store);
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { EntityStoreStrategy } from './strategy';
|
|
2
|
+
/**
|
|
3
|
+
* When active, this strategy filters a store's stateView to return
|
|
4
|
+
* selected entities only.
|
|
5
|
+
*/
|
|
6
|
+
export class EntityStoreFilterCustomFuncStrategy extends EntityStoreStrategy {
|
|
7
|
+
constructor(options) {
|
|
8
|
+
super(options);
|
|
9
|
+
this.options = options;
|
|
10
|
+
/**
|
|
11
|
+
* Store / filter ids map
|
|
12
|
+
*/
|
|
13
|
+
this.filters = new Map();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Bind this strategy to a store and start filtering it
|
|
17
|
+
* @param store Entity store
|
|
18
|
+
*/
|
|
19
|
+
bindStore(store) {
|
|
20
|
+
super.bindStore(store);
|
|
21
|
+
if (this.active === true) {
|
|
22
|
+
this.filterStore(store);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Unbind this strategy from a store and stop filtering it
|
|
27
|
+
* @param store Entity store
|
|
28
|
+
*/
|
|
29
|
+
unbindStore(store) {
|
|
30
|
+
super.unbindStore(store);
|
|
31
|
+
if (this.active === true) {
|
|
32
|
+
this.unfilterStore(store);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Start filtering all stores
|
|
37
|
+
* @internal
|
|
38
|
+
*/
|
|
39
|
+
doActivate() {
|
|
40
|
+
this.filterAll();
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Stop filtering all stores
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
doDeactivate() {
|
|
47
|
+
this.unfilterAll();
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Filter all stores
|
|
51
|
+
*/
|
|
52
|
+
filterAll() {
|
|
53
|
+
this.stores.forEach((store) => this.filterStore(store));
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Unfilter all stores
|
|
57
|
+
*/
|
|
58
|
+
unfilterAll() {
|
|
59
|
+
this.stores.forEach((store) => this.unfilterStore(store));
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Filter a store and add it to the filters map
|
|
63
|
+
*/
|
|
64
|
+
filterStore(store) {
|
|
65
|
+
this.filters.set(store, store.stateView.addFilter(this.options.filterClauseFunc));
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Unfilter a store and delete it from the filters map
|
|
69
|
+
*/
|
|
70
|
+
unfilterStore(store) {
|
|
71
|
+
const filterId = this.filters.get(store);
|
|
72
|
+
if (filterId === undefined) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
store.stateView.removeFilter(filterId);
|
|
76
|
+
this.filters.delete(store);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLWN1c3RvbS1mdW5jdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbW1vbi9zcmMvbGliL2VudGl0eS9zaGFyZWQvc3RyYXRlZ2llcy9maWx0ZXItY3VzdG9tLWZ1bmN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUVqRDs7O0dBR0c7QUFDSCxNQUFNLE9BQU8sbUNBQW9DLFNBQVEsbUJBQW1CO0lBRTFFLFlBQXNCLE9BQXVDO1FBQzNELEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQztRQURLLFlBQU8sR0FBUCxPQUFPLENBQWdDO1FBSTdEOztXQUVHO1FBQ0ssWUFBTyxH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GEgc3RvcmUgYW5kIGRlbGV0ZSBpdCBmcm9tIHRoZSBmaWx0ZXJzIG1hcFxyXG4gICAqL1xyXG4gIHByaXZhdGUgdW5maWx0ZXJTdG9yZShzdG9yZTogRW50aXR5U3RvcmUpIHtcclxuICAgIGNvbnN0IGZpbHRlcklkID0gdGhpcy5maWx0ZXJzLmdldChzdG9yZSk7XHJcbiAgICBpZiAoZmlsdGVySWQgPT09IHVuZGVmaW5lZCkge1xyXG4gICAgICByZXR1cm47XHJcbiAgICB9XHJcblxyXG4gICAgc3RvcmUuc3RhdGVWaWV3LnJlbW92ZUZpbHRlcihmaWx0ZXJJZCk7XHJcbiAgICB0aGlzLmZpbHRlcnMuZGVsZXRlKHN0b3JlKTtcclxuICB9XHJcbn1cclxuIl19
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
import { EntityStoreStrategy } from './strategy';
|
|
2
|
-
/**
|
|
3
|
-
* When active, this strategy filters a store's stateView to return
|
|
4
|
-
* selected entities only.
|
|
5
|
-
*/
|
|
6
|
-
export class EntityStoreFilterSelectionStrategy extends EntityStoreStrategy {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
/**
|
|
10
|
-
* Store / filter ids map
|
|
11
|
-
*/
|
|
12
|
-
this.filters = new Map();
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Bind this strategy to a store and start filtering it
|
|
16
|
-
* @param store Entity store
|
|
17
|
-
*/
|
|
18
|
-
bindStore(store) {
|
|
19
|
-
super.bindStore(store);
|
|
20
|
-
if (this.active === true) {
|
|
21
|
-
this.filterStore(store);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Unbind this strategy from a store and stop filtering it
|
|
26
|
-
* @param store Entity store
|
|
27
|
-
*/
|
|
28
|
-
unbindStore(store) {
|
|
29
|
-
super.unbindStore(store);
|
|
30
|
-
if (this.active === true) {
|
|
31
|
-
this.unfilterStore(store);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Start filtering all stores
|
|
36
|
-
* @internal
|
|
37
|
-
*/
|
|
38
|
-
doActivate() {
|
|
39
|
-
this.filterAll();
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Stop filtering all stores
|
|
43
|
-
* @internal
|
|
44
|
-
*/
|
|
45
|
-
doDeactivate() {
|
|
46
|
-
this.unfilterAll();
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Filter all stores
|
|
50
|
-
*/
|
|
51
|
-
filterAll() {
|
|
52
|
-
this.stores.forEach((store) => this.filterStore(store));
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Unfilter all stores
|
|
56
|
-
*/
|
|
57
|
-
unfilterAll() {
|
|
58
|
-
this.stores.forEach((store) => this.unfilterStore(store));
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Filter a store and add it to the filters map
|
|
62
|
-
*/
|
|
63
|
-
filterStore(store) {
|
|
64
|
-
if (this.filters.has(store)) {
|
|
65
|
-
return;
|
|
66
|
-
}
|
|
67
|
-
const filter = (record) => {
|
|
68
|
-
return record.state.selected === true;
|
|
69
|
-
};
|
|
70
|
-
this.filters.set(store, store.stateView.addFilter(filter));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Unfilter a store and delete it from the filters map
|
|
74
|
-
*/
|
|
75
|
-
unfilterStore(store) {
|
|
76
|
-
const filterId = this.filters.get(store);
|
|
77
|
-
if (filterId === undefined) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
store.stateView.removeFilter(filterId);
|
|
81
|
-
this.filters.delete(store);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { EntityStoreStrategy } from './strategy';
|
|
2
|
+
/**
|
|
3
|
+
* When active, this strategy filters a store's stateView to return
|
|
4
|
+
* selected entities only.
|
|
5
|
+
*/
|
|
6
|
+
export class EntityStoreFilterSelectionStrategy extends EntityStoreStrategy {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
/**
|
|
10
|
+
* Store / filter ids map
|
|
11
|
+
*/
|
|
12
|
+
this.filters = new Map();
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Bind this strategy to a store and start filtering it
|
|
16
|
+
* @param store Entity store
|
|
17
|
+
*/
|
|
18
|
+
bindStore(store) {
|
|
19
|
+
super.bindStore(store);
|
|
20
|
+
if (this.active === true) {
|
|
21
|
+
this.filterStore(store);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Unbind this strategy from a store and stop filtering it
|
|
26
|
+
* @param store Entity store
|
|
27
|
+
*/
|
|
28
|
+
unbindStore(store) {
|
|
29
|
+
super.unbindStore(store);
|
|
30
|
+
if (this.active === true) {
|
|
31
|
+
this.unfilterStore(store);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Start filtering all stores
|
|
36
|
+
* @internal
|
|
37
|
+
*/
|
|
38
|
+
doActivate() {
|
|
39
|
+
this.filterAll();
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Stop filtering all stores
|
|
43
|
+
* @internal
|
|
44
|
+
*/
|
|
45
|
+
doDeactivate() {
|
|
46
|
+
this.unfilterAll();
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Filter all stores
|
|
50
|
+
*/
|
|
51
|
+
filterAll() {
|
|
52
|
+
this.stores.forEach((store) => this.filterStore(store));
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Unfilter all stores
|
|
56
|
+
*/
|
|
57
|
+
unfilterAll() {
|
|
58
|
+
this.stores.forEach((store) => this.unfilterStore(store));
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Filter a store and add it to the filters map
|
|
62
|
+
*/
|
|
63
|
+
filterStore(store) {
|
|
64
|
+
if (this.filters.has(store)) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
const filter = (record) => {
|
|
68
|
+
return record.state.selected === true;
|
|
69
|
+
};
|
|
70
|
+
this.filters.set(store, store.stateView.addFilter(filter));
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Unfilter a store and delete it from the filters map
|
|
74
|
+
*/
|
|
75
|
+
unfilterStore(store) {
|
|
76
|
+
const filterId = this.filters.get(store);
|
|
77
|
+
if (filterId === undefined) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
store.stateView.removeFilter(filterId);
|
|
81
|
+
this.filters.delete(store);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLXNlbGVjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL2NvbW1vbi9zcmMvbGliL2VudGl0eS9zaGFyZWQvc3RyYXRlZ2llcy9maWx0ZXItc2VsZWN0aW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLFlBQVksQ0FBQztBQUVqRDs7O0dBR0c7QUFDSCxNQUFNLE9BQU8sa0NBQW1DLFNBQVEsbUJBQW1CO0lBQTNFOztRQUVFOztXQUVHO1FBQ0ssWUFBTyxHQUE2QixJQUFJLEdBQUcsRUFBRSxDQUFDO0lBZ0Z4RCxDQUFDO0lBOUVDOzs7T0FHRztJQUNILFNBQVMsQ0FBQyxLQUFrQjtRQUMxQixLQUFLLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxDQUFDO1FBQ3ZCLElBQUksSUFBSSxDQUFDLE1BQU0sS0FBSyxJQUFJLEVBQUU7WUFDeEIsSUFBSSxDQUFDLFdBQVcsQ0FBQ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AgICogVW5maWx0ZXIgYSBzdG9yZSBhbmQgZGVsZXRlIGl0IGZyb20gdGhlIGZpbHRlcnMgbWFwXHJcbiAgICovXHJcbiAgcHJpdmF0ZSB1bmZpbHRlclN0b3JlKHN0b3JlOiBFbnRpdHlTdG9yZSkge1xyXG4gICAgY29uc3QgZmlsdGVySWQgPSB0aGlzLmZpbHRlcnMuZ2V0KHN0b3JlKTtcclxuICAgIGlmIChmaWx0ZXJJZCA9PT0gdW5kZWZpbmVkKSB7XHJcbiAgICAgIHJldHVybjtcclxuICAgIH1cclxuXHJcbiAgICBzdG9yZS5zdGF0ZVZpZXcucmVtb3ZlRmlsdGVyKGZpbHRlcklkKTtcclxuICAgIHRoaXMuZmlsdGVycy5kZWxldGUoc3RvcmUpO1xyXG4gIH1cclxufVxyXG4iXX0=
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './strategy';
|
|
2
|
-
export * from './filter-custom-function';
|
|
3
|
-
export * from './filter-selection';
|
|
4
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
export * from './strategy';
|
|
2
|
+
export * from './filter-custom-function';
|
|
3
|
+
export * from './filter-selection';
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21tb24vc3JjL2xpYi9lbnRpdHkvc2hhcmVkL3N0cmF0ZWdpZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxZQUFZLENBQUM7QUFDM0IsY0FBYywwQkFBMEIsQ0FBQztBQUN6QyxjQUFjLG9CQUFvQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zdHJhdGVneSc7XHJcbmV4cG9ydCAqIGZyb20gJy4vZmlsdGVyLWN1c3RvbS1mdW5jdGlvbic7XHJcbmV4cG9ydCAqIGZyb20gJy4vZmlsdGVyLXNlbGVjdGlvbic7XHJcbiJdfQ==
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
import { BehaviorSubject } from 'rxjs';
|
|
2
|
-
/**
|
|
3
|
-
* Entity store strategies. They can do pretty much anything during a store's
|
|
4
|
-
* lifetime. For example, they may act as triggers when something happens.
|
|
5
|
-
* Sharing a strategy is a good idea when multiple strategies would have
|
|
6
|
-
* on cancelling effect on each other.
|
|
7
|
-
*
|
|
8
|
-
* At creation, strategy is inactive and needs to be manually activated.
|
|
9
|
-
*/
|
|
10
|
-
export class EntityStoreStrategy {
|
|
11
|
-
constructor(options = {}) {
|
|
12
|
-
this.options = options;
|
|
13
|
-
/**
|
|
14
|
-
* Feature store
|
|
15
|
-
* @internal
|
|
16
|
-
*/
|
|
17
|
-
this.stores = [];
|
|
18
|
-
this.active$ = new BehaviorSubject(false);
|
|
19
|
-
this.options = options;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Whether this strategy is active
|
|
23
|
-
* @internal
|
|
24
|
-
*/
|
|
25
|
-
get active() { return this.active$.value; }
|
|
26
|
-
/**
|
|
27
|
-
* Activate the strategy. If it's already active, it'll be deactivated
|
|
28
|
-
* and activated again.
|
|
29
|
-
*/
|
|
30
|
-
activate() {
|
|
31
|
-
if (this.active === true) {
|
|
32
|
-
this.doDeactivate();
|
|
33
|
-
}
|
|
34
|
-
this.active$.next(true);
|
|
35
|
-
this.doActivate();
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Activate the strategy. If it's already active, it'll be deactivated
|
|
39
|
-
* and activated again.
|
|
40
|
-
*/
|
|
41
|
-
deactivate() {
|
|
42
|
-
this.active$.next(false);
|
|
43
|
-
this.doDeactivate();
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Bind this strategy to a store
|
|
47
|
-
* @param store Feature store
|
|
48
|
-
*/
|
|
49
|
-
bindStore(store) {
|
|
50
|
-
if (this.stores.indexOf(store) < 0) {
|
|
51
|
-
this.stores.push(store);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Unbind this strategy from store
|
|
56
|
-
* @param store Feature store
|
|
57
|
-
*/
|
|
58
|
-
unbindStore(store) {
|
|
59
|
-
const index = this.stores.indexOf(store);
|
|
60
|
-
if (index >= 0) {
|
|
61
|
-
this.stores.splice(index, 1);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Do the stataegy activation
|
|
66
|
-
* @internal
|
|
67
|
-
*/
|
|
68
|
-
doActivate() { }
|
|
69
|
-
/**
|
|
70
|
-
* Do the strategy deactivation
|
|
71
|
-
* @internal
|
|
72
|
-
*/
|
|
73
|
-
doDeactivate() { }
|
|
74
|
-
}
|
|
75
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
1
|
+
import { BehaviorSubject } from 'rxjs';
|
|
2
|
+
/**
|
|
3
|
+
* Entity store strategies. They can do pretty much anything during a store's
|
|
4
|
+
* lifetime. For example, they may act as triggers when something happens.
|
|
5
|
+
* Sharing a strategy is a good idea when multiple strategies would have
|
|
6
|
+
* on cancelling effect on each other.
|
|
7
|
+
*
|
|
8
|
+
* At creation, strategy is inactive and needs to be manually activated.
|
|
9
|
+
*/
|
|
10
|
+
export class EntityStoreStrategy {
|
|
11
|
+
constructor(options = {}) {
|
|
12
|
+
this.options = options;
|
|
13
|
+
/**
|
|
14
|
+
* Feature store
|
|
15
|
+
* @internal
|
|
16
|
+
*/
|
|
17
|
+
this.stores = [];
|
|
18
|
+
this.active$ = new BehaviorSubject(false);
|
|
19
|
+
this.options = options;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Whether this strategy is active
|
|
23
|
+
* @internal
|
|
24
|
+
*/
|
|
25
|
+
get active() { return this.active$.value; }
|
|
26
|
+
/**
|
|
27
|
+
* Activate the strategy. If it's already active, it'll be deactivated
|
|
28
|
+
* and activated again.
|
|
29
|
+
*/
|
|
30
|
+
activate() {
|
|
31
|
+
if (this.active === true) {
|
|
32
|
+
this.doDeactivate();
|
|
33
|
+
}
|
|
34
|
+
this.active$.next(true);
|
|
35
|
+
this.doActivate();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Activate the strategy. If it's already active, it'll be deactivated
|
|
39
|
+
* and activated again.
|
|
40
|
+
*/
|
|
41
|
+
deactivate() {
|
|
42
|
+
this.active$.next(false);
|
|
43
|
+
this.doDeactivate();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Bind this strategy to a store
|
|
47
|
+
* @param store Feature store
|
|
48
|
+
*/
|
|
49
|
+
bindStore(store) {
|
|
50
|
+
if (this.stores.indexOf(store) < 0) {
|
|
51
|
+
this.stores.push(store);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Unbind this strategy from store
|
|
56
|
+
* @param store Feature store
|
|
57
|
+
*/
|
|
58
|
+
unbindStore(store) {
|
|
59
|
+
const index = this.stores.indexOf(store);
|
|
60
|
+
if (index >= 0) {
|
|
61
|
+
this.stores.splice(index, 1);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Do the stataegy activation
|
|
66
|
+
* @internal
|
|
67
|
+
*/
|
|
68
|
+
doActivate() { }
|
|
69
|
+
/**
|
|
70
|
+
* Do the strategy deactivation
|
|
71
|
+
* @internal
|
|
72
|
+
*/
|
|
73
|
+
doDeactivate() { }
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RyYXRlZ3kuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9jb21tb24vc3JjL2xpYi9lbnRpdHkvc2hhcmVkL3N0cmF0ZWdpZXMvc3RyYXRlZ3kudHMiXSwibmFt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