@genesislcap/grid-tabulator 14.214.2 → 14.214.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/custom-elements.json +109 -39
- package/dist/dts/cell-renderers/action.renderer.d.ts +1 -1
- package/dist/dts/datasource/client-side.datasource.d.ts +17 -8
- package/dist/dts/datasource/client-side.datasource.d.ts.map +1 -1
- package/dist/dts/external/index.d.ts +4 -0
- package/dist/dts/external/index.d.ts.map +1 -1
- package/dist/dts/external/tabulator-theme-simple-css.d.ts +4 -0
- package/dist/dts/external/tabulator-theme-simple-css.d.ts.map +1 -1
- package/dist/dts/grid-tabulator.components.d.ts +4 -0
- package/dist/dts/grid-tabulator.components.d.ts.map +1 -1
- package/dist/dts/grid-tabulator.d.ts +29 -1
- package/dist/dts/grid-tabulator.d.ts.map +1 -1
- package/dist/dts/grid-tabulator.definitions.d.ts +44 -5
- package/dist/dts/grid-tabulator.definitions.d.ts.map +1 -1
- package/dist/dts/grid-tabulator.styles.d.ts +4 -0
- package/dist/dts/grid-tabulator.styles.d.ts.map +1 -1
- package/dist/dts/grid-tabulator.template.d.ts +4 -0
- package/dist/dts/grid-tabulator.template.d.ts.map +1 -1
- package/dist/dts/grid-tabulator.types.d.ts +24 -1
- package/dist/dts/grid-tabulator.types.d.ts.map +1 -1
- package/dist/dts/tsdoc-metadata.json +11 -0
- package/dist/dts/utils/logger.d.ts +4 -0
- package/dist/dts/utils/logger.d.ts.map +1 -1
- package/dist/esm/external/index.js +4 -0
- package/dist/esm/external/tabulator-theme-simple-css.js +4 -0
- package/dist/esm/grid-tabulator.components.js +4 -0
- package/dist/esm/grid-tabulator.definitions.js +38 -0
- package/dist/esm/grid-tabulator.js +26 -2
- package/dist/esm/grid-tabulator.styles.js +4 -0
- package/dist/esm/grid-tabulator.template.js +4 -0
- package/dist/esm/grid-tabulator.types.js +24 -1
- package/dist/esm/utils/logger.js +4 -0
- package/dist/grid-tabulator.api.json +1641 -0
- package/dist/grid-tabulator.d.ts +1492 -0
- package/docs/.gitattributes +2 -0
- package/docs/api/grid-tabulator.actionheightmultiplier.md +18 -0
- package/docs/api/grid-tabulator.actionrenderer.clickhandler.md +15 -0
- package/docs/api/grid-tabulator.actionrenderer.datatestid.md +11 -0
- package/docs/api/grid-tabulator.actionrenderer.init.md +22 -0
- package/docs/api/grid-tabulator.actionrenderer.md +30 -0
- package/docs/api/grid-tabulator.actionrenderer.params.md +11 -0
- package/docs/api/grid-tabulator.actionrenderer.pendingaction.md +11 -0
- package/docs/api/grid-tabulator.actionrendererparams.md +26 -0
- package/docs/api/grid-tabulator.datetimevalueformatter.md +30 -0
- package/docs/api/grid-tabulator.datevalueformatter.md +30 -0
- package/docs/api/grid-tabulator.defaultgridtabulatorconfig.md +15 -0
- package/docs/api/grid-tabulator.formatdateextra.md +26 -0
- package/docs/api/grid-tabulator.foundationgridtabulatoractionrenderer.md +26 -0
- package/docs/api/grid-tabulator.foundationgridtabulatorcomponents.md +35 -0
- package/docs/api/grid-tabulator.getcolumntype.md +26 -0
- package/docs/api/grid-tabulator.getfilterbyfieldtype.md +26 -0
- package/docs/api/grid-tabulator.getfilterparamsbyfieldtype.md +26 -0
- package/docs/api/grid-tabulator.gridcssvars.md +13 -0
- package/docs/api/grid-tabulator.gridtabulatorcellrenderertypes.md +24 -0
- package/docs/api/grid-tabulator.gridtabulatorshadowoptions.md +13 -0
- package/docs/api/grid-tabulator.gridtabulatorstyles.md +13 -0
- package/docs/api/grid-tabulator.gridtabulatortemplate.md +13 -0
- package/docs/api/grid-tabulator.gridtabulatortheme.md +21 -0
- package/docs/api/grid-tabulator.logger.md +13 -0
- package/docs/api/grid-tabulator.md +62 -0
- package/docs/api/grid-tabulator.rowdatatransaction.add.md +13 -0
- package/docs/api/grid-tabulator.rowdatatransaction.addindex.md +13 -0
- package/docs/api/grid-tabulator.rowdatatransaction.md +23 -0
- package/docs/api/grid-tabulator.rowdatatransaction.remove.md +13 -0
- package/docs/api/grid-tabulator.rowdatatransaction.update.md +13 -0
- package/docs/api/grid-tabulator.tabulatoractionrendererstyles.md +13 -0
- package/docs/api/grid-tabulator.tabulatorexternalstockstyles.md +13 -0
- package/docs/api/grid-tabulator.tabulatorthemesimplecss.md +13 -0
- package/docs/api/grid-tabulator.themefontsid.md +13 -0
- package/docs/api/grid-tabulator.themetokenmapclassname.md +13 -0
- package/docs/api/grid-tabulator.themetokenmapcss.md +13 -0
- package/docs/api/index.md +12 -0
- package/docs/api-report.md +313 -0
- package/package.json +15 -15
- package/tsdoc.json +4 -0
|
@@ -49,6 +49,11 @@ declare const GridTabulator_base: (new (...args: any[]) => {
|
|
|
49
49
|
readonly clientTop: number;
|
|
50
50
|
readonly clientWidth: number;
|
|
51
51
|
id: string;
|
|
52
|
+
/**
|
|
53
|
+
* The grid-tabulator component registration.
|
|
54
|
+
* @public
|
|
55
|
+
* @privateRemarks explicitly declaring for extensibility
|
|
56
|
+
*/
|
|
52
57
|
readonly localName: string;
|
|
53
58
|
readonly namespaceURI: string;
|
|
54
59
|
onfullscreenchange: (this: Element, ev: Event) => any;
|
|
@@ -345,6 +350,20 @@ export declare class GridTabulator extends GridTabulator_base {
|
|
|
345
350
|
private rehydrationAttempted;
|
|
346
351
|
connectedCallback(): void;
|
|
347
352
|
disconnectedCallback(): void;
|
|
353
|
+
/**
|
|
354
|
+
* The current grid options.
|
|
355
|
+
* @public
|
|
356
|
+
* @example
|
|
357
|
+
* ```ts
|
|
358
|
+
* ...
|
|
359
|
+
* const options = this.grid.getOptions();
|
|
360
|
+
* logger.debug(options); // { data: [...], columns: [...], filterMode: "local", groupBy: false, ... }
|
|
361
|
+
* ...
|
|
362
|
+
* ```
|
|
363
|
+
* @remarks
|
|
364
|
+
* See https://tabulator.info/docs/6.3/options for more details.
|
|
365
|
+
*/
|
|
366
|
+
get gridOptions(): Options;
|
|
348
367
|
set gridOptions(options: Options);
|
|
349
368
|
get statePersistanceEnabled(): boolean;
|
|
350
369
|
saveGridState(): void;
|
|
@@ -373,12 +392,21 @@ export declare class GridTabulator extends GridTabulator_base {
|
|
|
373
392
|
private insertFontFace;
|
|
374
393
|
private destroyFontFace;
|
|
375
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
* The grid-tabulator component registration.
|
|
397
|
+
* @public
|
|
398
|
+
* @privateRemarks explicitly declaring for extensibility
|
|
399
|
+
*/
|
|
376
400
|
export declare const gridTabulatorShadowOptions: ShadowRootInit;
|
|
401
|
+
/**
|
|
402
|
+
* The default grid-tabulator configuration.
|
|
403
|
+
* @public
|
|
404
|
+
*/
|
|
377
405
|
export declare const defaultGridTabulatorConfig: {
|
|
378
406
|
shadowOptions: any;
|
|
379
407
|
};
|
|
380
408
|
/**
|
|
381
|
-
* The Foundation
|
|
409
|
+
* The Foundation grid-tabulator
|
|
382
410
|
*
|
|
383
411
|
* @alpha
|
|
384
412
|
* @remarks
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-tabulator.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,OAAO,EACP,cAAc,EACd,aAAa,IAAI,SAAS,EAC3B,MAAM,kBAAkB,CAAC
|
|
1
|
+
{"version":3,"file":"grid-tabulator.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EACL,eAAe,EACf,YAAY,EACZ,OAAO,EACP,cAAc,EACd,aAAa,IAAI,SAAS,EAC3B,MAAM,kBAAkB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA0N1B;;;;OAIG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA7MH;;;GAGG;AACH,qBAAa,aAAc,SAAQ,kBAAiC;IACtD,IAAI,EAAE,SAAS,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,cAAc,CAAC;IAExB,YAAY,SAAgC;IAC5C,UAAU,EAAE,MAAM,CAAC;IAEnB,OAAO,EAAE,GAAG,EAAE,CAAC;IAC3B,cAAc,CAAC,QAAQ,KAAA,EAAE,QAAQ,KAAA;IAOjC,sBAAsB,EAAE,OAAO,CAAS;IAEwB,mBAAmB,EAAE,OAAO,CACpF;IAEyC,qBAAqB,EAAE,MAAM,CAAC;IAEzE,SAAS,EAAE,MAAM,CAAoB;IAErC,KAAK,EAAE,MAAM,CAAY;IAC/B,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;IAY/C,OAAO,CAAC,oBAAoB,CAAS;IAOrC,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAO5B;;;;;;;;;;;;OAYG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,WAAW,CAAC,OAAO,EAAE,OAAO,EA6B/B;IAED,IAAI,uBAAuB,IAAI,OAAO,CAKrC;IAED,aAAa;IAcb,gBAAgB;IAoBhB;;;;;;;OAOG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,YAAY;IAItF;;;;;;;;;OASG;IACH,cAAc,CACZ,IAAI,EAAE,KAAK,GAAG,MAAM,GAAG,MAAM,EAC7B,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,eAAe,EACxB,MAAM,CAAC,EAAE,cAAc;IAKzB,OAAO,CAAC,eAAe,CAAa;IAEpC,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,eAAe;CAMxB;AAED;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,cAA0B,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,0BAA0B;;CAEtC,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;wBAMlC,CAAC"}
|
|
@@ -1,7 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { FilterParams } from 'tabulator-tables';
|
|
2
|
+
/**
|
|
3
|
+
* Get the filter type based on the field type.
|
|
4
|
+
* @param type - The field type.
|
|
5
|
+
* @returns The filter type.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare function getFilterByFieldType(type: string): string;
|
|
9
|
+
/**
|
|
10
|
+
* Get the column type based on the metadata type.
|
|
11
|
+
* @param metadataType - The metadata type.
|
|
12
|
+
* @returns The column type.
|
|
13
|
+
* @public
|
|
14
|
+
*/
|
|
15
|
+
export declare function getColumnType(metadataType: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Get the filter params based on the field type.
|
|
18
|
+
* @param type - The field type.
|
|
19
|
+
* @returns The filter params.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare function getFilterParamsByFieldType(type: string): FilterParams;
|
|
23
|
+
/**
|
|
24
|
+
* Format a date value.
|
|
25
|
+
* @remarks Formats [DATE] UNIX Timestamps (with time) to readable strings
|
|
26
|
+
* @param param - The field type.
|
|
27
|
+
* @returns The filter params.
|
|
28
|
+
* @public
|
|
29
|
+
*/
|
|
30
|
+
export declare function dateValueFormatter({ value }: any): string;
|
|
31
|
+
/**
|
|
32
|
+
* Format a date time value to a readable string.
|
|
33
|
+
* @remarks Formats [DATETIME] UNIX Timestamps (with time) to readable strings
|
|
34
|
+
* @param param - The field type.
|
|
35
|
+
* @returns The filter params.
|
|
36
|
+
* @public
|
|
37
|
+
*/
|
|
38
|
+
export declare function dateTimeValueFormatter({ value }: any): string;
|
|
39
|
+
/**
|
|
40
|
+
* Format am epoch value to a readable ISO date string.
|
|
41
|
+
* @param epoch - The epoch number.
|
|
42
|
+
* @returns The formatted date value.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
6
45
|
export declare function formatDateExtra(epoch: number): string;
|
|
7
46
|
//# sourceMappingURL=grid-tabulator.definitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-tabulator.definitions.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.definitions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"grid-tabulator.definitions.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.definitions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAczD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAS1D;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,CAwCrE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,GAAG,MAAM,CAEzD;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,EAAE,KAAK,EAAE,EAAE,GAAG,GAAG,MAAM,CAE7D;AAKD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAMrD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-tabulator.styles.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D,eAAO,MAAM,mBAAmB,EAAE,aAWjC,CAAC"}
|
|
1
|
+
{"version":3,"file":"grid-tabulator.styles.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.styles.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAG7D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,aAWjC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-tabulator.template.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D,eAAO,MAAM,qBAAqB,EAAE,YAInC,CAAC"}
|
|
1
|
+
{"version":3,"file":"grid-tabulator.template.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.template.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAG5D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAInC,CAAC"}
|
|
@@ -5,15 +5,38 @@ import { CSSVarTokenMap } from '@genesislcap/foundation-ui';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare enum GridCSSVars {
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* The available `grid-tabulator` themes
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
8
12
|
export declare enum GridTabulatorTheme {
|
|
9
13
|
default = "default-theme",
|
|
10
14
|
rapid = "rapid-theme"
|
|
11
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* Get the token map class name for the `grid-tabulator` themes
|
|
18
|
+
* @param themeName - The theme name
|
|
19
|
+
* @returns The token map class name for the `grid-tabulator` themes
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
12
22
|
export declare const themeTokenMapClassname: (themeName: string) => string;
|
|
23
|
+
/**
|
|
24
|
+
* Get the Fonts ID for the theme's name
|
|
25
|
+
* @param themeName - The theme name
|
|
26
|
+
* @returns The theme's fonts ID
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
13
29
|
export declare const themeFontsId: (themeName: string) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Get the CSS for the theme's token map
|
|
32
|
+
* @param themeName - The theme name
|
|
33
|
+
* @param tokenMap - The token map
|
|
34
|
+
* @returns The CSS for the theme's token map
|
|
35
|
+
* @public
|
|
36
|
+
*/
|
|
14
37
|
export declare const themeTokenMapCSS: (themeName: string, tokenMap: CSSVarTokenMap<any>) => import("@microsoft/fast-element").ElementStyles;
|
|
15
38
|
/**
|
|
16
|
-
* The available
|
|
39
|
+
* The available `grid-tabulator` Renderer Types
|
|
17
40
|
* @public
|
|
18
41
|
*/
|
|
19
42
|
export declare enum GridTabulatorCellRendererTypes {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid-tabulator.types.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGhF;;;GAGG;AACH,oBAAY,WAAW;CAAG;AA8C1B,oBAAY,kBAAkB;IAC5B,OAAO,kBAAkB;IACzB,KAAK,gBAAgB;CACtB;AAED,eAAO,MAAM,sBAAsB,cAAe,MAAM,WAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"grid-tabulator.types.d.ts","sourceRoot":"","sources":["../../src/grid-tabulator.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAGhF;;;GAGG;AACH,oBAAY,WAAW;CAAG;AA8C1B;;;GAGG;AACH,oBAAY,kBAAkB;IAC5B,OAAO,kBAAkB;IACzB,KAAK,gBAAgB;CACtB;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,cAAe,MAAM,WAA6B,CAAC;AAEtF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,cAAe,MAAM,WAAyB,CAAC;AAExE;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,cAAe,MAAM,YAAY,eAAe,GAAG,CAAC,oDAIhF,CAAC;AAEF;;;GAGG;AACH,oBAAY,8BAA8B;IACxC,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;CAClB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.34.9"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,iDAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../../src/utils/logger.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,MAAM,iDAAiC,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { css } from '@microsoft/fast-element';
|
|
2
2
|
import { tabulatorThemeSimpleCSS } from './tabulator-theme-simple-css';
|
|
3
|
+
/**
|
|
4
|
+
* External styles for the Tabulator grid.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
3
7
|
export const tabulatorExternalStockStyles = css `
|
|
4
8
|
${tabulatorThemeSimpleCSS}
|
|
5
9
|
`;
|
|
@@ -5,6 +5,10 @@ import { foundationGridTabulatorActionRenderer,
|
|
|
5
5
|
// foundationAgTextRenderer,
|
|
6
6
|
} from './cell-renderers';
|
|
7
7
|
import { foundationGridTabulator } from './grid-tabulator';
|
|
8
|
+
/**
|
|
9
|
+
* All `grid-tabulator` components.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
8
12
|
export const foundationGridTabulatorComponents = {
|
|
9
13
|
foundationGridTabulatorActionRenderer,
|
|
10
14
|
// foundationGridProActionsMenuRenderer,
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { formatDateTimestamp, formatDateTimeTimestamp } from '@genesislcap/foundation-utils';
|
|
2
|
+
/**
|
|
3
|
+
* Get the filter type based on the field type.
|
|
4
|
+
* @param type - The field type.
|
|
5
|
+
* @returns The filter type.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
2
8
|
export function getFilterByFieldType(type) {
|
|
3
9
|
switch (type) {
|
|
4
10
|
// case 'int':
|
|
@@ -14,6 +20,12 @@ export function getFilterByFieldType(type) {
|
|
|
14
20
|
return 'agTextColumnFilter';
|
|
15
21
|
}
|
|
16
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the column type based on the metadata type.
|
|
25
|
+
* @param metadataType - The metadata type.
|
|
26
|
+
* @returns The column type.
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
17
29
|
export function getColumnType(metadataType) {
|
|
18
30
|
switch (metadataType === null || metadataType === void 0 ? void 0 : metadataType.toLowerCase()) {
|
|
19
31
|
case 'int':
|
|
@@ -24,6 +36,12 @@ export function getColumnType(metadataType) {
|
|
|
24
36
|
return 'numericColumn';
|
|
25
37
|
}
|
|
26
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Get the filter params based on the field type.
|
|
41
|
+
* @param type - The field type.
|
|
42
|
+
* @returns The filter params.
|
|
43
|
+
* @public
|
|
44
|
+
*/
|
|
27
45
|
export function getFilterParamsByFieldType(type) {
|
|
28
46
|
switch (type) {
|
|
29
47
|
// case FieldTypeEnum.DATE:
|
|
@@ -60,14 +78,34 @@ export function getFilterParamsByFieldType(type) {
|
|
|
60
78
|
}
|
|
61
79
|
}
|
|
62
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Format a date value.
|
|
83
|
+
* @remarks Formats [DATE] UNIX Timestamps (with time) to readable strings
|
|
84
|
+
* @param param - The field type.
|
|
85
|
+
* @returns The filter params.
|
|
86
|
+
* @public
|
|
87
|
+
*/
|
|
63
88
|
export function dateValueFormatter({ value }) {
|
|
64
89
|
return formatDateTimestamp(value);
|
|
65
90
|
}
|
|
91
|
+
/**
|
|
92
|
+
* Format a date time value to a readable string.
|
|
93
|
+
* @remarks Formats [DATETIME] UNIX Timestamps (with time) to readable strings
|
|
94
|
+
* @param param - The field type.
|
|
95
|
+
* @returns The filter params.
|
|
96
|
+
* @public
|
|
97
|
+
*/
|
|
66
98
|
export function dateTimeValueFormatter({ value }) {
|
|
67
99
|
return formatDateTimeTimestamp(value);
|
|
68
100
|
}
|
|
69
101
|
// TODO: possible duplicate - need to evaluate the differences
|
|
70
102
|
const isoDateTimeSliceEnd = 19;
|
|
103
|
+
/**
|
|
104
|
+
* Format am epoch value to a readable ISO date string.
|
|
105
|
+
* @param epoch - The epoch number.
|
|
106
|
+
* @returns The formatted date value.
|
|
107
|
+
* @public
|
|
108
|
+
*/
|
|
71
109
|
export function formatDateExtra(epoch) {
|
|
72
110
|
return new Date(epoch)
|
|
73
111
|
.toISOString()
|
|
@@ -60,6 +60,22 @@ export class GridTabulator extends LifecycleMixin(FoundationElement) {
|
|
|
60
60
|
if (!this.shouldRunDisconnect)
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
+
/**
|
|
64
|
+
* The current grid options.
|
|
65
|
+
* @public
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* ...
|
|
69
|
+
* const options = this.grid.getOptions();
|
|
70
|
+
* logger.debug(options); // { data: [...], columns: [...], filterMode: "local", groupBy: false, ... }
|
|
71
|
+
* ...
|
|
72
|
+
* ```
|
|
73
|
+
* @remarks
|
|
74
|
+
* See https://tabulator.info/docs/6.3/options for more details.
|
|
75
|
+
*/
|
|
76
|
+
get gridOptions() {
|
|
77
|
+
return this.grid.options;
|
|
78
|
+
}
|
|
63
79
|
set gridOptions(options) {
|
|
64
80
|
DOM.queueUpdate(() => {
|
|
65
81
|
this.grid = new Tabulator(this.gridDiv, Object.assign({ rowHeight: this.rowHeight }, options));
|
|
@@ -187,13 +203,21 @@ __decorate([
|
|
|
187
203
|
__decorate([
|
|
188
204
|
attr
|
|
189
205
|
], GridTabulator.prototype, "theme", void 0);
|
|
190
|
-
|
|
206
|
+
/**
|
|
207
|
+
* The grid-tabulator component registration.
|
|
208
|
+
* @public
|
|
209
|
+
* @privateRemarks explicitly declaring for extensibility
|
|
210
|
+
*/
|
|
191
211
|
export const gridTabulatorShadowOptions = undefined;
|
|
212
|
+
/**
|
|
213
|
+
* The default grid-tabulator configuration.
|
|
214
|
+
* @public
|
|
215
|
+
*/
|
|
192
216
|
export const defaultGridTabulatorConfig = {
|
|
193
217
|
shadowOptions: undefined,
|
|
194
218
|
};
|
|
195
219
|
/**
|
|
196
|
-
* The Foundation
|
|
220
|
+
* The Foundation grid-tabulator
|
|
197
221
|
*
|
|
198
222
|
* @alpha
|
|
199
223
|
* @remarks
|
|
@@ -51,20 +51,43 @@ export var GridCSSVars;
|
|
|
51
51
|
// modalOverlayBackgroundColor = '--ag-modal-overlay-background-color',
|
|
52
52
|
// inputFocusBoxShadow = '--ag-input-focus-box-shadow',
|
|
53
53
|
// inputFocusBorderColor = '--ag-input-focus-border-color',
|
|
54
|
+
/**
|
|
55
|
+
* The available `grid-tabulator` themes
|
|
56
|
+
* @public
|
|
57
|
+
*/
|
|
54
58
|
export var GridTabulatorTheme;
|
|
55
59
|
(function (GridTabulatorTheme) {
|
|
56
60
|
GridTabulatorTheme["default"] = "default-theme";
|
|
57
61
|
GridTabulatorTheme["rapid"] = "rapid-theme";
|
|
58
62
|
})(GridTabulatorTheme || (GridTabulatorTheme = {}));
|
|
63
|
+
/**
|
|
64
|
+
* Get the token map class name for the `grid-tabulator` themes
|
|
65
|
+
* @param themeName - The theme name
|
|
66
|
+
* @returns The token map class name for the `grid-tabulator` themes
|
|
67
|
+
* @public
|
|
68
|
+
*/
|
|
59
69
|
export const themeTokenMapClassname = (themeName) => `${themeName}-token-map`;
|
|
70
|
+
/**
|
|
71
|
+
* Get the Fonts ID for the theme's name
|
|
72
|
+
* @param themeName - The theme name
|
|
73
|
+
* @returns The theme's fonts ID
|
|
74
|
+
* @public
|
|
75
|
+
*/
|
|
60
76
|
export const themeFontsId = (themeName) => `${themeName}-fonts`;
|
|
77
|
+
/**
|
|
78
|
+
* Get the CSS for the theme's token map
|
|
79
|
+
* @param themeName - The theme name
|
|
80
|
+
* @param tokenMap - The token map
|
|
81
|
+
* @returns The CSS for the theme's token map
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
61
84
|
export const themeTokenMapCSS = (themeName, tokenMap) => css `
|
|
62
85
|
.${themeTokenMapClassname(themeName)} {
|
|
63
86
|
${new CSSVarsTokenMapper(tokenMap)}
|
|
64
87
|
}
|
|
65
88
|
`;
|
|
66
89
|
/**
|
|
67
|
-
* The available
|
|
90
|
+
* The available `grid-tabulator` Renderer Types
|
|
68
91
|
* @public
|
|
69
92
|
*/
|
|
70
93
|
export var GridTabulatorCellRendererTypes;
|