jupiter-dynamic-forms 1.20.9 → 1.21.0
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/core/dynamic-form.d.ts +6 -2
- package/dist/core/dynamic-form.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +105 -38
- package/dist/index.mjs.map +1 -1
- package/dist/schema/types.d.ts +11 -0
- package/dist/schema/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LitElement } from 'lit';
|
|
2
|
-
import { XBRLFormSchema, FormData, FormState, ComponentConfig, AxisFilterConfig } from '../schema/types';
|
|
2
|
+
import { XBRLFormSchema, FormData, FormState, ComponentConfig, AxisFilterConfig, ScrollToConceptPeriod } from '../schema/types';
|
|
3
3
|
import { XBRLFormInput } from '../schema/xbrl-types';
|
|
4
4
|
|
|
5
5
|
export declare class JupiterDynamicForm extends LitElement {
|
|
@@ -462,7 +462,10 @@ export declare class JupiterDynamicForm extends LitElement {
|
|
|
462
462
|
private _findAllConceptsByName;
|
|
463
463
|
private _findConceptById;
|
|
464
464
|
private _valueLooselyMatches;
|
|
465
|
-
private
|
|
465
|
+
private _findColumnsByDimensions;
|
|
466
|
+
private _pickColumn;
|
|
467
|
+
private _cellPeriod;
|
|
468
|
+
private _periodMatches;
|
|
466
469
|
private _resolveScrollTarget;
|
|
467
470
|
private _resolveConceptInSection;
|
|
468
471
|
scrollToConcept(conceptName: string, dimensions?: Array<{
|
|
@@ -470,6 +473,7 @@ export declare class JupiterDynamicForm extends LitElement {
|
|
|
470
473
|
member: string;
|
|
471
474
|
}>, match?: {
|
|
472
475
|
value?: any;
|
|
476
|
+
period?: ScrollToConceptPeriod;
|
|
473
477
|
}, columnId?: string, exactConceptId?: string, role?: string): Promise<void>;
|
|
474
478
|
render(): import('lit-html').TemplateResult<1>;
|
|
475
479
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamic-form.d.ts","sourceRoot":"","sources":["../../src/core/dynamic-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,EACL,cAAc,EACd,QAAQ,EAGR,SAAS,EACT,eAAe,EAOf,gBAAgB,
|
|
1
|
+
{"version":3,"file":"dynamic-form.d.ts","sourceRoot":"","sources":["../../src/core/dynamic-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,EACL,cAAc,EACd,QAAQ,EAGR,SAAS,EACT,eAAe,EAOf,gBAAgB,EAIhB,qBAAqB,EACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAUrD,OAAO,gBAAgB,CAAC;AACxB,OAAO,uBAAuB,CAAC;AAC/B,OAAO,6BAA6B,CAAC;AACrC,OAAO,kBAAkB,CAAC;AAE1B,qBACa,kBAAmB,SAAQ,UAAU;IACpB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,EAAE,eAAe,CAAM;IAC7B,WAAW,EAAE,QAAQ,CAAM;IAC1B,QAAQ,UAAS;IACjB,QAAQ,UAAS;IAK9C,kBAAkB,UAAS;IAO3B,cAAc,UAAS;IAOvB,kBAAkB,UAAS;IACC,eAAe,SAAgB;IAC/B,aAAa,SAAgB;IAC7B,QAAQ,SAAQ;IAChB,iBAAiB,SAAQ;IACzB,OAAO,EAAE,WAAW,GAAG,WAAW,CAAe;IACjD,IAAI,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,CAAe;IAEnF,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAM3B,cAAc,EAAE,gBAAgB,EAAE,CAAM;IAIxC,2BAA2B,UAAS;IAIpC,aAAa,UAAS;IAUtB,iBAAiB,UAAS;IAK1B,YAAY,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CAAC,WAAW;IAenB,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,oBAAoB;IA8D5B,OAAO,CAAC,wBAAwB;IA0DnB,eAAe,CAC1B,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,EAKpD,KAAK,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,GAAG,CAAC;QAAC,MAAM,CAAC,EAAE,qBAAqB,CAAA;KAAE,EAMvD,QAAQ,CAAC,EAAE,MAAM,EAOjB,cAAc,CAAC,EAAE,MAAM,EAMvB,IAAI,CAAC,EAAE,MAAM,GACZ,OAAO,CAAC,IAAI,CAAC;IAqVhB,MAAM;CA0NP"}
|
package/dist/index.js
CHANGED
|
@@ -3922,7 +3922,7 @@ const I={attribute:!0,type:String,converter:y,reflect:!1,hasChanged:x},$=(e=I,t,
|
|
|
3922
3922
|
</div>
|
|
3923
3923
|
</div>
|
|
3924
3924
|
</div>
|
|
3925
|
-
`}getData(){return{...this._formData}}setData(e){this._formData={...e},this._dirty=!0,this.hasUnsavedChanges=!0,this._validateForm(),this.requestUpdate()}validate(){return this._validateForm(),this._valid}setValidation(e){console.log(`🔍 Validation status updated: ${e}`),this._validationStatus="cancel"===e?"idle":e,this.requestUpdate()}reset(){this._handleReset()}getState(){return this._getFormState()}_findConceptByName(e,t){var i;const o=t.includes(":")?t.split(":").pop():t;for(const r of e){if(r.name===t)return r;if((r.name.includes(":")?r.name.split(":").pop():r.name)===o)return r;if(null==(i=r.children)?void 0:i.length){const e=this._findConceptByName(r.children,t);if(e)return e}}return null}_findAllConceptsByName(e,t){var i;const o=t.includes(":")?t.split(":").pop():t,r=[];for(const n of e){const e=n.name.includes(":")?n.name.split(":").pop():n.name;n.name!==t&&e!==o||r.push(n),(null==(i=n.children)?void 0:i.length)&&r.push(...this._findAllConceptsByName(n.children,t))}return r}_findConceptById(e,t){var i;for(const o of e){if(o.id===t)return o;if(null==(i=o.children)?void 0:i.length){const e=this._findConceptById(o.children,t);if(e)return e}}return null}_valueLooselyMatches(e,t){const i=String(e??"");if(i===t)return!0;const o=Number(i),r=Number(t);if(isNaN(o)||isNaN(r))return!1;if(o===r)return!0;if(0!==o&&0!==r){const e=Math.abs(r/o),t=Math.log10(e);if(Math.abs(t-Math.round(t))<1e-4)return!0}return!1}_findColumnByDimensions(e,t){var i;return null==(i=e.find(e=>{if("dimension"!==e.type||!e.dimensionData)return!1;const i=e.dimensionData.combinations;return(null==i?void 0:i.length)?t.every(e=>i.some(t=>this._normalizeAxisId(t.axisId)===this._normalizeAxisId(e.axis)&&this._normalizeMemberId(t.memberId)===this._normalizeMemberId(e.member))):1===t.length&&this._normalizeAxisId(e.dimensionData.axisId??"")===this._normalizeAxisId(t[0].axis)&&this._normalizeMemberId(e.dimensionData.memberId??"")===this._normalizeMemberId(t[0].member)}))?void 0:i.id}_resolveScrollTarget(e,t,i,o,r,n){var a;const s=[...(null==(a=this._currentSchema)?void 0:a.sections)??[],...this._allSections.filter(e=>{var t;return!(null==(t=this._currentSchema)?void 0:t.sections.find(t=>t.id===e.id))})];if(console.log(`[scrollToConcept] Searching ${s.length} sections`),o)for(const d of s){const e=this._findConceptById(d.concepts,o);if(e)return console.log(`[scrollToConcept] Section "${d.id}" matched exactConceptId="${o}"`),{section:d,concept:e,viaRole:!1}}if(r){const o=function(e,t){const i=Te(e);return i?t.map((e,t)=>({section:e,index:t,score:Ee(i,e)})).filter(e=>null!==e.score).sort((e,t)=>e.score.tier-t.score.tier||e.score.looseness-t.score.looseness||e.index-t.index).map(({section:e,score:t})=>({section:e,tier:t.tier})):[]}(r,s);console.log(`[scrollToConcept] role="${r}" matched ${o.length} section(s): ${o.slice(0,5).map(e=>`${e.section.id} (tier ${e.tier})`).join(", ")}`);for(const{section:a,tier:s}of o){const o=this._resolveConceptInSection(a,e,t,i,n);if(o)return s>=Se&&console.warn(`[scrollToConcept] role="${r}" only fuzzily matched "${a.id}" (tier ${s}) — pass the role's id or local name for an exact match`),{section:a,concept:o.concept,viaRole:!0}}console.warn(`[scrollToConcept] "${e}" not found in any section matching role="${r}" — falling back to whole-form search`)}let l=null;for(const d of s){const o=this._resolveConceptInSection(d,e,t,i,n);if(o){if(o.strong)return{section:d,concept:o.concept,viaRole:!1};l??(l={section:d,concept:o.concept})}}return l?{...l,viaRole:!1}:null}_resolveConceptInSection(e,t,i,o,r){const n=this._findAllConceptsByName(e.concepts,t);if(!n.length)return null;const a=null!==r,s=e.columns??this._columns,l=o??((null==i?void 0:i.length)?this._findColumnByDimensions(s,i):void 0);let d;n.length>1&&(d=n.find(e=>{const t=this._formData[e.id];if(!t)return!1;if(l){const e=t[l];return null!=e&&""!==e&&(!a||this._valueLooselyMatches(e,r))}return!!a&&Object.values(t).some(e=>null!=e&&""!==e&&this._valueLooselyMatches(e,r))}),console.log(`[scrollToConcept] Section "${e.id}" has ${n.length} rows named "${t}" | disambiguated=${(null==d?void 0:d.id)??"none (using first)"}`));const c=d??n[0];if(o){const t=s.some(e=>e.id===o);return console.log(`[scrollToConcept] Section "${e.id}" has concept "${c.id}" | columnId="${o}" present=${t}`),{concept:c,strong:t}}return(null==i?void 0:i.length)?(console.log(`[scrollToConcept] Section "${e.id}" has concept "${c.id}" | colMatch=${l??"null"} | cols=${s.map(e=>e.id).join(",")}`),{concept:c,strong:!!l}):(console.log(`[scrollToConcept] Section "${e.id}" has concept "${c.id}" (no dims, taking first)`),{concept:c,strong:!0})}async scrollToConcept(e,t,i,o,r,n){var a,s,l,d,c,p,u,h,m,f,g,b,v,y,x;console.log(`[scrollToConcept] ▶ START conceptName=${e} value=${null==i?void 0:i.value} dims=${JSON.stringify(t)} columnId=${o} exactConceptId=${r} role=${n}`);const _=void 0!==(null==i?void 0:i.value)&&null!==(null==i?void 0:i.value),D=_?String(i.value):null,I=this._resolveScrollTarget(e,t,o,r,n,D);if(!I)return void console.warn(`[scrollToConcept] Concept not found: ${e}`);let{section:$,concept:w}=I;const{viaRole:S}=I;if(console.log(`[scrollToConcept] → targetSection="${$.id}" targetConceptId="${w.id}" viaRole=${S}`),!(null==(a=this._currentSchema)?void 0:a.sections.some(e=>e.id===$.id))){if(console.log(`[scrollToConcept] Role "${$.id}" is filtered out — asking to show it`),!(await this._confirmRevealHiddenRole($)))return void console.log("[scrollToConcept] Reveal declined — not navigating");await this._revealRole($);const e=null==(s=this._currentSchema)?void 0:s.sections.find(e=>e.id===$.id),t=e&&this._findConceptById(e.concepts,w.id);if(!e||!t)return void console.warn(`[scrollToConcept] Revealed role "${$.id}" but could not find row "${w.id}" in it`);$=e,w=t}$.expanded=!0,"sidePanel"===this.display&&this._activeSidePanelRoleId!==$.id&&(this._activeSidePanelRoleId=$.id);const C=$.columns??this._columns,T=this._hiddenColumnIds.get($.id);let F=null;if(o?F=o:(null==t?void 0:t.length)?F=this._findColumnByDimensions(C,t)??null:_||(F=(null==(l=C.find(e=>!(null==T?void 0:T.has(e.id)))??C[0])?void 0:l.id)??null),null==T?void 0:T.size){let e;if(F)T.has(F)&&(e=F);else if(_){const t=this._formData[w.id]??{},i=C.filter(e=>{const i=t[e.id];return null!=i&&""!==i&&this._valueLooselyMatches(i,D)});i.length&&i.every(e=>T.has(e.id))&&(e=i[0].id,F=e)}e&&(console.log(`[scrollToConcept] Column "${e}" is hidden in "${$.id}" — showing it`),this._showColumn($.id,e))}console.log(`[scrollToConcept] targetColumnId=${F} hasValueMatch=${_} targetValue=${D}`),this._conceptSearchText=e.includes(":")?e.split(":").pop():e,this.requestUpdate(),await this.updateComplete,await new Promise(e=>setTimeout(e,300));const k=null==(d=this.shadowRoot)?void 0:d.querySelectorAll("jupiter-form-section");console.log(`[scrollToConcept] DOM: found ${(null==k?void 0:k.length)??0} jupiter-form-section elements`);let E=null;if(null==k||k.forEach(e=>{var t;(null==(t=e.section)?void 0:t.id)===$.id&&(E=e)}),!E)return void console.warn(`[scrollToConcept] Section element not found: ${$.id}`);await E.updateComplete,await(null==(c=E.revealConcept)?void 0:c.call(E,w.id))&&await Promise.all(Array.from((null==(p=E.shadowRoot)?void 0:p.querySelectorAll("jupiter-concept-tree"))??[]).map(e=>e.updateComplete));const R=null==(u=E.shadowRoot)?void 0:u.querySelectorAll("jupiter-concept-tree");console.log(`[scrollToConcept] conceptTrees in targetSection: ${(null==R?void 0:R.length)??0}`);let M=null;const A=w.id,P=A.includes("__")?A.split("__")[0]:A;console.log(`[scrollToConcept] conceptId="${A}" conceptIdBase="${P}"`);const j=e=>e===A||e.includes("__")&&e.split("__")[0]===P,L=e=>{const t=e.decimals||(void 0!==e.globalDecimals&&"INF"!==e.globalDecimals?e.globalDecimals:null);if(!t)return 1;const i=parseFloat(String(t));return isNaN(i)||i<=0?1:Math.pow(10,i)},N=(e,t)=>{if(String(e.value??"")===t)return!0;const i=Number(t),o=Number(e.value);if(!isNaN(i)&&!isNaN(o)&&0!==o){const t=L(e);if(1!==t&&Math.abs(o*t-i)<1e-4)return!0}return!1};let V=0;if(null==R||R.forEach(e=>{var t;if(M)return;const i=null==(t=e.shadowRoot)?void 0:t.querySelectorAll("jupiter-form-field");null==i||i.forEach(e=>{if(M)return;const t=F?e.conceptId===A&&e.columnId===F:e.conceptId===A,i=!_||N(e,D);t&&(V++,console.log(`[scrollToConcept] Phase1 candidate: conceptId=${e.conceptId} columnId=${e.columnId} value=${e.value} scale=${L(e)} valueMatch=${i}`)),t&&i&&(M=e)})}),console.log(`[scrollToConcept] Phase1: scanned ${V} candidates, found=${!!M}`),!M&&S){const e=[];null==R||R.forEach(t=>{var i;null==(i=t.shadowRoot)||i.querySelectorAll("jupiter-form-field").forEach(t=>{t.conceptId===A&&e.push(t)})}),M=F&&e.find(e=>e.columnId===F)||e[0]||null,M&&F&&M.columnId!==F&&console.warn(`[scrollToConcept] Phase1b: column "${F}" not rendered in row "${A}" — using column "${M.columnId}"`),console.log(`[scrollToConcept] Phase1b (role-scoped): ${e.length} fields in row "${A}", found=${!!M}`)}if(!M&&_){console.log("[scrollToConcept] Phase2: searching ALL sections by base concept name + value");const e=(null==(h=this.shadowRoot)?void 0:h.querySelectorAll("jupiter-form-section"))??[];for(const t of Array.from(e)){if(M)break;const e=(null==(m=t.shadowRoot)?void 0:m.querySelectorAll("jupiter-concept-tree"))??[];for(const t of Array.from(e)){if(M)break;((null==(f=t.shadowRoot)?void 0:f.querySelectorAll("jupiter-form-field"))??[]).forEach(e=>{if(M)return;const t=j(e.conceptId),i=N(e,D);t&&console.log(`[scrollToConcept] Phase2 candidate: conceptId=${e.conceptId} value=${e.value} scale=${L(e)} valMatch=${i}`),t&&i&&(console.log(`[scrollToConcept] Phase2 ✅ MATCH: conceptId=${e.conceptId} columnId=${e.columnId} value=${e.value}`),M=e)})}}}if(!M){const e=(null==(g=this.shadowRoot)?void 0:g.querySelectorAll("jupiter-form-section"))??[];for(const t of Array.from(e)){if(M)break;const e=(null==(b=t.shadowRoot)?void 0:b.querySelectorAll("jupiter-concept-tree"))??[];for(const t of Array.from(e)){if(M)break;((null==(v=t.shadowRoot)?void 0:v.querySelectorAll("jupiter-form-field"))??[]).forEach(e=>{if(M)return;(F?j(e.conceptId)&&e.columnId===F:j(e.conceptId))&&(console.log(`[scrollToConcept] Phase3 ✅ fallback: conceptId=${e.conceptId} columnId=${e.columnId} value=${e.value}`),M=e)})}}}if(!M)return void console.warn(`[scrollToConcept] Field element not found for concept: ${e}`);console.log(`[scrollToConcept] ✅ HIGHLIGHTING conceptId=${M.conceptId} columnId=${M.columnId} value=${M.value}`);const O=M.getBoundingClientRect(),z=this.shadowRoot,U=z?z.querySelector(".side-panel-content")??z.querySelector(".form-container"):null,J=U&&U.scrollHeight>U.clientHeight?U:null;if(J){const e=J.getBoundingClientRect(),t=Math.max(0,O.top-e.top+J.scrollTop-J.clientHeight/2+O.height/2);J.scrollTo({top:t,behavior:"smooth"})}else M.scrollIntoView({behavior:"smooth",block:"center"});const B=null==(y=null==E?void 0:E.shadowRoot)?void 0:y.querySelector(".table-container");if(B&&B.scrollWidth>B.clientWidth){const e=B.getBoundingClientRect(),t=Math.max(0,O.left-e.left+B.scrollLeft-B.clientWidth/2+O.width/2);B.scrollTo({left:t,behavior:"smooth"})}const q=M.getRootNode(),H=(q instanceof ShadowRoot?q.host:null)??M;H.classList.add("concept-highlight");const K=null==(x=M.shadowRoot)?void 0:x.querySelector('input:not([type="hidden"]), select, textarea, button, [tabindex]:not([tabindex="-1"])');K&&setTimeout(()=>K.focus({preventScroll:!0}),450),setTimeout(()=>H.classList.remove("concept-highlight"),1e4)}render(){var t;const i=this._errors.filter(e=>"error"===e.severity).length,o="readonly"===this.mode?0:this._errors.filter(e=>"warning"===e.severity).length,r=this.config||{},n=!1!==r.showValidationSummary&&(i>0&&this._submitted||o>0),a=this._currentSchema;return a?e.html`
|
|
3925
|
+
`}getData(){return{...this._formData}}setData(e){this._formData={...e},this._dirty=!0,this.hasUnsavedChanges=!0,this._validateForm(),this.requestUpdate()}validate(){return this._validateForm(),this._valid}setValidation(e){console.log(`🔍 Validation status updated: ${e}`),this._validationStatus="cancel"===e?"idle":e,this.requestUpdate()}reset(){this._handleReset()}getState(){return this._getFormState()}_findConceptByName(e,t){var i;const o=t.includes(":")?t.split(":").pop():t;for(const r of e){if(r.name===t)return r;if((r.name.includes(":")?r.name.split(":").pop():r.name)===o)return r;if(null==(i=r.children)?void 0:i.length){const e=this._findConceptByName(r.children,t);if(e)return e}}return null}_findAllConceptsByName(e,t){var i;const o=t.includes(":")?t.split(":").pop():t,r=[];for(const n of e){const e=n.name.includes(":")?n.name.split(":").pop():n.name;n.name!==t&&e!==o||r.push(n),(null==(i=n.children)?void 0:i.length)&&r.push(...this._findAllConceptsByName(n.children,t))}return r}_findConceptById(e,t){var i;for(const o of e){if(o.id===t)return o;if(null==(i=o.children)?void 0:i.length){const e=this._findConceptById(o.children,t);if(e)return e}}return null}_valueLooselyMatches(e,t){const i=String(e??"");if(i===t)return!0;const o=Number(i),r=Number(t);if(isNaN(o)||isNaN(r))return!1;if(o===r)return!0;if(0!==o&&0!==r){const e=Math.abs(r/o),t=Math.log10(e);if(Math.abs(t-Math.round(t))<1e-4)return!0}return!1}_findColumnsByDimensions(e,t){return e.filter(e=>{if("dimension"!==e.type||!e.dimensionData)return!1;const i=e.dimensionData.combinations;return(null==i?void 0:i.length)?t.every(e=>i.some(t=>this._normalizeAxisId(t.axisId)===this._normalizeAxisId(e.axis)&&this._normalizeMemberId(t.memberId)===this._normalizeMemberId(e.member))):1===t.length&&this._normalizeAxisId(e.dimensionData.axisId??"")===this._normalizeAxisId(t[0].axis)&&this._normalizeMemberId(e.dimensionData.memberId??"")===this._normalizeMemberId(t[0].member)})}_pickColumn(e,t,i,o,r,n){var a;let s=i;if(r&&s.length>1){const i=s.filter(i=>this._periodMatches(this._cellPeriod(e,t,i.id),r));i.length&&(s=i)}const l=this._formData[t.id];if(s.length>1&&null!==o&&l){const e=s.filter(e=>void 0!==l[e.id]&&null!==l[e.id]&&""!==l[e.id]),t=e.filter(e=>String(l[e.id])===o||Number(l[e.id])===Number(o)),i=t.length?t:e.filter(e=>this._valueLooselyMatches(l[e.id],o)),r=i.find(e=>!(null==n?void 0:n.has(e.id)))??i[0];if(r)return r.id}return null==(a=s[0])?void 0:a.id}_cellPeriod(e,t,i){var o,r;const n=this._findColumnByIdInSection(i,e),a=(null==(o=t.fields)?void 0:o.find(e=>e.columnId===i))??{columnId:i},s=null==(r=this._periodData[t.id])?void 0:r[i];return"instant"===t.periodType?{instant:this._resolveSubmissionInstantDate(t,a,s,n)}:{startDate:(null==s?void 0:s.startDate)||(null==n?void 0:n.periodStartDate)||a.periodStartDate||this.periodStartDate,endDate:(null==s?void 0:s.endDate)||(null==n?void 0:n.periodEndDate)||a.periodEndDate||this.periodEndDate}}_periodMatches(e,t){const i=e=>null==e?void 0:e.slice(0,10),o=t.instant??t.date;return o?i(e.instant)===i(o):!(e.instant||t.startDate&&i(e.startDate)!==i(t.startDate)||t.endDate&&i(e.endDate)!==i(t.endDate))}_resolveScrollTarget(e,t,i,o,r,n,a){var s;const l=[...(null==(s=this._currentSchema)?void 0:s.sections)??[],...this._allSections.filter(e=>{var t;return!(null==(t=this._currentSchema)?void 0:t.sections.find(t=>t.id===e.id))})];if(console.log(`[scrollToConcept] Searching ${l.length} sections`),o)for(const u of l){const e=this._findConceptById(u.concepts,o);if(e)return console.log(`[scrollToConcept] Section "${u.id}" matched exactConceptId="${o}"`),{section:u,concept:e,viaRole:!1}}if(r){const o=function(e,t){const i=Te(e);return i?t.map((e,t)=>({section:e,index:t,score:Ee(i,e)})).filter(e=>null!==e.score).sort((e,t)=>e.score.tier-t.score.tier||e.score.looseness-t.score.looseness||e.index-t.index).map(({section:e,score:t})=>({section:e,tier:t.tier})):[]}(r,l);console.log(`[scrollToConcept] role="${r}" matched ${o.length} section(s): ${o.slice(0,5).map(e=>`${e.section.id} (tier ${e.tier})`).join(", ")}`);for(const{section:s,tier:l}of o){const o=this._resolveConceptInSection(s,e,t,i,n,a);if(o)return l>=Se&&console.warn(`[scrollToConcept] role="${r}" only fuzzily matched "${s.id}" (tier ${l}) — pass the role's id or local name for an exact match`),{section:s,concept:o.concept,viaRole:!0}}console.warn(`[scrollToConcept] "${e}" not found in any section matching role="${r}" — falling back to whole-form search`)}let d=null,c=null;for(const u of l){const o=this._resolveConceptInSection(u,e,t,i,n,a);if(o){if(o.strong&&o.inPeriod)return{section:u,concept:o.concept,viaRole:!1};o.strong?d??(d={section:u,concept:o.concept}):c??(c={section:u,concept:o.concept})}}const p=d??c;return p?{...p,viaRole:!1}:null}_resolveConceptInSection(e,t,i,o,r,n){const a=this._findAllConceptsByName(e.concepts,t);if(!a.length)return null;const s=null!==r,l=e.columns??this._columns,d=o?[o]:(null==i?void 0:i.length)?this._findColumnsByDimensions(l,i).map(e=>e.id):[],c=(t,i,o)=>{var a;const l=null==(a=this._formData[t.id])?void 0:a[i];return null!=l&&""!==l&&(!(s&&!this._valueLooselyMatches(l,r))&&(!o||this._periodMatches(this._cellPeriod(e,t,i),n)))},p=(e,t)=>d.length?d.some(i=>c(e,i,t)):!(!s&&!t)&&Object.keys(this._formData[e.id]??{}).some(i=>c(e,i,t));let u;a.length>1&&(u=(n?a.find(e=>p(e,!0)):void 0)??a.find(e=>p(e,!1)),console.log(`[scrollToConcept] Section "${e.id}" has ${a.length} rows named "${t}" | disambiguated=${(null==u?void 0:u.id)??"none (using first)"}`));const h=u??a[0],m=t=>!n||t.some(t=>this._periodMatches(this._cellPeriod(e,h,t),n));if(o){const t=l.some(e=>e.id===o);return console.log(`[scrollToConcept] Section "${e.id}" has concept "${h.id}" | columnId="${o}" present=${t}`),{concept:h,strong:t,inPeriod:m(t?[o]:[])}}return(null==i?void 0:i.length)?(console.log(`[scrollToConcept] Section "${e.id}" has concept "${h.id}" | colMatch=${d.join(",")||"null"} | cols=${l.map(e=>e.id).join(",")}`),{concept:h,strong:d.length>0,inPeriod:m(d)}):(console.log(`[scrollToConcept] Section "${e.id}" has concept "${h.id}" (no dims, taking first)`),{concept:h,strong:!0,inPeriod:m(l.map(e=>e.id))})}async scrollToConcept(e,t,i,o,r,n){var a,s,l,d,c,p,u,h,m,f,g,b,v,y,x;console.log(`[scrollToConcept] ▶ START conceptName=${e} value=${null==i?void 0:i.value} period=${JSON.stringify(null==i?void 0:i.period)} dims=${JSON.stringify(t)} columnId=${o} exactConceptId=${r} role=${n}`);const _=void 0!==(null==i?void 0:i.value)&&null!==(null==i?void 0:i.value),D=_?String(i.value):null,I=(null==i?void 0:i.period)&&(i.period.instant||i.period.date||i.period.startDate||i.period.endDate)?i.period:void 0,$=this._resolveScrollTarget(e,t,o,r,n,D,I);if(!$)return void console.warn(`[scrollToConcept] Concept not found: ${e}`);let{section:w,concept:S}=$;const{viaRole:C}=$;if(console.log(`[scrollToConcept] → targetSection="${w.id}" targetConceptId="${S.id}" viaRole=${C}`),!(null==(a=this._currentSchema)?void 0:a.sections.some(e=>e.id===w.id))){if(console.log(`[scrollToConcept] Role "${w.id}" is filtered out — asking to show it`),!(await this._confirmRevealHiddenRole(w)))return void console.log("[scrollToConcept] Reveal declined — not navigating");await this._revealRole(w);const e=null==(s=this._currentSchema)?void 0:s.sections.find(e=>e.id===w.id),t=e&&this._findConceptById(e.concepts,S.id);if(!e||!t)return void console.warn(`[scrollToConcept] Revealed role "${w.id}" but could not find row "${S.id}" in it`);w=e,S=t}w.expanded=!0,"sidePanel"===this.display&&this._activeSidePanelRoleId!==w.id&&(this._activeSidePanelRoleId=w.id);const T=w.columns??this._columns,F=this._hiddenColumnIds.get(w.id);let k=null;if(o?k=o:(null==t?void 0:t.length)?k=this._pickColumn(w,S,this._findColumnsByDimensions(T,t),D,I,F)??null:I&&T.some(e=>this._periodMatches(this._cellPeriod(w,S,e.id),I))?k=this._pickColumn(w,S,T,D,I,F)??null:_||(k=(null==(l=T.find(e=>!(null==F?void 0:F.has(e.id)))??T[0])?void 0:l.id)??null),null==F?void 0:F.size){let e;if(k)F.has(k)&&(e=k);else if(_){const t=this._formData[S.id]??{},i=T.filter(e=>{const i=t[e.id];return null!=i&&""!==i&&this._valueLooselyMatches(i,D)});i.length&&i.every(e=>F.has(e.id))&&(e=i[0].id,k=e)}e&&(console.log(`[scrollToConcept] Column "${e}" is hidden in "${w.id}" — showing it`),this._showColumn(w.id,e))}const E=!!I&&!!k&&this._periodMatches(this._cellPeriod(w,S,k),I);console.log(`[scrollToConcept] targetColumnId=${k} hasValueMatch=${_} targetValue=${D} periodPinned=${E}`),this._conceptSearchText=e.includes(":")?e.split(":").pop():e,this.requestUpdate(),await this.updateComplete,await new Promise(e=>setTimeout(e,300));const R=null==(d=this.shadowRoot)?void 0:d.querySelectorAll("jupiter-form-section");console.log(`[scrollToConcept] DOM: found ${(null==R?void 0:R.length)??0} jupiter-form-section elements`);let M=null;if(null==R||R.forEach(e=>{var t;(null==(t=e.section)?void 0:t.id)===w.id&&(M=e)}),!M)return void console.warn(`[scrollToConcept] Section element not found: ${w.id}`);await M.updateComplete,await(null==(c=M.revealConcept)?void 0:c.call(M,S.id))&&await Promise.all(Array.from((null==(p=M.shadowRoot)?void 0:p.querySelectorAll("jupiter-concept-tree"))??[]).map(e=>e.updateComplete));const A=null==(u=M.shadowRoot)?void 0:u.querySelectorAll("jupiter-concept-tree");console.log(`[scrollToConcept] conceptTrees in targetSection: ${(null==A?void 0:A.length)??0}`);let P=null;const j=S.id,L=j.includes("__")?j.split("__")[0]:j;console.log(`[scrollToConcept] conceptId="${j}" conceptIdBase="${L}"`);const N=e=>e===j||e.includes("__")&&e.split("__")[0]===L,V=e=>{const t=e.decimals||(void 0!==e.globalDecimals&&"INF"!==e.globalDecimals?e.globalDecimals:null);if(!t)return 1;const i=parseFloat(String(t));return isNaN(i)||i<=0?1:Math.pow(10,i)},O=(e,t)=>{if(String(e.value??"")===t)return!0;const i=Number(t),o=Number(e.value);if(!isNaN(i)&&!isNaN(o)&&0!==o){const t=V(e);if(1!==t&&Math.abs(o*t-i)<1e-4)return!0}return!1};let z=0;if(null==A||A.forEach(e=>{var t;if(P)return;const i=null==(t=e.shadowRoot)?void 0:t.querySelectorAll("jupiter-form-field");null==i||i.forEach(e=>{if(P)return;const t=k?e.conceptId===j&&e.columnId===k:e.conceptId===j,i=!_||E||O(e,D);t&&(z++,console.log(`[scrollToConcept] Phase1 candidate: conceptId=${e.conceptId} columnId=${e.columnId} value=${e.value} scale=${V(e)} valueMatch=${i}`)),t&&i&&(P=e)})}),console.log(`[scrollToConcept] Phase1: scanned ${z} candidates, found=${!!P}`),!P&&C){const e=[];null==A||A.forEach(t=>{var i;null==(i=t.shadowRoot)||i.querySelectorAll("jupiter-form-field").forEach(t=>{t.conceptId===j&&e.push(t)})}),P=k&&e.find(e=>e.columnId===k)||e[0]||null,P&&k&&P.columnId!==k&&console.warn(`[scrollToConcept] Phase1b: column "${k}" not rendered in row "${j}" — using column "${P.columnId}"`),console.log(`[scrollToConcept] Phase1b (role-scoped): ${e.length} fields in row "${j}", found=${!!P}`)}if(!P&&_){console.log("[scrollToConcept] Phase2: searching ALL sections by base concept name + value");const e=(null==(h=this.shadowRoot)?void 0:h.querySelectorAll("jupiter-form-section"))??[];for(const t of Array.from(e)){if(P)break;const e=(null==(m=t.shadowRoot)?void 0:m.querySelectorAll("jupiter-concept-tree"))??[];for(const t of Array.from(e)){if(P)break;((null==(f=t.shadowRoot)?void 0:f.querySelectorAll("jupiter-form-field"))??[]).forEach(e=>{if(P)return;const t=N(e.conceptId),i=O(e,D);t&&console.log(`[scrollToConcept] Phase2 candidate: conceptId=${e.conceptId} value=${e.value} scale=${V(e)} valMatch=${i}`),t&&i&&(console.log(`[scrollToConcept] Phase2 ✅ MATCH: conceptId=${e.conceptId} columnId=${e.columnId} value=${e.value}`),P=e)})}}}if(!P){const e=(null==(g=this.shadowRoot)?void 0:g.querySelectorAll("jupiter-form-section"))??[];for(const t of Array.from(e)){if(P)break;const e=(null==(b=t.shadowRoot)?void 0:b.querySelectorAll("jupiter-concept-tree"))??[];for(const t of Array.from(e)){if(P)break;((null==(v=t.shadowRoot)?void 0:v.querySelectorAll("jupiter-form-field"))??[]).forEach(e=>{if(P)return;(k?N(e.conceptId)&&e.columnId===k:N(e.conceptId))&&(console.log(`[scrollToConcept] Phase3 ✅ fallback: conceptId=${e.conceptId} columnId=${e.columnId} value=${e.value}`),P=e)})}}}if(!P)return void console.warn(`[scrollToConcept] Field element not found for concept: ${e}`);console.log(`[scrollToConcept] ✅ HIGHLIGHTING conceptId=${P.conceptId} columnId=${P.columnId} value=${P.value}`);const U=P.getBoundingClientRect(),J=this.shadowRoot,B=J?J.querySelector(".side-panel-content")??J.querySelector(".form-container"):null,q=B&&B.scrollHeight>B.clientHeight?B:null;if(q){const e=q.getBoundingClientRect(),t=Math.max(0,U.top-e.top+q.scrollTop-q.clientHeight/2+U.height/2);q.scrollTo({top:t,behavior:"smooth"})}else P.scrollIntoView({behavior:"smooth",block:"center"});const H=null==(y=null==M?void 0:M.shadowRoot)?void 0:y.querySelector(".table-container");if(H&&H.scrollWidth>H.clientWidth){const e=H.getBoundingClientRect(),t=Math.max(0,U.left-e.left+H.scrollLeft-H.clientWidth/2+U.width/2);H.scrollTo({left:t,behavior:"smooth"})}const K=P.getRootNode(),Y=(K instanceof ShadowRoot?K.host:null)??P;Y.classList.add("concept-highlight");const W=null==(x=P.shadowRoot)?void 0:x.querySelector('input:not([type="hidden"]), select, textarea, button, [tabindex]:not([tabindex="-1"])');W&&setTimeout(()=>W.focus({preventScroll:!0}),450),setTimeout(()=>Y.classList.remove("concept-highlight"),1e4)}render(){var t;const i=this._errors.filter(e=>"error"===e.severity).length,o="readonly"===this.mode?0:this._errors.filter(e=>"warning"===e.severity).length,r=this.config||{},n=!1!==r.showValidationSummary&&(i>0&&this._submitted||o>0),a=this._currentSchema;return a?e.html`
|
|
3926
3926
|
<div class="form-container">
|
|
3927
3927
|
<!-- Form Header - Hidden in side panel mode -->
|
|
3928
3928
|
${"sidePanel"!==this.display?e.html`
|