@wildo-ai/saas-frontend-lib 1.1.16 → 1.1.17

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 (156) hide show
  1. package/dist/esm/components/compliance/EmbeddedSigningFrame.d.ts.map +1 -1
  2. package/dist/esm/components/compliance/EmbeddedSigningFrame.js +17 -6
  3. package/dist/esm/components/compliance/EmbeddedSigningFrame.js.map +1 -1
  4. package/dist/esm/components/data-display/approval-seal.d.ts +7 -5
  5. package/dist/esm/components/data-display/approval-seal.d.ts.map +1 -1
  6. package/dist/esm/components/data-display/approval-seal.js +10 -4
  7. package/dist/esm/components/data-display/approval-seal.js.map +1 -1
  8. package/dist/esm/components/data-display/signature-requests.d.ts +81 -0
  9. package/dist/esm/components/data-display/signature-requests.d.ts.map +1 -0
  10. package/dist/esm/components/data-display/signature-requests.js +123 -0
  11. package/dist/esm/components/data-display/signature-requests.js.map +1 -0
  12. package/dist/esm/components/flows-actors/approval.d.ts.map +1 -1
  13. package/dist/esm/components/flows-actors/approval.js +8 -15
  14. package/dist/esm/components/flows-actors/approval.js.map +1 -1
  15. package/dist/esm/components/form/automated/ResourceAutomatedForm.d.ts.map +1 -1
  16. package/dist/esm/components/form/automated/ResourceAutomatedForm.js +44 -29
  17. package/dist/esm/components/form/automated/ResourceAutomatedForm.js.map +1 -1
  18. package/dist/esm/components/navigation/NavigationItemBadge.d.ts +16 -0
  19. package/dist/esm/components/navigation/NavigationItemBadge.d.ts.map +1 -1
  20. package/dist/esm/components/navigation/NavigationItemBadge.js +14 -2
  21. package/dist/esm/components/navigation/NavigationItemBadge.js.map +1 -1
  22. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.d.ts +3 -3
  23. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js +3 -3
  24. package/dist/esm/components/navigation/app-level/ApplicationLevel_NavigationBack.js.map +1 -1
  25. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts +5 -13
  26. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.d.ts.map +1 -1
  27. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js +30 -255
  28. package/dist/esm/components/navigation/app-level/SidebarResourceBrowser.js.map +1 -1
  29. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts +22 -1
  30. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.d.ts.map +1 -1
  31. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js +57 -26
  32. package/dist/esm/components/navigation/app-level/useCommandMenuBehavior.js.map +1 -1
  33. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts +1 -1
  34. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.d.ts.map +1 -1
  35. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js +35 -1
  36. package/dist/esm/components/navigation/app-level/useMenuBarBehavior.js.map +1 -1
  37. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts +1 -1
  38. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.d.ts.map +1 -1
  39. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js +26 -4
  40. package/dist/esm/components/navigation/app-level/useMenuUserOrgBehavior.js.map +1 -1
  41. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts +31 -0
  42. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.d.ts.map +1 -0
  43. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js +42 -0
  44. package/dist/esm/components/navigation/app-level/useNavigationBackBehavior.js.map +1 -0
  45. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts +76 -0
  46. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.d.ts.map +1 -0
  47. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js +268 -0
  48. package/dist/esm/components/navigation/app-level/useSidebarResourceBrowser.js.map +1 -0
  49. package/dist/esm/components/navigation/command.d.ts +5 -0
  50. package/dist/esm/components/navigation/command.d.ts.map +1 -1
  51. package/dist/esm/components/navigation/command.js.map +1 -1
  52. package/dist/esm/components/resources/ResourceLayout_DangerZone.d.ts.map +1 -1
  53. package/dist/esm/components/resources/ResourceLayout_DangerZone.js +5 -2
  54. package/dist/esm/components/resources/ResourceLayout_DangerZone.js.map +1 -1
  55. package/dist/esm/components/resources/ResourceLayout_InsertedViews.d.ts.map +1 -1
  56. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js +5 -1
  57. package/dist/esm/components/resources/ResourceLayout_InsertedViews.js.map +1 -1
  58. package/dist/esm/components/resources/ResourceLayout_List.d.ts.map +1 -1
  59. package/dist/esm/components/resources/ResourceLayout_List.js +4 -1
  60. package/dist/esm/components/resources/ResourceLayout_List.js.map +1 -1
  61. package/dist/esm/components/resources/ResourceLayout_RecordSharing.d.ts.map +1 -1
  62. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js +4 -1
  63. package/dist/esm/components/resources/ResourceLayout_RecordSharing.js.map +1 -1
  64. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.d.ts.map +1 -1
  65. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js +4 -1
  66. package/dist/esm/components/resources/collection/board/ResourceCollectionBody_Board.js.map +1 -1
  67. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.d.ts.map +1 -1
  68. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js +4 -1
  69. package/dist/esm/components/resources/collection/calendar/ResourceCollectionBody_Calendar.js.map +1 -1
  70. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.d.ts.map +1 -1
  71. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js +4 -1
  72. package/dist/esm/components/resources/collection/timeline/ResourceCollectionBody_Timeline.js.map +1 -1
  73. package/dist/esm/components/resources/skeleton/Group.d.ts.map +1 -1
  74. package/dist/esm/components/resources/skeleton/Group.js +4 -1
  75. package/dist/esm/components/resources/skeleton/Group.js.map +1 -1
  76. package/dist/esm/components/sections/ContentSectionContainer.d.ts.map +1 -1
  77. package/dist/esm/components/sections/ContentSectionContainer.js +11 -7
  78. package/dist/esm/components/sections/ContentSectionContainer.js.map +1 -1
  79. package/dist/esm/components/sections/content-section.d.ts +1 -3
  80. package/dist/esm/components/sections/content-section.d.ts.map +1 -1
  81. package/dist/esm/components/sections/content-section.js.map +1 -1
  82. package/dist/esm/components/settings/AppPage_AgentActivitySettings.d.ts.map +1 -1
  83. package/dist/esm/components/settings/AppPage_AgentActivitySettings.js +2 -1
  84. package/dist/esm/components/settings/AppPage_AgentActivitySettings.js.map +1 -1
  85. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts +12 -0
  86. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.d.ts.map +1 -1
  87. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js +28 -6
  88. package/dist/esm/components/settings/AppPage_ConnectedAccountsSettings.js.map +1 -1
  89. package/dist/esm/components/typography/document-heading-level.d.ts +28 -0
  90. package/dist/esm/components/typography/document-heading-level.d.ts.map +1 -0
  91. package/dist/esm/components/typography/document-heading-level.js +63 -0
  92. package/dist/esm/components/typography/document-heading-level.js.map +1 -0
  93. package/dist/esm/components/views/chart-view/ChartView.d.ts.map +1 -1
  94. package/dist/esm/components/views/chart-view/ChartView.js +20 -16
  95. package/dist/esm/components/views/chart-view/ChartView.js.map +1 -1
  96. package/dist/esm/components/views/chart-view/ChartView.labels.d.ts.map +1 -1
  97. package/dist/esm/components/views/chart-view/ChartView.labels.js +7 -0
  98. package/dist/esm/components/views/chart-view/ChartView.labels.js.map +1 -1
  99. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts +12 -3
  100. package/dist/esm/components/views/chart-view/option-builder/builder-utils.d.ts.map +1 -1
  101. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js +18 -11
  102. package/dist/esm/components/views/chart-view/option-builder/builder-utils.js.map +1 -1
  103. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.d.ts.map +1 -1
  104. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js +2 -1
  105. package/dist/esm/components/views/chart-view/option-builder/builders/bar-family.builder.js.map +1 -1
  106. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.d.ts.map +1 -1
  107. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js +7 -3
  108. package/dist/esm/components/views/chart-view/option-builder/builders/funnel.builder.js.map +1 -1
  109. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.d.ts.map +1 -1
  110. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js +6 -2
  111. package/dist/esm/components/views/chart-view/option-builder/builders/gauge.builder.js.map +1 -1
  112. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.d.ts.map +1 -1
  113. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js +7 -1
  114. package/dist/esm/components/views/chart-view/option-builder/builders/heatmap.builder.js.map +1 -1
  115. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.d.ts.map +1 -1
  116. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js +13 -9
  117. package/dist/esm/components/views/chart-view/option-builder/builders/hierarchical-family.builder.js.map +1 -1
  118. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.d.ts.map +1 -1
  119. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js +2 -1
  120. package/dist/esm/components/views/chart-view/option-builder/builders/line-family.builder.js.map +1 -1
  121. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.d.ts.map +1 -1
  122. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js +2 -1
  123. package/dist/esm/components/views/chart-view/option-builder/builders/parallel.builder.js.map +1 -1
  124. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.d.ts.map +1 -1
  125. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js +4 -3
  126. package/dist/esm/components/views/chart-view/option-builder/builders/pie-family.builder.js.map +1 -1
  127. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.d.ts.map +1 -1
  128. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js +2 -1
  129. package/dist/esm/components/views/chart-view/option-builder/builders/radar.builder.js.map +1 -1
  130. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.d.ts.map +1 -1
  131. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js +5 -1
  132. package/dist/esm/components/views/chart-view/option-builder/builders/sankey.builder.js.map +1 -1
  133. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.d.ts.map +1 -1
  134. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js +4 -3
  135. package/dist/esm/components/views/chart-view/option-builder/builders/statistical-family.builder.js.map +1 -1
  136. package/dist/esm/core/app-shell/app-shell.schemas.d.ts +87 -16
  137. package/dist/esm/core/app-shell/app-shell.schemas.d.ts.map +1 -1
  138. package/dist/esm/core/app-shell/app-shell.schemas.js +16 -0
  139. package/dist/esm/core/app-shell/app-shell.schemas.js.map +1 -1
  140. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts +39 -4
  141. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.d.ts.map +1 -1
  142. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js +33 -1
  143. package/dist/esm/core/requests/wildo-http-client-manual-calls.frontend.service.js.map +1 -1
  144. package/dist/esm/core/resources/hooks/useOperationEnabled.d.ts.map +1 -1
  145. package/dist/esm/core/resources/hooks/useOperationEnabled.js +41 -3
  146. package/dist/esm/core/resources/hooks/useOperationEnabled.js.map +1 -1
  147. package/dist/esm/core/search/command-score.d.ts +33 -0
  148. package/dist/esm/core/search/command-score.d.ts.map +1 -0
  149. package/dist/esm/core/search/command-score.js +109 -0
  150. package/dist/esm/core/search/command-score.js.map +1 -0
  151. package/dist/esm/index.d.ts +5 -0
  152. package/dist/esm/index.d.ts.map +1 -1
  153. package/dist/esm/index.js +5 -0
  154. package/dist/esm/index.js.map +1 -1
  155. package/dist/tsconfig.build.tsbuildinfo +1 -1
  156. package/package.json +6 -6
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ /**
3
+ * A heading level in the document outline, `h1` … `h6`.
4
+ */
5
+ export type DocumentHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
6
+ /** The level a heading rendered here takes. */
7
+ export declare function useDocumentHeadingLevel(): DocumentHeadingLevel;
8
+ /** One level deeper than `level`, stopping at 6. */
9
+ export declare function nestedDocumentHeadingLevel(level: DocumentHeadingLevel): DocumentHeadingLevel;
10
+ /** The tag name for a level: `'h1'` … `'h6'`. */
11
+ export declare function documentHeadingTag(level: DocumentHeadingLevel): 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
12
+ /**
13
+ * Set the level headings beneath take. A surface that renders its own heading above framework chrome without
14
+ * wrapping that chrome in {@link NestedDocumentHeadingLevel} (a custom page with an `h2` of its own, say) uses it to
15
+ * place the chrome correctly in its outline.
16
+ */
17
+ export declare function DocumentHeadingLevelHost({ level, children }: {
18
+ level: DocumentHeadingLevel;
19
+ children: React.ReactNode;
20
+ }): React.ReactElement;
21
+ /**
22
+ * Wrap the content a heading owns, so a heading inside it takes the next level. Render the heading itself OUTSIDE
23
+ * it, at {@link useDocumentHeadingLevel}.
24
+ */
25
+ export declare function NestedDocumentHeadingLevel({ children }: {
26
+ children: React.ReactNode;
27
+ }): React.ReactElement;
28
+ //# sourceMappingURL=document-heading-level.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-heading-level.d.ts","sourceRoot":"","sources":["../../../../src/components/typography/document-heading-level.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAoCxD,+CAA+C;AAC/C,wBAAgB,uBAAuB,IAAI,oBAAoB,CAE9D;AAED,oDAAoD;AACpD,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,oBAAoB,GAAG,oBAAoB,CAE5F;AAED,iDAAiD;AACjD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,oBAAoB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAEvG;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,KAAK,EAAE,oBAAoB,CAAC;IAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAE5I;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,YAAY,CAG1G"}
@@ -0,0 +1,63 @@
1
+ import React from 'react';
2
+ /**
3
+ * The level the NEXT heading takes where it is rendered, decided by what is above it in the page, never by the
4
+ * component drawing it.
5
+ *
6
+ * ## Why the chrome cannot pick its own level
7
+ *
8
+ * A heading's level is a fact about the OUTLINE: it says which heading this one belongs under. The framework's
9
+ * chrome (a field group, a chart card, a section panel, a list's group label) renders the same component in places
10
+ * whose outlines differ: directly under the page's `h1` on a record page, under a section panel's heading, under a
11
+ * collapsible-all heading. Every one of them was a hard-coded `h3`, so on a record page the outline went `h1 → h3`
12
+ * and the levels skipped. The first live accessibility audit of Wonder Todos (axe-core `heading-order`, #3867)
13
+ * reported exactly that on the record read view (a chart card's "My Week by Status" `h3`) and the create form (the
14
+ * "Workflow" group `h3`), each with the record title `h1` the only heading above it.
15
+ *
16
+ * spec-cite: WCAG 2.2 SC 1.3.1 (Info and Relationships), technique H42; axe-core rule id `heading-order`, which
17
+ * reports a heading whose level is more than one deeper than the heading before it.
18
+ *
19
+ * ## The rule
20
+ *
21
+ * - With no host the level is **2**: a framework surface renders beneath its page title, which is the page's one
22
+ * `h1` (`ResourceHeaderTitleHeading`, `ViewLayout_Header`). A surface with no `h1` above it then starts its
23
+ * outline at `h2`, which skips nothing.
24
+ * - A component that DRAWS a heading reads {@link useDocumentHeadingLevel} for its own level, and wraps the content
25
+ * that heading owns in {@link NestedDocumentHeadingLevel}, so a heading inside it is one level deeper.
26
+ * - A `<legend>` is not a heading, so a section named by a legend does not nest its content.
27
+ * - The level stops at 6: HTML has no `h7`, and an outline six levels deep has bigger problems than its last tag.
28
+ *
29
+ * Rejected: a `level` prop threaded through each chrome component. Every caller would have to know its outline
30
+ * position, which is precisely the knowledge a reused component does not have — the `titleTag: 'h4'` a collapsible
31
+ * container passed to its panels was the one place that did this, and it was right only while that container sat
32
+ * directly under an `h2`.
33
+ */
34
+ const DocumentHeadingLevelContext = React.createContext(2);
35
+ /** The level a heading rendered here takes. */
36
+ export function useDocumentHeadingLevel() {
37
+ return React.useContext(DocumentHeadingLevelContext);
38
+ }
39
+ /** One level deeper than `level`, stopping at 6. */
40
+ export function nestedDocumentHeadingLevel(level) {
41
+ return Math.min(level + 1, 6);
42
+ }
43
+ /** The tag name for a level: `'h1'` … `'h6'`. */
44
+ export function documentHeadingTag(level) {
45
+ return `h${level}`;
46
+ }
47
+ /**
48
+ * Set the level headings beneath take. A surface that renders its own heading above framework chrome without
49
+ * wrapping that chrome in {@link NestedDocumentHeadingLevel} (a custom page with an `h2` of its own, say) uses it to
50
+ * place the chrome correctly in its outline.
51
+ */
52
+ export function DocumentHeadingLevelHost({ level, children }) {
53
+ return React.createElement(DocumentHeadingLevelContext.Provider, { value: level }, children);
54
+ }
55
+ /**
56
+ * Wrap the content a heading owns, so a heading inside it takes the next level. Render the heading itself OUTSIDE
57
+ * it, at {@link useDocumentHeadingLevel}.
58
+ */
59
+ export function NestedDocumentHeadingLevel({ children }) {
60
+ const level = useDocumentHeadingLevel();
61
+ return React.createElement(DocumentHeadingLevelContext.Provider, { value: nestedDocumentHeadingLevel(level) }, children);
62
+ }
63
+ //# sourceMappingURL=document-heading-level.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"document-heading-level.js","sourceRoot":"","sources":["../../../../src/components/typography/document-heading-level.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,2BAA2B,GAAG,KAAK,CAAC,aAAa,CAAuB,CAAC,CAAC,CAAA;AAEhF,+CAA+C;AAC/C,MAAM,UAAU,uBAAuB;IACrC,OAAO,KAAK,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAA;AACtD,CAAC;AAED,oDAAoD;AACpD,MAAM,UAAU,0BAA0B,CAAC,KAA2B;IACpE,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,CAAC,CAAyB,CAAA;AACvD,CAAC;AAED,iDAAiD;AACjD,MAAM,UAAU,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,IAAI,KAAK,EAAW,CAAA;AAC7B,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAA8D;IACtH,OAAO,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC9F,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,0BAA0B,CAAC,EAAE,QAAQ,EAAiC;IACpF,MAAM,KAAK,GAAG,uBAAuB,EAAE,CAAA;IACvC,OAAO,KAAK,CAAC,aAAa,CAAC,2BAA2B,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,0BAA0B,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;AAC1H,CAAC","sourcesContent":["import React from 'react'\n\n/**\n * A heading level in the document outline, `h1` … `h6`.\n */\nexport type DocumentHeadingLevel = 1 | 2 | 3 | 4 | 5 | 6\n\n/**\n * The level the NEXT heading takes where it is rendered, decided by what is above it in the page, never by the\n * component drawing it.\n *\n * ## Why the chrome cannot pick its own level\n *\n * A heading's level is a fact about the OUTLINE: it says which heading this one belongs under. The framework's\n * chrome (a field group, a chart card, a section panel, a list's group label) renders the same component in places\n * whose outlines differ: directly under the page's `h1` on a record page, under a section panel's heading, under a\n * collapsible-all heading. Every one of them was a hard-coded `h3`, so on a record page the outline went `h1 → h3`\n * and the levels skipped. The first live accessibility audit of Wonder Todos (axe-core `heading-order`, #3867)\n * reported exactly that on the record read view (a chart card's \"My Week by Status\" `h3`) and the create form (the\n * \"Workflow\" group `h3`), each with the record title `h1` the only heading above it.\n *\n * spec-cite: WCAG 2.2 SC 1.3.1 (Info and Relationships), technique H42; axe-core rule id `heading-order`, which\n * reports a heading whose level is more than one deeper than the heading before it.\n *\n * ## The rule\n *\n * - With no host the level is **2**: a framework surface renders beneath its page title, which is the page's one\n * `h1` (`ResourceHeaderTitleHeading`, `ViewLayout_Header`). A surface with no `h1` above it then starts its\n * outline at `h2`, which skips nothing.\n * - A component that DRAWS a heading reads {@link useDocumentHeadingLevel} for its own level, and wraps the content\n * that heading owns in {@link NestedDocumentHeadingLevel}, so a heading inside it is one level deeper.\n * - A `<legend>` is not a heading, so a section named by a legend does not nest its content.\n * - The level stops at 6: HTML has no `h7`, and an outline six levels deep has bigger problems than its last tag.\n *\n * Rejected: a `level` prop threaded through each chrome component. Every caller would have to know its outline\n * position, which is precisely the knowledge a reused component does not have — the `titleTag: 'h4'` a collapsible\n * container passed to its panels was the one place that did this, and it was right only while that container sat\n * directly under an `h2`.\n */\nconst DocumentHeadingLevelContext = React.createContext<DocumentHeadingLevel>(2)\n\n/** The level a heading rendered here takes. */\nexport function useDocumentHeadingLevel(): DocumentHeadingLevel {\n return React.useContext(DocumentHeadingLevelContext)\n}\n\n/** One level deeper than `level`, stopping at 6. */\nexport function nestedDocumentHeadingLevel(level: DocumentHeadingLevel): DocumentHeadingLevel {\n return Math.min(level + 1, 6) as DocumentHeadingLevel\n}\n\n/** The tag name for a level: `'h1'` … `'h6'`. */\nexport function documentHeadingTag(level: DocumentHeadingLevel): 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' {\n return `h${level}` as const\n}\n\n/**\n * Set the level headings beneath take. A surface that renders its own heading above framework chrome without\n * wrapping that chrome in {@link NestedDocumentHeadingLevel} (a custom page with an `h2` of its own, say) uses it to\n * place the chrome correctly in its outline.\n */\nexport function DocumentHeadingLevelHost({ level, children }: { level: DocumentHeadingLevel; children: React.ReactNode }): React.ReactElement {\n return React.createElement(DocumentHeadingLevelContext.Provider, { value: level }, children)\n}\n\n/**\n * Wrap the content a heading owns, so a heading inside it takes the next level. Render the heading itself OUTSIDE\n * it, at {@link useDocumentHeadingLevel}.\n */\nexport function NestedDocumentHeadingLevel({ children }: { children: React.ReactNode }): React.ReactElement {\n const level = useDocumentHeadingLevel()\n return React.createElement(DocumentHeadingLevelContext.Provider, { value: nestedDocumentHeadingLevel(level) }, children)\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChartView.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.tsx"],"names":[],"mappings":"AAAA;;;;;;;;oEAQoE;AAEpE,OAAO,KAAuC,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAa,KAAK,eAAe,EAAE,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAmB/F,OAAO,KAAK,EACV,wBAAwB,EACxB,+BAA+B,EAChC,MAAM,6DAA6D,CAAC;AASrE,MAAM,WAAW,cAAc;IAC7B,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wFAAwF;IACxF,QAAQ,CAAC,EAAE,eAAe,CAAC;IAC3B,kFAAkF;IAClF,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,4EAA4E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AC,CAAC;IACpD,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,qFAAqF;IACrF,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,aAAa;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAmN9C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  /** ──────────────────────────────────────────────────────────────
3
3
  * ChartView — ECharts-based chart component
4
4
  *
@@ -31,6 +31,7 @@ import { useResourceRegistry } from '../../../core/resources/useResourceRegistry
31
31
  // ECharts stays behind this file's app-level React.lazy boundary via WildoEChart's
32
32
  // static `echarts-setup` import.
33
33
  import { WildoEChart } from './WildoEChart.js';
34
+ import { Text } from '../../../components/typography/text.js';
34
35
  /**
35
36
  * ChartView — renders an ECharts chart from a ChartDefinition.
36
37
  *
@@ -166,21 +167,24 @@ export const ChartView = ({ viewRef, document: documentProp, viewDefinition: vie
166
167
  }
167
168
  if (!isReady || !isResourceLabelsReady)
168
169
  return null;
169
- return (_jsx("div", { ref: containerRefCallback, className: cn('chart-view', className), style: { width, height, position: 'relative' }, children: _jsx(WildoEChart
170
- // Remount on dark-mode toggle: the theme name is stable but its content
171
- // is re-registered, and ECharts bakes the theme at init time.
172
- , { option: option, theme: getWildoThemeName(), style: { width: '100%', height: '100%' }, notMerge: true,
173
- // lazyUpdate MUST stay false. With lazyUpdate={true}, ECharts 6 defers
174
- // the setOption flush to its next animation frame (`_onframe`); ECharts
175
- // 6.0.0 then crashes on that deferred path for cartesian charts —
176
- // `CartesianAxisView.render` dereferences `axisModel.axis.axisBuilder
177
- // .group` while `axisBuilder` is still undefined (ECharts 6 "promoted"
178
- // axis-element building to the coordinate-system resize stage, but the
179
- // deferred-flush ordering skips it). Symptom: `TypeError: Cannot read
180
- // properties of undefined (reading 'group')`. A synchronous flush runs
181
- // the full resize→render pipeline in order and renders cleanly with
182
- // animation intact.
183
- lazyUpdate: false, onChartReady: onChartReady }, isDark ? 'dark' : 'light') }));
170
+ // #4084: groups of a resource declaring `auditReads` too small to show carry no figures, and are drawn as no value
171
+ // (`measureValueOrNull`). The line says so, so a missing slice or bar is not read as an empty group.
172
+ const suppressedGroupCount = data?.queryMeta?.suppressedGroupCount ?? 0;
173
+ return (_jsxs("div", { ref: containerRefCallback, className: cn('chart-view', className), style: { width, height, position: 'relative', display: 'flex', flexDirection: 'column' }, children: [_jsx("div", { style: { flex: 1, minHeight: 0 }, children: _jsx(WildoEChart
174
+ // Remount on dark-mode toggle: the theme name is stable but its content
175
+ // is re-registered, and ECharts bakes the theme at init time.
176
+ , { option: option, theme: getWildoThemeName(), style: { width: '100%', height: '100%' }, notMerge: true,
177
+ // lazyUpdate MUST stay false. With lazyUpdate={true}, ECharts 6 defers
178
+ // the setOption flush to its next animation frame (`_onframe`); ECharts
179
+ // 6.0.0 then crashes on that deferred path for cartesian charts —
180
+ // `CartesianAxisView.render` dereferences `axisModel.axis.axisBuilder
181
+ // .group` while `axisBuilder` is still undefined (ECharts 6 "promoted"
182
+ // axis-element building to the coordinate-system resize stage, but the
183
+ // deferred-flush ordering skips it). Symptom: `TypeError: Cannot read
184
+ // properties of undefined (reading 'group')`. A synchronous flush runs
185
+ // the full resize→render pipeline in order and renders cleanly with
186
+ // animation intact.
187
+ lazyUpdate: false, onChartReady: onChartReady }, isDark ? 'dark' : 'light') }), suppressedGroupCount > 0 && (_jsx(Text, { className: "text-xs text-muted-foreground", children: t('suppressedGroupsNotice', { count: suppressedGroupCount }) }))] }));
184
188
  };
185
189
  export default ChartView;
186
190
  //# sourceMappingURL=ChartView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChartView.js","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.tsx"],"names":[],"mappings":";AAAA;;;;;;;;oEAQoE;AAEpE,OAAc,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,SAAS,EAA+C,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,oCAAoC,EACpC,wBAAwB,GACzB,MAAM,6DAA6D,CAAC;AAKrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,wDAAwD,CAAC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AAE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;IAC7D,CAAC;IAED,+GAA+G;IAC/G,IAAI,KAAK,EAAE,CAAC;QACV,OAAO,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC;YACjC,CAAC,CAAC,KAAC,cAAc,IAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,GAAI;YAC9E,CAAC,CAAC,KAAC,eAAe,KAAG,CAAC;IAC1B,CAAC;IAED,QAAQ;IACR,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,KAAC,eAAe,KAAG,CAAC;IAC7B,CAAC;IAED,IAAI,CAAC,OAAO,IAAI,CAAC,qBAAqB;QAAE,OAAO,IAAI,CAAC;IAEpD,OAAO,CACL,cACE,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,EACtC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,YAE9C,KAAC,WAAW;QACV,wEAAwE;QACxE,8DAA8D;YAE9D,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,iBAAiB,EAAE,EAC1B,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,EACxC,QAAQ,EAAE,IAAI;YACZ,uEAAuE;YACvE,wEAAwE;YACxE,kEAAkE;YAClE,sEAAsE;YACtE,uEAAuE;YACvE,uEAAuE;YACvE,sEAAsE;YACtE,uEAAuE;YACvE,oEAAoE;YACpE,oBAAoB;YACtB,UAAU,EAAE,KAAK,EACjB,YAAY,EAAE,YAAY,IAhBrB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAiB9B,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * ChartView — ECharts-based chart component\n *\n * Fetches data from backend via POST /api/charts/:chartRef/data,\n * combines with the visual encoding from the chart definition,\n * and renders via ECharts.\n *\n * This file is lazy-loaded via React.lazy() in AppRouter.\n * ────────────────────────────────────────────────────────────── */\n\nimport React, { useRef, useCallback, useMemo } from 'react';\nimport { ChartType, type ChartDefinition, type ChartInputValues } from '@wildo-ai/saas-models';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { ViewNotFound } from '~wildo-frontend-lib/components/views/ViewNotFound';\nimport { useChartData } from './chart-view.utils';\nimport { useResolvedChartRuntimeDescriptor } from './chart-runtime.utils';\nimport { useChartTheme, getWildoThemeName } from './chart-theme-bridge';\nimport { buildDimensionEnumMeta } from './enum-color-bridge';\nimport { buildEChartsOption } from './option-builder/echarts-option-builder';\nimport { ChartLoadingSkeleton } from './ChartLoadingSkeleton';\nimport { ChartErrorState } from './ChartErrorState';\nimport { ChartEmptyState } from './ChartEmptyState';\nimport { ChartKpiFigure } from './ChartKpiFigure';\nimport {\n buildResolvedInsertedChartDescriptor,\n resolveInsertedChartView,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport type {\n InsertedChartDeclaration,\n ResolvedInsertedChartDescriptor,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\n\n// Direct ECharts binding. Replaces `echarts-for-react`, whose `'finished'`-gated\n// double-init hangs on ECharts 6.0.0 (see WildoEChart for the full analysis).\n// ECharts stays behind this file's app-level React.lazy boundary via WildoEChart's\n// static `echarts-setup` import.\nimport { WildoEChart } from './WildoEChart';\n\nexport interface ChartViewProps {\n /** View reference — resolved from UIContext internally. */\n viewRef?: string;\n /** Pre-resolved bare chart definition. Useful for dev previews and direct renderers. */\n document?: ChartDefinition;\n /** Pre-resolved chart surface definition. When provided, `viewRef` is ignored. */\n viewDefinition?: InsertedChartDeclaration;\n /** Pre-resolved runtime descriptor for inserted or already-bound charts. */\n runtimeDescriptor?: ResolvedInsertedChartDescriptor;\n /** Explicit navigation-time or host-time context bindings. */\n contextResourceIdentifiers?: Record<string, string>;\n /** Explicit standalone-route URL param values for URL_PARAM chart bindings. */\n urlParamValues?: Record<string, string>;\n /** Explicit chart input overrides. These win over binding/default-derived values. */\n inputs?: ChartInputValues;\n /** Custom class name */\n className?: string;\n /** Width */\n width?: string | number;\n /** Height */\n height?: string | number;\n /**\n * When true, a data-fetch failure degrades LOCALLY (this chart card shows the\n * error, with retry) WITHOUT raising the global error toast. Set by EMBEDDED\n * hosts (composite tiles, detail-page charts) so one sub-surface's 403/5xx does\n * not read as a page-level failure. Standalone chart pages leave it `false` and\n * keep the global error pipeline. The error is still emitted/logged either way.\n */\n localErrorOnly?: boolean;\n}\n\n/**\n * ChartView — renders an ECharts chart from a ChartDefinition.\n *\n * Data flow:\n * 1. Resolve definition from UIContext or props\n * 2. Fetch aggregated data from backend\n * 3. Build ECharts option from definition + data\n * 4. Render with echarts-for-react\n */\nexport const ChartView: React.FC<ChartViewProps> = ({\n viewRef,\n document: documentProp,\n viewDefinition: viewDefinitionProp,\n runtimeDescriptor,\n contextResourceIdentifiers,\n urlParamValues,\n inputs,\n className = '',\n width = '100%',\n height = 400,\n localErrorOnly = false,\n}) => {\n const { registry } = useResourceRegistry();\n const { getChartStylePreset, isDark } = useUI();\n const chartStylePreset = getChartStylePreset();\n const { t, isReady, resolvedRegionalPreferences } = useI18n({ component: FrontendComponentType.HIGH_LEVEL_VIEWS_CHART });\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n const echartsRef = useRef<any>(null);\n\n // Register/update chart theme with current style preset\n useChartTheme(chartStylePreset);\n\n const resolvedInsertedChart = useMemo(\n () => (viewDefinitionProp ? undefined : resolveInsertedChartView({ viewRef, registry })),\n [viewDefinitionProp, viewRef, registry],\n );\n const viewDefinition = viewDefinitionProp ?? resolvedInsertedChart?.chartView;\n const effectiveRuntimeDescriptor = useMemo(\n () => runtimeDescriptor ?? (\n resolvedInsertedChart\n ? buildResolvedInsertedChartDescriptor({\n identity: resolvedInsertedChart.identity,\n chartView: resolvedInsertedChart.chartView,\n contextResourceIdentifiers: contextResourceIdentifiers ?? {},\n })\n : undefined\n ),\n [runtimeDescriptor, resolvedInsertedChart, contextResourceIdentifiers],\n );\n const runtime = useResolvedChartRuntimeDescriptor({\n surfaceDefinition: viewDefinition,\n chartDefinition: documentProp,\n runtimeDescriptor: effectiveRuntimeDescriptor,\n explicitContextResourceIdentifiers: contextResourceIdentifiers,\n explicitInputs: inputs,\n urlParamValues,\n });\n const definition = runtime?.chartDefinition;\n\n // Fetch chart data\n const { data, loading, error, refetch } = useChartData(\n definition,\n runtime?.executionChartRef,\n runtime?.resolvedInputs,\n runtime?.contextResourceIdentifiers,\n urlParamValues,\n localErrorOnly,\n resolvedRegionalPreferences.timezone,\n );\n\n // ResizeObserver for container.\n //\n // ECharts reflows to the container natively via `instance.resize()`; we do NOT\n // rebuild the ECharts `option` on resize. An earlier implementation pushed the\n // observed size into React state (a `containerSize` that fed `buildEChartsOption`\n // and sat in the `option` useMemo deps), so every resize tick produced a brand-new\n // option object. Combined with `notMerge`+`lazyUpdate` below, that scheduled a\n // frame-deferred atomic option replacement that raced the in-flight `resize()`\n // relayout — surfacing as `Cannot read properties of undefined (reading 'group')`\n // in ECharts' `CartesianAxisView.render` one frame late, plus the tell-tale\n // \"ResizeObserver loop completed with undelivered notifications\" (the observer\n // callback's state update re-triggered layout). `containerSize` was in any case\n // dead context — no chart-type builder reads it — so dropping the rebuild is\n // behaviour-preserving. Native resize is the whole job here.\n // The observer must arm when the REAL container mounts, which happens strictly\n // AFTER the loading/error/empty early returns below stop short-circuiting —\n // i.e. potentially many renders after the initial mount. A mount-time\n // `useEffect(…, [])` reading a plain ref (the previous implementation) ran\n // exactly once, while the container was still null (the first render always\n // takes the loading/skeleton branch), so the observer NEVER armed and charts\n // never reflowed to container resizes. A callback ref is the structural fix:\n // React invokes it at the moment the container node attaches (and with `null`\n // when it detaches, including unmount), so arming/disarming exactly tracks the\n // real DOM node regardless of which render branch produced it.\n const containerRefCallback = useCallback((el: HTMLDivElement | null) => {\n resizeObserverRef.current?.disconnect();\n resizeObserverRef.current = null;\n if (!el) return;\n\n const observer = new ResizeObserver(() => {\n const instance = echartsRef.current?.getEchartsInstance?.();\n // Guard against a disposed instance: on theme toggle the chart remounts\n // (see the `key` prop below) and the observer closure can fire against an\n // instance that ECharts has already torn down — `resize()` would throw.\n if (instance && !instance.isDisposed?.()) {\n instance.resize();\n }\n });\n\n observer.observe(el);\n resizeObserverRef.current = observer;\n }, []);\n\n // Save echarts instance ref\n const onChartReady = useCallback((instance: unknown) => {\n echartsRef.current = { getEchartsInstance: () => instance };\n }, []);\n\n // Build ECharts option — memoized, placed before early returns to respect Rules of Hooks.\n // Deliberately NOT keyed on container size: the option carries no size-dependent\n // fields (no builder reads `containerSize`), and rebuilding it on resize is what\n // raced the native `resize()` into the `CartesianAxisView` crash (see the observer\n // above). The option now rebuilds only on genuine content/appearance changes.\n // Enum coherence: when a chart dimension is an enum, resolve — once, from the\n // resource registry's decorated schema — both the value→color map (slices/bars\n // match the value's badge) and the enum's declared member order (categories sort\n // by declaration order, not the backend's alphabetical order). Keyed on `isDark`\n // because the colors resolve live CSS vars (`--info`, `--muted-foreground`, …)\n // that flip with the theme; ChartView does not remount on toggle (only its child\n // chart does), so without this the memo would keep the previous mode's colors.\n // See `enum-color-bridge.ts`.\n //\n // Labels ride the same pass: an enum dimension's values are DISPLAYED through the i18n tree (axis\n // categories, slice and split names) while the data stays keyed on the raw value. The resource's\n // label bundle is requested here so its enum labels are loaded before the chart renders.\n const { tResourceFieldEnumValue, isReady: isResourceLabelsReady } = useI18n({ resource: definition?.dataQuery.mainResourceType });\n const dimensionEnumMeta = useMemo(\n () => (definition\n ? buildDimensionEnumMeta(definition, (type) => registry.resourceConfigurations[type], tResourceFieldEnumValue)\n : { colors: {}, order: {}, labels: {} }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [definition, registry, isDark, tResourceFieldEnumValue, isResourceLabelsReady],\n );\n\n // A KPI is a figure, not a drawing (#2299): it builds no ECharts option and renders `ChartKpiFigure` below.\n const isKpi = definition?.chartType === ChartType.KPI;\n const option = useMemo(\n () => (definition && !isKpi && data && data.data.length > 0)\n ? buildEChartsOption(definition, data, undefined, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale)\n : null,\n [definition, isKpi, data, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale],\n );\n\n // Not found\n if (!definition) {\n return <ViewNotFound viewKind=\"chart\" viewRef={viewRef} />;\n }\n\n // Loading\n if (loading && !data) {\n return <ChartLoadingSkeleton height={height} />;\n }\n\n // Error\n if (error) {\n return <ChartErrorState error={error} onRetry={refetch} />;\n }\n\n // A figure: one row, always, from a backend that completes an empty scope; no row only from one that does not.\n if (isKpi) {\n return data && data.data.length > 0\n ? <ChartKpiFigure definition={definition} data={data} className={className} />\n : <ChartEmptyState />;\n }\n\n // Empty\n if (!option) {\n return <ChartEmptyState />;\n }\n\n if (!isReady || !isResourceLabelsReady) return null;\n\n return (\n <div\n ref={containerRefCallback}\n className={cn('chart-view', className)}\n style={{ width, height, position: 'relative' }}\n >\n <WildoEChart\n // Remount on dark-mode toggle: the theme name is stable but its content\n // is re-registered, and ECharts bakes the theme at init time.\n key={isDark ? 'dark' : 'light'}\n option={option}\n theme={getWildoThemeName()}\n style={{ width: '100%', height: '100%' }}\n notMerge={true}\n // lazyUpdate MUST stay false. With lazyUpdate={true}, ECharts 6 defers\n // the setOption flush to its next animation frame (`_onframe`); ECharts\n // 6.0.0 then crashes on that deferred path for cartesian charts —\n // `CartesianAxisView.render` dereferences `axisModel.axis.axisBuilder\n // .group` while `axisBuilder` is still undefined (ECharts 6 \"promoted\"\n // axis-element building to the coordinate-system resize stage, but the\n // deferred-flush ordering skips it). Symptom: `TypeError: Cannot read\n // properties of undefined (reading 'group')`. A synchronous flush runs\n // the full resize→render pipeline in order and renders cleanly with\n // animation intact.\n lazyUpdate={false}\n onChartReady={onChartReady}\n />\n </div>\n );\n};\n\nexport default ChartView;\n"]}
1
+ {"version":3,"file":"ChartView.js","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.tsx"],"names":[],"mappings":";AAAA;;;;;;;;oEAQoE;AAEpE,OAAc,EAAE,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,SAAS,EAA+C,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,mDAAmD,CAAC;AACjF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iCAAiC,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EACL,oCAAoC,EACpC,wBAAwB,GACzB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;oBACZ,uEAAuE;oBACvE,wEAAwE;oBACxE,kEAAkE;oBAClE,sEAAsE;oBACtE,uEAAuE;oBACvE,uEAAuE;oBACvE,sEAAsE;oBACtE,uEAAuE;oBACvE,oEAAoE;oBACpE,oBAAoB;oBACtB,UAAU,EAAE,KAAK,EACjB,YAAY,EAAE,YAAY,IAhBrB,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAiB9B,GACI,EACL,oBAAoB,GAAG,CAAC,IAAI,CAC3B,KAAC,IAAI,IAAC,SAAS,EAAC,+BAA+B,YAAE,CAAC,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,CAAC,GAAQ,CACtH,IACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/** ──────────────────────────────────────────────────────────────\n * ChartView — ECharts-based chart component\n *\n * Fetches data from backend via POST /api/charts/:chartRef/data,\n * combines with the visual encoding from the chart definition,\n * and renders via ECharts.\n *\n * This file is lazy-loaded via React.lazy() in AppRouter.\n * ────────────────────────────────────────────────────────────── */\n\nimport React, { useRef, useCallback, useMemo } from 'react';\nimport { ChartType, type ChartDefinition, type ChartInputValues } from '@wildo-ai/saas-models';\nimport { FrontendComponentType } from '@wildo-ai/presets-components-models';\nimport { useUI } from '~wildo-frontend-lib/core/ui/useUI';\nimport { cn } from '~wildo-frontend-lib/core/ui/cn';\nimport { useI18n } from '~wildo-frontend-lib/core/i18n/useI18n';\nimport { ViewNotFound } from '~wildo-frontend-lib/components/views/ViewNotFound';\nimport { useChartData } from './chart-view.utils';\nimport { useResolvedChartRuntimeDescriptor } from './chart-runtime.utils';\nimport { useChartTheme, getWildoThemeName } from './chart-theme-bridge';\nimport { buildDimensionEnumMeta } from './enum-color-bridge';\nimport { buildEChartsOption } from './option-builder/echarts-option-builder';\nimport { ChartLoadingSkeleton } from './ChartLoadingSkeleton';\nimport { ChartErrorState } from './ChartErrorState';\nimport { ChartEmptyState } from './ChartEmptyState';\nimport { ChartKpiFigure } from './ChartKpiFigure';\nimport {\n buildResolvedInsertedChartDescriptor,\n resolveInsertedChartView,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport type {\n InsertedChartDeclaration,\n ResolvedInsertedChartDescriptor,\n} from '~wildo-frontend-lib/core/config/chart-view.frontend.schemas';\nimport { useResourceRegistry } from '~wildo-frontend-lib/core/resources/useResourceRegistry';\n\n// Direct ECharts binding. Replaces `echarts-for-react`, whose `'finished'`-gated\n// double-init hangs on ECharts 6.0.0 (see WildoEChart for the full analysis).\n// ECharts stays behind this file's app-level React.lazy boundary via WildoEChart's\n// static `echarts-setup` import.\nimport { WildoEChart } from './WildoEChart';\nimport { Text } from '~wildo-frontend-lib/components/typography/text';\n\nexport interface ChartViewProps {\n /** View reference — resolved from UIContext internally. */\n viewRef?: string;\n /** Pre-resolved bare chart definition. Useful for dev previews and direct renderers. */\n document?: ChartDefinition;\n /** Pre-resolved chart surface definition. When provided, `viewRef` is ignored. */\n viewDefinition?: InsertedChartDeclaration;\n /** Pre-resolved runtime descriptor for inserted or already-bound charts. */\n runtimeDescriptor?: ResolvedInsertedChartDescriptor;\n /** Explicit navigation-time or host-time context bindings. */\n contextResourceIdentifiers?: Record<string, string>;\n /** Explicit standalone-route URL param values for URL_PARAM chart bindings. */\n urlParamValues?: Record<string, string>;\n /** Explicit chart input overrides. These win over binding/default-derived values. */\n inputs?: ChartInputValues;\n /** Custom class name */\n className?: string;\n /** Width */\n width?: string | number;\n /** Height */\n height?: string | number;\n /**\n * When true, a data-fetch failure degrades LOCALLY (this chart card shows the\n * error, with retry) WITHOUT raising the global error toast. Set by EMBEDDED\n * hosts (composite tiles, detail-page charts) so one sub-surface's 403/5xx does\n * not read as a page-level failure. Standalone chart pages leave it `false` and\n * keep the global error pipeline. The error is still emitted/logged either way.\n */\n localErrorOnly?: boolean;\n}\n\n/**\n * ChartView — renders an ECharts chart from a ChartDefinition.\n *\n * Data flow:\n * 1. Resolve definition from UIContext or props\n * 2. Fetch aggregated data from backend\n * 3. Build ECharts option from definition + data\n * 4. Render with echarts-for-react\n */\nexport const ChartView: React.FC<ChartViewProps> = ({\n viewRef,\n document: documentProp,\n viewDefinition: viewDefinitionProp,\n runtimeDescriptor,\n contextResourceIdentifiers,\n urlParamValues,\n inputs,\n className = '',\n width = '100%',\n height = 400,\n localErrorOnly = false,\n}) => {\n const { registry } = useResourceRegistry();\n const { getChartStylePreset, isDark } = useUI();\n const chartStylePreset = getChartStylePreset();\n const { t, isReady, resolvedRegionalPreferences } = useI18n({ component: FrontendComponentType.HIGH_LEVEL_VIEWS_CHART });\n const resizeObserverRef = useRef<ResizeObserver | null>(null);\n const echartsRef = useRef<any>(null);\n\n // Register/update chart theme with current style preset\n useChartTheme(chartStylePreset);\n\n const resolvedInsertedChart = useMemo(\n () => (viewDefinitionProp ? undefined : resolveInsertedChartView({ viewRef, registry })),\n [viewDefinitionProp, viewRef, registry],\n );\n const viewDefinition = viewDefinitionProp ?? resolvedInsertedChart?.chartView;\n const effectiveRuntimeDescriptor = useMemo(\n () => runtimeDescriptor ?? (\n resolvedInsertedChart\n ? buildResolvedInsertedChartDescriptor({\n identity: resolvedInsertedChart.identity,\n chartView: resolvedInsertedChart.chartView,\n contextResourceIdentifiers: contextResourceIdentifiers ?? {},\n })\n : undefined\n ),\n [runtimeDescriptor, resolvedInsertedChart, contextResourceIdentifiers],\n );\n const runtime = useResolvedChartRuntimeDescriptor({\n surfaceDefinition: viewDefinition,\n chartDefinition: documentProp,\n runtimeDescriptor: effectiveRuntimeDescriptor,\n explicitContextResourceIdentifiers: contextResourceIdentifiers,\n explicitInputs: inputs,\n urlParamValues,\n });\n const definition = runtime?.chartDefinition;\n\n // Fetch chart data\n const { data, loading, error, refetch } = useChartData(\n definition,\n runtime?.executionChartRef,\n runtime?.resolvedInputs,\n runtime?.contextResourceIdentifiers,\n urlParamValues,\n localErrorOnly,\n resolvedRegionalPreferences.timezone,\n );\n\n // ResizeObserver for container.\n //\n // ECharts reflows to the container natively via `instance.resize()`; we do NOT\n // rebuild the ECharts `option` on resize. An earlier implementation pushed the\n // observed size into React state (a `containerSize` that fed `buildEChartsOption`\n // and sat in the `option` useMemo deps), so every resize tick produced a brand-new\n // option object. Combined with `notMerge`+`lazyUpdate` below, that scheduled a\n // frame-deferred atomic option replacement that raced the in-flight `resize()`\n // relayout — surfacing as `Cannot read properties of undefined (reading 'group')`\n // in ECharts' `CartesianAxisView.render` one frame late, plus the tell-tale\n // \"ResizeObserver loop completed with undelivered notifications\" (the observer\n // callback's state update re-triggered layout). `containerSize` was in any case\n // dead context — no chart-type builder reads it — so dropping the rebuild is\n // behaviour-preserving. Native resize is the whole job here.\n // The observer must arm when the REAL container mounts, which happens strictly\n // AFTER the loading/error/empty early returns below stop short-circuiting —\n // i.e. potentially many renders after the initial mount. A mount-time\n // `useEffect(…, [])` reading a plain ref (the previous implementation) ran\n // exactly once, while the container was still null (the first render always\n // takes the loading/skeleton branch), so the observer NEVER armed and charts\n // never reflowed to container resizes. A callback ref is the structural fix:\n // React invokes it at the moment the container node attaches (and with `null`\n // when it detaches, including unmount), so arming/disarming exactly tracks the\n // real DOM node regardless of which render branch produced it.\n const containerRefCallback = useCallback((el: HTMLDivElement | null) => {\n resizeObserverRef.current?.disconnect();\n resizeObserverRef.current = null;\n if (!el) return;\n\n const observer = new ResizeObserver(() => {\n const instance = echartsRef.current?.getEchartsInstance?.();\n // Guard against a disposed instance: on theme toggle the chart remounts\n // (see the `key` prop below) and the observer closure can fire against an\n // instance that ECharts has already torn down — `resize()` would throw.\n if (instance && !instance.isDisposed?.()) {\n instance.resize();\n }\n });\n\n observer.observe(el);\n resizeObserverRef.current = observer;\n }, []);\n\n // Save echarts instance ref\n const onChartReady = useCallback((instance: unknown) => {\n echartsRef.current = { getEchartsInstance: () => instance };\n }, []);\n\n // Build ECharts option — memoized, placed before early returns to respect Rules of Hooks.\n // Deliberately NOT keyed on container size: the option carries no size-dependent\n // fields (no builder reads `containerSize`), and rebuilding it on resize is what\n // raced the native `resize()` into the `CartesianAxisView` crash (see the observer\n // above). The option now rebuilds only on genuine content/appearance changes.\n // Enum coherence: when a chart dimension is an enum, resolve — once, from the\n // resource registry's decorated schema — both the value→color map (slices/bars\n // match the value's badge) and the enum's declared member order (categories sort\n // by declaration order, not the backend's alphabetical order). Keyed on `isDark`\n // because the colors resolve live CSS vars (`--info`, `--muted-foreground`, …)\n // that flip with the theme; ChartView does not remount on toggle (only its child\n // chart does), so without this the memo would keep the previous mode's colors.\n // See `enum-color-bridge.ts`.\n //\n // Labels ride the same pass: an enum dimension's values are DISPLAYED through the i18n tree (axis\n // categories, slice and split names) while the data stays keyed on the raw value. The resource's\n // label bundle is requested here so its enum labels are loaded before the chart renders.\n const { tResourceFieldEnumValue, isReady: isResourceLabelsReady } = useI18n({ resource: definition?.dataQuery.mainResourceType });\n const dimensionEnumMeta = useMemo(\n () => (definition\n ? buildDimensionEnumMeta(definition, (type) => registry.resourceConfigurations[type], tResourceFieldEnumValue)\n : { colors: {}, order: {}, labels: {} }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [definition, registry, isDark, tResourceFieldEnumValue, isResourceLabelsReady],\n );\n\n // A KPI is a figure, not a drawing (#2299): it builds no ECharts option and renders `ChartKpiFigure` below.\n const isKpi = definition?.chartType === ChartType.KPI;\n const option = useMemo(\n () => (definition && !isKpi && data && data.data.length > 0)\n ? buildEChartsOption(definition, data, undefined, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale)\n : null,\n [definition, isKpi, data, chartStylePreset, t, dimensionEnumMeta, resolvedRegionalPreferences.locale],\n );\n\n // Not found\n if (!definition) {\n return <ViewNotFound viewKind=\"chart\" viewRef={viewRef} />;\n }\n\n // Loading\n if (loading && !data) {\n return <ChartLoadingSkeleton height={height} />;\n }\n\n // Error\n if (error) {\n return <ChartErrorState error={error} onRetry={refetch} />;\n }\n\n // A figure: one row, always, from a backend that completes an empty scope; no row only from one that does not.\n if (isKpi) {\n return data && data.data.length > 0\n ? <ChartKpiFigure definition={definition} data={data} className={className} />\n : <ChartEmptyState />;\n }\n\n // Empty\n if (!option) {\n return <ChartEmptyState />;\n }\n\n if (!isReady || !isResourceLabelsReady) return null;\n\n // #4084: groups of a resource declaring `auditReads` too small to show carry no figures, and are drawn as no value\n // (`measureValueOrNull`). The line says so, so a missing slice or bar is not read as an empty group.\n const suppressedGroupCount = data?.queryMeta?.suppressedGroupCount ?? 0;\n\n return (\n <div\n ref={containerRefCallback}\n className={cn('chart-view', className)}\n style={{ width, height, position: 'relative', display: 'flex', flexDirection: 'column' }}\n >\n <div style={{ flex: 1, minHeight: 0 }}>\n <WildoEChart\n // Remount on dark-mode toggle: the theme name is stable but its content\n // is re-registered, and ECharts bakes the theme at init time.\n key={isDark ? 'dark' : 'light'}\n option={option}\n theme={getWildoThemeName()}\n style={{ width: '100%', height: '100%' }}\n notMerge={true}\n // lazyUpdate MUST stay false. With lazyUpdate={true}, ECharts 6 defers\n // the setOption flush to its next animation frame (`_onframe`); ECharts\n // 6.0.0 then crashes on that deferred path for cartesian charts —\n // `CartesianAxisView.render` dereferences `axisModel.axis.axisBuilder\n // .group` while `axisBuilder` is still undefined (ECharts 6 \"promoted\"\n // axis-element building to the coordinate-system resize stage, but the\n // deferred-flush ordering skips it). Symptom: `TypeError: Cannot read\n // properties of undefined (reading 'group')`. A synchronous flush runs\n // the full resize→render pipeline in order and renders cleanly with\n // animation intact.\n lazyUpdate={false}\n onChartReady={onChartReady}\n />\n </div>\n {suppressedGroupCount > 0 && (\n <Text className=\"text-xs text-muted-foreground\">{t('suppressedGroupsNotice', { count: suppressedGroupCount })}</Text>\n )}\n </div>\n );\n};\n\nexport default ChartView;\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChartView.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAM7C,eAAO,MAAM,yBAAyB,EAAE,mBAAmB,EA6B1D,CAAC"}
1
+ {"version":3,"file":"ChartView.labels.d.ts","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,mBAAmB,EAEzB,MAAM,qCAAqC,CAAC;AAM7C,eAAO,MAAM,yBAAyB,EAAE,mBAAmB,EAoC1D,CAAC"}
@@ -16,6 +16,13 @@ export const HighLevelViewsChartLabels = [
16
16
  { ref: 'errorLoading', kind: LabelKind.MESSAGE, purpose: 'Error-state text shown when the chart fails to load its data' },
17
17
  { ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Loading-state text shown while the chart data is being fetched' },
18
18
  { ref: 'retry', kind: LabelKind.BUTTON, purpose: 'Button that re-attempts the chart data fetch after a load error' },
19
+ {
20
+ ref: 'suppressedGroupsNotice',
21
+ kind: LabelKind.MESSAGE,
22
+ purpose: 'Line under a chart saying that some of its groups hold too few records to show their figures, so they are drawn with no value (a privacy protection on data whose reads are audited)',
23
+ params: [{ key: 'count', meaning: 'How many groups had their figures withheld', isCount: true }],
24
+ notes: ['Say the figures are withheld because the groups are too small, not that data is missing or an error occurred.'],
25
+ },
19
26
  // Waterfall chart series labels
20
27
  { ref: 'waterfallGainLabel', kind: LabelKind.LABEL, purpose: 'Default series name for positive (gain) bars in a waterfall chart', notes: ['Default: "Increase"'] },
21
28
  { ref: 'waterfallLossLabel', kind: LabelKind.LABEL, purpose: 'Default series name for negative (loss) bars in a waterfall chart', notes: ['Default: "Decrease"'] },
@@ -1 +1 @@
1
- {"version":3,"file":"ChartView.labels.js","sourceRoot":"","sources":["../../../../../src/components/views/chart-view/ChartView.labels.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,SAAS,EAET,uBAAuB,GACxB,MAAM,qCAAqC,CAAC;AAE7C,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAE/E,MA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IACnC,EAAE,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,yDAAyD,EAAE;IACzH,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,mDAAmD,EAAE;IAChH,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,mEAAmE,EAAE;IAC/H,cAAc;IACd,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,0DAA0D,EAAE;IACjH,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,0DAA0D,EAAE;IACjH,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,6DAA6D,EAAE;CAC9H,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import {\n FrontendComponentType,\n LabelKind,\n type LabellingUnitaryDef,\n registerComponentLabels,\n} from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const HighLevelViewsChartLabels: LabellingUnitaryDef[] = [\n { ref: 'noData', kind: LabelKind.EMPTY_STATE, purpose: 'Empty-state heading shown when the chart query returns no data' },\n {\n ref: 'noDataDescription',\n kind: LabelKind.EMPTY_STATE,\n purpose: 'Empty-state supporting text shown when the chart query returns no data',\n // Steer the label generator away from filter-referencing copy: this state renders on\n // ANY chart surface, including dashboards and embedded metric cards that expose no\n // filter UI at all — \"Try adjusting your filters.\" (a previous generation) misleads there.\n notes: ['Must not reference filters or other UI the chart may not have. Neutral phrasing, e.g. \"Data will appear here once there is activity to chart.\"'],\n },\n { ref: 'errorLoading', kind: LabelKind.MESSAGE, purpose: 'Error-state text shown when the chart fails to load its data' },\n { ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Loading-state text shown while the chart data is being fetched' },\n { ref: 'retry', kind: LabelKind.BUTTON, purpose: 'Button that re-attempts the chart data fetch after a load error' },\n // Waterfall chart series labels\n { ref: 'waterfallGainLabel', kind: LabelKind.LABEL, purpose: 'Default series name for positive (gain) bars in a waterfall chart', notes: ['Default: \"Increase\"'] },\n { ref: 'waterfallLossLabel', kind: LabelKind.LABEL, purpose: 'Default series name for negative (loss) bars in a waterfall chart', notes: ['Default: \"Decrease\"'] },\n // Densified overlay series labels\n { ref: 'densifiedOverlaySuffix', kind: LabelKind.LABEL, purpose: 'Suffix appended to a series name when it is rendered as a densified (gap-filled) overlay', notes: ['Default: \"(filled)\"'] },\n // Pie chart labels\n { ref: 'pieItemFallback', kind: LabelKind.LABEL, purpose: 'Fallback display name used for pie-chart slices that have no name', notes: ['Default: \"Item\"'] },\n // Toolbox (ECharts toolbar) labels\n { ref: 'toolboxSaveAsImage', kind: LabelKind.BUTTON, purpose: 'Chart toolbox action that exports the chart as an image' },\n { ref: 'toolboxDataView', kind: LabelKind.BUTTON, purpose: 'Chart toolbox action that opens the raw data view' },\n { ref: 'toolboxRestore', kind: LabelKind.BUTTON, purpose: 'Chart toolbox action that restores the chart to its initial state' },\n // Axis labels\n { ref: 'xAxisLabel', kind: LabelKind.LABEL, purpose: 'Default title for the chart X axis when none is authored' },\n { ref: 'yAxisLabel', kind: LabelKind.LABEL, purpose: 'Default title for the chart Y axis when none is authored' },\n { ref: 'yAxisSecondaryLabel', kind: LabelKind.LABEL, purpose: 'Default title for the secondary Y axis on a dual-axis chart' },\n];\nregisterComponentLabels(FrontendComponentType.HIGH_LEVEL_VIEWS_CHART, HighLevelViewsChartLabels);\n"]}
1
+ {"version":3,"file":"ChartView.labels.js","sourceRoot":"","sources":["../../../../../src/components/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EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,mEAAmE,EAAE,KAAK,EAAE,CAAC,qBAAqB,CAAC,EAAE;IAClK,kCAAkC;IAClC,EAAE,GAAG,EAAE,wBAAwB,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,0FAA0F,EAAE,KAAK,EAAE,CAAC,qBAAqB,CAAC,EAAE;IAC7L,mBAAmB;IACnB,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,mEAAmE,EAAE,KAAK,EAAE,CAAC,iBAAiB,CAAC,EAAE;IAC3J,mCAAmC;IACnC,EAAE,GAAG,EAAE,oBAAoB,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,yDAAyD,EAAE;IACzH,EAAE,GAAG,EAAE,iBAAiB,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,mDAAmD,EAAE;IAChH,EAAE,GAAG,EAAE,gBAAgB,EAAE,IAAI,EAAE,SAAS,CAAC,MAAM,EAAE,OAAO,EAAE,mEAAmE,EAAE;IAC/H,cAAc;IACd,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,0DAA0D,EAAE;IACjH,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,0DAA0D,EAAE;IACjH,EAAE,GAAG,EAAE,qBAAqB,EAAE,IAAI,EAAE,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,6DAA6D,EAAE;CAC9H,CAAC;AACF,uBAAuB,CAAC,qBAAqB,CAAC,sBAAsB,EAAE,yBAAyB,CAAC,CAAC","sourcesContent":["import {\n FrontendComponentType,\n LabelKind,\n type LabellingUnitaryDef,\n registerComponentLabels,\n} from '@wildo-ai/presets-components-models';\n\n// Companion-only label metadata for this component: keys + params + (where\n// authored) per-key purpose / kind / variable meaning. Statically scanned by\n// the dev companion; NOT imported at runtime, so it never ships in the bundle.\n\nexport const HighLevelViewsChartLabels: LabellingUnitaryDef[] = [\n { ref: 'noData', kind: LabelKind.EMPTY_STATE, purpose: 'Empty-state heading shown when the chart query returns no data' },\n {\n ref: 'noDataDescription',\n kind: LabelKind.EMPTY_STATE,\n purpose: 'Empty-state supporting text shown when the chart query returns no data',\n // Steer the label generator away from filter-referencing copy: this state renders on\n // ANY chart surface, including dashboards and embedded metric cards that expose no\n // filter UI at all — \"Try adjusting your filters.\" (a previous generation) misleads there.\n notes: ['Must not reference filters or other UI the chart may not have. Neutral phrasing, e.g. \"Data will appear here once there is activity to chart.\"'],\n },\n { ref: 'errorLoading', kind: LabelKind.MESSAGE, purpose: 'Error-state text shown when the chart fails to load its data' },\n { ref: 'loading', kind: LabelKind.MESSAGE, purpose: 'Loading-state text shown while the chart data is being fetched' },\n { ref: 'retry', kind: LabelKind.BUTTON, purpose: 'Button that re-attempts the chart data fetch after a load error' },\n {\n ref: 'suppressedGroupsNotice',\n kind: LabelKind.MESSAGE,\n purpose: 'Line under a chart saying that some of its groups hold too few records to show their figures, so they are drawn with no value (a privacy protection on data whose reads are audited)',\n params: [{ key: 'count', meaning: 'How many groups had their figures withheld', isCount: true }],\n notes: ['Say the figures are withheld because the groups are too small, not that data is missing or an error occurred.'],\n },\n // Waterfall chart series labels\n { ref: 'waterfallGainLabel', kind: LabelKind.LABEL, purpose: 'Default series name for positive (gain) bars in a waterfall chart', notes: ['Default: \"Increase\"'] },\n { ref: 'waterfallLossLabel', kind: LabelKind.LABEL, purpose: 'Default series name for negative (loss) bars in a waterfall chart', notes: ['Default: \"Decrease\"'] },\n // Densified overlay series labels\n { ref: 'densifiedOverlaySuffix', kind: LabelKind.LABEL, purpose: 'Suffix appended to a series name when it is rendered as a densified (gap-filled) overlay', notes: ['Default: \"(filled)\"'] },\n // Pie chart labels\n { ref: 'pieItemFallback', kind: LabelKind.LABEL, purpose: 'Fallback display name used for pie-chart slices that have no name', notes: ['Default: \"Item\"'] },\n // Toolbox (ECharts toolbar) labels\n { ref: 'toolboxSaveAsImage', kind: LabelKind.BUTTON, purpose: 'Chart toolbox action that exports the chart as an image' },\n { ref: 'toolboxDataView', kind: LabelKind.BUTTON, purpose: 'Chart toolbox action that opens the raw data view' },\n { ref: 'toolboxRestore', kind: LabelKind.BUTTON, purpose: 'Chart toolbox action that restores the chart to its initial state' },\n // Axis labels\n { ref: 'xAxisLabel', kind: LabelKind.LABEL, purpose: 'Default title for the chart X axis when none is authored' },\n { ref: 'yAxisLabel', kind: LabelKind.LABEL, purpose: 'Default title for the chart Y axis when none is authored' },\n { ref: 'yAxisSecondaryLabel', kind: LabelKind.LABEL, purpose: 'Default title for the secondary Y axis on a dual-axis chart' },\n];\nregisterComponentLabels(FrontendComponentType.HIGH_LEVEL_VIEWS_CHART, HighLevelViewsChartLabels);\n"]}
@@ -15,11 +15,20 @@ export declare function extractDimensionValues(data: AggregationQueryResponseRow
15
15
  * Measure values for an axis-based series (bar/line/composed), preserving MISSING
16
16
  * values as `null` rather than collapsing them to `0`. A genuinely-absent measure
17
17
  * cell renders as a line gap / no bar; a real `0` renders as a zero-height bar —
18
- * coercing both to `0` masked backend gaps as if the value were truly zero. Only
19
- * used by axis families (ECharts accepts `null` there); proportional charts
20
- * (pie/gauge/…) keep their own numeric coercion.
18
+ * coercing both to `0` masked backend gaps as if the value were truly zero.
21
19
  */
22
20
  export declare function extractMeasureValues(data: AggregationQueryResponseRow[], measureRef: string): (number | null)[];
21
+ /**
22
+ * One measure cell as a number, or `null` when it holds no value (absent, `null`, not a number). EVERY chart family
23
+ * reads its figures through this, so a missing figure is never drawn as `0`: an axis series leaves a gap, a
24
+ * proportional chart (pie, funnel, treemap, sankey) leaves the item out, a heatmap leaves the cell empty, a gauge shows
25
+ * no value.
26
+ *
27
+ * A `null` is the backend's answer for a figure it does not give: an aggregate over no value, and a group of a resource
28
+ * declaring `auditReads` too small to show (#4084, counted in `queryMeta.suppressedGroupCount`). Drawing it as `0`
29
+ * claimed the group was empty when it held records (#4084 review A6).
30
+ */
31
+ export declare function measureValueOrNull(value: unknown): number | null;
23
32
  /** Resolve series color: explicit style → palette index */
24
33
  export declare function resolveSeriesColor(series: ChartSeriesDefinition, index: number, palette: string[]): string;
25
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/views/chart-view/option-builder/builder-utils.ts"],"names":[],"mappings":"AAAA;;oEAEoE;AAEpE,OAAO,EAAqB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AAI7G,4DAA4D;AAC5D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAErE;AAED,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,2BAA2B,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,EAAE,CAE3G;AAED,gDAAgD;AAChD;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,2BAA2B,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAS/G;AAID,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,CAER;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,2BAA2B,E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,EAAE,OAAO,EACzB,2BAA2B,GAAE,OAAe,GAC3C,OAAO,EAAE,CAkCX;AAID,uDAAuD;AACvD,wBAAgB,gBAAgB,CAC9B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1C,SAAS,EAAE,qBAAqB,GAC/B,IAAI,CAyFN"}
1
+ {"version":3,"file":"builder-utils.d.ts","sourceRoot":"","sources":["../../../../../../src/components/views/chart-view/option-builder/builder-utils.ts"],"names":[],"mappings":"AAAA;;oEAEoE;AAEpE,OAAO,EAAqB,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,KAAK,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,uBAAuB,CAAC;AAChG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mEAAmE,CAAC;AAI7G,4DAA4D;AAC5D,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,iBAAiB,GAAG,MAAM,CAErE;AAED,sEAAsE;AACtE,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,2BAA2B,EAAE,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,EAAE,CAE3G;AAED,gDAAgD;AAChD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,2BAA2B,EAAE,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAE/G;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAIhE;AAID,2DAA2D;AAC3D,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,qBAAqB,EAC7B,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,MAAM,EAAE,GAChB,MAAM,C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;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,gBAAgB,GAAG,SAAS,EACpC,gBAAgB,EAAE,OAAO,EACzB,2BAA2B,GAAE,OAAe,GAC3C,OAAO,EAAE,CAkCX;AAID,uDAAuD;AACvD,wBAAgB,gBAAgB,CAC9B,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC1C,SAAS,EAAE,qBAAqB,GAC/B,IAAI,CAyFN"}
@@ -16,19 +16,26 @@ export function extractDimensionValues(data, dimensionRef) {
16
16
  * Measure values for an axis-based series (bar/line/composed), preserving MISSING
17
17
  * values as `null` rather than collapsing them to `0`. A genuinely-absent measure
18
18
  * cell renders as a line gap / no bar; a real `0` renders as a zero-height bar —
19
- * coercing both to `0` masked backend gaps as if the value were truly zero. Only
20
- * used by axis families (ECharts accepts `null` there); proportional charts
21
- * (pie/gauge/…) keep their own numeric coercion.
19
+ * coercing both to `0` masked backend gaps as if the value were truly zero.
22
20
  */
23
21
  export function extractMeasureValues(data, measureRef) {
24
- return data.map(row => {
25
- const val = row[measureRef];
26
- if (val == null) {
27
- return null;
28
- }
29
- const num = typeof val === 'number' ? val : Number(val);
30
- return Number.isFinite(num) ? num : null;
31
- });
22
+ return data.map(row => measureValueOrNull(row[measureRef]));
23
+ }
24
+ /**
25
+ * One measure cell as a number, or `null` when it holds no value (absent, `null`, not a number). EVERY chart family
26
+ * reads its figures through this, so a missing figure is never drawn as `0`: an axis series leaves a gap, a
27
+ * proportional chart (pie, funnel, treemap, sankey) leaves the item out, a heatmap leaves the cell empty, a gauge shows
28
+ * no value.
29
+ *
30
+ * A `null` is the backend's answer for a figure it does not give: an aggregate over no value, and a group of a resource
31
+ * declaring `auditReads` too small to show (#4084, counted in `queryMeta.suppressedGroupCount`). Drawing it as `0`
32
+ * claimed the group was empty when it held records (#4084 review A6).
33
+ */
34
+ export function measureValueOrNull(value) {
35
+ if (value == null)
36
+ return null;
37
+ const num = typeof value === 'number' ? value : Number(value);
38
+ return Number.isFinite(num) ? num : null;
32
39
  }
33
40
  // ── Color Resolution ─────────────────────────────────────────
34
41
  /** Resolve series color: explicit style → palette index */