@oneteme/jquery-organizer 0.0.2 → 0.0.4
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/README.md +11 -0
- package/esm2022/lib/models/organizer-chart-adapter.mjs +62 -32
- package/esm2022/lib/models/organizer-chart-config.mjs +37 -0
- package/esm2022/lib/models/organizer-config.interface.mjs +1 -1
- package/esm2022/lib/models/organizer-utils.mjs +10 -20
- package/esm2022/lib/organizer-button/organizer-button.component.mjs +72 -6
- package/esm2022/lib/slice-panel/slice-panel.component.mjs +3 -3
- package/fesm2022/oneteme-jquery-organizer.mjs +178 -57
- package/fesm2022/oneteme-jquery-organizer.mjs.map +1 -1
- package/lib/models/organizer-chart-adapter.d.ts +9 -12
- package/lib/models/organizer-chart-config.d.ts +32 -0
- package/lib/models/organizer-config.interface.d.ts +17 -0
- package/lib/organizer-button/organizer-button.component.d.ts +8 -0
- package/package.json +2 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { OrganizerButtonEvent, OrganizerConfig, OrganizerState, OrganizerUnifiedState } from './organizer-config.interface';
|
|
2
2
|
import { UnitConfig } from '@oneteme/jquery-core';
|
|
3
|
+
import { OrganizerChartConfig } from './organizer-chart-config';
|
|
4
|
+
export { OrganizerChartConfig, getGroupItems, getIndicatorItems, getFilterItems, getStackItems } from './organizer-chart-config';
|
|
3
5
|
export interface OrganizerChartItem {
|
|
4
6
|
key: string;
|
|
5
7
|
selected: boolean;
|
|
@@ -26,11 +28,6 @@ export interface OrganizerChartSection {
|
|
|
26
28
|
optional: boolean;
|
|
27
29
|
items: OrganizerChartItem[];
|
|
28
30
|
}
|
|
29
|
-
export interface OrganizerChartConfig {
|
|
30
|
-
groups: OrganizerChartSection;
|
|
31
|
-
indicators: OrganizerChartSection;
|
|
32
|
-
filters?: OrganizerChartSection;
|
|
33
|
-
}
|
|
34
31
|
export interface OrganizerChartBridgeOptions {
|
|
35
32
|
onFetchSliceData?: OrganizerConfig['onFetchSliceData'];
|
|
36
33
|
onExportVisual?: () => void;
|
|
@@ -45,10 +42,10 @@ export interface OrganizerChartEventResult {
|
|
|
45
42
|
binding: OrganizerChartBinding;
|
|
46
43
|
shouldRefetch: boolean;
|
|
47
44
|
}
|
|
48
|
-
export declare function chartConfigToOrganizer(chartConfig:
|
|
49
|
-
export declare function chartConfigToState(chartConfig:
|
|
50
|
-
export declare function buildOrganizerChartBinding(chartConfig:
|
|
51
|
-
export declare function chartConfigToUnifiedState(chartConfig:
|
|
52
|
-
export declare function applyOrganizerEventToChart(event: OrganizerButtonEvent, chartConfig:
|
|
53
|
-
export declare function handleOrganizerChartEvent(event: OrganizerButtonEvent, chartConfig:
|
|
54
|
-
export declare function resolveYUnit(chartConfig:
|
|
45
|
+
export declare function chartConfigToOrganizer(chartConfig: OrganizerChartConfig | null | undefined, options?: OrganizerChartBridgeOptions): OrganizerConfig;
|
|
46
|
+
export declare function chartConfigToState(chartConfig: OrganizerChartConfig | null | undefined): OrganizerState;
|
|
47
|
+
export declare function buildOrganizerChartBinding(chartConfig: OrganizerChartConfig | null | undefined, options?: OrganizerChartBridgeOptions): OrganizerChartBinding;
|
|
48
|
+
export declare function chartConfigToUnifiedState(chartConfig: OrganizerChartConfig | null | undefined, viewMode?: 'chart' | 'table'): OrganizerUnifiedState;
|
|
49
|
+
export declare function applyOrganizerEventToChart(event: OrganizerButtonEvent, chartConfig: OrganizerChartConfig | null | undefined): void;
|
|
50
|
+
export declare function handleOrganizerChartEvent(event: OrganizerButtonEvent, chartConfig: OrganizerChartConfig | null | undefined, currentBinding: OrganizerChartBinding | undefined, options?: OrganizerChartBridgeOptions): OrganizerChartEventResult;
|
|
51
|
+
export declare function resolveYUnit(chartConfig: OrganizerChartConfig | null | undefined, selectedY: string | undefined, selectedYAggregate: string | undefined): string | UnitConfig | undefined;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OrganizerChartItem, OrganizerChartSection } from './organizer-chart-adapter';
|
|
2
|
+
export interface OrganizerChartConfig {
|
|
3
|
+
groups?: OrganizerChartSection;
|
|
4
|
+
indicators?: OrganizerChartSection;
|
|
5
|
+
filters?: OrganizerChartSection;
|
|
6
|
+
templates?: any[];
|
|
7
|
+
}
|
|
8
|
+
export declare enum SyntheticItemKeys {
|
|
9
|
+
EMPTY = "__empty__",
|
|
10
|
+
SYNTHETIC_MARKER = "__synthetic__"
|
|
11
|
+
}
|
|
12
|
+
export declare enum SlicePanelI18nKeys {
|
|
13
|
+
EXPAND_FILTER = "expandFilterTitle",
|
|
14
|
+
COLLAPSE_FILTER = "collapseFilterTitle",
|
|
15
|
+
FILTER_PANEL_TITLE_SINGLE = "filterPanelTitleSingle",
|
|
16
|
+
FILTER_PANEL_TITLE_PLURAL = "filterPanelTitlePlural",
|
|
17
|
+
FILTER_BLOCK_DEFAULT_TITLE = "filterBlockDefaultTitle",
|
|
18
|
+
FILTER_EMPTY_STATE = "filterEmptyState"
|
|
19
|
+
}
|
|
20
|
+
export declare enum OrganizerButtonEventType {
|
|
21
|
+
FIELD_TOGGLED = "fieldToggled",
|
|
22
|
+
X_SELECTED = "xSelected",
|
|
23
|
+
Y_SELECTED = "ySelected",
|
|
24
|
+
GROUP_BY_SELECTED = "groupBySelected",
|
|
25
|
+
TEMPLATE_SELECTED = "templateSelected",
|
|
26
|
+
SLICE_SELECTED = "sliceSelected",
|
|
27
|
+
VIEW_SWITCHED = "viewSwitched"
|
|
28
|
+
}
|
|
29
|
+
export declare function getGroupItems(config: OrganizerChartConfig | null | undefined): OrganizerChartItem[];
|
|
30
|
+
export declare function getIndicatorItems(config: OrganizerChartConfig | null | undefined): OrganizerChartItem[];
|
|
31
|
+
export declare function getFilterItems(config: OrganizerChartConfig | null | undefined): OrganizerChartItem[];
|
|
32
|
+
export declare function getStackItems(indicator: OrganizerChartItem | undefined): OrganizerChartItem[];
|
|
@@ -44,6 +44,16 @@ export interface OrganizerTemplate {
|
|
|
44
44
|
groupBy?: string;
|
|
45
45
|
selectedSlices?: string[];
|
|
46
46
|
}
|
|
47
|
+
export interface OrganizerActionsConfig {
|
|
48
|
+
/** Libellé du sous-menu. Par défaut : Action ou Actions selon le nombre d'actions visibles. */
|
|
49
|
+
label?: string;
|
|
50
|
+
/** Affiche l'action de copie lorsque onCopyVisual est fourni. Le callback peut ouvrir une modale ou une UI personnalisée. */
|
|
51
|
+
showCopy?: boolean;
|
|
52
|
+
/** Affiche l'action de plein écran lorsque onToggleFullscreen est fourni. */
|
|
53
|
+
showFullscreen?: boolean;
|
|
54
|
+
/** Icône optionnelle affichée devant le libellé du sous-menu. */
|
|
55
|
+
icon?: string;
|
|
56
|
+
}
|
|
47
57
|
export interface OrganizerConfig {
|
|
48
58
|
fields?: OrganizerViewField[];
|
|
49
59
|
xFields?: OrganizerXField[];
|
|
@@ -58,6 +68,12 @@ export interface OrganizerConfig {
|
|
|
58
68
|
onExport?: () => void;
|
|
59
69
|
onExportVisual?: () => void;
|
|
60
70
|
onExportData?: () => void;
|
|
71
|
+
/** Affiche les commandes liées au visuel courant dans le sous-menu Actions. */
|
|
72
|
+
showActions?: boolean;
|
|
73
|
+
actions?: OrganizerActionsConfig;
|
|
74
|
+
onCopyVisual?: () => void;
|
|
75
|
+
onToggleFullscreen?: () => void;
|
|
76
|
+
isFullscreen?: boolean;
|
|
61
77
|
showPreferences?: boolean;
|
|
62
78
|
hasSavedPreferences?: boolean;
|
|
63
79
|
onPreferencesEdit?: () => void;
|
|
@@ -77,6 +93,7 @@ export interface OrganizerConfig {
|
|
|
77
93
|
export interface OrganizerSliceState {
|
|
78
94
|
sliceConfigs: SliceConfig<any>[];
|
|
79
95
|
tasks: any[];
|
|
96
|
+
filterApplied?: boolean;
|
|
80
97
|
}
|
|
81
98
|
export interface OrganizerState {
|
|
82
99
|
viewMode?: 'chart' | 'table';
|
|
@@ -31,6 +31,14 @@ export declare class OrganizerButtonComponent implements OnInit, OnDestroy {
|
|
|
31
31
|
onExportVisual(): void;
|
|
32
32
|
onExportData(): void;
|
|
33
33
|
hasExportSubMenu(): boolean;
|
|
34
|
+
isCopyActionVisible(): boolean;
|
|
35
|
+
isFullscreenActionVisible(): boolean;
|
|
36
|
+
hasActions(): boolean;
|
|
37
|
+
hasMenuItemsBeforeActions(): boolean;
|
|
38
|
+
hasOtherMenuItems(): boolean;
|
|
39
|
+
actionsLabel(): string;
|
|
40
|
+
onCopyVisual(): void;
|
|
41
|
+
onToggleFullscreen(): void;
|
|
34
42
|
hasSwitchView(): boolean;
|
|
35
43
|
onSwitchView(): void;
|
|
36
44
|
onPreferencesEdit(): void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oneteme/jquery-organizer",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Independent Organizer Button component library - decentralized organizer management for charts, tables",
|
|
5
5
|
"homepage": "https://github.com/oneteme/jquery-charts",
|
|
6
6
|
"bugs": "https://github.com/oneteme/jquery-charts/issues",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@angular/core": ">=16.1.0",
|
|
14
14
|
"@angular/material": "^16.1.0",
|
|
15
15
|
"@angular/cdk": "^16.1.0",
|
|
16
|
-
"@oneteme/jquery-core": "^0.0.
|
|
16
|
+
"@oneteme/jquery-core": "^0.0.35"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"tslib": "^2.3.0"
|