@ni/nimble-components 24.1.7 → 24.1.8

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAgBzD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,mBAAmB;IAC7C,kBAAkB;QACrB,IAAI,CAAC,eAAe,CAAC,YAAY,GAAG;YAChC,WAAW,EAAE,IAAI,CAAC,WAAW;SAChC,CAAC;IACN,CAAC;IAEkB,yBAAyB;QACxC,OAAO;YACH,oBAAoB,EAAE,CAAC,OAAO,CAAC;YAC/B,WAAW,EAAE,0BAA0B;YACvC,kBAAkB,EAAE,iCAAiC;YACrD,eAAe,EAAE,EAAE;YACnB,aAAa,EAAE,wBAAwB,CAAC,wBAAwB;SACnE,CAAC;IACN,CAAC;CACJ;AAED,MAAM,qBAAqB,GAAG,eAAe,CAAC,OAAO,CAAC;IAClD,QAAQ,EAAE,mBAAmB;IAC7B,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,kBAAkB,GAAG,0BAA0B,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { styles } from '../base/styles';\nimport { template } from '../base/template';\nimport type { TableStringField } from '../../table/types';\nimport { TableColumnTextBase } from '../text-base';\nimport { TableColumnSortOperation } from '../base/types';\nimport { tableColumnTextGroupHeaderViewTag } from './group-header-view';\nimport { tableColumnTextCellViewTag } from './cell-view';\nimport type { ColumnInternalsOptions } from '../base/models/column-internals';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\n\nexport type TableColumnTextCellRecord = TableStringField<'value'>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface TableColumnTextColumnConfig\n extends TableColumnTextBaseColumnConfig {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-text': TableColumnText;\n }\n}\n\n/**\n * The table column for displaying string fields as text.\n */\nexport class TableColumnText extends TableColumnTextBase {\n public placeholderChanged(): void {\n this.columnInternals.columnConfig = {\n placeholder: this.placeholder\n };\n }\n\n protected override getColumnInternalsOptions(): ColumnInternalsOptions {\n return {\n cellRecordFieldNames: ['value'],\n cellViewTag: tableColumnTextCellViewTag,\n groupHeaderViewTag: tableColumnTextGroupHeaderViewTag,\n delegatedEvents: [],\n sortOperation: TableColumnSortOperation.localeAwareCaseSensitive\n };\n }\n}\n\nconst nimbleTableColumnText = TableColumnText.compose({\n baseName: 'table-column-text',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleTableColumnText());\nexport const tableColumnTextTag = 'nimble-table-column-text';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAgBzD;;GAEG;AACH,MAAM,OAAO,eAAgB,SAAQ,aAAa,CAC9C,CAAA,mBAAgD,CAAA,CACnD;IACU,kBAAkB;QACrB,IAAI,CAAC,eAAe,CAAC,YAAY,GAAG;YAChC,WAAW,EAAE,IAAI,CAAC,WAAW;SAChC,CAAC;IACN,CAAC;IAEkB,yBAAyB;QACxC,OAAO;YACH,oBAAoB,EAAE,CAAC,OAAO,CAAC;YAC/B,WAAW,EAAE,0BAA0B;YACvC,kBAAkB,EAAE,iCAAiC;YACrD,eAAe,EAAE,EAAE;YACnB,aAAa,EAAE,wBAAwB,CAAC,wBAAwB;SACnE,CAAC;IACN,CAAC;CACJ;AAED,MAAM,qBAAqB,GAAG,eAAe,CAAC,OAAO,CAAC;IAClD,QAAQ,EAAE,mBAAmB;IAC7B,QAAQ;IACR,MAAM;CACT,CAAC,CAAC;AAEH,YAAY,CAAC,WAAW,EAAE;KACrB,UAAU,CAAC,QAAQ,CAAC;KACpB,QAAQ,CAAC,qBAAqB,EAAE,CAAC,CAAC;AACvC,MAAM,CAAC,MAAM,kBAAkB,GAAG,0BAA0B,CAAC","sourcesContent":["import { DesignSystem } from '@microsoft/fast-foundation';\nimport { styles } from '../base/styles';\nimport { template } from '../base/template';\nimport type { TableStringField } from '../../table/types';\nimport { TableColumnTextBase, mixinTextBase } from '../text-base';\nimport { TableColumnSortOperation } from '../base/types';\nimport { tableColumnTextGroupHeaderViewTag } from './group-header-view';\nimport { tableColumnTextCellViewTag } from './cell-view';\nimport type { ColumnInternalsOptions } from '../base/models/column-internals';\nimport type { TableColumnTextBaseColumnConfig } from '../text-base/cell-view';\n\nexport type TableColumnTextCellRecord = TableStringField<'value'>;\n\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface TableColumnTextColumnConfig\n extends TableColumnTextBaseColumnConfig {}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'nimble-table-column-text': TableColumnText;\n }\n}\n\n/**\n * The table column for displaying string fields as text.\n */\nexport class TableColumnText extends mixinTextBase(\n TableColumnTextBase<TableColumnTextColumnConfig>\n) {\n public placeholderChanged(): void {\n this.columnInternals.columnConfig = {\n placeholder: this.placeholder\n };\n }\n\n protected override getColumnInternalsOptions(): ColumnInternalsOptions {\n return {\n cellRecordFieldNames: ['value'],\n cellViewTag: tableColumnTextCellViewTag,\n groupHeaderViewTag: tableColumnTextGroupHeaderViewTag,\n delegatedEvents: [],\n sortOperation: TableColumnSortOperation.localeAwareCaseSensitive\n };\n }\n}\n\nconst nimbleTableColumnText = TableColumnText.compose({\n baseName: 'table-column-text',\n template,\n styles\n});\n\nDesignSystem.getOrCreate()\n .withPrefix('nimble')\n .register(nimbleTableColumnText());\nexport const tableColumnTextTag = 'nimble-table-column-text';\n"]}
@@ -1,5 +1,13 @@
1
1
  import { TableColumn } from '../base';
2
- declare const TableColumnTextBase_base: (abstract new (...args: any[]) => {
2
+ /**
3
+ * The base class for table columns that display fields of any type as text.
4
+ */
5
+ export declare abstract class TableColumnTextBase<TColumnConfig> extends TableColumn<TColumnConfig> {
6
+ fieldName?: string;
7
+ protected fieldNameChanged(): void;
8
+ }
9
+ type TableColumnBaseConstructor<TColumnConfig> = abstract new (...args: any[]) => TableColumnTextBase<TColumnConfig>;
10
+ export declare function mixinTextBase<TBase extends TableColumnBaseConstructor<TColumnConfig>, TColumnConfig>(base: TBase): (abstract new (...args: any[]) => {
3
11
  groupingDisabled: boolean;
4
12
  groupIndex?: number | null | undefined;
5
13
  groupingDisabledChanged(): void;
@@ -14,12 +22,5 @@ declare const TableColumnTextBase_base: (abstract new (...args: any[]) => {
14
22
  }) & (abstract new (...args: any[]) => {
15
23
  placeholder?: string | undefined;
16
24
  placeholderChanged(): void;
17
- }) & typeof TableColumn;
18
- /**
19
- * The base class for table columns that display fields of any type as text.
20
- */
21
- export declare abstract class TableColumnTextBase extends TableColumnTextBase_base {
22
- fieldName?: string;
23
- protected fieldNameChanged(): void;
24
- }
25
+ }) & TBase;
25
26
  export {};
@@ -1,13 +1,13 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { attr } from '@microsoft/fast-element';
3
- import { mixinFractionalWidthColumnAPI } from '../mixins/fractional-width-column';
4
3
  import { TableColumn } from '../base';
4
+ import { mixinFractionalWidthColumnAPI } from '../mixins/fractional-width-column';
5
5
  import { mixinGroupableColumnAPI } from '../mixins/groupable-column';
6
6
  import { mixinColumnWithPlaceholderAPI } from '../mixins/placeholder';
7
7
  /**
8
8
  * The base class for table columns that display fields of any type as text.
9
9
  */
10
- export class TableColumnTextBase extends mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(mixinColumnWithPlaceholderAPI(TableColumn))) {
10
+ export class TableColumnTextBase extends TableColumn {
11
11
  fieldNameChanged() {
12
12
  this.columnInternals.dataRecordFieldNames = [this.fieldName];
13
13
  this.columnInternals.operandDataRecordFieldName = this.fieldName;
@@ -16,4 +16,8 @@ export class TableColumnTextBase extends mixinGroupableColumnAPI(mixinFractional
16
16
  __decorate([
17
17
  attr({ attribute: 'field-name' })
18
18
  ], TableColumnTextBase.prototype, "fieldName", void 0);
19
+ // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/no-explicit-any
20
+ export function mixinTextBase(base) {
21
+ return mixinGroupableColumnAPI(mixinFractionalWidthColumnAPI(mixinColumnWithPlaceholderAPI(base)));
22
+ }
19
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text-base/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,uBAAuB,CACrE,6BAA6B,CAAC,6BAA6B,CAAC,WAAW,CAAC,CAAC,CAC5E;IAIa,gBAAgB;QACtB,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,CAAC,0BAA0B,GAAG,IAAI,CAAC,SAAS,CAAC;IACrE,CAAC;CACJ;AANG;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;sDACR","sourcesContent":["import { attr } from '@microsoft/fast-element';\nimport { mixinFractionalWidthColumnAPI } from '../mixins/fractional-width-column';\nimport { TableColumn } from '../base';\nimport { mixinGroupableColumnAPI } from '../mixins/groupable-column';\nimport { mixinColumnWithPlaceholderAPI } from '../mixins/placeholder';\n\n/**\n * The base class for table columns that display fields of any type as text.\n */\nexport abstract class TableColumnTextBase extends mixinGroupableColumnAPI(\n mixinFractionalWidthColumnAPI(mixinColumnWithPlaceholderAPI(TableColumn))\n) {\n @attr({ attribute: 'field-name' })\n public fieldName?: string;\n\n protected fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName];\n this.columnInternals.operandDataRecordFieldName = this.fieldName;\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/table-column/text-base/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,uBAAuB,CAAC;AAEtE;;GAEG;AACH,MAAM,OAAgB,mBAEpB,SAAQ,WAA0B;IAItB,gBAAgB;QACtB,IAAI,CAAC,eAAe,CAAC,oBAAoB,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAC7D,IAAI,CAAC,eAAe,CAAC,0BAA0B,GAAG,IAAI,CAAC,SAAS,CAAC;IACrE,CAAC;CACJ;AANG;IADC,IAAI,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;sDACR;AAa9B,mKAAmK;AACnK,MAAM,UAAU,aAAa,CAG3B,IAAW;IACT,OAAO,uBAAuB,CAC1B,6BAA6B,CAAC,6BAA6B,CAAC,IAAI,CAAC,CAAC,CACrE,CAAC;AACN,CAAC","sourcesContent":["import { attr } from '@microsoft/fast-element';\nimport { TableColumn } from '../base';\nimport { mixinFractionalWidthColumnAPI } from '../mixins/fractional-width-column';\nimport { mixinGroupableColumnAPI } from '../mixins/groupable-column';\nimport { mixinColumnWithPlaceholderAPI } from '../mixins/placeholder';\n\n/**\n * The base class for table columns that display fields of any type as text.\n */\nexport abstract class TableColumnTextBase<\n TColumnConfig\n> extends TableColumn<TColumnConfig> {\n @attr({ attribute: 'field-name' })\n public fieldName?: string;\n\n protected fieldNameChanged(): void {\n this.columnInternals.dataRecordFieldNames = [this.fieldName];\n this.columnInternals.operandDataRecordFieldName = this.fieldName;\n }\n}\n\ntype TableColumnBaseConstructor<TColumnConfig> = abstract new (\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ...args: any[]\n) => TableColumnTextBase<TColumnConfig>;\n\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type, @typescript-eslint/no-explicit-any\nexport function mixinTextBase<\n TBase extends TableColumnBaseConstructor<TColumnConfig>,\n TColumnConfig\n>(base: TBase) {\n return mixinGroupableColumnAPI(\n mixinFractionalWidthColumnAPI(mixinColumnWithPlaceholderAPI(base))\n );\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ni/nimble-components",
3
- "version": "24.1.7",
3
+ "version": "24.1.8",
4
4
  "description": "Styled web components for the NI Nimble Design System",
5
5
  "scripts": {
6
6
  "build": "npm run generate-icons && npm run generate-workers && npm run build-components && npm run bundle-components && npm run generate-scss && npm run build-storybook",