@ic3/reporting-api 8.0.1 → 8.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ApiUtils.js +1 -1
- package/dist/IOnNewEventJsContext.d.ts +66 -0
- package/dist/{theme/ThemeReportAppMenu.js → IOnNewEventJsContext.js} +1 -1
- package/dist/IOnNewEventJsContext.js.map +1 -0
- package/dist/IReporting.d.ts +9 -3
- package/dist/IThemeManager.d.ts +0 -2
- package/dist/LazyTreeView.d.ts +0 -23
- package/dist/LazyTreeView.js +0 -13
- package/dist/LazyTreeView.js.map +1 -1
- package/dist/Loader.d.ts +70 -1
- package/dist/Loader.js +150 -1
- package/dist/Loader.js.map +1 -1
- package/dist/PublicAmchartsData.d.ts +60 -0
- package/dist/PublicAmchartsData.js +122 -0
- package/dist/PublicAmchartsData.js.map +1 -0
- package/dist/PublicContext.d.ts +40 -3
- package/dist/PublicLayout.d.ts +5 -1
- package/dist/PublicTemplate.d.ts +39 -15
- package/dist/PublicTemplate.js.map +1 -1
- package/dist/PublicTemplateForm.d.ts +45 -57
- package/dist/PublicTemplateForm.js +10 -1
- package/dist/PublicTemplateForm.js.map +1 -1
- package/dist/PublicTheme.d.ts +155 -15
- package/dist/PublicTheme.js.map +1 -1
- package/dist/PublicTidyColumn.d.ts +69 -23
- package/dist/PublicTidyColumn.js +8 -0
- package/dist/PublicTidyColumn.js.map +1 -1
- package/dist/PublicTidyHistogram.d.ts +1 -1
- package/dist/PublicTidyMath.d.ts +26 -20
- package/dist/PublicTidyTable.d.ts +12 -5
- package/dist/PublicTidyTableInteractions.d.ts +76 -22
- package/dist/PublicTidyTableTypeGuards.d.ts +4 -0
- package/dist/PublicTidyTableTypeGuards.js +16 -0
- package/dist/PublicTidyTableTypeGuards.js.map +1 -0
- package/dist/PublicTidyTableTypes.d.ts +98 -16
- package/dist/PublicTidyTableTypes.js +1 -1
- package/dist/PublicTidyTableTypes.js.map +1 -1
- package/dist/PublicTidyTree.d.ts +10 -13
- package/dist/PublicTidyTree.js +11 -8
- package/dist/PublicTidyTree.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/theme/ThemeAmCharts4.d.ts +25 -6
- package/dist/theme/ThemeApp.d.ts +26 -11
- package/dist/theme/ThemeApp.js +23 -12
- package/dist/theme/ThemeApp.js.map +1 -1
- package/dist/theme/ThemeAppMenuIcon.d.ts +7 -0
- package/dist/theme/ThemeAppMenuIcon.js +8 -0
- package/dist/theme/ThemeAppMenuIcon.js.map +1 -0
- package/dist/theme/ThemeDatePicker.d.ts +7 -0
- package/dist/theme/ThemeDatePicker.js +8 -0
- package/dist/theme/ThemeDatePicker.js.map +1 -1
- package/dist/theme/ThemeEditorTopBar.d.ts +31 -0
- package/dist/theme/ThemeEditorTopBar.js +35 -0
- package/dist/theme/ThemeEditorTopBar.js.map +1 -0
- package/dist/theme/ThemeEmbeddedReport.d.ts +3 -0
- package/dist/theme/ThemeFilterAutocomplete.d.ts +1 -0
- package/dist/theme/ThemeFilterAutocomplete.js +1 -0
- package/dist/theme/ThemeFilterAutocomplete.js.map +1 -1
- package/dist/theme/ThemeFilterButtons.d.ts +1 -1
- package/dist/theme/ThemeFilterButtons.js +1 -1
- package/dist/theme/ThemeFilterButtons.js.map +1 -1
- package/dist/theme/ThemeFilterPanel.d.ts +80 -9
- package/dist/theme/ThemeFilterPanel.js +45 -3
- package/dist/theme/ThemeFilterPanel.js.map +1 -1
- package/dist/theme/ThemeFilterTree.d.ts +4 -3
- package/dist/theme/ThemeFilterTree.js +2 -1
- package/dist/theme/ThemeFilterTree.js.map +1 -1
- package/dist/theme/ThemeGlobal.d.ts +4 -0
- package/dist/theme/ThemeGlobal.js +9 -0
- package/dist/theme/ThemeGlobal.js.map +1 -0
- package/dist/theme/ThemeKpiCard.d.ts +41 -5
- package/dist/theme/ThemeKpiCard.js +15 -0
- package/dist/theme/ThemeKpiCard.js.map +1 -1
- package/dist/theme/ThemeLazyTreeClasses.d.ts +14 -0
- package/dist/theme/ThemeLazyTreeClasses.js +19 -0
- package/dist/theme/ThemeLazyTreeClasses.js.map +1 -0
- package/dist/theme/ThemePivotTable.d.ts +0 -5
- package/dist/theme/ThemePivotTable.js.map +1 -1
- package/dist/theme/ThemeQueryBuilderNode.d.ts +8 -0
- package/dist/theme/ThemeQueryBuilderNode.js +8 -0
- package/dist/theme/ThemeQueryBuilderNode.js.map +1 -0
- package/dist/theme/ThemeTable.d.ts +0 -14
- package/dist/theme/ThemeTable.js.map +1 -1
- package/dist/theme/ThemeWidgetBox.d.ts +8 -0
- package/dist/theme/ThemeWidgetBox.js +24 -16
- package/dist/theme/ThemeWidgetBox.js.map +1 -1
- package/package.json +5 -5
- package/dist/theme/ThemeReportAppMenu.d.ts +0 -18
- package/dist/theme/ThemeReportAppMenu.js.map +0 -1
package/dist/PublicContext.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { ITidyTable } from "./PublicTidyTable";
|
|
|
4
4
|
import { ITidyTableTransformation } from "./ITidyTableTransformation";
|
|
5
5
|
import { Theme } from "@mui/material/styles";
|
|
6
6
|
import { ThemeTextFormatter } from "./PublicTheme";
|
|
7
|
-
import { ITidyColumn } from "./PublicTidyColumn";
|
|
7
|
+
import { ITidyColumn, ITidyNumericColumn } from "./PublicTidyColumn";
|
|
8
8
|
import { IPublicWidgetTemplateDefinition } from "./PublicTemplate";
|
|
9
9
|
import { ITidyMath } from "./PublicTidyMath";
|
|
10
10
|
export declare enum WidgetRenderLayoutStatus {
|
|
@@ -17,13 +17,14 @@ export declare enum IContentMessageType {
|
|
|
17
17
|
}
|
|
18
18
|
export interface IPublicContext {
|
|
19
19
|
/**
|
|
20
|
-
* React
|
|
20
|
+
* React, returns true when loaded
|
|
21
21
|
*/
|
|
22
22
|
useGoogleMapHook(): boolean | Error;
|
|
23
23
|
getTheme(): Theme;
|
|
24
24
|
getUserName(): string;
|
|
25
25
|
getReportLocale(): string;
|
|
26
26
|
getNumberFormatter(format: ThemeTextFormatter): (value: any | undefined) => string;
|
|
27
|
+
getDateFormatter(format: ThemeTextFormatter): (value: any | undefined) => string;
|
|
27
28
|
/**
|
|
28
29
|
* translate the content of a report (the title of widgets, content of some widgets...). This does use another file
|
|
29
30
|
*
|
|
@@ -110,7 +111,6 @@ export interface IWidgetPublicContext extends IPublicContext {
|
|
|
110
111
|
getTemplateId(): string;
|
|
111
112
|
getWidgetPageId(): string;
|
|
112
113
|
isPrintingMode(): boolean;
|
|
113
|
-
getGoogleMapRenderedDelayMS(): number;
|
|
114
114
|
logInfoWidget(component: string, message: string): void;
|
|
115
115
|
renderWidgetContentMessage(type: IContentMessageType, message: string): any;
|
|
116
116
|
renderLazyTreeView<T>(props: LazyTreeViewProps): T;
|
|
@@ -171,6 +171,43 @@ export interface IWidgetPublicContext extends IPublicContext {
|
|
|
171
171
|
* Redux -> set in Redux value in widgetOwnProps[fieldName]
|
|
172
172
|
*/
|
|
173
173
|
setReduxOwnProps(fieldName: string, value: any): void;
|
|
174
|
+
/**
|
|
175
|
+
* Google map
|
|
176
|
+
*/
|
|
177
|
+
/**
|
|
178
|
+
* React only, like an use function
|
|
179
|
+
*
|
|
180
|
+
* Loads Google map library with the API key as set
|
|
181
|
+
*
|
|
182
|
+
* return
|
|
183
|
+
* true when the google map is ready (lib loaded)
|
|
184
|
+
* error when
|
|
185
|
+
*/
|
|
186
|
+
reactUseGoogleMap(): boolean | Error;
|
|
187
|
+
/**
|
|
188
|
+
* React only, like an use function
|
|
189
|
+
*
|
|
190
|
+
* reactUseGoogleMap() + rendered the map into the div referenced by ref with mapOptions
|
|
191
|
+
*
|
|
192
|
+
* @param mapOptions google.maps.MapOptions
|
|
193
|
+
* @param ref ref React.RefObject<HTMLDivElement>
|
|
194
|
+
*
|
|
195
|
+
* return
|
|
196
|
+
* undefined if loading
|
|
197
|
+
* {map} google.maps.Map instance when loaded
|
|
198
|
+
* {error} if loaded on error
|
|
199
|
+
*/
|
|
200
|
+
reactUseGoogleMapPlus(mapOptions: any, ref: any): undefined | {
|
|
201
|
+
map?: any;
|
|
202
|
+
error?: Error;
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Returns latitude and longitude with the same logic as for internal maps
|
|
206
|
+
*
|
|
207
|
+
*
|
|
208
|
+
*/
|
|
209
|
+
getMapCoordinates(table: ITidyTable): [ITidyNumericColumn, ITidyNumericColumn] | [];
|
|
210
|
+
getGoogleMapRenderedDelayMS(): number;
|
|
174
211
|
}
|
|
175
212
|
export interface IWidgetEditorPublicContext {
|
|
176
213
|
/**
|
package/dist/PublicLayout.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PaperOrientation, PaperSizeUnits } from "./ITypes";
|
|
2
|
+
import { Property } from "csstype";
|
|
2
3
|
declare type CSSProperties = any;
|
|
3
4
|
/**
|
|
4
5
|
* <pre>
|
|
@@ -98,7 +99,10 @@ export interface IWidgetLayoutDefinition {
|
|
|
98
99
|
pageSize: IKnownPageSize | IManualPageSize | IUnlimitedPageSize;
|
|
99
100
|
pageOrientation: PaperOrientation;
|
|
100
101
|
pageMargin: IPageMargin;
|
|
101
|
-
|
|
102
|
+
/**
|
|
103
|
+
* Use the one defined from the theme (ic3 palette) when not defined here.
|
|
104
|
+
*/
|
|
105
|
+
pageBackgroundColor?: Property.Color;
|
|
102
106
|
/**
|
|
103
107
|
* Widgets are zoomed so that their bounding box fits the horizontal page area.
|
|
104
108
|
*/
|
package/dist/PublicTemplate.d.ts
CHANGED
|
@@ -3,11 +3,39 @@ import { ITidyTableInteraction } from "./PublicTidyTableInteractions";
|
|
|
3
3
|
import { IWidgetPublicContext } from "./PublicContext";
|
|
4
4
|
import { FormFieldObject, FormFields, IFormColumnChooserFieldDef } from "./PublicTemplateForm";
|
|
5
5
|
import { IWidgetVariantManager } from "./IWidgetVariantManager";
|
|
6
|
-
import { ITidyColumn } from "./PublicTidyColumn";
|
|
7
6
|
import { ReactElement } from "react";
|
|
8
7
|
import { Theme } from "@mui/material/styles";
|
|
9
8
|
import { WidgetTemplateChartOptions, WidgetTemplateIDs } from "./PublicTemplates";
|
|
10
|
-
import { ChartTemplateDataMapping } from "./PublicTidyTableTypes";
|
|
9
|
+
import { ChartTemplateDataMapping, IFormFieldGranularityItem } from "./PublicTidyTableTypes";
|
|
10
|
+
import { ResizingConstraintOptions } from "./theme/ThemeWidgetBox";
|
|
11
|
+
export interface IRectanglePosition {
|
|
12
|
+
top: number;
|
|
13
|
+
left: number;
|
|
14
|
+
}
|
|
15
|
+
export interface IRectangleSize {
|
|
16
|
+
height: number;
|
|
17
|
+
width: number;
|
|
18
|
+
}
|
|
19
|
+
export interface IRectangle extends IRectanglePosition, IRectangleSize {
|
|
20
|
+
}
|
|
21
|
+
export interface IWidgetLayoutData {
|
|
22
|
+
/**
|
|
23
|
+
* Keep box header settings for additional (i.e., generated) pages.
|
|
24
|
+
*/
|
|
25
|
+
keepBoxHeader: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Keep box header settings for additional (i.e., generated) pages.
|
|
28
|
+
*/
|
|
29
|
+
keepTableHeader: boolean;
|
|
30
|
+
startRow: number;
|
|
31
|
+
endRow: number;
|
|
32
|
+
}
|
|
33
|
+
export interface IWidgetLayoutInfo extends IRectangle {
|
|
34
|
+
pageNb: number;
|
|
35
|
+
positionOrder: number;
|
|
36
|
+
data?: IWidgetLayoutData;
|
|
37
|
+
resizingConstraint?: ResizingConstraintOptions;
|
|
38
|
+
}
|
|
11
39
|
declare type ChartTemplateWidgetProps = any;
|
|
12
40
|
export declare type IPublicWidgetTemplateDefinition<T extends FormFieldObject> = IPublicWidgetReactTemplateDefinition<T> | IPublicWidgetJsTemplateDefinition<T>;
|
|
13
41
|
export declare enum IWidgetTemplateMdxBuilderAxisPropsConstraint {
|
|
@@ -102,7 +130,8 @@ export interface IPublicJsChartTemplate<T extends FormFieldObject> {
|
|
|
102
130
|
* @param options the options (possibly edited and/or from the theme) of this widget
|
|
103
131
|
* @param header aka. widget title
|
|
104
132
|
*/
|
|
105
|
-
renderJS: (data: IWidgetTemplateTidyData, options: T, header: string
|
|
133
|
+
renderJS: (data: IWidgetTemplateTidyData, options: T, header: string) => void;
|
|
134
|
+
renderOnResizeJS?: (data: IWidgetTemplateTidyData, options: T, header: string, info: IWidgetLayoutInfo) => void;
|
|
106
135
|
dispose: () => void;
|
|
107
136
|
}
|
|
108
137
|
/**
|
|
@@ -297,24 +326,19 @@ interface IPublicCommonWidgetTemplateDefinition<OPTIONS extends FormFieldObject>
|
|
|
297
326
|
eventRoles?: ITemplateEventActionDef;
|
|
298
327
|
selection?: {
|
|
299
328
|
/**
|
|
300
|
-
*
|
|
301
|
-
*/
|
|
302
|
-
defaultRoles?: string[];
|
|
303
|
-
/**
|
|
304
|
-
* If defined, returns the roles available
|
|
305
|
-
*
|
|
329
|
+
* The default selection granularity.
|
|
306
330
|
*/
|
|
307
|
-
|
|
331
|
+
defaultGranularityItems?: IFormFieldGranularityItem[];
|
|
308
332
|
/**
|
|
309
|
-
* The list of columns that can be part of the selection granularity. The
|
|
310
|
-
*
|
|
333
|
+
* The list of columns/roles that can be part of the selection granularity. The granularity editor shows
|
|
334
|
+
* when there are 2 or more roles.
|
|
311
335
|
*/
|
|
312
|
-
|
|
336
|
+
granularityItems?: (table: ITidyTable) => IFormFieldGranularityItem[];
|
|
313
337
|
};
|
|
314
338
|
mdxBuilderSettings?: IWidgetTemplateMdxBuilderMapping;
|
|
315
339
|
/**
|
|
316
|
-
* Setup how to get default mappings from the table and options for this widget.
|
|
317
|
-
* fallback logic.
|
|
340
|
+
* Setup how to get default mappings from the table and options for this widget.
|
|
341
|
+
* If undefined, it uses the default fallback logic.
|
|
318
342
|
*/
|
|
319
343
|
defaultMapping?: (data: IWidgetTemplateTidyOptions<OPTIONS>) => ChartTemplateDataMapping;
|
|
320
344
|
/**
|
|
@@ -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":";;;AAyDA,IAAY,4CAIX;AAJD,WAAY,4CAA4C;IACpD,qEAAqB,CAAA;IACrB,yEAAyB,CAAA;IACzB,2EAA2B,CAAA;AAC/B,CAAC,EAJW,4CAA4C,GAA5C,oDAA4C,KAA5C,oDAA4C,QAIvD;AAyaD;;;;GAIG;AACH,IAAY,4BAKX;AALD,WAAY,4BAA4B;IACpC,+CAAe,CAAA;IACf,iDAAiB,CAAA;IACjB,2CAAW,CAAA;IACX,6CAAa,CAAA;AACjB,CAAC,EALW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAKvC;AA6BD;;GAEG;AACH,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAChC,mDAAuB,CAAA;IAEvB,gBAAgB;IAChB,0DAA8B,CAAA;IAC9B,iEAAqC,CAAA;AACzC,CAAC,EANW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAMnC"}
|
|
@@ -97,7 +97,7 @@ export declare type FormFields<T extends FormFieldObject> = {
|
|
|
97
97
|
} | {
|
|
98
98
|
defaultValue?: any;
|
|
99
99
|
mandatory?: false;
|
|
100
|
-
}) & (Required<T>[key] extends FormFieldObject ? Omit<IFormEmbeddedFieldDef<Required<T>[key]>, 'fieldPath'> : Required<T>[key] extends IPaletteDef ? Omit<IFormPaletteEditorFieldDef, 'fieldPath'> : Required<T>[key] extends IColorDef ? Omit<IFormColorEditorFieldDef, 'fieldPath'> : Required<T>[key] extends TidyTableColumnSelector[] ? Omit<
|
|
100
|
+
}) & (Required<T>[key] extends FormFieldObject ? Omit<IFormEmbeddedFieldDef<Required<T>[key]>, 'fieldPath'> : Required<T>[key] extends IPaletteDef ? Omit<IFormPaletteEditorFieldDef, '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 Hook<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 string ? Omit<IFormOptionFieldSingleDef, 'fieldPath'> | Omit<IFormStringFieldDef, 'fieldPath'> | Omit<IFormFormatterPickerFieldDef, 'fieldPath'> | Omit<IFormWidgetVariantFieldDef, 'fieldPath'> | Omit<IFormTidyTableTextExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableTextRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableHtmlRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableHtmlExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableNumericRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableColorRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableStringRowExprFieldDef, 'fieldPath'> | Omit<IFormTidyTableScaleRowExprFieldDef, 'fieldPath'> | Omit<IFormJsFieldDef, 'fieldPath'> | Omit<IFormJsonFieldDef, 'fieldPath'> | Omit<IFormMarkdownFieldDef, 'fieldPath'> | Omit<IFormOptionFieldReportPathDef, 'fieldPath'> : Required<T>[key] extends string[] ? Omit<IFormOptionFieldMultipleDef, 'fieldPath'> | Omit<IFormGroupsFieldDef, 'fieldPath'> : never);
|
|
101
101
|
};
|
|
102
102
|
export declare enum IFormFieldGroupTypes {
|
|
103
103
|
Selection = "selection",
|
|
@@ -245,6 +245,10 @@ export declare type FormFieldType =
|
|
|
245
245
|
* @see IFormTidyTableTextRowExprFieldDef
|
|
246
246
|
*/
|
|
247
247
|
"tidyTableTextRowExpr" |
|
|
248
|
+
/**
|
|
249
|
+
* @see IFormUrlFieldDef
|
|
250
|
+
*/
|
|
251
|
+
"url" |
|
|
248
252
|
/**
|
|
249
253
|
* @see IFormWidgetVariantFieldDef
|
|
250
254
|
*/
|
|
@@ -267,7 +271,15 @@ export declare function isTidyTableExprScale(type: FormFieldType): boolean;
|
|
|
267
271
|
*/
|
|
268
272
|
export declare enum AutocompleteNoOptionsText {
|
|
269
273
|
NO_OPTIONS = "NO_OPTIONS",
|
|
270
|
-
|
|
274
|
+
NO_COLUMNS = "NO_COLUMNS",
|
|
275
|
+
NO_QUERY_RESULT = "NO_QUERY_RESULT",
|
|
276
|
+
QUERY_HAS_ERROR = "QUERY_HAS_ERROR"
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Show an action button below the options
|
|
280
|
+
*/
|
|
281
|
+
export declare enum AutocompleteActions {
|
|
282
|
+
ADD_COLOR = "ADD_COLOR"
|
|
271
283
|
}
|
|
272
284
|
export declare type CodeMirrorMode = "plain" | "mdx" | "sql" | "js" | "json" | "csv" | "md" | FormFieldTidyTableExprType;
|
|
273
285
|
export declare function isCodeMirrorModeExpr(mode: CodeMirrorMode): boolean;
|
|
@@ -311,6 +323,10 @@ export interface IFormAutocompleteFieldDef<OPTION> extends IFormFieldDef<OPTION>
|
|
|
311
323
|
optionValuesObsolete?: boolean;
|
|
312
324
|
optionValuesObsoleteMessage?: string;
|
|
313
325
|
noOptionsText?: AutocompleteNoOptionsText;
|
|
326
|
+
/**
|
|
327
|
+
* Show an action button below the options
|
|
328
|
+
*/
|
|
329
|
+
action?: AutocompleteActions;
|
|
314
330
|
renderInput?: (params: AutocompleteRenderInputParams) => React.ReactNode;
|
|
315
331
|
renderOption?: (props: React.HTMLAttributes<HTMLLIElement>, option: OPTION, state: AutocompleteRenderOptionState, onClose: () => void) => React.ReactNode;
|
|
316
332
|
disableClearable?: boolean;
|
|
@@ -343,13 +359,15 @@ export interface IFormColorEditorFieldDef extends IFormFieldDef<IColorDef> {
|
|
|
343
359
|
*
|
|
344
360
|
*/
|
|
345
361
|
export declare type IFormColumnChooserFieldDef = IFormColumnChooserSingleFieldDef | IFormColumnChooserMultipleFieldDef;
|
|
346
|
-
|
|
362
|
+
export declare type IFormColumnChooserSingleFieldDef = IFormColumnChooserBaseDef<TidyTableColumnSelector>;
|
|
363
|
+
export declare type IFormColumnChooserMultipleFieldDef = IFormColumnChooserBaseDef<TidyTableColumnSelector[]>;
|
|
364
|
+
interface IFormColumnChooserBaseDef<T extends TidyTableColumnSelector | TidyTableColumnSelector[]> extends IFormFieldDef<T> {
|
|
347
365
|
fieldType: "columnsChooser";
|
|
348
366
|
editorConf?: {
|
|
349
367
|
/**
|
|
350
368
|
* The user can select multiple columns / selectors
|
|
351
369
|
*/
|
|
352
|
-
multiple?:
|
|
370
|
+
multiple?: boolean;
|
|
353
371
|
/**
|
|
354
372
|
* The user can select the same column more than once
|
|
355
373
|
*/
|
|
@@ -357,7 +375,7 @@ interface IFormColumnChooserSingleFieldDef extends IFormFieldDef<TidyTableColumn
|
|
|
357
375
|
/**
|
|
358
376
|
* Only columns of this/these type(s) are allowed.
|
|
359
377
|
*/
|
|
360
|
-
allowedTypes?: TidyColumnsType[]
|
|
378
|
+
allowedTypes?: TidyColumnsType[];
|
|
361
379
|
/**
|
|
362
380
|
* The user can select properties of columns
|
|
363
381
|
*/
|
|
@@ -367,56 +385,26 @@ interface IFormColumnChooserSingleFieldDef extends IFormFieldDef<TidyTableColumn
|
|
|
367
385
|
*/
|
|
368
386
|
includeSelectors?: boolean;
|
|
369
387
|
/**
|
|
370
|
-
*
|
|
371
|
-
*
|
|
372
|
-
* It finds the column to fallback on by
|
|
373
|
-
* 1. role equal to fieldPath and type is allowed,
|
|
374
|
-
* 2. role equal to editorConfig.alias and type is allowed,
|
|
375
|
-
* 3. type is allowed.
|
|
376
|
-
*
|
|
377
|
-
* Already mapped columns are skipped.
|
|
378
|
-
*/
|
|
379
|
-
fallback?: boolean;
|
|
380
|
-
/**
|
|
381
|
-
* In the expression editor, use the alias to reference the column. Use the alias in table.getColumnByAlias(...).
|
|
382
|
-
*/
|
|
383
|
-
alias?: string;
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
interface IFormColumnChooserMultipleFieldDef extends IFormFieldDef<TidyTableColumnSelector[]> {
|
|
387
|
-
fieldType: "columnsChooser";
|
|
388
|
-
editorConf?: {
|
|
389
|
-
/**
|
|
390
|
-
* The user can select multiple columns / selectors
|
|
388
|
+
* The user can select columns based on their role
|
|
391
389
|
*/
|
|
392
|
-
|
|
390
|
+
includeRoles?: boolean;
|
|
393
391
|
/**
|
|
394
|
-
*
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
/**
|
|
398
|
-
* Only columns of this/these type(s) are allowed.
|
|
399
|
-
*/
|
|
400
|
-
allowedTypes?: TidyColumnsType[] | ((column: ITidyColumn) => boolean);
|
|
401
|
-
/**
|
|
402
|
-
* The user can select properties of columns
|
|
403
|
-
*/
|
|
404
|
-
includeProperties?: boolean;
|
|
405
|
-
/**
|
|
406
|
-
* The user can choose a selector, see TidyTableMappingColumnSelectorOptions
|
|
407
|
-
*/
|
|
408
|
-
includeSelectors?: boolean;
|
|
409
|
-
/**
|
|
410
|
-
* Fallback to a column that has a type that is allowed. Note, properties of columns are not considered.
|
|
392
|
+
* Search the table for a default column.
|
|
393
|
+
*
|
|
394
|
+
* Set to true to use the default fallback logic:
|
|
411
395
|
*
|
|
412
|
-
*
|
|
413
|
-
* 1. role equal to fieldPath and type is allowed,
|
|
414
|
-
* 2. role equal to editorConfig.alias and type is allowed,
|
|
415
|
-
* 3. type is allowed.
|
|
396
|
+
* Fallback to a column that has a type that is allowed. Note, properties of columns are not considered.
|
|
416
397
|
*
|
|
417
|
-
*
|
|
398
|
+
* It finds the column to fallback on by
|
|
399
|
+
* 1. role equal to fieldPath and type is allowed,
|
|
400
|
+
* 2. role equal to editorConfig.alias and type is allowed,
|
|
401
|
+
* 3. type is allowed.
|
|
402
|
+
*
|
|
403
|
+
* Already mapped columns are skipped.
|
|
404
|
+
*
|
|
405
|
+
* You can also use your own fallback logic.
|
|
418
406
|
*/
|
|
419
|
-
fallback?: boolean;
|
|
407
|
+
fallback?: boolean | ((table: ITidyTable) => ITidyColumn[] | undefined);
|
|
420
408
|
/**
|
|
421
409
|
* In the expression editor, use the alias to reference the column. Use the alias in table.getColumnByAlias(...).
|
|
422
410
|
*/
|
|
@@ -428,12 +416,8 @@ interface IFormColumnChooserMultipleFieldDef extends IFormFieldDef<TidyTableColu
|
|
|
428
416
|
*/
|
|
429
417
|
export interface IFormGranularitySelectionFieldDef extends IFormFieldDef<IFormFieldGranularityItem> {
|
|
430
418
|
fieldType: "granularityChooser";
|
|
431
|
-
editorConf
|
|
432
|
-
|
|
433
|
-
/**
|
|
434
|
-
* User can select from these columns. Undefined = no columns to select.
|
|
435
|
-
*/
|
|
436
|
-
allowedColumns?: (column: ITidyColumn, table: ITidyTable) => boolean;
|
|
419
|
+
editorConf: {
|
|
420
|
+
options: (table: ITidyTable) => IFormFieldGranularityItem[];
|
|
437
421
|
};
|
|
438
422
|
}
|
|
439
423
|
/**
|
|
@@ -486,6 +470,10 @@ export interface IFormHookFieldDef<T> extends IFormFieldDef<Hook<T>> {
|
|
|
486
470
|
*/
|
|
487
471
|
export interface IFormJsFieldDef extends IFormFieldDef<string> {
|
|
488
472
|
fieldType: "js";
|
|
473
|
+
editorConf?: {
|
|
474
|
+
helpMdFile: string;
|
|
475
|
+
doNotCompleteEventNames?: true;
|
|
476
|
+
};
|
|
489
477
|
}
|
|
490
478
|
/**
|
|
491
479
|
* @see FormFieldDef
|
|
@@ -612,7 +600,7 @@ export interface IFormReportPermaLinkFieldDef extends IFormFieldDef<string> {
|
|
|
612
600
|
* @see FormFieldDef
|
|
613
601
|
*/
|
|
614
602
|
export interface IFormStringFieldDef extends IFormFieldDef<string> {
|
|
615
|
-
fieldType: "string";
|
|
603
|
+
fieldType: "string" | "url";
|
|
616
604
|
editorConf?: {
|
|
617
605
|
/**
|
|
618
606
|
* A list of possible strings...
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isCodeMirrorModeExpr = exports.AutocompleteNoOptionsText = exports.isTidyTableExprScale = exports.isTidyTableExprNumeric = exports.isTidyTableExprTextHtml = exports.isTidyTableExprText = exports.isTidyTableExprRow = exports.isTidyTableExprTable = exports.isTidyTableExpr = exports.IFormFieldGroupTypes = exports.formFieldIsSelection = void 0;
|
|
3
|
+
exports.isCodeMirrorModeExpr = exports.AutocompleteActions = exports.AutocompleteNoOptionsText = exports.isTidyTableExprScale = exports.isTidyTableExprNumeric = exports.isTidyTableExprTextHtml = exports.isTidyTableExprText = exports.isTidyTableExprRow = exports.isTidyTableExprTable = exports.isTidyTableExpr = exports.IFormFieldGroupTypes = exports.formFieldIsSelection = void 0;
|
|
4
4
|
function formFieldIsSelection(field) {
|
|
5
5
|
return field.group === IFormFieldGroupTypes.Selection;
|
|
6
6
|
}
|
|
@@ -66,8 +66,17 @@ exports.isTidyTableExprScale = isTidyTableExprScale;
|
|
|
66
66
|
var AutocompleteNoOptionsText;
|
|
67
67
|
(function (AutocompleteNoOptionsText) {
|
|
68
68
|
AutocompleteNoOptionsText["NO_OPTIONS"] = "NO_OPTIONS";
|
|
69
|
+
AutocompleteNoOptionsText["NO_COLUMNS"] = "NO_COLUMNS";
|
|
69
70
|
AutocompleteNoOptionsText["NO_QUERY_RESULT"] = "NO_QUERY_RESULT";
|
|
71
|
+
AutocompleteNoOptionsText["QUERY_HAS_ERROR"] = "QUERY_HAS_ERROR";
|
|
70
72
|
})(AutocompleteNoOptionsText = exports.AutocompleteNoOptionsText || (exports.AutocompleteNoOptionsText = {}));
|
|
73
|
+
/**
|
|
74
|
+
* Show an action button below the options
|
|
75
|
+
*/
|
|
76
|
+
var AutocompleteActions;
|
|
77
|
+
(function (AutocompleteActions) {
|
|
78
|
+
AutocompleteActions["ADD_COLOR"] = "ADD_COLOR";
|
|
79
|
+
})(AutocompleteActions = exports.AutocompleteActions || (exports.AutocompleteActions = {}));
|
|
71
80
|
function isCodeMirrorModeExpr(mode) {
|
|
72
81
|
return mode === "tidyTableHtmlExpr"
|
|
73
82
|
|| mode === "tidyTableHtmlRowExpr"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PublicTemplateForm.js","sourceRoot":"","sources":["../src/PublicTemplateForm.ts"],"names":[],"mappings":";;;AAaA,SAAgB,oBAAoB,CAAC,KAAyB;IAC1D,OAAO,KAAK,CAAC,KAAK,KAAK,oBAAoB,CAAC,SAAS,CAAC;AAC1D,CAAC;AAFD,oDAEC;AAmJD,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,+CAAuB,CAAA;IACvB,yEAAiD,CAAA;IACjD,sDAA8B,CAAA;AAClC,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B;
|
|
1
|
+
{"version":3,"file":"PublicTemplateForm.js","sourceRoot":"","sources":["../src/PublicTemplateForm.ts"],"names":[],"mappings":";;;AAaA,SAAgB,oBAAoB,CAAC,KAAyB;IAC1D,OAAO,KAAK,CAAC,KAAK,KAAK,oBAAoB,CAAC,SAAS,CAAC;AAC1D,CAAC;AAFD,oDAEC;AAmJD,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,+CAAuB,CAAA;IACvB,yEAAiD,CAAA;IACjD,sDAA8B,CAAA;AAClC,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B;AA0KD,SAAgB,eAAe,CAAC,IAAmB;IAC/C,OAAO,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,mBAAmB;WAC5B,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;AAXD,0CAWC;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,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,mBAAmB,CAAC,IAAmB;IACnD,OAAO,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB,CACjC;AACT,CAAC;AAND,kDAMC;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,yBAAyB,CACpC;AACT,CAAC;AAJD,wDAIC;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,GAAzB,iCAAyB,KAAzB,iCAAyB,QAKpC;AAED;;GAEG;AACH,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC3B,8CAAuB,CAAA;AAC3B,CAAC,EAFW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAE9B;AAaD,SAAgB,oBAAoB,CAAC,IAAoB;IACrD,OAAO,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,mBAAmB;WAC5B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,sBAAsB;WAC/B,IAAI,KAAK,yBAAyB;WAClC,IAAI,KAAK,uBAAuB;WAChC,IAAI,KAAK,wBAAwB;WACjC,IAAI,KAAK,uBAAuB,CAClC;AACT,CAAC;AAXD,oDAWC"}
|