@ni/spright-components 0.0.20 → 0.0.21

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.
@@ -16333,7 +16333,7 @@
16333
16333
 
16334
16334
  /**
16335
16335
  * Do not edit directly
16336
- * Generated on Thu, 09 May 2024 20:27:48 GMT
16336
+ * Generated on Fri, 10 May 2024 15:59:03 GMT
16337
16337
  */
16338
16338
 
16339
16339
  const Information100DarkUi = "#a46eff";
@@ -69069,6 +69069,22 @@ img.ProseMirror-separator {
69069
69069
 
69070
69070
  const template$a = html `${template$e}<slot ${slotted('mappings')} name="mapping"></slot>`;
69071
69071
 
69072
+ /**
69073
+ * Maps data values to text.
69074
+ * One or more may be added as children of a nimble-table-column-mapping element. The
69075
+ * mapping displays an empty cell and text-only group rows.
69076
+ */
69077
+ class MappingEmpty extends Mapping$1 {
69078
+ }
69079
+ __decorate$1([
69080
+ attr()
69081
+ ], MappingEmpty.prototype, "text", void 0);
69082
+ const emptyMapping = MappingEmpty.compose({
69083
+ baseName: 'mapping-empty',
69084
+ template: template$r
69085
+ });
69086
+ DesignSystem.getOrCreate().withPrefix('nimble').register(emptyMapping());
69087
+
69072
69088
  const enumBaseValidityFlagNames = [
69073
69089
  'invalidMappingKeyValueForType',
69074
69090
  'duplicateMappingKey',
@@ -69126,7 +69142,8 @@ img.ProseMirror-separator {
69126
69142
  static isSupportedMappingElement(mapping) {
69127
69143
  return (mapping instanceof MappingIcon
69128
69144
  || mapping instanceof MappingSpinner
69129
- || mapping instanceof MappingText);
69145
+ || mapping instanceof MappingText
69146
+ || mapping instanceof MappingEmpty);
69130
69147
  }
69131
69148
  static hasUnresolvedIcon(mappingIcon) {
69132
69149
  return (typeof mappingIcon.icon === 'string'
@@ -69271,15 +69288,30 @@ img.ProseMirror-separator {
69271
69288
  class MappingTextConfig extends MappingConfig {
69272
69289
  }
69273
69290
 
69291
+ /**
69292
+ * Mapping configuration corresponding to an empty mapping
69293
+ */
69294
+ class MappingEmptyConfig extends MappingConfig {
69295
+ }
69296
+
69274
69297
  /**
69275
69298
  * The group header view for the mapping column
69276
69299
  */
69277
- class TableColumnMappingGroupHeaderView extends TableColumnTextGroupHeaderViewBase {
69300
+ class TableColumnMappingGroupHeaderView extends TableGroupHeaderView {
69278
69301
  constructor() {
69279
69302
  super(...arguments);
69303
+ /** @internal */
69304
+ this.hasOverflow = false;
69305
+ this.text = '';
69280
69306
  this.textHidden = false;
69281
69307
  }
69282
- updateText() {
69308
+ columnConfigChanged() {
69309
+ this.updateState();
69310
+ }
69311
+ groupHeaderValueChanged() {
69312
+ this.updateState();
69313
+ }
69314
+ updateState() {
69283
69315
  this.resetState();
69284
69316
  if (!this.columnConfig) {
69285
69317
  return;
@@ -69298,6 +69330,9 @@ img.ProseMirror-separator {
69298
69330
  else if (mappingConfig instanceof MappingTextConfig) {
69299
69331
  this.text = mappingConfig.text ?? '';
69300
69332
  }
69333
+ else if (mappingConfig instanceof MappingEmptyConfig) {
69334
+ this.text = mappingConfig.text ?? '';
69335
+ }
69301
69336
  }
69302
69337
  resetState() {
69303
69338
  this.text = '';
@@ -69305,6 +69340,12 @@ img.ProseMirror-separator {
69305
69340
  this.severity = IconSeverity.default;
69306
69341
  }
69307
69342
  }
69343
+ __decorate$1([
69344
+ observable
69345
+ ], TableColumnMappingGroupHeaderView.prototype, "hasOverflow", void 0);
69346
+ __decorate$1([
69347
+ observable
69348
+ ], TableColumnMappingGroupHeaderView.prototype, "text", void 0);
69308
69349
  __decorate$1([
69309
69350
  observable
69310
69351
  ], TableColumnMappingGroupHeaderView.prototype, "severity", void 0);
@@ -69404,6 +69445,10 @@ img.ProseMirror-separator {
69404
69445
  this.text = mappingConfig.text;
69405
69446
  this.textHidden = false;
69406
69447
  }
69448
+ else if (mappingConfig instanceof MappingEmptyConfig) {
69449
+ this.text = mappingConfig.text;
69450
+ this.textHidden = true;
69451
+ }
69407
69452
  }
69408
69453
  resetState() {
69409
69454
  this.text = undefined;
@@ -69478,6 +69523,9 @@ img.ProseMirror-separator {
69478
69523
  if (mapping instanceof MappingText) {
69479
69524
  return new MappingTextConfig(mapping.text);
69480
69525
  }
69526
+ if (mapping instanceof MappingEmpty) {
69527
+ return new MappingEmptyConfig(mapping.text);
69528
+ }
69481
69529
  // Getting here would indicate a programming error, b/c validation will prevent
69482
69530
  // this function from running when there is an unsupported mapping.
69483
69531
  throw new Error('Unsupported mapping');