@mx-cartographer/experiences 9.3.0-alpha.wb1 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -16,6 +16,10 @@
16
16
  - **ADDED** - `src/core/api/__tests__/ApiClasses.test.ts` exercising the real `src/core/api/*` classes against MSW; coverage now includes `src/core/api/**` in the denominator (the MSW migration runs the real API classes) with the REVIEW.md floors kept at lines 85 / statements 85 / functions 80 / branches 78 (tests added to clear them rather than lowering), and `coverage.cleanOnRerun` set to `true` so a re-run can't satisfy the floors with stale data
17
17
  - **CHANGED** - Dependency/structure hygiene: removed the unused `path` userland shim (configs use `node:path`); documented why `@typescript/typescript6` is retained (vite-plugin-dts needs the JS Compiler API that TS 7 native doesn't yet expose); consolidated the root `mockData/` fixtures into `mock/data/`
18
18
 
19
+ ## [9.2.9] - 08-09-2026
20
+
21
+ - **FIXED** - Category selector drawer kept the previously expanded accordion and highlighted selection when reopened for a different transaction; it now resets and expands to the current transaction's category each time it opens
22
+
19
23
  ## [9.2.8] - 08-07-2026
20
24
 
21
25
  - **FIXED** - Trends timeframe buttons (3M/6M/9M/1Y) reset to the 6-month default when the widget remounted, snapping the displayed date range back to the previous selection
@@ -1,39 +1,43 @@
1
- import { useCategoryStore as S, useGlobalCopyStore as _, useGlobalUiStore as b } from "../../common/context/hooks.es.js";
2
- import x from "../../common/components/Loader.es.js";
3
- import L from "../../common/components/SearchBox.es.js";
4
- import { useCategoryUiStore as U } from "../context/hooks.es.js";
5
- import v from "./CategoryList.es.js";
6
- import o from "react";
7
- import { observer as E } from "mobx-react-lite";
8
- import G from "@mui/material/Stack";
9
- import { jsx as t, jsxs as j } from "react/jsx-runtime";
10
- var V = ({ initialSelected: e, onSelect: a = void 0, showSelected: s = !0, unselectable: c = [], unselectableText: l = "Unselectable" }) => {
11
- const { categories: f, loadCategories: m } = S(), { common: r } = _(), { isCopyLoaded: i } = b(), { searchValue: p, setOnSelect: u, setSearchValue: d, setSelectedGuid: h, setShowSelected: n, setUnselectable: g, setUnselectableText: y } = U();
12
- return o.useEffect(() => {
13
- a && u(a);
14
- }), o.useEffect(() => {
15
- f.length || m();
16
- }, []), o.useEffect(() => {
17
- e && h(e), n(s), g(c), y(l);
1
+ import { useCategoryStore as x, useGlobalCopyStore as b, useGlobalUiStore as E } from "../../common/context/hooks.es.js";
2
+ import L from "../../common/components/Loader.es.js";
3
+ import U from "../../common/components/SearchBox.es.js";
4
+ import { useCategoryUiStore as v } from "../context/hooks.es.js";
5
+ import G from "./CategoryList.es.js";
6
+ import r from "react";
7
+ import { observer as j } from "mobx-react-lite";
8
+ import V from "@mui/material/Stack";
9
+ import { jsx as s, jsxs as k } from "react/jsx-runtime";
10
+ var w = ({ initialSelected: o, onSelect: c = void 0, showSelected: f = !0, unselectable: l = [], unselectableText: u = "Unselectable" }) => {
11
+ const { categories: t, loadCategories: m } = x(), { common: a } = b(), { isCopyLoaded: d } = E(), { searchValue: n, setExpandedGuid: p, setOnSelect: g, setSearchValue: i, setSelectedGuid: h, setShowSelected: y, setUnselectable: C, setUnselectableText: S } = v();
12
+ return r.useEffect(() => {
13
+ c && g(c);
14
+ }), r.useEffect(() => {
15
+ t.length || m();
16
+ }, []), r.useEffect(() => {
17
+ h(o ?? null), i("");
18
+ }, [o]), r.useEffect(() => {
19
+ const e = t.find((_) => _.guid === o);
20
+ p(e ? e.parent_guid ?? e.guid : null);
21
+ }, [t, o]), r.useEffect(() => {
22
+ y(f), C(l), S(u);
18
23
  }, [
19
- e,
20
- s,
21
- c,
22
- l
23
- ]), i ? /* @__PURE__ */ j(G, {
24
+ f,
25
+ l,
26
+ u
27
+ ]), d ? /* @__PURE__ */ k(V, {
24
28
  className: "mx-cat-category-selector",
25
29
  sx: { width: "100%" },
26
- children: [/* @__PURE__ */ t(L, {
27
- ariaLabel: r.search_aria,
28
- cancelAriaLabel: r.cancel_search_aria,
29
- onChange: (C) => d(C),
30
- placeholder: r.search_placeholder,
31
- searchValue: p
32
- }), /* @__PURE__ */ t(v, {})]
33
- }) : /* @__PURE__ */ t(x, {});
34
- }, D = E(V);
30
+ children: [/* @__PURE__ */ s(U, {
31
+ ariaLabel: a.search_aria,
32
+ cancelAriaLabel: a.cancel_search_aria,
33
+ onChange: (e) => i(e),
34
+ placeholder: a.search_placeholder,
35
+ searchValue: n
36
+ }), /* @__PURE__ */ s(G, {})]
37
+ }) : /* @__PURE__ */ s(L, {});
38
+ }, H = j(w);
35
39
  export {
36
- D as default
40
+ H as default
37
41
  };
38
42
 
39
43
  //# sourceMappingURL=CategorySelector.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CategorySelector.es.js","names":[],"sources":["../../../src/categories/components/CategorySelector.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport {\n Loader,\n SearchBox,\n useCategoryStore,\n useGlobalCopyStore,\n useGlobalUiStore,\n} from '../../common'\n\nimport { useCategoryUiStore } from '../context/hooks'\n\nimport CategoryList from './CategoryList'\n\nexport interface CategorySelectorProps {\n initialSelected?: string\n onSelect: (guid: string) => void\n showSelected?: boolean\n unselectable?: string[]\n unselectableText?: string\n}\n\nconst CategorySelector: React.FC<CategorySelectorProps> = ({\n initialSelected,\n onSelect = undefined,\n showSelected = true,\n unselectable = [],\n unselectableText = 'Unselectable',\n}) => {\n const { categories, loadCategories } = useCategoryStore()\n const { common: copy } = useGlobalCopyStore()\n const { isCopyLoaded } = useGlobalUiStore()\n\n const {\n searchValue,\n setOnSelect,\n setSearchValue,\n setSelectedGuid,\n setShowSelected,\n setUnselectable,\n setUnselectableText,\n } = useCategoryUiStore()\n\n React.useEffect(() => {\n if (onSelect) {\n setOnSelect(onSelect)\n }\n })\n\n React.useEffect(() => {\n if (!categories.length) {\n loadCategories()\n }\n }, [])\n\n React.useEffect(() => {\n if (initialSelected) {\n setSelectedGuid(initialSelected)\n }\n setShowSelected(showSelected)\n setUnselectable(unselectable)\n setUnselectableText(unselectableText)\n }, [initialSelected, showSelected, unselectable, unselectableText])\n\n if (!isCopyLoaded) {\n return <Loader />\n }\n\n return (\n <Stack className=\"mx-cat-category-selector\" sx={{ width: '100%' }}>\n <SearchBox\n ariaLabel={copy.search_aria}\n cancelAriaLabel={copy.cancel_search_aria}\n onChange={(value) => setSearchValue(value)}\n placeholder={copy.search_placeholder}\n searchValue={searchValue}\n />\n <CategoryList />\n </Stack>\n )\n}\n\nexport default observer(CategorySelector)\n"],"mappings":";;;;;;;;;AAyBA,IAAM,IAAA,CAAqD,EACzD,iBAAA,GACA,UAAA,IAAW,QACX,cAAA,IAAe,IACf,cAAA,IAAe,CAAC,GAChB,kBAAA,IAAmB,eAAA,MACf;AACJ,QAAM,EAAE,YAAA,GAAY,gBAAA,EAAA,IAAmB,EAAiB,GAClD,EAAE,QAAQ,EAAA,IAAS,EAAmB,GACtC,EAAE,cAAA,EAAA,IAAiB,EAAiB,GAEpC,EACJ,aAAA,GACA,aAAA,GACA,gBAAA,GACA,iBAAA,GACA,iBAAA,GACA,iBAAA,GACA,qBAAA,EAAA,IACE,EAAmB;AAuBvB,SArBA,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAAY,CAAQ;AAAA,EAExB,CAAC,GAED,EAAM,UAAA,MAAgB;AACpB,IAAK,EAAW,UACd,EAAe;AAAA,EAEnB,GAAG,CAAC,CAAC,GAEL,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAAgB,CAAe,GAEjC,EAAgB,CAAY,GAC5B,EAAgB,CAAY,GAC5B,EAAoB,CAAgB;AAAA,EACtC,GAAG;AAAA,IAAC;AAAA,IAAiB;AAAA,IAAc;AAAA,IAAc;AAAA,EAAgB,CAAC,GAE7D,IAKH,gBAAA,EAAC,GAAD;AAAA,IAAO,WAAU;AAAA,IAA2B,IAAI,EAAE,OAAO,OAAO;AAAA,IAAhE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,WAAW,EAAK;AAAA,MAChB,iBAAiB,EAAK;AAAA,MACtB,UAAA,CAAW,MAAU,EAAe,CAAK;AAAA,MACzC,aAAa,EAAK;AAAA,MACL,aAAA;AAAA,IACd,CAAA,GACD,gBAAA,EAAC,GAAD,CAAe,CAAA,CACV;AAAA,OAbA,gBAAA,EAAC,GAAD,CAAS,CAAA;AAepB,GAEA,IAAe,EAAS,CAAgB"}
1
+ {"version":3,"file":"CategorySelector.es.js","names":[],"sources":["../../../src/categories/components/CategorySelector.tsx"],"sourcesContent":["import React from 'react'\nimport { observer } from 'mobx-react-lite'\n\nimport Stack from '@mui/material/Stack'\n\nimport {\n Loader,\n SearchBox,\n useCategoryStore,\n useGlobalCopyStore,\n useGlobalUiStore,\n} from '../../common'\n\nimport { useCategoryUiStore } from '../context/hooks'\n\nimport CategoryList from './CategoryList'\n\nexport interface CategorySelectorProps {\n initialSelected?: string\n onSelect: (guid: string) => void\n showSelected?: boolean\n unselectable?: string[]\n unselectableText?: string\n}\n\nconst CategorySelector: React.FC<CategorySelectorProps> = ({\n initialSelected,\n onSelect = undefined,\n showSelected = true,\n unselectable = [],\n unselectableText = 'Unselectable',\n}) => {\n const { categories, loadCategories } = useCategoryStore()\n const { common: copy } = useGlobalCopyStore()\n const { isCopyLoaded } = useGlobalUiStore()\n\n const {\n searchValue,\n setExpandedGuid,\n setOnSelect,\n setSearchValue,\n setSelectedGuid,\n setShowSelected,\n setUnselectable,\n setUnselectableText,\n } = useCategoryUiStore()\n\n React.useEffect(() => {\n if (onSelect) {\n setOnSelect(onSelect)\n }\n })\n\n React.useEffect(() => {\n if (!categories.length) {\n loadCategories()\n }\n }, [])\n\n React.useEffect(() => {\n // Reset per-transaction; keyed off initialSelected so a category reload doesn't clear a typed search term.\n setSelectedGuid(initialSelected ?? null)\n setSearchValue('')\n }, [initialSelected])\n\n React.useEffect(() => {\n // Expand the selection's parent (or its own accordion if top-level).\n const selectedCategory = categories.find((category) => category.guid === initialSelected)\n setExpandedGuid(\n selectedCategory ? (selectedCategory.parent_guid ?? selectedCategory.guid) : null,\n )\n }, [categories, initialSelected])\n\n React.useEffect(() => {\n setShowSelected(showSelected)\n setUnselectable(unselectable)\n setUnselectableText(unselectableText)\n }, [showSelected, unselectable, unselectableText])\n\n if (!isCopyLoaded) {\n return <Loader />\n }\n\n return (\n <Stack className=\"mx-cat-category-selector\" sx={{ width: '100%' }}>\n <SearchBox\n ariaLabel={copy.search_aria}\n cancelAriaLabel={copy.cancel_search_aria}\n onChange={(value) => setSearchValue(value)}\n placeholder={copy.search_placeholder}\n searchValue={searchValue}\n />\n <CategoryList />\n </Stack>\n )\n}\n\nexport default observer(CategorySelector)\n"],"mappings":";;;;;;;;;AAyBA,IAAM,IAAA,CAAqD,EACzD,iBAAA,GACA,UAAA,IAAW,QACX,cAAA,IAAe,IACf,cAAA,IAAe,CAAC,GAChB,kBAAA,IAAmB,eAAA,MACf;AACJ,QAAM,EAAE,YAAA,GAAY,gBAAA,EAAA,IAAmB,EAAiB,GAClD,EAAE,QAAQ,EAAA,IAAS,EAAmB,GACtC,EAAE,cAAA,EAAA,IAAiB,EAAiB,GAEpC,EACJ,aAAA,GACA,iBAAA,GACA,aAAA,GACA,gBAAA,GACA,iBAAA,GACA,iBAAA,GACA,iBAAA,GACA,qBAAA,EAAA,IACE,EAAmB;AAkCvB,SAhCA,EAAM,UAAA,MAAgB;AACpB,IAAI,KACF,EAAY,CAAQ;AAAA,EAExB,CAAC,GAED,EAAM,UAAA,MAAgB;AACpB,IAAK,EAAW,UACd,EAAe;AAAA,EAEnB,GAAG,CAAC,CAAC,GAEL,EAAM,UAAA,MAAgB;AAEpB,IAAA,EAAgB,KAAmB,IAAI,GACvC,EAAe,EAAE;AAAA,EACnB,GAAG,CAAC,CAAe,CAAC,GAEpB,EAAM,UAAA,MAAgB;AAEpB,UAAM,IAAmB,EAAW,KAAA,CAAM,MAAa,EAAS,SAAS,CAAe;AACxF,IAAA,EACE,IAAoB,EAAiB,eAAe,EAAiB,OAAQ,IAC/E;AAAA,EACF,GAAG,CAAC,GAAY,CAAe,CAAC,GAEhC,EAAM,UAAA,MAAgB;AACpB,IAAA,EAAgB,CAAY,GAC5B,EAAgB,CAAY,GAC5B,EAAoB,CAAgB;AAAA,EACtC,GAAG;AAAA,IAAC;AAAA,IAAc;AAAA,IAAc;AAAA,EAAgB,CAAC,GAE5C,IAKH,gBAAA,EAAC,GAAD;AAAA,IAAO,WAAU;AAAA,IAA2B,IAAI,EAAE,OAAO,OAAO;AAAA,IAAhE,UAAA,CACE,gBAAA,EAAC,GAAD;AAAA,MACE,WAAW,EAAK;AAAA,MAChB,iBAAiB,EAAK;AAAA,MACtB,UAAA,CAAW,MAAU,EAAe,CAAK;AAAA,MACzC,aAAa,EAAK;AAAA,MACL,aAAA;AAAA,IACd,CAAA,GACD,gBAAA,EAAC,GAAD,CAAe,CAAA,CACV;AAAA,OAbA,gBAAA,EAAC,GAAD,CAAS,CAAA;AAepB,GAEA,IAAe,EAAS,CAAgB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mx-cartographer/experiences",
3
- "version": "9.3.0-alpha.wb1",
3
+ "version": "9.3.0",
4
4
  "description": "Library containing experience widgets",
5
5
  "author": "MX",
6
6
  "license": "MIT",