@ni/nimble-components 21.6.0 → 21.6.2

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.
@@ -39,7 +39,7 @@ export const template = html `
39
39
  aria-label="${x => tableRowLoadingLabel.getValueFor(x)}"
40
40
  title="${x => tableRowLoadingLabel.getValueFor(x)}"
41
41
  >
42
- <${spinnerTag}>
42
+ </${spinnerTag}>
43
43
  </span>
44
44
  `)}
45
45
  ${when(x => !x.loading, html `
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table/components/row/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EACH,gBAAgB,EAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACH,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACtB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,CAAU;;;wBAGd,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;wBACnB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ;sDACe,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,YAAY;;UAE/D,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,0BAA0B,EAA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AE,CAAC,CAAC;oDAC7G,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,KAAiD,EAAE,CAAC,CAAC;yCAC5G,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC;;;0BAG3D,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAE,CAAC,CAAC,MAAmB,CAAC,uBAAuB,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,IAAI,CAAuB;;wCAExG,CAAC,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,cAAe,EAAE;;;yBAG1D,CAAC;wBACF,YAAY;iBACnB,CAAC;aACL,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;;CAGpD,CAAC","sourcesContent":["import { html, ref, repeat, when } from '@microsoft/fast-element';\nimport type { TableRow } from '.';\nimport {\n ButtonAppearance,\n type MenuButtonToggleEventDetail\n} from '../../../menu-button/types';\nimport { tableCellTag } from '../cell';\nimport { checkboxTag } from '../../../checkbox';\nimport {\n tableRowCollapseLabel,\n tableRowExpandLabel,\n tableRowLoadingLabel,\n tableRowSelectLabel\n} from '../../../label-provider/table/label-tokens';\nimport type { TableColumn } from '../../../table-column/base';\nimport { buttonTag } from '../../../button';\nimport { iconArrowExpanderRightTag } from '../../../icons/arrow-expander-right';\nimport { spinnerTag } from '../../../spinner';\nimport { SpinnerAppearance } from '../../../spinner/types';\n\n// prettier-ignore\nexport const template = html<TableRow>`\n <template \n role=\"row\"\n aria-selected=${x => x.ariaSelected}\n aria-expanded=${x => x.expanded}\n style=\"--ni-private-table-row-indent-level: ${x => x.nestingLevel};\"\n >\n ${when(x => !x.rowOperationGridCellHidden, html<TableRow>`\n <span role=\"gridcell\" class=\"row-operations-container\">\n ${when(x => x.selectable && !x.hideSelection, html<TableRow>`\n <${checkboxTag}\n ${ref('selectionCheckbox')}\n class=\"selection-checkbox\"\n @change=\"${(x, c) => x.onSelectionChange(c.event as CustomEvent)}\"\n @click=\"${(_, c) => c.event.stopPropagation()}\"\n title=\"${x => tableRowSelectLabel.getValueFor(x)}\"\n aria-label=\"${x => tableRowSelectLabel.getValueFor(x)}\"\n >\n </${checkboxTag}>\n `)}\n </span>\n `)}\n <span class=\"row-front-spacer ${x => (x.isTopLevelParentRow ? 'top-level-parent' : '')}\"></span>\n ${when(x => x.isParentRow, html<TableRow>`\n ${when(x => x.loading, html<TableRow>`\n <span class=\"spinner-container\">\n <${spinnerTag}\n appearance=\"${SpinnerAppearance.accent}\"\n aria-label=\"${x => tableRowLoadingLabel.getValueFor(x)}\"\n title=\"${x => tableRowLoadingLabel.getValueFor(x)}\"\n >\n <${spinnerTag}>\n </span>\n `)}\n ${when(x => !x.loading, html<TableRow>`\n <${buttonTag}\n appearance=\"${ButtonAppearance.ghost}\"\n content-hidden\n class=\"expand-collapse-button\"\n tabindex=\"-1\"\n @click=\"${(x, c) => x.onRowExpandToggle(c.event)}\"\n title=\"${x => (x.expanded ? tableRowCollapseLabel.getValueFor(x) : tableRowExpandLabel.getValueFor(x))}\"\n aria-hidden=\"true\"\n >\n <${iconArrowExpanderRightTag} ${ref('expandIcon')} slot=\"start\" class=\"expander-icon ${x => x.animationClass}\"></${iconArrowExpanderRightTag}>\n </${buttonTag}>\n `)}\n `)}\n\n <span ${ref('cellContainer')} \n class=\"cell-container ${x => (x.isNestedParent ? 'nested-parent' : '')}\"\n >\n ${repeat(x => x.columns, html<TableColumn, TableRow>`\n ${when(x => !x.columnHidden, html<TableColumn, TableRow>`\n <${tableCellTag}\n class=\"cell\"\n :cellState=\"${(_, c) => c.parent.cellStates[c.index]}\"\n :cellViewTemplate=\"${x => x.columnInternals.cellViewTemplate}\"\n :column=\"${x => x}\"\n column-id=\"${x => x.columnId}\"\n :recordId=\"${(_, c) => c.parent.recordId}\"\n ?has-action-menu=\"${x => !!x.actionMenuSlot}\"\n action-menu-label=\"${x => x.actionMenuLabel}\"\n @cell-action-menu-beforetoggle=\"${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event as CustomEvent<MenuButtonToggleEventDetail>, x)}\"\n @cell-action-menu-toggle=\"${(x, c) => c.parent.onCellActionMenuToggle(c.event as CustomEvent<MenuButtonToggleEventDetail>, x)}\"\n :nestingLevel=\"${(_, c) => c.parent.cellIndentLevels[c.index]}\"\n >\n\n ${when((x, c) => ((c.parent as TableRow).currentActionMenuColumn === x) && x.actionMenuSlot, html<TableColumn, TableRow>`\n <slot\n name=\"${x => `row-action-menu-${x.actionMenuSlot!}`}\"\n slot=\"cellActionMenu\"\n ></slot>\n `)}\n </${tableCellTag}>\n `)}\n `, { recycle: false, positioning: true })}\n </span>\n </template>\n`;\n"]}
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table/components/row/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EACH,gBAAgB,EAEnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACH,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,mBAAmB,EACtB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,kBAAkB;AAClB,MAAM,CAAC,MAAM,QAAQ,GAAG,IAAI,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AAC,QAAQ;4CACpB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,cAAc;6CACtB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,eAAe;0DACT,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC,CAAC,KAAiD,EAAE,CAAC,CAAC;oDAC7G,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,CAAC,KAAiD,EAAE,CAAC,CAAC;yCAC5G,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,CAAC,KAAK,CAAC;;;0BAG3D,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAE,CAAC,CAAC,MAAmB,CAAC,uBAAuB,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,cAAc,EAAE,IAAI,CAAuB;;wCAExG,CAAC,CAAC,EAAE,CAAC,mBAAmB,CAAC,CAAC,cAAe,EAAE;;;yBAG1D,CAAC;wBACF,YAAY;iBACnB,CAAC;aACL,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC;;;CAGpD,CAAC","sourcesContent":["import { html, ref, repeat, when } from '@microsoft/fast-element';\nimport type { TableRow } from '.';\nimport {\n ButtonAppearance,\n type MenuButtonToggleEventDetail\n} from '../../../menu-button/types';\nimport { tableCellTag } from '../cell';\nimport { checkboxTag } from '../../../checkbox';\nimport {\n tableRowCollapseLabel,\n tableRowExpandLabel,\n tableRowLoadingLabel,\n tableRowSelectLabel\n} from '../../../label-provider/table/label-tokens';\nimport type { TableColumn } from '../../../table-column/base';\nimport { buttonTag } from '../../../button';\nimport { iconArrowExpanderRightTag } from '../../../icons/arrow-expander-right';\nimport { spinnerTag } from '../../../spinner';\nimport { SpinnerAppearance } from '../../../spinner/types';\n\n// prettier-ignore\nexport const template = html<TableRow>`\n <template \n role=\"row\"\n aria-selected=${x => x.ariaSelected}\n aria-expanded=${x => x.expanded}\n style=\"--ni-private-table-row-indent-level: ${x => x.nestingLevel};\"\n >\n ${when(x => !x.rowOperationGridCellHidden, html<TableRow>`\n <span role=\"gridcell\" class=\"row-operations-container\">\n ${when(x => x.selectable && !x.hideSelection, html<TableRow>`\n <${checkboxTag}\n ${ref('selectionCheckbox')}\n class=\"selection-checkbox\"\n @change=\"${(x, c) => x.onSelectionChange(c.event as CustomEvent)}\"\n @click=\"${(_, c) => c.event.stopPropagation()}\"\n title=\"${x => tableRowSelectLabel.getValueFor(x)}\"\n aria-label=\"${x => tableRowSelectLabel.getValueFor(x)}\"\n >\n </${checkboxTag}>\n `)}\n </span>\n `)}\n <span class=\"row-front-spacer ${x => (x.isTopLevelParentRow ? 'top-level-parent' : '')}\"></span>\n ${when(x => x.isParentRow, html<TableRow>`\n ${when(x => x.loading, html<TableRow>`\n <span class=\"spinner-container\">\n <${spinnerTag}\n appearance=\"${SpinnerAppearance.accent}\"\n aria-label=\"${x => tableRowLoadingLabel.getValueFor(x)}\"\n title=\"${x => tableRowLoadingLabel.getValueFor(x)}\"\n >\n </${spinnerTag}>\n </span>\n `)}\n ${when(x => !x.loading, html<TableRow>`\n <${buttonTag}\n appearance=\"${ButtonAppearance.ghost}\"\n content-hidden\n class=\"expand-collapse-button\"\n tabindex=\"-1\"\n @click=\"${(x, c) => x.onRowExpandToggle(c.event)}\"\n title=\"${x => (x.expanded ? tableRowCollapseLabel.getValueFor(x) : tableRowExpandLabel.getValueFor(x))}\"\n aria-hidden=\"true\"\n >\n <${iconArrowExpanderRightTag} ${ref('expandIcon')} slot=\"start\" class=\"expander-icon ${x => x.animationClass}\"></${iconArrowExpanderRightTag}>\n </${buttonTag}>\n `)}\n `)}\n\n <span ${ref('cellContainer')} \n class=\"cell-container ${x => (x.isNestedParent ? 'nested-parent' : '')}\"\n >\n ${repeat(x => x.columns, html<TableColumn, TableRow>`\n ${when(x => !x.columnHidden, html<TableColumn, TableRow>`\n <${tableCellTag}\n class=\"cell\"\n :cellState=\"${(_, c) => c.parent.cellStates[c.index]}\"\n :cellViewTemplate=\"${x => x.columnInternals.cellViewTemplate}\"\n :column=\"${x => x}\"\n column-id=\"${x => x.columnId}\"\n :recordId=\"${(_, c) => c.parent.recordId}\"\n ?has-action-menu=\"${x => !!x.actionMenuSlot}\"\n action-menu-label=\"${x => x.actionMenuLabel}\"\n @cell-action-menu-beforetoggle=\"${(x, c) => c.parent.onCellActionMenuBeforeToggle(c.event as CustomEvent<MenuButtonToggleEventDetail>, x)}\"\n @cell-action-menu-toggle=\"${(x, c) => c.parent.onCellActionMenuToggle(c.event as CustomEvent<MenuButtonToggleEventDetail>, x)}\"\n :nestingLevel=\"${(_, c) => c.parent.cellIndentLevels[c.index]}\"\n >\n\n ${when((x, c) => ((c.parent as TableRow).currentActionMenuColumn === x) && x.actionMenuSlot, html<TableColumn, TableRow>`\n <slot\n name=\"${x => `row-action-menu-${x.actionMenuSlot!}`}\"\n slot=\"cellActionMenu\"\n ></slot>\n `)}\n </${tableCellTag}>\n `)}\n `, { recycle: false, positioning: true })}\n </span>\n </template>\n`;\n"]}
@@ -81,8 +81,8 @@ export interface TableRecordHierarchyOptions {
81
81
  }
82
82
  export declare const TableRecordDelayedHierarchyState: {
83
83
  readonly none: undefined;
84
- readonly canLoadChildren: "canLoadChildren";
85
- readonly loadingChildren: "loadingChildren";
84
+ readonly canLoadChildren: "can-load-children";
85
+ readonly loadingChildren: "loading-children";
86
86
  };
87
87
  export declare type TableRecordDelayedHierarchyState = (typeof TableRecordDelayedHierarchyState)[keyof typeof TableRecordDelayedHierarchyState];
88
88
  export interface TableActionMenuToggleEventDetail {
@@ -115,9 +115,9 @@ export declare type TableRowSelectionMode = (typeof TableRowSelectionMode)[keyof
115
115
  * The possible selection states that the table or a table row can be in.
116
116
  */
117
117
  export declare const TableRowSelectionState: {
118
- readonly notSelected: "notSelected";
118
+ readonly notSelected: "not-selected";
119
119
  readonly selected: "selected";
120
- readonly partiallySelected: "partiallySelected";
120
+ readonly partiallySelected: "partially-selected";
121
121
  };
122
122
  export declare type TableRowSelectionState = (typeof TableRowSelectionState)[keyof typeof TableRowSelectionState];
123
123
  /**
@@ -1,7 +1,7 @@
1
1
  export const TableRecordDelayedHierarchyState = {
2
2
  none: undefined,
3
- canLoadChildren: 'canLoadChildren',
4
- loadingChildren: 'loadingChildren'
3
+ canLoadChildren: 'can-load-children',
4
+ loadingChildren: 'loading-children'
5
5
  };
6
6
  /**
7
7
  * The possible directions a table column can be sorted in.
@@ -25,8 +25,8 @@ export const TableRowSelectionMode = {
25
25
  * The possible selection states that the table or a table row can be in.
26
26
  */
27
27
  export const TableRowSelectionState = {
28
- notSelected: 'notSelected',
28
+ notSelected: 'not-selected',
29
29
  selected: 'selected',
30
- partiallySelected: 'partiallySelected'
30
+ partiallySelected: 'partially-selected'
31
31
  };
32
32
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/table/types.ts"],"names":[],"mappings":"AA+FA,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC5C,IAAI,EAAE,SAAS;IACf,eAAe,EAAE,iBAAiB;IAClC,eAAe,EAAE,iBAAiB;CAC5B,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,aAAa;IAC1B,QAAQ,EAAE,UAAU;IACpB,iBAAiB,EAAE,mBAAmB;CAChC,CAAC","sourcesContent":["import type { TableColumn } from '../table-column/base';\nimport type { ValidityObject } from '../utilities/models/validator';\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: 'canLoadChildren',\n loadingChildren: 'loadingChildren'\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: 'notSelected',\n selected: 'selected',\n partiallySelected: 'partiallySelected'\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}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/table/types.ts"],"names":[],"mappings":"AA+FA,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","sourcesContent":["import type { TableColumn } from '../table-column/base';\nimport type { ValidityObject } from '../utilities/models/validator';\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}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/nimble-components",
3
- "version": "21.6.0",
3
+ "version": "21.6.2",
4
4
  "description": "Styled web components for the NI Nimble Design System",
5
5
  "scripts": {
6
6
  "build": "npm run generate-icons && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",
@@ -64,7 +64,7 @@
64
64
  "@microsoft/fast-element": "^1.12.0",
65
65
  "@microsoft/fast-foundation": "2.49.4",
66
66
  "@microsoft/fast-web-utilities": "^6.0.0",
67
- "@ni/nimble-tokens": "^6.11.0",
67
+ "@ni/nimble-tokens": "^6.11.1",
68
68
  "@tanstack/table-core": "^8.10.7",
69
69
  "@tanstack/virtual-core": "^3.0.0-beta.68",
70
70
  "@tiptap/core": "^2.2.2",