@opensip-cli/dashboard 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/__tests__/catalog-provenance.test.js +6 -24
- package/dist/__tests__/catalog-provenance.test.js.map +1 -1
- package/dist/__tests__/coupling-attribution.test.js +10 -14
- package/dist/__tests__/coupling-attribution.test.js.map +1 -1
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts +9 -2
- package/dist/__tests__/dashboard-bundle-weight.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-bundle-weight.test.js +19 -12
- package/dist/__tests__/dashboard-bundle-weight.test.js.map +1 -1
- package/dist/__tests__/dashboard-cell-containment.test.js +5 -2
- package/dist/__tests__/dashboard-cell-containment.test.js.map +1 -1
- package/dist/__tests__/dashboard-editor-link.test.d.ts +9 -0
- package/dist/__tests__/dashboard-editor-link.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-editor-link.test.js +72 -21
- package/dist/__tests__/dashboard-editor-link.test.js.map +1 -1
- package/dist/__tests__/dashboard-filters.test.js +6 -14
- package/dist/__tests__/dashboard-filters.test.js.map +1 -1
- package/dist/__tests__/dashboard-function-card-singleton.test.js +15 -27
- package/dist/__tests__/dashboard-function-card-singleton.test.js.map +1 -1
- package/dist/__tests__/dashboard-function-card.test.d.ts +4 -4
- package/dist/__tests__/dashboard-function-card.test.js +23 -44
- package/dist/__tests__/dashboard-function-card.test.js.map +1 -1
- package/dist/__tests__/dashboard-function-row.test.js +6 -16
- package/dist/__tests__/dashboard-function-row.test.js.map +1 -1
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js +3 -1
- package/dist/__tests__/dashboard-generator-graph-catalog.test.js.map +1 -1
- package/dist/__tests__/dashboard-graph-offline.integration.test.js +3 -1
- package/dist/__tests__/dashboard-graph-offline.integration.test.js.map +1 -1
- package/dist/__tests__/dashboard-help-drawer.test.js +11 -17
- package/dist/__tests__/dashboard-help-drawer.test.js.map +1 -1
- package/dist/__tests__/dashboard-indexes.test.d.ts +6 -4
- package/dist/__tests__/dashboard-indexes.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-indexes.test.js +10 -7
- package/dist/__tests__/dashboard-indexes.test.js.map +1 -1
- package/dist/__tests__/dashboard-path-utils.test.d.ts +7 -0
- package/dist/__tests__/dashboard-path-utils.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-path-utils.test.js +11 -3
- package/dist/__tests__/dashboard-path-utils.test.js.map +1 -1
- package/dist/__tests__/dashboard-search.test.d.ts +5 -0
- package/dist/__tests__/dashboard-search.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-search.test.js +9 -3
- package/dist/__tests__/dashboard-search.test.js.map +1 -1
- package/dist/__tests__/dashboard-sessions.test.js +13 -11
- package/dist/__tests__/dashboard-sessions.test.js.map +1 -1
- package/dist/__tests__/dashboard-trace.test.d.ts +11 -0
- package/dist/__tests__/dashboard-trace.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-trace.test.js +55 -32
- package/dist/__tests__/dashboard-trace.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-conformance.test.js +9 -15
- package/dist/__tests__/dashboard-view-conformance.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-coupling.test.js +14 -35
- package/dist/__tests__/dashboard-view-coupling.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-distribution.test.js +14 -37
- package/dist/__tests__/dashboard-view-distribution.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-graph.test.js +29 -62
- package/dist/__tests__/dashboard-view-graph.test.js.map +1 -1
- package/dist/__tests__/dashboard-view-template.test.d.ts +13 -14
- package/dist/__tests__/dashboard-view-template.test.d.ts.map +1 -1
- package/dist/__tests__/dashboard-view-template.test.js +165 -112
- package/dist/__tests__/dashboard-view-template.test.js.map +1 -1
- package/dist/__tests__/graph-tab.test.js +4 -2
- package/dist/__tests__/graph-tab.test.js.map +1 -1
- package/dist/client-bundle.generated.d.ts +2 -0
- package/dist/client-bundle.generated.d.ts.map +1 -0
- package/dist/client-bundle.generated.js +3 -0
- package/dist/client-bundle.generated.js.map +1 -0
- package/dist/code-paths/__tests__/views-registry.test.d.ts +13 -8
- package/dist/code-paths/__tests__/views-registry.test.d.ts.map +1 -1
- package/dist/code-paths/__tests__/views-registry.test.js +27 -25
- package/dist/code-paths/__tests__/views-registry.test.js.map +1 -1
- package/dist/code-paths.d.ts +21 -62
- package/dist/code-paths.d.ts.map +1 -1
- package/dist/code-paths.js +24 -349
- package/dist/code-paths.js.map +1 -1
- package/dist/generator.d.ts +2 -0
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +28 -17
- package/dist/generator.js.map +1 -1
- package/package.json +5 -4
- package/dist/checks.d.ts +0 -7
- package/dist/checks.d.ts.map +0 -1
- package/dist/checks.js +0 -283
- package/dist/checks.js.map +0 -1
- package/dist/code-paths/catalog-provenance.d.ts +0 -22
- package/dist/code-paths/catalog-provenance.d.ts.map +0 -1
- package/dist/code-paths/catalog-provenance.js +0 -108
- package/dist/code-paths/catalog-provenance.js.map +0 -1
- package/dist/code-paths/catalog-recipes-tables.d.ts +0 -11
- package/dist/code-paths/catalog-recipes-tables.d.ts.map +0 -1
- package/dist/code-paths/catalog-recipes-tables.js +0 -86
- package/dist/code-paths/catalog-recipes-tables.js.map +0 -1
- package/dist/code-paths/editor-link.d.ts +0 -10
- package/dist/code-paths/editor-link.d.ts.map +0 -1
- package/dist/code-paths/editor-link.js +0 -20
- package/dist/code-paths/editor-link.js.map +0 -1
- package/dist/code-paths/filters.d.ts +0 -19
- package/dist/code-paths/filters.d.ts.map +0 -1
- package/dist/code-paths/filters.js +0 -47
- package/dist/code-paths/filters.js.map +0 -1
- package/dist/code-paths/function-card.d.ts +0 -15
- package/dist/code-paths/function-card.d.ts.map +0 -1
- package/dist/code-paths/function-card.js +0 -169
- package/dist/code-paths/function-card.js.map +0 -1
- package/dist/code-paths/function-row.d.ts +0 -17
- package/dist/code-paths/function-row.d.ts.map +0 -1
- package/dist/code-paths/function-row.js +0 -77
- package/dist/code-paths/function-row.js.map +0 -1
- package/dist/code-paths/graph-controls.d.ts +0 -27
- package/dist/code-paths/graph-controls.d.ts.map +0 -1
- package/dist/code-paths/graph-controls.js +0 -257
- package/dist/code-paths/graph-controls.js.map +0 -1
- package/dist/code-paths/graph-stylesheet.d.ts +0 -22
- package/dist/code-paths/graph-stylesheet.d.ts.map +0 -1
- package/dist/code-paths/graph-stylesheet.js +0 -121
- package/dist/code-paths/graph-stylesheet.js.map +0 -1
- package/dist/code-paths/help-drawer.d.ts +0 -18
- package/dist/code-paths/help-drawer.d.ts.map +0 -1
- package/dist/code-paths/help-drawer.js +0 -54
- package/dist/code-paths/help-drawer.js.map +0 -1
- package/dist/code-paths/indexes.d.ts +0 -28
- package/dist/code-paths/indexes.d.ts.map +0 -1
- package/dist/code-paths/indexes.js +0 -97
- package/dist/code-paths/indexes.js.map +0 -1
- package/dist/code-paths/path-utils.d.ts +0 -15
- package/dist/code-paths/path-utils.d.ts.map +0 -1
- package/dist/code-paths/path-utils.js +0 -47
- package/dist/code-paths/path-utils.js.map +0 -1
- package/dist/code-paths/search.d.ts +0 -14
- package/dist/code-paths/search.d.ts.map +0 -1
- package/dist/code-paths/search.js +0 -54
- package/dist/code-paths/search.js.map +0 -1
- package/dist/code-paths/trace.d.ts +0 -11
- package/dist/code-paths/trace.d.ts.map +0 -1
- package/dist/code-paths/trace.js +0 -60
- package/dist/code-paths/trace.js.map +0 -1
- package/dist/code-paths/view-coupling.d.ts +0 -22
- package/dist/code-paths/view-coupling.d.ts.map +0 -1
- package/dist/code-paths/view-coupling.js +0 -218
- package/dist/code-paths/view-coupling.js.map +0 -1
- package/dist/code-paths/view-distribution.d.ts +0 -20
- package/dist/code-paths/view-distribution.d.ts.map +0 -1
- package/dist/code-paths/view-distribution.js +0 -82
- package/dist/code-paths/view-distribution.js.map +0 -1
- package/dist/code-paths/view-graph.d.ts +0 -35
- package/dist/code-paths/view-graph.d.ts.map +0 -1
- package/dist/code-paths/view-graph.js +0 -379
- package/dist/code-paths/view-graph.js.map +0 -1
- package/dist/code-paths/view-template.d.ts +0 -154
- package/dist/code-paths/view-template.d.ts.map +0 -1
- package/dist/code-paths/view-template.js +0 -218
- package/dist/code-paths/view-template.js.map +0 -1
- package/dist/code-paths/views-registry.d.ts +0 -13
- package/dist/code-paths/views-registry.d.ts.map +0 -1
- package/dist/code-paths/views-registry.js +0 -53
- package/dist/code-paths/views-registry.js.map +0 -1
- package/dist/overview.d.ts +0 -13
- package/dist/overview.d.ts.map +0 -1
- package/dist/overview.js +0 -91
- package/dist/overview.js.map +0 -1
- package/dist/recipes.d.ts +0 -6
- package/dist/recipes.d.ts.map +0 -1
- package/dist/recipes.js +0 -68
- package/dist/recipes.js.map +0 -1
- package/dist/sessions.d.ts +0 -6
- package/dist/sessions.d.ts.map +0 -1
- package/dist/sessions.js +0 -288
- package/dist/sessions.js.map +0 -1
- package/dist/shared/el.d.ts +0 -13
- package/dist/shared/el.d.ts.map +0 -1
- package/dist/shared/el.js +0 -27
- package/dist/shared/el.js.map +0 -1
- package/dist/shared/pagination.d.ts +0 -15
- package/dist/shared/pagination.d.ts.map +0 -1
- package/dist/shared/pagination.js +0 -113
- package/dist/shared/pagination.js.map +0 -1
- package/dist/shared/sortable.d.ts +0 -14
- package/dist/shared/sortable.d.ts.map +0 -1
- package/dist/shared/sortable.js +0 -101
- package/dist/shared/sortable.js.map +0 -1
- package/dist/shared/tab-activators.d.ts +0 -16
- package/dist/shared/tab-activators.d.ts.map +0 -1
- package/dist/shared/tab-activators.js +0 -33
- package/dist/shared/tab-activators.js.map +0 -1
- package/dist/shared/tab-bar.d.ts +0 -8
- package/dist/shared/tab-bar.d.ts.map +0 -1
- package/dist/shared/tab-bar.js +0 -20
- package/dist/shared/tab-bar.js.map +0 -1
- package/dist/shared.d.ts +0 -26
- package/dist/shared.d.ts.map +0 -1
- package/dist/shared.js +0 -39
- package/dist/shared.js.map +0 -1
- package/dist/subtab-bar.d.ts +0 -23
- package/dist/subtab-bar.d.ts.map +0 -1
- package/dist/subtab-bar.js +0 -77
- package/dist/subtab-bar.js.map +0 -1
- package/dist/tool-tabs.d.ts +0 -12
- package/dist/tool-tabs.d.ts.map +0 -1
- package/dist/tool-tabs.js +0 -80
- package/dist/tool-tabs.js.map +0 -1
package/dist/shared/tab-bar.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Top-level tab-bar click handler.
|
|
3
|
-
*
|
|
4
|
-
* Wires the `#tab-bar` click event to toggle the `active` class on
|
|
5
|
-
* both the `.tab` headers and the `.tab-panel` containers.
|
|
6
|
-
*/
|
|
7
|
-
export declare function dashboardTabBarJs(): string;
|
|
8
|
-
//# sourceMappingURL=tab-bar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar.d.ts","sourceRoot":"","sources":["../../src/shared/tab-bar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAY1C"}
|
package/dist/shared/tab-bar.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Top-level tab-bar click handler.
|
|
3
|
-
*
|
|
4
|
-
* Wires the `#tab-bar` click event to toggle the `active` class on
|
|
5
|
-
* both the `.tab` headers and the `.tab-panel` containers.
|
|
6
|
-
*/
|
|
7
|
-
export function dashboardTabBarJs() {
|
|
8
|
-
return String.raw `
|
|
9
|
-
// Tab switching
|
|
10
|
-
document.getElementById('tab-bar').addEventListener('click', e => {
|
|
11
|
-
const tab = e.target.closest('.tab');
|
|
12
|
-
if (!tab) return;
|
|
13
|
-
document.querySelectorAll('.tab').forEach(t => t.classList.remove('active'));
|
|
14
|
-
document.querySelectorAll('.tab-panel').forEach(p => p.classList.remove('active'));
|
|
15
|
-
tab.classList.add('active');
|
|
16
|
-
document.getElementById('panel-' + tab.dataset.tab).classList.add('active');
|
|
17
|
-
});
|
|
18
|
-
`;
|
|
19
|
-
}
|
|
20
|
-
//# sourceMappingURL=tab-bar.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tab-bar.js","sourceRoot":"","sources":["../../src/shared/tab-bar.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;CAUlB,CAAC;AACF,CAAC"}
|
package/dist/shared.d.ts
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared dashboard JS — concatenates the per-concern emitters in
|
|
3
|
-
* `shared/`.
|
|
4
|
-
*
|
|
5
|
-
* Pre-F9 this was a 237-line `String.raw` blob covering five
|
|
6
|
-
* concerns. Each concern now lives in its own file and is composed
|
|
7
|
-
* here in the order downstream emitters depend on:
|
|
8
|
-
*
|
|
9
|
-
* 1. tab-bar — top-level tab switching
|
|
10
|
-
* 2. tab-activators — cross-tab session-aware navigation registry
|
|
11
|
-
* 3. el — `el(tag, attrs, children)` DOM helper used by
|
|
12
|
-
* every subsequent emitter
|
|
13
|
-
* 4. pagination — `paginateTable` / `paginateGroupedRows` /
|
|
14
|
-
* `renderPageButtons`
|
|
15
|
-
* 5. sortable — `makeSortable` plus the global setTimeout(0)
|
|
16
|
-
* scan that activates `.data-table.sortable`
|
|
17
|
-
*
|
|
18
|
-
* Any change to the order should be considered carefully — the
|
|
19
|
-
* pagination helpers reference `el`, the sortable helper references
|
|
20
|
-
* the pagination helpers, and the global activation pass at the end
|
|
21
|
-
* fires after every preceding emitter has declared its top-level
|
|
22
|
-
* names. New shared concerns should pick a slot rather than be
|
|
23
|
-
* appended blindly.
|
|
24
|
-
*/
|
|
25
|
-
export declare function dashboardSharedJs(): string;
|
|
26
|
-
//# sourceMappingURL=shared.d.ts.map
|
package/dist/shared.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,wBAAgB,iBAAiB,IAAI,MAAM,CAQ1C"}
|
package/dist/shared.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared dashboard JS — concatenates the per-concern emitters in
|
|
3
|
-
* `shared/`.
|
|
4
|
-
*
|
|
5
|
-
* Pre-F9 this was a 237-line `String.raw` blob covering five
|
|
6
|
-
* concerns. Each concern now lives in its own file and is composed
|
|
7
|
-
* here in the order downstream emitters depend on:
|
|
8
|
-
*
|
|
9
|
-
* 1. tab-bar — top-level tab switching
|
|
10
|
-
* 2. tab-activators — cross-tab session-aware navigation registry
|
|
11
|
-
* 3. el — `el(tag, attrs, children)` DOM helper used by
|
|
12
|
-
* every subsequent emitter
|
|
13
|
-
* 4. pagination — `paginateTable` / `paginateGroupedRows` /
|
|
14
|
-
* `renderPageButtons`
|
|
15
|
-
* 5. sortable — `makeSortable` plus the global setTimeout(0)
|
|
16
|
-
* scan that activates `.data-table.sortable`
|
|
17
|
-
*
|
|
18
|
-
* Any change to the order should be considered carefully — the
|
|
19
|
-
* pagination helpers reference `el`, the sortable helper references
|
|
20
|
-
* the pagination helpers, and the global activation pass at the end
|
|
21
|
-
* fires after every preceding emitter has declared its top-level
|
|
22
|
-
* names. New shared concerns should pick a slot rather than be
|
|
23
|
-
* appended blindly.
|
|
24
|
-
*/
|
|
25
|
-
import { dashboardElJs } from './shared/el.js';
|
|
26
|
-
import { dashboardPaginationJs } from './shared/pagination.js';
|
|
27
|
-
import { dashboardSortableJs } from './shared/sortable.js';
|
|
28
|
-
import { dashboardTabActivatorsJs } from './shared/tab-activators.js';
|
|
29
|
-
import { dashboardTabBarJs } from './shared/tab-bar.js';
|
|
30
|
-
export function dashboardSharedJs() {
|
|
31
|
-
return [
|
|
32
|
-
dashboardTabBarJs(),
|
|
33
|
-
dashboardTabActivatorsJs(),
|
|
34
|
-
dashboardElJs(),
|
|
35
|
-
dashboardPaginationJs(),
|
|
36
|
-
dashboardSortableJs(),
|
|
37
|
-
].join('\n');
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=shared.js.map
|
package/dist/shared.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,iBAAiB,EAAE;QACnB,wBAAwB,EAAE;QAC1B,aAAa,EAAE;QACf,qBAAqB,EAAE;QACvB,mBAAmB,EAAE;KACtB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
|
package/dist/subtab-bar.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Subtab-bar Strategy — JS-string emitter for the shared subtab pattern.
|
|
3
|
-
*
|
|
4
|
-
* Both the fit/sim Tool Tab (Sessions / Catalog / Recipes — three
|
|
5
|
-
* subtabs) and the Code Paths Tab (Sessions / Explore — two subtabs)
|
|
6
|
-
* need the same DOM/click-delegation behaviour: a `.subtab-bar` of
|
|
7
|
-
* clickable headers, a stack of `.subtab-panel` containers, and a
|
|
8
|
-
* single click handler that toggles the `active` class on both.
|
|
9
|
-
*
|
|
10
|
-
* Pre-F2, both call sites duplicated the same 20-line block. This
|
|
11
|
-
* emitter declares one runtime helper, `renderSubtabBar(panel,
|
|
12
|
-
* subtabs)`, that both consumers call. The Strategy is the
|
|
13
|
-
* `subtabs` array — each entry is `{ id, label, render(panel) }` —
|
|
14
|
-
* and `renderSubtabBar` returns the panel-element map so callers can
|
|
15
|
-
* still reach into specific subpanels if they need to (Code Paths
|
|
16
|
-
* does not, fit/sim's `renderToolTab` does not either after F2).
|
|
17
|
-
*
|
|
18
|
-
* The emitter must be concatenated BEFORE any caller (i.e. before
|
|
19
|
-
* `dashboardToolTabsJs` and `dashboardCodePathsJs`) since both rely
|
|
20
|
-
* on `renderSubtabBar` being declared in scope.
|
|
21
|
-
*/
|
|
22
|
-
export declare function dashboardSubtabBarJs(): string;
|
|
23
|
-
//# sourceMappingURL=subtab-bar.d.ts.map
|
package/dist/subtab-bar.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subtab-bar.d.ts","sourceRoot":"","sources":["../src/subtab-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,CAsD7C"}
|
package/dist/subtab-bar.js
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Subtab-bar Strategy — JS-string emitter for the shared subtab pattern.
|
|
3
|
-
*
|
|
4
|
-
* Both the fit/sim Tool Tab (Sessions / Catalog / Recipes — three
|
|
5
|
-
* subtabs) and the Code Paths Tab (Sessions / Explore — two subtabs)
|
|
6
|
-
* need the same DOM/click-delegation behaviour: a `.subtab-bar` of
|
|
7
|
-
* clickable headers, a stack of `.subtab-panel` containers, and a
|
|
8
|
-
* single click handler that toggles the `active` class on both.
|
|
9
|
-
*
|
|
10
|
-
* Pre-F2, both call sites duplicated the same 20-line block. This
|
|
11
|
-
* emitter declares one runtime helper, `renderSubtabBar(panel,
|
|
12
|
-
* subtabs)`, that both consumers call. The Strategy is the
|
|
13
|
-
* `subtabs` array — each entry is `{ id, label, render(panel) }` —
|
|
14
|
-
* and `renderSubtabBar` returns the panel-element map so callers can
|
|
15
|
-
* still reach into specific subpanels if they need to (Code Paths
|
|
16
|
-
* does not, fit/sim's `renderToolTab` does not either after F2).
|
|
17
|
-
*
|
|
18
|
-
* The emitter must be concatenated BEFORE any caller (i.e. before
|
|
19
|
-
* `dashboardToolTabsJs` and `dashboardCodePathsJs`) since both rely
|
|
20
|
-
* on `renderSubtabBar` being declared in scope.
|
|
21
|
-
*/
|
|
22
|
-
export function dashboardSubtabBarJs() {
|
|
23
|
-
return String.raw `
|
|
24
|
-
// =======================================================
|
|
25
|
-
// SUBTAB BAR (Strategy — shared by tool tabs and Code Paths)
|
|
26
|
-
// =======================================================
|
|
27
|
-
//
|
|
28
|
-
// renderSubtabBar(panel, subtabs)
|
|
29
|
-
// panel — host element (e.g. document.getElementById('panel-fitness'))
|
|
30
|
-
// subtabs — Array<{ id: string, label: string, render(panel): void }>
|
|
31
|
-
//
|
|
32
|
-
// Builds the .subtab-bar (with the first subtab .active), creates one
|
|
33
|
-
// .subtab-panel per entry, mounts them, wires up click delegation,
|
|
34
|
-
// and finally invokes each entry's render(panel) to populate it.
|
|
35
|
-
//
|
|
36
|
-
// Returns the { id → panel } map so callers can reach into a specific
|
|
37
|
-
// subpanel by id if they need to (rare; both first-party callers
|
|
38
|
-
// don't).
|
|
39
|
-
function renderSubtabBar(panel, subtabs) {
|
|
40
|
-
const subtabBar = el('div', { class: 'subtab-bar' });
|
|
41
|
-
const panels = {};
|
|
42
|
-
subtabs.forEach((t, i) => {
|
|
43
|
-
const subtab = el('div', {
|
|
44
|
-
class: 'subtab' + (i === 0 ? ' active' : ''),
|
|
45
|
-
'data-subtab': t.id,
|
|
46
|
-
text: t.label,
|
|
47
|
-
});
|
|
48
|
-
subtabBar.appendChild(subtab);
|
|
49
|
-
|
|
50
|
-
const subpanel = el('div', {
|
|
51
|
-
class: 'subtab-panel' + (i === 0 ? ' active' : ''),
|
|
52
|
-
id: panel.id + '-' + t.id,
|
|
53
|
-
});
|
|
54
|
-
panels[t.id] = subpanel;
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
panel.appendChild(subtabBar);
|
|
58
|
-
subtabs.forEach(t => panel.appendChild(panels[t.id]));
|
|
59
|
-
|
|
60
|
-
subtabBar.addEventListener('click', e => {
|
|
61
|
-
const tab = e.target.closest('.subtab');
|
|
62
|
-
if (!tab) return;
|
|
63
|
-
subtabBar.querySelectorAll('.subtab').forEach(t => t.classList.remove('active'));
|
|
64
|
-
tab.classList.add('active');
|
|
65
|
-
subtabs.forEach(t => panels[t.id].classList.remove('active'));
|
|
66
|
-
panels[tab.dataset.subtab].classList.add('active');
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
// Render each subpanel's body. Done after mounting so renderers can
|
|
70
|
-
// safely measure their host (the panel is in the document).
|
|
71
|
-
subtabs.forEach(t => t.render(panels[t.id]));
|
|
72
|
-
|
|
73
|
-
return panels;
|
|
74
|
-
}
|
|
75
|
-
`;
|
|
76
|
-
}
|
|
77
|
-
//# sourceMappingURL=subtab-bar.js.map
|
package/dist/subtab-bar.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subtab-bar.js","sourceRoot":"","sources":["../src/subtab-bar.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,oBAAoB;IAClC,OAAO,MAAM,CAAC,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDlB,CAAC;AACF,CAAC"}
|
package/dist/tool-tabs.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool tab rendering — creates subtabs (Sessions / Catalog / Recipes) under each tool tab.
|
|
3
|
-
* Returns JS code as a string.
|
|
4
|
-
*
|
|
5
|
-
* Delegates the subtab DOM/click pattern to the shared `renderSubtabBar`
|
|
6
|
-
* Strategy declared by `dashboardSubtabBarJs` (F2). The three-subtab
|
|
7
|
-
* shape is now a config — `[overview, catalog, recipes]` — so a tool
|
|
8
|
-
* with a different shape (e.g. Code Paths' two subtabs) is also a
|
|
9
|
-
* config call rather than a duplicated DOM block.
|
|
10
|
-
*/
|
|
11
|
-
export declare function dashboardToolTabsJs(): string;
|
|
12
|
-
//# sourceMappingURL=tool-tabs.d.ts.map
|
package/dist/tool-tabs.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-tabs.d.ts","sourceRoot":"","sources":["../src/tool-tabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,wBAAgB,mBAAmB,IAAI,MAAM,CAoE5C"}
|
package/dist/tool-tabs.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tool tab rendering — creates subtabs (Sessions / Catalog / Recipes) under each tool tab.
|
|
3
|
-
* Returns JS code as a string.
|
|
4
|
-
*
|
|
5
|
-
* Delegates the subtab DOM/click pattern to the shared `renderSubtabBar`
|
|
6
|
-
* Strategy declared by `dashboardSubtabBarJs` (F2). The three-subtab
|
|
7
|
-
* shape is now a config — `[overview, catalog, recipes]` — so a tool
|
|
8
|
-
* with a different shape (e.g. Code Paths' two subtabs) is also a
|
|
9
|
-
* config call rather than a duplicated DOM block.
|
|
10
|
-
*/
|
|
11
|
-
export function dashboardToolTabsJs() {
|
|
12
|
-
return `
|
|
13
|
-
// =======================================================
|
|
14
|
-
// TOOL SUBTAB RENDERING
|
|
15
|
-
// =======================================================
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* Render a tool tab with subtabs: Sessions | Catalog | Recipes
|
|
19
|
-
* (the first subtab keeps the stable id 'overview' for routing).
|
|
20
|
-
* @param panelId - e.g., 'panel-fitness'
|
|
21
|
-
* @param toolSessions - filtered sessions for this tool
|
|
22
|
-
* @param accentColor - CSS var for accent
|
|
23
|
-
* @param catalogLabel - e.g., 'Checks', 'Scenarios'
|
|
24
|
-
* @param catalogData - check/scenario catalog entries (or empty)
|
|
25
|
-
* @param renderCatalogFn - function(container, data) to render the catalog
|
|
26
|
-
* @param recipesData - recipe catalog entries (or empty array). Passed
|
|
27
|
-
* in so each tool can carry its own recipe namespace once recipes
|
|
28
|
-
* beyond fit are supported; today fit and sim share the global
|
|
29
|
-
* recipeCatalog by passing it through.
|
|
30
|
-
*/
|
|
31
|
-
function renderToolTab(panelId, toolSessions, accentColor, catalogLabel, catalogData, renderCatalogFn, recipesData) {
|
|
32
|
-
const panel = document.getElementById(panelId);
|
|
33
|
-
renderSubtabBar(panel, [
|
|
34
|
-
{ id: 'overview', label: 'Sessions', render: function(p) {
|
|
35
|
-
renderSessionTable(p, toolSessions, accentColor);
|
|
36
|
-
}},
|
|
37
|
-
{ id: 'catalog', label: catalogLabel, render: function(p) {
|
|
38
|
-
if (catalogData && catalogData.length > 0) {
|
|
39
|
-
renderCatalogFn(p, catalogData);
|
|
40
|
-
} else {
|
|
41
|
-
p.appendChild(el('div', {class:'empty', text:'No ' + catalogLabel.toLowerCase() + ' available yet.'}));
|
|
42
|
-
}
|
|
43
|
-
}},
|
|
44
|
-
{ id: 'recipes', label: 'Recipes', render: function(p) {
|
|
45
|
-
renderRecipesPanel(p, recipesData);
|
|
46
|
-
}},
|
|
47
|
-
]);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// =======================================================
|
|
51
|
-
// RENDER ALL TOOL TABS
|
|
52
|
-
// =======================================================
|
|
53
|
-
|
|
54
|
-
function renderFitnessTab() {
|
|
55
|
-
renderToolTab(
|
|
56
|
-
'panel-fitness',
|
|
57
|
-
fitSessions,
|
|
58
|
-
'var(--accent-fitness)',
|
|
59
|
-
'Checks',
|
|
60
|
-
checkCatalog,
|
|
61
|
-
function(container, data) { renderChecksCatalog(container, data); },
|
|
62
|
-
recipeCatalog
|
|
63
|
-
);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function renderSimulationTab() {
|
|
67
|
-
renderToolTab(
|
|
68
|
-
'panel-simulation',
|
|
69
|
-
simSessions,
|
|
70
|
-
'var(--accent-sim)',
|
|
71
|
-
'Scenarios',
|
|
72
|
-
[], // No scenarios yet
|
|
73
|
-
function(container, data) {},
|
|
74
|
-
recipeCatalog
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
`;
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=tool-tabs.js.map
|
package/dist/tool-tabs.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tool-tabs.js","sourceRoot":"","sources":["../src/tool-tabs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,UAAU,mBAAmB;IACjC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkER,CAAC;AACF,CAAC"}
|