@ic3/reporting-api 8.4.8 → 8.4.10
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/dist/ApiUtils.js +1 -1
- package/dist/ApiUtils.js.map +1 -1
- package/dist/INotification.d.ts +5 -2
- package/dist/IOnNewEventJsContext.d.ts +6 -0
- package/dist/PublicContext.d.ts +17 -3
- package/dist/PublicDateShortcutUtils.d.ts +41 -0
- package/dist/PublicDateShortcutUtils.js +3 -0
- package/dist/PublicDateShortcutUtils.js.map +1 -0
- package/dist/PublicLayout.d.ts +1 -0
- package/dist/PublicTemplate.d.ts +7 -2
- package/dist/PublicTemplate.js.map +1 -1
- package/dist/PublicTemplateForm.d.ts +21 -6
- package/dist/PublicTemplateForm.js.map +1 -1
- package/dist/PublicTheme.d.ts +44 -2
- package/dist/PublicTheme.js.map +1 -1
- package/dist/PublicTidyColumn.d.ts +72 -32
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeApp.d.ts +4 -0
- package/dist/theme/ThemeApp.js +4 -0
- package/dist/theme/ThemeApp.js.map +1 -1
- package/dist/theme/ThemeDatePicker.d.ts +66 -0
- package/dist/theme/ThemeDatePicker.js +14 -1
- package/dist/theme/ThemeDatePicker.js.map +1 -1
- package/dist/theme/ThemeFilterPanel.d.ts +6 -2
- package/dist/theme/ThemeFilterPanel.js +1 -1
- package/dist/theme/ThemeSinglePanelFilter.d.ts +1 -1
- package/dist/theme/ThemeTable.d.ts +4 -0
- package/dist/theme/ThemeWidgetBox.d.ts +3 -0
- package/dist/theme/ThemeWidgetBox.js +5 -1
- package/dist/theme/ThemeWidgetBox.js.map +1 -1
- package/package.json +7 -7
package/dist/ApiUtils.js
CHANGED
|
@@ -8,7 +8,7 @@ const ReportingVersion_1 = __importDefault(require("./ReportingVersion"));
|
|
|
8
8
|
class ApiUtils {
|
|
9
9
|
static makePlugin(definition) {
|
|
10
10
|
return () => {
|
|
11
|
-
return Object.assign({ apiVersion: new ReportingVersion_1.default("8.4.
|
|
11
|
+
return Object.assign({ apiVersion: new ReportingVersion_1.default("8.4.10" || "-", "Wed, 10 Apr 2024 11:48:07 GMT" || "-") }, definition);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
14
|
/**
|
package/dist/ApiUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApiUtils.js","sourceRoot":"","sources":["../src/ApiUtils.ts"],"names":[],"mappings":";;;;;;AAEA,0EAAkD;AAiDlD,MAAa,QAAQ;IAOV,MAAM,CAAC,UAAU,CAAC,UAA6B;QAElD,OAAO,GAA+B,EAAE;YAEpC,uBAEI,UAAU,EAAE,IAAI,0BAAgB,CAC5B,
|
|
1
|
+
{"version":3,"file":"ApiUtils.js","sourceRoot":"","sources":["../src/ApiUtils.ts"],"names":[],"mappings":";;;;;;AAEA,0EAAkD;AAiDlD,MAAa,QAAQ;IAOV,MAAM,CAAC,UAAU,CAAC,UAA6B;QAElD,OAAO,GAA+B,EAAE;YAEpC,uBAEI,UAAU,EAAE,IAAI,0BAAgB,CAC5B,QAAQ,IAAI,GAAG,EACf,+BAA+B,IAAI,GAAG,CACzC,IAEE,UAAU,EAEhB;QAEL,CAAC,CAAA;IACL,CAAC;IAED;;;;;OAKG;IACI,MAAM,CAAC,oCAAoC,CAAkC,UAAsE;QAEtJ,uCAEO,UAAU,KAEb,MAAM,EAAE,CAAC,OAA6B,EAAE,SAAyB,EAAE,EAAE;gBACjE,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;YAC1D,CAAC,EAED,cAAc,EAAE,KAAK,EAErB,6BAA6B,EAAE,KAAK,IAEvC;IAEL,CAAC;IAEM,MAAM,CAAC,wCAAwC,CAAkC,UAAoD,EAAE,OAA6C;QAEvL,OAAO,8CAEA,OAAO,GACP,UAAiB,CAAC,4BAA4B,KAEjD,iBAAiB,EAAE,SAAS,EAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,GAEmB,CAAA;IAEjD,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,4CAA4C,CAAmC,KAAyC;QAElI,OAAO;YAEH,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;YAEtD,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE;gBAEjB,qDAEO,OAAO,CAAC,gBAAgB,GAExB,KAAK,CAAC,KAAK,CAAC,+BAA+B;oBAE9C;;;;;uBAKG;oBACH,iBAAiB,EAAE,UAAU,QAAQ;wBAEjC,MAAM,eAAe,GAAG,QAAQ,CAAC,wCAAwC,CAAC,IAAI,EAAE,QAAS,CAAC,CAAC;wBAE3F,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;4BAEnC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC,OAAO,iCAE/B,eAAe;gCAElB,8DAA8D;gCAE9D,gBAAgB,EAAE,UAAU,CAAC,OAAO,CAAC,oBAAoB,CAAC,eAAe,CAAC,gBAAgB,CAAC,EAC3F,gBAAgB,EAAE,UAAU,CAAC,OAAO,CAAC,gBAAgB,IAEvD,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAA;wBACjC,CAAC,CAAC,CAAC;oBAEP,CAAC,IACJ;YACL,CAAC;SAEwC,CAAC;IAElD,CAAC;;AA/GL,4BAiHC;AA/GG;;GAEG;AACoB,uBAAc,GAAG,OAAO,CAAC"}
|
package/dist/INotification.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PaperOrientation, PaperSizeName } from "./ITypes";
|
|
2
|
-
export type AppNotificationType = "edit-report" | "print-report-dialog" | "print-report" | "print-report-without-state" | "print-report-in-browser" | "clear-selection-all-widgets" | "initialize-selection-all-widgets" | "save-state-to-localstorage" | "restore-state-from-localstorage" | "save-ownprops-to-localstorage" | "restore-ownprops-from-localstorage" | "save-reportwidgets-ownprops-to-localstorage" | "restore-reportwidgets-ownprops-from-localstorage";
|
|
2
|
+
export type AppNotificationType = "logout" | "edit-report" | "print-report-dialog" | "print-report" | "print-report-without-state" | "print-report-in-browser" | "clear-selection-all-widgets" | "initialize-selection-all-widgets" | "save-state-to-localstorage" | "restore-state-from-localstorage" | "save-ownprops-to-localstorage" | "restore-ownprops-from-localstorage" | "save-reportwidgets-ownprops-to-localstorage" | "restore-reportwidgets-ownprops-from-localstorage";
|
|
3
3
|
export interface IAppNotification {
|
|
4
4
|
/**
|
|
5
5
|
* E.g., print-report.
|
|
@@ -16,6 +16,9 @@ export interface IAppNotificationWithPayload<PAYLOAD> extends IAppNotification {
|
|
|
16
16
|
*/
|
|
17
17
|
readonly payload: PAYLOAD;
|
|
18
18
|
}
|
|
19
|
+
export interface AppLogoutNotification extends IAppNotification {
|
|
20
|
+
readonly type: "logout";
|
|
21
|
+
}
|
|
19
22
|
export interface AppEditReportNotification extends IAppNotification {
|
|
20
23
|
readonly type: "edit-report";
|
|
21
24
|
}
|
|
@@ -66,7 +69,7 @@ export interface ClearSelectionAllWidgetsNotification extends IAppNotification {
|
|
|
66
69
|
export interface InitializeSelectionAllWidgetsNotification extends IAppNotification {
|
|
67
70
|
readonly type: "initialize-selection-all-widgets";
|
|
68
71
|
}
|
|
69
|
-
export type AppNotification = AppEditReportNotification | AppPrintReportDialogNotification | AppPrintReportNotification | AppPrintReportWithoutStateNotification | AppPrintReportInBrowserNotification | SaveStateToLocalStorageNotification | RestoreStateFromLocalStorageNotification | SaveOwnPropsToLocalStorageNotification | RestoreWidgetOwnPropsFromLocalStorageNotification | SaveWidgetOwnPropsToLocalStorageNotification | RestoreOwnPropsFromLocalStorageNotification | InitializeSelectionAllWidgetsNotification | ClearSelectionAllWidgetsNotification;
|
|
72
|
+
export type AppNotification = AppLogoutNotification | AppEditReportNotification | AppPrintReportDialogNotification | AppPrintReportNotification | AppPrintReportWithoutStateNotification | AppPrintReportInBrowserNotification | SaveStateToLocalStorageNotification | RestoreStateFromLocalStorageNotification | SaveOwnPropsToLocalStorageNotification | RestoreWidgetOwnPropsFromLocalStorageNotification | SaveWidgetOwnPropsToLocalStorageNotification | RestoreOwnPropsFromLocalStorageNotification | InitializeSelectionAllWidgetsNotification | ClearSelectionAllWidgetsNotification;
|
|
70
73
|
export interface IAppNotificationToken {
|
|
71
74
|
type: AppNotificationType;
|
|
72
75
|
uid: number;
|
|
@@ -6,6 +6,12 @@ export interface IEventPayLoad {
|
|
|
6
6
|
event: PublicIcEvent | null | undefined;
|
|
7
7
|
}
|
|
8
8
|
export interface IOnNewEventJsContext {
|
|
9
|
+
isAppConsole(): boolean;
|
|
10
|
+
isAppReportViewer(): boolean;
|
|
11
|
+
isAppReportEditor(): boolean;
|
|
12
|
+
isAppReportEditorPreview(): boolean;
|
|
13
|
+
isAppReportAppEditor(): boolean;
|
|
14
|
+
isAppGadgetEditor(): boolean;
|
|
9
15
|
/**
|
|
10
16
|
* A context cache that persist over calls.
|
|
11
17
|
*/
|
package/dist/PublicContext.d.ts
CHANGED
|
@@ -25,6 +25,12 @@ export declare enum IContentMessageType {
|
|
|
25
25
|
}
|
|
26
26
|
export interface IPublicContext {
|
|
27
27
|
logger(): ILogger;
|
|
28
|
+
isAppConsole(): boolean;
|
|
29
|
+
isAppReportViewer(): boolean;
|
|
30
|
+
isAppReportEditor(): boolean;
|
|
31
|
+
isAppReportEditorPreview(): boolean;
|
|
32
|
+
isAppReportAppEditor(): boolean;
|
|
33
|
+
isAppGadgetEditor(): boolean;
|
|
28
34
|
/**
|
|
29
35
|
* React, returns true when loaded
|
|
30
36
|
*/
|
|
@@ -35,15 +41,23 @@ export interface IPublicContext {
|
|
|
35
41
|
*/
|
|
36
42
|
getThemeFormatter(): ThemeFormatters;
|
|
37
43
|
getUserName(): string;
|
|
44
|
+
getReportName(): string;
|
|
45
|
+
getReportFolderName(): string;
|
|
38
46
|
getReportLocale(): string;
|
|
39
|
-
|
|
40
|
-
|
|
47
|
+
/**
|
|
48
|
+
* @param format Formatter. Defaults to `defaultNumber` from the theme.
|
|
49
|
+
*/
|
|
50
|
+
getNumberFormatter(format: ThemeTextFormatter | null | undefined): (value: any | undefined) => string;
|
|
51
|
+
/**
|
|
52
|
+
* @param format Formatter. Defaults to `defaultDate` or `defaultDatetime` from the theme.
|
|
53
|
+
*/
|
|
54
|
+
getDateFormatter(format: ThemeTextFormatter | null | undefined): (value: any | undefined) => string;
|
|
41
55
|
/**
|
|
42
56
|
* translate the content of a report (the title of widgets, content of some widgets...). This does use another file
|
|
43
57
|
*
|
|
44
58
|
* aka content localization
|
|
45
59
|
*/
|
|
46
|
-
translateContent(content: string): string;
|
|
60
|
+
translateContent(content: string, ...args: any[]): string;
|
|
47
61
|
/**
|
|
48
62
|
* localized report application tags (e.g. edit, write, save.. )
|
|
49
63
|
*/
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
type DateType = any;
|
|
2
|
+
export interface PublicDateShortcutUtils<T = DateType> {
|
|
3
|
+
/**
|
|
4
|
+
* Get a date. See documentation for `new Date(…)` for the year, month and day arguments.
|
|
5
|
+
*/
|
|
6
|
+
asDate(year: number, month: number, day: number): T;
|
|
7
|
+
/**
|
|
8
|
+
* Return the current datetime.
|
|
9
|
+
*/
|
|
10
|
+
now(): T;
|
|
11
|
+
/**
|
|
12
|
+
* Return the current date. Returns the anchor date if it exists. The date returned has time 00:00:00.
|
|
13
|
+
* To get the date and time, use `current()`.
|
|
14
|
+
*/
|
|
15
|
+
currentDate(): T;
|
|
16
|
+
/**
|
|
17
|
+
* Return the current datetime. Returns the anchor datetime if it exists.
|
|
18
|
+
*/
|
|
19
|
+
current(): T;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the anchor date.
|
|
22
|
+
*/
|
|
23
|
+
getAnchorDate(): T | null;
|
|
24
|
+
/**
|
|
25
|
+
* Return the date of today with the time 00:00:00. To get the date and time, use `now()`.
|
|
26
|
+
*/
|
|
27
|
+
today(): T;
|
|
28
|
+
/**
|
|
29
|
+
* Get the bottom limit of the allowed date range (included). Returns `null` if no bottom limit.
|
|
30
|
+
*/
|
|
31
|
+
minAllowedDate(): T | null;
|
|
32
|
+
/**
|
|
33
|
+
* Get the upper limit of the allowed date range (included). Returns `null` if no upper limit.
|
|
34
|
+
*/
|
|
35
|
+
maxAllowedDate(): T | null;
|
|
36
|
+
/**
|
|
37
|
+
* Returns intersect of `range` and [minDate, maxDate].
|
|
38
|
+
*/
|
|
39
|
+
clampDates(range: [T | null, T | null]): [T | null, T | null];
|
|
40
|
+
}
|
|
41
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PublicDateShortcutUtils.js","sourceRoot":"","sources":["../src/PublicDateShortcutUtils.ts"],"names":[],"mappings":""}
|
package/dist/PublicLayout.d.ts
CHANGED
package/dist/PublicTemplate.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { ReactElement } from "react";
|
|
|
7
7
|
import { Theme } from "@mui/material/styles";
|
|
8
8
|
import { WidgetTemplateChartOptions, WidgetTemplateIDs } from "./PublicTemplates";
|
|
9
9
|
import { ChartTemplateDataMapping, IFormFieldGranularityItem } from "./PublicTidyTableTypes";
|
|
10
|
-
import { ResizingConstraintOptions } from "./theme/ThemeWidgetBox";
|
|
10
|
+
import { PositionModeOptions, ResizingConstraintOptions } from "./theme/ThemeWidgetBox";
|
|
11
11
|
import { QueryType } from "./ITypes";
|
|
12
12
|
import { ILogger } from "./Logger";
|
|
13
13
|
export interface IRectanglePosition {
|
|
@@ -92,6 +92,7 @@ export interface IWidgetLayoutInfo extends IRectangle {
|
|
|
92
92
|
gridLayoutInfo?: IWidgetBoxGridLayoutInfo;
|
|
93
93
|
data?: IWidgetLayoutData;
|
|
94
94
|
resizingConstraint?: ResizingConstraintOptions;
|
|
95
|
+
positionMode?: PositionModeOptions;
|
|
95
96
|
/**
|
|
96
97
|
* When _ printing _, the widget's layout has been converted and this scale has been applied to compute
|
|
97
98
|
* the new widget size.
|
|
@@ -509,7 +510,11 @@ interface IPublicCommonWidgetTemplateDefinition<OPTIONS extends FormFieldObject>
|
|
|
509
510
|
* Change the data to show when the user presses show-data from the widget menu.
|
|
510
511
|
* @param ownProps
|
|
511
512
|
*/
|
|
512
|
-
getShowHideDataTable?: (table: ITidyTable | undefined, options: OPTIONS, ownProps: any) => ITidyTable | undefined;
|
|
513
|
+
getShowHideDataTable?: (table: ITidyTable | undefined, options: OPTIONS, ownProps: any, theme: Theme) => ITidyTable | undefined;
|
|
514
|
+
/**
|
|
515
|
+
* For lazy filters or widgets with selection do not clean initial Selection based on initial tidy table
|
|
516
|
+
*/
|
|
517
|
+
doNotCleanSelectionOnInitialProps?: true;
|
|
513
518
|
}
|
|
514
519
|
/**
|
|
515
520
|
* *********************************************************************************************************************
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTemplate.js","sourceRoot":"","sources":["../src/PublicTemplate.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PublicTemplate.js","sourceRoot":"","sources":["../src/PublicTemplate.ts"],"names":[],"mappings":";;;AAuIA,IAAY,4CAIX;AAJD,WAAY,4CAA4C;IACpD,qEAAqB,CAAA;IACrB,yEAAyB,CAAA;IACzB,2EAA2B,CAAA;AAC/B,CAAC,EAJW,4CAA4C,4DAA5C,4CAA4C,QAIvD;AAufD;;;;GAIG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACpC,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,2CAAW,CAAA;IACX,6CAAa,CAAA;AACjB,CAAC,EALW,4BAA4B,4CAA5B,4BAA4B,QAKvC;AA6BD;;GAEG;AACH,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAChC,mDAAuB,CAAA;IACvB,mDAAuB,CAAA;IAEvB,gBAAgB;IAChB,0DAA8B,CAAA;IAC9B,iEAAqC,CAAA;AACzC,CAAC,EAPW,wBAAwB,wCAAxB,wBAAwB,QAOnC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { IWidgetEditorPublicContext } from "./PublicContext";
|
|
1
|
+
import { IPublicContext, IWidgetEditorPublicContext } from "./PublicContext";
|
|
2
2
|
import { ITidyColumn } from "./PublicTidyColumn";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import { AutocompleteRenderInputParams, AutocompleteRenderOptionState } from "@mui/material/Autocomplete/Autocomplete";
|
|
4
|
+
import { AutocompleteProps, AutocompleteRenderInputParams, AutocompleteRenderOptionState } from "@mui/material/Autocomplete/Autocomplete";
|
|
5
5
|
import { ChartTemplateDataMapping, IFormFieldGranularityItem, TidyColumnsType, TidyTableColumnSelector } from "./PublicTidyTableTypes";
|
|
6
6
|
import { ITidyTable } from "./PublicTidyTable";
|
|
7
|
+
import { Theme } from "@mui/material/styles";
|
|
7
8
|
export type Hook<T, P> = {
|
|
8
9
|
hook: (value: T, options: P) => void;
|
|
9
10
|
};
|
|
@@ -103,7 +104,7 @@ export type FormFields<T extends FormFieldObject> = {
|
|
|
103
104
|
} | {
|
|
104
105
|
defaultValue?: any;
|
|
105
106
|
mandatory?: false;
|
|
106
|
-
}) & (Required<T>[key] extends FormFieldObject ? Omit<IFormEmbeddedFieldDef<Required<T>[key]>, 'fieldPath'> : Required<T>[key] extends IPaletteDef ? Omit<IFormPaletteEditorFieldDef, 'fieldPath'> : Required<T>[key] extends IFormConditionalColorRule[] ? Omit<IFormConditionalColorRulesFieldDef, 'fieldPath'> : Required<T>[key] extends IColorDef ? Omit<IFormColorEditorFieldDef, 'fieldPath'> : Required<T>[key] extends TidyTableColumnSelector[] ? Omit<IFormColumnChooserMultipleFieldDef, 'fieldPath'> : Required<T>[key] extends TidyTableColumnSelector ? Omit<IFormColumnChooserSingleFieldDef, 'fieldPath'> : Required<T>[key] extends IFormEventMappingArrayFieldDefType ? Omit<IFormEventMappingArrayFieldDef, 'fieldPath'> : Required<T>[key] extends IFormEventArrayFieldDefType ? Omit<IFormEventArrayFieldDef, 'fieldPath'> : Required<T>[key] extends IFormSearchAndReplaceArrayFieldDefType ? Omit<IFormSearchAndReplaceArrayFieldDef, 'fieldPath'> : Required<T>[key] extends Hook<any, any> ? Omit<IFormHookFieldDef<any>, 'fieldPath'> : Required<T>[key] extends boolean ? Omit<IFormBooleanFieldDef, 'fieldPath'> : Required<T>[key] extends number ? Omit<IFormNumberFieldDef, 'fieldPath'> : Required<T>[key] extends number ? Omit<IFormMaskFieldDef, 'fieldPath'> : Required<T>[key] extends string ? Omit<IFormOptionFieldSingleDef, 'fieldPath'> | Omit<IFormStringFieldDef, 'fieldPath'> | Omit<IFormFormatterPickerFieldDef, 'fieldPath'> | Omit<IFormWidgetVariantFieldDef, 'fieldPath'> | Omit<IFormTidyTableTextExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableTextRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericStringColumnExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableHtmlRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableHtmlExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericColumnExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericJSColumnExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableColorRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableStringRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableScaleRowExprFieldDef, 'fieldPath'> | Omit<IFormJsFieldDef, 'fieldPath'> | Omit<IFormJsonFieldDef, 'fieldPath'> | Omit<IFormMarkdownFieldDef, 'fieldPath'> | Omit<IFormOptionFieldReportPathDef, 'fieldPath'> | Omit<IFormPropertyChooserBaseDef, 'fieldPath'> | Omit<IFormLayoutFieldDef, 'fieldPath'> | Omit<IFormLayoutFieldDef, 'fieldPath'> | Omit<IFormFilterPanelModelSelectorFieldDef, 'fieldPath'> : Required<T>[key] extends string[] ? Omit<IFormOptionFieldMultipleDef, 'fieldPath'> | Omit<IFormGroupsFieldDef, 'fieldPath'> : never);
|
|
107
|
+
}) & (Required<T>[key] extends FormFieldObject ? Omit<IFormEmbeddedFieldDef<Required<T>[key]>, 'fieldPath'> : Required<T>[key] extends IPaletteDef ? Omit<IFormPaletteEditorFieldDef, 'fieldPath'> : Required<T>[key] extends IFormConditionalColorRule[] ? Omit<IFormConditionalColorRulesFieldDef, 'fieldPath'> : Required<T>[key] extends IColorDef ? Omit<IFormColorEditorFieldDef, 'fieldPath'> : Required<T>[key] extends TidyTableColumnSelector[] ? Omit<IFormColumnChooserMultipleFieldDef, 'fieldPath'> : Required<T>[key] extends TidyTableColumnSelector ? Omit<IFormColumnChooserSingleFieldDef, 'fieldPath'> : Required<T>[key] extends IFormEventMappingArrayFieldDefType ? Omit<IFormEventMappingArrayFieldDef, 'fieldPath'> : Required<T>[key] extends IFormEventArrayFieldDefType ? Omit<IFormEventArrayFieldDef, 'fieldPath'> : Required<T>[key] extends IFormSearchAndReplaceArrayFieldDefType ? Omit<IFormSearchAndReplaceArrayFieldDef, 'fieldPath'> : Required<T>[key] extends Hook<any, any> ? Omit<IFormHookFieldDef<any>, 'fieldPath'> : Required<T>[key] extends boolean ? Omit<IFormBooleanFieldDef, 'fieldPath'> : Required<T>[key] extends number ? Omit<IFormNumberFieldDef, 'fieldPath'> : Required<T>[key] extends number ? Omit<IFormMaskFieldDef, 'fieldPath'> : Required<T>[key] extends string ? Omit<IFormOptionFieldSingleDef, 'fieldPath'> | Omit<IFormStringFieldDef, 'fieldPath'> | Omit<IFormFormatterPickerFieldDef, 'fieldPath'> | Omit<IFormWidgetVariantFieldDef, 'fieldPath'> | Omit<IFormTidyTableTextExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableTextRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericStringColumnExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableHtmlRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableHtmlExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericColumnExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericJSColumnExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableColorRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableStringRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableScaleRowExprFieldDef, 'fieldPath'> | Omit<IFormJsFieldDef, 'fieldPath'> | Omit<IFormJsonFieldDef, 'fieldPath'> | Omit<IFormMarkdownFieldDef, 'fieldPath'> | Omit<IFormOptionFieldReportPathDef, 'fieldPath'> | Omit<IFormPropertyChooserBaseDef, 'fieldPath'> | Omit<IFormLayoutFieldDef, 'fieldPath'> | Omit<IFormLayoutFieldDef, 'fieldPath'> | Omit<IFormFilterPanelModelSelectorFieldDef, 'fieldPath'> | Omit<IFormShortcutChooserDef<string>, 'fieldPath'> : Required<T>[key] extends string[] ? Omit<IFormOptionFieldMultipleDef, 'fieldPath'> | Omit<IFormGroupsFieldDef, 'fieldPath'> | Omit<IFormShortcutChooserDef<string[]>, 'fieldPath'> : never);
|
|
107
108
|
};
|
|
108
109
|
export declare enum IFormFieldGroupTypes {
|
|
109
110
|
Selection = "groupSelection",
|
|
@@ -298,7 +299,11 @@ export type FormFieldType =
|
|
|
298
299
|
/**
|
|
299
300
|
* @see IFormFilterPanelModelSelectorFieldDef
|
|
300
301
|
*/
|
|
301
|
-
"filterPanelModelSelector"
|
|
302
|
+
"filterPanelModelSelector" |
|
|
303
|
+
/**
|
|
304
|
+
* @see IFormShortcutChooserDef
|
|
305
|
+
*/
|
|
306
|
+
"shortcutChooser";
|
|
302
307
|
export type FormFieldTidyTableExprType = "tidyTableColorRowExpr" | "tidyTableHtmlExpr" | "tidyTableHtmlRowExpr" | "tidyTableNumericColumnExpr" | "tidyTableNumericExpr" | "tidyTableNumericJSColumnExpr" | "tidyTableNumericRowExpr" | "tidyTableNumericStringColumnExpr" | "tidyTableScaleRowExpr" | "tidyTableTextExpr" | "tidyTableTextRowExpr" | "tidyTableStringRowExpr";
|
|
303
308
|
export declare function isTidyTableExpr(type: FormFieldType): type is FormFieldTidyTableExprType;
|
|
304
309
|
export declare function isTidyTableExprJS(type: FormFieldType): boolean;
|
|
@@ -364,7 +369,9 @@ export interface IFormAutocompleteFieldDef<OPTION> extends IFormFieldDef<OPTION>
|
|
|
364
369
|
getOptionLabel?: (option: OPTION | undefined | null) => string;
|
|
365
370
|
isOptionEqualToValue?: (option: OPTION | undefined | null, value: OPTION | undefined | null) => boolean;
|
|
366
371
|
freeSolo?: boolean;
|
|
367
|
-
optionValues?: OPTION[] | ((callback: ((suggestions: OPTION[]) => void), dependsOnValue?: any
|
|
372
|
+
optionValues?: OPTION[] | ((callback: ((suggestions: OPTION[]) => void), dependsOnValue?: any, param?: {
|
|
373
|
+
theme: Theme;
|
|
374
|
+
}) => void);
|
|
368
375
|
optionValuesObsolete?: boolean;
|
|
369
376
|
optionValuesObsoleteMessage?: string;
|
|
370
377
|
noOptionsText?: AutocompleteNoOptionsText;
|
|
@@ -375,6 +382,7 @@ export interface IFormAutocompleteFieldDef<OPTION> extends IFormFieldDef<OPTION>
|
|
|
375
382
|
renderInput?: (params: AutocompleteRenderInputParams) => React.ReactNode;
|
|
376
383
|
renderOption?: (props: React.HTMLAttributes<HTMLLIElement>, option: OPTION, state: AutocompleteRenderOptionState, onClose: () => void) => React.ReactNode;
|
|
377
384
|
disableClearable?: boolean;
|
|
385
|
+
renderTags?: AutocompleteProps<OPTION, any, any, any>['renderTags'];
|
|
378
386
|
};
|
|
379
387
|
}
|
|
380
388
|
/**
|
|
@@ -1067,5 +1075,12 @@ export interface IFormConditionalColorRulesFieldDef extends IFormFieldDef<IFormC
|
|
|
1067
1075
|
export interface IFormFilterPanelModelSelectorFieldDef extends IFormFieldDef<string> {
|
|
1068
1076
|
fieldType: "filterPanelModelSelector";
|
|
1069
1077
|
}
|
|
1070
|
-
export type
|
|
1078
|
+
export type LocalizeContext = Pick<IPublicContext, 'localize'>;
|
|
1079
|
+
export interface IFormShortcutChooserDef<T extends string | string[]> extends IFormFieldDef<T> {
|
|
1080
|
+
fieldType: "shortcutChooser";
|
|
1081
|
+
editorConf?: {
|
|
1082
|
+
getOptions: (deps: any, theme: Theme, context: LocalizeContext) => IOption[];
|
|
1083
|
+
};
|
|
1084
|
+
}
|
|
1085
|
+
export type FormFieldDef = IFormAutocompleteFieldDef<any> | IFormBooleanFieldDef | IFormColorEditorFieldDef | IFormColumnChooserFieldDef | IFormColumnSelectionFieldDef | IFormConstantsFieldDef | IFormEventArrayFieldDef | IFormEventMappingArrayFieldDef | IFormFileUploaderFieldDef | IFormGroupsFieldDef | IFormJsFieldDef | IFormMarkdownFieldDef | IFormMaskFieldDef | IFormMdxFieldDef | IFormNumberFieldDef | IFormOptionFieldDef | IFormOptionFieldSingleDef | IFormOptionFieldMultipleDef | IFormPaletteEditorFieldDef | IFormReportPathFieldDef | IFormReportPermaLinkFieldDef | IFormStringFieldDef | IFormTidyTableHtmlExprFieldDef | IFormTidyTableHtmlRowExprFieldDef | IFormTidyTableNumericExprFieldDef | IFormTidyTableNumericRowExprFieldDef | IFormTidyTableStringRowExprFieldDef | IFormTidyTableColorRowExprFieldDef | IFormTidyTableScaleRowExprFieldDef | IFormTidyTableTextExprFieldDef | IFormTidyTableTextRowExprFieldDef | IFormWidgetVariantFieldDef | IFormFormatterPickerFieldDef | IFormGranularitySelectionFieldDef | IFormSearchAndReplaceArrayFieldDef | IFormPropertyChooserBaseDef | IFormLayoutFieldDef | IFormConditionalColorRulesFieldDef | IFormFilterPanelModelSelectorFieldDef | IFormShortcutChooserDef<any>;
|
|
1071
1086
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTemplateForm.js","sourceRoot":"","sources":["../src/PublicTemplateForm.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PublicTemplateForm.js","sourceRoot":"","sources":["../src/PublicTemplateForm.ts"],"names":[],"mappings":";;;AAuBA,SAAgB,oBAAoB,CAAC,KAAyB;IAC1D,OAAO,KAAK,CAAC,KAAK,KAAK,oBAAoB,CAAC,SAAS,CAAC;AAC1D,CAAC;AAFD,oDAEC;AAyKD,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,oDAA4B,CAAA;IAC5B,yEAAiD,CAAA;IACjD,sDAA8B,CAAA;AAClC,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B;AAwND,SAAgB,eAAe,CAAC,IAAmB;IAC/C,OAAO,IAAI,KAAK,uBAAuB;WAChC,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,4BAA4B;WACrC,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,8BAA8B;WACvC,IAAI,KAAK,yBAAyB;WAClC,IAAI,KAAK,kCAAkC;WAC3C,IAAI,KAAK,uBAAuB;WAChC,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,wBAAwB,CACnC;AACT,CAAC;AAdD,0CAcC;AAED,SAAgB,iBAAiB,CAAC,IAAmB;IACjD,OAAO,IAAI,KAAK,uBAAuB;WAChC,IAAI,KAAK,wBAAwB;WACjC,IAAI,KAAK,uBAAuB;WAChC,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,4BAA4B;WACrC,IAAI,KAAK,kCAAkC;WAC3C,IAAI,KAAK,8BAA8B;WACvC,IAAI,KAAK,yBAAyB,CACpC;AACT,CAAC;AAVD,8CAUC;AAED,SAAgB,oBAAoB,CAAC,IAAmB;IACpD,OAAO,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB,CACjC;AACT,CAAC;AALD,oDAKC;AAED,SAAgB,qBAAqB,CAAC,IAAmB;IACrD,OAAO,IAAI,KAAK,4BAA4B;WACrC,IAAI,KAAK,kCAAkC;WAC3C,IAAI,KAAK,8BAA8B,CACzC;AACT,CAAC;AALD,sDAKC;AAED,SAAgB,kBAAkB,CAAC,IAAmB;IAClD,OAAO,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,yBAAyB;WAClC,IAAI,KAAK,wBAAwB;WACjC,IAAI,KAAK,uBAAuB;WAChC,IAAI,KAAK,uBAAuB,CAClC;AACT,CAAC;AARD,gDAQC;AAED,SAAgB,4BAA4B,CAAC,IAAmB;IAC5D,OAAO,IAAI,KAAK,uBAAuB,IAAI,IAAI,KAAK,wBAAwB,IAAI,IAAI,KAAK,kCAAkC,CAAA;AAC/H,CAAC;AAFD,oEAEC;AAED,SAAgB,wBAAwB,CAAC,IAAmB;IACxD,OAAO,IAAI,KAAK,8BAA8B,CAAA;AAClD,CAAC;AAFD,4DAEC;AAED,SAAgB,mBAAmB,CAAC,IAAmB;IACnD,OAAO,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB,CACjC;AACT,CAAC;AAJD,kDAIC;AAED,SAAgB,uBAAuB,CAAC,IAAmB;IACvD,OAAO,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB,CACjC;AACT,CAAC;AAJD,0DAIC;AAED,SAAgB,sBAAsB,CAAC,IAAmB;IACtD,OAAO,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,4BAA4B;WACrC,IAAI,KAAK,yBAAyB,CACpC;AACT,CAAC;AALD,wDAKC;AAED,SAAgB,oBAAoB,CAAC,IAAmB;IACpD,OAAO,IAAI,KAAK,uBAAuB,CAClC;AACT,CAAC;AAHD,oDAGC;AAED;;;GAGG;AACH,IAAY,yBAKX;AALD,WAAY,yBAAyB;IACjC,sDAAyB,CAAA;IACzB,sDAAyB,CAAA;IACzB,gEAAmC,CAAA;IACnC,gEAAmC,CAAA;AACvC,CAAC,EALW,yBAAyB,yCAAzB,yBAAyB,QAKpC;AAED;;GAEG;AACH,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC3B,8CAAuB,CAAA;AAC3B,CAAC,EAFW,mBAAmB,mCAAnB,mBAAmB,QAE9B;AAi9BD;;GAEG;AAEH,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAChC,6CAAiB,CAAA;IACjB,yDAA6B,CAAA;IAC7B,qEAAyC,CAAA;IACzC,yDAA6B,CAAA;IAC7B,qEAAyC,CAAA;AAC7C,CAAC,EANW,wBAAwB,wCAAxB,wBAAwB,QAMnC"}
|
package/dist/PublicTheme.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ import { FilterPanelClassesKey, FilterPanelProps } from "./theme/ThemeFilterPane
|
|
|
28
28
|
import { FilterCheckboxProps, FilterCheckboxRadioClassKey } from "./theme/ThemeFilterCheckboxRadio";
|
|
29
29
|
import { ReportAppLeftPanelClassKey } from "./theme/ThemeReportAppLeftPanel";
|
|
30
30
|
import { FilterTreeClassKey, FilterTreePopOverClassKey, FilterTreePopOverProps, FilterTreeProps } from "./theme/ThemeFilterTree";
|
|
31
|
-
import { DatePickerClassKey, FilterDatePickerProps } from "./theme/ThemeDatePicker";
|
|
31
|
+
import { DatePickerClassKey, DatePickerShortcut, DateRangePickerShortcut, FilterDatePickerProps } from "./theme/ThemeDatePicker";
|
|
32
32
|
import { FilterAutocompleteClassesKey, FilterAutocompleteProps } from "./theme/ThemeFilterAutocomplete";
|
|
33
33
|
import { AppMenuIconClassKey, AppMenuIconProps } from "./theme/ThemeAppMenuIcon";
|
|
34
34
|
import { QueryBuilderNodeClassKey, QueryBuilderNodeProps } from "./theme/ThemeQueryBuilderNode";
|
|
@@ -75,6 +75,15 @@ export type ThemeTextFormatter = {
|
|
|
75
75
|
formatExcel?: string;
|
|
76
76
|
};
|
|
77
77
|
export type ThemeTextFormatters = Record<string, ThemeTextFormatter> & {
|
|
78
|
+
/**
|
|
79
|
+
* The default formatter for displaying date values.
|
|
80
|
+
* Also used in the expressions when using $value.formatDate()$.
|
|
81
|
+
*
|
|
82
|
+
* Default: {
|
|
83
|
+
* formatReport: "yyyy-MM-dd"
|
|
84
|
+
* }
|
|
85
|
+
*/
|
|
86
|
+
defaultDate: ThemeTextFormatter;
|
|
78
87
|
/**
|
|
79
88
|
* The default formatter for displaying datetime values.
|
|
80
89
|
* Also used in the expressions when using $value.formatDate()$.
|
|
@@ -83,7 +92,7 @@ export type ThemeTextFormatters = Record<string, ThemeTextFormatter> & {
|
|
|
83
92
|
* formatReport: "yyyy-MM-dd HH:mm:ss"
|
|
84
93
|
* }
|
|
85
94
|
*/
|
|
86
|
-
|
|
95
|
+
defaultDatetime: ThemeTextFormatter;
|
|
87
96
|
/**
|
|
88
97
|
* The default way to format any number that has no format defined.
|
|
89
98
|
* Used in the expressions when using $value.formatNumber()$.
|
|
@@ -517,6 +526,31 @@ export interface ic3Theme {
|
|
|
517
526
|
*/
|
|
518
527
|
viewPortOffsetLeft: number;
|
|
519
528
|
};
|
|
529
|
+
/**
|
|
530
|
+
* Options for date/range pickers. Filter panel / date picker filter.
|
|
531
|
+
*/
|
|
532
|
+
datePicker: {
|
|
533
|
+
shortcuts: Record<'default', {
|
|
534
|
+
datePickerShortcuts: DatePickerShortcut[];
|
|
535
|
+
rangePickerShortcuts: DateRangePickerShortcut[];
|
|
536
|
+
}> & Record<string, {
|
|
537
|
+
datePickerShortcuts: DatePickerShortcut[];
|
|
538
|
+
rangePickerShortcuts: DateRangePickerShortcut[];
|
|
539
|
+
}>;
|
|
540
|
+
};
|
|
541
|
+
/**
|
|
542
|
+
* Options for saving the state of all dashboard filters into local storage.
|
|
543
|
+
*/
|
|
544
|
+
filterState?: {
|
|
545
|
+
/**
|
|
546
|
+
* Set to true to disable auto save for all dashboards and make the option inactive.
|
|
547
|
+
*/
|
|
548
|
+
disableFilterStateOption?: boolean;
|
|
549
|
+
/**
|
|
550
|
+
* The default value for auto-saving filter setting.
|
|
551
|
+
*/
|
|
552
|
+
autosaveFilterStateToSessionStorage?: boolean;
|
|
553
|
+
};
|
|
520
554
|
}
|
|
521
555
|
export interface ic3ThemeOptions {
|
|
522
556
|
/**
|
|
@@ -575,6 +609,9 @@ export interface ic3ThemeOptions {
|
|
|
575
609
|
*/
|
|
576
610
|
extraHeight?: number;
|
|
577
611
|
contentOffset: {
|
|
612
|
+
/**
|
|
613
|
+
* Corresponds to the actual height as defined for WidgetBoxClasses.header.
|
|
614
|
+
*/
|
|
578
615
|
top: number;
|
|
579
616
|
left: number;
|
|
580
617
|
};
|
|
@@ -583,6 +620,10 @@ export interface ic3ThemeOptions {
|
|
|
583
620
|
* Default values (e.g., box options, chart options, etc...).
|
|
584
621
|
*/
|
|
585
622
|
widgetDefaults?: IThemeWidgetDefaults;
|
|
623
|
+
/**
|
|
624
|
+
* Settings for the filter state.
|
|
625
|
+
*/
|
|
626
|
+
filterState?: Partial<ic3Theme['filterState']>;
|
|
586
627
|
/**
|
|
587
628
|
* A scale applied to the widget content when rendered for printing.
|
|
588
629
|
* Defaulted to 0.64.
|
|
@@ -664,6 +705,7 @@ export interface ic3ThemeOptions {
|
|
|
664
705
|
};
|
|
665
706
|
};
|
|
666
707
|
};
|
|
708
|
+
datePicker?: DeepPartial<ic3Theme['datePicker']>;
|
|
667
709
|
}
|
|
668
710
|
interface IWidgetIcons extends IWidgetBoxIconsDefinition {
|
|
669
711
|
/**
|
package/dist/PublicTheme.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTheme.js","sourceRoot":"","sources":["../src/PublicTheme.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"PublicTheme.js","sourceRoot":"","sources":["../src/PublicTheme.ts"],"names":[],"mappings":";;;AA0JA,SAAgB,yBAAyB,CAAC,CAAqE;IAC3G,OAAO,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAG,SAAS,CAAC,KAAI,IAAI,CAAC;AAClC,CAAC;AAFD,8DAEC;AA6RD,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC7B,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;AACnB,CAAC,EAJW,qBAAqB,qCAArB,qBAAqB,QAIhC"}
|
|
@@ -269,7 +269,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
269
269
|
*/
|
|
270
270
|
findFirst<P>(callback: (idx: number) => P | undefined): P | undefined;
|
|
271
271
|
/**
|
|
272
|
-
* returns true if the column as a property defining the formatted value
|
|
272
|
+
* returns true if the column as a property defining the formatted value.
|
|
273
273
|
*/
|
|
274
274
|
hasFormattedValue(): boolean;
|
|
275
275
|
/**
|
|
@@ -291,7 +291,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
291
291
|
getFormattedValueOrValue(idx: number, context?: IPublicContext): string | undefined;
|
|
292
292
|
getNumberFormatInfo(): string | undefined;
|
|
293
293
|
/**
|
|
294
|
-
* Get cell as expected by
|
|
294
|
+
* Get cell as expected by XLSX library (do not include the interface as it is lazy loaded!).
|
|
295
295
|
* Does not return the format string.
|
|
296
296
|
*
|
|
297
297
|
* @param idx the position to return the value of.
|
|
@@ -306,15 +306,16 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
306
306
|
*/
|
|
307
307
|
getXGridType(): "string" | "number" | "date" | "dateTime" | "boolean" | undefined;
|
|
308
308
|
/**
|
|
309
|
-
* Return the cell decoration of the column
|
|
309
|
+
* Return the cell decoration of the column at `rowIdx`. If the cell has multiple renderers, this method returns
|
|
310
|
+
* the last added one.
|
|
310
311
|
*/
|
|
311
|
-
getCellDecoration():
|
|
312
|
+
getCellDecoration(rowIdx: number): PublicTidyColumnCellDecorationRendered | undefined;
|
|
312
313
|
/**
|
|
313
314
|
* Returns true if the column has a property of requested name.
|
|
314
315
|
*/
|
|
315
316
|
hasProperty(name: ITidyColumnNamedProperties | string): boolean;
|
|
316
317
|
/**
|
|
317
|
-
* Returns true if the column has color property or is a color column
|
|
318
|
+
* Returns true if the column has color property or is a color column.
|
|
318
319
|
*/
|
|
319
320
|
hasColorProperty(): boolean;
|
|
320
321
|
/**
|
|
@@ -342,7 +343,8 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
342
343
|
*/
|
|
343
344
|
getOptionalProperty(name: ITidyColumnNamedProperties | string): ITidyUnknownColumn | undefined;
|
|
344
345
|
/**
|
|
345
|
-
* Get the value of the property for the given property coordinate and the given row (undefined if the property
|
|
346
|
+
* Get the value of the property for the given property coordinate, and the given row (undefined if the property
|
|
347
|
+
* does not exist).
|
|
346
348
|
* @param name name of the property.
|
|
347
349
|
* @param rowIdx row index for the value to return.
|
|
348
350
|
*/
|
|
@@ -365,7 +367,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
365
367
|
getEntityItem(idx: number): EntityItem | undefined;
|
|
366
368
|
/**
|
|
367
369
|
* Get the entity item for the column. Used in column selection.
|
|
368
|
-
* Returns empty array if
|
|
370
|
+
* Returns an empty array if no entityItems.
|
|
369
371
|
* @param hierarchyIndeces only include these hierarchies for generating the EntityItem. Leave undefined to include
|
|
370
372
|
* all.
|
|
371
373
|
*/
|
|
@@ -386,7 +388,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
386
388
|
*/
|
|
387
389
|
hasChildren(index: number): boolean;
|
|
388
390
|
/**
|
|
389
|
-
* Returns the children of the node at index
|
|
391
|
+
* Returns the children of the node at `index`.
|
|
390
392
|
*/
|
|
391
393
|
getChildren(index: number): number[];
|
|
392
394
|
/**
|
|
@@ -402,7 +404,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
402
404
|
getHierarchyDefaultMember(): EntityItem | undefined;
|
|
403
405
|
/**
|
|
404
406
|
* Get the array of MDX info in the column.
|
|
405
|
-
* Returns an empty array if
|
|
407
|
+
* Returns an empty array if no MDX info.
|
|
406
408
|
*/
|
|
407
409
|
getMdxInfos(): (MdxInfo | undefined)[];
|
|
408
410
|
/**
|
|
@@ -427,9 +429,9 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
427
429
|
/**
|
|
428
430
|
* Get the axis values in this column.
|
|
429
431
|
*
|
|
430
|
-
* If it
|
|
432
|
+
* If it is an MDX Axis, the potentially sorted MDX axis (e.g., pivot table sort)
|
|
431
433
|
*
|
|
432
|
-
* If it
|
|
434
|
+
* If it is not, return undefined
|
|
433
435
|
*/
|
|
434
436
|
mdxAxis(): ReadonlyArray<T> | undefined;
|
|
435
437
|
/**
|
|
@@ -462,7 +464,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
462
464
|
/**
|
|
463
465
|
* Convert the column to another type. This modifies the values to be of that type.
|
|
464
466
|
*
|
|
465
|
-
* If type is datetime, then the settings contain the date locale (default='en_US') and
|
|
467
|
+
* If type is datetime, then the settings contain the date locale (default='en_US'), and
|
|
466
468
|
* the dateformat (default = 'yyyy-MM-dd').
|
|
467
469
|
*/
|
|
468
470
|
convertToType(type: TidyColumnsType, settings?: ConvertToTypeParseSettings): void;
|
|
@@ -477,7 +479,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
477
479
|
/**
|
|
478
480
|
* Change the values of the column.
|
|
479
481
|
* @param values the new values for the column.
|
|
480
|
-
* @param newType the new type
|
|
482
|
+
* @param newType the new type for the column. Leave undefined for automatic inference.
|
|
481
483
|
*/
|
|
482
484
|
setValues<P>(values: P[], newType?: AllowedColumnType<P>): void;
|
|
483
485
|
/**
|
|
@@ -536,9 +538,9 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
536
538
|
*/
|
|
537
539
|
reIndex(index: number[]): void;
|
|
538
540
|
/**
|
|
539
|
-
* Set the formatted values. Use this if you have the formatted values pre-calculated
|
|
541
|
+
* Set the formatted values. Use this if you have the formatted values pre-calculated,
|
|
540
542
|
* or a function to calculate the formatted values.
|
|
541
|
-
* @param caption the caption for the added property
|
|
543
|
+
* @param caption the caption for the added property.
|
|
542
544
|
*/
|
|
543
545
|
setFormattedValues(formattedValues: (string | null)[] | ((value: T | undefined) => string), caption?: string): void;
|
|
544
546
|
/**
|
|
@@ -549,7 +551,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
549
551
|
resetFormat(context: IPublicContext, format: ThemeTextFormatter): void;
|
|
550
552
|
/**
|
|
551
553
|
* Set the colors for the column.
|
|
552
|
-
* @param caption the caption for the added property
|
|
554
|
+
* @param caption the caption for the added property.
|
|
553
555
|
*/
|
|
554
556
|
setColors(colors: (Property.Color | null)[], caption?: string): void;
|
|
555
557
|
/**
|
|
@@ -573,10 +575,10 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
573
575
|
*/
|
|
574
576
|
mapAllRows<P>(callbackFn: (index: number, column: ITidyBaseColumn<T>) => P | undefined, forceMapAllRows?: boolean): P[];
|
|
575
577
|
/**
|
|
576
|
-
* Map the rows that are visible given a hierarchical axis and an array of boolean values
|
|
578
|
+
* Map the rows that are visible given a hierarchical axis, and an array of boolean values
|
|
577
579
|
* @param expanded a function indicating for each index if it is expanded or not. If it is collapsed, then all
|
|
578
580
|
* children are not visible.
|
|
579
|
-
* @param fun function to apply
|
|
581
|
+
* @param fun function to apply.
|
|
580
582
|
*/
|
|
581
583
|
mapVisibleRows<P>(expanded: (rowIdx: number) => boolean, fun: (index: number) => P): P[];
|
|
582
584
|
/**
|
|
@@ -600,7 +602,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
600
602
|
*/
|
|
601
603
|
getInitialSelectionRowIndices(column: ITidyColumn | undefined, items: any[]): number[];
|
|
602
604
|
/**
|
|
603
|
-
* The ITidyTableSelection row identifier for the row (uniqueName if it
|
|
605
|
+
* The ITidyTableSelection row identifier for the row (uniqueName if it is an MDX like column).
|
|
604
606
|
*/
|
|
605
607
|
getSelectionRowIdentifier(idx: number): string;
|
|
606
608
|
/**
|
|
@@ -614,7 +616,7 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
614
616
|
* For a hierarchical columns returns a list of transformed columns as needed by a pivot table like structure.
|
|
615
617
|
* If this column is not hierarchical, return this unchanged.
|
|
616
618
|
*
|
|
617
|
-
* E.g., a columns with Year, Quarter and Month will be converted into 3 columns [Year,Quarter,Month]
|
|
619
|
+
* E.g., a columns with Year, Quarter and Month will be converted into 3 columns [Year, Quarter, Month].
|
|
618
620
|
*/
|
|
619
621
|
toFlatColumns(nullValue: any, rows: number[] | undefined): ITidyUnknownColumn[];
|
|
620
622
|
/**
|
|
@@ -624,16 +626,18 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
624
626
|
*/
|
|
625
627
|
getNodePath(rowIdx: number): number[];
|
|
626
628
|
/**
|
|
627
|
-
* Returns if present a notification as defined by the properties of the columns
|
|
629
|
+
* Returns if present a notification as defined by the properties of the columns.
|
|
628
630
|
*/
|
|
629
631
|
getAppNotification(rowIdx: number): AppNotification | undefined;
|
|
630
632
|
/**
|
|
631
|
-
* Returns if present an action as defined by the properties of the columns
|
|
633
|
+
* Returns if present an action as defined by the properties of the columns.
|
|
632
634
|
*/
|
|
633
635
|
getEventAction(rowIdx: number): [string, TidyActionEvent] | undefined;
|
|
634
636
|
mapUniqueNames<T>(uniqueNames: string[], mapper: (idx: number) => T | null | undefined): T[];
|
|
635
637
|
/**
|
|
636
|
-
*
|
|
638
|
+
* Add the renderer to the column. If a cell has multiple renderers, it uses the last added renderer.
|
|
639
|
+
*
|
|
640
|
+
* @see {BaseTidyColumnCellDecoration.appliesToCell}.
|
|
637
641
|
*/
|
|
638
642
|
setCellDecoration(decoration: PublicTidyColumnCellDecoration): void;
|
|
639
643
|
/**
|
|
@@ -642,11 +646,11 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
642
646
|
*/
|
|
643
647
|
getIndex(): ITidyColumnIndex[];
|
|
644
648
|
/**
|
|
645
|
-
* undefined if it
|
|
649
|
+
* undefined if it is not an MDX member column
|
|
646
650
|
*/
|
|
647
651
|
getQueryNodeIdentifier(idx: number): MdxNodeIdentifier | undefined;
|
|
648
652
|
/**
|
|
649
|
-
* Returns the group key at the row index for use with table.toAmcharts4Data
|
|
653
|
+
* Returns the group key at the row index for use with `table.toAmcharts4Data`.
|
|
650
654
|
*/
|
|
651
655
|
getAmcharts4GroupKey(rowIdx: number): string;
|
|
652
656
|
/**
|
|
@@ -662,44 +666,80 @@ export interface ITidyBaseColumn<T> extends ITidyBaseColumnReadonly<T> {
|
|
|
662
666
|
*/
|
|
663
667
|
getIsTotalColumn(): boolean;
|
|
664
668
|
/**
|
|
665
|
-
* return true if the column was created from an MDX axis (i.e
|
|
669
|
+
* return true if the column was created from an MDX axis (i.e., [Geo].[Countries] on 0).
|
|
666
670
|
*/
|
|
667
671
|
isMdxAxis(): boolean;
|
|
668
672
|
addRowValue(insert: ITidyColumnAddValueInsert): void;
|
|
669
673
|
}
|
|
670
|
-
export interface PublicTidyColumnCellDecorationRenderedOptions {
|
|
671
|
-
cellWidth?: number;
|
|
672
|
-
cellHeight: number;
|
|
673
|
-
}
|
|
674
674
|
export interface BaseTidyColumnCellDecoration {
|
|
675
|
+
/**
|
|
676
|
+
* If true, the renderer handles errors in the cells. If false, the table/pivot table renders an error if the cell
|
|
677
|
+
* has one.
|
|
678
|
+
*
|
|
679
|
+
* Use `column.getError(tidyRow)` to get the error of a cell.
|
|
680
|
+
*/
|
|
675
681
|
handlesCellsOnError?: boolean;
|
|
676
682
|
/**
|
|
677
683
|
* Default (i.e., when not defined) is true.
|
|
678
684
|
*/
|
|
679
685
|
handlesBackgroundColor?: boolean;
|
|
686
|
+
/**
|
|
687
|
+
* A function that determines if the renderer is applied to a cell. Return true if yes, return false if not.
|
|
688
|
+
* @param rowIdx row index.
|
|
689
|
+
*/
|
|
680
690
|
appliesToCell?: (rowIdx: number) => boolean;
|
|
681
691
|
/**
|
|
682
692
|
* If an object is returned the underlying code uses emotion CSS function to convert to a className,
|
|
683
693
|
* so you can do className like CSS :
|
|
684
694
|
*
|
|
695
|
+
* ```TypeScript
|
|
685
696
|
* {
|
|
686
697
|
* fontSize: "0.7rem",
|
|
687
698
|
* ':hover': {
|
|
688
699
|
* fontSize: "1.4rem",
|
|
689
700
|
* }
|
|
690
701
|
* }
|
|
702
|
+
* ```
|
|
691
703
|
*/
|
|
692
704
|
cssStyles?: (rowIdx: number) => Record<string, any> | undefined;
|
|
693
705
|
}
|
|
694
706
|
export interface ReactTidyColumnCellDecoration extends BaseTidyColumnCellDecoration {
|
|
707
|
+
/**
|
|
708
|
+
* False if your renderer returns a React element or if you have no renderer.
|
|
709
|
+
*/
|
|
695
710
|
stringRenderer?: false;
|
|
696
|
-
|
|
711
|
+
/**
|
|
712
|
+
* The cell renders the returned React element. Note that for the Pivot Table, Emotion CSS and JS does not work.
|
|
713
|
+
*/
|
|
714
|
+
renderer?: (rowIdx: number) => React.ReactElement;
|
|
697
715
|
}
|
|
698
716
|
export interface HtmlTidyColumnCellDecoration extends BaseTidyColumnCellDecoration {
|
|
717
|
+
/**
|
|
718
|
+
* True if your renderer returns a HTML string.
|
|
719
|
+
*/
|
|
699
720
|
stringRenderer: true;
|
|
700
|
-
|
|
721
|
+
/**
|
|
722
|
+
* The cell renders the returned string as HTML.
|
|
723
|
+
*/
|
|
724
|
+
renderer: (rowIdx: number) => string;
|
|
701
725
|
}
|
|
702
726
|
export type PublicTidyColumnCellDecoration = ReactTidyColumnCellDecoration | HtmlTidyColumnCellDecoration;
|
|
727
|
+
/**
|
|
728
|
+
* The renderer for a cell at a row index.
|
|
729
|
+
*
|
|
730
|
+
* @see {PublicTidyColumnCellDecoration}
|
|
731
|
+
*/
|
|
732
|
+
export type PublicTidyColumnCellDecorationRendered = ({
|
|
733
|
+
stringRenderer: true;
|
|
734
|
+
renderer: () => string;
|
|
735
|
+
} | {
|
|
736
|
+
stringRenderer?: false;
|
|
737
|
+
renderer?: () => React.ReactElement;
|
|
738
|
+
}) & {
|
|
739
|
+
handlesCellsOnError?: boolean;
|
|
740
|
+
handlesBackgroundColor?: boolean;
|
|
741
|
+
cssStyles?: () => Record<string, any> | undefined;
|
|
742
|
+
};
|
|
703
743
|
export type ITidyColumn = ITidyBaseColumn<any>;
|
|
704
744
|
export type ITidyUnknownColumn = ITidyBaseColumn<unknown>;
|
|
705
745
|
export type ITidyNullColumn = ITidyBaseColumn<null>;
|
package/dist/index.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export * from "./IRemotePluginName";
|
|
|
8
8
|
export * from "./IThemeManager";
|
|
9
9
|
export * from "./IUserMenuOptionManager";
|
|
10
10
|
export * from "./PublicAmchartsData";
|
|
11
|
+
export * from "./PublicDateShortcutUtils";
|
|
11
12
|
export * from "./PublicAmCharts4Base";
|
|
12
13
|
export * from "./ITidyTableTransformation";
|
|
13
14
|
export * from "./ITidyTableTransformationManager";
|
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ __exportStar(require("./IRemotePluginName"), exports);
|
|
|
24
24
|
__exportStar(require("./IThemeManager"), exports);
|
|
25
25
|
__exportStar(require("./IUserMenuOptionManager"), exports);
|
|
26
26
|
__exportStar(require("./PublicAmchartsData"), exports);
|
|
27
|
+
__exportStar(require("./PublicDateShortcutUtils"), exports);
|
|
27
28
|
__exportStar(require("./PublicAmCharts4Base"), exports);
|
|
28
29
|
__exportStar(require("./ITidyTableTransformation"), exports);
|
|
29
30
|
__exportStar(require("./ITidyTableTransformationManager"), exports);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,sDAAoC;AACpC,sDAAoC;AACpC,kDAAgC;AAChC,2DAAyC;AACzC,uDAAqC;AACrC,wDAAsC;AACtC,6DAA0C;AAC1C,oEAAiD;AACjD,2CAAwB;AACxB,+DAA6C;AAC7C,2DAAyC;AACzC,0DAAwC;AACxC,mDAAiC;AACjC,iDAA+B;AAC/B,2CAAyB;AACzB,iDAA+B;AAC/B,kDAAgC;AAChC,+CAA6B;AAC7B,iDAA+B;AAC/B,mDAAiC;AACjC,uDAAqC;AACrC,oDAAkC;AAClC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,gEAA8C;AAC9C,yDAAuC;AACvC,mDAAiC;AACjC,wDAAsC;AACtC,yDAAuC;AACvC,qDAAmC;AAEnC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC;AACjC,yDAAuC;AACvC,0DAAwC;AACxC,8DAA4C;AAC5C,6DAA2C;AAC3C,kEAAgD;AAChD,6DAA2C;AAC3C,mEAAiD;AACjD,2DAAyC;AACzC,2DAAyC;AACzC,iEAA+C;AAC/C,4DAA0C;AAC1C,0DAAwC;AACxC,sDAAoC;AACpC,sDAAoC;AACpC,6DAA2C;AAC3C,8DAA4C;AAC5C,4DAA0C;AAC1C,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,uDAAqC;AACrC,sDAAoC;AACpC,0DAAwC;AACxC,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,2DAAyC;AACzC,gEAA8C;AAC9C,4DAA0C;AAC1C,qDAAmC;AACnC,kEAAgD;AAChD,yDAAuC;AACvC,uEAAqD;AACrD,4DAA0C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,4CAA0B;AAC1B,yDAAuC;AACvC,sDAAoC;AACpC,kDAAgC;AAChC,sDAAoC;AACpC,sDAAoC;AACpC,kDAAgC;AAChC,2DAAyC;AACzC,uDAAqC;AACrC,4DAA0C;AAC1C,wDAAsC;AACtC,6DAA0C;AAC1C,oEAAiD;AACjD,2CAAwB;AACxB,+DAA6C;AAC7C,2DAAyC;AACzC,0DAAwC;AACxC,mDAAiC;AACjC,iDAA+B;AAC/B,2CAAyB;AACzB,iDAA+B;AAC/B,kDAAgC;AAChC,+CAA6B;AAC7B,iDAA+B;AAC/B,mDAAiC;AACjC,uDAAqC;AACrC,oDAAkC;AAClC,gDAA8B;AAC9B,qDAAmC;AACnC,mDAAiC;AACjC,oDAAkC;AAClC,gEAA8C;AAC9C,yDAAuC;AACvC,mDAAiC;AACjC,wDAAsC;AACtC,yDAAuC;AACvC,qDAAmC;AAEnC,2DAAyC;AACzC,yDAAuC;AACvC,mDAAiC;AACjC,yDAAuC;AACvC,0DAAwC;AACxC,8DAA4C;AAC5C,6DAA2C;AAC3C,kEAAgD;AAChD,6DAA2C;AAC3C,mEAAiD;AACjD,2DAAyC;AACzC,2DAAyC;AACzC,iEAA+C;AAC/C,4DAA0C;AAC1C,0DAAwC;AACxC,sDAAoC;AACpC,sDAAoC;AACpC,6DAA2C;AAC3C,8DAA4C;AAC5C,4DAA0C;AAC1C,uDAAqC;AACrC,qDAAmC;AACnC,sDAAoC;AACpC,uDAAqC;AACrC,sDAAoC;AACpC,0DAAwC;AACxC,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,2DAAyC;AACzC,gEAA8C;AAC9C,4DAA0C;AAC1C,qDAAmC;AACnC,kEAAgD;AAChD,yDAAuC;AACvC,uEAAqD;AACrD,4DAA0C"}
|
package/dist/theme/ThemeApp.d.ts
CHANGED
|
@@ -35,6 +35,10 @@ export declare class AppClasses {
|
|
|
35
35
|
* Style applied to
|
|
36
36
|
*/
|
|
37
37
|
static readonly zoomWidget: string;
|
|
38
|
+
/**
|
|
39
|
+
* Class added to root when the left filter panel is collapsed.
|
|
40
|
+
*/
|
|
41
|
+
static readonly leftPanelCollapsed: string;
|
|
38
42
|
}
|
|
39
43
|
export declare type AppClassKey = keyof AppClasses;
|
|
40
44
|
export interface AppDivProps {
|
package/dist/theme/ThemeApp.js
CHANGED
|
@@ -40,6 +40,10 @@ AppClasses.dashboard = "ic3App-dashboard";
|
|
|
40
40
|
* Style applied to
|
|
41
41
|
*/
|
|
42
42
|
AppClasses.zoomWidget = "ic3App-zoomWidget";
|
|
43
|
+
/**
|
|
44
|
+
* Class added to root when the left filter panel is collapsed.
|
|
45
|
+
*/
|
|
46
|
+
AppClasses.leftPanelCollapsed = "ic3LeftPanelCollapsed";
|
|
43
47
|
var TopBarOptions;
|
|
44
48
|
(function (TopBarOptions) {
|
|
45
49
|
TopBarOptions[TopBarOptions["None"] = 0] = "None";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeApp.js","sourceRoot":"","sources":["../../src/theme/ThemeApp.ts"],"names":[],"mappings":";;;AACA,MAAa,UAAU;;AAAvB,
|
|
1
|
+
{"version":3,"file":"ThemeApp.js","sourceRoot":"","sources":["../../src/theme/ThemeApp.ts"],"names":[],"mappings":";;;AACA,MAAa,UAAU;;AAAvB,gCAyCC;AAxCG;;GAEG;AACa,eAAI,GAAW,aAAa,CAAC;AAC7C;;GAEG;AACa,kBAAO,GAAW,gBAAgB,CAAC;AACnD;;GAEG;AACa,kBAAO,GAAW,gBAAgB,CAAC;AACnD;;GAEG;AACa,kBAAO,GAAW,gBAAgB,CAAC;AACnD;;GAEG;AACa,gBAAK,GAAW,cAAc,CAAC;AAC/C;;GAEG;AACa,cAAG,GAAW,YAAY,CAAC;AAC3C;;GAEG;AACa,qBAAU,GAAW,mBAAmB,CAAC;AACzD;;GAEG;AACa,oBAAS,GAAW,kBAAkB,CAAC;AACvD;;GAEG;AACa,qBAAU,GAAW,mBAAmB,CAAC;AACzD;;GAEG;AACa,6BAAkB,GAAW,uBAAuB,CAAC;AAazE,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,iDAAI,CAAA;IACJ,yDAAQ,CAAA;IACR,qDAAM,CAAA;AACV,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACtB,mDAAI,CAAA;IACJ,2DAAQ,CAAA;IACR,uDAAM,CAAA;AACV,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import { SelectionBehaviour, TidyTableColumnSelector } from "../PublicTidyTableTypes";
|
|
2
2
|
import { FormFieldObject } from "../PublicTemplateForm";
|
|
3
|
+
import { PublicDateShortcutUtils } from "../PublicDateShortcutUtils";
|
|
3
4
|
export declare class DatePickerClasses {
|
|
4
5
|
/**
|
|
5
6
|
* Style applied to the root element.
|
|
6
7
|
*/
|
|
7
8
|
static readonly root = "ic3DatePicker-root";
|
|
9
|
+
/**
|
|
10
|
+
* Fix div inside the root.
|
|
11
|
+
*/
|
|
12
|
+
static readonly container = "ic3DatePicker-container";
|
|
8
13
|
static readonly rowDirection = "ic3DatePicker-row-direction";
|
|
9
14
|
static readonly columnDirection = "ic3DatePicker-column-direction";
|
|
10
15
|
/**
|
|
11
16
|
* + Mui DatePicker and/or DateRangePicker classes
|
|
12
17
|
*/
|
|
13
18
|
static readonly fieldSeparator = "ic3DatePicker-fieldSeparator";
|
|
19
|
+
/**
|
|
20
|
+
* Label showing the selected shortcut. Clicking this label opens the shortcut menu.
|
|
21
|
+
*/
|
|
22
|
+
static readonly shortcutLabel = "ic3DatePicker-shortcutLabel";
|
|
14
23
|
}
|
|
15
24
|
export declare type DatePickerClassKey = keyof DatePickerClasses;
|
|
16
25
|
export declare enum DatePickerRangeDirection {
|
|
@@ -133,6 +142,63 @@ export interface DatePickerChartOptions extends FormFieldObject {
|
|
|
133
142
|
* The column of the tidy table containing the dates to display.
|
|
134
143
|
*/
|
|
135
144
|
dates?: TidyTableColumnSelector;
|
|
145
|
+
/**
|
|
146
|
+
* Shortcuts
|
|
147
|
+
*/
|
|
148
|
+
shortcutsEnabled: boolean;
|
|
149
|
+
/**
|
|
150
|
+
*
|
|
151
|
+
*/
|
|
152
|
+
shortcutsAnchorDate?: string;
|
|
153
|
+
/**
|
|
154
|
+
* From where to source the initial date.
|
|
155
|
+
*/
|
|
156
|
+
initialDateFrom: InitialDateFrom;
|
|
157
|
+
/**
|
|
158
|
+
* Source the initial date/range from this shortcut.
|
|
159
|
+
*/
|
|
160
|
+
initialShortcut?: string;
|
|
161
|
+
/**
|
|
162
|
+
* User can choose from the shortcuts in this group. Edit the groups in the theme plugin.
|
|
163
|
+
*/
|
|
164
|
+
allowedShortcutGroup: string;
|
|
136
165
|
}
|
|
166
|
+
interface IShortcut<D, T> {
|
|
167
|
+
/**
|
|
168
|
+
* Show this name in the datepicker.
|
|
169
|
+
*
|
|
170
|
+
* Localize depending on the anchor date:
|
|
171
|
+
* — if undefined, Translate with `shortcutItemsDatePicker.<name>` in the localization.
|
|
172
|
+
* — if present, Translate with `shortcutItemsDatePicker.<name>.$anchor` in the localization. Fallback to translation with no anchor.
|
|
173
|
+
*/
|
|
174
|
+
name: string;
|
|
175
|
+
/**
|
|
176
|
+
* Return the range of the dates that this shortcut selects. The date to return should be of type
|
|
177
|
+
* Dayjs. See the `dayjs` library. Return `null` to clear the start/end value.
|
|
178
|
+
*
|
|
179
|
+
* A datepicker shortcut returns the date. Return null to reset the date.
|
|
180
|
+
*
|
|
181
|
+
* A range picker shortcut returns a range: [startDate (included), endDate (included)]. Return [null, null] to reset
|
|
182
|
+
* the date.
|
|
183
|
+
*
|
|
184
|
+
* If the date returned is outside the allowed range of dates in the widget, then the datepicker disables the
|
|
185
|
+
* option.
|
|
186
|
+
*/
|
|
187
|
+
getValue: (util: PublicDateShortcutUtils<D>) => T;
|
|
188
|
+
/**
|
|
189
|
+
* If an anchor date is defined, then this shortcut will show.
|
|
190
|
+
* — true: only show the shortcut when there is an anchor date.
|
|
191
|
+
* — false: do not show this shortcut when there is an anchor date.
|
|
192
|
+
* — undefined: always show the shortcut.
|
|
193
|
+
*/
|
|
194
|
+
needsAnchor?: boolean;
|
|
195
|
+
}
|
|
196
|
+
export type DatePickerShortcut<T = any> = IShortcut<T, T | null>;
|
|
197
|
+
export type DateRangePickerShortcut<T = any> = IShortcut<T, [T | null, T | null]>;
|
|
137
198
|
export interface FilterDatePickerProps {
|
|
138
199
|
}
|
|
200
|
+
export declare enum InitialDateFrom {
|
|
201
|
+
MANUAL_DATES = "manual",
|
|
202
|
+
SHORTCUT = "shortcut"
|
|
203
|
+
}
|
|
204
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DatePickerRangeDirection = exports.DatePickerClasses = void 0;
|
|
3
|
+
exports.InitialDateFrom = exports.DatePickerRangeDirection = exports.DatePickerClasses = void 0;
|
|
4
4
|
// TOM : needs clarification
|
|
5
5
|
class DatePickerClasses {
|
|
6
6
|
}
|
|
@@ -9,16 +9,29 @@ exports.DatePickerClasses = DatePickerClasses;
|
|
|
9
9
|
* Style applied to the root element.
|
|
10
10
|
*/
|
|
11
11
|
DatePickerClasses.root = "ic3DatePicker-root";
|
|
12
|
+
/**
|
|
13
|
+
* Fix div inside the root.
|
|
14
|
+
*/
|
|
15
|
+
DatePickerClasses.container = "ic3DatePicker-container";
|
|
12
16
|
DatePickerClasses.rowDirection = "ic3DatePicker-row-direction";
|
|
13
17
|
DatePickerClasses.columnDirection = "ic3DatePicker-column-direction";
|
|
14
18
|
/**
|
|
15
19
|
* + Mui DatePicker and/or DateRangePicker classes
|
|
16
20
|
*/
|
|
17
21
|
DatePickerClasses.fieldSeparator = "ic3DatePicker-fieldSeparator";
|
|
22
|
+
/**
|
|
23
|
+
* Label showing the selected shortcut. Clicking this label opens the shortcut menu.
|
|
24
|
+
*/
|
|
25
|
+
DatePickerClasses.shortcutLabel = "ic3DatePicker-shortcutLabel";
|
|
18
26
|
var DatePickerRangeDirection;
|
|
19
27
|
(function (DatePickerRangeDirection) {
|
|
20
28
|
DatePickerRangeDirection["auto"] = "AUTO";
|
|
21
29
|
DatePickerRangeDirection["horizontal"] = "HORIZONTAL";
|
|
22
30
|
DatePickerRangeDirection["vertical"] = "VERTICAL";
|
|
23
31
|
})(DatePickerRangeDirection || (exports.DatePickerRangeDirection = DatePickerRangeDirection = {}));
|
|
32
|
+
var InitialDateFrom;
|
|
33
|
+
(function (InitialDateFrom) {
|
|
34
|
+
InitialDateFrom["MANUAL_DATES"] = "manual";
|
|
35
|
+
InitialDateFrom["SHORTCUT"] = "shortcut";
|
|
36
|
+
})(InitialDateFrom || (exports.InitialDateFrom = InitialDateFrom = {}));
|
|
24
37
|
//# sourceMappingURL=ThemeDatePicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeDatePicker.js","sourceRoot":"","sources":["../../src/theme/ThemeDatePicker.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ThemeDatePicker.js","sourceRoot":"","sources":["../../src/theme/ThemeDatePicker.ts"],"names":[],"mappings":";;;AAIA,4BAA4B;AAC5B,MAAa,iBAAiB;;AAA9B,8CA0BC;AAxBG;;GAEG;AACa,sBAAI,GAAG,oBAAoB,CAAC;AAE5C;;GAEG;AACa,2BAAS,GAAG,yBAAyB,CAAC;AAGtC,8BAAY,GAAG,6BAA6B,CAAC;AAE7C,iCAAe,GAAG,gCAAgC,CAAC;AAEnE;;GAEG;AACa,gCAAc,GAAG,8BAA8B,CAAC;AAEhE;;GAEG;AACa,+BAAa,GAAG,6BAA6B,CAAC;AAKlE,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAChC,yCAAa,CAAA;IACb,qDAAyB,CAAA;IACzB,iDAAqB,CAAA;AACzB,CAAC,EAJW,wBAAwB,wCAAxB,wBAAwB,QAInC;AAkND,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;AACzB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
|
|
@@ -83,7 +83,7 @@ export declare class FilterPanelClasses {
|
|
|
83
83
|
*/
|
|
84
84
|
static readonly collapsibleIcon = "ic3FilterPanel-collapsibleIcon";
|
|
85
85
|
/**
|
|
86
|
-
* Div when it
|
|
86
|
+
* Div when it is collapsed
|
|
87
87
|
*/
|
|
88
88
|
static readonly collapsedDiv = "ic3FilterPanel-collapsedDiv";
|
|
89
89
|
}
|
|
@@ -170,7 +170,7 @@ export interface FilterPanelChartOptions extends FormFieldObject {
|
|
|
170
170
|
/**
|
|
171
171
|
* Name template for the fields with properties. Use 'levelName' and 'propertyName' as placeholders.
|
|
172
172
|
*/
|
|
173
|
-
propertyFieldNameTemplate
|
|
173
|
+
propertyFieldNameTemplate?: string;
|
|
174
174
|
/**
|
|
175
175
|
* Use the simple selection filter if and only if `useSimpleFilterCutoff` is not null and the level
|
|
176
176
|
* has <= `useSimpleFilterCutoff` members.
|
|
@@ -184,6 +184,10 @@ export interface FilterPanelChartOptions extends FormFieldObject {
|
|
|
184
184
|
* Only allow users to select from these operators.
|
|
185
185
|
*/
|
|
186
186
|
allowedOperatorsConfig?: IPGFilterItemFilterType[];
|
|
187
|
+
/**
|
|
188
|
+
* Set to `true` to show date picker shortcuts.
|
|
189
|
+
*/
|
|
190
|
+
datePickerShortcuts?: boolean;
|
|
187
191
|
}
|
|
188
192
|
export type TextFilterType = "EQUALS" | "NOT_EQUALS" | "STARTS_WITH" | "ENDS_WITH" | "CONTAINS" | "NOT_CONTAINS" | "REGEX";
|
|
189
193
|
export type IPGFilterItemFilterType = TextFilterType | "IS_ANY_OF" | "IS_NONE_OF" | "GREATER_THAN" | "GREATER_EQUAL_THAN" | "SMALLER_THAN" | "SMALLER_EQUAL_THAN" | "BETWEEN" | "IS_EMPTY" | "IS_NOT_EMPTY";
|
|
@@ -87,7 +87,7 @@ FilterPanelClasses.selectableContent = "ic3FilterPanel-selectableContent";
|
|
|
87
87
|
*/
|
|
88
88
|
FilterPanelClasses.collapsibleIcon = "ic3FilterPanel-collapsibleIcon";
|
|
89
89
|
/**
|
|
90
|
-
* Div when it
|
|
90
|
+
* Div when it is collapsed
|
|
91
91
|
*/
|
|
92
92
|
FilterPanelClasses.collapsedDiv = "ic3FilterPanel-collapsedDiv";
|
|
93
93
|
//# sourceMappingURL=ThemeFilterPanel.js.map
|
|
@@ -10,7 +10,7 @@ import { FilterPanelChartOptions } from "./ThemeFilterPanel";
|
|
|
10
10
|
*
|
|
11
11
|
* @see WidgetTemplateChartOptions
|
|
12
12
|
*/
|
|
13
|
-
export interface SinglePanelFilterChartOptions extends FormFieldObject, Pick<FilterPanelChartOptions, "variant" | "initialFilterConfig" | "measureMdx" | "useSimpleFilterCutoff" | "useSimpleFilterCutoff" | "allowedOperatorsConfig"> {
|
|
13
|
+
export interface SinglePanelFilterChartOptions extends FormFieldObject, Pick<FilterPanelChartOptions, "variant" | "initialFilterConfig" | "measureMdx" | "useSimpleFilterCutoff" | "useSimpleFilterCutoff" | "allowedOperatorsConfig" | "datePickerShortcuts"> {
|
|
14
14
|
/**
|
|
15
15
|
* The ID of the level / hierarchy that is used in the filter.
|
|
16
16
|
*/
|
|
@@ -151,4 +151,8 @@ export interface TableChartOptions extends BaseTableChartOptions {
|
|
|
151
151
|
* Use column header groups.
|
|
152
152
|
*/
|
|
153
153
|
useColumnGrouping: boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Use checkbox selection. Adds a column with checkboxes as the first column.
|
|
156
|
+
*/
|
|
157
|
+
useCheckboxSelection: boolean;
|
|
154
158
|
}
|
|
@@ -87,6 +87,9 @@ export declare enum ResizingConstraintOptions {
|
|
|
87
87
|
FixedWidthLeftAligned = "FixedWidthLeftAligned",
|
|
88
88
|
FixedWidthRightAligned = "FixedWidthRightAligned"
|
|
89
89
|
}
|
|
90
|
+
export declare enum PositionModeOptions {
|
|
91
|
+
Fixed = "Fixed"
|
|
92
|
+
}
|
|
90
93
|
/**
|
|
91
94
|
* Support for repetition widget | pivot table expanding to make the whole content visible.
|
|
92
95
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResizingConstraintOptions = exports.WidgetBoxVisibilityType = exports.WidgetBoxTooltipType = exports.WidgetBoxClasses = void 0;
|
|
3
|
+
exports.PositionModeOptions = exports.ResizingConstraintOptions = exports.WidgetBoxVisibilityType = exports.WidgetBoxTooltipType = exports.WidgetBoxClasses = void 0;
|
|
4
4
|
class WidgetBoxClasses {
|
|
5
5
|
}
|
|
6
6
|
exports.WidgetBoxClasses = WidgetBoxClasses;
|
|
@@ -93,4 +93,8 @@ var ResizingConstraintOptions;
|
|
|
93
93
|
ResizingConstraintOptions["FixedWidthLeftAligned"] = "FixedWidthLeftAligned";
|
|
94
94
|
ResizingConstraintOptions["FixedWidthRightAligned"] = "FixedWidthRightAligned";
|
|
95
95
|
})(ResizingConstraintOptions || (exports.ResizingConstraintOptions = ResizingConstraintOptions = {}));
|
|
96
|
+
var PositionModeOptions;
|
|
97
|
+
(function (PositionModeOptions) {
|
|
98
|
+
PositionModeOptions["Fixed"] = "Fixed";
|
|
99
|
+
})(PositionModeOptions || (exports.PositionModeOptions = PositionModeOptions = {}));
|
|
96
100
|
//# sourceMappingURL=ThemeWidgetBox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeWidgetBox.js","sourceRoot":"","sources":["../../src/theme/ThemeWidgetBox.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;;AAA7B,4CA8FC;AA5FG;;GAEG;AACa,qBAAI,GAAW,cAAc,CAAC;AAG9C;;GAEG;AACa,yBAAQ,GAAW,uBAAuB,CAAC;AAE3D;;GAEG;AACa,yBAAQ,GAAW,uBAAuB,CAAC;AAE3D;;GAEG;AACa,qBAAI,GAAW,mBAAmB,CAAC;AAEnD;;GAEG;AACa,6BAAY,GAAW,2BAA2B,CAAC;AAEnE;;GAEG;AACa,0BAAS,GAAW,wBAAwB,CAAC;AAE7D;;GAEG;AACa,kCAAiB,GAAW,iCAAiC,CAAC;AAE9E;;GAEG;AACa,qCAAoB,GAAW,oCAAoC,CAAC;AAEpF;;GAEG;AACa,wBAAO,GAAW,sBAAsB,CAAC;AAEzD;;GAEG;AACa,4BAAW,GAAW,2BAA2B,CAAC;AAElE;;GAEG;AACa,yBAAQ,GAAW,uBAAuB,CAAC;AAE3D;;GAEG;AACa,uBAAM,GAAW,qBAAqB,CAAC;AAEvD;;GAEG;AACa,4BAAW,GAAW,0BAA0B,CAAC;AAEjE;;GAEG;AACa,2BAAU,GAAW,yBAAyB,CAAC;AAE/D;;GAEG;AACa,8BAAa,GAAW,4BAA4B,CAAC;AAErE;;GAEG;AACa,6BAAY,GAAW,2BAA2B,CAAC;AAEnE;;GAEG;AACa,+BAAc,GAAW,6BAA6B,CAAC;AAEvE;;GAEG;AACa,kCAAiB,GAAW,gBAAgB,CAAC;AAE7C,8BAAa,GAAW,YAAY,CAAC;AAKzD,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;AACvB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B;AAED,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,8CAAmB,CAAA;IACnB,kDAAuB,CAAA;IACvB,sEAA2C,CAAA;AAC/C,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC;AAED,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,4EAA+C,CAAA;IAC/C,8EAAiD,CAAA;AACrD,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC"}
|
|
1
|
+
{"version":3,"file":"ThemeWidgetBox.js","sourceRoot":"","sources":["../../src/theme/ThemeWidgetBox.ts"],"names":[],"mappings":";;;AAAA,MAAa,gBAAgB;;AAA7B,4CA8FC;AA5FG;;GAEG;AACa,qBAAI,GAAW,cAAc,CAAC;AAG9C;;GAEG;AACa,yBAAQ,GAAW,uBAAuB,CAAC;AAE3D;;GAEG;AACa,yBAAQ,GAAW,uBAAuB,CAAC;AAE3D;;GAEG;AACa,qBAAI,GAAW,mBAAmB,CAAC;AAEnD;;GAEG;AACa,6BAAY,GAAW,2BAA2B,CAAC;AAEnE;;GAEG;AACa,0BAAS,GAAW,wBAAwB,CAAC;AAE7D;;GAEG;AACa,kCAAiB,GAAW,iCAAiC,CAAC;AAE9E;;GAEG;AACa,qCAAoB,GAAW,oCAAoC,CAAC;AAEpF;;GAEG;AACa,wBAAO,GAAW,sBAAsB,CAAC;AAEzD;;GAEG;AACa,4BAAW,GAAW,2BAA2B,CAAC;AAElE;;GAEG;AACa,yBAAQ,GAAW,uBAAuB,CAAC;AAE3D;;GAEG;AACa,uBAAM,GAAW,qBAAqB,CAAC;AAEvD;;GAEG;AACa,4BAAW,GAAW,0BAA0B,CAAC;AAEjE;;GAEG;AACa,2BAAU,GAAW,yBAAyB,CAAC;AAE/D;;GAEG;AACa,8BAAa,GAAW,4BAA4B,CAAC;AAErE;;GAEG;AACa,6BAAY,GAAW,2BAA2B,CAAC;AAEnE;;GAEG;AACa,+BAAc,GAAW,6BAA6B,CAAC;AAEvE;;GAEG;AACa,kCAAiB,GAAW,gBAAgB,CAAC;AAE7C,8BAAa,GAAW,YAAY,CAAC;AAKzD,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;AACvB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B;AAED,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IAC/B,8CAAmB,CAAA;IACnB,kDAAuB,CAAA;IACvB,sEAA2C,CAAA;AAC/C,CAAC,EAJW,uBAAuB,uCAAvB,uBAAuB,QAIlC;AAED,IAAY,yBAGX;AAHD,WAAY,yBAAyB;IACjC,4EAA+C,CAAA;IAC/C,8EAAiD,CAAA;AACrD,CAAC,EAHW,yBAAyB,yCAAzB,yBAAyB,QAGpC;AAED,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;AACnB,CAAC,EAFW,mBAAmB,mCAAnB,mBAAmB,QAE9B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ic3/reporting-api",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.10",
|
|
4
4
|
"description": "icCube dashboards API",
|
|
5
5
|
"homepage": "https://github.com/ic3-software/ic3-reporting-api",
|
|
6
6
|
"repository": "https://github.com/ic3-software/ic3-reporting-api",
|
|
@@ -11,17 +11,17 @@
|
|
|
11
11
|
"access": "public"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@mui/material": "5.15.
|
|
15
|
-
"@mui/system": "5.15.
|
|
16
|
-
"@emotion/react": "11.11.
|
|
14
|
+
"@mui/material": "5.15.14",
|
|
15
|
+
"@mui/system": "5.15.14",
|
|
16
|
+
"@emotion/react": "11.11.4",
|
|
17
17
|
"@emotion/styled": "11.11.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/markerclustererplus": "2.1.33",
|
|
21
|
-
"@types/node": "20.11.
|
|
22
|
-
"@types/react": "18.2.
|
|
21
|
+
"@types/node": "20.11.30",
|
|
22
|
+
"@types/react": "18.2.73",
|
|
23
23
|
"del-cli": "5.1.0",
|
|
24
|
-
"typescript": "5.
|
|
24
|
+
"typescript": "5.4.3"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
27
|
"build": "del-cli dist && npx tsc",
|