@ni/nimble-components 34.8.0 → 34.8.3

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 (74) hide show
  1. package/dist/all-components-bundle.js +91 -46
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +2395 -2388
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/anchor/types.js.map +1 -1
  6. package/dist/esm/banner/index.js.map +1 -1
  7. package/dist/esm/banner/types.js.map +1 -1
  8. package/dist/esm/breadcrumb/breadcrumb.foundation.spec.js.map +1 -1
  9. package/dist/esm/breadcrumb/types.js.map +1 -1
  10. package/dist/esm/chip/index.js.map +1 -1
  11. package/dist/esm/chip/types.js.map +1 -1
  12. package/dist/esm/combobox/models/combobox-form-associated.js.map +1 -1
  13. package/dist/esm/dialog/index.js +0 -1
  14. package/dist/esm/dialog/index.js.map +1 -1
  15. package/dist/esm/drawer/index.js +0 -1
  16. package/dist/esm/drawer/index.js.map +1 -1
  17. package/dist/esm/drawer/types.js.map +1 -1
  18. package/dist/esm/mapping/icon/index.js +1 -1
  19. package/dist/esm/mapping/icon/index.js.map +1 -1
  20. package/dist/esm/menu-button/types.js.map +1 -1
  21. package/dist/esm/number-field/types.js.map +1 -1
  22. package/dist/esm/patterns/button/types.js.map +1 -1
  23. package/dist/esm/patterns/dropdown/types.js.map +1 -1
  24. package/dist/esm/rich-text/editor/index.js.map +1 -1
  25. package/dist/esm/rich-text/editor/testing/types.js.map +1 -1
  26. package/dist/esm/rich-text/editor/types.js.map +1 -1
  27. package/dist/esm/rich-text-mention/base/models/mention-validator.js +2 -2
  28. package/dist/esm/rich-text-mention/base/models/mention-validator.js.map +1 -1
  29. package/dist/esm/select/models/select-form-associated.js.map +1 -1
  30. package/dist/esm/spinner/types.js.map +1 -1
  31. package/dist/esm/table/components/row/index.js.map +1 -1
  32. package/dist/esm/table/index.js.map +1 -1
  33. package/dist/esm/table/types.js.map +1 -1
  34. package/dist/esm/table-column/base/cell-view/template.js +1 -1
  35. package/dist/esm/table-column/base/cell-view/template.js.map +1 -1
  36. package/dist/esm/table-column/base/group-header-view/template.js +1 -1
  37. package/dist/esm/table-column/base/group-header-view/template.js.map +1 -1
  38. package/dist/esm/table-column/base/types.js.map +1 -1
  39. package/dist/esm/table-column/date-text/index.js +1 -1
  40. package/dist/esm/table-column/date-text/index.js.map +1 -1
  41. package/dist/esm/table-column/date-text/models/format-helper.js +1 -1
  42. package/dist/esm/table-column/date-text/models/format-helper.js.map +1 -1
  43. package/dist/esm/table-column/date-text/types.js.map +1 -1
  44. package/dist/esm/table-column/enum-base/index.js.map +1 -1
  45. package/dist/esm/table-column/enum-base/types.js.map +1 -1
  46. package/dist/esm/table-column/mapping/types.js.map +1 -1
  47. package/dist/esm/table-column/mixins/custom-sort-order.js +1 -3
  48. package/dist/esm/table-column/mixins/custom-sort-order.js.map +1 -1
  49. package/dist/esm/table-column/mixins/fractional-width-column.js +2 -6
  50. package/dist/esm/table-column/mixins/fractional-width-column.js.map +1 -1
  51. package/dist/esm/table-column/mixins/groupable-column.js +2 -6
  52. package/dist/esm/table-column/mixins/groupable-column.js.map +1 -1
  53. package/dist/esm/table-column/mixins/placeholder.js +1 -3
  54. package/dist/esm/table-column/mixins/placeholder.js.map +1 -1
  55. package/dist/esm/table-column/mixins/sortable-column.js +3 -9
  56. package/dist/esm/table-column/mixins/sortable-column.js.map +1 -1
  57. package/dist/esm/table-column/number-text/models/number-text-unit-format.js.map +1 -1
  58. package/dist/esm/table-column/number-text/types.js.map +1 -1
  59. package/dist/esm/table-column/text/index.js.map +1 -1
  60. package/dist/esm/table-column/text-base/cell-view/index.js.map +1 -1
  61. package/dist/esm/table-column/text-base/group-header-view/index.js.map +1 -1
  62. package/dist/esm/table-column/text-base/index.js +1 -1
  63. package/dist/esm/table-column/text-base/index.js.map +1 -1
  64. package/dist/esm/text-area/types.js.map +1 -1
  65. package/dist/esm/text-field/types.js.map +1 -1
  66. package/dist/esm/theme-provider/design-token-values.js.map +1 -1
  67. package/dist/esm/theme-provider/design-tokens.js.map +1 -1
  68. package/dist/esm/theme-provider/index.js +1 -1
  69. package/dist/esm/theme-provider/index.js.map +1 -1
  70. package/dist/esm/tooltip/types.js.map +1 -1
  71. package/dist/esm/tree-view/types.js.map +1 -1
  72. package/dist/esm/utilities/unit-format/default-unit-format.js.map +1 -1
  73. package/dist/esm/wafer-map/types.js.map +1 -1
  74. package/package.json +6 -13
@@ -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,EAAE,MAAM,kBAAkB,CAAC;AAEnE,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,CAAC;QACD,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACV,oDAAoD;IACxD,CAAC;IACD,IAAI,CAAC,CAAC,QAAQ,YAAY,aAAa,CAAC,EAAE,CAAC;QACvC,MAAM,IAAI,KAAK,CACX,uBAAuB,WAAW,uDAAuD,CAC5F,CAAC;IACN,CAAC;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;;;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 '@ni/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\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
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/base/cell-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,IAAI,EAAE,MAAM,EAAE,M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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\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"]}
@@ -5,7 +5,7 @@ const validateGroupHeaderViewTemplate = (groupHeaderViewTag) => {
5
5
  try {
6
6
  instance = document.createElement(groupHeaderViewTag);
7
7
  }
8
- catch (ex) {
8
+ catch (_ex) {
9
9
  // Swallow construction error to report a better one
10
10
  }
11
11
  if (!(instance instanceof TableGroupHeaderView)) {
@@ -1 +1 @@
1
- {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/base/group-header-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAC;AAEzC,MAAM,+BAA+B,GAAG,CAAC,kBAA0B,EAAQ,EAAE;IACzE,IAAI,QAAQ,CAAC;IACb,IAAI,CAAC;QACD,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,EAAE,EAAE,CAAC;QACV,oDAAoD;IACxD,CAAC;IACD,IAAI,CAAC,CAAC,QAAQ,YAAY,oBAAoB,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CACX,+BAA+B,kBAAkB,8DAA8D,CAClH,CAAC;IACN,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,kBAA0B,EACC,EAAE;IAC7B,+BAA+B,CAAC,kBAAkB,CAAC,CAAC;IACpD,OAAO,IAAI,CAAe;WACnB,kBAAkB;iCACI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa;6BACxB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,eAAe,CAAC,YAAY;;;YAGjE,kBAAkB;KACzB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { html, ViewTemplate } from '@ni/fast-element';\nimport type { TableGroupRow } from '../../../table/components/group-row';\nimport { TableGroupHeaderView } from '.';\n\nconst validateGroupHeaderViewTemplate = (groupHeaderViewTag: string): void => {\n let instance;\n try {\n instance = document.createElement(groupHeaderViewTag);\n } catch (ex) {\n // Swallow construction error to report a better one\n }\n if (!(instance instanceof TableGroupHeaderView)) {\n throw new Error(\n `Group header view tag name (${groupHeaderViewTag}) must evaluate to an element extending TableGroupHeaderView`\n );\n }\n};\n\nexport const createGroupHeaderViewTemplate = (\n groupHeaderViewTag: string\n): ViewTemplate<TableGroupRow> => {\n validateGroupHeaderViewTemplate(groupHeaderViewTag);\n return html<TableGroupRow>`\n <${groupHeaderViewTag}\n :groupHeaderValue=\"${x => x.groupRowValue}\"\n :columnConfig=\"${x => x.groupColumn?.columnInternals.columnConfig}\"\n class=\"group-header-view\"\n >\n </${groupHeaderViewTag}>\n `;\n};\n"]}
1
+ {"version":3,"file":"template.js","sourceRoot":"","sources":["../../../../../src/table-column/base/group-header-view/template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,oBAAoB,EAAE,MAAM,GAAG,CAAC;AAEzC,MAAM,+BAA+B,GAAG,CAAC,kBAA0B,EAAQ,EAAE;IACzE,IAAI,QAAQ,CAAC;IACb,IAAI,CAAC;QACD,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAC,CAAC;IAC1D,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACX,oDAAoD;IACxD,CAAC;IACD,IAAI,CAAC,CAAC,QAAQ,YAAY,oBAAoB,CAAC,EAAE,CAAC;QAC9C,MAAM,IAAI,KAAK,CACX,+BAA+B,kBAAkB,8DAA8D,CAClH,CAAC;IACN,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,kBAA0B,EACC,EAAE;IAC7B,+BAA+B,CAAC,kBAAkB,CAAC,CAAC;IACpD,OAAO,IAAI,CAAe;WACnB,kBAAkB;iCACI,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa;6BACxB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,WAAW,EAAE,eAAe,CAAC,YAAY;;;YAGjE,kBAAkB;KACzB,CAAC;AACN,CAAC,CAAC","sourcesContent":["import { html, ViewTemplate } from '@ni/fast-element';\nimport type { TableGroupRow } from '../../../table/components/group-row';\nimport { TableGroupHeaderView } from '.';\n\nconst validateGroupHeaderViewTemplate = (groupHeaderViewTag: string): void => {\n let instance;\n try {\n instance = document.createElement(groupHeaderViewTag);\n } catch (_ex) {\n // Swallow construction error to report a better one\n }\n if (!(instance instanceof TableGroupHeaderView)) {\n throw new Error(\n `Group header view tag name (${groupHeaderViewTag}) must evaluate to an element extending TableGroupHeaderView`\n );\n }\n};\n\nexport const createGroupHeaderViewTemplate = (\n groupHeaderViewTag: string\n): ViewTemplate<TableGroupRow> => {\n validateGroupHeaderViewTemplate(groupHeaderViewTag);\n return html<TableGroupRow>`\n <${groupHeaderViewTag}\n :groupHeaderValue=\"${x => x.groupRowValue}\"\n :columnConfig=\"${x => x.groupColumn?.columnInternals.columnConfig}\"\n class=\"group-header-view\"\n >\n </${groupHeaderViewTag}>\n `;\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/base/types.ts"],"names":[],"mappings":"AA0BA;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;;OAGG;IACH,wBAAwB,EAAE,0BAA0B;CAC9C,CAAC;AAOX,MAAM,cAAc,GAAG,EAAE,CAAC,CAAC,mBAAmB;AAC9C,MAAM,aAAa,GAAG,CAAC,CAAC,CAAC,wBAAwB;AACjD,MAAM,gBAAgB,GAAG,EAAE,CAAC,CAAC,4BAA4B;AACzD,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,oBAAoB;MAChE,uBAAuB;MACvB,aAAa;MACb,cAAc,CAAC,YAAY;MAC3B,aAAa;MACb,cAAc,CAAC,aAAa;MAC5B,aAAa;MACb,gBAAgB;MAChB,aAAa,CAAC,CAAC,qBAAqB;AAE1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,oBAAoB;MACjE,cAAc;MACd,aAAa,CAAC,CAAC,qBAAqB;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC","sourcesContent":["import type { TableRecord } from '../../table/types';\nimport type { ValidityObject } from '../../utilities/models/validator';\n\n/**\n * An object whose fields are defined by a particular TableColumn, which is used by the column's\n * cellTemplate implementation.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface TableCellRecord extends TableRecord {}\n\nexport interface TableCellState<\n TCellRecord extends TableCellRecord = TableCellRecord,\n TColumnConfig = unknown\n> {\n cellRecord?: TCellRecord;\n columnConfig?: TColumnConfig;\n}\n\n/**\n * The event details for the 'delegated-event' CustomEvent\n */\nexport interface DelegatedEventEventDetails {\n originalEvent: Event;\n recordId: string;\n}\n\n/**\n * The possible operations to use when sorting a table column.\n */\nexport const TableColumnSortOperation = {\n /**\n * Performs a sort using `===`, `<`, and `>` operators\n */\n basic: 'basic',\n /**\n * Performs a locale-aware case-sensitive string sort on the columns.\n * Only use this sort operation if the field is of type `string | undefined | null`.\n */\n localeAwareCaseSensitive: 'localeAwareCaseSensitive'\n} as const;\nexport type TableColumnSortOperation =\n (typeof TableColumnSortOperation)[keyof typeof TableColumnSortOperation];\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface TableColumnValidity extends ValidityObject {}\n\nconst columnIconSize = 16; // `iconSize` token\nconst columnSpacing = 8; // `mediumPadding` token\nconst menuDropdownSize = 24; // `controlSlimHeight` token\nconst oneCharPlusEllipsisSize = 21;\nexport const defaultMinPixelWidth = columnSpacing // left cell padding\n + oneCharPlusEllipsisSize\n + columnSpacing\n + columnIconSize // sort icon\n + columnSpacing\n + columnIconSize // group icon\n + columnSpacing\n + menuDropdownSize\n + columnSpacing; // right cell padding\n\nexport const singleIconColumnWidth = columnSpacing // left cell padding\n + columnIconSize\n + columnSpacing; // right cell padding\n\nexport const defaultFractionalWidth = 1;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/base/types.ts"],"names":[],"mappings":"AA0BA;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACpC;;OAEG;IACH,KAAK,EAAE,OAAO;IACd;;;OAGG;IACH,wBAAwB,EAAE,0BAA0B;CAC9C,CAAC;AAMX,MAAM,cAAc,GAAG,EAAE,CAAC,CAAC,mBAAmB;AAC9C,MAAM,aAAa,GAAG,CAAC,CAAC,CAAC,wBAAwB;AACjD,MAAM,gBAAgB,GAAG,EAAE,CAAC,CAAC,4BAA4B;AACzD,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,CAAC,MAAM,oBAAoB,GAAG,aAAa,CAAC,oBAAoB;MAChE,uBAAuB;MACvB,aAAa;MACb,cAAc,CAAC,YAAY;MAC3B,aAAa;MACb,cAAc,CAAC,aAAa;MAC5B,aAAa;MACb,gBAAgB;MAChB,aAAa,CAAC,CAAC,qBAAqB;AAE1C,MAAM,CAAC,MAAM,qBAAqB,GAAG,aAAa,CAAC,oBAAoB;MACjE,cAAc;MACd,aAAa,CAAC,CAAC,qBAAqB;AAE1C,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC","sourcesContent":["import type { TableRecord } from '../../table/types';\nimport type { ValidityObject } from '../../utilities/models/validator';\n\n/**\n * An object whose fields are defined by a particular TableColumn, which is used by the column's\n * cellTemplate implementation.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TableCellRecord extends TableRecord {}\n\nexport interface TableCellState<\n TCellRecord extends TableCellRecord = TableCellRecord,\n TColumnConfig = unknown\n> {\n cellRecord?: TCellRecord;\n columnConfig?: TColumnConfig;\n}\n\n/**\n * The event details for the 'delegated-event' CustomEvent\n */\nexport interface DelegatedEventEventDetails {\n originalEvent: Event;\n recordId: string;\n}\n\n/**\n * The possible operations to use when sorting a table column.\n */\nexport const TableColumnSortOperation = {\n /**\n * Performs a sort using `===`, `<`, and `>` operators\n */\n basic: 'basic',\n /**\n * Performs a locale-aware case-sensitive string sort on the columns.\n * Only use this sort operation if the field is of type `string | undefined | null`.\n */\n localeAwareCaseSensitive: 'localeAwareCaseSensitive'\n} as const;\nexport type TableColumnSortOperation = (typeof TableColumnSortOperation)[keyof typeof TableColumnSortOperation];\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TableColumnValidity extends ValidityObject {}\n\nconst columnIconSize = 16; // `iconSize` token\nconst columnSpacing = 8; // `mediumPadding` token\nconst menuDropdownSize = 24; // `controlSlimHeight` token\nconst oneCharPlusEllipsisSize = 21;\nexport const defaultMinPixelWidth = columnSpacing // left cell padding\n + oneCharPlusEllipsisSize\n + columnSpacing\n + columnIconSize // sort icon\n + columnSpacing\n + columnIconSize // group icon\n + columnSpacing\n + menuDropdownSize\n + columnSpacing; // right cell padding\n\nexport const singleIconColumnWidth = columnSpacing // left cell padding\n + columnIconSize\n + columnSpacing; // right cell padding\n\nexport const defaultFractionalWidth = 1;\n"]}
@@ -134,7 +134,7 @@ export class TableColumnDateText extends mixinTextBase((TableColumnTextBase)) {
134
134
  try {
135
135
  return new Intl.DateTimeFormat(lang.getValueFor(this), options);
136
136
  }
137
- catch (e) {
137
+ catch (_e) {
138
138
  return undefined;
139
139
  }
140
140
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/date-text/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAkBzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAc5E;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,aAAa,CAClD,CAAA,mBAGC,CAAA,CACJ;IALD;;QAqEqB,mBAAc,GAAuC;YAClE,YAAY,EAAE,GA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GvB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;2DACT;AAGxB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;2DACR;AAGxB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACD;AAGjC;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,yBAAyB,EAAE,CAAC;kEACT;AAG/B;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACP;AAG3B;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACP;AAG3B;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACD;AAgL5C,MAAM,yBAAyB,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC1D,QAAQ,EAAE,wBAAwB;IAClC,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,yBAAyB,EAAE,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,sBAAsB,GAAG,+BAA+B,CAAC","sourcesContent":["import { DesignSystem, type DesignTokenSubscriber } from '@ni/fast-foundation';\nimport { attr } from '@ni/fast-element';\nimport { styles } from '../base/styles';\nimport { template } from '../base/template';\nimport type { TableNumberField } from '../../table/types';\nimport { TableColumnTextBase, mixinTextBase } from '../text-base';\nimport { TableColumnSortOperation } from '../base/types';\nimport { tableColumnDateTextGroupHeaderViewTag } from './group-header-view';\nimport { tableColumnDateTextCellViewTag } from './cell-view';\nimport type { ColumnInternalsOptions } from '../base/models/column-internals';\nimport { DateTextFormat } from './types';\nimport type {\n LocaleMatcherAlgorithm,\n EraFormat,\n YearFormat,\n DayFormat,\n HourFormat,\n MinuteFormat,\n SecondFormat,\n TimeZoneNameFormat,\n FormatMatcherAlgorithm,\n DayPeriodFormat,\n DateStyle,\n TimeStyle,\n HourCycleFormat,\n MonthFormat,\n WeekdayFormat\n} from './types';\nimport { TableColumnDateTextValidator } from './models/table-column-date-text-validator';\nimport { lang } from '../../theme-provider';\nimport { optionalBooleanConverter } from '../../utilities/models/converter';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\n\nexport type TableColumnDateTextCellRecord = TableNumberField<'value'>;\nexport interface TableColumnDateTextColumnConfig extends TableColumnTextBaseColumnConfig {\n formatter: Intl.DateTimeFormat;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-date-text': TableColumnDateText;\n }\n}\n\n/**\n * The table column for displaying dates/times as text.\n */\nexport class TableColumnDateText extends mixinTextBase(\n TableColumnTextBase<\n TableColumnDateTextColumnConfig,\n TableColumnDateTextValidator\n >\n) {\n @attr\n public format: DateTextFormat;\n\n @attr({ attribute: 'custom-locale-matcher' })\n public customLocaleMatcher: LocaleMatcherAlgorithm;\n\n @attr({ attribute: 'custom-weekday' })\n public customWeekday: WeekdayFormat;\n\n @attr({ attribute: 'custom-era' })\n public customEra: EraFormat;\n\n @attr({ attribute: 'custom-year' })\n public customYear: YearFormat;\n\n @attr({ attribute: 'custom-month' })\n public customMonth: MonthFormat;\n\n @attr({ attribute: 'custom-day' })\n public customDay: DayFormat;\n\n @attr({ attribute: 'custom-hour' })\n public customHour: HourFormat;\n\n @attr({ attribute: 'custom-minute' })\n public customMinute: MinuteFormat;\n\n @attr({ attribute: 'custom-second' })\n public customSecond: SecondFormat;\n\n @attr({ attribute: 'custom-time-zone-name' })\n public customTimeZoneName: TimeZoneNameFormat;\n\n @attr({ attribute: 'custom-format-matcher' })\n public customFormatMatcher: FormatMatcherAlgorithm;\n\n // Later versions of FAST (than the legacy branch we're on) have a nullableBooleanConverter.\n // We should replace our converter with that one when it is available to us.\n // See issue related to adopting FastElement 2.0: https://github.com/ni/nimble/issues/572\n @attr({ attribute: 'custom-hour12', converter: optionalBooleanConverter })\n public customHour12?: boolean;\n\n @attr({ attribute: 'custom-time-zone' })\n public customTimeZone?: string;\n\n @attr({ attribute: 'custom-calendar' })\n public customCalendar?: string;\n\n @attr({ attribute: 'custom-day-period' })\n public customDayPeriod: DayPeriodFormat;\n\n @attr({ attribute: 'custom-numbering-system' })\n public customNumberingSystem?: string;\n\n @attr({ attribute: 'custom-date-style' })\n public customDateStyle: DateStyle;\n\n @attr({ attribute: 'custom-time-style' })\n public customTimeStyle: TimeStyle;\n\n @attr({ attribute: 'custom-hour-cycle' })\n public customHourCycle: HourCycleFormat;\n\n private readonly langSubscriber: DesignTokenSubscriber<typeof lang> = {\n handleChange: () => {\n this.updateColumnConfig();\n }\n };\n\n public override connectedCallback(): void {\n super.connectedCallback();\n lang.subscribe(this.langSubscriber, this);\n this.updateColumnConfig();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n lang.unsubscribe(this.langSubscriber, this);\n }\n\n public placeholderChanged(): void {\n this.updateColumnConfig();\n }\n\n protected override getColumnInternalsOptions(): ColumnInternalsOptions<TableColumnDateTextValidator> {\n return {\n cellRecordFieldNames: ['value'],\n cellViewTag: tableColumnDateTextCellViewTag,\n groupHeaderViewTag: tableColumnDateTextGroupHeaderViewTag,\n delegatedEvents: [],\n sortOperation: TableColumnSortOperation.basic,\n validator: new TableColumnDateTextValidator()\n };\n }\n\n protected formatChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customLocaleMatcherChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customWeekdayChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customEraChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customYearChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customMonthChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customDayChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customHourChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customMinuteChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customSecondChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customTimeZoneNameChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customFormatMatcherChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customHour12Changed(): void {\n this.updateColumnConfig();\n }\n\n protected customTimeZoneChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customCalendarChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customDayPeriodChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customNumberingSystemChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customDateStyleChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customTimeStyleChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customHourCycleChanged(): void {\n this.updateColumnConfig();\n }\n\n private updateColumnConfig(): void {\n const formatter = this.createFormatter();\n\n if (formatter) {\n const columnConfig: TableColumnDateTextColumnConfig = {\n formatter,\n placeholder: this.placeholder\n };\n this.columnInternals.columnConfig = columnConfig;\n this.columnInternals.validator.setCustomOptionsValidity(true);\n } else {\n this.columnInternals.columnConfig = undefined;\n this.columnInternals.validator.setCustomOptionsValidity(false);\n }\n }\n\n private createFormatter(): Intl.DateTimeFormat | undefined {\n let options: Intl.DateTimeFormatOptions;\n if (this.format === DateTextFormat.default) {\n options = {\n dateStyle: 'medium',\n timeStyle: 'medium'\n };\n } else {\n options = this.getCustomFormattingOptions();\n }\n try {\n return new Intl.DateTimeFormat(lang.getValueFor(this), options);\n } catch (e) {\n return undefined;\n }\n }\n\n private getCustomFormattingOptions(): Intl.DateTimeFormatOptions {\n // There's a FAST bug (https://github.com/microsoft/fast/issues/6630) where removing\n // attributes sets their values to null instead of undefined. To work around this,\n // translate null values to undefined.\n const options: Intl.DateTimeFormatOptions = {\n localeMatcher: this.customLocaleMatcher ?? undefined,\n weekday: this.customWeekday ?? undefined,\n era: this.customEra ?? undefined,\n year: this.customYear ?? undefined,\n month: this.customMonth ?? undefined,\n day: this.customDay ?? undefined,\n hour: this.customHour ?? undefined,\n minute: this.customMinute ?? undefined,\n second: this.customSecond ?? undefined,\n timeZoneName: this.customTimeZoneName ?? undefined,\n formatMatcher: this.customFormatMatcher ?? undefined,\n hour12: this.customHour12 ?? undefined,\n timeZone: this.customTimeZone ?? undefined,\n calendar: this.customCalendar ?? undefined,\n dayPeriod: this.customDayPeriod ?? undefined,\n numberingSystem: this.customNumberingSystem ?? undefined,\n dateStyle: this.customDateStyle ?? undefined,\n timeStyle: this.customTimeStyle ?? undefined,\n hourCycle: this.customHourCycle ?? undefined\n };\n return options;\n }\n}\n\nconst nimbleTableColumnDateText = TableColumnDateText.compose({\n baseName: 'table-column-date-text',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleTableColumnDateText());\nexport const tableColumnDateTextTag = 'nimble-table-column-date-text';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/date-text/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAA8B,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,qCAAqC,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAkBzC,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAc5E;;GAEG;AACH,MAAM,OAAO,mBAAoB,SAAQ,a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IAAI,CAAC,EAAE,SAAS,EAAE,eAAe,EAAE,SAAS,EAAE,wBAAwB,EAAE,CAAC;yDAC5C;AAGvB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;2DACT;AAGxB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;2DACR;AAGxB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACD;AAGjC;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,yBAAyB,EAAE,CAAC;kEACT;AAG/B;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACP;AAG3B;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACP;AAG3B;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;4DACD;AAgL5C,MAAM,yBAAyB,GAAG,mBAAmB,CAAC,OAAO,CAAC;IAC1D,QAAQ,EAAE,wBAAwB;IAClC,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,yBAAyB,EAAE,CAAC,CAAC;AAC3C,MAAM,CAAC,MAAM,sBAAsB,GAAG,+BAA+B,CAAC","sourcesContent":["import { DesignSystem, type DesignTokenSubscriber } from '@ni/fast-foundation';\nimport { attr } from '@ni/fast-element';\nimport { styles } from '../base/styles';\nimport { template } from '../base/template';\nimport type { TableNumberField } from '../../table/types';\nimport { TableColumnTextBase, mixinTextBase } from '../text-base';\nimport { TableColumnSortOperation } from '../base/types';\nimport { tableColumnDateTextGroupHeaderViewTag } from './group-header-view';\nimport { tableColumnDateTextCellViewTag } from './cell-view';\nimport type { ColumnInternalsOptions } from '../base/models/column-internals';\nimport { DateTextFormat } from './types';\nimport type {\n LocaleMatcherAlgorithm,\n EraFormat,\n YearFormat,\n DayFormat,\n HourFormat,\n MinuteFormat,\n SecondFormat,\n TimeZoneNameFormat,\n FormatMatcherAlgorithm,\n DayPeriodFormat,\n DateStyle,\n TimeStyle,\n HourCycleFormat,\n MonthFormat,\n WeekdayFormat\n} from './types';\nimport { TableColumnDateTextValidator } from './models/table-column-date-text-validator';\nimport { lang } from '../../theme-provider';\nimport { optionalBooleanConverter } from '../../utilities/models/converter';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\n\nexport type TableColumnDateTextCellRecord = TableNumberField<'value'>;\nexport interface TableColumnDateTextColumnConfig extends TableColumnTextBaseColumnConfig {\n formatter: Intl.DateTimeFormat;\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-date-text': TableColumnDateText;\n }\n}\n\n/**\n * The table column for displaying dates/times as text.\n */\nexport class TableColumnDateText extends mixinTextBase(\n TableColumnTextBase<\n TableColumnDateTextColumnConfig,\n TableColumnDateTextValidator\n >\n) {\n @attr\n public format: DateTextFormat;\n\n @attr({ attribute: 'custom-locale-matcher' })\n public customLocaleMatcher: LocaleMatcherAlgorithm;\n\n @attr({ attribute: 'custom-weekday' })\n public customWeekday: WeekdayFormat;\n\n @attr({ attribute: 'custom-era' })\n public customEra: EraFormat;\n\n @attr({ attribute: 'custom-year' })\n public customYear: YearFormat;\n\n @attr({ attribute: 'custom-month' })\n public customMonth: MonthFormat;\n\n @attr({ attribute: 'custom-day' })\n public customDay: DayFormat;\n\n @attr({ attribute: 'custom-hour' })\n public customHour: HourFormat;\n\n @attr({ attribute: 'custom-minute' })\n public customMinute: MinuteFormat;\n\n @attr({ attribute: 'custom-second' })\n public customSecond: SecondFormat;\n\n @attr({ attribute: 'custom-time-zone-name' })\n public customTimeZoneName: TimeZoneNameFormat;\n\n @attr({ attribute: 'custom-format-matcher' })\n public customFormatMatcher: FormatMatcherAlgorithm;\n\n // Later versions of FAST (than the legacy branch we're on) have a nullableBooleanConverter.\n // We should replace our converter with that one when it is available to us.\n // See issue related to adopting FastElement 2.0: https://github.com/ni/nimble/issues/572\n @attr({ attribute: 'custom-hour12', converter: optionalBooleanConverter })\n public customHour12?: boolean;\n\n @attr({ attribute: 'custom-time-zone' })\n public customTimeZone?: string;\n\n @attr({ attribute: 'custom-calendar' })\n public customCalendar?: string;\n\n @attr({ attribute: 'custom-day-period' })\n public customDayPeriod: DayPeriodFormat;\n\n @attr({ attribute: 'custom-numbering-system' })\n public customNumberingSystem?: string;\n\n @attr({ attribute: 'custom-date-style' })\n public customDateStyle: DateStyle;\n\n @attr({ attribute: 'custom-time-style' })\n public customTimeStyle: TimeStyle;\n\n @attr({ attribute: 'custom-hour-cycle' })\n public customHourCycle: HourCycleFormat;\n\n private readonly langSubscriber: DesignTokenSubscriber<typeof lang> = {\n handleChange: () => {\n this.updateColumnConfig();\n }\n };\n\n public override connectedCallback(): void {\n super.connectedCallback();\n lang.subscribe(this.langSubscriber, this);\n this.updateColumnConfig();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n lang.unsubscribe(this.langSubscriber, this);\n }\n\n public placeholderChanged(): void {\n this.updateColumnConfig();\n }\n\n protected override getColumnInternalsOptions(): ColumnInternalsOptions<TableColumnDateTextValidator> {\n return {\n cellRecordFieldNames: ['value'],\n cellViewTag: tableColumnDateTextCellViewTag,\n groupHeaderViewTag: tableColumnDateTextGroupHeaderViewTag,\n delegatedEvents: [],\n sortOperation: TableColumnSortOperation.basic,\n validator: new TableColumnDateTextValidator()\n };\n }\n\n protected formatChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customLocaleMatcherChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customWeekdayChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customEraChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customYearChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customMonthChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customDayChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customHourChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customMinuteChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customSecondChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customTimeZoneNameChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customFormatMatcherChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customHour12Changed(): void {\n this.updateColumnConfig();\n }\n\n protected customTimeZoneChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customCalendarChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customDayPeriodChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customNumberingSystemChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customDateStyleChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customTimeStyleChanged(): void {\n this.updateColumnConfig();\n }\n\n protected customHourCycleChanged(): void {\n this.updateColumnConfig();\n }\n\n private updateColumnConfig(): void {\n const formatter = this.createFormatter();\n\n if (formatter) {\n const columnConfig: TableColumnDateTextColumnConfig = {\n formatter,\n placeholder: this.placeholder\n };\n this.columnInternals.columnConfig = columnConfig;\n this.columnInternals.validator.setCustomOptionsValidity(true);\n } else {\n this.columnInternals.columnConfig = undefined;\n this.columnInternals.validator.setCustomOptionsValidity(false);\n }\n }\n\n private createFormatter(): Intl.DateTimeFormat | undefined {\n let options: Intl.DateTimeFormatOptions;\n if (this.format === DateTextFormat.default) {\n options = {\n dateStyle: 'medium',\n timeStyle: 'medium'\n };\n } else {\n options = this.getCustomFormattingOptions();\n }\n try {\n return new Intl.DateTimeFormat(lang.getValueFor(this), options);\n } catch (_e) {\n return undefined;\n }\n }\n\n private getCustomFormattingOptions(): Intl.DateTimeFormatOptions {\n // There's a FAST bug (https://github.com/microsoft/fast/issues/6630) where removing\n // attributes sets their values to null instead of undefined. To work around this,\n // translate null values to undefined.\n const options: Intl.DateTimeFormatOptions = {\n localeMatcher: this.customLocaleMatcher ?? undefined,\n weekday: this.customWeekday ?? undefined,\n era: this.customEra ?? undefined,\n year: this.customYear ?? undefined,\n month: this.customMonth ?? undefined,\n day: this.customDay ?? undefined,\n hour: this.customHour ?? undefined,\n minute: this.customMinute ?? undefined,\n second: this.customSecond ?? undefined,\n timeZoneName: this.customTimeZoneName ?? undefined,\n formatMatcher: this.customFormatMatcher ?? undefined,\n hour12: this.customHour12 ?? undefined,\n timeZone: this.customTimeZone ?? undefined,\n calendar: this.customCalendar ?? undefined,\n dayPeriod: this.customDayPeriod ?? undefined,\n numberingSystem: this.customNumberingSystem ?? undefined,\n dateStyle: this.customDateStyle ?? undefined,\n timeStyle: this.customTimeStyle ?? undefined,\n hourCycle: this.customHourCycle ?? undefined\n };\n return options;\n }\n}\n\nconst nimbleTableColumnDateText = TableColumnDateText.compose({\n baseName: 'table-column-date-text',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleTableColumnDateText());\nexport const tableColumnDateTextTag = 'nimble-table-column-date-text';\n"]}
@@ -3,7 +3,7 @@ export function formatNumericDate(formatter, date) {
3
3
  try {
4
4
  return formatter.format(date);
5
5
  }
6
- catch (e) {
6
+ catch (_e) {
7
7
  return '';
8
8
  }
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"format-helper.js","sourceRoot":"","sources":["../../../../../src/table-column/date-text/models/format-helper.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAC7B,SAA8B,EAC9B,IAA2B;IAE3B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC3B,IAAI,CAAC;YACD,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACT,OAAO,EAAE,CAAC;QACd,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC","sourcesContent":["import type { TableNumberFieldValue } from '../../../table/types';\n\nexport function formatNumericDate(\n formatter: Intl.DateTimeFormat,\n date: TableNumberFieldValue\n): string {\n if (typeof date === 'number') {\n try {\n return formatter.format(date);\n } catch (e) {\n return '';\n }\n } else {\n return '';\n }\n}\n"]}
1
+ {"version":3,"file":"format-helper.js","sourceRoot":"","sources":["../../../../../src/table-column/date-text/models/format-helper.ts"],"names":[],"mappings":"AAEA,MAAM,UAAU,iBAAiB,CAC7B,SAA8B,EAC9B,IAA2B;IAE3B,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QAC3B,IAAI,CAAC;YACD,OAAO,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,EAAE,EAAE,CAAC;YACV,OAAO,EAAE,CAAC;QACd,CAAC;IACL,CAAC;SAAM,CAAC;QACJ,OAAO,EAAE,CAAC;IACd,CAAC;AACL,CAAC","sourcesContent":["import type { TableNumberFieldValue } from '../../../table/types';\n\nexport function formatNumericDate(\n formatter: Intl.DateTimeFormat,\n date: TableNumberFieldValue\n): string {\n if (typeof date === 'number') {\n try {\n return formatter.format(date);\n } catch (_e) {\n return '';\n }\n } else {\n return '';\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/date-text/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACV,CAAC","sourcesContent":["/**\n * Formatting scheme for the date-text table column\n */\nexport const DateTextFormat = {\n default: undefined,\n custom: 'custom'\n} as const;\nexport type DateTextFormat =\n (typeof DateTextFormat)[keyof typeof DateTextFormat];\n\nexport type LocaleMatcherAlgorithm =\n Intl.DateTimeFormatOptions['localeMatcher'];\nexport type WeekdayFormat = Intl.DateTimeFormatOptions['weekday'];\nexport type EraFormat = Intl.DateTimeFormatOptions['era'];\nexport type YearFormat = Intl.DateTimeFormatOptions['year'];\nexport type MonthFormat = Intl.DateTimeFormatOptions['month'];\nexport type DayFormat = Intl.DateTimeFormatOptions['day'];\nexport type HourFormat = Intl.DateTimeFormatOptions['hour'];\nexport type MinuteFormat = Intl.DateTimeFormatOptions['minute'];\nexport type SecondFormat = Intl.DateTimeFormatOptions['second'];\nexport type TimeZoneNameFormat = Intl.DateTimeFormatOptions['timeZoneName'];\nexport type FormatMatcherAlgorithm =\n Intl.DateTimeFormatOptions['formatMatcher'];\nexport type DayPeriodFormat = Intl.DateTimeFormatOptions['dayPeriod'];\nexport type DateStyle = Intl.DateTimeFormatOptions['dateStyle'];\nexport type TimeStyle = Intl.DateTimeFormatOptions['timeStyle'];\nexport type HourCycleFormat = Intl.DateTimeFormatOptions['hourCycle'];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/date-text/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;CACV,CAAC","sourcesContent":["/**\n * Formatting scheme for the date-text table column\n */\nexport const DateTextFormat = {\n default: undefined,\n custom: 'custom'\n} as const;\nexport type DateTextFormat = (typeof DateTextFormat)[keyof typeof DateTextFormat];\n\nexport type LocaleMatcherAlgorithm = Intl.DateTimeFormatOptions['localeMatcher'];\nexport type WeekdayFormat = Intl.DateTimeFormatOptions['weekday'];\nexport type EraFormat = Intl.DateTimeFormatOptions['era'];\nexport type YearFormat = Intl.DateTimeFormatOptions['year'];\nexport type MonthFormat = Intl.DateTimeFormatOptions['month'];\nexport type DayFormat = Intl.DateTimeFormatOptions['day'];\nexport type HourFormat = Intl.DateTimeFormatOptions['hour'];\nexport type MinuteFormat = Intl.DateTimeFormatOptions['minute'];\nexport type SecondFormat = Intl.DateTimeFormatOptions['second'];\nexport type TimeZoneNameFormat = Intl.DateTimeFormatOptions['timeZoneName'];\nexport type FormatMatcherAlgorithm = Intl.DateTimeFormatOptions['formatMatcher'];\nexport type DayPeriodFormat = Intl.DateTimeFormatOptions['dayPeriod'];\nexport type DateStyle = Intl.DateTimeFormatOptions['dateStyle'];\nexport type TimeStyle = Intl.DateTimeFormatOptions['timeStyle'];\nexport type HourCycleFormat = Intl.DateTimeFormatOptions['hourCycle'];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/enum-base/index.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,IAAI,EAEJ,UAAU,EACV,UAAU,EAEb,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAanE;;GAEG;AACH,MAAM,OAAgB,mBAIlB,SAAQ,WAA0C;IAJtD;;QAMI,gBAAgB;QACT,qBAAgB,GAAe,EAAE,CAAC;QAEzC,gBAAgB;QAET,aAAQ,GAAuB,EAAE,CAAC;QAMlC,YAAO,GAAmB,QAAQ,CAAC;IAgF9C,CAAC;IA9EG;;;;;OAKG;IACI,YAAY,CAAC,MAAe,EAAE,IAAa;QAC9C,IAAI,MAAM,YAAY,OAAO,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YACxD,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC9B,CAAC;IACL,CAAC;IAaD;;OAEG;IACK,kBAAkB;QACtB,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;QACrE,IAAI,CAAC,eAAe,CAAC,YAAY,GAAG,IAAI,CAAC,aAAa,EAAE;YACpD,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACnD,CAAC,CAAC,SAAS,CAAC;IACpB,CAAC;IAEO,iBAAiB;QACrB,MAAM,cAAc,GAAG,IAAI,GAAG,EAA6B,CAAC;QAC5D,IAAI,C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AAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;IACL,CAAC;CACJ;AAtFU;IADN,UAAU;qDAC8B;AAGlC;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;sDACR;AAGnB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;oDACU","sourcesContent":["import {\n attr,\n type Notifier,\n Observable,\n observable,\n type Subscriber\n} from '@ni/fast-element';\nimport type {\n TableStringField,\n TableBooleanField,\n TableNumberField\n} from '../../table/types';\nimport { TableColumn } from '../base';\nimport { Mapping } from '../../mapping/base';\nimport type { MappingKeyType } from './types';\nimport type { MappingConfig } from './models/mapping-config';\nimport type { MappingKey } from '../../mapping/base/types';\nimport { resolveKeyWithType } from './models/mapping-key-resolver';\nimport type { TableColumnEnumBaseValidator } from './models/table-column-enum-base-validator';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\n\nexport type TableColumnEnumCellRecord =\n | TableStringField<'value'>\n | TableBooleanField<'value'>\n | TableNumberField<'value'>;\nexport type MappingConfigs = Map<MappingKey, MappingConfig>;\nexport interface TableColumnEnumColumnConfig extends TableColumnTextBaseColumnConfig {\n mappingConfigs: MappingConfigs;\n}\n\n/**\n * Base class for table columns that map values to content\n */\nexport abstract class TableColumnEnumBase<\n TColumnConfig extends TableColumnEnumColumnConfig,\n TEnumValidator extends TableColumnEnumBaseValidator<[]>\n>\n extends TableColumn<TColumnConfig, TEnumValidator>\n implements Subscriber {\n /** @internal */\n public mappingNotifiers: Notifier[] = [];\n\n /** @internal */\n @observable\n public mappings: Mapping<unknown>[] = [];\n\n @attr({ attribute: 'field-name' })\n public fieldName?: string;\n\n @attr({ attribute: 'key-type' })\n public keyType: MappingKeyType = 'string';\n\n /**\n * @internal\n *\n * Triggers a request to update the columnConfig when any observable property on\n * a mapping is updated.\n */\n public handleChange(source: unknown, args: unknown): void {\n if (source instanceof Mapping && typeof args === 'string') {\n this.updateColumnConfig();\n }\n }\n\n /**\n * Implementations should throw an error if an invalid Mapping is passed.\n */\n protected abstract createMappingConfig(\n mapping: Mapping<unknown>\n ): MappingConfig;\n\n protected abstract createColumnConfig(\n mappingConfigs: MappingConfigs\n ): TColumnConfig;\n\n /**\n * Called when any Mapping related state has changed.\n */\n private updateColumnConfig(): void {\n this.columnInternals.validator.validate(this.mappings, this.keyType);\n this.columnInternals.columnConfig = this.checkValidity()\n ? this.createColumnConfig(this.getMappingConfigs())\n : undefined;\n }\n\n private getMappingConfigs(): MappingConfigs {\n const mappingConfigs = new Map<MappingKey, MappingConfig>();\n this.mappings.forEach(mapping => {\n const key = resolveKeyWithType(mapping.key, this.keyType);\n if (key === undefined) {\n throw Error(\n 'Key was invalid for type. Validation should have prevented this.'\n );\n }\n const mappingConfig = this.createMappingConfig(mapping);\n mappingConfigs.set(key, mappingConfig);\n });\n return mappingConfigs;\n }\n\n private fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName];\n this.columnInternals.operandDataRecordFieldName = this.fieldName;\n }\n\n private mappingsChanged(): void {\n this.updateColumnConfig();\n this.observeMappings();\n }\n\n private keyTypeChanged(): void {\n this.updateColumnConfig();\n }\n\n private removeMappingObservers(): void {\n this.mappingNotifiers.forEach(notifier => {\n notifier.unsubscribe(this);\n });\n this.mappingNotifiers = [];\n }\n\n private observeMappings(): void {\n this.removeMappingObservers();\n\n for (const mapping of this.mappings) {\n const notifier = Observable.getNotifier(mapping);\n notifier.subscribe(this);\n this.mappingNotifiers.push(notifier);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/enum-base/index.ts"],"names":[],"mappings":";AAAA,OAAO,EACH,IAAI,EAEJ,UAAU,EACV,UAAU,EAEb,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAI7C,OAA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QACH,OAAO,cAAc,CAAC;IAC1B,CAAC;IAEO,gBAAgB;QACpB,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,CAAC,0BAA0B,GAAG,IAAI,CAAC,SAAS,CAAC;IACrE,CAAC;IAEO,eAAe;QACnB,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC1B,IAAI,CAAC,eAAe,EAAE,CAAC;IAC3B,CAAC;IAEO,cAAc;QAClB,IAAI,CAAC,kBAAkB,EAAE,CAAC;IAC9B,CAAC;IAEO,sBAAsB;QAC1B,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YACrC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAC;IAC/B,CAAC;IAEO,eAAe;QACnB,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAE9B,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;YAClC,MAAM,QAAQ,GAAG,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACjD,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACzC,CAAC;IACL,CAAC;CACJ;AAtFU;IADN,UAAU;qDAC8B;AAGlC;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;sDACR;AAGnB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;oDACU","sourcesContent":["import {\n attr,\n type Notifier,\n Observable,\n observable,\n type Subscriber\n} from '@ni/fast-element';\nimport type {\n TableStringField,\n TableBooleanField,\n TableNumberField\n} from '../../table/types';\nimport { TableColumn } from '../base';\nimport { Mapping } from '../../mapping/base';\nimport type { MappingKeyType } from './types';\nimport type { MappingConfig } from './models/mapping-config';\nimport type { MappingKey } from '../../mapping/base/types';\nimport { resolveKeyWithType } from './models/mapping-key-resolver';\nimport type { TableColumnEnumBaseValidator } from './models/table-column-enum-base-validator';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\n\nexport type TableColumnEnumCellRecord = TableStringField<'value'>\n | TableBooleanField<'value'>\n | TableNumberField<'value'>;\nexport type MappingConfigs = Map<MappingKey, MappingConfig>;\nexport interface TableColumnEnumColumnConfig extends TableColumnTextBaseColumnConfig {\n mappingConfigs: MappingConfigs;\n}\n\n/**\n * Base class for table columns that map values to content\n */\nexport abstract class TableColumnEnumBase<\n TColumnConfig extends TableColumnEnumColumnConfig,\n TEnumValidator extends TableColumnEnumBaseValidator<[]>\n>\n extends TableColumn<TColumnConfig, TEnumValidator>\n implements Subscriber {\n /** @internal */\n public mappingNotifiers: Notifier[] = [];\n\n /** @internal */\n @observable\n public mappings: Mapping<unknown>[] = [];\n\n @attr({ attribute: 'field-name' })\n public fieldName?: string;\n\n @attr({ attribute: 'key-type' })\n public keyType: MappingKeyType = 'string';\n\n /**\n * @internal\n *\n * Triggers a request to update the columnConfig when any observable property on\n * a mapping is updated.\n */\n public handleChange(source: unknown, args: unknown): void {\n if (source instanceof Mapping && typeof args === 'string') {\n this.updateColumnConfig();\n }\n }\n\n /**\n * Implementations should throw an error if an invalid Mapping is passed.\n */\n protected abstract createMappingConfig(\n mapping: Mapping<unknown>\n ): MappingConfig;\n\n protected abstract createColumnConfig(\n mappingConfigs: MappingConfigs\n ): TColumnConfig;\n\n /**\n * Called when any Mapping related state has changed.\n */\n private updateColumnConfig(): void {\n this.columnInternals.validator.validate(this.mappings, this.keyType);\n this.columnInternals.columnConfig = this.checkValidity()\n ? this.createColumnConfig(this.getMappingConfigs())\n : undefined;\n }\n\n private getMappingConfigs(): MappingConfigs {\n const mappingConfigs = new Map<MappingKey, MappingConfig>();\n this.mappings.forEach(mapping => {\n const key = resolveKeyWithType(mapping.key, this.keyType);\n if (key === undefined) {\n throw Error(\n 'Key was invalid for type. Validation should have prevented this.'\n );\n }\n const mappingConfig = this.createMappingConfig(mapping);\n mappingConfigs.set(key, mappingConfig);\n });\n return mappingConfigs;\n }\n\n private fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName];\n this.columnInternals.operandDataRecordFieldName = this.fieldName;\n }\n\n private mappingsChanged(): void {\n this.updateColumnConfig();\n this.observeMappings();\n }\n\n private keyTypeChanged(): void {\n this.updateColumnConfig();\n }\n\n private removeMappingObservers(): void {\n this.mappingNotifiers.forEach(notifier => {\n notifier.unsubscribe(this);\n });\n this.mappingNotifiers = [];\n }\n\n private observeMappings(): void {\n this.removeMappingObservers();\n\n for (const mapping of this.mappings) {\n const notifier = Observable.getNotifier(mapping);\n notifier.subscribe(this);\n this.mappingNotifiers.push(notifier);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/enum-base/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACZ,CAAC","sourcesContent":["/**\n * Input data types for mapping-based columns\n * @public\n */\nexport const MappingKeyType = {\n string: 'string',\n number: 'number',\n boolean: 'boolean'\n} as const;\nexport type MappingKeyType =\n (typeof MappingKeyType)[keyof typeof MappingKeyType];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/enum-base/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;CACZ,CAAC","sourcesContent":["/**\n * Input data types for mapping-based columns\n * @public\n */\nexport const MappingKeyType = {\n string: 'string',\n number: 'number',\n boolean: 'boolean'\n} as const;\nexport type MappingKeyType = (typeof MappingKeyType)[keyof typeof MappingKeyType];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/mapping/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,WAAW;CACf,CAAC","sourcesContent":["/**\n * Width mode for the mapping column\n */\nexport const TableColumnMappingWidthMode = {\n default: undefined,\n iconSize: 'icon-size'\n} as const;\nexport type TableColumnMappingWidthMode =\n (typeof TableColumnMappingWidthMode)[keyof typeof TableColumnMappingWidthMode];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/mapping/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;IACvC,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,WAAW;CACf,CAAC","sourcesContent":["/**\n * Width mode for the mapping column\n */\nexport const TableColumnMappingWidthMode = {\n default: undefined,\n iconSize: 'icon-size'\n} as const;\nexport type TableColumnMappingWidthMode = (typeof TableColumnMappingWidthMode)[keyof typeof TableColumnMappingWidthMode];\n"]}
@@ -58,9 +58,7 @@ export function mixinCustomSortOrderColumnAPI(base) {
58
58
  }
59
59
  }
60
60
  }
61
- attr({ attribute: 'sort-by-field-name' })(
62
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
63
- CustomSortOrderColumn.prototype, 'sortByFieldName');
61
+ attr({ attribute: 'sort-by-field-name' })(CustomSortOrderColumn.prototype, 'sortByFieldName');
64
62
  return CustomSortOrderColumn;
65
63
  }
66
64
  //# sourceMappingURL=custom-sort-order.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"custom-sort-order.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/custom-sort-order.ts"],"names":[],"mappings":"AAAA,OAAO,EA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AAgB;QACT,iCAAiC,CACpC,OAAgB,EAChB,IAAa;YAEb,IAAI,IAAI,KAAK,kBAAkB,EAAE,CAAC;gBAC9B,IAAI,CAAC,iCAAiC,EAAE,CAAC;YAC7C,CAAC;QACL,CAAC;QAED,gBAAgB;QACT,iCAAiC;YACpC,MAAM,sBAAsB,GAAG,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ,CAAC;YACxE,MAAM,iBAAiB,GAAG,CAAC,IAAI,CAAC,eAAe,CAAC,gBAAgB,CAAC;YACjE,MAAM,OAAO,GAAG,CAAC,iBAAiB,IAAI,CAAC,sBAAsB,CAAC;YAC9D,IAAI,OAAO,EAAE,CAAC;gBACV,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,OAAO,CAClC,+BAA+B,CAClC,CAAC;YACN,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,eAAe,CAAC,SAAS,CAAC,KAAK,CAChC,+BAA+B,CAClC,CAAC;YACN,CAAC;QACL,CAAC;KACJ;IAED,IAAI,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,CAAC;IACrC,iEAAiE;IACjE,qBAAqB,CAAC,SAAS,EAC/B,iBAAiB,CACpB,CAAC;IAEF,OAAO,qBAAqB,CAAC;AACjC,CAAC","sourcesContent":["import { type Notifier, Observable, attr } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\nimport { TableColumnSortOperation } from '../base/types';\nimport type { ColumnValidator } from '../base/models/column-validator';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype CustomSortOrderTableColumn<\n TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>\n> = Pick<TableColumn<unknown, TColumnValidator>, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype CustomSortOrderTableColumnConstructor<TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>> = abstract new (...args: any[]) => CustomSortOrderTableColumn<TColumnValidator>;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinCustomSortOrderColumnAPI<\n TBase extends CustomSortOrderTableColumnConstructor<TColumnValidator>,\n TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow sorting\n * by a field other than the default for that column.\n */\n abstract class CustomSortOrderColumn extends base {\n public sortByFieldName?: string;\n\n /** @internal */\n public customSortOrderColumnNotifier?: Notifier;\n\n /** @internal */\n public customSortOrderColumnChangeHandler = {\n handleChange: this.handleCustomSortOrderColumnChange.bind(this)\n };\n\n public getResolvedOperandDataRecordFieldName(\n initialOperandFieldName: string | undefined\n ): string | undefined {\n return typeof this.sortByFieldName === 'string'\n ? this.sortByFieldName\n : initialOperandFieldName;\n }\n\n public getResolvedSortOperation(\n initialSortOperation: TableColumnSortOperation\n ): TableColumnSortOperation {\n return typeof this.sortByFieldName === 'string'\n ? TableColumnSortOperation.basic\n : initialSortOperation;\n }\n\n /** @internal */\n public sortByFieldNameChanged(): void {\n this.handleSortConfigurationChange();\n this.updateCustomColumnSortingValidity();\n\n if (\n typeof this.sortByFieldName === 'string'\n && !this.customSortOrderColumnNotifier\n ) {\n this.customSortOrderColumnNotifier = Observable.getNotifier(\n this.columnInternals\n );\n this.customSortOrderColumnNotifier.subscribe(\n this.customSortOrderColumnChangeHandler\n );\n } else {\n this.customSortOrderColumnNotifier?.unsubscribe(\n this.customSortOrderColumnChangeHandler\n );\n this.customSortOrderColumnNotifier = undefined;\n }\n }\n\n public abstract handleSortConfigurationChange(): void;\n\n /** @internal */\n public handleCustomSortOrderColumnChange(\n _source: unknown,\n args: unknown\n ): void {\n if (args === 'groupingDisabled') {\n this.updateCustomColumnSortingValidity();\n }\n }\n\n /** @internal */\n public updateCustomColumnSortingValidity(): void {\n const hasCustomColumnSorting = typeof this.sortByFieldName === 'string';\n const isGroupingEnabled = !this.columnInternals.groupingDisabled;\n const isValid = !isGroupingEnabled || !hasCustomColumnSorting;\n if (isValid) {\n this.columnInternals.validator.untrack(\n 'invalidCustomSortWithGrouping'\n );\n } else {\n this.columnInternals.validator.track(\n 'invalidCustomSortWithGrouping'\n );\n }\n }\n }\n\n attr({ attribute: 'sort-by-field-name' })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n CustomSortOrderColumn.prototype,\n 'sortByFieldName'\n );\n\n return CustomSortOrderColumn;\n}\n"]}
1
+ {"version":3,"file":"custom-sort-order.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/custom-sort-order.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAWzD,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,6BAA6B,CAG3C,IAAW;IACT;;;OAGG;IACH,MAAe,qBAAsB,SAAQ,IAAI;QAAjD;;YAMI,gBAAgB;YACT,uCAAkC,GAAG;gBACxC,YAAY,EAAE,IAAI,CAAC,iCAAiC,CAAC,IAAI,CAAC,IAAI,CAAC;aAClE,CAAC;QAoEN,CAAC;QAlEU,qCAAqC,CACxC,uBAA2C;YAE3C,OAAO,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ;gBAC3C,CAAC,CAAC,IAAI,CAAC,eAAe;gBACtB,CAAC,CAAC,uBAAuB,CAAC;QAClC,CAAC;QAEM,wBAAwB,CAC3B,oBAA8C;YAE9C,OAAO,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ;gBAC3C,CAAC,CAAC,wBAAwB,CAAC,KAAK;gBAChC,CAAC,CAAC,oBAAoB,CAAC;QAC/B,CAAC;QAED,gBAAgB;QACT,sBAAsB;YACzB,IAAI,CAAC,6BAA6B,EAAE,CAAC;YACrC,IAAI,CAAC,iCAAiC,EAAE,CAAC;YAEzC,I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/fast-element';\nimport type { TableColumn } from '../base';\nimport { TableColumnSortOperation } from '../base/types';\nimport type { ColumnValidator } from '../base/models/column-validator';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype CustomSortOrderTableColumn<\n TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>\n> = Pick<TableColumn<unknown, TColumnValidator>, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype CustomSortOrderTableColumnConstructor<TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>> = abstract new (...args: any[]) => CustomSortOrderTableColumn<TColumnValidator>;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinCustomSortOrderColumnAPI<\n TBase extends CustomSortOrderTableColumnConstructor<TColumnValidator>,\n TColumnValidator extends ColumnValidator<['invalidCustomSortWithGrouping']>\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow sorting\n * by a field other than the default for that column.\n */\n abstract class CustomSortOrderColumn extends base {\n public sortByFieldName?: string;\n\n /** @internal */\n public customSortOrderColumnNotifier?: Notifier;\n\n /** @internal */\n public customSortOrderColumnChangeHandler = {\n handleChange: this.handleCustomSortOrderColumnChange.bind(this)\n };\n\n public getResolvedOperandDataRecordFieldName(\n initialOperandFieldName: string | undefined\n ): string | undefined {\n return typeof this.sortByFieldName === 'string'\n ? this.sortByFieldName\n : initialOperandFieldName;\n }\n\n public getResolvedSortOperation(\n initialSortOperation: TableColumnSortOperation\n ): TableColumnSortOperation {\n return typeof this.sortByFieldName === 'string'\n ? TableColumnSortOperation.basic\n : initialSortOperation;\n }\n\n /** @internal */\n public sortByFieldNameChanged(): void {\n this.handleSortConfigurationChange();\n this.updateCustomColumnSortingValidity();\n\n if (\n typeof this.sortByFieldName === 'string'\n && !this.customSortOrderColumnNotifier\n ) {\n this.customSortOrderColumnNotifier = Observable.getNotifier(\n this.columnInternals\n );\n this.customSortOrderColumnNotifier.subscribe(\n this.customSortOrderColumnChangeHandler\n );\n } else {\n this.customSortOrderColumnNotifier?.unsubscribe(\n this.customSortOrderColumnChangeHandler\n );\n this.customSortOrderColumnNotifier = undefined;\n }\n }\n\n public abstract handleSortConfigurationChange(): void;\n\n /** @internal */\n public handleCustomSortOrderColumnChange(\n _source: unknown,\n args: unknown\n ): void {\n if (args === 'groupingDisabled') {\n this.updateCustomColumnSortingValidity();\n }\n }\n\n /** @internal */\n public updateCustomColumnSortingValidity(): void {\n const hasCustomColumnSorting = typeof this.sortByFieldName === 'string';\n const isGroupingEnabled = !this.columnInternals.groupingDisabled;\n const isValid = !isGroupingEnabled || !hasCustomColumnSorting;\n if (isValid) {\n this.columnInternals.validator.untrack(\n 'invalidCustomSortWithGrouping'\n );\n } else {\n this.columnInternals.validator.track(\n 'invalidCustomSortWithGrouping'\n );\n }\n }\n }\n\n attr({ attribute: 'sort-by-field-name' })(\n CustomSortOrderColumn.prototype,\n 'sortByFieldName'\n );\n\n return CustomSortOrderColumn;\n}\n"]}
@@ -15,12 +15,8 @@ export function mixinFractionalWidthColumnAPI(base) {
15
15
  this.columnInternals.minPixelWidth = this.minPixelWidth ?? defaultMinPixelWidth;
16
16
  }
17
17
  }
18
- attr({ attribute: 'fractional-width', converter: nullableNumberConverter })(
19
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
20
- FractionalWidthColumn.prototype, 'fractionalWidth');
21
- attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })(
22
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
23
- FractionalWidthColumn.prototype, 'minPixelWidth');
18
+ attr({ attribute: 'fractional-width', converter: nullableNumberConverter })(FractionalWidthColumn.prototype, 'fractionalWidth');
19
+ attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })(FractionalWidthColumn.prototype, 'minPixelWidth');
24
20
  return FractionalWidthColumn;
25
21
  }
26
22
  //# sourceMappingURL=fractional-width-column.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fractional-width-column.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/fractional-width-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAQ7E,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,6BAA6B,CAE3C,IAAW;IACT;;;OAGG;IACH,MAAe,qBAAsB,SAAQ,IAAI;QAKtC,sBAAsB;YACzB,IAAI,CAAC,eAAe,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,sBAAsB,CAAC;QAC1F,CAAC;QAEM,oBAAoB;YACvB,IAAI,CAAC,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,IAAI,oBAAoB,CAAC;QACpF,CAAC;KACJ;IAED,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC;IACvE,iEAAiE;IACjE,qBAAqB,CAAC,SAAS,EAC/B,iBAAiB,CACpB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC;IACtE,iEAAiE;IACjE,qBAAqB,CAAC,SAAS,EAC/B,eAAe,CAClB,CAAC;IACF,OAAO,qBAAqB,CAAC;AACjC,CAAC","sourcesContent":["import { attr, nullableNumberConverter } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\nimport { defaultMinPixelWidth, defaultFractionalWidth } from '../base/types';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype SizedTableColumn = Pick<TableColumn, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SizedTableColumnConstructor = abstract new (...args: any[]) => SizedTableColumn;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinFractionalWidthColumnAPI<\n TBase extends SizedTableColumnConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to support being resized\n * proportionally within a Table.\n */\n abstract class FractionalWidthColumn extends base {\n public fractionalWidth?: number | null;\n\n public minPixelWidth?: number | null;\n\n public fractionalWidthChanged(): void {\n this.columnInternals.fractionalWidth = this.fractionalWidth ?? defaultFractionalWidth;\n }\n\n public minPixelWidthChanged(): void {\n this.columnInternals.minPixelWidth = this.minPixelWidth ?? defaultMinPixelWidth;\n }\n }\n\n attr({ attribute: 'fractional-width', converter: nullableNumberConverter })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n FractionalWidthColumn.prototype,\n 'fractionalWidth'\n );\n attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n FractionalWidthColumn.prototype,\n 'minPixelWidth'\n );\n return FractionalWidthColumn;\n}\n"]}
1
+ {"version":3,"file":"fractional-width-column.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/fractional-width-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAQ7E,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,6BAA6B,CAE3C,IAAW;IACT;;;OAGG;IACH,MAAe,qBAAsB,SAAQ,IAAI;QAKtC,sBAAsB;YACzB,IAAI,CAAC,eAAe,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,IAAI,sBAAsB,CAAC;QAC1F,CAAC;QAEM,oBAAoB;YACvB,IAAI,CAAC,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,IAAI,oBAAoB,CAAC;QACpF,CAAC;KACJ;IAED,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC,CACvE,qBAAqB,CAAC,SAAS,EAC/B,iBAAiB,CACpB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC,CACtE,qBAAqB,CAAC,SAAS,EAC/B,eAAe,CAClB,CAAC;IACF,OAAO,qBAAqB,CAAC;AACjC,CAAC","sourcesContent":["import { attr, nullableNumberConverter } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\nimport { defaultMinPixelWidth, defaultFractionalWidth } from '../base/types';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype SizedTableColumn = Pick<TableColumn, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SizedTableColumnConstructor = abstract new (...args: any[]) => SizedTableColumn;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinFractionalWidthColumnAPI<\n TBase extends SizedTableColumnConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to support being resized\n * proportionally within a Table.\n */\n abstract class FractionalWidthColumn extends base {\n public fractionalWidth?: number | null;\n\n public minPixelWidth?: number | null;\n\n public fractionalWidthChanged(): void {\n this.columnInternals.fractionalWidth = this.fractionalWidth ?? defaultFractionalWidth;\n }\n\n public minPixelWidthChanged(): void {\n this.columnInternals.minPixelWidth = this.minPixelWidth ?? defaultMinPixelWidth;\n }\n }\n\n attr({ attribute: 'fractional-width', converter: nullableNumberConverter })(\n FractionalWidthColumn.prototype,\n 'fractionalWidth'\n );\n attr({ attribute: 'min-pixel-width', converter: nullableNumberConverter })(\n FractionalWidthColumn.prototype,\n 'minPixelWidth'\n );\n return FractionalWidthColumn;\n}\n"]}
@@ -18,12 +18,8 @@ export function mixinGroupableColumnAPI(base) {
18
18
  this.columnInternals.groupIndex = this.groupIndex ?? undefined;
19
19
  }
20
20
  }
21
- attr({ attribute: 'grouping-disabled', mode: 'boolean' })(
22
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
23
- GroupableColumn.prototype, 'groupingDisabled');
24
- attr({ attribute: 'group-index', converter: nullableNumberConverter })(
25
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
26
- GroupableColumn.prototype, 'groupIndex');
21
+ attr({ attribute: 'grouping-disabled', mode: 'boolean' })(GroupableColumn.prototype, 'groupingDisabled');
22
+ attr({ attribute: 'group-index', converter: nullableNumberConverter })(GroupableColumn.prototype, 'groupIndex');
27
23
  return GroupableColumn;
28
24
  }
29
25
  //# sourceMappingURL=groupable-column.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"groupable-column.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/groupable-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AASjE,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,uBAAuB,CAErC,IAAW;IACT;;;OAGG;IACH,MAAe,eAAgB,SAAQ,IAAI;QAA3C;;YACW,qBAAgB,GAAG,KAAK,CAAC;QAWpC,CAAC;QAPU,uBAAuB;YAC1B,IAAI,CAAC,eAAe,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClE,CAAC;QAEM,iBAAiB;YACpB,IAAI,CAAC,eAAe,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC;QACnE,CAAC;KACJ;IACD,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;IACrD,iEAAiE;IACjE,eAAe,CAAC,SAAS,EACzB,kBAAkB,CACrB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC;IAClE,iEAAiE;IACjE,eAAe,CAAC,SAAS,EACzB,YAAY,CACf,CAAC;IAEF,OAAO,eAAe,CAAC;AAC3B,CAAC","sourcesContent":["import { attr, nullableNumberConverter } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype GroupableTableColumn = Pick<TableColumn, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype GroupableTableColumnConstructor = abstract new (...args: any[]) => GroupableTableColumn;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinGroupableColumnAPI<\n TBase extends GroupableTableColumnConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow grouping\n * by the values in that column.\n */\n abstract class GroupableColumn extends base {\n public groupingDisabled = false;\n\n public groupIndex?: number | null;\n\n public groupingDisabledChanged(): void {\n this.columnInternals.groupingDisabled = this.groupingDisabled;\n }\n\n public groupIndexChanged(): void {\n this.columnInternals.groupIndex = this.groupIndex ?? undefined;\n }\n }\n attr({ attribute: 'grouping-disabled', mode: 'boolean' })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n GroupableColumn.prototype,\n 'groupingDisabled'\n );\n attr({ attribute: 'group-index', converter: nullableNumberConverter })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n GroupableColumn.prototype,\n 'groupIndex'\n );\n\n return GroupableColumn;\n}\n"]}
1
+ {"version":3,"file":"groupable-column.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/groupable-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AASjE,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,uBAAuB,CAErC,IAAW;IACT;;;OAGG;IACH,MAAe,eAAgB,SAAQ,IAAI;QAA3C;;YACW,qBAAgB,GAAG,KAAK,CAAC;QAWpC,CAAC;QAPU,uBAAuB;YAC1B,IAAI,CAAC,eAAe,CAAC,gBAAgB,GAAG,IAAI,CAAC,gBAAgB,CAAC;QAClE,CAAC;QAEM,iBAAiB;YACpB,IAAI,CAAC,eAAe,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,IAAI,SAAS,CAAC;QACnE,CAAC;KACJ;IACD,IAAI,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CACrD,eAAe,CAAC,SAAS,EACzB,kBAAkB,CACrB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC,CAClE,eAAe,CAAC,SAAS,EACzB,YAAY,CACf,CAAC;IAEF,OAAO,eAAe,CAAC;AAC3B,CAAC","sourcesContent":["import { attr, nullableNumberConverter } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype GroupableTableColumn = Pick<TableColumn, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype GroupableTableColumnConstructor = abstract new (...args: any[]) => GroupableTableColumn;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinGroupableColumnAPI<\n TBase extends GroupableTableColumnConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow grouping\n * by the values in that column.\n */\n abstract class GroupableColumn extends base {\n public groupingDisabled = false;\n\n public groupIndex?: number | null;\n\n public groupingDisabledChanged(): void {\n this.columnInternals.groupingDisabled = this.groupingDisabled;\n }\n\n public groupIndexChanged(): void {\n this.columnInternals.groupIndex = this.groupIndex ?? undefined;\n }\n }\n attr({ attribute: 'grouping-disabled', mode: 'boolean' })(\n GroupableColumn.prototype,\n 'groupingDisabled'\n );\n attr({ attribute: 'group-index', converter: nullableNumberConverter })(\n GroupableColumn.prototype,\n 'groupIndex'\n );\n\n return GroupableColumn;\n}\n"]}
@@ -8,9 +8,7 @@ export function mixinColumnWithPlaceholderAPI(base) {
8
8
  */
9
9
  class ColumnWithPlaceholder extends base {
10
10
  }
11
- attr({ attribute: 'placeholder' })(
12
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
13
- ColumnWithPlaceholder.prototype, 'placeholder');
11
+ attr({ attribute: 'placeholder' })(ColumnWithPlaceholder.prototype, 'placeholder');
14
12
  return ColumnWithPlaceholder;
15
13
  }
16
14
  //# sourceMappingURL=placeholder.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/placeholder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAUxC,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,6BAA6B,CAE3C,IAAW;IACT;;;OAGG;IACH,MAAe,qBAAsB,SAAQ,IAAI;KAKhD;IACD,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;IAC9B,iEAAiE;IACjE,qBAAqB,CAAC,SAAS,EAC/B,aAAa,CAChB,CAAC;IAEF,OAAO,qBAAqB,CAAC;AACjC,CAAC","sourcesContent":["import { attr } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\n// Because the 'placeholder' mixin doesn't depend on any properties of the TableColumn, there are no properties to pick.\ntype TableColumnWithPlaceholder = Pick<TableColumn, never>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype TableColumnWithPlaceholderConstructor = abstract new (...args: any[]) => TableColumnWithPlaceholder;\n\n// As the returned class is internal to the function, we can't write a signature that uses it directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinColumnWithPlaceholderAPI<\n TBase extends TableColumnWithPlaceholderConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow grouping\n * by the values in that column.\n */\n abstract class ColumnWithPlaceholder extends base {\n public placeholder?: string;\n\n /** @internal */\n public abstract placeholderChanged(): void;\n }\n attr({ attribute: 'placeholder' })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n ColumnWithPlaceholder.prototype,\n 'placeholder'\n );\n\n return ColumnWithPlaceholder;\n}\n"]}
1
+ {"version":3,"file":"placeholder.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/placeholder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAUxC,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,6BAA6B,CAE3C,IAAW;IACT;;;OAGG;IACH,MAAe,qBAAsB,SAAQ,IAAI;KAKhD;IACD,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAC9B,qBAAqB,CAAC,SAAS,EAC/B,aAAa,CAChB,CAAC;IAEF,OAAO,qBAAqB,CAAC;AACjC,CAAC","sourcesContent":["import { attr } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\n// Because the 'placeholder' mixin doesn't depend on any properties of the TableColumn, there are no properties to pick.\ntype TableColumnWithPlaceholder = Pick<TableColumn, never>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype TableColumnWithPlaceholderConstructor = abstract new (...args: any[]) => TableColumnWithPlaceholder;\n\n// As the returned class is internal to the function, we can't write a signature that uses it directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinColumnWithPlaceholderAPI<\n TBase extends TableColumnWithPlaceholderConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow grouping\n * by the values in that column.\n */\n abstract class ColumnWithPlaceholder extends base {\n public placeholder?: string;\n\n /** @internal */\n public abstract placeholderChanged(): void;\n }\n attr({ attribute: 'placeholder' })(\n ColumnWithPlaceholder.prototype,\n 'placeholder'\n );\n\n return ColumnWithPlaceholder;\n}\n"]}
@@ -38,15 +38,9 @@ export function mixinSortableColumnAPI(base) {
38
38
  }
39
39
  }
40
40
  }
41
- attr({ attribute: 'sorting-disabled', mode: 'boolean' })(
42
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
43
- SortableColumn.prototype, 'sortingDisabled');
44
- attr({ attribute: 'sort-index', converter: nullableNumberConverter })(
45
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
46
- SortableColumn.prototype, 'sortIndex');
47
- attr({ attribute: 'sort-direction' })(
48
- // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
49
- SortableColumn.prototype, 'sortDirection');
41
+ attr({ attribute: 'sorting-disabled', mode: 'boolean' })(SortableColumn.prototype, 'sortingDisabled');
42
+ attr({ attribute: 'sort-index', converter: nullableNumberConverter })(SortableColumn.prototype, 'sortIndex');
43
+ attr({ attribute: 'sort-direction' })(SortableColumn.prototype, 'sortDirection');
50
44
  return SortableColumn;
51
45
  }
52
46
  //# sourceMappingURL=sortable-column.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sortable-column.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/sortable-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAQ7D,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,sBAAsB,CAEpC,IAAW;IAC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,WAAW,CACd,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IACjC,iEAAiE;IACjE,cAAc,CAAC,SAAS,EACxB,eAAe,CAClB,CAAC;IAEF,OAAO,cAAc,CAAC;AAC1B,CAAC","sourcesContent":["import { attr, nullableNumberConverter } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\nimport { TableColumnSortDirection } from '../../table/types';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype SortableTableColumn = Pick<TableColumn, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SortableTableColumnConstructor = abstract new (...args: any[]) => SortableTableColumn;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinSortableColumnAPI<\n TBase extends SortableTableColumnConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow sorting\n * by the values in that column.\n */\n abstract class SortableColumn extends base {\n public sortingDisabled = false;\n\n public sortIndex?: number | null;\n\n public sortDirection: TableColumnSortDirection = TableColumnSortDirection.none;\n\n /** @internal */\n public sortingDisabledChanged(): void {\n this.columnInternals.sortingDisabled = this.sortingDisabled;\n if (this.sortingDisabled) {\n this.columnInternals.currentSortDirection = TableColumnSortDirection.none;\n this.columnInternals.currentSortIndex = undefined;\n } else {\n this.columnInternals.currentSortDirection = this.sortDirection;\n this.columnInternals.currentSortIndex = this.sortIndex ?? undefined;\n }\n }\n\n /** @internal */\n public sortDirectionChanged(): void {\n if (!this.sortingDisabled) {\n this.columnInternals.currentSortDirection = this.sortDirection;\n }\n }\n\n /** @internal */\n public sortIndexChanged(): void {\n if (!this.sortingDisabled) {\n this.columnInternals.currentSortIndex = this.sortIndex ?? undefined;\n }\n }\n }\n attr({ attribute: 'sorting-disabled', mode: 'boolean' })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n SortableColumn.prototype,\n 'sortingDisabled'\n );\n attr({ attribute: 'sort-index', converter: nullableNumberConverter })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n SortableColumn.prototype,\n 'sortIndex'\n );\n attr({ attribute: 'sort-direction' })(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n SortableColumn.prototype,\n 'sortDirection'\n );\n\n return SortableColumn;\n}\n"]}
1
+ {"version":3,"file":"sortable-column.js","sourceRoot":"","sources":["../../../../src/table-column/mixins/sortable-column.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAEjE,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAQ7D,4HAA4H;AAC5H,+HAA+H;AAC/H,MAAM,UAAU,sBAAsB,CAEpC,IAAW;IACT;;;OAGG;IACH,MAAe,cAAe,SAAQ,IAAI;QAA1C;;YACW,oBAAe,GAAG,KAAK,CAAC;YAIxB,kBAAa,GAA6B,wBAAwB,CAAC,IAAI,CAAC;QA2BnF,CAAC;QAzBG,gBAAgB;QACT,sBAAsB;YACzB,IAAI,CAAC,eAAe,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC;YAC5D,IAAI,IAAI,CAAC,eAAe,EAAE,CAAC;gBACvB,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,wBAAwB,CAAC,IAAI,CAAC;gBAC1E,IAAI,CAAC,eAAe,CAAC,gBAAgB,GAAG,SAAS,CAAC;YACtD,CAAC;iBAAM,CAAC;gBACJ,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC;gBAC/D,IAAI,CAAC,eAAe,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC;YACxE,CAAC;QACL,CAAC;QAED,gBAAgB;QACT,oBAAoB;YACvB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;gBACxB,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,IAAI,CAAC,aAAa,CAAC;YACnE,CAAC;QACL,CAAC;QAED,gBAAgB;QACT,gBAAgB;YACnB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;gBACxB,IAAI,CAAC,eAAe,CAAC,gBAAgB,GAAG,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC;YACxE,CAAC;QACL,CAAC;KACJ;IACD,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CACpD,cAAc,CAAC,SAAS,EACxB,iBAAiB,CACpB,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,uBAAuB,EAAE,CAAC,CACjE,cAAc,CAAC,SAAS,EACxB,WAAW,CACd,CAAC;IACF,IAAI,CAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CACjC,cAAc,CAAC,SAAS,EACxB,eAAe,CAClB,CAAC;IAEF,OAAO,cAAc,CAAC;AAC1B,CAAC","sourcesContent":["import { attr, nullableNumberConverter } from '@ni/fast-element';\nimport type { TableColumn } from '../base';\nimport { TableColumnSortDirection } from '../../table/types';\n\n// Pick just the relevant properties the mixin depends on (typescript complains if the mixin declares private / protected base exports)\ntype SortableTableColumn = Pick<TableColumn, 'columnInternals'>;\n// prettier-ignore\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype SortableTableColumnConstructor = abstract new (...args: any[]) => SortableTableColumn;\n\n// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinSortableColumnAPI<\n TBase extends SortableTableColumnConstructor\n>(base: TBase) {\n /**\n * The Mixin that provides a concrete column with the API to allow sorting\n * by the values in that column.\n */\n abstract class SortableColumn extends base {\n public sortingDisabled = false;\n\n public sortIndex?: number | null;\n\n public sortDirection: TableColumnSortDirection = TableColumnSortDirection.none;\n\n /** @internal */\n public sortingDisabledChanged(): void {\n this.columnInternals.sortingDisabled = this.sortingDisabled;\n if (this.sortingDisabled) {\n this.columnInternals.currentSortDirection = TableColumnSortDirection.none;\n this.columnInternals.currentSortIndex = undefined;\n } else {\n this.columnInternals.currentSortDirection = this.sortDirection;\n this.columnInternals.currentSortIndex = this.sortIndex ?? undefined;\n }\n }\n\n /** @internal */\n public sortDirectionChanged(): void {\n if (!this.sortingDisabled) {\n this.columnInternals.currentSortDirection = this.sortDirection;\n }\n }\n\n /** @internal */\n public sortIndexChanged(): void {\n if (!this.sortingDisabled) {\n this.columnInternals.currentSortIndex = this.sortIndex ?? undefined;\n }\n }\n }\n attr({ attribute: 'sorting-disabled', mode: 'boolean' })(\n SortableColumn.prototype,\n 'sortingDisabled'\n );\n attr({ attribute: 'sort-index', converter: nullableNumberConverter })(\n SortableColumn.prototype,\n 'sortIndex'\n );\n attr({ attribute: 'sort-direction' })(\n SortableColumn.prototype,\n 'sortDirection'\n );\n\n return SortableColumn;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"number-text-unit-format.js","sourceRoot":"","sources":["../../../../../src/table-column/number-text/models/number-text-unit-format.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EAEb,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAUvF;;GAEG;AACH,MAAM,OAAO,oBAAqB,SAAQ,UAAU;IAKhD,YAAmB,MAAc,EAAE,OAAqC;QACpE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,CAA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AAE,CAAC;YACxB,qBAAqB,EAAE,oBAAoB;YAC3C,SAAS;SACZ,CAAC,CAAC;IACP,CAAC;IAEO,cAAc,CAClB,OAAqC;QAErC,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,gBAAgB,KAAK,gBAAgB,CAAC,OAAO,EAAE,CAAC;YACpE,OAAO;gBACH,gBAAgB,EAAE,gBAAgB,CAAC,OAAO;gBAC1C,aAAa,EAAE,SAAS;gBACxB,oBAAoB,EAAE,SAAS;gBAC/B,SAAS,EAAE,OAAO,EAAE,SAAS,IAAI,oBAAoB;aACxD,CAAC;QACN,CAAC;QACD,MAAM,gBAAgB,GAAG,OAAO,OAAO,CAAC,aAAa,KAAK,QAAQ,CAAC;QACnE,MAAM,uBAAuB,GAAG,OAAO,OAAO,CAAC,oBAAoB,KAAK,QAAQ,CAAC;QACjF,IAAI,gBAAgB,IAAI,uBAAuB,EAAE,CAAC;YAC9C,MAAM,IAAI,KAAK,CACX,qFAAqF,CACxF,CAAC;QACN,CAAC;QACD,IAAI,CAAC,gBAAgB,IAAI,CAAC,uBAAuB,EAAE,CAAC;YAChD,OAAO;gBACH,gBAAgB,EAAE,gBAAgB,CAAC,OAAO;gBAC1C,aAAa,EAAE,oBAAoB,CAAC,oBAAoB;gBACxD,oBAAoB,EAAE,SAAS;gBAC/B,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,oBAAoB;aACvD,CAAC;QACN,CAAC;QACD,OAAO;YACH,gBAAgB,EAAE,gBAAgB,CAAC,OAAO;YAC1C,aAAa,EAAE,OAAO,CAAC,aAAa;YACpC,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;YAClD,SAAS,EAAE,OAAO,CAAC,SAAS,IAAI,oBAAoB;SACvD,CAAC;IACN,CAAC;;AAhGuB,yCAAoB,GAAG,CAAC,CAAC","sourcesContent":["import {\n UnitFormat,\n type UnitFormatOptions\n} from '../../../utilities/unit-format/unit-format';\nimport { passthroughUnitScale } from '../../../utilities/unit-format/unit-scale/passthrough-unit-scale';\nimport { NumberTextFormat } from '../types';\nimport { DefaultUnitFormat } from '../../../utilities/unit-format/default-unit-format';\nimport { DecimalUnitFormat } from '../../../utilities/unit-format/decimal-unit-format';\n\nexport interface NumberTextUnitFormatOptions extends UnitFormatOptions {\n numberTextFormat?: NumberTextFormat;\n decimalDigits?: number;\n decimalMaximumDigits?: number;\n}\ntype ResolvedNumberTextUnitFormatOptions = NumberTextUnitFormatOptions &\n Required<UnitFormatOptions>;\n\n/**\n * Format for numbers (with optional units) in a number-text table column.\n */\nexport class NumberTextUnitFormat extends UnitFormat {\n private static readonly defaultDecimalDigits = 2;\n private readonly resolvedUnitFormat: DefaultUnitFormat | DecimalUnitFormat;\n private readonly _resolvedOptions: ResolvedNumberTextUnitFormatOptions;\n\n public constructor(locale: string, options?: NumberTextUnitFormatOptions) {\n super();\n this._resolvedOptions = this.resolveOptions(options);\n this.resolvedUnitFormat = this.resolveUnitFormat(\n locale,\n this._resolvedOptions\n );\n }\n\n public override resolvedOptions(): ResolvedNumberTextUnitFormatOptions {\n return { ...this._resolvedOptions };\n }\n\n public optionsMatch(targetOptions?: NumberTextUnitFormatOptions): boolean {\n const targetResolvedOptions = this.resolveOptions(targetOptions);\n return (\n this._resolvedOptions.decimalDigits\n === targetResolvedOptions.decimalDigits\n && this._resolvedOptions.decimalMaximumDigits\n === targetResolvedOptions.decimalMaximumDigits\n && this._resolvedOptions.numberTextFormat\n === targetResolvedOptions.numberTextFormat\n && this._resolvedOptions.unitScale === targetResolvedOptions.unitScale\n );\n }\n\n protected override tryFormat(number: number): string {\n return this.resolvedUnitFormat.format(number);\n }\n\n private resolveUnitFormat(\n locale: string,\n options: ResolvedNumberTextUnitFormatOptions\n ): DefaultUnitFormat | DecimalUnitFormat {\n const {\n numberTextFormat,\n decimalMaximumDigits,\n decimalDigits,\n unitScale\n } = options;\n\n if (numberTextFormat === NumberTextFormat.default) {\n return new DefaultUnitFormat(locale, {\n unitScale\n });\n }\n if (typeof decimalDigits === 'number') {\n return new DecimalUnitFormat(locale, {\n minimumFractionDigits: decimalDigits,\n maximumFractionDigits: decimalDigits,\n unitScale\n });\n }\n return new DecimalUnitFormat(locale, {\n minimumFractionDigits: 0,\n maximumFractionDigits: decimalMaximumDigits,\n unitScale\n });\n }\n\n private resolveOptions(\n options?: NumberTextUnitFormatOptions\n ): ResolvedNumberTextUnitFormatOptions {\n if (!options || options.numberTextFormat === NumberTextFormat.default) {\n return {\n numberTextFormat: NumberTextFormat.default,\n decimalDigits: undefined,\n decimalMaximumDigits: undefined,\n unitScale: options?.unitScale ?? passthroughUnitScale\n };\n }\n const hasDecimalDigits = typeof options.decimalDigits === 'number';\n const hasDecimalMaximumDigits = typeof options.decimalMaximumDigits === 'number';\n if (hasDecimalDigits && hasDecimalMaximumDigits) {\n throw new Error(\n 'decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.'\n );\n }\n if (!hasDecimalDigits && !hasDecimalMaximumDigits) {\n return {\n numberTextFormat: NumberTextFormat.decimal,\n decimalDigits: NumberTextUnitFormat.defaultDecimalDigits,\n decimalMaximumDigits: undefined,\n unitScale: options.unitScale ?? passthroughUnitScale\n };\n }\n return {\n numberTextFormat: NumberTextFormat.decimal,\n decimalDigits: options.decimalDigits,\n decimalMaximumDigits: options.decimalMaximumDigits,\n unitScale: options.unitScale ?? passthroughUnitScale\n };\n }\n}\n"]}
1
+ {"version":3,"file":"number-text-unit-format.js","sourceRoot":"","sources":["../../../../../src/table-column/number-text/models/number-text-unit-format.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,UAAU,EAEb,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,kEAAkE,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAUvF;;GAEG;AACH,MAAM,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;IACN,CAAC;;AAhGuB,yCAAoB,GAAG,CAAC,CAAC","sourcesContent":["import {\n UnitFormat,\n type UnitFormatOptions\n} from '../../../utilities/unit-format/unit-format';\nimport { passthroughUnitScale } from '../../../utilities/unit-format/unit-scale/passthrough-unit-scale';\nimport { NumberTextFormat } from '../types';\nimport { DefaultUnitFormat } from '../../../utilities/unit-format/default-unit-format';\nimport { DecimalUnitFormat } from '../../../utilities/unit-format/decimal-unit-format';\n\nexport interface NumberTextUnitFormatOptions extends UnitFormatOptions {\n numberTextFormat?: NumberTextFormat;\n decimalDigits?: number;\n decimalMaximumDigits?: number;\n}\ntype ResolvedNumberTextUnitFormatOptions = NumberTextUnitFormatOptions\n & Required<UnitFormatOptions>;\n\n/**\n * Format for numbers (with optional units) in a number-text table column.\n */\nexport class NumberTextUnitFormat extends UnitFormat {\n private static readonly defaultDecimalDigits = 2;\n private readonly resolvedUnitFormat: DefaultUnitFormat | DecimalUnitFormat;\n private readonly _resolvedOptions: ResolvedNumberTextUnitFormatOptions;\n\n public constructor(locale: string, options?: NumberTextUnitFormatOptions) {\n super();\n this._resolvedOptions = this.resolveOptions(options);\n this.resolvedUnitFormat = this.resolveUnitFormat(\n locale,\n this._resolvedOptions\n );\n }\n\n public override resolvedOptions(): ResolvedNumberTextUnitFormatOptions {\n return { ...this._resolvedOptions };\n }\n\n public optionsMatch(targetOptions?: NumberTextUnitFormatOptions): boolean {\n const targetResolvedOptions = this.resolveOptions(targetOptions);\n return (\n this._resolvedOptions.decimalDigits\n === targetResolvedOptions.decimalDigits\n && this._resolvedOptions.decimalMaximumDigits\n === targetResolvedOptions.decimalMaximumDigits\n && this._resolvedOptions.numberTextFormat\n === targetResolvedOptions.numberTextFormat\n && this._resolvedOptions.unitScale === targetResolvedOptions.unitScale\n );\n }\n\n protected override tryFormat(number: number): string {\n return this.resolvedUnitFormat.format(number);\n }\n\n private resolveUnitFormat(\n locale: string,\n options: ResolvedNumberTextUnitFormatOptions\n ): DefaultUnitFormat | DecimalUnitFormat {\n const {\n numberTextFormat,\n decimalMaximumDigits,\n decimalDigits,\n unitScale\n } = options;\n\n if (numberTextFormat === NumberTextFormat.default) {\n return new DefaultUnitFormat(locale, {\n unitScale\n });\n }\n if (typeof decimalDigits === 'number') {\n return new DecimalUnitFormat(locale, {\n minimumFractionDigits: decimalDigits,\n maximumFractionDigits: decimalDigits,\n unitScale\n });\n }\n return new DecimalUnitFormat(locale, {\n minimumFractionDigits: 0,\n maximumFractionDigits: decimalMaximumDigits,\n unitScale\n });\n }\n\n private resolveOptions(\n options?: NumberTextUnitFormatOptions\n ): ResolvedNumberTextUnitFormatOptions {\n if (!options || options.numberTextFormat === NumberTextFormat.default) {\n return {\n numberTextFormat: NumberTextFormat.default,\n decimalDigits: undefined,\n decimalMaximumDigits: undefined,\n unitScale: options?.unitScale ?? passthroughUnitScale\n };\n }\n const hasDecimalDigits = typeof options.decimalDigits === 'number';\n const hasDecimalMaximumDigits = typeof options.decimalMaximumDigits === 'number';\n if (hasDecimalDigits && hasDecimalMaximumDigits) {\n throw new Error(\n 'decimalDigits and decimalMaximumDigits are mutually exclusive. Do not specify both.'\n );\n }\n if (!hasDecimalDigits && !hasDecimalMaximumDigits) {\n return {\n numberTextFormat: NumberTextFormat.decimal,\n decimalDigits: NumberTextUnitFormat.defaultDecimalDigits,\n decimalMaximumDigits: undefined,\n unitScale: options.unitScale ?? passthroughUnitScale\n };\n }\n return {\n numberTextFormat: NumberTextFormat.decimal,\n decimalDigits: options.decimalDigits,\n decimalMaximumDigits: options.decimalMaximumDigits,\n unitScale: options.unitScale ?? passthroughUnitScale\n };\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/number-text/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACZ,CAAC;AAIX;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACR,CAAC","sourcesContent":["/**\n * Formatting scheme for the number-text table column\n */\nexport const NumberTextFormat = {\n default: undefined,\n decimal: 'decimal'\n} as const;\nexport type NumberTextFormat =\n (typeof NumberTextFormat)[keyof typeof NumberTextFormat];\n\n/**\n * The aligment of the value in the number-text table column.\n * The `default` alignment is determined by the column's `NumberTextFormat`.\n */\nexport const NumberTextAlignment = {\n default: undefined,\n left: 'left',\n right: 'right'\n} as const;\nexport type NumberTextAlignment =\n (typeof NumberTextAlignment)[keyof typeof NumberTextAlignment];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/table-column/number-text/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC5B,OAAO,EAAE,SAAS;IAClB,OAAO,EAAE,SAAS;CACZ,CAAC;AAGX;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IAC/B,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACR,CAAC","sourcesContent":["/**\n * Formatting scheme for the number-text table column\n */\nexport const NumberTextFormat = {\n default: undefined,\n decimal: 'decimal'\n} as const;\nexport type NumberTextFormat = (typeof NumberTextFormat)[keyof typeof NumberTextFormat];\n\n/**\n * The aligment of the value in the number-text table column.\n * The `default` alignment is determined by the column's `NumberTextFormat`.\n */\nexport const NumberTextAlignment = {\n default: undefined,\n left: 'left',\n right: 'right'\n} as const;\nexport type NumberTextAlignment = (typeof NumberTextAlignment)[keyof typeof NumberTextAlignment];\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EA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AAe,CAAC,0BAA0B,GAAG,IAAI,CAAC,qCAAqC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7G,IAAI,CAAC,eAAe,CAAC,aAAa,GAAG,IAAI,CAAC,wBAAwB,CAC9D,IAAI,CAAC,oBAAoB,CAC5B,CAAC;IACN,CAAC;CACJ;AAED,MAAM,qBAAqB,GAAG,eAAe,CAAC,OAAO,CAAC;IAClD,QAAQ,EAAE,mBAAmB;IAC7B,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,kBAAkB,GAAG,0BAA0B,CAAC","sourcesContent":["import { DesignSystem } from '@ni/fast-foundation';\nimport { styles } from '../base/styles';\nimport { template } from '../base/template';\nimport type { TableStringField } from '../../table/types';\nimport { TableColumnTextBase, mixinTextBase } from '../text-base';\nimport { TableColumnSortOperation } from '../base/types';\nimport { tableColumnTextGroupHeaderViewTag } from './group-header-view';\nimport { tableColumnTextCellViewTag } from './cell-view';\nimport type { ColumnInternalsOptions } from '../base/models/column-internals';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\nimport { mixinCustomSortOrderColumnAPI } from '../mixins/custom-sort-order';\nimport { TableColumnTextValidator } from './models/table-column-text-validator';\n\nexport type TableColumnTextCellRecord = TableStringField<'value'>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface TableColumnTextColumnConfig extends TableColumnTextBaseColumnConfig {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-text': TableColumnText;\n }\n}\n\n/**\n * The table column for displaying string fields as text.\n */\nexport class TableColumnText extends mixinCustomSortOrderColumnAPI(\n mixinTextBase(\n TableColumnTextBase<\n TableColumnTextColumnConfig,\n TableColumnTextValidator\n >\n )\n) {\n private readonly defaultSortOperation = TableColumnSortOperation.localeAwareCaseSensitive;\n\n public placeholderChanged(): void {\n this.columnInternals.columnConfig = {\n placeholder: this.placeholder\n };\n }\n\n public override handleSortConfigurationChange(): void {\n this.updateColumnInternalsSortConfiguration();\n }\n\n protected override getColumnInternalsOptions(): ColumnInternalsOptions<TableColumnTextValidator> {\n return {\n cellRecordFieldNames: ['value'],\n cellViewTag: tableColumnTextCellViewTag,\n groupHeaderViewTag: tableColumnTextGroupHeaderViewTag,\n delegatedEvents: [],\n sortOperation: this.getResolvedSortOperation(\n this.defaultSortOperation\n ),\n validator: new TableColumnTextValidator()\n };\n }\n\n protected override fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName] as const;\n this.updateColumnInternalsSortConfiguration();\n }\n\n private updateColumnInternalsSortConfiguration(): void {\n this.columnInternals.operandDataRecordFieldName = this.getResolvedOperandDataRecordFieldName(this.fieldName);\n this.columnInternals.sortOperation = this.getResolvedSortOperation(\n this.defaultSortOperation\n );\n }\n}\n\nconst nimbleTableColumnText = TableColumnText.compose({\n baseName: 'table-column-text',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleTableColumnText());\nexport const tableColumnTextTag = 'nimble-table-column-text';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAGzD,OAAO,EAAE,6BAA6B,EA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AAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,kBAAkB,GAAG,0BAA0B,CAAC","sourcesContent":["import { DesignSystem } from '@ni/fast-foundation';\nimport { styles } from '../base/styles';\nimport { template } from '../base/template';\nimport type { TableStringField } from '../../table/types';\nimport { TableColumnTextBase, mixinTextBase } from '../text-base';\nimport { TableColumnSortOperation } from '../base/types';\nimport { tableColumnTextGroupHeaderViewTag } from './group-header-view';\nimport { tableColumnTextCellViewTag } from './cell-view';\nimport type { ColumnInternalsOptions } from '../base/models/column-internals';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\nimport { mixinCustomSortOrderColumnAPI } from '../mixins/custom-sort-order';\nimport { TableColumnTextValidator } from './models/table-column-text-validator';\n\nexport type TableColumnTextCellRecord = TableStringField<'value'>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-object-type\nexport interface TableColumnTextColumnConfig extends TableColumnTextBaseColumnConfig {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-text': TableColumnText;\n }\n}\n\n/**\n * The table column for displaying string fields as text.\n */\nexport class TableColumnText extends mixinCustomSortOrderColumnAPI(\n mixinTextBase(\n TableColumnTextBase<\n TableColumnTextColumnConfig,\n TableColumnTextValidator\n >\n )\n) {\n private readonly defaultSortOperation = TableColumnSortOperation.localeAwareCaseSensitive;\n\n public placeholderChanged(): void {\n this.columnInternals.columnConfig = {\n placeholder: this.placeholder\n };\n }\n\n public override handleSortConfigurationChange(): void {\n this.updateColumnInternalsSortConfiguration();\n }\n\n protected override getColumnInternalsOptions(): ColumnInternalsOptions<TableColumnTextValidator> {\n return {\n cellRecordFieldNames: ['value'],\n cellViewTag: tableColumnTextCellViewTag,\n groupHeaderViewTag: tableColumnTextGroupHeaderViewTag,\n delegatedEvents: [],\n sortOperation: this.getResolvedSortOperation(\n this.defaultSortOperation\n ),\n validator: new TableColumnTextValidator()\n };\n }\n\n protected override fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName] as const;\n this.updateColumnInternalsSortConfiguration();\n }\n\n private updateColumnInternalsSortConfiguration(): void {\n this.columnInternals.operandDataRecordFieldName = this.getResolvedOperandDataRecordFieldName(this.fieldName);\n this.columnInternals.sortOperation = this.getResolvedSortOperation(\n this.defaultSortOperation\n );\n }\n}\n\nconst nimbleTableColumnText = TableColumnText.compose({\n baseName: 'table-column-text',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleTableColumnText());\nexport const tableColumnTextTag = 'nimble-table-column-text';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text-base/cell-view/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EACH,oBAAoB,EAEvB,MAAM,sBAAsB,CAAC;AAU9B;;GAEG;AACH,MAAM,OAAgB,2BAKpB,SAAQ,aAAyC;IALnD;;QAMI,gBAAgB;QAET,gBAAW,GAAG,KAAK,CAAC;QAE3B;;WAEG;QAEI,SAAI,GAAG,EAAE,CAAC;QAEjB;;WAEG;QAEI,cAAS,GAAyB,oBAAoB,CAAC,IAAI,CAAC;QAEnE;;WAEG;QAEI,kBAAa,GAAG,KAAK,CAAC;IAmCjC,CAAC;IA/Ba,mBAAmB;QACzB,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAEO,iBAAiB;QACrB,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,4BAA4B;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;QACzC,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC;QACnD,IACI,OAAO,WAAW,KAAK,QAAQ;eAC5B,CAAC,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,CAAC,EACpD,CAAC;YACC,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC9B,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC/B,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ;AArDU;IADN,UAAU;gEACgB;AAMpB;IADN,UAAU;yDACM;AAMV;IADN,UAAU;8DACwD;AAM5D;IADN,UAAU;kEACkB","sourcesContent":["import { observable } from '@ni/fast-element';\nimport { TableCellView } from '../../base/cell-view';\nimport type { TableCellRecord } from '../../base/types';\nimport {\n TableColumnAlignment,\n type TableFieldValue\n} from '../../../table/types';\n\nexport interface TableColumnTextBaseCellRecord extends TableCellRecord {\n value: TableFieldValue;\n}\n\nexport interface TableColumnTextBaseColumnConfig {\n placeholder?: string;\n}\n\n/**\n * The cell view base class for displaying fields of any type as text.\n */\nexport abstract class TableColumnTextCellViewBase<\n TCellRecord extends TableColumnTextBaseCellRecord =\n TableColumnTextBaseCellRecord,\n TColumnConfig extends TableColumnTextBaseColumnConfig =\n TableColumnTextBaseColumnConfig\n> extends TableCellView<TCellRecord, TColumnConfig> {\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /**\n * Text to render in the cell.\n */\n @observable\n public text = '';\n\n /**\n * The alignment of the text within the cell.\n */\n @observable\n public alignment: TableColumnAlignment = TableColumnAlignment.left;\n\n /**\n * Whether or not the text being displayed in the cell view is a placeholder.\n */\n @observable\n public isPlaceholder = false;\n\n protected abstract updateText(): void;\n\n protected columnConfigChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n private cellRecordChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n /**\n * Sets `this.text` to the appropriate placeholder if `cellValue` warrants it.\n * @returns `true` if `this.text` was set to a placeholder, `false` otherwise.\n */\n private applyPlaceholderTextIfNeeded(): boolean {\n const cellValue = this.cellRecord?.value;\n const placeholder = this.columnConfig?.placeholder;\n if (\n typeof placeholder === 'string'\n && (cellValue === null || cellValue === undefined)\n ) {\n this.text = placeholder;\n this.isPlaceholder = true;\n } else {\n this.isPlaceholder = false;\n }\n\n return this.isPlaceholder;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text-base/cell-view/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,EACH,oBAAoB,EAEvB,MAAM,sBAAsB,CAAC;AAU9B;;GAEG;AACH,MAAM,OAAgB,2BAGpB,SAAQ,aAAyC;IAHnD;;QAII,gBAAgB;QAET,gBAAW,GAAG,KAAK,CAAC;QAE3B;;WAEG;QAEI,SAAI,GAAG,EAAE,CAAC;QAEjB;;WAEG;QAEI,cAAS,GAAyB,oBAAoB,CAAC,IAAI,CAAC;QAEnE;;WAEG;QAEI,kBAAa,GAAG,KAAK,CAAC;IAmCjC,CAAC;IA/Ba,mBAAmB;QACzB,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAEO,iBAAiB;QACrB,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,4BAA4B;QAChC,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC;QACzC,MAAM,WAAW,GAAG,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC;QACnD,IACI,OAAO,WAAW,KAAK,QAAQ;eAC5B,CAAC,SAAS,KAAK,IAAI,IAAI,SAAS,KAAK,SAAS,CAAC,EACpD,CAAC;YACC,IAAI,CAAC,IAAI,GAAG,WAAW,CAAC;YACxB,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC;QAC9B,CAAC;aAAM,CAAC;YACJ,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC/B,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ;AArDU;IADN,UAAU;gEACgB;AAMpB;IADN,UAAU;yDACM;AAMV;IADN,UAAU;8DACwD;AAM5D;IADN,UAAU;kEACkB","sourcesContent":["import { observable } from '@ni/fast-element';\nimport { TableCellView } from '../../base/cell-view';\nimport type { TableCellRecord } from '../../base/types';\nimport {\n TableColumnAlignment,\n type TableFieldValue\n} from '../../../table/types';\n\nexport interface TableColumnTextBaseCellRecord extends TableCellRecord {\n value: TableFieldValue;\n}\n\nexport interface TableColumnTextBaseColumnConfig {\n placeholder?: string;\n}\n\n/**\n * The cell view base class for displaying fields of any type as text.\n */\nexport abstract class TableColumnTextCellViewBase<\n TCellRecord extends TableColumnTextBaseCellRecord = TableColumnTextBaseCellRecord,\n TColumnConfig extends TableColumnTextBaseColumnConfig = TableColumnTextBaseColumnConfig\n> extends TableCellView<TCellRecord, TColumnConfig> {\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /**\n * Text to render in the cell.\n */\n @observable\n public text = '';\n\n /**\n * The alignment of the text within the cell.\n */\n @observable\n public alignment: TableColumnAlignment = TableColumnAlignment.left;\n\n /**\n * Whether or not the text being displayed in the cell view is a placeholder.\n */\n @observable\n public isPlaceholder = false;\n\n protected abstract updateText(): void;\n\n protected columnConfigChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n private cellRecordChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n /**\n * Sets `this.text` to the appropriate placeholder if `cellValue` warrants it.\n * @returns `true` if `this.text` was set to a placeholder, `false` otherwise.\n */\n private applyPlaceholderTextIfNeeded(): boolean {\n const cellValue = this.cellRecord?.value;\n const placeholder = this.columnConfig?.placeholder;\n if (\n typeof placeholder === 'string'\n && (cellValue === null || cellValue === undefined)\n ) {\n this.text = placeholder;\n this.isPlaceholder = true;\n } else {\n this.isPlaceholder = false;\n }\n\n return this.isPlaceholder;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text-base/group-header-view/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EACH,kCAAkC,EAClC,oCAAoC,EACvC,MAAM,4CAA4C,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAgB,kCAGpB,SAAQ,oBAAgD;IAH1D;;QAII,gBAAgB;QAET,gBAAW,GAAG,KAAK,CAAC;QAE3B;;;;;;WAMG;QAEI,SAAI,GAAG,oCAAoC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEpD,sCAAiC,GAE9C;YACI,YAAY,EAAE,GAAG,EAAE;gBACf,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACxC,CAAC;SACJ,CAAC;QAEW,oCAA+B,GAE5C;YACI,YAAY,EAAE,GAAG,EAAE;gBACf,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACxC,CAAC;SACJ,CAAC;IAyDV,CAAC;IAvDmB,iBAAiB;QAC7B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,oCAAoC,CAAC,SAAS,CAC1C,IAAI,CAAC,iCAAiC,EACtC,IAAI,CACP,CAAC;QACF,kCAAkC,CAAC,SAAS,CACxC,IAAI,CAAC,+BAA+B,EACpC,IAAI,CACP,CAAC;QACF,IAAI,CAAC,4BAA4B,EAAE,CAAC;IACxC,CAAC;IAEe,oBAAoB;QAChC,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,oCAAoC,CAAC,WAAW,CAC5C,IAAI,CAAC,iCAAiC,CACzC,CAAC;QACF,kCAAkC,CAAC,WAAW,CAC1C,IAAI,CAAC,+BAA+B,CACvC,CAAC;IACN,CAAC;IAIO,mBAAmB;QACvB,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAEO,uBAAuB;QAC3B,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,4BAA4B;QAChC,IACI,IAAI,CAAC,gBAAgB,KAAK,IAAI;eAC3B,IAAI,CAAC,gBAAgB,KAAK,SAAS,EACxC,CAAC;YACC,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,IAAI,CAAC,gBAAgB,KAAK,EAAE,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACjE,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAnFU;IADN,UAAU;uEACgB;AAUpB;IADN,UAAU;gEAC0D","sourcesContent":["import type { DesignTokenSubscriber } from '@ni/fast-foundation';\nimport { observable } from '@ni/fast-element';\nimport { TableGroupHeaderView } from '../../base/group-header-view';\nimport type { TableFieldValue } from '../../../table/types';\nimport {\n tableGroupRowPlaceholderEmptyLabel,\n tableGroupRowPlaceholderNoValueLabel\n} from '../../../label-provider/table/label-tokens';\n\n/**\n * The group header view base class for displaying fields of any type as text.\n */\nexport abstract class TableColumnTextGroupHeaderViewBase<\n TGroupValue = TableFieldValue,\n TColumnConfig = unknown\n> extends TableGroupHeaderView<TGroupValue, TColumnConfig> {\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /**\n * Text to render in the cell.\n *\n * The value is initialized to `tableGroupRowPlaceholderNoValue` because if the group\n * row never has a value defined on it, the change handlers may never get called but\n * the text needs to be correct.\n */\n @observable\n public text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);\n\n private readonly noValuePlaceholderLabelSubscriber: DesignTokenSubscriber<\n typeof tableGroupRowPlaceholderNoValueLabel\n > = {\n handleChange: () => {\n this.applyPlaceholderTextIfNeeded();\n }\n };\n\n private readonly emptyPlaceholderLabelSubscriber: DesignTokenSubscriber<\n typeof tableGroupRowPlaceholderEmptyLabel\n > = {\n handleChange: () => {\n this.applyPlaceholderTextIfNeeded();\n }\n };\n\n public override connectedCallback(): void {\n super.connectedCallback();\n tableGroupRowPlaceholderNoValueLabel.subscribe(\n this.noValuePlaceholderLabelSubscriber,\n this\n );\n tableGroupRowPlaceholderEmptyLabel.subscribe(\n this.emptyPlaceholderLabelSubscriber,\n this\n );\n this.applyPlaceholderTextIfNeeded();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n tableGroupRowPlaceholderNoValueLabel.unsubscribe(\n this.noValuePlaceholderLabelSubscriber\n );\n tableGroupRowPlaceholderEmptyLabel.unsubscribe(\n this.emptyPlaceholderLabelSubscriber\n );\n }\n\n protected abstract updateText(): void;\n\n private columnConfigChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n private groupHeaderValueChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n /**\n * Sets `this.text` to the appropriate placeholder if `groupHeaderValue` warrants it.\n * @returns `true` if `this.text` was set to a placeholder, `false` otherwise.\n */\n private applyPlaceholderTextIfNeeded(): boolean {\n if (\n this.groupHeaderValue === null\n || this.groupHeaderValue === undefined\n ) {\n this.text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);\n return true;\n }\n if (this.groupHeaderValue === '') {\n this.text = tableGroupRowPlaceholderEmptyLabel.getValueFor(this);\n return true;\n }\n return false;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/text-base/group-header-view/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AAEpE,OAAO,EACH,kCAAkC,EAClC,oCAAoC,EACvC,MAAM,4CAA4C,CAAC;AAEpD;;GAEG;AACH,MAAM,OAAgB,kCAGpB,SAAQ,oBAAgD;IAH1D;;QAII,gBAAgB;QAET,gBAAW,GAAG,KAAK,CAAC;QAE3B;;;;;;WAMG;QAEI,SAAI,GAAG,oCAAoC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAEpD,sCAAiC,GAE9C;YACA,YAAY,EAAE,GAAG,EAAE;gBACf,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACxC,CAAC;SACJ,CAAC;QAEe,oCAA+B,GAE5C;YACA,YAAY,EAAE,GAAG,EAAE;gBACf,IAAI,CAAC,4BAA4B,EAAE,CAAC;YACxC,CAAC;SACJ,CAAC;IAyDN,CAAC;IAvDmB,iBAAiB;QAC7B,KAAK,CAAC,iBAAiB,EAAE,CAAC;QAC1B,oCAAoC,CAAC,SAAS,CAC1C,IAAI,CAAC,iCAAiC,EACtC,IAAI,CACP,CAAC;QACF,kCAAkC,CAAC,SAAS,CACxC,IAAI,CAAC,+BAA+B,EACpC,IAAI,CACP,CAAC;QACF,IAAI,CAAC,4BAA4B,EAAE,CAAC;IACxC,CAAC;IAEe,oBAAoB;QAChC,KAAK,CAAC,oBAAoB,EAAE,CAAC;QAC7B,oCAAoC,CAAC,WAAW,CAC5C,IAAI,CAAC,iCAAiC,CACzC,CAAC;QACF,kCAAkC,CAAC,WAAW,CAC1C,IAAI,CAAC,+BAA+B,CACvC,CAAC;IACN,CAAC;IAIO,mBAAmB;QACvB,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAEO,uBAAuB;QAC3B,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,CAAC;YACvC,IAAI,CAAC,UAAU,EAAE,CAAC;QACtB,CAAC;IACL,CAAC;IAED;;;OAGG;IACK,4BAA4B;QAChC,IACI,IAAI,CAAC,gBAAgB,KAAK,IAAI;eAC3B,IAAI,CAAC,gBAAgB,KAAK,SAAS,EACxC,CAAC;YACC,IAAI,CAAC,IAAI,GAAG,oCAAoC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACnE,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,IAAI,IAAI,CAAC,gBAAgB,KAAK,EAAE,EAAE,CAAC;YAC/B,IAAI,CAAC,IAAI,GAAG,kCAAkC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YACjE,OAAO,IAAI,CAAC;QAChB,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAnFU;IADN,UAAU;uEACgB;AAUpB;IADN,UAAU;gEAC0D","sourcesContent":["import type { DesignTokenSubscriber } from '@ni/fast-foundation';\nimport { observable } from '@ni/fast-element';\nimport { TableGroupHeaderView } from '../../base/group-header-view';\nimport type { TableFieldValue } from '../../../table/types';\nimport {\n tableGroupRowPlaceholderEmptyLabel,\n tableGroupRowPlaceholderNoValueLabel\n} from '../../../label-provider/table/label-tokens';\n\n/**\n * The group header view base class for displaying fields of any type as text.\n */\nexport abstract class TableColumnTextGroupHeaderViewBase<\n TGroupValue = TableFieldValue,\n TColumnConfig = unknown\n> extends TableGroupHeaderView<TGroupValue, TColumnConfig> {\n /** @internal */\n @observable\n public hasOverflow = false;\n\n /**\n * Text to render in the cell.\n *\n * The value is initialized to `tableGroupRowPlaceholderNoValue` because if the group\n * row never has a value defined on it, the change handlers may never get called but\n * the text needs to be correct.\n */\n @observable\n public text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);\n\n private readonly noValuePlaceholderLabelSubscriber: DesignTokenSubscriber<\n typeof tableGroupRowPlaceholderNoValueLabel\n > = {\n handleChange: () => {\n this.applyPlaceholderTextIfNeeded();\n }\n };\n\n private readonly emptyPlaceholderLabelSubscriber: DesignTokenSubscriber<\n typeof tableGroupRowPlaceholderEmptyLabel\n > = {\n handleChange: () => {\n this.applyPlaceholderTextIfNeeded();\n }\n };\n\n public override connectedCallback(): void {\n super.connectedCallback();\n tableGroupRowPlaceholderNoValueLabel.subscribe(\n this.noValuePlaceholderLabelSubscriber,\n this\n );\n tableGroupRowPlaceholderEmptyLabel.subscribe(\n this.emptyPlaceholderLabelSubscriber,\n this\n );\n this.applyPlaceholderTextIfNeeded();\n }\n\n public override disconnectedCallback(): void {\n super.disconnectedCallback();\n tableGroupRowPlaceholderNoValueLabel.unsubscribe(\n this.noValuePlaceholderLabelSubscriber\n );\n tableGroupRowPlaceholderEmptyLabel.unsubscribe(\n this.emptyPlaceholderLabelSubscriber\n );\n }\n\n protected abstract updateText(): void;\n\n private columnConfigChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n private groupHeaderValueChanged(): void {\n if (!this.applyPlaceholderTextIfNeeded()) {\n this.updateText();\n }\n }\n\n /**\n * Sets `this.text` to the appropriate placeholder if `groupHeaderValue` warrants it.\n * @returns `true` if `this.text` was set to a placeholder, `false` otherwise.\n */\n private applyPlaceholderTextIfNeeded(): boolean {\n if (\n this.groupHeaderValue === null\n || this.groupHeaderValue === undefined\n ) {\n this.text = tableGroupRowPlaceholderNoValueLabel.getValueFor(this);\n return true;\n }\n if (this.groupHeaderValue === '') {\n this.text = tableGroupRowPlaceholderEmptyLabel.getValueFor(this);\n return true;\n }\n return false;\n }\n}\n"]}
@@ -17,7 +17,7 @@ export class TableColumnTextBase extends TableColumn {
17
17
  __decorate([
18
18
  attr({ attribute: 'field-name' })
19
19
  ], TableColumnTextBase.prototype, "fieldName", void 0);
20
- // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/no-explicit-any
20
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
21
21
  export function mixinTextBase(base) {
22
22
  return mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(mixinColumnWithPlaceholderAPI(mixinSortableColumnAPI(base))));
23
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text-base/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAgB,mBAGpB,SAAQ,WAA4C;IAIxC,gBAAgB;QACtB,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,CAAC,0BAA0B,GAAG,IAAI,CAAC,SAAS,CAAC;IACrE,CAAC;CACJ;AANU;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;sDACR;AAgB9B,mKAAmK;AACnK,MAAM,UAAU,aAAa,CAI3B,IAAW;IACT,OAAO,uBAAuB,CAC1B,6BAA6B,CACzB,6BAA6B,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAC9D,CACJ,CAAC;AACN,CAAC","sourcesContent":["import { attr } from '@ni/fast-element';\nimport { TableColumn } from '../base';\nimport { mixinFractionalWidthColumnAPI } from '../mixins/fractional-width-column';\nimport { mixinGroupableColumnAPI } from '../mixins/groupable-column';\nimport { mixinColumnWithPlaceholderAPI } from '../mixins/placeholder';\nimport type { ColumnValidator } from '../base/models/column-validator';\nimport { mixinSortableColumnAPI } from '../mixins/sortable-column';\n\n/**\n * The base class for table columns that display fields of any type as text.\n */\nexport abstract class TableColumnTextBase<\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]> = ColumnValidator<[]>\n> extends TableColumn<TColumnConfig, TColumnValidator> {\n @attr({ attribute: 'field-name' })\n public fieldName?: string;\n\n protected fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName];\n this.columnInternals.operandDataRecordFieldName = this.fieldName;\n }\n}\n\ntype TableColumnBaseConstructor<\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]>\n> = abstract new (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...args: any[]\n) => TableColumnTextBase<TColumnConfig, TColumnValidator>;\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/no-explicit-any\nexport function mixinTextBase<\n TBase extends TableColumnBaseConstructor<TColumnConfig, TColumnValidator>,\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]> = ColumnValidator<[]>\n>(base: TBase) {\n return mixinGroupableColumnAPI(\n mixinFractionalWidthColumnAPI(\n mixinColumnWithPlaceholderAPI(mixinSortableColumnAPI(base))\n )\n );\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text-base/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;GAEG;AACH,MAAM,OAAgB,mBAGpB,SAAQ,WAA4C;IAIxC,gBAAgB;QACtB,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,CAAC,0BAA0B,GAAG,IAAI,CAAC,SAAS,CAAC;IACrE,CAAC;CACJ;AANU;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;sDACR;AAgB9B,+HAA+H;AAC/H,MAAM,UAAU,aAAa,CAI3B,IAAW;IACT,OAAO,uBAAuB,CAC1B,6BAA6B,CACzB,6BAA6B,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAC9D,CACJ,CAAC;AACN,CAAC","sourcesContent":["import { attr } from '@ni/fast-element';\nimport { TableColumn } from '../base';\nimport { mixinFractionalWidthColumnAPI } from '../mixins/fractional-width-column';\nimport { mixinGroupableColumnAPI } from '../mixins/groupable-column';\nimport { mixinColumnWithPlaceholderAPI } from '../mixins/placeholder';\nimport type { ColumnValidator } from '../base/models/column-validator';\nimport { mixinSortableColumnAPI } from '../mixins/sortable-column';\n\n/**\n * The base class for table columns that display fields of any type as text.\n */\nexport abstract class TableColumnTextBase<\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]> = ColumnValidator<[]>\n> extends TableColumn<TColumnConfig, TColumnValidator> {\n @attr({ attribute: 'field-name' })\n public fieldName?: string;\n\n protected fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName];\n this.columnInternals.operandDataRecordFieldName = this.fieldName;\n }\n}\n\ntype TableColumnBaseConstructor<\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]>\n> = abstract new (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...args: any[]\n) => TableColumnTextBase<TColumnConfig, TColumnValidator>;\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type\nexport function mixinTextBase<\n TBase extends TableColumnBaseConstructor<TColumnConfig, TColumnValidator>,\n TColumnConfig,\n TColumnValidator extends ColumnValidator<[]> = ColumnValidator<[]>\n>(base: TBase) {\n return mixinGroupableColumnAPI(\n mixinFractionalWidthColumnAPI(\n mixinColumnWithPlaceholderAPI(mixinSortableColumnAPI(base))\n )\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/text-area/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACR,CAAC","sourcesContent":["import { TextAreaResize } from '@ni/fast-foundation';\n\nexport { TextAreaResize };\n\nexport const TextAreaAppearance = {\n outline: 'outline',\n block: 'block'\n} as const;\nexport type TextAreaAppearance =\n (typeof TextAreaAppearance)[keyof typeof TextAreaAppearance];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/text-area/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAE,cAAc,EAAE,CAAC;AAE1B,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAC9B,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;CACR,CAAC","sourcesContent":["import { TextAreaResize } from '@ni/fast-foundation';\n\nexport { TextAreaResize };\n\nexport const TextAreaAppearance = {\n outline: 'outline',\n block: 'block'\n} as const;\nexport type TextAreaAppearance = (typeof TextAreaAppearance)[keyof typeof TextAreaAppearance];\n"]}