jupiter-dynamic-forms 1.19.4 → 1.19.5

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.
package/dist/index.mjs CHANGED
@@ -4757,6 +4757,7 @@ let JupiterConceptTree = class extends LitElement {
4757
4757
  this.showAddButton = false;
4758
4758
  this.showRemoveButton = false;
4759
4759
  this.language = "en";
4760
+ this.rowFocused = false;
4760
4761
  this._expanded = true;
4761
4762
  }
4762
4763
  connectedCallback() {
@@ -4934,7 +4935,7 @@ let JupiterConceptTree = class extends LitElement {
4934
4935
  const isAbstract = this.concept.abstract || false;
4935
4936
  return html`
4936
4937
  <!-- Concept Name Cell (Left Column) -->
4937
- <td class="concept-name-cell ${isAbstract ? "abstract" : hasChildren ? "" : "leaf"}">
4938
+ <td class="concept-name-cell ${isAbstract ? "abstract" : hasChildren ? "" : "leaf"} ${this.rowFocused ? "row-focused" : ""}">
4938
4939
  <div class="concept-content" style="--level: ${level}">
4939
4940
  <div class="concept-indent"></div>
4940
4941
  <div class="concept-toggle ${hasChildren ? this._expanded ? "expanded" : "" : "no-children"}"
@@ -4970,7 +4971,7 @@ let JupiterConceptTree = class extends LitElement {
4970
4971
  const storedUnit = (_b = (_a = this.unitData) == null ? void 0 : _a[this.concept.id]) == null ? void 0 : _b[column2.id];
4971
4972
  const storedDecimals = (_d = (_c = this.decimalsData) == null ? void 0 : _c[this.concept.id]) == null ? void 0 : _d[column2.id];
4972
4973
  return html`
4973
- <td class="field-cell ${!shouldShowField ? "empty" : ""} ${isAbstract ? "abstract-row" : ""} ${this.highlightType && column2.id === this.highlightColumnId ? "highlight-" + this.highlightType : ""} ${((_e = this.calculationErrorKeys) == null ? void 0 : _e.has(`${this.concept.id}__${column2.id}`)) ? "calc-error" : ""}">
4974
+ <td class="field-cell ${!shouldShowField ? "empty" : ""} ${isAbstract ? "abstract-row" : ""} ${this.highlightType && column2.id === this.highlightColumnId ? "highlight-" + this.highlightType : ""} ${((_e = this.calculationErrorKeys) == null ? void 0 : _e.has(`${this.concept.id}__${column2.id}`)) ? "calc-error" : ""} ${this.rowFocused ? "row-focused" : ""}">
4974
4975
  ${shouldShowField ? html`
4975
4976
  <jupiter-form-field
4976
4977
  .field="${field2}"
@@ -5176,6 +5177,18 @@ JupiterConceptTree.styles = css`
5176
5177
  box-shadow: inset 0 0 0 2px var(--jupiter-error-color, #d32f2f);
5177
5178
  }
5178
5179
 
5180
+ /* Row-level highlight while a field in this row has focus. Applied to every
5181
+ cell so the row stays identifiable even after the user scrolls the table
5182
+ horizontally away from the focused input. */
5183
+ .concept-name-cell.row-focused,
5184
+ .field-cell.row-focused {
5185
+ background: var(--jupiter-row-focus-background, rgba(25, 118, 210, 0.14));
5186
+ }
5187
+
5188
+ .concept-name-cell.row-focused {
5189
+ box-shadow: inset 3px 0 0 0 var(--jupiter-primary-color, #1976d2);
5190
+ }
5191
+
5179
5192
  .concept-info-btn {
5180
5193
  flex-shrink: 0;
5181
5194
  width: 22px;
@@ -5296,6 +5309,9 @@ __decorateClass$5([
5296
5309
  __decorateClass$5([
5297
5310
  n2({ type: String })
5298
5311
  ], JupiterConceptTree.prototype, "language", 2);
5312
+ __decorateClass$5([
5313
+ n2({ type: Boolean })
5314
+ ], JupiterConceptTree.prototype, "rowFocused", 2);
5299
5315
  __decorateClass$5([
5300
5316
  r()
5301
5317
  ], JupiterConceptTree.prototype, "_expanded", 2);
@@ -5993,10 +6009,12 @@ let JupiterFormSection = class extends LitElement {
5993
6009
  this._insertAfterColumnId = null;
5994
6010
  this._boundFieldBlur = (e2) => {
5995
6011
  this._clearHighlights();
6012
+ this._focusedConceptId = null;
5996
6013
  };
5997
6014
  this._expandedConcepts = /* @__PURE__ */ new Set();
5998
6015
  this._allTreeExpanded = false;
5999
6016
  this._highlightMap = /* @__PURE__ */ new Map();
6017
+ this._focusedConceptId = null;
6000
6018
  this._calculationErrorKeys = /* @__PURE__ */ new Set();
6001
6019
  this._totalChildrenMap = /* @__PURE__ */ new Map();
6002
6020
  this._memberParentMap = /* @__PURE__ */ new Map();
@@ -6336,6 +6354,7 @@ let JupiterFormSection = class extends LitElement {
6336
6354
  const columnId = (_b = event.detail) == null ? void 0 : _b.columnId;
6337
6355
  if (!conceptId || !columnId)
6338
6356
  return;
6357
+ this._focusedConceptId = conceptId;
6339
6358
  const newMap = /* @__PURE__ */ new Map();
6340
6359
  const isSelfTotal = this._totalChildrenMap.has(conceptId);
6341
6360
  if (isSelfTotal) {
@@ -6423,6 +6442,7 @@ let JupiterFormSection = class extends LitElement {
6423
6442
  .showRemoveButton="${opts.showRemove || false}"
6424
6443
  .highlightType="${(_a2 = this._highlightMap.get(instanceConcept.id)) == null ? void 0 : _a2.type}"
6425
6444
  .highlightColumnId="${(_b = this._highlightMap.get(instanceConcept.id)) == null ? void 0 : _b.columnId}"
6445
+ .rowFocused="${this._focusedConceptId === instanceConcept.id}"
6426
6446
  .calculationErrorKeys="${this._calculationErrorKeys}"
6427
6447
  @field-change="${this._handleFieldChange}"
6428
6448
  @field-focus="${this._handleFieldFocusForHighlight}"
@@ -6960,6 +6980,9 @@ __decorateClass$3([
6960
6980
  __decorateClass$3([
6961
6981
  r()
6962
6982
  ], JupiterFormSection.prototype, "_highlightMap", 2);
6983
+ __decorateClass$3([
6984
+ r()
6985
+ ], JupiterFormSection.prototype, "_focusedConceptId", 2);
6963
6986
  __decorateClass$3([
6964
6987
  r()
6965
6988
  ], JupiterFormSection.prototype, "_calculationErrorKeys", 2);