@ic3/reporting-api 8.4.8 → 8.4.9

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 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.8" || "-", "Thu, 18 Jan 2024 10:07:40 GMT" || "-") }, definition);
11
+ return Object.assign({ apiVersion: new ReportingVersion_1.default("8.4.9" || "-", "Fri, 23 Feb 2024 04:36:15 GMT" || "-") }, definition);
12
12
  };
13
13
  }
14
14
  /**
@@ -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;
@@ -35,9 +35,17 @@ export interface IPublicContext {
35
35
  */
36
36
  getThemeFormatter(): ThemeFormatters;
37
37
  getUserName(): string;
38
+ getReportName(): string;
39
+ getReportFolderName(): string;
38
40
  getReportLocale(): string;
39
- getNumberFormatter(format: ThemeTextFormatter): (value: any | undefined) => string;
40
- getDateFormatter(format: ThemeTextFormatter): (value: any | undefined) => string;
41
+ /**
42
+ * @param format Formatter. Defaults to `defaultNumber` from the theme.
43
+ */
44
+ getNumberFormatter(format: ThemeTextFormatter | null | undefined): (value: any | undefined) => string;
45
+ /**
46
+ * @param format Formatter. Defaults to `defaultDate` or `defaultDatetime` from the theme.
47
+ */
48
+ getDateFormatter(format: ThemeTextFormatter | null | undefined): (value: any | undefined) => string;
41
49
  /**
42
50
  * translate the content of a report (the title of widgets, content of some widgets...). This does use another file
43
51
  *
@@ -0,0 +1,29 @@
1
+ type DateType = any;
2
+ export interface PublicDateShortcutUtils {
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): DateType;
7
+ /**
8
+ * Return the current datetime.
9
+ */
10
+ now(): DateType;
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(): DateType;
16
+ /**
17
+ * Return the current datetime. Returns the anchor datetime if it exists.
18
+ */
19
+ current(): DateType;
20
+ /**
21
+ * Returns the anchor date.
22
+ */
23
+ getAnchorDate(): DateType | 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(): DateType;
28
+ }
29
+ export {};
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=PublicDateShortcutUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PublicDateShortcutUtils.js","sourceRoot":"","sources":["../src/PublicDateShortcutUtils.ts"],"names":[],"mappings":""}
@@ -509,7 +509,7 @@ interface IPublicCommonWidgetTemplateDefinition<OPTIONS extends FormFieldObject>
509
509
  * Change the data to show when the user presses show-data from the widget menu.
510
510
  * @param ownProps
511
511
  */
512
- getShowHideDataTable?: (table: ITidyTable | undefined, options: OPTIONS, ownProps: any) => ITidyTable | undefined;
512
+ getShowHideDataTable?: (table: ITidyTable | undefined, options: OPTIONS, ownProps: any, theme: Theme) => ITidyTable | undefined;
513
513
  }
514
514
  /**
515
515
  * *********************************************************************************************************************
@@ -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
4
  import { 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) => void);
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;
@@ -1067,5 +1074,12 @@ export interface IFormConditionalColorRulesFieldDef extends IFormFieldDef<IFormC
1067
1074
  export interface IFormFilterPanelModelSelectorFieldDef extends IFormFieldDef<string> {
1068
1075
  fieldType: "filterPanelModelSelector";
1069
1076
  }
1070
- 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;
1077
+ export type LocalizeContext = Pick<IPublicContext, 'localize'>;
1078
+ export interface IFormShortcutChooserDef<T extends string | string[]> extends IFormFieldDef<T> {
1079
+ fieldType: "shortcutChooser";
1080
+ editorConf?: {
1081
+ getOptions: (deps: any, theme: Theme, context: LocalizeContext) => IOption[];
1082
+ };
1083
+ }
1084
+ 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
1085
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PublicTemplateForm.js","sourceRoot":"","sources":["../src/PublicTemplateForm.ts"],"names":[],"mappings":";;;AAkBA,SAAgB,oBAAoB,CAAC,KAAyB;IAC1D,OAAO,KAAK,CAAC,KAAK,KAAK,oBAAoB,CAAC,SAAS,CAAC;AAC1D,CAAC;AAFD,oDAEC;AAwKD,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,oDAA4B,CAAA;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C,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;AA+8BD;;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"}
@@ -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
- defaultDate: ThemeTextFormatter;
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,18 @@ 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
+ };
520
541
  }
521
542
  export interface ic3ThemeOptions {
522
543
  /**
@@ -575,6 +596,9 @@ export interface ic3ThemeOptions {
575
596
  */
576
597
  extraHeight?: number;
577
598
  contentOffset: {
599
+ /**
600
+ * Corresponds to the actual height as defined for WidgetBoxClasses.header.
601
+ */
578
602
  top: number;
579
603
  left: number;
580
604
  };
@@ -664,6 +688,7 @@ export interface ic3ThemeOptions {
664
688
  };
665
689
  };
666
690
  };
691
+ datePicker?: DeepPartial<ic3Theme['datePicker']>;
667
692
  }
668
693
  interface IWidgetIcons extends IWidgetBoxIconsDefinition {
669
694
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"PublicTheme.js","sourceRoot":"","sources":["../src/PublicTheme.ts"],"names":[],"mappings":";;;AA2IA,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"}
1
+ {"version":3,"file":"PublicTheme.js","sourceRoot":"","sources":["../src/PublicTheme.ts"],"names":[],"mappings":";;;AAwJA,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"}
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"}
@@ -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,55 @@ 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;
165
+ }
166
+ interface IShortcut<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
+ getValue: (util: PublicDateShortcutUtils) => T;
180
+ /**
181
+ * If an anchor date is defined, then this shortcut will show.
182
+ * — true: only show the shortcut when there is an anchor date.
183
+ * — false: do not show this shortcut when there is an anchor date.
184
+ * — undefined: always show the shortcut.
185
+ */
186
+ needsAnchor?: boolean;
136
187
  }
188
+ export type DatePickerShortcut = IShortcut<any>;
189
+ export type DateRangePickerShortcut = IShortcut<[any, any]>;
137
190
  export interface FilterDatePickerProps {
138
191
  }
192
+ export declare enum InitialDateFrom {
193
+ MANUAL_DATES = "manual",
194
+ SHORTCUT = "shortcut"
195
+ }
196
+ 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":";;;AAGA,4BAA4B;AAC5B,MAAa,iBAAiB;;AAA9B,8CAgBC;AAdG;;GAEG;AACa,sBAAI,GAAG,oBAAoB,CAAC;AAG5B,8BAAY,GAAG,6BAA6B,CAAC;AAE7C,iCAAe,GAAG,gCAAgC,CAAC;AAEnE;;GAEG;AACa,gCAAc,GAAG,8BAA8B,CAAC;AAKpE,IAAY,wBAIX;AAJD,WAAY,wBAAwB;IAChC,yCAAa,CAAA;IACb,qDAAyB,CAAA;IACzB,iDAAqB,CAAA;AACzB,CAAC,EAJW,wBAAwB,wCAAxB,wBAAwB,QAInC"}
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;AA0MD,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,wCAAqB,CAAA;AACzB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
@@ -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: string;
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";
@@ -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
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ic3/reporting-api",
3
- "version": "8.4.8",
3
+ "version": "8.4.9",
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,14 +11,14 @@
11
11
  "access": "public"
12
12
  },
13
13
  "dependencies": {
14
- "@mui/material": "5.15.4",
15
- "@mui/system": "5.15.4",
14
+ "@mui/material": "5.15.6",
15
+ "@mui/system": "5.15.6",
16
16
  "@emotion/react": "11.11.3",
17
17
  "@emotion/styled": "11.11.0"
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/markerclustererplus": "2.1.33",
21
- "@types/node": "20.11.3",
21
+ "@types/node": "20.11.10",
22
22
  "@types/react": "18.2.48",
23
23
  "del-cli": "5.1.0",
24
24
  "typescript": "5.3.3"