@ni/nimble-components 27.2.3 → 28.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/all-components-bundle.js +959 -956
  2. package/dist/all-components-bundle.js.map +1 -1
  3. package/dist/all-components-bundle.min.js +94 -94
  4. package/dist/all-components-bundle.min.js.map +1 -1
  5. package/dist/esm/all-components.d.ts +1 -1
  6. package/dist/esm/all-components.js +1 -1
  7. package/dist/esm/all-components.js.map +1 -1
  8. package/dist/esm/mapping/icon/index.d.ts +1 -1
  9. package/dist/esm/mapping/icon/index.js +1 -1
  10. package/dist/esm/mapping/icon/index.js.map +1 -1
  11. package/dist/esm/mapping/spinner/index.d.ts +1 -1
  12. package/dist/esm/mapping/spinner/index.js +1 -1
  13. package/dist/esm/mapping/spinner/index.js.map +1 -1
  14. package/dist/esm/mapping/text/index.d.ts +1 -1
  15. package/dist/esm/mapping/text/index.js +1 -1
  16. package/dist/esm/mapping/text/index.js.map +1 -1
  17. package/dist/esm/patterns/dropdown/styles.js +2 -2
  18. package/dist/esm/patterns/dropdown/styles.js.map +1 -1
  19. package/dist/esm/table/testing/table.pageobject.d.ts +2 -2
  20. package/dist/esm/table/testing/table.pageobject.js +3 -3
  21. package/dist/esm/table/testing/table.pageobject.js.map +1 -1
  22. package/dist/esm/table-column/enum-base/types.d.ts +1 -1
  23. package/dist/esm/table-column/enum-base/types.js +1 -1
  24. package/dist/esm/table-column/enum-base/types.js.map +1 -1
  25. package/dist/esm/table-column/{icon → mapping}/cell-view/index.d.ts +4 -4
  26. package/dist/esm/table-column/{icon → mapping}/cell-view/index.js +11 -11
  27. package/dist/esm/table-column/mapping/cell-view/index.js.map +1 -0
  28. package/dist/esm/table-column/mapping/cell-view/styles.js.map +1 -0
  29. package/dist/esm/table-column/mapping/cell-view/template.d.ts +2 -0
  30. package/dist/esm/table-column/mapping/cell-view/template.js.map +1 -0
  31. package/dist/esm/table-column/{icon → mapping}/group-header-view/index.d.ts +4 -4
  32. package/dist/esm/table-column/{icon → mapping}/group-header-view/index.js +10 -8
  33. package/dist/esm/table-column/mapping/group-header-view/index.js.map +1 -0
  34. package/dist/esm/table-column/mapping/group-header-view/styles.js.map +1 -0
  35. package/dist/esm/table-column/mapping/group-header-view/template.d.ts +2 -0
  36. package/dist/esm/table-column/mapping/group-header-view/template.js.map +1 -0
  37. package/dist/esm/table-column/{icon → mapping}/index.d.ts +9 -8
  38. package/dist/esm/table-column/{icon → mapping}/index.js +14 -13
  39. package/dist/esm/table-column/mapping/index.js.map +1 -0
  40. package/dist/esm/table-column/{icon/models/table-column-icon-validator.d.ts → mapping/models/table-column-mapping-validator.d.ts} +3 -3
  41. package/dist/esm/table-column/{icon/models/table-column-icon-validator.js → mapping/models/table-column-mapping-validator.js} +9 -9
  42. package/dist/esm/table-column/mapping/models/table-column-mapping-validator.js.map +1 -0
  43. package/dist/esm/table-column/{icon/testing/table-column-icon.pageobject.d.ts → mapping/testing/table-column-mapping.pageobject.d.ts} +2 -2
  44. package/dist/esm/table-column/{icon/testing/table-column-icon.pageobject.js → mapping/testing/table-column-mapping.pageobject.js} +3 -3
  45. package/dist/esm/table-column/mapping/testing/table-column-mapping.pageobject.js.map +1 -0
  46. package/dist/esm/table-column/{icon → mapping}/types.d.ts +1 -1
  47. package/dist/esm/table-column/{icon → mapping}/types.js +1 -1
  48. package/dist/esm/table-column/mapping/types.js.map +1 -0
  49. package/package.json +3 -3
  50. package/dist/esm/table-column/icon/cell-view/index.js.map +0 -1
  51. package/dist/esm/table-column/icon/cell-view/styles.js.map +0 -1
  52. package/dist/esm/table-column/icon/cell-view/template.d.ts +0 -2
  53. package/dist/esm/table-column/icon/cell-view/template.js.map +0 -1
  54. package/dist/esm/table-column/icon/group-header-view/index.js.map +0 -1
  55. package/dist/esm/table-column/icon/group-header-view/styles.js.map +0 -1
  56. package/dist/esm/table-column/icon/group-header-view/template.d.ts +0 -2
  57. package/dist/esm/table-column/icon/group-header-view/template.js.map +0 -1
  58. package/dist/esm/table-column/icon/index.js.map +0 -1
  59. package/dist/esm/table-column/icon/models/table-column-icon-validator.js.map +0 -1
  60. package/dist/esm/table-column/icon/testing/table-column-icon.pageobject.js.map +0 -1
  61. package/dist/esm/table-column/icon/types.js.map +0 -1
  62. /package/dist/esm/table-column/{icon → mapping}/cell-view/styles.d.ts +0 -0
  63. /package/dist/esm/table-column/{icon → mapping}/cell-view/styles.js +0 -0
  64. /package/dist/esm/table-column/{icon → mapping}/cell-view/template.js +0 -0
  65. /package/dist/esm/table-column/{icon → mapping}/group-header-view/styles.d.ts +0 -0
  66. /package/dist/esm/table-column/{icon → mapping}/group-header-view/styles.js +0 -0
  67. /package/dist/esm/table-column/{icon → mapping}/group-header-view/template.js +0 -0
@@ -44,8 +44,8 @@ import './table';
44
44
  import './table-column/anchor';
45
45
  import './table-column/date-text';
46
46
  import './table-column/duration-text';
47
+ import './table-column/mapping';
47
48
  import './table-column/number-text';
48
- import './table-column/icon';
49
49
  import './table-column/text';
50
50
  import './tabs';
51
51
  import './tabs-toolbar';
@@ -44,8 +44,8 @@ import './table';
44
44
  import './table-column/anchor';
45
45
  import './table-column/date-text';
46
46
  import './table-column/duration-text';
47
+ import './table-column/mapping';
47
48
  import './table-column/number-text';
48
- import './table-column/icon';
49
49
  import './table-column/text';
50
50
  import './tabs';
51
51
  import './tabs-toolbar';
@@ -1 +1 @@
1
- {"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,UAAU,CAAC;AAClB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;AAChC,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,SAAS,CAAC;AACjB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,CAAC;AAClB,OAAO,WAAW,CAAC;AACnB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,SAAS,CAAC;AACjB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,0BAA0B,CAAC;AAClC,OAAO,8BAA8B,CAAC;AACtC,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC","sourcesContent":["/**\n * Import of all the web components available in Nimble.\n * Production applications are encouraged to import only components\n * that are required instead of leveraging this file.\n */\n\nimport './anchor';\nimport './anchor-button';\nimport './anchor-menu-item';\nimport './anchor-tab';\nimport './anchor-tabs';\nimport './anchor-tree-item';\nimport './anchored-region';\nimport './banner';\nimport './breadcrumb';\nimport './breadcrumb-item';\nimport './button';\nimport './card';\nimport './card-button';\nimport './checkbox';\nimport './combobox';\nimport './dialog';\nimport './drawer';\nimport './icons/all-icons';\nimport './label-provider/core';\nimport './label-provider/table';\nimport './list-option';\nimport './mapping/text';\nimport './mapping/icon';\nimport './mapping/spinner';\nimport './menu';\nimport './menu-button';\nimport './menu-item';\nimport './number-field';\nimport './radio';\nimport './radio-group';\nimport './rich-text/editor';\nimport './rich-text/viewer';\nimport './select';\nimport './spinner';\nimport './switch';\nimport './tab';\nimport './tab-panel';\nimport './table';\nimport './table-column/anchor';\nimport './table-column/date-text';\nimport './table-column/duration-text';\nimport './table-column/number-text';\nimport './table-column/icon';\nimport './table-column/text';\nimport './tabs';\nimport './tabs-toolbar';\nimport './text-area';\nimport './text-field';\nimport './theme-provider';\nimport './toggle-button';\nimport './toolbar';\nimport './tooltip';\nimport './tree-item';\nimport './tree-view';\nimport './unit/byte';\nimport './unit/volt';\nimport './wafer-map';\n"]}
1
+ {"version":3,"file":"all-components.js","sourceRoot":"","sources":["../../src/all-components.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,UAAU,CAAC;AAClB,OAAO,iBAAiB,CAAC;AACzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,cAAc,CAAC;AACtB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,cAAc,CAAC;AACtB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,UAAU,CAAC;AAClB,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,YAAY,CAAC;AACpB,OAAO,YAAY,CAAC;AACpB,OAAO,UAAU,CAAC;AAClB,OAAO,UAAU,CAAC;AAClB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,uBAAuB,CAAC;AAC/B,OAAO,wBAAwB,CAAC;AAChC,OAAO,eAAe,CAAC;AACvB,OAAO,gBAAgB,CAAC;AACxB,OAAO,gBAAgB,CAAC;AACxB,OAAO,mBAAmB,CAAC;AAC3B,OAAO,QAAQ,CAAC;AAChB,OAAO,eAAe,CAAC;AACvB,OAAO,aAAa,CAAC;AACrB,OAAO,gBAAgB,CAAC;AACxB,OAAO,SAAS,CAAC;AACjB,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,CAAC;AAClB,OAAO,WAAW,CAAC;AACnB,OAAO,UAAU,CAAC;AAClB,OAAO,OAAO,CAAC;AACf,OAAO,aAAa,CAAC;AACrB,OAAO,SAAS,CAAC;AACjB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,0BAA0B,CAAC;AAClC,OAAO,8BAA8B,CAAC;AACtC,OAAO,wBAAwB,CAAC;AAChC,OAAO,4BAA4B,CAAC;AACpC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,QAAQ,CAAC;AAChB,OAAO,gBAAgB,CAAC;AACxB,OAAO,aAAa,CAAC;AACrB,OAAO,cAAc,CAAC;AACtB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,iBAAiB,CAAC;AACzB,OAAO,WAAW,CAAC;AACnB,OAAO,WAAW,CAAC;AACnB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC;AACrB,OAAO,aAAa,CAAC","sourcesContent":["/**\n * Import of all the web components available in Nimble.\n * Production applications are encouraged to import only components\n * that are required instead of leveraging this file.\n */\n\nimport './anchor';\nimport './anchor-button';\nimport './anchor-menu-item';\nimport './anchor-tab';\nimport './anchor-tabs';\nimport './anchor-tree-item';\nimport './anchored-region';\nimport './banner';\nimport './breadcrumb';\nimport './breadcrumb-item';\nimport './button';\nimport './card';\nimport './card-button';\nimport './checkbox';\nimport './combobox';\nimport './dialog';\nimport './drawer';\nimport './icons/all-icons';\nimport './label-provider/core';\nimport './label-provider/table';\nimport './list-option';\nimport './mapping/text';\nimport './mapping/icon';\nimport './mapping/spinner';\nimport './menu';\nimport './menu-button';\nimport './menu-item';\nimport './number-field';\nimport './radio';\nimport './radio-group';\nimport './rich-text/editor';\nimport './rich-text/viewer';\nimport './select';\nimport './spinner';\nimport './switch';\nimport './tab';\nimport './tab-panel';\nimport './table';\nimport './table-column/anchor';\nimport './table-column/date-text';\nimport './table-column/duration-text';\nimport './table-column/mapping';\nimport './table-column/number-text';\nimport './table-column/text';\nimport './tabs';\nimport './tabs-toolbar';\nimport './text-area';\nimport './text-field';\nimport './theme-provider';\nimport './toggle-button';\nimport './toolbar';\nimport './tooltip';\nimport './tree-item';\nimport './tree-view';\nimport './unit/byte';\nimport './unit/volt';\nimport './wafer-map';\n"]}
@@ -8,7 +8,7 @@ declare global {
8
8
  }
9
9
  /**
10
10
  * Maps a data value to an icon.
11
- * One or more may be added as children of a nimble-table-column-icon element to define
11
+ * One or more may be added as children of a nimble-table-column-mapping element to define
12
12
  * how specific data values should be displayed as icons in that column's cells.
13
13
  */
14
14
  export declare class MappingIcon extends Mapping<MappingKey> {
@@ -9,7 +9,7 @@ function isIconClass(elementClass) {
9
9
  }
10
10
  /**
11
11
  * Maps a data value to an icon.
12
- * One or more may be added as children of a nimble-table-column-icon element to define
12
+ * One or more may be added as children of a nimble-table-column-mapping element to define
13
13
  * how specific data values should be displayed as icons in that column's cells.
14
14
  */
15
15
  export class MappingIcon extends Mapping {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mapping/icon/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM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C,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;YACjE,OAAO;SACV;QACD,KAAK,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;CACJ;AAxDU;IADN,IAAI,EAAE;yCACc;AAGd;IADN,IAAI,EAAE;6CACuB;AAGvB;IADN,IAAI,EAAE;yCACc;AAGd;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;+CAC1B;AAQnB;IADN,UAAU;iDACkB;AAyCjC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC;IACpC,QAAQ,EAAE,cAAc;IACxB,QAAQ;CACX,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC","sourcesContent":["import { attr, observable } from '@microsoft/fast-element';\nimport { DesignSystem } from '@microsoft/fast-foundation';\nimport { Mapping } from '../base';\nimport { template } from '../base/template';\nimport type { IconSeverity } from '../../icon-base/types';\nimport { Icon } from '../../icon-base';\nimport type { MappingKey } from '../base/types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-mapping-icon': MappingIcon;\n }\n}\n\nfunction isIconClass(elementClass: CustomElementConstructor): boolean {\n return elementClass.prototype instanceof Icon;\n}\n\n/**\n * Maps a data value to an icon.\n * One or more may be added as children of a nimble-table-column-icon element to define\n * how specific data values should be displayed as icons in that column's cells.\n */\nexport class MappingIcon extends Mapping<MappingKey> {\n @attr()\n public icon?: string;\n\n @attr()\n public severity: IconSeverity;\n\n @attr()\n public text?: string;\n\n @attr({ attribute: 'text-hidden', mode: 'boolean' })\n public textHidden = false;\n\n /**\n * @internal\n * Calculated asynchronously by the icon mapping based on the configured icon value.\n * When assigned, it corresponds to an element name that is resolved to type of Nimble Icon.\n */\n @observable\n public resolvedIcon?: string;\n\n // Allow icons to be defined asynchronously from when the property is configured\n private async resolveIconAsync(icon: string): Promise<void> {\n try {\n // Clear the current resolution while waiting for async resolution\n this.resolvedIcon = undefined;\n await customElements.whenDefined(icon);\n } catch (ex) {\n // If any error (i.e. invalid custom element name) don't continue\n // Don't update the resolvedIcon as it was already set to undefined before async resolution\n // (in case other async resolutions were started)\n return;\n }\n\n if (icon !== this.icon) {\n // Possible the icon has changed while waiting for async resolution\n // Don't update the resolvedIcon as it was already set to undefined before async resolution\n // (in case other async resolutions were started)\n return;\n }\n\n const elementClass = customElements.get(icon)!;\n this.resolvedIcon = isIconClass(elementClass) ? icon : undefined;\n }\n\n private iconChanged(): void {\n const icon = this.icon;\n if (!icon) {\n this.resolvedIcon = undefined;\n return;\n }\n const elementClass = customElements.get(icon);\n if (elementClass) {\n this.resolvedIcon = isIconClass(elementClass) ? icon : undefined;\n return;\n }\n void this.resolveIconAsync(icon);\n }\n}\n\nconst iconMapping = MappingIcon.compose({\n baseName: 'mapping-icon',\n template\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(iconMapping());\nexport const mappingIconTag = 'nimble-mapping-icon';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mapping/icon/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AASvC,SAAS,WAAW,CAAC,YAAsC;IACvD,OAAO,YAAY,CAAC,SAAS,YAAY,IAAI,CAAC;AAClD,CAAC;AAED;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAmB;IAApD;;QAWW,eAAU,GAAG,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AyCjC,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC;IACpC,QAAQ,EAAE,cAAc;IACxB,QAAQ;CACX,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC","sourcesContent":["import { attr, observable } from '@microsoft/fast-element';\nimport { DesignSystem } from '@microsoft/fast-foundation';\nimport { Mapping } from '../base';\nimport { template } from '../base/template';\nimport type { IconSeverity } from '../../icon-base/types';\nimport { Icon } from '../../icon-base';\nimport type { MappingKey } from '../base/types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-mapping-icon': MappingIcon;\n }\n}\n\nfunction isIconClass(elementClass: CustomElementConstructor): boolean {\n return elementClass.prototype instanceof Icon;\n}\n\n/**\n * Maps a data value to an icon.\n * One or more may be added as children of a nimble-table-column-mapping element to define\n * how specific data values should be displayed as icons in that column's cells.\n */\nexport class MappingIcon extends Mapping<MappingKey> {\n @attr()\n public icon?: string;\n\n @attr()\n public severity: IconSeverity;\n\n @attr()\n public text?: string;\n\n @attr({ attribute: 'text-hidden', mode: 'boolean' })\n public textHidden = false;\n\n /**\n * @internal\n * Calculated asynchronously by the icon mapping based on the configured icon value.\n * When assigned, it corresponds to an element name that is resolved to type of Nimble Icon.\n */\n @observable\n public resolvedIcon?: string;\n\n // Allow icons to be defined asynchronously from when the property is configured\n private async resolveIconAsync(icon: string): Promise<void> {\n try {\n // Clear the current resolution while waiting for async resolution\n this.resolvedIcon = undefined;\n await customElements.whenDefined(icon);\n } catch (ex) {\n // If any error (i.e. invalid custom element name) don't continue\n // Don't update the resolvedIcon as it was already set to undefined before async resolution\n // (in case other async resolutions were started)\n return;\n }\n\n if (icon !== this.icon) {\n // Possible the icon has changed while waiting for async resolution\n // Don't update the resolvedIcon as it was already set to undefined before async resolution\n // (in case other async resolutions were started)\n return;\n }\n\n const elementClass = customElements.get(icon)!;\n this.resolvedIcon = isIconClass(elementClass) ? icon : undefined;\n }\n\n private iconChanged(): void {\n const icon = this.icon;\n if (!icon) {\n this.resolvedIcon = undefined;\n return;\n }\n const elementClass = customElements.get(icon);\n if (elementClass) {\n this.resolvedIcon = isIconClass(elementClass) ? icon : undefined;\n return;\n }\n void this.resolveIconAsync(icon);\n }\n}\n\nconst iconMapping = MappingIcon.compose({\n baseName: 'mapping-icon',\n template\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(iconMapping());\nexport const mappingIconTag = 'nimble-mapping-icon';\n"]}
@@ -7,7 +7,7 @@ declare global {
7
7
  }
8
8
  /**
9
9
  * Maps data values to a spinner.
10
- * One or more may be added as children of a nimble-table-column-icon element to define
10
+ * One or more may be added as children of a nimble-table-column-mapping element to define
11
11
  * which specific data values should be displayed as spinners in that column's cells.
12
12
  */
13
13
  export declare class MappingSpinner extends Mapping<MappingKey> {
@@ -5,7 +5,7 @@ import { Mapping } from '../base';
5
5
  import { template } from '../base/template';
6
6
  /**
7
7
  * Maps data values to a spinner.
8
- * One or more may be added as children of a nimble-table-column-icon element to define
8
+ * One or more may be added as children of a nimble-table-column-mapping element to define
9
9
  * which specific data values should be displayed as spinners in that column's cells.
10
10
  */
11
11
  export class MappingSpinner extends Mapping {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mapping/spinner/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAS5C;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,OAAmB;IAAvD;;QAKW,eAAU,GAAG,KAAK,CAAC;IAC9B,CAAC;CAAA;AAJU;IADN,IAAI,EAAE;4CACc;AAGd;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;kDAC1B;AAG9B,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC;IAC1C,QAAQ,EAAE,iBAAiB;IAC3B,QAAQ;CACX,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,wBAAwB,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { attr } from '@microsoft/fast-element';\nimport { Mapping } from '../base';\nimport { template } from '../base/template';\nimport type { MappingKey } from '../base/types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-mapping-spinner': MappingSpinner;\n }\n}\n\n/**\n * Maps data values to a spinner.\n * One or more may be added as children of a nimble-table-column-icon element to define\n * which specific data values should be displayed as spinners in that column's cells.\n */\nexport class MappingSpinner extends Mapping<MappingKey> {\n @attr()\n public text?: string;\n\n @attr({ attribute: 'text-hidden', mode: 'boolean' })\n public textHidden = false;\n}\n\nconst spinnerMapping = MappingSpinner.compose({\n baseName: 'mapping-spinner',\n template\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(spinnerMapping());\nexport const mappingSpinnerTag = 'nimble-mapping-spinner';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mapping/spinner/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAS5C;;;;GAIG;AACH,MAAM,OAAO,cAAe,SAAQ,OAAmB;IAAvD;;QAKW,eAAU,GAAG,KAAK,CAAC;IAC9B,CAAC;CAAA;AAJU;IADN,IAAI,EAAE;4CACc;AAGd;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;kDAC1B;AAG9B,MAAM,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC;IAC1C,QAAQ,EAAE,iBAAiB;IAC3B,QAAQ;CACX,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,wBAAwB,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { attr } from '@microsoft/fast-element';\nimport { Mapping } from '../base';\nimport { template } from '../base/template';\nimport type { MappingKey } from '../base/types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-mapping-spinner': MappingSpinner;\n }\n}\n\n/**\n * Maps data values to a spinner.\n * One or more may be added as children of a nimble-table-column-mapping element to define\n * which specific data values should be displayed as spinners in that column's cells.\n */\nexport class MappingSpinner extends Mapping<MappingKey> {\n @attr()\n public text?: string;\n\n @attr({ attribute: 'text-hidden', mode: 'boolean' })\n public textHidden = false;\n}\n\nconst spinnerMapping = MappingSpinner.compose({\n baseName: 'mapping-spinner',\n template\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(spinnerMapping());\nexport const mappingSpinnerTag = 'nimble-mapping-spinner';\n"]}
@@ -7,7 +7,7 @@ declare global {
7
7
  }
8
8
  /**
9
9
  * Defines a mapping from one data value ('key' property) to display text ('text' property).
10
- * One or more may be added as children of a nimble-table-column-icon element to define
10
+ * One or more may be added as children of a nimble-table-column-mapping element to define
11
11
  * how a specific data value should be displayed as text in that column's cells.
12
12
  */
13
13
  export declare class MappingText extends Mapping<MappingKey> {
@@ -5,7 +5,7 @@ import { Mapping } from '../base';
5
5
  import { template } from '../base/template';
6
6
  /**
7
7
  * Defines a mapping from one data value ('key' property) to display text ('text' property).
8
- * One or more may be added as children of a nimble-table-column-icon element to define
8
+ * One or more may be added as children of a nimble-table-column-mapping element to define
9
9
  * how a specific data value should be displayed as text in that column's cells.
10
10
  */
11
11
  export class MappingText extends Mapping {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mapping/text/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAS5C;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAmB;CAGnD;AADU;IADN,IAAI,EAAE;yCACc;AAGzB,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC;IACpC,QAAQ,EAAE,cAAc;IACxB,QAAQ;CACX,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { attr } from '@microsoft/fast-element';\nimport { Mapping } from '../base';\nimport { template } from '../base/template';\nimport type { MappingKey } from '../base/types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-mapping-text': MappingText;\n }\n}\n\n/**\n * Defines a mapping from one data value ('key' property) to display text ('text' property).\n * One or more may be added as children of a nimble-table-column-icon element to define\n * how a specific data value should be displayed as text in that column's cells.\n */\nexport class MappingText extends Mapping<MappingKey> {\n @attr()\n public text?: string;\n}\n\nconst textMapping = MappingText.compose({\n baseName: 'mapping-text',\n template\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(textMapping());\nexport const mappingTextTag = 'nimble-mapping-text';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/mapping/text/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAS5C;;;;GAIG;AACH,MAAM,OAAO,WAAY,SAAQ,OAAmB;CAGnD;AADU;IADN,IAAI,EAAE;yCACc;AAGzB,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC;IACpC,QAAQ,EAAE,cAAc;IACxB,QAAQ;CACX,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,cAAc,GAAG,qBAAqB,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { attr } from '@microsoft/fast-element';\nimport { Mapping } from '../base';\nimport { template } from '../base/template';\nimport type { MappingKey } from '../base/types';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-mapping-text': MappingText;\n }\n}\n\n/**\n * Defines a mapping from one data value ('key' property) to display text ('text' property).\n * One or more may be added as children of a nimble-table-column-mapping element to define\n * how a specific data value should be displayed as text in that column's cells.\n */\nexport class MappingText extends Mapping<MappingKey> {\n @attr()\n public text?: string;\n}\n\nconst textMapping = MappingText.compose({\n baseName: 'mapping-text',\n template\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(textMapping());\nexport const mappingTextTag = 'nimble-mapping-text';\n"]}
@@ -1,7 +1,7 @@
1
1
  import { css } from '@microsoft/fast-element';
2
2
  import { display } from '@microsoft/fast-foundation';
3
3
  import { White } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';
4
- import { applicationBackgroundColor, bodyFont, bodyFontColor, bodyDisabledFontColor, borderHoverColor, borderWidth, controlHeight, iconSize, popupBorderColor, smallDelay, smallPadding, borderRgbPartialColor, mediumPadding, failColor, elevation2BoxShadow } from '../../theme-provider/design-tokens';
4
+ import { applicationBackgroundColor, bodyFont, bodyFontColor, bodyDisabledFontColor, borderHoverColor, borderWidth, controlHeight, iconSize, menuMinWidth, popupBorderColor, smallDelay, smallPadding, borderRgbPartialColor, mediumPadding, failColor, elevation2BoxShadow } from '../../theme-provider/design-tokens';
5
5
  import { Theme } from '../../theme-provider/types';
6
6
  import { appearanceBehavior } from '../../utilities/style/appearance';
7
7
  import { hexToRgbaCssColor } from '../../utilities/style/colors';
@@ -20,7 +20,7 @@ export const styles = css `
20
20
  position: relative;
21
21
  justify-content: center;
22
22
  ${userSelectNone}
23
- min-width: 250px;
23
+ min-width: ${menuMinWidth};
24
24
  outline: none;
25
25
  vertical-align: top;
26
26
  --ni-private-hover-indicator-width: calc(${borderWidth} + 1px);
@@ -1 +1 @@
1
- {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,kDAAkD,CAAC;AACzE,OAAO,EACH,0BAA0B,EAC1B,QAAQ,EACR,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,WAAW,EACX,aAAa,EACb,QAAQ,EACR,gBAAgB,EAChB,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,aAAa,EACb,SAAS,EACT,mBAAmB,EACtB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,kBAAkB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SAGlC,CACJ,EACD,kBAAkB,CACd,kBAAkB,CAAC,KAAK,EACxB,GAAG,CAAA;;yCAE8B,qBAAqB;;;;uCAIvB,WAAW;;;;;yCAKT,qBAAqB;;SAErD,CACJ,EACD,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC;;SAEnD,CACJ,CACJ,CAAC","sourcesContent":["import { css } from '@microsoft/fast-element';\nimport { display } from '@microsoft/fast-foundation';\nimport { White } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';\nimport {\n applicationBackgroundColor,\n bodyFont,\n bodyFontColor,\n bodyDisabledFontColor,\n borderHoverColor,\n borderWidth,\n controlHeight,\n iconSize,\n popupBorderColor,\n smallDelay,\n smallPadding,\n borderRgbPartialColor,\n mediumPadding,\n failColor,\n elevation2BoxShadow\n} from '../../theme-provider/design-tokens';\nimport { Theme } from '../../theme-provider/types';\nimport { appearanceBehavior } from '../../utilities/style/appearance';\nimport { hexToRgbaCssColor } from '../../utilities/style/colors';\nimport { focusVisible } from '../../utilities/style/focus';\nimport { themeBehavior } from '../../utilities/style/theme';\nimport { DropdownAppearance } from './types';\nimport { userSelectNone } from '../../utilities/style/user-select';\n\nexport const styles = css`\n ${display('inline-flex')}\n\n :host {\n box-sizing: border-box;\n color: ${bodyFontColor};\n font: ${bodyFont};\n height: ${controlHeight};\n position: relative;\n justify-content: center;\n ${userSelectNone}\n min-width: 250px;\n outline: none;\n vertical-align: top;\n --ni-private-hover-indicator-width: calc(${borderWidth} + 1px);\n --ni-private-focus-indicator-width: 1px;\n --ni-private-indicator-lines-gap: 1px;\n }\n\n :host::before {\n content: '';\n position: absolute;\n bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));\n width: 0px;\n height: 0px;\n justify-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-focus-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::before {\n transition-duration: 0s;\n }\n }\n\n :host(${focusVisible})::before {\n width: calc(100% - 8px);\n }\n\n :host([error-visible]):before {\n border-bottom-color: ${failColor};\n }\n\n :host::after {\n content: '';\n position: absolute;\n bottom: calc(-1 * ${borderWidth});\n width: 0px;\n height: 0px;\n justify-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-hover-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::after {\n transition-duration: 0s;\n }\n }\n\n :host(:hover)::after,\n :host(${focusVisible})::after {\n width: 100%;\n }\n\n :host([error-visible]):after {\n border-bottom-color: ${failColor};\n }\n\n :host([disabled]:hover)::after {\n width: 0px;\n }\n\n [part='start'] {\n display: none;\n }\n\n .control {\n align-items: center;\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n min-height: 100%;\n width: 100%;\n border: 0px solid rgba(${borderRgbPartialColor}, 0.3);\n background-color: transparent;\n padding: ${borderWidth};\n }\n\n :host([open]:not(:hover)) .control {\n border-bottom-color: ${borderHoverColor};\n }\n\n :host([disabled]) .control {\n cursor: default;\n color: ${bodyDisabledFontColor};\n border-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n :host([error-visible]) .control,\n :host([error-visible][open]) .control,\n :host([error-visible][disabled]) .control {\n border-bottom-color: ${failColor};\n }\n\n .listbox {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n overflow-y: auto;\n width: 100%;\n --ni-private-listbox-padding: ${smallPadding};\n max-height: calc(var(--ni-private-select-max-height) - ${smallPadding});\n box-shadow: ${elevation2BoxShadow};\n border: 1px solid ${popupBorderColor};\n background-color: ${applicationBackgroundColor};\n }\n\n .listbox slot {\n display: block;\n background: transparent;\n padding: var(--ni-private-listbox-padding);\n }\n\n :host([open][position='above']) .listbox {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n :host([open][position='below']) .listbox {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n :host([open][position='above']) .anchored-region {\n padding-bottom: ${smallPadding};\n }\n\n :host([open][position='below']) .anchored-region {\n padding-top: ${smallPadding};\n }\n\n .selected-value {\n flex: auto;\n font-family: inherit;\n text-align: start;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0px;\n padding-left: ${mediumPadding};\n }\n\n .selected-value[disabled]::placeholder {\n color: ${bodyDisabledFontColor};\n }\n\n .indicator {\n flex: none;\n margin-inline-start: 1em;\n padding-right: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .indicator slot[name='indicator'] svg {\n width: ${iconSize};\n height: ${iconSize};\n fill: ${bodyFontColor};\n }\n\n :host([disabled]) .indicator slot[name='indicator'] svg {\n fill: ${bodyDisabledFontColor};\n }\n\n [part='end'] {\n margin-inline-start: auto;\n }\n\n ::slotted([role='option']),\n ::slotted(option) {\n flex: none;\n }\n`.withBehaviors(\n appearanceBehavior(\n DropdownAppearance.underline,\n css`\n .control {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n\n :host([disabled]) .control {\n border-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.outline,\n css`\n .control {\n border-width: ${borderWidth};\n padding: 0;\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.block,\n css`\n .control {\n background-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n .control:focus-within {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n\n :host([disabled]) .control {\n background-color: rgba(${borderRgbPartialColor}, 0.07);\n }\n `\n ),\n themeBehavior(\n Theme.color,\n css`\n .listbox slot {\n background: ${hexToRgbaCssColor(White, 0.15)};\n }\n `\n )\n);\n"]}
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../../../src/patterns/dropdown/styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,yBAAyB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE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0BAA0B;;;;;;;;;;;;;;;;;;;;0BAoB5B,YAAY;;;;uBAIf,YAAY;;;;;;;;;;;wBAWX,aAAa;;;;iBAIpB,qBAAqB;;;;;;;;;;;;;iBAarB,QAAQ;kBACP,QAAQ;gBACV,aAAa;;;;gBAIb,qBAAqB;;;;;;;;;;;CAWpC,CAAC,aAAa,CACX,kBAAkB,CACd,kBAAkB,CAAC,SAAS,EAC5B,GAAG,CAAA;;uCAE4B,WAAW;;;;;qCAKb,qBAAqB;;SAEjD,CACJ,EACD,kBAAkB,CACd,kBAAkB,CAAC,OAAO,EAC1B,GAAG,CAAA;;gCAEqB,WAAW;;;SAGlC,CACJ,EACD,kBAAkB,CACd,kBAAkB,CAAC,KAAK,EACxB,GAAG,CAAA;;yCAE8B,qBAAqB;;;;uCAIvB,WAAW;;;;;yCAKT,qBAAqB;;SAErD,CACJ,EACD,aAAa,CACT,KAAK,CAAC,KAAK,EACX,GAAG,CAAA;;8BAEmB,iBAAiB,CAAC,KAAK,EAAE,IAAI,CAAC;;SAEnD,CACJ,CACJ,CAAC","sourcesContent":["import { css } from '@microsoft/fast-element';\nimport { display } from '@microsoft/fast-foundation';\nimport { White } from '@ni/nimble-tokens/dist/styledictionary/js/tokens';\nimport {\n applicationBackgroundColor,\n bodyFont,\n bodyFontColor,\n bodyDisabledFontColor,\n borderHoverColor,\n borderWidth,\n controlHeight,\n iconSize,\n menuMinWidth,\n popupBorderColor,\n smallDelay,\n smallPadding,\n borderRgbPartialColor,\n mediumPadding,\n failColor,\n elevation2BoxShadow\n} from '../../theme-provider/design-tokens';\nimport { Theme } from '../../theme-provider/types';\nimport { appearanceBehavior } from '../../utilities/style/appearance';\nimport { hexToRgbaCssColor } from '../../utilities/style/colors';\nimport { focusVisible } from '../../utilities/style/focus';\nimport { themeBehavior } from '../../utilities/style/theme';\nimport { DropdownAppearance } from './types';\nimport { userSelectNone } from '../../utilities/style/user-select';\n\nexport const styles = css`\n ${display('inline-flex')}\n\n :host {\n box-sizing: border-box;\n color: ${bodyFontColor};\n font: ${bodyFont};\n height: ${controlHeight};\n position: relative;\n justify-content: center;\n ${userSelectNone}\n min-width: ${menuMinWidth};\n outline: none;\n vertical-align: top;\n --ni-private-hover-indicator-width: calc(${borderWidth} + 1px);\n --ni-private-focus-indicator-width: 1px;\n --ni-private-indicator-lines-gap: 1px;\n }\n\n :host::before {\n content: '';\n position: absolute;\n bottom: calc(${borderWidth} + var(--ni-private-indicator-lines-gap));\n width: 0px;\n height: 0px;\n justify-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-focus-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::before {\n transition-duration: 0s;\n }\n }\n\n :host(${focusVisible})::before {\n width: calc(100% - 8px);\n }\n\n :host([error-visible]):before {\n border-bottom-color: ${failColor};\n }\n\n :host::after {\n content: '';\n position: absolute;\n bottom: calc(-1 * ${borderWidth});\n width: 0px;\n height: 0px;\n justify-self: center;\n border-bottom: ${borderHoverColor}\n var(--ni-private-hover-indicator-width) solid;\n transition: width ${smallDelay} ease-in;\n }\n\n @media (prefers-reduced-motion) {\n :host::after {\n transition-duration: 0s;\n }\n }\n\n :host(:hover)::after,\n :host(${focusVisible})::after {\n width: 100%;\n }\n\n :host([error-visible]):after {\n border-bottom-color: ${failColor};\n }\n\n :host([disabled]:hover)::after {\n width: 0px;\n }\n\n [part='start'] {\n display: none;\n }\n\n .control {\n align-items: center;\n box-sizing: border-box;\n cursor: pointer;\n display: flex;\n min-height: 100%;\n width: 100%;\n border: 0px solid rgba(${borderRgbPartialColor}, 0.3);\n background-color: transparent;\n padding: ${borderWidth};\n }\n\n :host([open]:not(:hover)) .control {\n border-bottom-color: ${borderHoverColor};\n }\n\n :host([disabled]) .control {\n cursor: default;\n color: ${bodyDisabledFontColor};\n border-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n :host([error-visible]) .control,\n :host([error-visible][open]) .control,\n :host([error-visible][disabled]) .control {\n border-bottom-color: ${failColor};\n }\n\n .listbox {\n box-sizing: border-box;\n display: inline-flex;\n flex-direction: column;\n overflow-y: auto;\n width: 100%;\n --ni-private-listbox-padding: ${smallPadding};\n max-height: calc(var(--ni-private-select-max-height) - ${smallPadding});\n box-shadow: ${elevation2BoxShadow};\n border: 1px solid ${popupBorderColor};\n background-color: ${applicationBackgroundColor};\n }\n\n .listbox slot {\n display: block;\n background: transparent;\n padding: var(--ni-private-listbox-padding);\n }\n\n :host([open][position='above']) .listbox {\n border-bottom-left-radius: 0;\n border-bottom-right-radius: 0;\n }\n\n :host([open][position='below']) .listbox {\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n }\n\n :host([open][position='above']) .anchored-region {\n padding-bottom: ${smallPadding};\n }\n\n :host([open][position='below']) .anchored-region {\n padding-top: ${smallPadding};\n }\n\n .selected-value {\n flex: auto;\n font-family: inherit;\n text-align: start;\n white-space: nowrap;\n text-overflow: ellipsis;\n overflow: hidden;\n padding: 0px;\n padding-left: ${mediumPadding};\n }\n\n .selected-value[disabled]::placeholder {\n color: ${bodyDisabledFontColor};\n }\n\n .indicator {\n flex: none;\n margin-inline-start: 1em;\n padding-right: 8px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .indicator slot[name='indicator'] svg {\n width: ${iconSize};\n height: ${iconSize};\n fill: ${bodyFontColor};\n }\n\n :host([disabled]) .indicator slot[name='indicator'] svg {\n fill: ${bodyDisabledFontColor};\n }\n\n [part='end'] {\n margin-inline-start: auto;\n }\n\n ::slotted([role='option']),\n ::slotted(option) {\n flex: none;\n }\n`.withBehaviors(\n appearanceBehavior(\n DropdownAppearance.underline,\n css`\n .control {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n\n :host([disabled]) .control {\n border-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.outline,\n css`\n .control {\n border-width: ${borderWidth};\n padding: 0;\n }\n `\n ),\n appearanceBehavior(\n DropdownAppearance.block,\n css`\n .control {\n background-color: rgba(${borderRgbPartialColor}, 0.1);\n }\n\n .control:focus-within {\n border-bottom-width: ${borderWidth};\n padding-bottom: 0;\n }\n\n :host([disabled]) .control {\n background-color: rgba(${borderRgbPartialColor}, 0.07);\n }\n `\n ),\n themeBehavior(\n Theme.color,\n css`\n .listbox slot {\n background: ${hexToRgbaCssColor(White, 0.15)};\n }\n `\n )\n);\n"]}
@@ -35,7 +35,7 @@ export declare class TablePageObject<T extends TableRecord> {
35
35
  getRenderedCellViewById(recordId: string, columnId: string): TableCellView;
36
36
  getRenderedCellTextContent(rowIndex: number, columnIndex: number): string;
37
37
  getRenderedCellAnchor(rowIndex: number, columnIndex: number): Anchor;
38
- getRenderedIconColumnCellIconTagName(rowIndex: number, columnIndex: number): string;
38
+ getRenderedMappingColumnCellIconTagName(rowIndex: number, columnIndex: number): string;
39
39
  getRenderedGroupHeaderTextContent(groupRowIndex: number): string;
40
40
  getAllRenderedGroupHeaderTextContent(): string[];
41
41
  getCellTitle(rowIndex: number, columnIndex: number): string;
@@ -107,6 +107,6 @@ export declare class TablePageObject<T extends TableRecord> {
107
107
  private getSelectionStateOfCheckbox;
108
108
  private getGroupRow;
109
109
  private getHeaderContentElement;
110
- private getRenderedIconColumnIconOrSpinner;
110
+ private getRenderedMappingColumnIconOrSpinner;
111
111
  private readonly isSlotElement;
112
112
  }
@@ -102,8 +102,8 @@ export class TablePageObject {
102
102
  }
103
103
  return anchor;
104
104
  }
105
- getRenderedIconColumnCellIconTagName(rowIndex, columnIndex) {
106
- const iconOrSpinner = this.getRenderedIconColumnIconOrSpinner(this.getRenderedCellView(rowIndex, columnIndex));
105
+ getRenderedMappingColumnCellIconTagName(rowIndex, columnIndex) {
106
+ const iconOrSpinner = this.getRenderedMappingColumnIconOrSpinner(this.getRenderedCellView(rowIndex, columnIndex));
107
107
  return iconOrSpinner.tagName.toLocaleLowerCase();
108
108
  }
109
109
  getRenderedGroupHeaderTextContent(groupRowIndex) {
@@ -505,7 +505,7 @@ export class TablePageObject {
505
505
  }
506
506
  return nodeChildren[0]; // header content should be first item in final slot element
507
507
  }
508
- getRenderedIconColumnIconOrSpinner(view) {
508
+ getRenderedMappingColumnIconOrSpinner(view) {
509
509
  const viewShadowRoot = view.shadowRoot;
510
510
  const spinnerOrIcon = viewShadowRoot.querySelector('.reserve-icon-size')?.firstElementChild;
511
511
  if (!(spinnerOrIcon instanceof Icon || spinnerOrIcon instanceof Spinner)) {
@@ -1 +1 @@
1
- {"version":3,"file":"table.pageobject.js","sourceRoot":"","sources":["../../../../src/table/testing/table.pageobject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAGzD,OAAO,EACH,wBAAwB,EAExB,sBAAsB,EACzB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAIlE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAElE,OAAO,EAAU,SAAS,EAAE,MAAM,cAAc,CAAC;AAGjD,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAUpD;;;GAGG;AACH,MAAM,OAAO,eAAe;IACxB,YAAoC,YAAsB;QAAtB,iBAAY,GAAZ,YAAY,CAAU;QA6wBzC,kBAAa,GAAG,CAC7B,OAAyB,EACC,EAAE;YAC5B,OAAO,OAAO,EAAE,QAAQ,KAAK,MAAM,IAAI,KAAK,CAAC;QACjD,CAAC,CAAC;IAjxB2D,CAAC;IAEvD,sBAAsB;QACzB,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,UAAW,CAAC,gBAAgB,CAC1D,qBAAqB,CACvB,CAAC;QACH,OAAO,OAAO,CAAC,MAAM,CAAC;IAC1B,CAAC;IAEM,0BAA0B,CAAC,QAAgB;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CA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CAAC,EAAE,IAAI,CAC9C,IAAI,CAAC,aAAa,CACrB,CAAC;QACF,IAAI,WAAW,EAAE;YACb,OAAO,IAAI,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC;SACpD;QAED,OAAO,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,4DAA4D;IACxF,CAAC;IAEO,kCAAkC,CACtC,IAA0C;QAE1C,MAAM,cAAc,GAAG,IAAI,CAAC,UAAW,CAAC;QACxC,MAAM,aAAa,GAAG,cAAc,CAAC,aAAa,CAC9C,oBAAoB,CACvB,EAAE,iBAAiB,CAAC;QACrB,IACI,CAAC,CAAC,aAAa,YAAY,IAAI,IAAI,aAAa,YAAY,OAAO,CAAC,EACtE;YACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAChD;QAED,OAAO,aAAa,CAAC;IACzB,CAAC;CAOJ","sourcesContent":["import type { Checkbox } from '@microsoft/fast-foundation';\nimport { keyShift } from '@microsoft/fast-web-utilities';\nimport type { Table } from '..';\nimport type { TableHeader } from '../components/header';\nimport {\n TableColumnSortDirection,\n TableRecord,\n TableRowSelectionState\n} from '../types';\nimport { waitForUpdatesAsync } from '../../testing/async-helpers';\nimport type { MenuButton } from '../../menu-button';\nimport type { TableCell } from '../components/cell';\nimport type { TableGroupHeaderView } from '../../table-column/base/group-header-view';\nimport { TableCellView } from '../../table-column/base/cell-view';\nimport type { TableRow } from '../components/row';\nimport { Anchor, anchorTag } from '../../anchor';\nimport type { TableGroupRow } from '../components/group-row';\nimport type { Button } from '../../button';\nimport { Icon } from '../../icon-base';\nimport { Spinner, spinnerTag } from '../../spinner';\n\n/**\n * Summary information about a column that is sorted in the table for use in the `TablePageObject`.\n */\nexport interface SortedColumn {\n columnId?: string;\n sortDirection: TableColumnSortDirection;\n}\n\n/**\n * Page object for the `nimble-table` component to provide consistent ways\n * of querying and interacting with the component during tests.\n */\nexport class TablePageObject<T extends TableRecord> {\n public constructor(private readonly tableElement: Table<T>) {}\n\n public getRenderedHeaderCount(): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-header'\n )!;\n return headers.length;\n }\n\n public getRenderedCellCountForRow(rowIndex: number): number {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n return cells.length;\n }\n\n public getHeaderContent(columnIndex: number): Node | undefined {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return this.getHeaderContentElement(headers.item(columnIndex));\n }\n\n public getHeaderElement(columnIndex: number): TableHeader {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers.item(columnIndex);\n }\n\n public getHeaderTitle(columnIndex: number): string {\n const column = this.tableElement.columns[columnIndex];\n return (\n column?.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToHeader(\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const column = this.tableElement.columns[columnIndex];\n return column?.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getHeaderRenderedWidth(columnIndex: number): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers[columnIndex]!.getBoundingClientRect().width;\n }\n\n public async clickColumnHeader(\n columnIndex: number,\n shiftKeyDown = false\n ): Promise<void> {\n const clickEvent = new MouseEvent('click', {\n shiftKey: shiftKeyDown,\n bubbles: true\n } as MouseEventInit);\n this.getHeaderElement(columnIndex).dispatchEvent(clickEvent);\n await waitForUpdatesAsync();\n }\n\n public getRenderedRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-row'\n ).length;\n }\n\n public getRenderedGroupRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n ).length;\n }\n\n public getAllGroupRowsExpandedState(): boolean[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n return Array.from(groupRows).map(row => row.expanded);\n }\n\n public getAllDataRowsExpandedState(): boolean[] {\n const rows = this.tableElement.shadowRoot!.querySelectorAll('nimble-table-row');\n return Array.from(rows).map(row => row.expanded);\n }\n\n public getRenderedCellView(\n rowIndex: number,\n columnIndex: number\n ): TableCellView {\n const cell = this.getCell(rowIndex, columnIndex);\n const cellView = cell.shadowRoot!.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellViewById(\n recordId: string,\n columnId: string\n ): TableCellView {\n const cell = this.getCellById(recordId, columnId);\n const cellView = cell.shadowRoot!.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellTextContent(\n rowIndex: number,\n columnIndex: number\n ): string {\n return (\n this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getRenderedCellAnchor(\n rowIndex: number,\n columnIndex: number\n ): Anchor {\n const anchor = this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.querySelector(anchorTag);\n if (!anchor) {\n throw new Error(\n `Anchor not found at cell ${rowIndex},${columnIndex}`\n );\n }\n return anchor;\n }\n\n public getRenderedIconColumnCellIconTagName(\n rowIndex: number,\n columnIndex: number\n ): string {\n const iconOrSpinner = this.getRenderedIconColumnIconOrSpinner(\n this.getRenderedCellView(rowIndex, columnIndex)\n );\n return iconOrSpinner.tagName.toLocaleLowerCase();\n }\n\n public getRenderedGroupHeaderTextContent(groupRowIndex: number): string {\n return (\n this.getGroupRowHeaderView(\n groupRowIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getAllRenderedGroupHeaderTextContent(): string[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n return Array.from(groupRows).map((_, i) => {\n return this.getRenderedGroupHeaderTextContent(i);\n });\n }\n\n public getCellTitle(rowIndex: number, columnIndex: number): string {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return (\n cellView.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToCell(\n rowIndex: number,\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return cellView.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getGroupHeaderTitle(groupRowIndex: number): string {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return (\n groupHeader\n .shadowRoot!.querySelector('span')\n ?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToGroupHeader(\n groupRowIndex: number,\n event: Event\n ): boolean | undefined {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return groupHeader\n .shadowRoot!.querySelector('span')\n ?.dispatchEvent(event);\n }\n\n public getRecordId(rowIndex: number): string | undefined {\n return this.getRow(rowIndex).recordId;\n }\n\n public getRowWidth(): number {\n const tableRowContainer = this.tableElement.shadowRoot!.querySelector(\n '.table-row-container'\n );\n return tableRowContainer!.scrollWidth;\n }\n\n public async sizeTableToGivenRowWidth(\n rowWidth: number,\n table: Table<T>\n ): Promise<void> {\n if (!table.$fastController.isConnected) {\n throw Error(\n 'The element must be connected before calling this method'\n );\n }\n\n table.style.width = `${\n rowWidth\n + table.headerRowActionContainer.getBoundingClientRect().width\n + table.virtualizer.headerContainerMarginRight\n }px`;\n await waitForUpdatesAsync();\n }\n\n public getCellRenderedWidth(rowIndex: number, columnIndex: number): number {\n const cell = this.getCell(rowIndex, columnIndex);\n const actualWidth = cell.getBoundingClientRect().width;\n // Round to one decimal place. This is to work around a bug in Chrome related to\n // fractional widths (e.g. '1fr') in grid layouts that results in some numerical\n // precision issues. See: https://bugs.chromium.org/p/chromium/issues/detail?id=1515685\n return Math.round(actualWidth * 10) / 10;\n }\n\n public getTotalCellRenderedWidth(): number {\n const row = this.getRow(0);\n const cells = row?.shadowRoot?.querySelectorAll('nimble-table-cell');\n return Array.from(cells!).reduce((p, c) => {\n return p + c.getBoundingClientRect().width;\n }, 0);\n }\n\n public async scrollToLastRowAsync(): Promise<void> {\n const scrollElement = this.tableElement.viewport;\n scrollElement.scroll({ top: scrollElement.scrollHeight });\n await waitForUpdatesAsync();\n }\n\n public getCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): MenuButton | null {\n return this.getCell(\n rowIndex,\n columnIndex\n ).shadowRoot!.querySelector<MenuButton>('nimble-menu-button');\n }\n\n public async clickCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): Promise<void> {\n this.setRowHoverState(rowIndex, true);\n await waitForUpdatesAsync();\n\n const menuButton = this.getCellActionMenu(rowIndex, columnIndex);\n if (!menuButton) {\n throw new Error('Cannot click on a non-visible action menu');\n }\n\n menuButton.toggleButton!.control.click();\n }\n\n public isCellActionMenuVisible(\n rowIndex: number,\n columnIndex: number\n ): boolean {\n const actionMenu = this.getCellActionMenu(rowIndex, columnIndex);\n if (!actionMenu) {\n return false;\n }\n\n return window.getComputedStyle(actionMenu).display !== 'none';\n }\n\n public setRowHoverState(rowIndex: number, hover: boolean): void {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n if (hover) {\n cells.forEach(cell => cell.style.setProperty(\n '--ni-private-table-cell-action-menu-display',\n 'block'\n ));\n } else {\n cells.forEach(cell => cell.style.removeProperty(\n '--ni-private-table-cell-action-menu-display'\n ));\n }\n }\n\n public async clickGroupRow(groupRowIndex: number): Promise<void> {\n const groupRow = this.getGroupRow(groupRowIndex);\n groupRow.click();\n await waitForUpdatesAsync();\n }\n\n public async clickRow(\n rowIndex: number,\n modifiers: { shiftKey?: boolean, ctrlKey?: boolean } = {}\n ): Promise<void> {\n const row = this.getRow(rowIndex);\n const event = new MouseEvent('click', modifiers);\n row.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public getIsRowSelectable(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selectable;\n }\n\n public getIsRowSelected(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selected;\n }\n\n public toggleGroupRowExpandedState(groupRowIndex: number): void {\n this.getGroupRow(groupRowIndex).click();\n }\n\n public clickCollapseAllButton(): void {\n this.getCollapseAllButton()?.click();\n }\n\n public clickDataRowExpandCollapseButton(rowIndex: number): void {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n if (!expandCollapseButton) {\n throw new Error(\n 'The provided row index has no visible expand collapse button associated with it.'\n );\n }\n\n expandCollapseButton.click();\n }\n\n public isCollapseAllButtonVisible(): boolean {\n const collapseButton = this.getCollapseAllButton();\n if (collapseButton) {\n return (\n window.getComputedStyle(collapseButton).visibility === 'visible'\n );\n }\n return false;\n }\n\n public isDataRowExpandCollapseButtonVisible(rowIndex: number): boolean {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n return expandCollapseButton !== null;\n }\n\n public isDataRowLoadingSpinnerVisible(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n const spinner = row.shadowRoot!.querySelector(spinnerTag);\n return spinner !== null;\n }\n\n public isTableSelectionCheckboxVisible(): boolean {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.isCheckboxVisible(checkbox);\n }\n\n public getTableSelectionState(): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickTableSelectionCheckbox(): void {\n const checkbox = this.getSelectionCheckboxForTable();\n checkbox!.click();\n }\n\n public isRowSelectionCheckboxVisible(rowIndex: number): boolean {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.isCheckboxVisible(checkbox);\n }\n\n public getRowSelectionState(rowIndex: number): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickRowSelectionCheckbox(rowIndex: number, shiftKey = false): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n public getGroupRowSelectionState(\n groupRowIndex: number\n ): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickGroupRowSelectionCheckbox(\n groupRowIndex: number,\n shiftKey = false\n ): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n /**\n * @param columnIndex The index of the column to the left of a divider being dragged. Thus, this\n * can not be given a value representing the last visible column index.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByRightDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n const divider = this.getColumnRightDivider(columnIndex);\n if (!divider) {\n throw new Error(\n 'The provided column index has no right divider associated with it.'\n );\n }\n const dividerRect = divider.getBoundingClientRect();\n let currentMouseX = (dividerRect.x + dividerRect.width) / 2;\n const mouseDownEvent = new MouseEvent('mousedown', {\n clientX: currentMouseX,\n clientY: (dividerRect.y + dividerRect.height) / 2\n });\n divider.dispatchEvent(mouseDownEvent);\n\n for (const delta of deltas) {\n currentMouseX += delta;\n const mouseMoveEvent = new MouseEvent('mousemove', {\n clientX: currentMouseX\n });\n document.dispatchEvent(mouseMoveEvent);\n }\n\n const mouseUpEvent = new MouseEvent('mouseup');\n document.dispatchEvent(mouseUpEvent);\n }\n\n /**\n * @param columnIndex The index of the column to the right of a divider being dragged. Thus, this\n * value must be greater than 0 and less than the total number of visible columns.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByLeftDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n const divider = this.getColumnLeftDivider(columnIndex);\n if (!divider) {\n throw new Error(\n 'The provided column index has no left divider associated with it.'\n );\n }\n const dividerRect = divider.getBoundingClientRect();\n let currentMouseX = (dividerRect.x + dividerRect.width) / 2;\n const mouseDownEvent = new MouseEvent('mousedown', {\n clientX: currentMouseX,\n clientY: (dividerRect.y + dividerRect.height) / 2\n });\n divider.dispatchEvent(mouseDownEvent);\n\n for (const delta of deltas) {\n currentMouseX += delta;\n const mouseMoveEvent = new MouseEvent('mousemove', {\n clientX: currentMouseX\n });\n document.dispatchEvent(mouseMoveEvent);\n }\n\n const mouseUpEvent = new MouseEvent('mouseup');\n document.dispatchEvent(mouseUpEvent);\n }\n\n public getColumnRightDivider(index: number): HTMLElement | null {\n const headerContainers = this.tableElement.shadowRoot!.querySelectorAll('.header-container');\n if (index < 0 || index >= headerContainers.length) {\n throw new Error(\n 'Invalid column index. Index must be greater than or equal to 0 and less than the number of visible columns.'\n );\n }\n\n return headerContainers[index]!.querySelector('.column-divider.right');\n }\n\n public getColumnLeftDivider(index: number): HTMLElement | null {\n const headerContainers = this.tableElement.shadowRoot!.querySelectorAll('.header-container');\n if (index < 0 || index >= headerContainers.length) {\n throw new Error(\n 'Invalid column index. Index must be greater than or equal to 0 and less than the number of visible columns.'\n );\n }\n\n return headerContainers[index]!.querySelector('.column-divider.left');\n }\n\n public isVerticalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientHeight\n < this.tableElement.viewport.scrollHeight\n );\n }\n\n public isHorizontalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientWidth\n < this.tableElement.viewport.scrollWidth\n );\n }\n\n public getSortedColumns(): SortedColumn[] {\n return this.tableElement.columns\n .filter(\n x => !x.sortingDisabled\n && typeof x.columnInternals.currentSortIndex === 'number'\n && x.columnInternals.currentSortDirection\n !== TableColumnSortDirection.none\n )\n .sort(\n (a, b) => a.columnInternals.currentSortIndex!\n - b.columnInternals.currentSortIndex!\n )\n .map(x => {\n return {\n columnId: x.columnId,\n sortDirection: x.columnInternals.currentSortDirection\n };\n });\n }\n\n public getGroupedColumns(): string[] {\n return this.tableElement.columns\n .filter(\n x => !x.columnInternals.groupingDisabled\n && typeof x.columnInternals.groupIndex === 'number'\n )\n .sort(\n (a, b) => a.columnInternals.groupIndex!\n - b.columnInternals.groupIndex!\n )\n .map(x => x.columnId ?? '');\n }\n\n public getChildRowCountForGroup(groupRowIndex: number): number {\n const groupRow = this.getGroupRow(groupRowIndex);\n const countDisplayString = groupRow\n .shadowRoot!.querySelector('.group-row-child-count')!\n .textContent!.trim();\n // Remove the parenthesis to get just the number as a string\n const countString = countDisplayString.substring(\n 1,\n countDisplayString.length - 1\n );\n return Number(countString);\n }\n\n /** @internal */\n public getGroupRowHeaderView(groupRowIndex: number): TableGroupHeaderView {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.group-header-view')!;\n }\n\n private getRow(rowIndex: number): TableRow {\n const rows = this.tableElement.shadowRoot!.querySelectorAll('nimble-table-row');\n if (rowIndex >= rows.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered rows'\n );\n }\n\n return rows.item(rowIndex);\n }\n\n private getRowById(recordId: string): TableRow {\n const row: TableRow | null = this.tableElement.shadowRoot!.querySelector(\n `nimble-table-row[record-id=\"${CSS.escape(recordId)}\"]`\n );\n if (!row) {\n throw new Error(\n 'Row with given id was not found. It may not be scrolled into view.'\n );\n }\n\n return row;\n }\n\n private getCell(rowIndex: number, columnIndex: number): TableCell {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n if (columnIndex >= cells.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return cells.item(columnIndex);\n }\n\n private getCellById(recordId: string, columnId: string): TableCell {\n const row = this.getRowById(recordId);\n const cell: TableCell | null = row.shadowRoot!.querySelector(\n `nimble-table-cell[column-id=\"${CSS.escape(columnId)}\"]`\n );\n\n if (!cell) {\n throw new Error('Cell with given columnId was not found in row');\n }\n\n return cell;\n }\n\n private getCollapseAllButton(): Button | null {\n return this.tableElement.shadowRoot!.querySelector<Button>(\n '.collapse-all-button'\n );\n }\n\n private getExpandCollapseButtonForRow(rowIndex: number): Button | null {\n const row = this.getRow(rowIndex);\n const rowExpandCollapseButton = row.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n if (!rowExpandCollapseButton) {\n const firstCell = this.getCell(rowIndex, 0);\n return firstCell?.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n }\n\n return rowExpandCollapseButton;\n }\n\n private getSelectionCheckboxForRow(rowIndex: number): Checkbox | null {\n const row = this.getRow(rowIndex);\n return row.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForGroupRow(\n groupRowIndex: number\n ): Checkbox | null {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForTable(): Checkbox | null {\n return this.tableElement.shadowRoot!.querySelector<Checkbox>(\n '.header-row .selection-checkbox'\n );\n }\n\n private isCheckboxVisible(checkbox: Checkbox | null): boolean {\n return !!checkbox && !checkbox.hidden;\n }\n\n private getSelectionStateOfCheckbox(\n checkbox: Checkbox | null\n ): TableRowSelectionState {\n if (!checkbox) {\n throw new Error('Cannot get selection state from null checkbox');\n }\n\n if (checkbox.indeterminate) {\n return TableRowSelectionState.partiallySelected;\n }\n if (checkbox.checked) {\n return TableRowSelectionState.selected;\n }\n return TableRowSelectionState.notSelected;\n }\n\n private getGroupRow(groupRowIndex: number): TableGroupRow {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n if (groupRowIndex >= groupRows.length) {\n throw new Error(\n 'Attempting to index past the total number of group rows'\n );\n }\n\n return groupRows.item(groupRowIndex);\n }\n\n private getHeaderContentElement(\n element: HTMLElement | HTMLSlotElement\n ): Node | undefined {\n const nodeChildren = this.isSlotElement(element)\n ? element.assignedNodes()\n : element.shadowRoot?.childNodes;\n if (!nodeChildren) {\n return undefined;\n }\n\n const slotElement = Array.from(nodeChildren)?.find<HTMLSlotElement>(\n this.isSlotElement\n );\n if (slotElement) {\n return this.getHeaderContentElement(slotElement);\n }\n\n return nodeChildren[0]; // header content should be first item in final slot element\n }\n\n private getRenderedIconColumnIconOrSpinner(\n view: TableCellView | TableGroupHeaderView\n ): Icon | Spinner {\n const viewShadowRoot = view.shadowRoot!;\n const spinnerOrIcon = viewShadowRoot.querySelector(\n '.reserve-icon-size'\n )?.firstElementChild;\n if (\n !(spinnerOrIcon instanceof Icon || spinnerOrIcon instanceof Spinner)\n ) {\n throw new Error('Icon or Spinner not found');\n }\n\n return spinnerOrIcon;\n }\n\n private readonly isSlotElement = (\n element: Node | undefined\n ): element is HTMLSlotElement => {\n return element?.nodeName === 'SLOT' ?? false;\n };\n}\n"]}
1
+ {"version":3,"file":"table.pageobject.js","sourceRoot":"","sources":["../../../../src/table/testing/table.pageobject.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAGzD,OAAO,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E;YACE,MAAM,IAAI,KAAK,CAAC,2BAA2B,CAAC,CAAC;SAChD;QAED,OAAO,aAAa,CAAC;IACzB,CAAC;CAOJ","sourcesContent":["import type { Checkbox } from '@microsoft/fast-foundation';\nimport { keyShift } from '@microsoft/fast-web-utilities';\nimport type { Table } from '..';\nimport type { TableHeader } from '../components/header';\nimport {\n TableColumnSortDirection,\n TableRecord,\n TableRowSelectionState\n} from '../types';\nimport { waitForUpdatesAsync } from '../../testing/async-helpers';\nimport type { MenuButton } from '../../menu-button';\nimport type { TableCell } from '../components/cell';\nimport type { TableGroupHeaderView } from '../../table-column/base/group-header-view';\nimport { TableCellView } from '../../table-column/base/cell-view';\nimport type { TableRow } from '../components/row';\nimport { Anchor, anchorTag } from '../../anchor';\nimport type { TableGroupRow } from '../components/group-row';\nimport type { Button } from '../../button';\nimport { Icon } from '../../icon-base';\nimport { Spinner, spinnerTag } from '../../spinner';\n\n/**\n * Summary information about a column that is sorted in the table for use in the `TablePageObject`.\n */\nexport interface SortedColumn {\n columnId?: string;\n sortDirection: TableColumnSortDirection;\n}\n\n/**\n * Page object for the `nimble-table` component to provide consistent ways\n * of querying and interacting with the component during tests.\n */\nexport class TablePageObject<T extends TableRecord> {\n public constructor(private readonly tableElement: Table<T>) {}\n\n public getRenderedHeaderCount(): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-header'\n )!;\n return headers.length;\n }\n\n public getRenderedCellCountForRow(rowIndex: number): number {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n return cells.length;\n }\n\n public getHeaderContent(columnIndex: number): Node | undefined {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return this.getHeaderContentElement(headers.item(columnIndex));\n }\n\n public getHeaderElement(columnIndex: number): TableHeader {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers.item(columnIndex);\n }\n\n public getHeaderTitle(columnIndex: number): string {\n const column = this.tableElement.columns[columnIndex];\n return (\n column?.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToHeader(\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const column = this.tableElement.columns[columnIndex];\n return column?.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getHeaderRenderedWidth(columnIndex: number): number {\n const headers = this.tableElement.shadowRoot!.querySelectorAll<TableHeader>(\n 'nimble-table-header'\n )!;\n if (columnIndex >= headers.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return headers[columnIndex]!.getBoundingClientRect().width;\n }\n\n public async clickColumnHeader(\n columnIndex: number,\n shiftKeyDown = false\n ): Promise<void> {\n const clickEvent = new MouseEvent('click', {\n shiftKey: shiftKeyDown,\n bubbles: true\n } as MouseEventInit);\n this.getHeaderElement(columnIndex).dispatchEvent(clickEvent);\n await waitForUpdatesAsync();\n }\n\n public getRenderedRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-row'\n ).length;\n }\n\n public getRenderedGroupRowCount(): number {\n return this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n ).length;\n }\n\n public getAllGroupRowsExpandedState(): boolean[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n return Array.from(groupRows).map(row => row.expanded);\n }\n\n public getAllDataRowsExpandedState(): boolean[] {\n const rows = this.tableElement.shadowRoot!.querySelectorAll('nimble-table-row');\n return Array.from(rows).map(row => row.expanded);\n }\n\n public getRenderedCellView(\n rowIndex: number,\n columnIndex: number\n ): TableCellView {\n const cell = this.getCell(rowIndex, columnIndex);\n const cellView = cell.shadowRoot!.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellViewById(\n recordId: string,\n columnId: string\n ): TableCellView {\n const cell = this.getCellById(recordId, columnId);\n const cellView = cell.shadowRoot!.firstElementChild;\n if (!(cellView instanceof TableCellView)) {\n throw new Error(\n 'Cell view not found in cell - ensure cellViewTag is set for column'\n );\n }\n return cellView as TableCellView;\n }\n\n public getRenderedCellTextContent(\n rowIndex: number,\n columnIndex: number\n ): string {\n return (\n this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getRenderedCellAnchor(\n rowIndex: number,\n columnIndex: number\n ): Anchor {\n const anchor = this.getRenderedCellView(\n rowIndex,\n columnIndex\n ).shadowRoot!.querySelector(anchorTag);\n if (!anchor) {\n throw new Error(\n `Anchor not found at cell ${rowIndex},${columnIndex}`\n );\n }\n return anchor;\n }\n\n public getRenderedMappingColumnCellIconTagName(\n rowIndex: number,\n columnIndex: number\n ): string {\n const iconOrSpinner = this.getRenderedMappingColumnIconOrSpinner(\n this.getRenderedCellView(rowIndex, columnIndex)\n );\n return iconOrSpinner.tagName.toLocaleLowerCase();\n }\n\n public getRenderedGroupHeaderTextContent(groupRowIndex: number): string {\n return (\n this.getGroupRowHeaderView(\n groupRowIndex\n ).shadowRoot!.textContent?.trim() ?? ''\n );\n }\n\n public getAllRenderedGroupHeaderTextContent(): string[] {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n return Array.from(groupRows).map((_, i) => {\n return this.getRenderedGroupHeaderTextContent(i);\n });\n }\n\n public getCellTitle(rowIndex: number, columnIndex: number): string {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return (\n cellView.shadowRoot!.firstElementChild?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToCell(\n rowIndex: number,\n columnIndex: number,\n event: Event\n ): boolean | undefined {\n const cellView = this.getRenderedCellView(rowIndex, columnIndex);\n return cellView.shadowRoot!.firstElementChild?.dispatchEvent(event);\n }\n\n public getGroupHeaderTitle(groupRowIndex: number): string {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return (\n groupHeader\n .shadowRoot!.querySelector('span')\n ?.getAttribute('title') ?? ''\n );\n }\n\n public dispatchEventToGroupHeader(\n groupRowIndex: number,\n event: Event\n ): boolean | undefined {\n const groupHeader = this.getGroupRowHeaderView(groupRowIndex);\n return groupHeader\n .shadowRoot!.querySelector('span')\n ?.dispatchEvent(event);\n }\n\n public getRecordId(rowIndex: number): string | undefined {\n return this.getRow(rowIndex).recordId;\n }\n\n public getRowWidth(): number {\n const tableRowContainer = this.tableElement.shadowRoot!.querySelector(\n '.table-row-container'\n );\n return tableRowContainer!.scrollWidth;\n }\n\n public async sizeTableToGivenRowWidth(\n rowWidth: number,\n table: Table<T>\n ): Promise<void> {\n if (!table.$fastController.isConnected) {\n throw Error(\n 'The element must be connected before calling this method'\n );\n }\n\n table.style.width = `${\n rowWidth\n + table.headerRowActionContainer.getBoundingClientRect().width\n + table.virtualizer.headerContainerMarginRight\n }px`;\n await waitForUpdatesAsync();\n }\n\n public getCellRenderedWidth(rowIndex: number, columnIndex: number): number {\n const cell = this.getCell(rowIndex, columnIndex);\n const actualWidth = cell.getBoundingClientRect().width;\n // Round to one decimal place. This is to work around a bug in Chrome related to\n // fractional widths (e.g. '1fr') in grid layouts that results in some numerical\n // precision issues. See: https://bugs.chromium.org/p/chromium/issues/detail?id=1515685\n return Math.round(actualWidth * 10) / 10;\n }\n\n public getTotalCellRenderedWidth(): number {\n const row = this.getRow(0);\n const cells = row?.shadowRoot?.querySelectorAll('nimble-table-cell');\n return Array.from(cells!).reduce((p, c) => {\n return p + c.getBoundingClientRect().width;\n }, 0);\n }\n\n public async scrollToLastRowAsync(): Promise<void> {\n const scrollElement = this.tableElement.viewport;\n scrollElement.scroll({ top: scrollElement.scrollHeight });\n await waitForUpdatesAsync();\n }\n\n public getCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): MenuButton | null {\n return this.getCell(\n rowIndex,\n columnIndex\n ).shadowRoot!.querySelector<MenuButton>('nimble-menu-button');\n }\n\n public async clickCellActionMenu(\n rowIndex: number,\n columnIndex: number\n ): Promise<void> {\n this.setRowHoverState(rowIndex, true);\n await waitForUpdatesAsync();\n\n const menuButton = this.getCellActionMenu(rowIndex, columnIndex);\n if (!menuButton) {\n throw new Error('Cannot click on a non-visible action menu');\n }\n\n menuButton.toggleButton!.control.click();\n }\n\n public isCellActionMenuVisible(\n rowIndex: number,\n columnIndex: number\n ): boolean {\n const actionMenu = this.getCellActionMenu(rowIndex, columnIndex);\n if (!actionMenu) {\n return false;\n }\n\n return window.getComputedStyle(actionMenu).display !== 'none';\n }\n\n public setRowHoverState(rowIndex: number, hover: boolean): void {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n if (hover) {\n cells.forEach(cell => cell.style.setProperty(\n '--ni-private-table-cell-action-menu-display',\n 'block'\n ));\n } else {\n cells.forEach(cell => cell.style.removeProperty(\n '--ni-private-table-cell-action-menu-display'\n ));\n }\n }\n\n public async clickGroupRow(groupRowIndex: number): Promise<void> {\n const groupRow = this.getGroupRow(groupRowIndex);\n groupRow.click();\n await waitForUpdatesAsync();\n }\n\n public async clickRow(\n rowIndex: number,\n modifiers: { shiftKey?: boolean, ctrlKey?: boolean } = {}\n ): Promise<void> {\n const row = this.getRow(rowIndex);\n const event = new MouseEvent('click', modifiers);\n row.dispatchEvent(event);\n await waitForUpdatesAsync();\n }\n\n public getIsRowSelectable(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selectable;\n }\n\n public getIsRowSelected(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n return row.selected;\n }\n\n public toggleGroupRowExpandedState(groupRowIndex: number): void {\n this.getGroupRow(groupRowIndex).click();\n }\n\n public clickCollapseAllButton(): void {\n this.getCollapseAllButton()?.click();\n }\n\n public clickDataRowExpandCollapseButton(rowIndex: number): void {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n if (!expandCollapseButton) {\n throw new Error(\n 'The provided row index has no visible expand collapse button associated with it.'\n );\n }\n\n expandCollapseButton.click();\n }\n\n public isCollapseAllButtonVisible(): boolean {\n const collapseButton = this.getCollapseAllButton();\n if (collapseButton) {\n return (\n window.getComputedStyle(collapseButton).visibility === 'visible'\n );\n }\n return false;\n }\n\n public isDataRowExpandCollapseButtonVisible(rowIndex: number): boolean {\n const expandCollapseButton = this.getExpandCollapseButtonForRow(rowIndex);\n return expandCollapseButton !== null;\n }\n\n public isDataRowLoadingSpinnerVisible(rowIndex: number): boolean {\n const row = this.getRow(rowIndex);\n const spinner = row.shadowRoot!.querySelector(spinnerTag);\n return spinner !== null;\n }\n\n public isTableSelectionCheckboxVisible(): boolean {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.isCheckboxVisible(checkbox);\n }\n\n public getTableSelectionState(): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForTable();\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickTableSelectionCheckbox(): void {\n const checkbox = this.getSelectionCheckboxForTable();\n checkbox!.click();\n }\n\n public isRowSelectionCheckboxVisible(rowIndex: number): boolean {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.isCheckboxVisible(checkbox);\n }\n\n public getRowSelectionState(rowIndex: number): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickRowSelectionCheckbox(rowIndex: number, shiftKey = false): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForRow(rowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n public getGroupRowSelectionState(\n groupRowIndex: number\n ): TableRowSelectionState {\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n return this.getSelectionStateOfCheckbox(checkbox);\n }\n\n public clickGroupRowSelectionCheckbox(\n groupRowIndex: number,\n shiftKey = false\n ): void {\n if (shiftKey) {\n const shiftKeyDownEvent = new KeyboardEvent('keydown', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyDownEvent);\n }\n\n const checkbox = this.getSelectionCheckboxForGroupRow(groupRowIndex);\n checkbox!.click();\n\n if (shiftKey) {\n const shiftKeyUpEvent = new KeyboardEvent('keyup', {\n key: keyShift\n } as KeyboardEventInit);\n document.dispatchEvent(shiftKeyUpEvent);\n }\n }\n\n /**\n * @param columnIndex The index of the column to the left of a divider being dragged. Thus, this\n * can not be given a value representing the last visible column index.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByRightDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n const divider = this.getColumnRightDivider(columnIndex);\n if (!divider) {\n throw new Error(\n 'The provided column index has no right divider associated with it.'\n );\n }\n const dividerRect = divider.getBoundingClientRect();\n let currentMouseX = (dividerRect.x + dividerRect.width) / 2;\n const mouseDownEvent = new MouseEvent('mousedown', {\n clientX: currentMouseX,\n clientY: (dividerRect.y + dividerRect.height) / 2\n });\n divider.dispatchEvent(mouseDownEvent);\n\n for (const delta of deltas) {\n currentMouseX += delta;\n const mouseMoveEvent = new MouseEvent('mousemove', {\n clientX: currentMouseX\n });\n document.dispatchEvent(mouseMoveEvent);\n }\n\n const mouseUpEvent = new MouseEvent('mouseup');\n document.dispatchEvent(mouseUpEvent);\n }\n\n /**\n * @param columnIndex The index of the column to the right of a divider being dragged. Thus, this\n * value must be greater than 0 and less than the total number of visible columns.\n * @param deltas The series of mouse movements in the x-direction while sizing a column.\n */\n public dragSizeColumnByLeftDivider(\n columnIndex: number,\n deltas: readonly number[]\n ): void {\n const divider = this.getColumnLeftDivider(columnIndex);\n if (!divider) {\n throw new Error(\n 'The provided column index has no left divider associated with it.'\n );\n }\n const dividerRect = divider.getBoundingClientRect();\n let currentMouseX = (dividerRect.x + dividerRect.width) / 2;\n const mouseDownEvent = new MouseEvent('mousedown', {\n clientX: currentMouseX,\n clientY: (dividerRect.y + dividerRect.height) / 2\n });\n divider.dispatchEvent(mouseDownEvent);\n\n for (const delta of deltas) {\n currentMouseX += delta;\n const mouseMoveEvent = new MouseEvent('mousemove', {\n clientX: currentMouseX\n });\n document.dispatchEvent(mouseMoveEvent);\n }\n\n const mouseUpEvent = new MouseEvent('mouseup');\n document.dispatchEvent(mouseUpEvent);\n }\n\n public getColumnRightDivider(index: number): HTMLElement | null {\n const headerContainers = this.tableElement.shadowRoot!.querySelectorAll('.header-container');\n if (index < 0 || index >= headerContainers.length) {\n throw new Error(\n 'Invalid column index. Index must be greater than or equal to 0 and less than the number of visible columns.'\n );\n }\n\n return headerContainers[index]!.querySelector('.column-divider.right');\n }\n\n public getColumnLeftDivider(index: number): HTMLElement | null {\n const headerContainers = this.tableElement.shadowRoot!.querySelectorAll('.header-container');\n if (index < 0 || index >= headerContainers.length) {\n throw new Error(\n 'Invalid column index. Index must be greater than or equal to 0 and less than the number of visible columns.'\n );\n }\n\n return headerContainers[index]!.querySelector('.column-divider.left');\n }\n\n public isVerticalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientHeight\n < this.tableElement.viewport.scrollHeight\n );\n }\n\n public isHorizontalScrollbarVisible(): boolean {\n return (\n this.tableElement.viewport.clientWidth\n < this.tableElement.viewport.scrollWidth\n );\n }\n\n public getSortedColumns(): SortedColumn[] {\n return this.tableElement.columns\n .filter(\n x => !x.sortingDisabled\n && typeof x.columnInternals.currentSortIndex === 'number'\n && x.columnInternals.currentSortDirection\n !== TableColumnSortDirection.none\n )\n .sort(\n (a, b) => a.columnInternals.currentSortIndex!\n - b.columnInternals.currentSortIndex!\n )\n .map(x => {\n return {\n columnId: x.columnId,\n sortDirection: x.columnInternals.currentSortDirection\n };\n });\n }\n\n public getGroupedColumns(): string[] {\n return this.tableElement.columns\n .filter(\n x => !x.columnInternals.groupingDisabled\n && typeof x.columnInternals.groupIndex === 'number'\n )\n .sort(\n (a, b) => a.columnInternals.groupIndex!\n - b.columnInternals.groupIndex!\n )\n .map(x => x.columnId ?? '');\n }\n\n public getChildRowCountForGroup(groupRowIndex: number): number {\n const groupRow = this.getGroupRow(groupRowIndex);\n const countDisplayString = groupRow\n .shadowRoot!.querySelector('.group-row-child-count')!\n .textContent!.trim();\n // Remove the parenthesis to get just the number as a string\n const countString = countDisplayString.substring(\n 1,\n countDisplayString.length - 1\n );\n return Number(countString);\n }\n\n /** @internal */\n public getGroupRowHeaderView(groupRowIndex: number): TableGroupHeaderView {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.group-header-view')!;\n }\n\n private getRow(rowIndex: number): TableRow {\n const rows = this.tableElement.shadowRoot!.querySelectorAll('nimble-table-row');\n if (rowIndex >= rows.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered rows'\n );\n }\n\n return rows.item(rowIndex);\n }\n\n private getRowById(recordId: string): TableRow {\n const row: TableRow | null = this.tableElement.shadowRoot!.querySelector(\n `nimble-table-row[record-id=\"${CSS.escape(recordId)}\"]`\n );\n if (!row) {\n throw new Error(\n 'Row with given id was not found. It may not be scrolled into view.'\n );\n }\n\n return row;\n }\n\n private getCell(rowIndex: number, columnIndex: number): TableCell {\n const row = this.getRow(rowIndex);\n const cells = row.shadowRoot!.querySelectorAll('nimble-table-cell');\n if (columnIndex >= cells.length) {\n throw new Error(\n 'Attempting to index past the total number of rendered columns'\n );\n }\n\n return cells.item(columnIndex);\n }\n\n private getCellById(recordId: string, columnId: string): TableCell {\n const row = this.getRowById(recordId);\n const cell: TableCell | null = row.shadowRoot!.querySelector(\n `nimble-table-cell[column-id=\"${CSS.escape(columnId)}\"]`\n );\n\n if (!cell) {\n throw new Error('Cell with given columnId was not found in row');\n }\n\n return cell;\n }\n\n private getCollapseAllButton(): Button | null {\n return this.tableElement.shadowRoot!.querySelector<Button>(\n '.collapse-all-button'\n );\n }\n\n private getExpandCollapseButtonForRow(rowIndex: number): Button | null {\n const row = this.getRow(rowIndex);\n const rowExpandCollapseButton = row.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n if (!rowExpandCollapseButton) {\n const firstCell = this.getCell(rowIndex, 0);\n return firstCell?.shadowRoot!.querySelector<Button>(\n '.expand-collapse-button'\n );\n }\n\n return rowExpandCollapseButton;\n }\n\n private getSelectionCheckboxForRow(rowIndex: number): Checkbox | null {\n const row = this.getRow(rowIndex);\n return row.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForGroupRow(\n groupRowIndex: number\n ): Checkbox | null {\n const groupRow = this.getGroupRow(groupRowIndex);\n return groupRow.shadowRoot!.querySelector('.selection-checkbox');\n }\n\n private getSelectionCheckboxForTable(): Checkbox | null {\n return this.tableElement.shadowRoot!.querySelector<Checkbox>(\n '.header-row .selection-checkbox'\n );\n }\n\n private isCheckboxVisible(checkbox: Checkbox | null): boolean {\n return !!checkbox && !checkbox.hidden;\n }\n\n private getSelectionStateOfCheckbox(\n checkbox: Checkbox | null\n ): TableRowSelectionState {\n if (!checkbox) {\n throw new Error('Cannot get selection state from null checkbox');\n }\n\n if (checkbox.indeterminate) {\n return TableRowSelectionState.partiallySelected;\n }\n if (checkbox.checked) {\n return TableRowSelectionState.selected;\n }\n return TableRowSelectionState.notSelected;\n }\n\n private getGroupRow(groupRowIndex: number): TableGroupRow {\n const groupRows = this.tableElement.shadowRoot!.querySelectorAll(\n 'nimble-table-group-row'\n );\n if (groupRowIndex >= groupRows.length) {\n throw new Error(\n 'Attempting to index past the total number of group rows'\n );\n }\n\n return groupRows.item(groupRowIndex);\n }\n\n private getHeaderContentElement(\n element: HTMLElement | HTMLSlotElement\n ): Node | undefined {\n const nodeChildren = this.isSlotElement(element)\n ? element.assignedNodes()\n : element.shadowRoot?.childNodes;\n if (!nodeChildren) {\n return undefined;\n }\n\n const slotElement = Array.from(nodeChildren)?.find<HTMLSlotElement>(\n this.isSlotElement\n );\n if (slotElement) {\n return this.getHeaderContentElement(slotElement);\n }\n\n return nodeChildren[0]; // header content should be first item in final slot element\n }\n\n private getRenderedMappingColumnIconOrSpinner(\n view: TableCellView | TableGroupHeaderView\n ): Icon | Spinner {\n const viewShadowRoot = view.shadowRoot!;\n const spinnerOrIcon = viewShadowRoot.querySelector(\n '.reserve-icon-size'\n )?.firstElementChild;\n if (\n !(spinnerOrIcon instanceof Icon || spinnerOrIcon instanceof Spinner)\n ) {\n throw new Error('Icon or Spinner not found');\n }\n\n return spinnerOrIcon;\n }\n\n private readonly isSlotElement = (\n element: Node | undefined\n ): element is HTMLSlotElement => {\n return element?.nodeName === 'SLOT' ?? false;\n };\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Input data types for mapping-based columns (i.e. enum text and icon)
2
+ * Input data types for mapping-based columns
3
3
  * @public
4
4
  */
5
5
  export declare const MappingKeyType: {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Input data types for mapping-based columns (i.e. enum text and icon)
2
+ * Input data types for mapping-based columns
3
3
  * @public
4
4
  */
5
5
  export const MappingKeyType = {
@@ -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 (i.e. enum text and icon)\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 =\n (typeof MappingKeyType)[keyof typeof MappingKeyType];\n"]}
@@ -6,13 +6,13 @@ import { IconSeverity } from '../../../icon-base/types';
6
6
  import { SpinnerView } from '../../enum-base/models/mapping-spinner-config';
7
7
  declare global {
8
8
  interface HTMLElementTagNameMap {
9
- 'nimble-table-column-icon-cell-view': TableColumnIconCellView;
9
+ 'nimble-table-column-mapping-cell-view': TableColumnMappingCellView;
10
10
  }
11
11
  }
12
12
  /**
13
- * The cell view for the icon column
13
+ * The cell view for the mapping column
14
14
  */
15
- export declare class TableColumnIconCellView extends TableCellView<TableColumnEnumCellRecord, TableColumnEnumColumnConfig> implements IconView, SpinnerView {
15
+ export declare class TableColumnMappingCellView extends TableCellView<TableColumnEnumCellRecord, TableColumnEnumColumnConfig> implements IconView, SpinnerView {
16
16
  severity: IconSeverity;
17
17
  text?: string;
18
18
  visualizationTemplate?: ViewTemplate<IconView> | ViewTemplate<SpinnerView>;
@@ -24,4 +24,4 @@ export declare class TableColumnIconCellView extends TableCellView<TableColumnEn
24
24
  private updateState;
25
25
  private resetState;
26
26
  }
27
- export declare const tableColumnIconCellViewTag = "nimble-table-column-icon-cell-view";
27
+ export declare const tableColumnMappingCellViewTag = "nimble-table-column-mapping-cell-view";
@@ -9,9 +9,9 @@ import { IconSeverity } from '../../../icon-base/types';
9
9
  import { MappingSpinnerConfig } from '../../enum-base/models/mapping-spinner-config';
10
10
  import { MappingTextConfig } from '../../enum-base/models/mapping-text-config';
11
11
  /**
12
- * The cell view for the icon column
12
+ * The cell view for the mapping column
13
13
  */
14
- export class TableColumnIconCellView extends TableCellView {
14
+ export class TableColumnMappingCellView extends TableCellView {
15
15
  constructor() {
16
16
  super(...arguments);
17
17
  this.textHidden = false;
@@ -59,24 +59,24 @@ export class TableColumnIconCellView extends TableCellView {
59
59
  }
60
60
  __decorate([
61
61
  observable
62
- ], TableColumnIconCellView.prototype, "severity", void 0);
62
+ ], TableColumnMappingCellView.prototype, "severity", void 0);
63
63
  __decorate([
64
64
  observable
65
- ], TableColumnIconCellView.prototype, "text", void 0);
65
+ ], TableColumnMappingCellView.prototype, "text", void 0);
66
66
  __decorate([
67
67
  observable
68
- ], TableColumnIconCellView.prototype, "visualizationTemplate", void 0);
68
+ ], TableColumnMappingCellView.prototype, "visualizationTemplate", void 0);
69
69
  __decorate([
70
70
  observable
71
- ], TableColumnIconCellView.prototype, "textHidden", void 0);
71
+ ], TableColumnMappingCellView.prototype, "textHidden", void 0);
72
72
  __decorate([
73
73
  observable
74
- ], TableColumnIconCellView.prototype, "hasOverflow", void 0);
75
- const iconCellView = TableColumnIconCellView.compose({
76
- baseName: 'table-column-icon-cell-view',
74
+ ], TableColumnMappingCellView.prototype, "hasOverflow", void 0);
75
+ const mappingCellView = TableColumnMappingCellView.compose({
76
+ baseName: 'table-column-mapping-cell-view',
77
77
  template,
78
78
  styles
79
79
  });
80
- DesignSystem.getOrCreate().withPrefix('nimble').register(iconCellView());
81
- export const tableColumnIconCellViewTag = 'nimble-table-column-icon-cell-view';
80
+ DesignSystem.getOrCreate().withPrefix('nimble').register(mappingCellView());
81
+ export const tableColumnMappingCellViewTag = 'nimble-table-column-mapping-cell-view';
82
82
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/table-column/mapping/cell-view/index.ts"],"names":[],"mappings":";AA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AC,IAAI,CAAC;YAC/B,IAAI,CAAC,qBAAqB,GAAG,aAAa,CAAC,YAAY,CAAC;YACxD,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC;SAC9C;aAAM,IAAI,aAAa,YAAY,oBAAoB,EAAE;YACtD,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;YAC/B,IAAI,CAAC,qBAAqB,GAAG,aAAa,CAAC,eAAe,CAAC;YAC3D,IAAI,CAAC,UAAU,GAAG,aAAa,CAAC,UAAU,CAAC;SAC9C;aAAM,IAAI,aAAa,YAAY,iBAAiB,EAAE;YACnD,IAAI,CAAC,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC;YAC/B,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SAC3B;IACL,CAAC;IAEO,UAAU;QACd,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,qBAAqB,GAAG,SAAS,CAAC;QACvC,IAAI,CAAC,QAAQ,GAAG,YAAY,CAAC,OAAO,CAAC;IACzC,CAAC;CACJ;AAzDU;IADN,UAAU;4DACmB;AAGvB;IADN,UAAU;wDACU;AAGd;IADN,UAAU;yEAGiB;AAGrB;IADN,UAAU;8DACe;AAInB;IADN,UAAU;+DACgB;AA4C/B,MAAM,eAAe,GAAG,0BAA0B,CAAC,OAAO,CAAC;IACvD,QAAQ,EAAE,gCAAgC;IAC1C,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AACH,YAAY,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,eAAe,EAAE,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,6BAA6B,GAAG,uCAAuC,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { ViewTemplate, observable } from '@microsoft/fast-element';\nimport { TableCellView } from '../../base/cell-view';\nimport { styles } from './styles';\nimport { template } from './template';\nimport type {\n TableColumnEnumCellRecord,\n TableColumnEnumColumnConfig\n} from '../../enum-base';\nimport {\n IconView,\n MappingIconConfig\n} from '../../enum-base/models/mapping-icon-config';\nimport { IconSeverity } from '../../../icon-base/types';\nimport {\n MappingSpinnerConfig,\n SpinnerView\n} from '../../enum-base/models/mapping-spinner-config';\nimport { MappingTextConfig } from '../../enum-base/models/mapping-text-config';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-mapping-cell-view': TableColumnMappingCellView;\n }\n}\n\n/**\n * The cell view for the mapping column\n */\nexport class TableColumnMappingCellView\n extends TableCellView<\n TableColumnEnumCellRecord,\n TableColumnEnumColumnConfig\n >\n implements IconView, SpinnerView {\n @observable\n public severity: IconSeverity;\n\n @observable\n public text?: string;\n\n @observable\n public visualizationTemplate?:\n | ViewTemplate<IconView>\n | ViewTemplate<SpinnerView>;\n\n @observable\n public textHidden = false;\n\n /** @internal */\n @observable\n public hasOverflow = false;\n\n private columnConfigChanged(): void {\n this.updateState();\n }\n\n private cellRecordChanged(): void {\n this.updateState();\n }\n\n private updateState(): void {\n this.resetState();\n\n if (!this.columnConfig || !this.cellRecord) {\n return;\n }\n const value = this.cellRecord.value;\n if (value === undefined || value === null) {\n return;\n }\n const mappingConfig = this.columnConfig.mappingConfigs.get(value);\n if (mappingConfig instanceof MappingIconConfig) {\n this.severity = mappingConfig.severity;\n this.text = mappingConfig.text;\n this.visualizationTemplate = mappingConfig.iconTemplate;\n this.textHidden = mappingConfig.textHidden;\n } else if (mappingConfig instanceof MappingSpinnerConfig) {\n this.text = mappingConfig.text;\n this.visualizationTemplate = mappingConfig.spinnerTemplate;\n this.textHidden = mappingConfig.textHidden;\n } else if (mappingConfig instanceof MappingTextConfig) {\n this.text = mappingConfig.text;\n this.textHidden = false;\n }\n }\n\n private resetState(): void {\n this.text = undefined;\n this.textHidden = false;\n this.visualizationTemplate = undefined;\n this.severity = IconSeverity.default;\n }\n}\n\nconst mappingCellView = TableColumnMappingCellView.compose({\n baseName: 'table-column-mapping-cell-view',\n template,\n styles\n});\nDesignSystem.getOrCreate().withPrefix('nimble').register(mappingCellView());\nexport const tableColumnMappingCellViewTag = 'nimble-table-column-mapping-cell-view';\n"]}