@ixfx/components 0.10.6 → 0.10.7

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.
Files changed (85) hide show
  1. package/bundle/index.d.ts +8 -2
  2. package/bundle/index.d.ts.map +1 -1
  3. package/bundle/index.js +132 -6
  4. package/bundle/index.js.map +1 -1
  5. package/dist/ac-text.d.ts +1 -1
  6. package/dist/{ac-token--_vCHXWw.d.ts → ac-token-TCLAZeVg.d.ts} +2 -2
  7. package/dist/{ac-token--_vCHXWw.d.ts.map → ac-token-TCLAZeVg.d.ts.map} +1 -1
  8. package/dist/ac-token.d.ts +1 -1
  9. package/dist/{button-BYuf72aR.d.ts → button-CTL45aBl.d.ts} +2 -2
  10. package/dist/{button-BYuf72aR.d.ts.map → button-CTL45aBl.d.ts.map} +1 -1
  11. package/dist/button.d.ts +1 -1
  12. package/dist/colour-picker.d.ts +1 -1
  13. package/dist/crumbs.d.ts +1 -1
  14. package/dist/{data-grid-DE1_gZNk.d.ts → data-grid-BDNjQv3Q.d.ts} +8 -6
  15. package/dist/data-grid-BDNjQv3Q.d.ts.map +1 -0
  16. package/dist/data-grid.d.ts +2 -2
  17. package/dist/data-grid.js +10 -5
  18. package/dist/data-grid.js.map +1 -1
  19. package/dist/{detail-list-CaStSzYN.d.ts → detail-list-BdLuOwQj.d.ts} +4 -4
  20. package/dist/{detail-list-CaStSzYN.d.ts.map → detail-list-BdLuOwQj.d.ts.map} +1 -1
  21. package/dist/detail-list.d.ts +2 -2
  22. package/dist/detail-list.js +49 -1
  23. package/dist/detail-list.js.map +1 -1
  24. package/dist/{grid-list-BJDxBL0x.d.ts → grid-list-DyphX9Fv.d.ts} +2 -2
  25. package/dist/{grid-list-BJDxBL0x.d.ts.map → grid-list-DyphX9Fv.d.ts.map} +1 -1
  26. package/dist/{grid-list-CaMcdpFJ.js → grid-list-k89JpiNy.js} +18 -1
  27. package/dist/grid-list-k89JpiNy.js.map +1 -0
  28. package/dist/grid-list.d.ts +1 -1
  29. package/dist/grid-list.js +1 -1
  30. package/dist/{grouped-item-lister-DETte0Dh.d.ts → grouped-item-lister-Bhyo-dkH.d.ts} +2 -2
  31. package/dist/{grouped-item-lister-DETte0Dh.d.ts.map → grouped-item-lister-Bhyo-dkH.d.ts.map} +1 -1
  32. package/dist/grouped-item-lister.d.ts +1 -1
  33. package/dist/{icon-CDGprSdE.d.ts → icon-DR_3rSyZ.d.ts} +2 -2
  34. package/dist/icon-DR_3rSyZ.d.ts.map +1 -0
  35. package/dist/icons.d.ts +2 -2
  36. package/dist/incr-search.d.ts +1 -1
  37. package/dist/{index-tq6f8007.d.ts → index-BOUaDIW-.d.ts} +2 -2
  38. package/dist/{index-tq6f8007.d.ts.map → index-BOUaDIW-.d.ts.map} +1 -1
  39. package/dist/{index-CoqtMSd9.d.ts → index-BUB5SICW.d.ts} +2 -2
  40. package/dist/{index-CoqtMSd9.d.ts.map → index-BUB5SICW.d.ts.map} +1 -1
  41. package/dist/{index-CsaQwNkz.d.ts → index-BXafRK-_.d.ts} +2 -2
  42. package/dist/{index-CsaQwNkz.d.ts.map → index-BXafRK-_.d.ts.map} +1 -1
  43. package/dist/{index-9AhaHIT2.d.ts → index-C59-JEPl.d.ts} +3 -3
  44. package/dist/{index-9AhaHIT2.d.ts.map → index-C59-JEPl.d.ts.map} +1 -1
  45. package/dist/{index-UvnoZUAo.d.ts → index-CJ5fshD3.d.ts} +2 -2
  46. package/dist/{index-UvnoZUAo.d.ts.map → index-CJ5fshD3.d.ts.map} +1 -1
  47. package/dist/{index-CYndvTWH.d.ts → index-garxxqgV.d.ts} +2 -2
  48. package/dist/{index-CYndvTWH.d.ts.map → index-garxxqgV.d.ts.map} +1 -1
  49. package/dist/index.d.ts +23 -19
  50. package/dist/index.d.ts.map +1 -1
  51. package/dist/index.js +57 -1
  52. package/dist/index.js.map +1 -1
  53. package/dist/{labelled-input-base-DiTme1JO.d.ts → labelled-input-base-Dp_9KP0G.d.ts} +2 -2
  54. package/dist/{labelled-input-base-DiTme1JO.d.ts.map → labelled-input-base-Dp_9KP0G.d.ts.map} +1 -1
  55. package/dist/labelled-radial-input.d.ts +2 -2
  56. package/dist/labelled-radial-input.d.ts.map +1 -1
  57. package/dist/labelled-range-input.d.ts +1 -1
  58. package/dist/labelled-slider-input.d.ts +1 -1
  59. package/dist/{menu-item-CZi9vy5O.d.ts → menu-item-ZmkXNjek.d.ts} +2 -2
  60. package/dist/{menu-item-CZi9vy5O.d.ts.map → menu-item-ZmkXNjek.d.ts.map} +1 -1
  61. package/dist/menu.d.ts +2 -2
  62. package/dist/miller.d.ts +1 -1
  63. package/dist/panel.d.ts +1 -1
  64. package/dist/{split-layout-JK3xWVX2.d.ts → split-layout-C5SYbDrq.d.ts} +2 -2
  65. package/dist/{split-layout-JK3xWVX2.d.ts.map → split-layout-C5SYbDrq.d.ts.map} +1 -1
  66. package/dist/split-layout.d.ts +1 -1
  67. package/dist/{tab-list-pqfKaVAE.d.ts → tab-list-v8mKX7Fu.d.ts} +2 -2
  68. package/dist/{tab-list-pqfKaVAE.d.ts.map → tab-list-v8mKX7Fu.d.ts.map} +1 -1
  69. package/dist/tabs.d.ts +1 -1
  70. package/dist/{titlebar-Tqu-VvMU.d.ts → titlebar-B5zSTZnF.d.ts} +2 -2
  71. package/dist/{titlebar-Tqu-VvMU.d.ts.map → titlebar-B5zSTZnF.d.ts.map} +1 -1
  72. package/dist/titlebar.d.ts +1 -1
  73. package/dist/tree.d.ts +1 -1
  74. package/dist/{vertical-list-DfcNsa4p.d.ts → vertical-list-C03PN6lx.d.ts} +2 -2
  75. package/dist/{vertical-list-DfcNsa4p.d.ts.map → vertical-list-C03PN6lx.d.ts.map} +1 -1
  76. package/dist/vertical-list.d.ts +1 -1
  77. package/docs-user/data-grid.md +2 -1
  78. package/docs-user/detail-list.md +31 -3
  79. package/docs-user/grid-list.md +4 -2
  80. package/docs-user/index.json +2 -2
  81. package/docs-user/multicol-list.md +4 -0
  82. package/package.json +1 -1
  83. package/dist/data-grid-DE1_gZNk.d.ts.map +0 -1
  84. package/dist/grid-list-CaMcdpFJ.js.map +0 -1
  85. package/dist/icon-CDGprSdE.d.ts.map +0 -1
package/dist/ac-text.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import "./icon-CDGprSdE.js";
1
+ import "./icon-DR_3rSyZ.js";
2
2
  import { LitElement, PropertyValues } from "lit";
3
3
  //#region src/ac-text/ac-text.d.ts
4
4
  type AcTextItem = {
@@ -1,4 +1,4 @@
1
- import "./icon-CDGprSdE.js";
1
+ import "./icon-DR_3rSyZ.js";
2
2
  import { r as IDataProvider } from "./data-provider-BAn_-oR1.js";
3
3
  import { LitElement, PropertyValues } from "lit";
4
4
  //#region src/ac-token/types.d.ts
@@ -104,4 +104,4 @@ interface AcTokenElement {
104
104
  }
105
105
  //#endregion
106
106
  export { AcTokenItem as a, AcTokenizerFn as c, AcTokenElementEventMap as i, AcTokensChangeDetail as l, AcTokenAddDetail as n, AcTokenRemoveDetail as o, AcTokenAddEvent as r, AcTokenRemoveEvent as s, AcTokenElement as t, AcTokensChangeEvent as u };
107
- //# sourceMappingURL=ac-token--_vCHXWw.d.ts.map
107
+ //# sourceMappingURL=ac-token-TCLAZeVg.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ac-token--_vCHXWw.d.ts","names":[],"sources":["../src/ac-token/types.ts","../src/ac-token/ac-token.ts"],"mappings":";;;;KAAY;WACD;WACA;WACA;WACA;WACA;WACA,YAAY;;KAGX,iBAAiB;KAEjB;WACD,iBAAiB;;KAEhB,sBAAsB,YAAY;KAElC;WACD,MAAM;WACN;;KAEC,kBAAkB,YAAY;KAE9B;WACD,MAAM;WACN;;KAEC,qBAAqB,YAAY;UAE5B;EACf,mBAAmB;EACnB,gBAAgB;EAChB,mBAAmB;;;;;;;;;;;;;;;;;;;;cCgDR,uBAAuB;;;EAGlC,oBAAoB,sBAAsB;;EAI1C,WAAW;;EAIX;;EAIA;;EAIA;;;;;EAOA;;;;;;EAQA;UAEiB;UACA;UACA;UACA;UAET;;MAqBJ,mBAAmB;MAInB,OAAO,gBAAgB;;;;;;;EAW3B,UAAU,gBAAgB;;MAKtB;EAMK;EAKA;YASU,QAAQ,cAAc;YA6btB,wBAAM;SA+BT,sBAAM;;QAkLhB;YACI;IACR,iBAAiB;;;UAIJ;EACf,oBAAoB,gBAAgB,wBAClC,MAAM,GACN,WAAW,MAAM,gBAAgB,OAAO,uBAAuB,aAC/D,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
1
+ {"version":3,"file":"ac-token-TCLAZeVg.d.ts","names":[],"sources":["../src/ac-token/types.ts","../src/ac-token/ac-token.ts"],"mappings":";;;;KAAY;WACD;WACA;WACA;WACA;WACA;WACA,YAAY;;KAGX,iBAAiB;KAEjB;WACD,iBAAiB;;KAEhB,sBAAsB,YAAY;KAElC;WACD,MAAM;WACN;;KAEC,kBAAkB,YAAY;KAE9B;WACD,MAAM;WACN;;KAEC,qBAAqB,YAAY;UAE5B;EACf,mBAAmB;EACnB,gBAAgB;EAChB,mBAAmB;;;;;;;;;;;;;;;;;;;;cCgDR,uBAAuB;;;EAGlC,oBAAoB,sBAAsB;;EAI1C,WAAW;;EAIX;;EAIA;;EAIA;;;;;EAOA;;;;;;EAQA;UAEiB;UACA;UACA;UACA;UAET;;MAqBJ,mBAAmB;MAInB,OAAO,gBAAgB;;;;;;;EAW3B,UAAU,gBAAgB;;MAKtB;EAMK;EAKA;YASU,QAAQ,cAAc;YA6btB,wBAAM;SA+BT,sBAAM;;QAkLhB;YACI;IACR,iBAAiB;;;UAIJ;EACf,oBAAoB,gBAAgB,wBAClC,MAAM,GACN,WAAW,MAAM,gBAAgB,OAAO,uBAAuB,aAC/D,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
@@ -1,2 +1,2 @@
1
- import { a as AcTokenItem, c as AcTokenizerFn, i as AcTokenElementEventMap, l as AcTokensChangeDetail, n as AcTokenAddDetail, o as AcTokenRemoveDetail, r as AcTokenAddEvent, s as AcTokenRemoveEvent, t as AcTokenElement, u as AcTokensChangeEvent } from "./ac-token--_vCHXWw.js";
1
+ import { a as AcTokenItem, c as AcTokenizerFn, i as AcTokenElementEventMap, l as AcTokensChangeDetail, n as AcTokenAddDetail, o as AcTokenRemoveDetail, r as AcTokenAddEvent, s as AcTokenRemoveEvent, t as AcTokenElement, u as AcTokensChangeEvent } from "./ac-token-TCLAZeVg.js";
2
2
  export { type AcTokenAddDetail, type AcTokenAddEvent, AcTokenElement, type AcTokenElementEventMap, type AcTokenItem, type AcTokenRemoveDetail, type AcTokenRemoveEvent, type AcTokenizerFn, type AcTokensChangeDetail, type AcTokensChangeEvent };
@@ -43,7 +43,7 @@ declare class ButtonElement extends LitElement {
43
43
  * attribute).
44
44
  */
45
45
  value: boolean;
46
- protected _renderIcon(): typeof nothing | import("lit").TemplateResult<1>;
46
+ protected _renderIcon(): import("lit").TemplateResult<1> | typeof nothing;
47
47
  protected render(): import("lit").TemplateResult<1>;
48
48
  static styles: import("lit").CSSResult[];
49
49
  }
@@ -60,4 +60,4 @@ interface ButtonElement {
60
60
  }
61
61
  //#endregion
62
62
  export { ItemsProvider as a, SplitButtonSelectEvent as c, ButtonToggleEvent as i, SwitcherItem as l, ButtonElementEventMap as n, PopupItem as o, ButtonToggleDetail as r, SplitButtonSelectDetail as s, ButtonElement as t };
63
- //# sourceMappingURL=button-BYuf72aR.d.ts.map
63
+ //# sourceMappingURL=button-CTL45aBl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button-BYuf72aR.d.ts","names":[],"sources":["../src/button/types.ts","../src/button/button.ts"],"mappings":";;KAAY;WACD;WACA;;KAGC,yBAAyB,YAAY;KAErC;WACD;WACA;WACA;;KAGC;WACD;WACA;WACA;WACA;;KAGC,sBAAsB,cAAc,QAAQ;KAE5C;WACD;;KAGC,oBAAoB,YAAY;;;cCf/B,sBAAsB;;EAEjC;EAGA;EAGA;EAGA;EAGA;EAGA;;;;;;EAQA;;;;;;EAQA;YAaU,sBAAW,wBAAA;YAcX,wBAAM;SAQT,sBAAM;;QAMP;YACI;IACR,eAAe;;;UAIF;EACf,QAAQ;;UAGO;EACf,oBAAoB,gBAAgB,uBAClC,MAAM,GACN,WAAW,MAAM,eAAe,OAAO,sBAAsB,aAC7D,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
1
+ {"version":3,"file":"button-CTL45aBl.d.ts","names":[],"sources":["../src/button/types.ts","../src/button/button.ts"],"mappings":";;KAAY;WACD;WACA;;KAGC,yBAAyB,YAAY;KAErC;WACD;WACA;WACA;;KAGC;WACD;WACA;WACA;WACA;;KAGC,sBAAsB,cAAc,QAAQ;KAE5C;WACD;;KAGC,oBAAoB,YAAY;;;cCf/B,sBAAsB;;EAEjC;EAGA;EAGA;EAGA;EAGA;EAGA;;;;;;EAQA;;;;;;EAQA;YAaU,6BAAW,2BAAA;YAcX,wBAAM;SAQT,sBAAM;;QAMP;YACI;IACR,eAAe;;;UAIF;EACf,QAAQ;;UAGO;EACf,oBAAoB,gBAAgB,uBAClC,MAAM,GACN,WAAW,MAAM,eAAe,OAAO,sBAAsB,aAC7D,oBAAoB,sCAEpB,cACA,UAAU,oCACV,oBAAoB"}
package/dist/button.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { n as ButtonElementEventMap, t as ButtonElement } from "./button-BYuf72aR.js";
1
+ import { n as ButtonElementEventMap, t as ButtonElement } from "./button-CTL45aBl.js";
2
2
  export { ButtonElement, ButtonElementEventMap };
@@ -1,2 +1,2 @@
1
- import { a as ColourPickerInputEvent, i as ColourPickerEventDetail, n as ColourPicker, o as OklchValue, r as ColourPickerChangeEvent, t as ColourPickerPopup } from "./index-tq6f8007.js";
1
+ import { a as ColourPickerInputEvent, i as ColourPickerEventDetail, n as ColourPicker, o as OklchValue, r as ColourPickerChangeEvent, t as ColourPickerPopup } from "./index-BOUaDIW-.js";
2
2
  export { ColourPicker, type ColourPickerChangeEvent, type ColourPickerEventDetail, type ColourPickerInputEvent, ColourPickerPopup, type OklchValue };
package/dist/crumbs.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { E as TreeSelectEvent, O as TreeTickleEvent, a as TreeComponent, k as TreeDataModel, n as TreeActivateEvent, o as TreeComponentEventMap, x as TreeItemClickEvent, y as TreeExpandEvent } from "./tree-component-DGmKBbpy.js";
2
2
  import { n as TreeExclusivity, o as TreeNode, r as TreeFilterPredicate, s as TreeSelectionFilter, t as LoadChildrenCallback } from "./types-Bc23SI94.js";
3
- import "./menu-item-CZi9vy5O.js";
3
+ import "./menu-item-ZmkXNjek.js";
4
4
  import "./narrowed-text.js";
5
5
  import { LitElement, PropertyValues } from "lit";
6
6
  //#region src/crumbs/crumb-navigation.d.ts
@@ -1,8 +1,8 @@
1
- import "./icon-CDGprSdE.js";
1
+ import "./icon-DR_3rSyZ.js";
2
2
  import { F as ListDragPreviewSourceResolver, P as ListDragPreviewRenderer, R as ListNativeDragStartEvent } from "./tree-component-DGmKBbpy.js";
3
3
  import { n as ListViewportChangeEvent, t as ListViewportChangeDetail } from "./list-viewport-types-BRZsLcvp.js";
4
- import { S as ListSearchController } from "./index-CsaQwNkz.js";
5
- import "./index-9AhaHIT2.js";
4
+ import { S as ListSearchController } from "./index-BXafRK-_.js";
5
+ import "./index-C59-JEPl.js";
6
6
  import "./pan-text-CoYmt2qd.js";
7
7
  import { LitElement } from "lit";
8
8
  import { CommandId, CommandRegistry } from "@clinth/ui-commands";
@@ -14,7 +14,8 @@ type DataGridSortState = {
14
14
  readonly key: string;
15
15
  readonly direction: DataGridSortDirection;
16
16
  } | null;
17
- type DataGridEditorType = `text` | `number` | `boolean` | `select`;
17
+ type DataGridDataType = `text` | `number` | `boolean` | `custom`;
18
+ type DataGridEditorType = `auto` | `select`;
18
19
  type DataGridEditorContext<R = unknown> = {
19
20
  readonly row: R;
20
21
  readonly column: DataGridColumn<R>;
@@ -41,6 +42,7 @@ type DataGridColumn<R = unknown> = {
41
42
  selectable?: boolean;
42
43
  groupable?: boolean;
43
44
  editable?: boolean;
45
+ dataType?: DataGridDataType;
44
46
  editor?: DataGridEditorType | DataGridEditorFactory<R>;
45
47
  editorOptions?: ReadonlyArray<string | {
46
48
  value: string;
@@ -335,5 +337,5 @@ interface DataGridElement {
335
337
  removeEventListener: (<K extends keyof DataGridElementEventMap>(type: K, listener: (this: DataGridElement, event: DataGridElementEventMap[K]) => void, options?: boolean | EventListenerOptions) => void) & ((type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions) => void);
336
338
  }
337
339
  //#endregion
338
- export { DataGridEditorType as A, BuiltInFormatterName as C, DataGridEditability as D, DataGridColumnMenu as E, DataGridSelectionMode as F, DataGridSortDirection as I, DataGridSortState as L, DataGridGroupBy as M, DataGridGroupLabel as N, DataGridEditorContext as O, DataGridInteractionMode as P, GlobalFormatter as R, DataGridViewportChangeEvent as S, DataGridColumn as T, DataGridSelectDetail as _, DataGridColumnReorderDetail as a, DataGridSortEvent as b, DataGridColumnResizeEvent as c, DataGridElement as d, DataGridElementEventMap as f, DataGridRowActivateEvent as g, DataGridRowActivateDetail as h, DataGridCellEditEvent as i, DataGridGetRowKey as j, DataGridEditorFactory as k, DataGridColumnVisibilityDetail as l, DataGridGroupChangeEvent as m, DataGridCellClickEvent as n, DataGridColumnReorderEvent as o, DataGridGroupChangeDetail as p, DataGridCellEditDetail as r, DataGridColumnResizeDetail as s, DataGridCellClickDetail as t, DataGridColumnVisibilityEvent as u, DataGridSelectEvent as v, BuiltInFormatterOptions as w, DataGridViewportChangeDetail as x, DataGridSortDetail as y };
339
- //# sourceMappingURL=data-grid-DE1_gZNk.d.ts.map
340
+ export { DataGridEditorFactory as A, BuiltInFormatterName as C, DataGridDataType as D, DataGridColumnMenu as E, DataGridInteractionMode as F, DataGridSelectionMode as I, DataGridSortDirection as L, DataGridGetRowKey as M, DataGridGroupBy as N, DataGridEditability as O, DataGridGroupLabel as P, DataGridSortState as R, DataGridViewportChangeEvent as S, DataGridColumn as T, DataGridSelectDetail as _, DataGridColumnReorderDetail as a, DataGridSortEvent as b, DataGridColumnResizeEvent as c, DataGridElement as d, DataGridElementEventMap as f, DataGridRowActivateEvent as g, DataGridRowActivateDetail as h, DataGridCellEditEvent as i, DataGridEditorType as j, DataGridEditorContext as k, DataGridColumnVisibilityDetail as l, DataGridGroupChangeEvent as m, DataGridCellClickEvent as n, DataGridColumnReorderEvent as o, DataGridGroupChangeDetail as p, DataGridCellEditDetail as r, DataGridColumnResizeDetail as s, DataGridCellClickDetail as t, DataGridColumnVisibilityEvent as u, DataGridSelectEvent as v, BuiltInFormatterOptions as w, DataGridViewportChangeDetail as x, DataGridSortDetail as y, GlobalFormatter as z };
341
+ //# sourceMappingURL=data-grid-BDNjQv3Q.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"data-grid-BDNjQv3Q.d.ts","names":[],"sources":["../src/data-grid/types.ts","../src/data-grid/data-grid.ts"],"mappings":"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"}
@@ -1,3 +1,3 @@
1
1
  import { I as ListDragSource, L as ListNativeDragStartDetail, M as ListDragPreview, N as ListDragPreviewContext, P as ListDragPreviewRenderer, R as ListNativeDragStartEvent, j as ListDragEntry } from "./tree-component-DGmKBbpy.js";
2
- import { A as DataGridEditorType, C as BuiltInFormatterName, D as DataGridEditability, E as DataGridColumnMenu, F as DataGridSelectionMode, I as DataGridSortDirection, L as DataGridSortState, M as DataGridGroupBy, N as DataGridGroupLabel, O as DataGridEditorContext, P as DataGridInteractionMode, R as GlobalFormatter, S as DataGridViewportChangeEvent, T as DataGridColumn, _ as DataGridSelectDetail, a as DataGridColumnReorderDetail, b as DataGridSortEvent, c as DataGridColumnResizeEvent, d as DataGridElement, f as DataGridElementEventMap, g as DataGridRowActivateEvent, h as DataGridRowActivateDetail, i as DataGridCellEditEvent, j as DataGridGetRowKey, k as DataGridEditorFactory, l as DataGridColumnVisibilityDetail, m as DataGridGroupChangeEvent, n as DataGridCellClickEvent, o as DataGridColumnReorderEvent, p as DataGridGroupChangeDetail, r as DataGridCellEditDetail, s as DataGridColumnResizeDetail, t as DataGridCellClickDetail, u as DataGridColumnVisibilityEvent, v as DataGridSelectEvent, w as BuiltInFormatterOptions, x as DataGridViewportChangeDetail, y as DataGridSortDetail } from "./data-grid-DE1_gZNk.js";
3
- export { type BuiltInFormatterName, type BuiltInFormatterOptions, DataGridCellClickDetail, DataGridCellClickEvent, DataGridCellEditDetail, DataGridCellEditEvent, type DataGridColumn, type DataGridColumnMenu, DataGridColumnReorderDetail, DataGridColumnReorderEvent, DataGridColumnResizeDetail, DataGridColumnResizeEvent, DataGridColumnVisibilityDetail, DataGridColumnVisibilityEvent, type DataGridEditability, type DataGridEditorContext, type DataGridEditorFactory, type DataGridEditorType, DataGridElement, DataGridElementEventMap, type DataGridGetRowKey, type DataGridGroupBy, DataGridGroupChangeDetail, DataGridGroupChangeEvent, type DataGridGroupLabel, type DataGridInteractionMode, DataGridRowActivateDetail, DataGridRowActivateEvent, DataGridSelectDetail, DataGridSelectEvent, type DataGridSelectionMode, DataGridSortDetail, type DataGridSortDirection, DataGridSortEvent, type DataGridSortState, DataGridViewportChangeDetail, DataGridViewportChangeEvent, type GlobalFormatter, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListNativeDragStartDetail, type ListNativeDragStartEvent };
2
+ import { A as DataGridEditorFactory, C as BuiltInFormatterName, D as DataGridDataType, E as DataGridColumnMenu, F as DataGridInteractionMode, I as DataGridSelectionMode, L as DataGridSortDirection, M as DataGridGetRowKey, N as DataGridGroupBy, O as DataGridEditability, P as DataGridGroupLabel, R as DataGridSortState, S as DataGridViewportChangeEvent, T as DataGridColumn, _ as DataGridSelectDetail, a as DataGridColumnReorderDetail, b as DataGridSortEvent, c as DataGridColumnResizeEvent, d as DataGridElement, f as DataGridElementEventMap, g as DataGridRowActivateEvent, h as DataGridRowActivateDetail, i as DataGridCellEditEvent, j as DataGridEditorType, k as DataGridEditorContext, l as DataGridColumnVisibilityDetail, m as DataGridGroupChangeEvent, n as DataGridCellClickEvent, o as DataGridColumnReorderEvent, p as DataGridGroupChangeDetail, r as DataGridCellEditDetail, s as DataGridColumnResizeDetail, t as DataGridCellClickDetail, u as DataGridColumnVisibilityEvent, v as DataGridSelectEvent, w as BuiltInFormatterOptions, x as DataGridViewportChangeDetail, y as DataGridSortDetail, z as GlobalFormatter } from "./data-grid-BDNjQv3Q.js";
3
+ export { type BuiltInFormatterName, type BuiltInFormatterOptions, DataGridCellClickDetail, DataGridCellClickEvent, DataGridCellEditDetail, DataGridCellEditEvent, type DataGridColumn, type DataGridColumnMenu, DataGridColumnReorderDetail, DataGridColumnReorderEvent, DataGridColumnResizeDetail, DataGridColumnResizeEvent, DataGridColumnVisibilityDetail, DataGridColumnVisibilityEvent, type DataGridDataType, type DataGridEditability, type DataGridEditorContext, type DataGridEditorFactory, type DataGridEditorType, DataGridElement, DataGridElementEventMap, type DataGridGetRowKey, type DataGridGroupBy, DataGridGroupChangeDetail, DataGridGroupChangeEvent, type DataGridGroupLabel, type DataGridInteractionMode, DataGridRowActivateDetail, DataGridRowActivateEvent, DataGridSelectDetail, DataGridSelectEvent, type DataGridSelectionMode, DataGridSortDetail, type DataGridSortDirection, DataGridSortEvent, type DataGridSortState, DataGridViewportChangeDetail, DataGridViewportChangeEvent, type GlobalFormatter, type ListDragEntry, type ListDragPreview, type ListDragPreviewContext, type ListDragPreviewRenderer, type ListDragSource, type ListNativeDragStartDetail, type ListNativeDragStartEvent };
package/dist/data-grid.js CHANGED
@@ -263,7 +263,7 @@ let DataGridElement = class DataGridElement extends LitElement {
263
263
  }
264
264
  case ` `: {
265
265
  if (this._editing) {
266
- if (this.columns.find((c) => c.key === this._editing.colKey)?.editor === `boolean`) {
266
+ if ((this.columns.find((c) => c.key === this._editing.colKey)?.dataType ?? `text`) === `boolean`) {
267
267
  e.preventDefault();
268
268
  const isImmediate = this.editability === `immediate`;
269
269
  const rowKey = this._editing.rowKey;
@@ -780,11 +780,13 @@ let DataGridElement = class DataGridElement extends LitElement {
780
780
  if (!col) return rows;
781
781
  const dir = this.sortState.direction === `asc` ? 1 : -1;
782
782
  if (col.sortFn) return rows.sort((a, b) => dir * col.sortFn(a, b));
783
+ const dataType = col.dataType ?? `text`;
783
784
  return rows.sort((a, b) => {
784
785
  const av = a[col.key];
785
786
  const bv = b[col.key];
786
787
  if (av === bv) return 0;
787
- if (typeof av === `number` && typeof bv === `number`) return dir * (av - bv);
788
+ if (dataType === `number`) return dir * (av - bv);
789
+ if (dataType === `boolean`) return dir * (Boolean(av) === Boolean(bv) ? 0 : av ? 1 : -1);
788
790
  return dir * String(av).localeCompare(String(bv));
789
791
  });
790
792
  }
@@ -1161,7 +1163,7 @@ let DataGridElement = class DataGridElement extends LitElement {
1161
1163
  }
1162
1164
  _isTextEditor(col) {
1163
1165
  const e = col.editor;
1164
- return !e || e === `text` || e === `number`;
1166
+ return !e || e === `auto`;
1165
1167
  }
1166
1168
  _isCellEditing(rowKey, colKey) {
1167
1169
  if (this.editability === `immediate` && this._isEditable(this._sortedRows.find((r, i) => this.getRowKey(r, i) === rowKey) ?? {}, this.columns.find((c) => c.key === colKey))) return true;
@@ -1603,7 +1605,8 @@ let DataGridElement = class DataGridElement extends LitElement {
1603
1605
  if (this._isCellEditing(rowKey, col.key)) {
1604
1606
  const immediate = this.editability === `immediate` || this._editingRow === rowKey;
1605
1607
  const curVal = immediate ? val : this._editValue ?? val;
1606
- if (col.editor === `boolean` || col.editor === `boolean`) return html`<div class="cell" data-col=${col.key} style="width:${col.width ?? 150}px;justify-content:center;align-items:center"><input type="checkbox" .checked=${Boolean(curVal)} @change=${(e) => {
1608
+ const effectiveDataType = col.dataType ?? `text`;
1609
+ if (effectiveDataType === `boolean` && (col.editor === `auto` || col.editor === `select` || !col.editor)) return html`<div class="cell" data-col=${col.key} style="width:${col.width ?? 150}px;justify-content:center;align-items:center"><input type="checkbox" .checked=${Boolean(curVal)} @change=${(e) => {
1607
1610
  const v = e.target.checked;
1608
1611
  if (immediate) this._commitImmediate(rowKey, col.key, v);
1609
1612
  else {
@@ -1661,7 +1664,9 @@ let DataGridElement = class DataGridElement extends LitElement {
1661
1664
  };
1662
1665
  return html`<div class="cell" data-col=${col.key} style="width:${col.width ?? 150}px">${factory(ctx)}</div>`;
1663
1666
  }
1664
- return html`<div class="cell" data-col=${col.key} style="width:${col.width ?? 150}px"><input .value=${String(curVal ?? ``)} @input=${(e) => this._editValue = e.target.value} @keydown=${(e) => {
1667
+ const inputType = effectiveDataType === `number` ? `number` : `text`;
1668
+ const inputValue = effectiveDataType === `number` ? String(curVal ?? ``) : String(curVal ?? ``);
1669
+ return html`<div class="cell" data-col=${col.key} style="width:${col.width ?? 150}px"><input type=${inputType} .value=${inputValue} @input=${(e) => this._editValue = e.target.value} @keydown=${(e) => {
1665
1670
  if (e.key === `Enter`) this._commitEdit();
1666
1671
  if (e.key === `Escape`) {
1667
1672
  this._editing = null;