@abgov/jsonforms-components 2.35.0 → 2.36.1

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 (2) hide show
  1. package/index.esm.js +75 -10
  2. package/package.json +1 -1
package/index.esm.js CHANGED
@@ -8989,12 +8989,8 @@ const TaskList = ({
8989
8989
  }
8990
8990
  return sections;
8991
8991
  }, [categories]);
8992
- // Derived values
8993
- const totalGroups = useMemo(() => mergedSections.filter(section => section.categories.some(shouldShow)).length, [mergedSections]);
8994
- const completedGroups = useMemo(() => mergedSections.filter(section => {
8995
- const visibleCats = section.categories.filter(shouldShow);
8996
- return visibleCats.length > 0 && visibleCats.every(cat => cat.isCompleted);
8997
- }).length, [mergedSections]);
8992
+ const totalPages = useMemo(() => mergedSections.reduce((count, section) => count + section.categories.filter(shouldShow).length, 0), [mergedSections]);
8993
+ const completedPages = useMemo(() => mergedSections.reduce((count, section) => count + section.categories.filter(cat => shouldShow(cat) && cat.isCompleted).length, 0), [mergedSections]);
8998
8994
  let globalIndex = 0;
8999
8995
  let sectionIndex = 1;
9000
8996
  return jsx(PageBorder, {
@@ -9012,8 +9008,8 @@ const TaskList = ({
9012
9008
  ml: "xl",
9013
9009
  children: subtitle
9014
9010
  }), jsx(ApplicationStatus, {
9015
- completedGroups: completedGroups,
9016
- totalGroups: totalGroups
9011
+ completedGroups: completedPages,
9012
+ totalGroups: totalPages
9017
9013
  }), jsx(GoATable, {
9018
9014
  width: "100%",
9019
9015
  children: jsxs("tbody", {
@@ -10743,7 +10739,7 @@ const ObjectArrayControl = props => {
10743
10739
  visible: visible,
10744
10740
  "data-testid": "jsonforms-object-list-wrapper",
10745
10741
  children: [jsxs(ToolBarHeader, {
10746
- children: [isInReview && listTitle && isListWithDetail && additionalProps.required && (data === null || data === undefined) ? jsx("b", {
10742
+ children: [isInReview ? listTitle ? isListWithDetail && additionalProps.required && (data === null || data === undefined) ? jsx("b", {
10747
10743
  children: jsxs(ListWithDetailWarningIconDiv, {
10748
10744
  children: [jsx(GoAIcon, {
10749
10745
  type: "warning",
@@ -10764,9 +10760,15 @@ const ObjectArrayControl = props => {
10764
10760
  },
10765
10761
  children: maxItemsError
10766
10762
  })]
10767
- }), !isInReview && listTitle && jsxs(ObjectArrayTitle, {
10763
+ }) : null : listTitle && jsxs(ObjectArrayTitle, {
10768
10764
  children: [listTitle, " ", jsx("span", {
10769
10765
  children: additionalProps.required && '(required)'
10766
+ }), maxItemsError && jsx("span", {
10767
+ style: {
10768
+ color: 'red',
10769
+ marginLeft: '1rem'
10770
+ },
10771
+ children: maxItemsError
10770
10772
  })]
10771
10773
  }), !isInReview && jsx(ObjectArrayToolBar, {
10772
10774
  errors: errors,
@@ -11739,6 +11741,69 @@ const HelpContentDiv = styled.div(_t$1 || (_t$1 = _$1`
11739
11741
  .single-line {
11740
11742
  margin: var(--goa-space-2xs) 0 var(--goa-space-2xs) 0;
11741
11743
  }
11744
+
11745
+ .help-content-markdown details {
11746
+ margin: 1.5rem 0 !important;
11747
+ font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif !important;
11748
+ }
11749
+
11750
+ .help-content-markdown details summary {
11751
+ font-size: 1.5em;
11752
+ font-weight: bold;
11753
+ color: red;
11754
+ list-style: none;
11755
+ cursor: pointer;
11756
+ position: relative;
11757
+ padding-left: 0;
11758
+ font-weight: 600;
11759
+ font-size: 1.125rem; /* 18px */
11760
+ color: #111827; /* gray-900 */
11761
+ user-select: none;
11762
+ border-left: 0; /* vertical line */
11763
+ }
11764
+
11765
+ .help-content-markdown details summary::before {
11766
+ content: '';
11767
+ display: inline-block;
11768
+ width: 1.25rem;
11769
+ height: 1.25rem;
11770
+ margin-right: 0.5rem;
11771
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M184 112l144 144-144 144'/></svg>");
11772
+ background-size: contain;
11773
+ background-repeat: no-repeat;
11774
+ transition: opacity 0.2s ease;
11775
+ }
11776
+
11777
+ .help-content-markdown details[open] summary::before {
11778
+ background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'><path fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144'/></svg>");
11779
+ }
11780
+
11781
+ .help-content-markdown details[open] {
11782
+ margin-left: 1.75rem !important;
11783
+ }
11784
+ .help-content-markdown details[open] summary {
11785
+ margin-left: -1.75rem !important;
11786
+ }
11787
+
11788
+ .help-content-markdown details[open] {
11789
+ position: relative;
11790
+ }
11791
+
11792
+ .help-content-markdown details[open]::before {
11793
+ margin-left: -1.75rem !important;
11794
+ content: '';
11795
+ position: absolute;
11796
+ left: 0.6rem;
11797
+ top: 2.2rem;
11798
+ bottom: 0.5rem;
11799
+ width: 2px;
11800
+ background-color: #ccc;
11801
+ pointer-events: none;
11802
+ }
11803
+
11804
+ .help-content-markdown summary {
11805
+ text-decoration: underline;
11806
+ }
11742
11807
  `));
11743
11808
  const InvalidMarkdown = styled.div(_t2 || (_t2 = _$1`
11744
11809
  color: var(--goa-color-interactive-error);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.35.0",
3
+ "version": "2.36.1",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",