@igo2/common 16.1.1 → 16.2.0
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/esm2022/lib/action/actionbar/actionbar-item.component.mjs +3 -3
- package/esm2022/lib/action/actionbar/actionbar.component.mjs +3 -3
- package/esm2022/lib/action/shared/action.interfaces.mjs +1 -1
- package/esm2022/lib/action/shared/store.mjs +1 -1
- package/esm2022/lib/backdrop/backdrop.component.mjs +3 -3
- package/esm2022/lib/clickout/clickout.directive.mjs +1 -1
- package/esm2022/lib/collapsible/collapsible.component.mjs +3 -3
- package/esm2022/lib/collapsible/index.mjs +1 -1
- package/esm2022/lib/color-picker-form-field/color-picker-form-field.component.mjs +3 -3
- package/esm2022/lib/color-picker-form-field/index.mjs +1 -1
- package/esm2022/lib/confirm-dialog/confirm-dialog.component.mjs +3 -3
- package/esm2022/lib/confirm-dialog/confirm-dialog.interface.mjs +1 -1
- package/esm2022/lib/confirm-dialog/index.mjs +1 -1
- package/esm2022/lib/context-menu/index.mjs +1 -1
- package/esm2022/lib/custom-html/custom-html.component.mjs +1 -1
- package/esm2022/lib/custom-html/index.mjs +1 -1
- package/esm2022/lib/dom/dom.service.mjs +1 -1
- package/esm2022/lib/dynamic-component/shared/dynamic-component.mjs +1 -1
- package/esm2022/lib/dynamic-component/shared/dynamic-component.service.mjs +1 -1
- package/esm2022/lib/entity/entity-selector/entity-selector.component.mjs +3 -3
- package/esm2022/lib/entity/entity-table/entity-table.component.mjs +3 -3
- package/esm2022/lib/entity/entity-table-paginator/entity-table-paginator.component.mjs +3 -3
- package/esm2022/lib/entity/entity-table-paginator/entity-table-paginator.interface.mjs +1 -1
- package/esm2022/lib/entity/index.mjs +1 -1
- package/esm2022/lib/entity/shared/entity.interfaces.mjs +1 -1
- package/esm2022/lib/entity/shared/entity.utils.mjs +1 -1
- package/esm2022/lib/entity/shared/index.mjs +1 -2
- package/esm2022/lib/entity/shared/state.mjs +1 -1
- package/esm2022/lib/entity/shared/store.mjs +67 -1
- package/esm2022/lib/entity/shared/strategies/filter-custom-function.mjs +1 -1
- package/esm2022/lib/entity/shared/strategies/filter-selection.mjs +1 -1
- package/esm2022/lib/entity/shared/strategies/strategy.mjs +1 -1
- package/esm2022/lib/entity/shared/transaction.mjs +1 -1
- package/esm2022/lib/entity/shared/view.mjs +1 -1
- package/esm2022/lib/entity/shared/watcher.mjs +1 -1
- package/esm2022/lib/environment/environment.interface.mjs +1 -1
- package/esm2022/lib/environment/index.mjs +1 -1
- package/esm2022/lib/flexible/flexible.component.mjs +3 -3
- package/esm2022/lib/form/form/form.component.mjs +3 -3
- package/esm2022/lib/form/form-field/form-field-select.component.mjs +3 -3
- package/esm2022/lib/form/form-field/form-field-text.component.mjs +3 -3
- package/esm2022/lib/form/form-field/form-field-textarea.component.mjs +3 -3
- package/esm2022/lib/form/form-field/form-field.component.mjs +3 -3
- package/esm2022/lib/form/form-field/index.mjs +1 -1
- package/esm2022/lib/form/form-group/form-group.component.mjs +3 -3
- package/esm2022/lib/form/index.mjs +1 -1
- package/esm2022/lib/form/shared/form-field.service.mjs +1 -1
- package/esm2022/lib/form/shared/form.interfaces.mjs +1 -1
- package/esm2022/lib/form/shared/form.service.mjs +1 -1
- package/esm2022/lib/form/shared/form.utils.mjs +1 -1
- package/esm2022/lib/form-dialog/form-dialog.component.mjs +3 -3
- package/esm2022/lib/form-dialog/form-dialog.interface.mjs +1 -1
- package/esm2022/lib/form-dialog/form-dialog.service.mjs +1 -1
- package/esm2022/lib/form-dialog/index.mjs +1 -1
- package/esm2022/lib/home-button/home-button.component.mjs +3 -3
- package/esm2022/lib/image/index.mjs +1 -1
- package/esm2022/lib/interactive-tour/interactive-tour.component.mjs +3 -3
- package/esm2022/lib/interactive-tour/interactive-tour.interface.mjs +1 -1
- package/esm2022/lib/interactive-tour/interactive-tour.loader.mjs +1 -1
- package/esm2022/lib/json-dialog/json-dialog.component.mjs +3 -3
- package/esm2022/lib/json-dialog/json-dialog.service.mjs +1 -1
- package/esm2022/lib/keyvalue/keyvalue.pipe.mjs +1 -1
- package/esm2022/lib/list/index.mjs +1 -1
- package/esm2022/lib/list/list.component.mjs +3 -3
- package/esm2022/lib/panel/panel.component.mjs +3 -3
- package/esm2022/lib/select-value-dialog/index.mjs +1 -1
- package/esm2022/lib/select-value-dialog/select-value-check-radio-dialog.component.mjs +3 -3
- package/esm2022/lib/select-value-dialog/select-value-dialog.enums.mjs +1 -1
- package/esm2022/lib/select-value-dialog/select-value-dialog.interface.mjs +1 -1
- package/esm2022/lib/select-value-dialog/select-value-dialog.service.mjs +1 -1
- package/esm2022/lib/spinner/index.mjs +1 -1
- package/esm2022/lib/spinner/spinner.component.mjs +3 -3
- package/esm2022/lib/stop-propagation/index.mjs +1 -1
- package/esm2022/lib/stop-propagation/stop-drop-propagation.directive.mjs +1 -1
- package/esm2022/lib/stop-propagation/stop-propagation.directive.mjs +1 -1
- package/esm2022/lib/table/table-datasource.mjs +1 -1
- package/esm2022/lib/table/table-model.interface.mjs +1 -1
- package/esm2022/lib/table/table.component.mjs +3 -3
- package/esm2022/lib/tool/shared/tool-component.mjs +1 -1
- package/esm2022/lib/tool/shared/toolbox.mjs +1 -1
- package/esm2022/lib/tool/toolbox/toolbox.animation.mjs +1 -1
- package/esm2022/lib/tool/toolbox/toolbox.component.mjs +3 -3
- package/esm2022/lib/widget/shared/widget.service.mjs +1 -1
- package/esm2022/lib/widget/widget-outlet/widget-outlet.component.mjs +3 -3
- package/esm2022/lib/workspace/index.mjs +1 -1
- package/esm2022/lib/workspace/shared/store.mjs +1 -1
- package/esm2022/lib/workspace/shared/workspace.interfaces.mjs +1 -1
- package/esm2022/lib/workspace/shared/workspace.mjs +1 -1
- package/esm2022/lib/workspace/workspace-selector/workspace-selector.component.mjs +3 -3
- package/esm2022/lib/workspace/workspace-widget-outlet/workspace-widget-outlet.component.mjs +3 -3
- package/fesm2022/igo2-common.mjs +125 -131
- package/fesm2022/igo2-common.mjs.map +1 -1
- package/lib/entity/shared/index.d.ts +0 -1
- package/lib/entity/shared/store.d.ts +33 -0
- package/lib/entity/shared/strategies/strategy.d.ts +1 -1
- package/lib/workspace/shared/workspace.d.ts +2 -2
- package/locale/en.common.json +59 -59
- package/locale/fr.common.json +59 -59
- package/package.json +3 -3
- package/src/common-theme.scss +19 -19
- package/src/lib/action/action.theming.scss +5 -5
- package/src/lib/action/actionbar/actionbar-item.theming.scss +32 -32
- package/src/lib/action/actionbar/actionbar.theming.scss +22 -22
- package/src/lib/collapsible/collapsible.theming.scss +22 -22
- package/src/lib/entity/entity-selector/entity-selector.theming.scss +21 -21
- package/src/lib/entity/entity-table/entity-table.theming.scss +37 -37
- package/src/lib/entity/entity.theming.scss +7 -7
- package/src/lib/home-button/home-button.theming.scss +18 -18
- package/src/lib/interactive-tour/interactive-tour.theming.scss +32 -32
- package/src/lib/list/list.theming.scss +58 -58
- package/src/lib/panel/panel.theming.scss +30 -30
- package/src/lib/tool/tool.theming.scss +5 -5
- package/src/lib/tool/toolbox/toolbox.theming.scss +105 -105
- package/src/style/partial/common-utils.scss +9 -9
- package/src/style/partial/common.variables.scss +8 -8
- package/src/style/style.scss +1 -1
- package/esm2022/lib/entity/shared/store-strategy.mjs +0 -73
- package/lib/entity/shared/store-strategy.d.ts +0 -38
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import { EntityStore } from './store';
|
|
2
|
-
export class EntityStoreWithStrategy extends EntityStore {
|
|
3
|
-
/**
|
|
4
|
-
* Strategies
|
|
5
|
-
*/
|
|
6
|
-
strategies = [];
|
|
7
|
-
constructor(entities, options = {}) {
|
|
8
|
-
super(entities, options);
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Add a strategy to this store
|
|
12
|
-
* @param strategy Entity store strategy
|
|
13
|
-
* @returns Entity store
|
|
14
|
-
*/
|
|
15
|
-
addStrategy(strategy, activate = false) {
|
|
16
|
-
const existingStrategy = this.strategies.find((_strategy) => {
|
|
17
|
-
return strategy.constructor === _strategy.constructor;
|
|
18
|
-
});
|
|
19
|
-
if (existingStrategy !== undefined) {
|
|
20
|
-
throw new Error('A strategy of this type already exists on that EntityStore.');
|
|
21
|
-
}
|
|
22
|
-
this.strategies.push(strategy);
|
|
23
|
-
strategy.bindStore(this);
|
|
24
|
-
if (activate === true) {
|
|
25
|
-
strategy.activate();
|
|
26
|
-
}
|
|
27
|
-
return this;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Remove a strategy from this store
|
|
31
|
-
* @param strategy Entity store strategy
|
|
32
|
-
* @returns Entity store
|
|
33
|
-
*/
|
|
34
|
-
removeStrategy(strategy) {
|
|
35
|
-
const index = this.strategies.indexOf(strategy);
|
|
36
|
-
if (index >= 0) {
|
|
37
|
-
this.strategies.splice(index, 1);
|
|
38
|
-
strategy.unbindStore(this);
|
|
39
|
-
}
|
|
40
|
-
return this;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Return strategies of a given type
|
|
44
|
-
* @param type Entity store strategy class
|
|
45
|
-
* @returns Strategies
|
|
46
|
-
*/
|
|
47
|
-
getStrategyOfType(type) {
|
|
48
|
-
return this.strategies.find((strategy) => {
|
|
49
|
-
return strategy instanceof type;
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Activate strategies of a given type
|
|
54
|
-
* @param type Entity store strategy class
|
|
55
|
-
*/
|
|
56
|
-
activateStrategyOfType(type) {
|
|
57
|
-
const strategy = this.getStrategyOfType(type);
|
|
58
|
-
if (strategy !== undefined) {
|
|
59
|
-
strategy.activate();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Deactivate strategies of a given type
|
|
64
|
-
* @param type Entity store strategy class
|
|
65
|
-
*/
|
|
66
|
-
deactivateStrategyOfType(type) {
|
|
67
|
-
const strategy = this.getStrategyOfType(type);
|
|
68
|
-
if (strategy !== undefined) {
|
|
69
|
-
strategy.deactivate();
|
|
70
|
-
}
|
|
71
|
-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KSB7XHJcbiAgICAgIHN0cmF0ZWd5LmFjdGl2YXRlKCk7XHJcbiAgICB9XHJcbiAgfVxyXG5cclxuICAvKipcclxuICAgKiBEZWFjdGl2YXRlIHN0cmF0ZWdpZXMgb2YgYSBnaXZlbiB0eXBlXHJcbiAgICogQHBhcmFtIHR5cGUgRW50aXR5IHN0b3JlIHN0cmF0ZWd5IGNsYXNzXHJcbiAgICovXHJcbiAgZGVhY3RpdmF0ZVN0cmF0ZWd5T2ZUeXBlKHR5cGU6IHR5cGVvZiBFbnRpdHlTdG9yZVN0cmF0ZWd5KSB7XHJcbiAgICBjb25zdCBzdHJhdGVneSA9IHRoaXMuZ2V0U3RyYXRlZ3lPZlR5cGUodHlwZSk7XHJcbiAgICBpZiAoc3RyYXRlZ3kgIT09IHVuZGVmaW5lZCkge1xyXG4gICAgICBzdHJhdGVneS5kZWFjdGl2YXRlKCk7XHJcbiAgICB9XHJcbiAgfVxyXG59XHJcbiJdfQ==
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { EntityState } from './entity.interfaces';
|
|
2
|
-
import { EntityStore, EntityStoreOptions } from './store';
|
|
3
|
-
import { EntityStoreStrategy } from './strategies/strategy';
|
|
4
|
-
export declare class EntityStoreWithStrategy<E extends object = object, S extends EntityState = EntityState> extends EntityStore<E, S> {
|
|
5
|
-
/**
|
|
6
|
-
* Strategies
|
|
7
|
-
*/
|
|
8
|
-
private strategies;
|
|
9
|
-
constructor(entities: E[], options?: EntityStoreOptions);
|
|
10
|
-
/**
|
|
11
|
-
* Add a strategy to this store
|
|
12
|
-
* @param strategy Entity store strategy
|
|
13
|
-
* @returns Entity store
|
|
14
|
-
*/
|
|
15
|
-
addStrategy(strategy: EntityStoreStrategy, activate?: boolean): EntityStore;
|
|
16
|
-
/**
|
|
17
|
-
* Remove a strategy from this store
|
|
18
|
-
* @param strategy Entity store strategy
|
|
19
|
-
* @returns Entity store
|
|
20
|
-
*/
|
|
21
|
-
removeStrategy(strategy: EntityStoreStrategy): EntityStore;
|
|
22
|
-
/**
|
|
23
|
-
* Return strategies of a given type
|
|
24
|
-
* @param type Entity store strategy class
|
|
25
|
-
* @returns Strategies
|
|
26
|
-
*/
|
|
27
|
-
getStrategyOfType(type: typeof EntityStoreStrategy): EntityStoreStrategy;
|
|
28
|
-
/**
|
|
29
|
-
* Activate strategies of a given type
|
|
30
|
-
* @param type Entity store strategy class
|
|
31
|
-
*/
|
|
32
|
-
activateStrategyOfType(type: typeof EntityStoreStrategy): void;
|
|
33
|
-
/**
|
|
34
|
-
* Deactivate strategies of a given type
|
|
35
|
-
* @param type Entity store strategy class
|
|
36
|
-
*/
|
|
37
|
-
deactivateStrategyOfType(type: typeof EntityStoreStrategy): void;
|
|
38
|
-
}
|