@ni/nimble-components 29.7.9 → 29.8.1

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 (75) hide show
  1. package/dist/all-components-bundle.js +524 -243
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +1925 -1830
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +1 -0
  6. package/dist/esm/all-components.js +1 -0
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/menu-button/testing/menu-button.pageobject.d.ts +12 -0
  9. package/dist/esm/menu-button/testing/menu-button.pageobject.js +26 -0
  10. package/dist/esm/menu-button/testing/menu-button.pageobject.js.map +1 -1
  11. package/dist/esm/patterns/button/styles.js +8 -0
  12. package/dist/esm/patterns/button/styles.js.map +1 -1
  13. package/dist/esm/table/components/header/index.d.ts +2 -1
  14. package/dist/esm/table/components/header/index.js +5 -1
  15. package/dist/esm/table/components/header/index.js.map +1 -1
  16. package/dist/esm/table/components/header/styles.js +10 -3
  17. package/dist/esm/table/components/header/styles.js.map +1 -1
  18. package/dist/esm/table/components/header/template.js +2 -1
  19. package/dist/esm/table/components/header/template.js.map +1 -1
  20. package/dist/esm/table/components/row/index.d.ts +2 -1
  21. package/dist/esm/table/components/row/index.js +14 -0
  22. package/dist/esm/table/components/row/index.js.map +1 -1
  23. package/dist/esm/table/components/row/template.js +9 -0
  24. package/dist/esm/table/components/row/template.js.map +1 -1
  25. package/dist/esm/table/index.d.ts +6 -1
  26. package/dist/esm/table/index.js +40 -1
  27. package/dist/esm/table/index.js.map +1 -1
  28. package/dist/esm/table/models/utilities.d.ts +3 -0
  29. package/dist/esm/table/models/utilities.js +7 -0
  30. package/dist/esm/table/models/utilities.js.map +1 -0
  31. package/dist/esm/table/template.js +8 -0
  32. package/dist/esm/table/template.js.map +1 -1
  33. package/dist/esm/table/types.d.ts +32 -1
  34. package/dist/esm/table/types.js +8 -0
  35. package/dist/esm/table/types.js.map +1 -1
  36. package/dist/esm/table-column/base/cell-view/template.js +9 -1
  37. package/dist/esm/table-column/base/cell-view/template.js.map +1 -1
  38. package/dist/esm/table-column/base/models/column-internals.d.ts +15 -3
  39. package/dist/esm/table-column/base/models/column-internals.js +14 -4
  40. package/dist/esm/table-column/base/models/column-internals.js.map +1 -1
  41. package/dist/esm/table-column/menu-button/cell-view/index.d.ts +32 -0
  42. package/dist/esm/table-column/menu-button/cell-view/index.js +70 -0
  43. package/dist/esm/table-column/menu-button/cell-view/index.js.map +1 -0
  44. package/dist/esm/table-column/menu-button/cell-view/styles.d.ts +1 -0
  45. package/dist/esm/table-column/menu-button/cell-view/styles.js +21 -0
  46. package/dist/esm/table-column/menu-button/cell-view/styles.js.map +1 -0
  47. package/dist/esm/table-column/menu-button/cell-view/templates.d.ts +2 -0
  48. package/dist/esm/table-column/menu-button/cell-view/templates.js +25 -0
  49. package/dist/esm/table-column/menu-button/cell-view/templates.js.map +1 -0
  50. package/dist/esm/table-column/menu-button/index.d.ts +42 -0
  51. package/dist/esm/table-column/menu-button/index.js +68 -0
  52. package/dist/esm/table-column/menu-button/index.js.map +1 -0
  53. package/dist/esm/table-column/menu-button/template.d.ts +2 -0
  54. package/dist/esm/table-column/menu-button/template.js +8 -0
  55. package/dist/esm/table-column/menu-button/template.js.map +1 -0
  56. package/dist/esm/table-column/menu-button/testing/table-column-menu-button.pageobject.d.ts +11 -0
  57. package/dist/esm/table-column/menu-button/testing/table-column-menu-button.pageobject.js +18 -0
  58. package/dist/esm/table-column/menu-button/testing/table-column-menu-button.pageobject.js.map +1 -0
  59. package/dist/esm/table-column/menu-button/types.d.ts +10 -0
  60. package/dist/esm/table-column/menu-button/types.js +3 -0
  61. package/dist/esm/table-column/menu-button/types.js.map +1 -0
  62. package/dist/esm/table-column/number-text/cell-view/index.js +2 -2
  63. package/dist/esm/table-column/number-text/cell-view/index.js.map +1 -1
  64. package/dist/esm/table-column/number-text/index.d.ts +2 -3
  65. package/dist/esm/table-column/number-text/index.js +6 -5
  66. package/dist/esm/table-column/number-text/index.js.map +1 -1
  67. package/dist/esm/table-column/text-base/cell-view/index.d.ts +2 -3
  68. package/dist/esm/table-column/text-base/cell-view/index.js +2 -2
  69. package/dist/esm/table-column/text-base/cell-view/index.js.map +1 -1
  70. package/dist/esm/table-column/text-base/cell-view/template.js +2 -2
  71. package/dist/esm/table-column/text-base/cell-view/template.js.map +1 -1
  72. package/package.json +1 -1
  73. package/dist/esm/table-column/text-base/cell-view/types.d.ts +0 -8
  74. package/dist/esm/table-column/text-base/cell-view/types.js +0 -8
  75. package/dist/esm/table-column/text-base/cell-view/types.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/table/template.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,MAAM,EACN,IAAI,EACP,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAEH,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EAEzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACH,qBAAqB,EACrB,4BAA4B,EAC5B,mBAAmB,EACtB,MAAM,sCAAsC,CAAC;AAE9C,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAO;;;UAGzB,EAAE,CAAC,+DAA+D;;gCAE5C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,CAAC,CAAC,EAAE,CAAC,CAAC;wDACN,CAAC,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE;;yCAE1C,CAAC;qCACL,CAAC;wCACE,WAAW;iCAClB,CAAC;6BACL,CAAC;yBACL,CAAC;;;;;;CAMzB,CAAC","sourcesContent":["import {\n children,\n elements,\n html,\n ref,\n repeat,\n when\n} from '@microsoft/fast-element';\nimport type { VirtualItem } from '@tanstack/virtual-core';\nimport type { Table } from '.';\nimport { tableHeaderTag } from './components/header';\nimport { tableRowTag } from './components/row';\nimport type { TableColumn } from '../table-column/base';\nimport {\n TableActionMenuToggleEventDetail,\n TableColumnSortDirection,\n TableRowSelectionMode,\n TableRowSelectionState,\n TableRowSelectionToggleEventDetail\n} from './types';\nimport { tableGroupRowTag } from './components/group-row';\nimport { buttonTag } from '../button';\nimport { ButtonAppearance } from '../button/types';\nimport { iconTriangleTwoLinesHorizontalTag } from '../icons/triangle-two-lines-horizontal';\nimport { checkboxTag } from '../checkbox';\nimport {\n tableCollapseAllLabel,\n tableRowOperationColumnLabel,\n tableSelectAllLabel\n} from '../label-provider/table/label-tokens';\n\n// prettier-ignore\nexport const template = html<Table>`\n <template\n role=\"treegrid\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"0\"\n aria-multiselectable=\"${x => x.ariaMultiSelectable}\"\n ${children({ property: 'childItems', filter: elements() })}\n >\n <div class=\"table-container ${x => (x.documentShiftKeyDown ? 'disable-select' : '')}\"\n style=\"\n --ni-private-table-scroll-x: -${x => x.scrollX}px;\n --ni-private-table-header-container-margin-right: ${x => x.virtualizer.headerContainerMarginRight}px;\n --ni-private-table-scroll-height: ${x => x.virtualizer.scrollHeight}px;\n --ni-private-table-row-container-top: ${x => x.virtualizer.rowContainerYOffset}px;\n --ni-private-table-row-grid-columns: ${x => (x.rowGridColumns ? x.rowGridColumns : '')};\n --ni-private-table-cursor-override: ${x => (x.layoutManager.isColumnBeingSized ? 'col-resize' : 'default')};\n --ni-private-table-scrollable-min-width: ${x => x.tableScrollableMinWidth}px;\n --ni-private-glass-overlay-pointer-events: ${x => (x.layoutManager.isColumnBeingSized ? 'none' : 'default')};\n \">\n <div class=\"glass-overlay\">\n <div role=\"rowgroup\" class=\"header-row-container\">\n <div class=\"header-row\" role=\"row\">\n <span role=\"${x => (x.showRowOperationColumn ? 'columnheader' : '')}\" class=\"header-row-action-container\" ${ref('headerRowActionContainer')}>\n ${when(x => x.showRowOperationColumn, html<Table>`\n <span class=\"accessibly-hidden\">\n ${x => tableRowOperationColumnLabel.getValueFor(x)}\n </span>\n `)}\n ${when(x => x.selectionMode === TableRowSelectionMode.multiple, html<Table>`\n <span class=\"checkbox-container\">\n <${checkboxTag}\n ${ref('selectionCheckbox')}\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n class=\"${x => `selection-checkbox ${x.selectionMode ? x.selectionMode : ''}`}\"\n @change=\"${(x, c) => x.onAllRowsSelectionChange(c.event as CustomEvent)}\"\n title=\"${x => tableSelectAllLabel.getValueFor(x)}\"\n aria-label=\"${x => tableSelectAllLabel.getValueFor(x)}\"\n >\n </${checkboxTag}>\n </span>\n `)}\n <${buttonTag}\n ${ref('collapseAllButton')}\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n class=\"collapse-all-button ${x => `${x.showCollapseAll ? 'visible' : ''}`}\"\n content-hidden\n appearance=\"${ButtonAppearance.ghost}\"\n title=\"${x => tableCollapseAllLabel.getValueFor(x)}\"\n @click=\"${x => x.handleCollapseAllRows()}\"\n >\n <${iconTriangleTwoLinesHorizontalTag} slot=\"start\"></${iconTriangleTwoLinesHorizontalTag}>\n ${x => tableCollapseAllLabel.getValueFor(x)}\n </${buttonTag}>\n </span>\n <span class=\"column-headers-container\" ${ref('columnHeadersContainer')}>\n ${repeat(x => x.visibleColumns, html<TableColumn, Table>`\n <div class=\"header-container\">\n ${when((_, c) => c.index > 0, html<TableColumn, Table>`\n <div\n class=\"\n column-divider\n left\n ${(_, c) => `${c.parent.layoutManager.activeColumnIndex === c.index ? 'column-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.activeColumnDivider === c.parent.getLeftDividerIndex(c.index) ? 'divider-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.hasResizableColumnToLeft(c.index - 1) ? 'draggable' : ''}`}\n \"\n @mousedown=\"${(_, c) => c.parent.onLeftDividerMouseDown(c.event as MouseEvent, c.index)}\">\n </div>\n `)}\n <${tableHeaderTag}\n class=\"header\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager (if column sorting not disabled) */}\n sort-direction=\"${x => (typeof x.columnInternals.currentSortIndex === 'number' ? x.columnInternals.currentSortDirection : TableColumnSortDirection.none)}\"\n ?first-sorted-column=\"${(x, c) => x === c.parent.firstSortedColumn}\"\n ?indicators-hidden=\"${x => x.columnInternals.hideHeaderIndicators}\"\n @keydown=\"${(x, c) => c.parent.onHeaderKeyDown(x, c.event as KeyboardEvent)}\"\n @click=\"${(x, c) => c.parent.toggleColumnSort(x, (c.event as MouseEvent).shiftKey)}\"\n :isGrouped=${x => (typeof x.columnInternals.groupIndex === 'number' && !x.columnInternals.groupingDisabled)}\n >\n <slot name=\"${x => x.slot}\"></slot>\n </${tableHeaderTag}>\n ${when((_, c) => c.index < c.length - 1, html<TableColumn, Table>`\n <div\n class=\"\n column-divider\n right\n ${(_, c) => `${c.parent.layoutManager.activeColumnIndex === c.index ? 'column-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.activeColumnDivider === c.parent.getRightDividerIndex(c.index) ? 'divider-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.hasResizableColumnToLeft(c.index) ? 'draggable' : ''}`}\n \"\n @mousedown=\"${(_, c) => c.parent.onRightDividerMouseDown(c.event as MouseEvent, c.index)}\">\n </div>\n `)} \n </div>\n `, { positioning: true })}\n <div class=\"header-scrollbar-spacer\"></div>\n </span>\n </div>\n </div>\n <div class=\"table-viewport\" tabindex=\"-1\" ${ref('viewport')}>\n <div class=\"table-scroll\"></div>\n <div class=\"table-row-container ${x => `${x.showCollapseAll ? 'collapse-all-visible' : ''}`}\" ${children({ property: 'rowElements', filter: elements(`${tableRowTag}, ${tableGroupRowTag}`) })}\n role=\"rowgroup\">\n ${when(x => x.columns.length > 0 && x.canRenderRows, html<Table>`\n ${repeat(x => x.virtualizer.visibleItems, html<VirtualItem<HTMLElement>, Table>`\n ${when((x, c) => (c.parent as Table).tableData[x.index]?.isGroupRow, html<VirtualItem<HTMLElement>, Table>`\n <${tableGroupRowTag}\n class=\"group-row\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n :groupRowValue=\"${(x, c) => c.parent.tableData[x.index]?.groupRowValue}\"\n ?expanded=\"${(x, c) => c.parent.tableData[x.index]?.isExpanded}\"\n :nestingLevel=\"${(x, c) => c.parent.tableData[x.index]?.nestingLevel}\"\n :immediateChildCount=\"${(x, c) => c.parent.tableData[x.index]?.immediateChildCount}\"\n :groupColumn=\"${(x, c) => c.parent.tableData[x.index]?.groupColumn}\"\n ?selectable=\"${(_, c) => c.parent.selectionMode === TableRowSelectionMode.multiple}\"\n selection-state=\"${(x, c) => c.parent.tableData[x.index]?.selectionState}\"\n :resolvedRowIndex=\"${x => x.index}\"\n @focusin=\"${(_, c) => c.parent.onRowFocusIn(c.event as FocusEvent)}\"\n @blur=\"${(_, c) => c.parent.onRowBlur(c.event as FocusEvent)}\"\n @group-selection-toggle=\"${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event as CustomEvent<TableRowSelectionToggleEventDetail>)}\"\n @group-expand-toggle=\"${(x, c) => c.parent.handleGroupRowExpanded(x.index, c.event)}\"\n >\n </${tableGroupRowTag}>\n `)}\n ${when((x, c) => !(c.parent as Table).tableData[x.index]?.isGroupRow, html<VirtualItem<HTMLElement>, Table>`\n <${tableRowTag}\n class=\"row\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n record-id=\"${(x, c) => c.parent.tableData[x.index]?.id}\"\n ?selectable=\"${(_, c) => c.parent.selectionMode !== TableRowSelectionMode.none}\"\n ?selected=\"${(x, c) => c.parent.tableData[x.index]?.selectionState === TableRowSelectionState.selected}\"\n ?expanded=\"${(x, c) => c.parent.tableData[x.index]?.isExpanded}\"\n ?hide-selection=\"${(_, c) => c.parent.selectionMode !== TableRowSelectionMode.multiple}\"\n :dataRecord=\"${(x, c) => c.parent.tableData[x.index]?.record}\"\n :columns=\"${(_, c) => c.parent.columns}\"\n :isParentRow=\"${(x, c) => c.parent.tableData[x.index]?.isParentRow}\"\n :nestingLevel=\"${(x, c) => c.parent.tableData[x.index]?.nestingLevel}\"\n ?row-operation-grid-cell-hidden=\"${(_, c) => !c.parent.showRowOperationColumn}\"\n ?loading=\"${(x, c) => c.parent.tableData[x.index]?.isLoadingChildren}\"\n :resolvedRowIndex=\"${x => x.index}\"\n @click=\"${(x, c) => c.parent.onRowClick(x.index, c.event as MouseEvent)}\"\n @focusin=\"${(_, c) => c.parent.onRowFocusIn(c.event as FocusEvent)}\"\n @blur=\"${(_, c) => c.parent.onRowBlur(c.event as FocusEvent)}\"\n @row-selection-toggle=\"${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event as CustomEvent<TableRowSelectionToggleEventDetail>)}\"\n @row-action-menu-beforetoggle=\"${(x, c) => c.parent.onRowActionMenuBeforeToggle(x.index, c.event as CustomEvent<TableActionMenuToggleEventDetail>)}\"\n @row-action-menu-toggle=\"${(_, c) => c.parent.onRowActionMenuToggle(c.event as CustomEvent<TableActionMenuToggleEventDetail>)}\"\n @row-expand-toggle=\"${(x, c) => c.parent.handleRowExpanded(x.index)}\"\n >\n ${when((x, c) => (c.parent as Table).openActionMenuRecordId === (c.parent as Table).tableData[x.index]?.id, html<VirtualItem<HTMLElement>, Table>`\n ${repeat((_, c) => (c.parent as Table).actionMenuSlots, html<string, Table>`\n <slot\n name=\"${x => x}\"\n slot=\"${x => `row-action-menu-${x}`}\">\n </slot>\n `)}\n `)}\n </${tableRowTag}>\n `)}\n `)}\n `)}\n </div>\n </div>\n </div>\n </div>\n </template>\n`;\n"]}
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../src/table/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,MAAM,EACN,IAAI,EACP,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,EAIH,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EAEzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACH,qBAAqB,EACrB,4BAA4B,EAC5B,mBAAmB,EACtB,MAAM,sCAAsC,CAAC;AAE9C,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAO;;;UAGzB,EAAE,CAAC,+DAA+D;;gCAE5C,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,mBAAmB;UAChD,QAAQ,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC;;sCAE5B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC;;4CAE/C,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO;gEACM,CAAC,CAAC,EAAE,CAAC,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EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,EAAE,CAAC,EAAE,IAAI,CAAc;;oDAE1F,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;oDACX,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI;;qCAE1B,CAAC;wCACE,WAAW;iCAClB,CAAC;6BACL,CAAC;yBACL,CAAC;;;;;;CAMzB,CAAC","sourcesContent":["import {\n ExecutionContext,\n children,\n elements,\n html,\n ref,\n repeat,\n when\n} from '@microsoft/fast-element';\nimport type { VirtualItem } from '@tanstack/virtual-core';\nimport type { Table } from '.';\nimport { tableHeaderTag } from './components/header';\nimport { tableRowTag } from './components/row';\nimport type { TableColumn } from '../table-column/base';\nimport {\n RowSlotRequestEventDetail,\n SlotMetadata,\n TableActionMenuToggleEventDetail,\n TableColumnSortDirection,\n TableRowSelectionMode,\n TableRowSelectionState,\n TableRowSelectionToggleEventDetail\n} from './types';\nimport { tableGroupRowTag } from './components/group-row';\nimport { buttonTag } from '../button';\nimport { ButtonAppearance } from '../button/types';\nimport { iconTriangleTwoLinesHorizontalTag } from '../icons/triangle-two-lines-horizontal';\nimport { checkboxTag } from '../checkbox';\nimport {\n tableCollapseAllLabel,\n tableRowOperationColumnLabel,\n tableSelectAllLabel\n} from '../label-provider/table/label-tokens';\n\n// prettier-ignore\nexport const template = html<Table>`\n <template\n role=\"treegrid\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"0\"\n aria-multiselectable=\"${x => x.ariaMultiSelectable}\"\n ${children({ property: 'childItems', filter: elements() })}\n >\n <div class=\"table-container ${x => (x.documentShiftKeyDown ? 'disable-select' : '')}\"\n style=\"\n --ni-private-table-scroll-x: -${x => x.scrollX}px;\n --ni-private-table-header-container-margin-right: ${x => x.virtualizer.headerContainerMarginRight}px;\n --ni-private-table-scroll-height: ${x => x.virtualizer.scrollHeight}px;\n --ni-private-table-row-container-top: ${x => x.virtualizer.rowContainerYOffset}px;\n --ni-private-table-row-grid-columns: ${x => (x.rowGridColumns ? x.rowGridColumns : '')};\n --ni-private-table-cursor-override: ${x => (x.layoutManager.isColumnBeingSized ? 'col-resize' : 'default')};\n --ni-private-table-scrollable-min-width: ${x => x.tableScrollableMinWidth}px;\n --ni-private-glass-overlay-pointer-events: ${x => (x.layoutManager.isColumnBeingSized ? 'none' : 'default')};\n \">\n <div class=\"glass-overlay\">\n <div role=\"rowgroup\" class=\"header-row-container\">\n <div class=\"header-row\" role=\"row\">\n <span role=\"${x => (x.showRowOperationColumn ? 'columnheader' : '')}\" class=\"header-row-action-container\" ${ref('headerRowActionContainer')}>\n ${when(x => x.showRowOperationColumn, html<Table>`\n <span class=\"accessibly-hidden\">\n ${x => tableRowOperationColumnLabel.getValueFor(x)}\n </span>\n `)}\n ${when(x => x.selectionMode === TableRowSelectionMode.multiple, html<Table>`\n <span class=\"checkbox-container\">\n <${checkboxTag}\n ${ref('selectionCheckbox')}\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n class=\"${x => `selection-checkbox ${x.selectionMode ? x.selectionMode : ''}`}\"\n @change=\"${(x, c) => x.onAllRowsSelectionChange(c.event as CustomEvent)}\"\n title=\"${x => tableSelectAllLabel.getValueFor(x)}\"\n aria-label=\"${x => tableSelectAllLabel.getValueFor(x)}\"\n >\n </${checkboxTag}>\n </span>\n `)}\n <${buttonTag}\n ${ref('collapseAllButton')}\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n class=\"collapse-all-button ${x => `${x.showCollapseAll ? 'visible' : ''}`}\"\n content-hidden\n appearance=\"${ButtonAppearance.ghost}\"\n title=\"${x => tableCollapseAllLabel.getValueFor(x)}\"\n @click=\"${x => x.handleCollapseAllRows()}\"\n >\n <${iconTriangleTwoLinesHorizontalTag} slot=\"start\"></${iconTriangleTwoLinesHorizontalTag}>\n ${x => tableCollapseAllLabel.getValueFor(x)}\n </${buttonTag}>\n </span>\n <span class=\"column-headers-container\" ${ref('columnHeadersContainer')}>\n ${repeat(x => x.visibleColumns, html<TableColumn, Table>`\n <div class=\"header-container\">\n ${when((_, c) => c.index > 0, html<TableColumn, Table>`\n <div\n class=\"\n column-divider\n left\n ${(_, c) => `${c.parent.layoutManager.activeColumnIndex === c.index ? 'column-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.activeColumnDivider === c.parent.getLeftDividerIndex(c.index) ? 'divider-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.hasResizableColumnToLeft(c.index - 1) ? 'draggable' : ''}`}\n \"\n @mousedown=\"${(_, c) => c.parent.onLeftDividerMouseDown(c.event as MouseEvent, c.index)}\">\n </div>\n `)}\n <${tableHeaderTag}\n class=\"header\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager (if column sorting not disabled) */}\n sort-direction=\"${x => (typeof x.columnInternals.currentSortIndex === 'number' ? x.columnInternals.currentSortDirection : TableColumnSortDirection.none)}\"\n ?first-sorted-column=\"${(x, c) => x === c.parent.firstSortedColumn}\"\n ?indicators-hidden=\"${x => x.columnInternals.hideHeaderIndicators}\"\n @keydown=\"${(x, c) => c.parent.onHeaderKeyDown(x, c.event as KeyboardEvent)}\"\n @click=\"${(x, c) => c.parent.toggleColumnSort(x, (c.event as MouseEvent).shiftKey)}\"\n :alignment=\"${x => x.columnInternals.headerAlignment}\"\n :isGrouped=${x => (typeof x.columnInternals.groupIndex === 'number' && !x.columnInternals.groupingDisabled)}\n >\n <slot name=\"${x => x.slot}\"></slot>\n </${tableHeaderTag}>\n ${when((_, c) => c.index < c.length - 1, html<TableColumn, Table>`\n <div\n class=\"\n column-divider\n right\n ${(_, c) => `${c.parent.layoutManager.activeColumnIndex === c.index ? 'column-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.activeColumnDivider === c.parent.getRightDividerIndex(c.index) ? 'divider-active' : ''}`}\n ${(_, c) => `${c.parent.layoutManager.hasResizableColumnToLeft(c.index) ? 'draggable' : ''}`}\n \"\n @mousedown=\"${(_, c) => c.parent.onRightDividerMouseDown(c.event as MouseEvent, c.index)}\">\n </div>\n `)} \n </div>\n `, { positioning: true })}\n <div class=\"header-scrollbar-spacer\"></div>\n </span>\n </div>\n </div>\n <div class=\"table-viewport\" tabindex=\"-1\" ${ref('viewport')}>\n <div class=\"table-scroll\"></div>\n <div class=\"table-row-container ${x => `${x.showCollapseAll ? 'collapse-all-visible' : ''}`}\" ${children({ property: 'rowElements', filter: elements(`${tableRowTag}, ${tableGroupRowTag}`) })}\n role=\"rowgroup\">\n ${when(x => x.columns.length > 0 && x.canRenderRows, html<Table>`\n ${repeat(x => x.virtualizer.visibleItems, html<VirtualItem<HTMLElement>, Table>`\n ${when((x, c: ExecutionContext<Table>) => c.parent.tableData[x.index]?.isGroupRow, html<VirtualItem<HTMLElement>, Table>`\n <${tableGroupRowTag}\n class=\"group-row\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n :groupRowValue=\"${(x, c) => c.parent.tableData[x.index]?.groupRowValue}\"\n ?expanded=\"${(x, c) => c.parent.tableData[x.index]?.isExpanded}\"\n :nestingLevel=\"${(x, c) => c.parent.tableData[x.index]?.nestingLevel}\"\n :immediateChildCount=\"${(x, c) => c.parent.tableData[x.index]?.immediateChildCount}\"\n :groupColumn=\"${(x, c) => c.parent.tableData[x.index]?.groupColumn}\"\n ?selectable=\"${(_, c) => c.parent.selectionMode === TableRowSelectionMode.multiple}\"\n selection-state=\"${(x, c) => c.parent.tableData[x.index]?.selectionState}\"\n :resolvedRowIndex=\"${x => x.index}\"\n @focusin=\"${(_, c) => c.parent.onRowFocusIn(c.event as FocusEvent)}\"\n @blur=\"${(_, c) => c.parent.onRowBlur(c.event as FocusEvent)}\"\n @group-selection-toggle=\"${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event as CustomEvent<TableRowSelectionToggleEventDetail>)}\"\n @group-expand-toggle=\"${(x, c) => c.parent.handleGroupRowExpanded(x.index, c.event)}\"\n >\n </${tableGroupRowTag}>\n `)}\n ${when((x, c: ExecutionContext<Table>) => !c.parent.tableData[x.index]?.isGroupRow, html<VirtualItem<HTMLElement>, Table>`\n <${tableRowTag}\n class=\"row\"\n ${'' /* tabindex managed dynamically by KeyboardNavigationManager */}\n tabindex=\"-1\"\n record-id=\"${(x, c) => c.parent.tableData[x.index]?.id}\"\n ?selectable=\"${(_, c) => c.parent.selectionMode !== TableRowSelectionMode.none}\"\n ?selected=\"${(x, c) => c.parent.tableData[x.index]?.selectionState === TableRowSelectionState.selected}\"\n ?expanded=\"${(x, c) => c.parent.tableData[x.index]?.isExpanded}\"\n ?hide-selection=\"${(_, c) => c.parent.selectionMode !== TableRowSelectionMode.multiple}\"\n :dataRecord=\"${(x, c) => c.parent.tableData[x.index]?.record}\"\n :columns=\"${(_, c) => c.parent.columns}\"\n :isParentRow=\"${(x, c) => c.parent.tableData[x.index]?.isParentRow}\"\n :nestingLevel=\"${(x, c) => c.parent.tableData[x.index]?.nestingLevel}\"\n ?row-operation-grid-cell-hidden=\"${(_, c) => !c.parent.showRowOperationColumn}\"\n ?loading=\"${(x, c) => c.parent.tableData[x.index]?.isLoadingChildren}\"\n :resolvedRowIndex=\"${x => x.index}\"\n @click=\"${(x, c) => c.parent.onRowClick(x.index, c.event as MouseEvent)}\"\n @focusin=\"${(_, c) => c.parent.onRowFocusIn(c.event as FocusEvent)}\"\n @blur=\"${(_, c) => c.parent.onRowBlur(c.event as FocusEvent)}\"\n @row-selection-toggle=\"${(x, c) => c.parent.onRowSelectionToggle(x.index, c.event as CustomEvent<TableRowSelectionToggleEventDetail>)}\"\n @row-action-menu-beforetoggle=\"${(x, c) => c.parent.onRowActionMenuBeforeToggle(x.index, c.event as CustomEvent<TableActionMenuToggleEventDetail>)}\"\n @row-action-menu-toggle=\"${(_, c) => c.parent.onRowActionMenuToggle(c.event as CustomEvent<TableActionMenuToggleEventDetail>)}\"\n @row-slots-request=\"${(_, c) => c.parent.onRowSlotsRequest(c.event as CustomEvent<RowSlotRequestEventDetail>)}\"\n @row-expand-toggle=\"${(x, c) => c.parent.handleRowExpanded(x.index)}\"\n >\n ${when((x, c: ExecutionContext<Table>) => c.parent.openActionMenuRecordId === c.parent.tableData[x.index]?.id, html<VirtualItem<HTMLElement>, Table>`\n ${repeat((_, c: ExecutionContext<Table>) => c.parent.actionMenuSlots, html<string, Table>`\n <slot\n name=\"${x => x}\"\n slot=\"${x => `row-action-menu-${x}`}\">\n </slot>\n `)}\n `)}\n ${repeat((x, c: ExecutionContext<Table>) => (c.parent.tableData[x.index]?.slots || []), html<SlotMetadata>`\n <slot\n name=\"${x => x.name}\"\n slot=\"${x => x.slot}\"\n ></slot>\n `)}\n </${tableRowTag}>\n `)}\n `)}\n `)}\n </div>\n </div>\n </div>\n </div>\n </template>\n`;\n"]}
@@ -186,10 +186,20 @@ export interface TableRowState<TData extends TableRecord = TableRecord> {
186
186
  groupColumn?: TableColumn;
187
187
  isParentRow: boolean;
188
188
  isLoadingChildren: boolean;
189
+ slots: SlotMetadata[];
189
190
  resolvedRowIndex?: number;
190
191
  }
191
192
  /**
192
193
  * @internal
194
+ *
195
+ * Alignment of column content
196
+ */
197
+ export declare const TableColumnAlignment: {
198
+ readonly left: "left";
199
+ readonly right: "right";
200
+ };
201
+ export type TableColumnAlignment = (typeof TableColumnAlignment)[keyof typeof TableColumnAlignment];
202
+ /**
193
203
  * Table keyboard focus types
194
204
  */
195
205
  export declare const TableFocusType: {
@@ -205,6 +215,7 @@ export declare const TableFocusType: {
205
215
  export type TableFocusType = (typeof TableFocusType)[keyof typeof TableFocusType];
206
216
  /**
207
217
  * @internal
218
+ *
208
219
  * Focusable elements of a table row
209
220
  */
210
221
  export interface TableRowFocusableElements {
@@ -215,10 +226,30 @@ export interface TableRowFocusableElements {
215
226
  }[];
216
227
  }
217
228
  /**
218
- * @internal
219
229
  * Focusable elements of a table's header
220
230
  */
221
231
  export interface TableHeaderFocusableElements {
222
232
  headerActions: HTMLElement[];
223
233
  columnHeaders: HTMLElement[];
224
234
  }
235
+ /**
236
+ * @internal
237
+ */
238
+ export interface CellViewSlotRequestEventDetail {
239
+ slots: SlotMetadata[];
240
+ }
241
+ /**
242
+ * @internal
243
+ */
244
+ export interface RowSlotRequestEventDetail {
245
+ columnInternalId: string;
246
+ recordId: string;
247
+ slots: SlotMetadata[];
248
+ }
249
+ /**
250
+ * @internal
251
+ */
252
+ export interface SlotMetadata {
253
+ slot: string;
254
+ name: string;
255
+ }
@@ -31,6 +31,14 @@ export const TableRowSelectionState = {
31
31
  };
32
32
  /**
33
33
  * @internal
34
+ *
35
+ * Alignment of column content
36
+ */
37
+ export const TableColumnAlignment = {
38
+ left: 'left',
39
+ right: 'right'
40
+ };
41
+ /**
34
42
  * Table keyboard focus types
35
43
  */
36
44
  export const TableFocusType = {
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/table/types.ts"],"names":[],"mappings":"AAkGA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC5C,IAAI,EAAE,SAAS;IACf,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,kBAAkB;CAC7B,CAAC;AAWX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;CAClB,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACd,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,oBAAoB;CACjC,CAAC;AA2EX;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,GAAG,EAAE,KAAK;IACV,oBAAoB,EAAE,sBAAsB;IAC5C,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;CACpB,CAAC","sourcesContent":["import type { Checkbox } from '../checkbox';\nimport type { MenuButton } from '../menu-button';\nimport type { TableColumn } from '../table-column/base';\nimport type { ValidityObject } from '../utilities/models/validator';\nimport type { TableCell } from './components/cell';\n\n/**\n * TableFieldName describes the type associated with keys within\n * a table's records.\n */\nexport type TableFieldName = string;\n\n/**\n * TableFieldValue describes the type associated with values within\n * a table's records.\n */\nexport type TableFieldValue = string | number | boolean | null | undefined;\n\n/**\n * TableStringFieldValue describes the type associated with values within\n * a table's string records.\n */\nexport type TableStringFieldValue = string | null | undefined;\n\n/**\n * TableBooleanFieldValue describes the type associated with values within\n * a table's boolean records.\n */\nexport type TableBooleanFieldValue = boolean | null | undefined;\n\n/**\n * TableNumberFieldValue describes the type associated with values within\n * a table's number records.\n */\nexport type TableNumberFieldValue = number | null | undefined;\n\n/**\n * TableRecord describes the data structure that backs a single row in a table.\n * It is made up of fields, which are key/value pairs that have a key of type\n * TableFieldName and a value of type TableFieldValue.\n */\nexport interface TableRecord {\n [key: TableFieldName]: TableFieldValue;\n}\n\n/**\n * @internal\n *\n * Describes a hierarchical data structure that is used for\n * the internal representation of the data, and allows us to represent data with\n * parent-child relationships within Tanstack.\n */\nexport interface TableNode<TRecord extends TableRecord = TableRecord> {\n subRows?: TableNode<TRecord>[];\n originalIndex: number;\n clientRecord: TRecord;\n}\n\nexport type TableStringField<FieldName extends TableFieldName> = {\n [name in FieldName]: TableStringFieldValue;\n};\n\nexport type TableBooleanField<FieldName extends TableFieldName> = {\n [name in FieldName]: TableBooleanFieldValue;\n};\n\nexport type TableNumberField<FieldName extends TableFieldName> = {\n [name in FieldName]: TableNumberFieldValue;\n};\n\nexport interface TableValidity extends ValidityObject {\n readonly duplicateRecordId: boolean;\n readonly missingRecordId: boolean;\n readonly invalidRecordId: boolean;\n readonly duplicateColumnId: boolean;\n readonly missingColumnId: boolean;\n readonly duplicateSortIndex: boolean;\n readonly duplicateGroupIndex: boolean;\n readonly idFieldNameNotConfigured: boolean;\n readonly invalidColumnConfiguration: boolean;\n readonly invalidParentIdConfiguration: boolean;\n}\n\n/**\n * The hierarachy options for a record in the table.\n */\nexport interface TableSetRecordHierarchyOptions {\n recordId: string;\n options: TableRecordHierarchyOptions;\n}\n\n/**\n * Describes the hierarchy options that can be configured for a record in the table.\n */\nexport interface TableRecordHierarchyOptions {\n delayedHierarchyState: TableRecordDelayedHierarchyState;\n}\n\nexport const TableRecordDelayedHierarchyState = {\n none: undefined,\n canLoadChildren: 'can-load-children',\n loadingChildren: 'loading-children'\n} as const;\nexport type TableRecordDelayedHierarchyState =\n (typeof TableRecordDelayedHierarchyState)[keyof typeof TableRecordDelayedHierarchyState];\n\nexport interface TableActionMenuToggleEventDetail {\n newState: boolean;\n oldState: boolean;\n recordIds: string[];\n columnId?: string;\n}\n\n/**\n * The possible directions a table column can be sorted in.\n */\nexport const TableColumnSortDirection = {\n none: undefined,\n ascending: 'ascending',\n descending: 'descending'\n} as const;\nexport type TableColumnSortDirection =\n (typeof TableColumnSortDirection)[keyof typeof TableColumnSortDirection];\n\n/**\n * The selection modes of rows in the table.\n */\nexport const TableRowSelectionMode = {\n none: undefined,\n single: 'single',\n multiple: 'multiple'\n} as const;\nexport type TableRowSelectionMode =\n (typeof TableRowSelectionMode)[keyof typeof TableRowSelectionMode];\n\n/**\n * @internal\n *\n * The possible selection states that the table or a table row can be in.\n */\nexport const TableRowSelectionState = {\n notSelected: 'not-selected',\n selected: 'selected',\n partiallySelected: 'partially-selected'\n} as const;\nexport type TableRowSelectionState =\n (typeof TableRowSelectionState)[keyof typeof TableRowSelectionState];\n\n/**\n * @internal\n *\n * Internal event detail type for a row's selection state changing\n */\nexport interface TableRowSelectionToggleEventDetail {\n oldState: boolean;\n newState: boolean;\n}\n\n/**\n * Event detail type for row selection events in the table.\n */\nexport interface TableRowSelectionEventDetail {\n selectedRecordIds: string[];\n}\n\n/**\n * Event detail type for row toggle events in the table.\n */\nexport interface TableRowExpansionToggleEventDetail {\n oldState: boolean;\n newState: boolean;\n recordId: string;\n}\n\n/**\n * Event detail type for interactive column configuration changes.\n *\n * The column-configuration-change event is emitted when a column's configuration\n * is modified programmatically, such as by clicking on the column's header to sort\n * the column. The items in the `columns` array are specified in the same order as\n * the columns are listed in the DOM.\n */\nexport interface TableColumnConfigurationChangeEventDetail {\n columns: TableColumnConfiguration[];\n}\n\n/**\n * A representation of the current configuration of a column within the table.\n */\nexport interface TableColumnConfiguration {\n columnId?: string;\n sortIndex?: number;\n sortDirection: TableColumnSortDirection;\n groupIndex?: number;\n hidden: boolean;\n fractionalWidth: number;\n pixelWidth?: number;\n}\n\n/**\n * @internal\n *\n * Internal representation of a row in the table\n */\nexport interface TableRowState<TData extends TableRecord = TableRecord> {\n record: TData;\n id: string;\n selectionState: TableRowSelectionState;\n isGroupRow: boolean;\n groupRowValue?: unknown;\n isExpanded: boolean;\n nestingLevel?: number;\n immediateChildCount?: number;\n groupColumn?: TableColumn;\n isParentRow: boolean;\n isLoadingChildren: boolean;\n resolvedRowIndex?: number;\n}\n\n/**\n * @internal\n * Table keyboard focus types\n */\nexport const TableFocusType = {\n none: 'none',\n columnHeader: 'columnHeader',\n headerActions: 'headerActions',\n row: 'row',\n rowSelectionCheckbox: 'rowSelectionCheckbox',\n cell: 'cell',\n cellActionMenu: 'cellActionMenu',\n cellContent: 'cellContent'\n} as const;\nexport type TableFocusType =\n (typeof TableFocusType)[keyof typeof TableFocusType];\n\n/**\n * @internal\n * Focusable elements of a table row\n */\nexport interface TableRowFocusableElements {\n selectionCheckbox?: Checkbox;\n cells: {\n cell: TableCell,\n actionMenuButton?: MenuButton\n }[];\n}\n\n/**\n * @internal\n * Focusable elements of a table's header\n */\nexport interface TableHeaderFocusableElements {\n headerActions: HTMLElement[];\n columnHeaders: HTMLElement[];\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/table/types.ts"],"names":[],"mappings":"AAkGA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC5C,IAAI,EAAE,SAAS;IACf,eAAe,EAAE,mBAAmB;IACpC,eAAe,EAAE,kBAAkB;CAC7B,CAAC;AAWX;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC,IAAI,EAAE,SAAS;IACf,SAAS,EAAE,WAAW;IACtB,UAAU,EAAE,YAAY;CAClB,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACd,CAAC;AAIX;;;;GAIG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,WAAW,EAAE,cAAc;IAC3B,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,oBAAoB;CACjC,CAAC;AA4EX;;;;GAIG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAChC,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACR,CAAC;AAIX;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE,cAAc;IAC5B,aAAa,EAAE,eAAe;IAC9B,GAAG,EAAE,KAAK;IACV,oBAAoB,EAAE,sBAAsB;IAC5C,IAAI,EAAE,MAAM;IACZ,cAAc,EAAE,gBAAgB;IAChC,WAAW,EAAE,aAAa;CACpB,CAAC","sourcesContent":["import type { Checkbox } from '../checkbox';\nimport type { MenuButton } from '../menu-button';\nimport type { TableColumn } from '../table-column/base';\nimport type { ValidityObject } from '../utilities/models/validator';\nimport type { TableCell } from './components/cell';\n\n/**\n * TableFieldName describes the type associated with keys within\n * a table's records.\n */\nexport type TableFieldName = string;\n\n/**\n * TableFieldValue describes the type associated with values within\n * a table's records.\n */\nexport type TableFieldValue = string | number | boolean | null | undefined;\n\n/**\n * TableStringFieldValue describes the type associated with values within\n * a table's string records.\n */\nexport type TableStringFieldValue = string | null | undefined;\n\n/**\n * TableBooleanFieldValue describes the type associated with values within\n * a table's boolean records.\n */\nexport type TableBooleanFieldValue = boolean | null | undefined;\n\n/**\n * TableNumberFieldValue describes the type associated with values within\n * a table's number records.\n */\nexport type TableNumberFieldValue = number | null | undefined;\n\n/**\n * TableRecord describes the data structure that backs a single row in a table.\n * It is made up of fields, which are key/value pairs that have a key of type\n * TableFieldName and a value of type TableFieldValue.\n */\nexport interface TableRecord {\n [key: TableFieldName]: TableFieldValue;\n}\n\n/**\n * @internal\n *\n * Describes a hierarchical data structure that is used for\n * the internal representation of the data, and allows us to represent data with\n * parent-child relationships within Tanstack.\n */\nexport interface TableNode<TRecord extends TableRecord = TableRecord> {\n subRows?: TableNode<TRecord>[];\n originalIndex: number;\n clientRecord: TRecord;\n}\n\nexport type TableStringField<FieldName extends TableFieldName> = {\n [name in FieldName]: TableStringFieldValue;\n};\n\nexport type TableBooleanField<FieldName extends TableFieldName> = {\n [name in FieldName]: TableBooleanFieldValue;\n};\n\nexport type TableNumberField<FieldName extends TableFieldName> = {\n [name in FieldName]: TableNumberFieldValue;\n};\n\nexport interface TableValidity extends ValidityObject {\n readonly duplicateRecordId: boolean;\n readonly missingRecordId: boolean;\n readonly invalidRecordId: boolean;\n readonly duplicateColumnId: boolean;\n readonly missingColumnId: boolean;\n readonly duplicateSortIndex: boolean;\n readonly duplicateGroupIndex: boolean;\n readonly idFieldNameNotConfigured: boolean;\n readonly invalidColumnConfiguration: boolean;\n readonly invalidParentIdConfiguration: boolean;\n}\n\n/**\n * The hierarachy options for a record in the table.\n */\nexport interface TableSetRecordHierarchyOptions {\n recordId: string;\n options: TableRecordHierarchyOptions;\n}\n\n/**\n * Describes the hierarchy options that can be configured for a record in the table.\n */\nexport interface TableRecordHierarchyOptions {\n delayedHierarchyState: TableRecordDelayedHierarchyState;\n}\n\nexport const TableRecordDelayedHierarchyState = {\n none: undefined,\n canLoadChildren: 'can-load-children',\n loadingChildren: 'loading-children'\n} as const;\nexport type TableRecordDelayedHierarchyState =\n (typeof TableRecordDelayedHierarchyState)[keyof typeof TableRecordDelayedHierarchyState];\n\nexport interface TableActionMenuToggleEventDetail {\n newState: boolean;\n oldState: boolean;\n recordIds: string[];\n columnId?: string;\n}\n\n/**\n * The possible directions a table column can be sorted in.\n */\nexport const TableColumnSortDirection = {\n none: undefined,\n ascending: 'ascending',\n descending: 'descending'\n} as const;\nexport type TableColumnSortDirection =\n (typeof TableColumnSortDirection)[keyof typeof TableColumnSortDirection];\n\n/**\n * The selection modes of rows in the table.\n */\nexport const TableRowSelectionMode = {\n none: undefined,\n single: 'single',\n multiple: 'multiple'\n} as const;\nexport type TableRowSelectionMode =\n (typeof TableRowSelectionMode)[keyof typeof TableRowSelectionMode];\n\n/**\n * @internal\n *\n * The possible selection states that the table or a table row can be in.\n */\nexport const TableRowSelectionState = {\n notSelected: 'not-selected',\n selected: 'selected',\n partiallySelected: 'partially-selected'\n} as const;\nexport type TableRowSelectionState =\n (typeof TableRowSelectionState)[keyof typeof TableRowSelectionState];\n\n/**\n * @internal\n *\n * Internal event detail type for a row's selection state changing\n */\nexport interface TableRowSelectionToggleEventDetail {\n oldState: boolean;\n newState: boolean;\n}\n\n/**\n * Event detail type for row selection events in the table.\n */\nexport interface TableRowSelectionEventDetail {\n selectedRecordIds: string[];\n}\n\n/**\n * Event detail type for row toggle events in the table.\n */\nexport interface TableRowExpansionToggleEventDetail {\n oldState: boolean;\n newState: boolean;\n recordId: string;\n}\n\n/**\n * Event detail type for interactive column configuration changes.\n *\n * The column-configuration-change event is emitted when a column's configuration\n * is modified programmatically, such as by clicking on the column's header to sort\n * the column. The items in the `columns` array are specified in the same order as\n * the columns are listed in the DOM.\n */\nexport interface TableColumnConfigurationChangeEventDetail {\n columns: TableColumnConfiguration[];\n}\n\n/**\n * A representation of the current configuration of a column within the table.\n */\nexport interface TableColumnConfiguration {\n columnId?: string;\n sortIndex?: number;\n sortDirection: TableColumnSortDirection;\n groupIndex?: number;\n hidden: boolean;\n fractionalWidth: number;\n pixelWidth?: number;\n}\n\n/**\n * @internal\n *\n * Internal representation of a row in the table\n */\nexport interface TableRowState<TData extends TableRecord = TableRecord> {\n record: TData;\n id: string;\n selectionState: TableRowSelectionState;\n isGroupRow: boolean;\n groupRowValue?: unknown;\n isExpanded: boolean;\n nestingLevel?: number;\n immediateChildCount?: number;\n groupColumn?: TableColumn;\n isParentRow: boolean;\n isLoadingChildren: boolean;\n slots: SlotMetadata[];\n resolvedRowIndex?: number;\n}\n\n/**\n * @internal\n *\n * Alignment of column content\n */\nexport const TableColumnAlignment = {\n left: 'left',\n right: 'right'\n} as const;\nexport type TableColumnAlignment =\n (typeof TableColumnAlignment)[keyof typeof TableColumnAlignment];\n\n/**\n * Table keyboard focus types\n */\nexport const TableFocusType = {\n none: 'none',\n columnHeader: 'columnHeader',\n headerActions: 'headerActions',\n row: 'row',\n rowSelectionCheckbox: 'rowSelectionCheckbox',\n cell: 'cell',\n cellActionMenu: 'cellActionMenu',\n cellContent: 'cellContent'\n} as const;\nexport type TableFocusType =\n (typeof TableFocusType)[keyof typeof TableFocusType];\n\n/**\n * @internal\n *\n * Focusable elements of a table row\n */\nexport interface TableRowFocusableElements {\n selectionCheckbox?: Checkbox;\n cells: {\n cell: TableCell,\n actionMenuButton?: MenuButton\n }[];\n}\n\n/**\n * Focusable elements of a table's header\n */\nexport interface TableHeaderFocusableElements {\n headerActions: HTMLElement[];\n columnHeaders: HTMLElement[];\n}\n\n/**\n * @internal\n */\nexport interface CellViewSlotRequestEventDetail {\n slots: SlotMetadata[];\n}\n\n/**\n * @internal\n */\nexport interface RowSlotRequestEventDetail {\n columnInternalId: string;\n recordId: string;\n slots: SlotMetadata[];\n}\n\n/**\n * @internal\n */\nexport interface SlotMetadata {\n slot: string;\n name: string;\n}\n"]}
@@ -1,5 +1,6 @@
1
- import { html } from '@microsoft/fast-element';
1
+ import { html, repeat } from '@microsoft/fast-element';
2
2
  import { TableCellView } from '.';
3
+ import { uniquifySlotNameForColumn } from '../../../table/models/utilities';
3
4
  const validateCellViewTemplate = (cellViewTag) => {
4
5
  let instance;
5
6
  try {
@@ -12,6 +13,7 @@ const validateCellViewTemplate = (cellViewTag) => {
12
13
  throw new Error(`Cell view tag name (${cellViewTag}) must evaluate to an element extending TableCellView`);
13
14
  }
14
15
  };
16
+ // prettier-ignore
15
17
  export const createCellViewTemplate = (cellViewTag) => {
16
18
  validateCellViewTemplate(cellViewTag);
17
19
  return html `
@@ -22,6 +24,12 @@ export const createCellViewTemplate = (cellViewTag) => {
22
24
  :recordId="${y => y.recordId}"
23
25
  class="cell-view"
24
26
  >
27
+ ${repeat(y => y.column?.columnInternals.slotNames || [], html `
28
+ <slot
29
+ name="${(x, c) => uniquifySlotNameForColumn(c.parent.column, x)}"
30
+ slot="${x => x}"
31
+ ></slot>
32
+ `)}
25
33
  </${cellViewTag}>
26
34
  `;
27
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/base/cell-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAElC,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAQ,EAAE;IAC3D,IAAI,QAAQ,CAAC;IACb,IAAI;QACA,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;KAClD;IAAC,OAAO,EAAE,EAAE;QACT,oDAAoD;KACvD;IACD,IAAI,CAAC,CAAC,QAAQ,YAAY,aAAa,CAAC,EAAE;QACtC,MAAM,IAAI,KAAK,CACX,uBAAuB,WAAW,uDAAuD,CAC5F,CAAC;KACL;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAClC,WAAmB,EACI,EAAE;IACzB,wBAAwB,CAAC,WAAW,CAAC,CAAC;IACtC,OAAO,IAAI,CAAW;WACf,WAAW;2BACK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU;6BAC1B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY;uBACpC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;yBACX,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;;;YAG5B,WAAW;KAClB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { type ViewTemplate, html } from '@microsoft/fast-element';\nimport type { TableCell } from '../../../table/components/cell';\nimport { TableCellView } from '.';\n\nconst validateCellViewTemplate = (cellViewTag: string): void => {\n let instance;\n try {\n instance = document.createElement(cellViewTag);\n } catch (ex) {\n // Swallow construction error to report a better one\n }\n if (!(instance instanceof TableCellView)) {\n throw new Error(\n `Cell view tag name (${cellViewTag}) must evaluate to an element extending TableCellView`\n );\n }\n};\n\nexport const createCellViewTemplate = (\n cellViewTag: string\n): ViewTemplate<TableCell> => {\n validateCellViewTemplate(cellViewTag);\n return html<TableCell>`\n <${cellViewTag}\n :cellRecord=\"${y => y.cellState?.cellRecord}\"\n :columnConfig=\"${y => y.cellState?.columnConfig}\"\n :column=\"${y => y.column}\"\n :recordId=\"${y => y.recordId}\"\n class=\"cell-view\"\n >\n </${cellViewTag}>\n `;\n};\n"]}
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/base/cell-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAClC,OAAO,EAAE,yBAAyB,EAAE,MAAM,iCAAiC,CAAC;AAE5E,MAAM,wBAAwB,GAAG,CAAC,WAAmB,EAAQ,EAAE;IAC3D,IAAI,QAAQ,CAAC;IACb,IAAI;QACA,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;KAClD;IAAC,OAAO,EAAE,EAAE;QACT,oDAAoD;KACvD;IACD,IAAI,CAAC,CAAC,QAAQ,YAAY,aAAa,CAAC,EAAE;QACtC,MAAM,IAAI,KAAK,CACX,uBAAuB,WAAW,uDAAuD,CAC5F,CAAC;KACL;AACL,CAAC,CAAC;AAEF,kBAAkB;AAClB,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAClC,WAAmB,EACI,EAAE;IACzB,wBAAwB,CAAC,WAAW,CAAC,CAAC;IACtC,OAAO,IAAI,CAAW;WACf,WAAW;2BACK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,UAAU;6BAC1B,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,YAAY;uBACpC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM;yBACX,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;;;cAG1B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,eAAe,CAAC,SAAS,IAAI,EAAE,EAAE,IAAI,CAAmB;;4BAEhE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,yBAAyB,CAAC,CAAC,CAAC,MAAM,CAAC,MAAO,EAAE,CAAC,CAAC;4BACxD,CAAC,CAAC,EAAE,CAAC,CAAC;;aAErB,CAAC;YACF,WAAW;KAClB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { type ViewTemplate, html, repeat } from '@microsoft/fast-element';\nimport type { TableCell } from '../../../table/components/cell';\nimport { TableCellView } from '.';\nimport { uniquifySlotNameForColumn } from '../../../table/models/utilities';\n\nconst validateCellViewTemplate = (cellViewTag: string): void => {\n let instance;\n try {\n instance = document.createElement(cellViewTag);\n } catch (ex) {\n // Swallow construction error to report a better one\n }\n if (!(instance instanceof TableCellView)) {\n throw new Error(\n `Cell view tag name (${cellViewTag}) must evaluate to an element extending TableCellView`\n );\n }\n};\n\n// prettier-ignore\nexport const createCellViewTemplate = (\n cellViewTag: string\n): ViewTemplate<TableCell> => {\n validateCellViewTemplate(cellViewTag);\n return html<TableCell>`\n <${cellViewTag}\n :cellRecord=\"${y => y.cellState?.cellRecord}\"\n :columnConfig=\"${y => y.cellState?.columnConfig}\"\n :column=\"${y => y.column}\"\n :recordId=\"${y => y.recordId}\"\n class=\"cell-view\"\n >\n ${repeat(y => y.column?.columnInternals.slotNames || [], html<string, TableCell>`\n <slot\n name=\"${(x, c) => uniquifySlotNameForColumn(c.parent.column!, x)}\"\n slot=\"${x => x}\"\n ></slot>\n `)}\n </${cellViewTag}>\n `;\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { ViewTemplate } from '@microsoft/fast-element';
2
- import { TableColumnSortDirection, TableFieldName } from '../../../table/types';
2
+ import { TableColumnAlignment, TableColumnSortDirection, TableFieldName } from '../../../table/types';
3
3
  import type { TableCell } from '../../../table/components/cell';
4
4
  import { TableColumnSortOperation } from '../types';
5
5
  import type { TableGroupRow } from '../../../table/components/group-row';
@@ -19,11 +19,15 @@ export interface ColumnInternalsOptions<TColumnValidator extends ColumnValidator
19
19
  * The tag to use to render the group header content for a column.
20
20
  * The element this tag refers to must derive from TableGroupHeaderView.
21
21
  */
22
- readonly groupHeaderViewTag: string;
22
+ readonly groupHeaderViewTag?: string;
23
23
  /**
24
24
  * The names of events that should be delegated from the cell view to the column.
25
25
  */
26
26
  readonly delegatedEvents: readonly string[];
27
+ /**
28
+ * The names of slots that need to be forwarded into a cell.
29
+ */
30
+ readonly slotNames?: readonly string[];
27
31
  /**
28
32
  * The sort operation to use for the column (defaults to TableColumnSortOperation.basic)
29
33
  */
@@ -54,6 +58,10 @@ export declare class ColumnInternals<TColumnConfig, TColumnValidator extends Col
54
58
  * The names of events that should be delegated from the cell view to the column.
55
59
  */
56
60
  readonly delegatedEvents: readonly string[];
61
+ /**
62
+ * The names of slots that need to be forwarded into a cell.
63
+ */
64
+ readonly slotNames: readonly string[];
57
65
  /**
58
66
  * The relevant, static configuration a column requires its cell view to have access to.
59
67
  */
@@ -74,7 +82,7 @@ export declare class ColumnInternals<TColumnConfig, TColumnValidator extends Col
74
82
  /**
75
83
  * Template for the group header view
76
84
  */
77
- readonly groupHeaderViewTemplate: ViewTemplate<TableGroupRow>;
85
+ readonly groupHeaderViewTemplate?: ViewTemplate<TableGroupRow>;
78
86
  /**
79
87
  * Whether or not this column can be used to group rows by
80
88
  */
@@ -107,6 +115,10 @@ export declare class ColumnInternals<TColumnConfig, TColumnValidator extends Col
107
115
  * when the column is grouped or sorted.
108
116
  */
109
117
  hideHeaderIndicators: boolean;
118
+ /**
119
+ * How to align the header content.
120
+ */
121
+ headerAlignment: TableColumnAlignment;
110
122
  /**
111
123
  * @internal Do not write to this value directly. It is used by the Table in order to store
112
124
  * the resolved value of the fractionalWidth after updates programmatic or interactive updates.
@@ -1,7 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { uniqueId } from '@microsoft/fast-web-utilities';
3
3
  import { observable } from '@microsoft/fast-element';
4
- import { TableColumnSortDirection } from '../../../table/types';
4
+ import { TableColumnAlignment, TableColumnSortDirection } from '../../../table/types';
5
5
  import { TableColumnSortOperation, defaultFractionalWidth, defaultMinPixelWidth } from '../types';
6
6
  import { createGroupHeaderViewTemplate } from '../group-header-view/template';
7
7
  import { createCellViewTemplate } from '../cell-view/template';
@@ -27,7 +27,7 @@ export class ColumnInternals {
27
27
  /**
28
28
  * Whether or not this column can be used to group rows by
29
29
  */
30
- this.groupingDisabled = false;
30
+ this.groupingDisabled = true;
31
31
  /**
32
32
  * Used by column plugins to size a column proportionally to the available
33
33
  * width of a row. Sets currentFractionalWidth when changed.
@@ -46,6 +46,10 @@ export class ColumnInternals {
46
46
  * when the column is grouped or sorted.
47
47
  */
48
48
  this.hideHeaderIndicators = false;
49
+ /**
50
+ * How to align the header content.
51
+ */
52
+ this.headerAlignment = TableColumnAlignment.left;
49
53
  /**
50
54
  * @internal Do not write to this value directly. It is used by the Table in order to store
51
55
  * the resolved value of the fractionalWidth after updates programmatic or interactive updates.
@@ -54,7 +58,7 @@ export class ColumnInternals {
54
58
  /**
55
59
  * Whether or not this column can be sorted
56
60
  */
57
- this.sortingDisabled = false;
61
+ this.sortingDisabled = true;
58
62
  /**
59
63
  * @internal Do not write to this value directly. It is used by the Table in order to store
60
64
  * the resolved value of the sortDirection after programmatic or interactive updates.
@@ -62,8 +66,11 @@ export class ColumnInternals {
62
66
  this.currentSortDirection = TableColumnSortDirection.none;
63
67
  this.cellRecordFieldNames = options.cellRecordFieldNames;
64
68
  this.cellViewTemplate = createCellViewTemplate(options.cellViewTag);
65
- this.groupHeaderViewTemplate = createGroupHeaderViewTemplate(options.groupHeaderViewTag);
69
+ if (options.groupHeaderViewTag) {
70
+ this.groupHeaderViewTemplate = createGroupHeaderViewTemplate(options.groupHeaderViewTag);
71
+ }
66
72
  this.delegatedEvents = options.delegatedEvents;
73
+ this.slotNames = options.slotNames ?? [];
67
74
  this.sortOperation = options.sortOperation ?? TableColumnSortOperation.basic;
68
75
  this.validator = options.validator;
69
76
  }
@@ -107,6 +114,9 @@ __decorate([
107
114
  __decorate([
108
115
  observable
109
116
  ], ColumnInternals.prototype, "hideHeaderIndicators", void 0);
117
+ __decorate([
118
+ observable
119
+ ], ColumnInternals.prototype, "headerAlignment", void 0);
110
120
  __decorate([
111
121
  observable
112
122
  ], ColumnInternals.prototype, "currentFractionalWidth", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"column-internals.js","sourceRoot":"","sources":["../../../../../src/table-column/base/models/column-internals.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAgB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAkB,MAAM,sB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AC,SAAS,CAAC;IACvC,CAAC;IAES,sBAAsB;QAC5B,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,eAAe,CAAC;IACvD,CAAC;IAES,iBAAiB;QACvB,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,UAAU,CAAC;IAC7C,CAAC;CACJ;AA9HU;IADN,UAAU;qDACyB;AAM7B;IADN,UAAU;mEACwC;AAM5C;IADN,UAAU;sDACqE;AAOzE;IADN,UAAU;6DAC+D;AAWnE;IADN,UAAU;yDACqB;AAQzB;IADN,UAAU;mDACgB;AAMpB;IADN,UAAU;mDACgB;AAOpB;IADN,UAAU;wDACqC;AAMzC;IADN,UAAU;sDACiC;AAMrC;IADN,UAAU;yDACqB;AAOzB;IADN,UAAU;6DACyB;AAO7B;IADN,UAAU;+DAC4C;AAOhD;IADN,UAAU;0DACuB;AAM3B;IADN,UAAU;wDACoB;AAOxB;IADN,UAAU;yDACsB;AAO1B;IADN,UAAU;6DAC2E;AAwB1F,MAAM,UAAU,yBAAyB,CACrC,eAAuB,EACvB,GAAG,IAA6D;IAEhE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACpB,IAAI,eAAe,KAAK,GAAG,EAAE;YACzB,OAAO,IAAI,CAAC;SACf;KACJ;IACD,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["import { uniqueId } from '@microsoft/fast-web-utilities';\nimport { ViewTemplate, observable } from '@microsoft/fast-element';\nimport { TableColumnSortDirection, TableFieldName } from '../../../table/types';\nimport type { TableCell } from '../../../table/components/cell';\nimport {\n TableColumnSortOperation,\n defaultFractionalWidth,\n defaultMinPixelWidth\n} from '../types';\nimport type { TableGroupRow } from '../../../table/components/group-row';\nimport { createGroupHeaderViewTemplate } from '../group-header-view/template';\nimport { createCellViewTemplate } from '../cell-view/template';\nimport type { ColumnValidator } from './column-validator';\n\nexport interface ColumnInternalsOptions<\n TColumnValidator extends ColumnValidator<[]> = ColumnValidator<[]>\n> {\n /**\n * The tag (element name) of the custom element that renders the cell content for the column.\n * That element should derive from TableCellView<TCellRecord, TColumnConfig>.\n */\n readonly cellViewTag: string;\n\n /**\n * The names of the fields that should be present in TCellRecord.\n * This array is parallel with the field names specified by `dataRecordFieldNames`.\n */\n readonly cellRecordFieldNames: readonly TableFieldName[];\n\n /**\n * The tag to use to render the group header content for a column.\n * The element this tag refers to must derive from TableGroupHeaderView.\n */\n readonly groupHeaderViewTag: string;\n\n /**\n * The names of events that should be delegated from the cell view to the column.\n */\n readonly delegatedEvents: readonly string[];\n\n /**\n * The sort operation to use for the column (defaults to TableColumnSortOperation.basic)\n */\n readonly sortOperation?: TableColumnSortOperation;\n\n /**\n * The validator for the column\n */\n readonly validator: TColumnValidator;\n}\n\n/**\n * Internal column state configured by plugin authors\n * @internal\n */\nexport class ColumnInternals<\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]>\n> {\n /**\n * @see ColumnInternalsOptions.cellRecordFieldNames\n */\n public readonly cellRecordFieldNames: readonly TableFieldName[];\n\n /**\n * A unique id used internally in the table to identify specific column instances\n */\n public readonly uniqueId = uniqueId('table-column-slot');\n\n /**\n * Template for the cell view\n */\n public readonly cellViewTemplate: ViewTemplate<TableCell>;\n\n /**\n * The names of events that should be delegated from the cell view to the column.\n */\n public readonly delegatedEvents: readonly string[];\n\n /**\n * The relevant, static configuration a column requires its cell view to have access to.\n */\n @observable\n public columnConfig?: TColumnConfig;\n\n /**\n * The name of the data field that will be used for operations on the table, such as sorting and grouping.\n */\n @observable\n public operandDataRecordFieldName?: TableFieldName;\n\n /**\n * The operation to use when sorting the table by this column.\n */\n @observable\n public sortOperation: TableColumnSortOperation = TableColumnSortOperation.basic;\n\n /**\n * The names of the fields from the row's record that correlate to the data that will be in TCellRecord.\n * This array is parallel with the field names specified by `cellRecordFieldNames`.\n */\n @observable\n public dataRecordFieldNames: readonly (TableFieldName | undefined)[] = [];\n\n /**\n * Template for the group header view\n */\n public readonly groupHeaderViewTemplate: ViewTemplate<TableGroupRow>;\n\n /**\n * Whether or not this column can be used to group rows by\n */\n @observable\n public groupingDisabled = false;\n\n /**\n * Specifies the grouping precedence of the column within the set of all columns participating in grouping.\n * Columns are rendered in the grouping tree from lowest group-index as the tree root to highest\n * group-index as tree leaves.\n */\n @observable\n public groupIndex?: number;\n\n /**\n * Used by column plugins to set a specific pixel width. Sets currentPixelWidth when changed.\n */\n @observable\n public pixelWidth?: number;\n\n /**\n * Used by column plugins to size a column proportionally to the available\n * width of a row. Sets currentFractionalWidth when changed.\n */\n @observable\n public fractionalWidth = defaultFractionalWidth;\n\n /**\n * The minimum size in pixels according to the design doc\n */\n @observable\n public minPixelWidth = defaultMinPixelWidth;\n\n /**\n * Whether or not resizing the column has been disabled.\n */\n @observable\n public resizingDisabled = false;\n\n /**\n * Whether or not the grouping and sorting indicators should be hidden in the column header\n * when the column is grouped or sorted.\n */\n @observable\n public hideHeaderIndicators = false;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the fractionalWidth after updates programmatic or interactive updates.\n */\n @observable\n public currentFractionalWidth = defaultFractionalWidth;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the pixelWidth after programmatic or interactive updates.\n */\n @observable\n public currentPixelWidth?: number;\n\n /**\n * Whether or not this column can be sorted\n */\n @observable\n public sortingDisabled = false;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the sortIndex after programmatic or interactive updates.\n */\n @observable\n public currentSortIndex?: number;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the sortDirection after programmatic or interactive updates.\n */\n @observable\n public currentSortDirection: TableColumnSortDirection = TableColumnSortDirection.none;\n\n public readonly validator: TColumnValidator;\n\n public constructor(options: ColumnInternalsOptions<TColumnValidator>) {\n this.cellRecordFieldNames = options.cellRecordFieldNames;\n this.cellViewTemplate = createCellViewTemplate(options.cellViewTag);\n this.groupHeaderViewTemplate = createGroupHeaderViewTemplate(\n options.groupHeaderViewTag\n );\n this.delegatedEvents = options.delegatedEvents;\n this.sortOperation = options.sortOperation ?? TableColumnSortOperation.basic;\n this.validator = options.validator;\n }\n\n protected fractionalWidthChanged(): void {\n this.currentFractionalWidth = this.fractionalWidth;\n }\n\n protected pixelWidthChanged(): void {\n this.currentPixelWidth = this.pixelWidth;\n }\n}\n\nexport function isColumnInternalsProperty(\n changedProperty: string,\n ...args: (keyof ColumnInternals<unknown, ColumnValidator<[]>>)[]\n): boolean {\n for (const arg of args) {\n if (changedProperty === arg) {\n return true;\n }\n }\n return false;\n}\n"]}
1
+ {"version":3,"file":"column-internals.js","sourceRoot":"","sources":["../../../../../src/table-column/base/models/column-internals.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AACzD,OAAO,EAAgB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACH,oBAAoB,EACpB,wBAAwB,EAE3B,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACH,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACvB,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,6BAA6B,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AA6C/D;;;GAGG;AACH,MAAM,OAAO,eAAe;IAmJxB,YAAmB,OAAiD;QA1IpE;;WAEG;QACa,aAAQ,GAAG,QAAQ,CAAC,mBAAmB,CAAC,CAAC;QA6BzD;;WAEG;QAEI,kBAAa,GAA6B,wBAAwB,CAAC,KAAK,CAAC;QAEhF;;;WAGG;QAEI,yBAAoB,GAA4C,EAAE,CAAC;QAO1E;;WAEG;QAEI,qBAAgB,GAAG,IAAI,CAAC;QAgB/B;;;WAGG;QAEI,oBAAe,GAAG,sBAAsB,CAAC;QAEhD;;WAEG;QAEI,kBAAa,GAAG,oBAAoB,CAAC;QAE5C;;WAEG;QAEI,qBAAgB,GAAG,KAAK,CAAC;QA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N,UAAU;6DACyB;AAM7B;IADN,UAAU;wDAC8D;AAOlE;IADN,UAAU;+DAC4C;AAOhD;IADN,UAAU;0DACuB;AAM3B;IADN,UAAU;wDACmB;AAOvB;IADN,UAAU;yDACsB;AAO1B;IADN,UAAU;6DAC2E;AA2B1F,MAAM,UAAU,yBAAyB,CACrC,eAAuB,EACvB,GAAG,IAA6D;IAEhE,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE;QACpB,IAAI,eAAe,KAAK,GAAG,EAAE;YACzB,OAAO,IAAI,CAAC;SACf;KACJ;IACD,OAAO,KAAK,CAAC;AACjB,CAAC","sourcesContent":["import { uniqueId } from '@microsoft/fast-web-utilities';\nimport { ViewTemplate, observable } from '@microsoft/fast-element';\nimport {\n TableColumnAlignment,\n TableColumnSortDirection,\n TableFieldName\n} from '../../../table/types';\nimport type { TableCell } from '../../../table/components/cell';\nimport {\n TableColumnSortOperation,\n defaultFractionalWidth,\n defaultMinPixelWidth\n} from '../types';\nimport type { TableGroupRow } from '../../../table/components/group-row';\nimport { createGroupHeaderViewTemplate } from '../group-header-view/template';\nimport { createCellViewTemplate } from '../cell-view/template';\nimport type { ColumnValidator } from './column-validator';\n\nexport interface ColumnInternalsOptions<\n TColumnValidator extends ColumnValidator<[]> = ColumnValidator<[]>\n> {\n /**\n * The tag (element name) of the custom element that renders the cell content for the column.\n * That element should derive from TableCellView<TCellRecord, TColumnConfig>.\n */\n readonly cellViewTag: string;\n\n /**\n * The names of the fields that should be present in TCellRecord.\n * This array is parallel with the field names specified by `dataRecordFieldNames`.\n */\n readonly cellRecordFieldNames: readonly TableFieldName[];\n\n /**\n * The tag to use to render the group header content for a column.\n * The element this tag refers to must derive from TableGroupHeaderView.\n */\n readonly groupHeaderViewTag?: string;\n\n /**\n * The names of events that should be delegated from the cell view to the column.\n */\n readonly delegatedEvents: readonly string[];\n\n /**\n * The names of slots that need to be forwarded into a cell.\n */\n readonly slotNames?: readonly string[];\n\n /**\n * The sort operation to use for the column (defaults to TableColumnSortOperation.basic)\n */\n readonly sortOperation?: TableColumnSortOperation;\n\n /**\n * The validator for the column\n */\n readonly validator: TColumnValidator;\n}\n\n/**\n * Internal column state configured by plugin authors\n * @internal\n */\nexport class ColumnInternals<\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]>\n> {\n /**\n * @see ColumnInternalsOptions.cellRecordFieldNames\n */\n public readonly cellRecordFieldNames: readonly TableFieldName[];\n\n /**\n * A unique id used internally in the table to identify specific column instances\n */\n public readonly uniqueId = uniqueId('table-column-slot');\n\n /**\n * Template for the cell view\n */\n public readonly cellViewTemplate: ViewTemplate<TableCell>;\n\n /**\n * The names of events that should be delegated from the cell view to the column.\n */\n public readonly delegatedEvents: readonly string[];\n\n /**\n * The names of slots that need to be forwarded into a cell.\n */\n public readonly slotNames: readonly string[];\n\n /**\n * The relevant, static configuration a column requires its cell view to have access to.\n */\n @observable\n public columnConfig?: TColumnConfig;\n\n /**\n * The name of the data field that will be used for operations on the table, such as sorting and grouping.\n */\n @observable\n public operandDataRecordFieldName?: TableFieldName;\n\n /**\n * The operation to use when sorting the table by this column.\n */\n @observable\n public sortOperation: TableColumnSortOperation = TableColumnSortOperation.basic;\n\n /**\n * The names of the fields from the row's record that correlate to the data that will be in TCellRecord.\n * This array is parallel with the field names specified by `cellRecordFieldNames`.\n */\n @observable\n public dataRecordFieldNames: readonly (TableFieldName | undefined)[] = [];\n\n /**\n * Template for the group header view\n */\n public readonly groupHeaderViewTemplate?: ViewTemplate<TableGroupRow>;\n\n /**\n * Whether or not this column can be used to group rows by\n */\n @observable\n public groupingDisabled = true;\n\n /**\n * Specifies the grouping precedence of the column within the set of all columns participating in grouping.\n * Columns are rendered in the grouping tree from lowest group-index as the tree root to highest\n * group-index as tree leaves.\n */\n @observable\n public groupIndex?: number;\n\n /**\n * Used by column plugins to set a specific pixel width. Sets currentPixelWidth when changed.\n */\n @observable\n public pixelWidth?: number;\n\n /**\n * Used by column plugins to size a column proportionally to the available\n * width of a row. Sets currentFractionalWidth when changed.\n */\n @observable\n public fractionalWidth = defaultFractionalWidth;\n\n /**\n * The minimum size in pixels according to the design doc\n */\n @observable\n public minPixelWidth = defaultMinPixelWidth;\n\n /**\n * Whether or not resizing the column has been disabled.\n */\n @observable\n public resizingDisabled = false;\n\n /**\n * Whether or not the grouping and sorting indicators should be hidden in the column header\n * when the column is grouped or sorted.\n */\n @observable\n public hideHeaderIndicators = false;\n\n /**\n * How to align the header content.\n */\n @observable\n public headerAlignment: TableColumnAlignment = TableColumnAlignment.left;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the fractionalWidth after updates programmatic or interactive updates.\n */\n @observable\n public currentFractionalWidth = defaultFractionalWidth;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the pixelWidth after programmatic or interactive updates.\n */\n @observable\n public currentPixelWidth?: number;\n\n /**\n * Whether or not this column can be sorted\n */\n @observable\n public sortingDisabled = true;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the sortIndex after programmatic or interactive updates.\n */\n @observable\n public currentSortIndex?: number;\n\n /**\n * @internal Do not write to this value directly. It is used by the Table in order to store\n * the resolved value of the sortDirection after programmatic or interactive updates.\n */\n @observable\n public currentSortDirection: TableColumnSortDirection = TableColumnSortDirection.none;\n\n public readonly validator: TColumnValidator;\n\n public constructor(options: ColumnInternalsOptions<TColumnValidator>) {\n this.cellRecordFieldNames = options.cellRecordFieldNames;\n this.cellViewTemplate = createCellViewTemplate(options.cellViewTag);\n if (options.groupHeaderViewTag) {\n this.groupHeaderViewTemplate = createGroupHeaderViewTemplate(\n options.groupHeaderViewTag\n );\n }\n this.delegatedEvents = options.delegatedEvents;\n this.slotNames = options.slotNames ?? [];\n this.sortOperation = options.sortOperation ?? TableColumnSortOperation.basic;\n this.validator = options.validator;\n }\n\n protected fractionalWidthChanged(): void {\n this.currentFractionalWidth = this.fractionalWidth;\n }\n\n protected pixelWidthChanged(): void {\n this.currentPixelWidth = this.pixelWidth;\n }\n}\n\nexport function isColumnInternalsProperty(\n changedProperty: string,\n ...args: (keyof ColumnInternals<unknown, ColumnValidator<[]>>)[]\n): boolean {\n for (const arg of args) {\n if (changedProperty === arg) {\n return true;\n }\n }\n return false;\n}\n"]}
@@ -0,0 +1,32 @@
1
+ import { TableCellView } from '../../base/cell-view';
2
+ import type { TableColumnMenuButtonCellRecord, TableColumnMenuButtonColumnConfig } from '..';
3
+ import type { MenuButton } from '../../../menu-button';
4
+ import type { MenuButtonToggleEventDetail } from '../../../menu-button/types';
5
+ declare global {
6
+ interface HTMLElementTagNameMap {
7
+ 'nimble-table-column-menu-button-cell-view': TableColumnMenuButtonCellView;
8
+ }
9
+ }
10
+ /**
11
+ * The cell view base class for displaying a string field as a menu button.
12
+ */
13
+ export declare class TableColumnMenuButtonCellView extends TableCellView<TableColumnMenuButtonCellRecord, TableColumnMenuButtonColumnConfig> {
14
+ /** @internal */
15
+ menuButton?: MenuButton;
16
+ /** @internal */
17
+ valueSpan?: HTMLSpanElement;
18
+ /** @internal */
19
+ hasOverflow: boolean;
20
+ /** @internal */
21
+ get showMenuButton(): boolean;
22
+ get tabbableChildren(): HTMLElement[];
23
+ /** @internal */
24
+ onMenuButtonBeforeToggle(event: CustomEvent<MenuButtonToggleEventDetail>): boolean;
25
+ /** @internal */
26
+ onMenuButtonMouseOver(): void;
27
+ /** @internal */
28
+ onMenuButtonMouseOut(): void;
29
+ /** @internal */
30
+ onMenuButtonClick(e: Event): void;
31
+ }
32
+ export declare const tableColumnMenuButtonCellViewTag = "nimble-table-column-menu-button-cell-view";
@@ -0,0 +1,70 @@
1
+ import { __decorate } from "tslib";
2
+ import { DesignSystem } from '@microsoft/fast-foundation';
3
+ import { observable, volatile } from '@microsoft/fast-element';
4
+ import { TableCellView } from '../../base/cell-view';
5
+ import { template } from './templates';
6
+ import { styles } from './styles';
7
+ import { cellViewMenuSlotName } from '../types';
8
+ /**
9
+ * The cell view base class for displaying a string field as a menu button.
10
+ */
11
+ export class TableColumnMenuButtonCellView extends TableCellView {
12
+ constructor() {
13
+ super(...arguments);
14
+ /** @internal */
15
+ this.hasOverflow = false;
16
+ }
17
+ /** @internal */
18
+ get showMenuButton() {
19
+ return !!this.cellRecord?.value;
20
+ }
21
+ get tabbableChildren() {
22
+ if (this.showMenuButton) {
23
+ return [this.menuButton];
24
+ }
25
+ return [];
26
+ }
27
+ /** @internal */
28
+ onMenuButtonBeforeToggle(event) {
29
+ const configuredSlotName = this.columnConfig?.menuSlot;
30
+ if (configuredSlotName && event.detail.newState) {
31
+ const eventDetail = {
32
+ slots: [
33
+ { name: configuredSlotName, slot: cellViewMenuSlotName }
34
+ ]
35
+ };
36
+ this.$emit('cell-view-slots-request', eventDetail);
37
+ }
38
+ return true;
39
+ }
40
+ /** @internal */
41
+ onMenuButtonMouseOver() {
42
+ if (this.valueSpan) {
43
+ this.hasOverflow = this.valueSpan.offsetWidth < this.valueSpan.scrollWidth;
44
+ }
45
+ }
46
+ /** @internal */
47
+ onMenuButtonMouseOut() {
48
+ this.hasOverflow = false;
49
+ }
50
+ /** @internal */
51
+ onMenuButtonClick(e) {
52
+ // Stop propagation of the click event to prevent clicking the menu button
53
+ // from affecting row selection.
54
+ e.stopPropagation();
55
+ }
56
+ }
57
+ __decorate([
58
+ observable
59
+ ], TableColumnMenuButtonCellView.prototype, "hasOverflow", void 0);
60
+ __decorate([
61
+ volatile
62
+ ], TableColumnMenuButtonCellView.prototype, "showMenuButton", null);
63
+ const menuButtonCellView = TableColumnMenuButtonCellView.compose({
64
+ baseName: 'table-column-menu-button-cell-view',
65
+ template,
66
+ styles
67
+ });
68
+ DesignSystem.getOrCreate().withPrefix('nimble').register(menuButtonCellView());
69
+ export const tableColumnMenuButtonCellViewTag = 'nimble-table-column-menu-button-cell-view';
70
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/menu-button/cell-view/index.ts"],"names":[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AAI,CAAC,SAAS,CAAC,WAAW,CAAC;SAC9E;IACL,CAAC;IAED,gBAAgB;IACT,oBAAoB;QACvB,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;IAC7B,CAAC;IAED,gBAAgB;IACT,iBAAiB,CAAC,CAAQ;QAC7B,0EAA0E;QAC1E,gCAAgC;QAChC,CAAC,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;CACJ;AAjDU;IADN,UAAU;kEACgB;AAI3B;IADC,QAAQ;mEAGR;AA6CL,MAAM,kBAAkB,GAAG,6BAA6B,CAAC,OAAO,CAAC;IAC7D,QAAQ,EAAE,oCAAoC;IAC9C,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,CAAC;AAC/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,2CAA2C,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { observable, volatile } from '@microsoft/fast-element';\nimport { TableCellView } from '../../base/cell-view';\nimport type {\n TableColumnMenuButtonCellRecord,\n TableColumnMenuButtonColumnConfig\n} from '..';\nimport { template } from './templates';\nimport { styles } from './styles';\nimport type { MenuButton } from '../../../menu-button';\nimport type { MenuButtonToggleEventDetail } from '../../../menu-button/types';\nimport type { CellViewSlotRequestEventDetail } from '../../../table/types';\nimport { cellViewMenuSlotName } from '../types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-menu-button-cell-view': TableColumnMenuButtonCellView;\n }\n}\n\n/**\n * The cell view base class for displaying a string field as a menu button.\n */\nexport class TableColumnMenuButtonCellView extends TableCellView<\nTableColumnMenuButtonCellRecord,\nTableColumnMenuButtonColumnConfig\n> {\n /** @internal */\n public menuButton?: MenuButton;\n\n /** @internal */\n public valueSpan?: HTMLSpanElement;\n\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /** @internal */\n @volatile\n public get showMenuButton(): boolean {\n return !!this.cellRecord?.value;\n }\n\n public override get tabbableChildren(): HTMLElement[] {\n if (this.showMenuButton) {\n return [this.menuButton!];\n }\n return [];\n }\n\n /** @internal */\n public onMenuButtonBeforeToggle(\n event: CustomEvent<MenuButtonToggleEventDetail>\n ): boolean {\n const configuredSlotName = this.columnConfig?.menuSlot;\n if (configuredSlotName && event.detail.newState) {\n const eventDetail: CellViewSlotRequestEventDetail = {\n slots: [\n { name: configuredSlotName, slot: cellViewMenuSlotName }\n ]\n };\n this.$emit('cell-view-slots-request', eventDetail);\n }\n return true;\n }\n\n /** @internal */\n public onMenuButtonMouseOver(): void {\n if (this.valueSpan) {\n this.hasOverflow = this.valueSpan.offsetWidth < this.valueSpan.scrollWidth;\n }\n }\n\n /** @internal */\n public onMenuButtonMouseOut(): void {\n this.hasOverflow = false;\n }\n\n /** @internal */\n public onMenuButtonClick(e: Event): void {\n // Stop propagation of the click event to prevent clicking the menu button\n // from affecting row selection.\n e.stopPropagation();\n }\n}\n\nconst menuButtonCellView = TableColumnMenuButtonCellView.compose({\n baseName: 'table-column-menu-button-cell-view',\n template,\n styles\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(menuButtonCellView());\nexport const tableColumnMenuButtonCellViewTag = 'nimble-table-column-menu-button-cell-view';\n"]}
@@ -0,0 +1 @@
1
+ export declare const styles: import("@microsoft/fast-element").ElementStyles;
@@ -0,0 +1,21 @@
1
+ import { css } from '@microsoft/fast-element';
2
+ import { controlSlimHeight } from '../../../theme-provider/design-tokens';
3
+ export const styles = css `
4
+ :host {
5
+ align-self: center;
6
+ width: 100%;
7
+ }
8
+
9
+ nimble-menu-button {
10
+ height: ${controlSlimHeight};
11
+ width: 100%;
12
+ }
13
+
14
+ .value-label {
15
+ margin-right: auto;
16
+ overflow: hidden;
17
+ text-overflow: ellipsis;
18
+ white-space: nowrap;
19
+ }
20
+ `;
21
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../../src/table-column/menu-button/cell-view/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;kBAOP,iBAAiB;;;;;;;;;;CAUlC,CAAC","sourcesContent":["import { css } from '@microsoft/fast-element';\nimport { controlSlimHeight } from '../../../theme-provider/design-tokens';\n\nexport const styles = css`\n :host {\n align-self: center;\n width: 100%;\n }\n\n nimble-menu-button {\n height: ${controlSlimHeight};\n width: 100%;\n }\n\n .value-label {\n margin-right: auto;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n`;\n"]}
@@ -0,0 +1,2 @@
1
+ import type { TableColumnMenuButtonCellView } from '.';
2
+ export declare const template: import("@microsoft/fast-element").ViewTemplate<TableColumnMenuButtonCellView, any>;