@abgov/jsonforms-components 2.64.8 → 2.66.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/index.esm.js CHANGED
@@ -7634,6 +7634,16 @@ const MultiLineTextControlInput = props => jsx(GoAInputBaseControl, Object.assig
7634
7634
  const MultiLineTextControlTester = rankWith(3, and(isStringControl, optionIs('multi', true)));
7635
7635
  const MultiLineTextControl = withJsonFormsControlProps(MultiLineTextControlInput);
7636
7636
 
7637
+ function _objectWithoutPropertiesLoose(r, e) {
7638
+ if (null == r) return {};
7639
+ var t = {};
7640
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
7641
+ if (-1 !== e.indexOf(n)) continue;
7642
+ t[n] = r[n];
7643
+ }
7644
+ return t;
7645
+ }
7646
+
7637
7647
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$9;
7638
7648
  var toString$8 = toString$n;
7639
7649
  var requireObjectCoercible$3 = requireObjectCoercible$e;
@@ -7700,6 +7710,7 @@ $$b({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
7700
7710
  }
7701
7711
  });
7702
7712
 
7713
+ const _excluded$6 = ["onFocus", "onBlur", "onChange", "onKeyPress"];
7703
7714
  const errMalformedDate = (scope, type) => {
7704
7715
  return `${type}-date for variable '${scope}' has an incorrect format.`;
7705
7716
  };
@@ -7735,8 +7746,18 @@ const GoADateInput = props => {
7735
7746
  const inputName = (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`;
7736
7747
  const allowPastDate = uischema == null || (_uischema$options3 = uischema.options) == null ? void 0 : _uischema$options3.allowPastDate;
7737
7748
  const allowFutureDate = uischema == null || (_uischema$options4 = uischema.options) == null ? void 0 : _uischema$options4.allowFutureDate;
7738
- let minDate = uischema == null || (_uischema$options5 = uischema.options) == null || (_uischema$options5 = _uischema$options5.componentProps) == null ? void 0 : _uischema$options5.min;
7739
- let maxDate = uischema == null || (_uischema$options6 = uischema.options) == null || (_uischema$options6 = _uischema$options6.componentProps) == null ? void 0 : _uischema$options6.max;
7749
+ const componentProps = reformatDateProps(uischema == null || (_uischema$options5 = uischema.options) == null ? void 0 : _uischema$options5.componentProps);
7750
+ const {
7751
+ onFocus: componentOnFocus,
7752
+ onBlur: componentOnBlur,
7753
+ onChange: componentOnChange,
7754
+ onKeyPress: componentOnKeyPress
7755
+ } = componentProps,
7756
+ additionalComponentProps = _objectWithoutPropertiesLoose(componentProps, _excluded$6);
7757
+ const [isFocused, setIsFocused] = useState(false);
7758
+ const inputType = componentProps != null && componentProps.placeholder && !data && !isFocused ? 'text' : 'date';
7759
+ let minDate = uischema == null || (_uischema$options6 = uischema.options) == null || (_uischema$options6 = _uischema$options6.componentProps) == null ? void 0 : _uischema$options6.min;
7760
+ let maxDate = uischema == null || (_uischema$options7 = uischema.options) == null || (_uischema$options7 = _uischema$options7.componentProps) == null ? void 0 : _uischema$options7.max;
7740
7761
  const todayLocalYmd = () => {
7741
7762
  const d = new Date();
7742
7763
  const y = d.getFullYear();
@@ -7754,9 +7775,9 @@ const GoADateInput = props => {
7754
7775
  const host = document.querySelector(`goa-input[name="${inputName}"]`);
7755
7776
  host == null || (_host$shadowRoot = host.shadowRoot) == null || _host$shadowRoot.querySelector('input[type="date"]');
7756
7777
  ensureGoaDatePointerCursor(host);
7757
- }, [inputName]);
7758
- return jsx(GoabInput, Object.assign({
7759
- type: "date",
7778
+ }, [inputName, inputType]);
7779
+ return jsx(GoabInput, Object.assign({}, additionalComponentProps, {
7780
+ type: inputType,
7760
7781
  error: isVisited && errors.length > 0,
7761
7782
  width: width,
7762
7783
  name: inputName,
@@ -7767,6 +7788,10 @@ const GoADateInput = props => {
7767
7788
  ariaLabel: `appliedUiSchemaOptions?.name date`,
7768
7789
  min: minDate ? standardizeDate(minDate) || undefined : undefined,
7769
7790
  max: maxDate ? standardizeDate(maxDate) || undefined : undefined,
7791
+ onFocus: detail => {
7792
+ setIsFocused(true);
7793
+ componentOnFocus == null || componentOnFocus(detail);
7794
+ },
7770
7795
  onChange: detail => {
7771
7796
  var _detail$name;
7772
7797
  if (isVisited === false && setIsVisited) {
@@ -7777,6 +7802,7 @@ const GoADateInput = props => {
7777
7802
  value: detail.value,
7778
7803
  controlProps: props
7779
7804
  });
7805
+ componentOnChange == null || componentOnChange(detail);
7780
7806
  },
7781
7807
  onKeyPress: detail => {
7782
7808
  onKeyPressForDateControl({
@@ -7785,8 +7811,10 @@ const GoADateInput = props => {
7785
7811
  key: detail.key,
7786
7812
  controlProps: props
7787
7813
  });
7814
+ componentOnKeyPress == null || componentOnKeyPress(detail);
7788
7815
  },
7789
7816
  onBlur: detail => {
7817
+ setIsFocused(false);
7790
7818
  if (isVisited === false && setIsVisited) {
7791
7819
  setIsVisited();
7792
7820
  }
@@ -7795,8 +7823,9 @@ const GoADateInput = props => {
7795
7823
  value: detail.value,
7796
7824
  controlProps: props
7797
7825
  });
7826
+ componentOnBlur == null || componentOnBlur(detail);
7798
7827
  }
7799
- }, reformatDateProps(uischema == null || (_uischema$options7 = uischema.options) == null ? void 0 : _uischema$options7.componentProps)));
7828
+ }));
7800
7829
  };
7801
7830
  const GoADateControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
7802
7831
  input: GoADateInput
@@ -8666,16 +8695,6 @@ const GoInputBaseReview = props => jsx(GoAInputBaseControl, Object.assign({}, pr
8666
8695
  }));
8667
8696
  const GoAInputBaseReviewControl = withJsonFormsControlProps(GoInputBaseReview);
8668
8697
 
8669
- function _objectWithoutPropertiesLoose(r, e) {
8670
- if (null == r) return {};
8671
- var t = {};
8672
- for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
8673
- if (-1 !== e.indexOf(n)) continue;
8674
- t[n] = r[n];
8675
- }
8676
- return t;
8677
- }
8678
-
8679
8698
  var isArray$1 = isArray$5;
8680
8699
  var lengthOfArrayLike$5 = lengthOfArrayLike$c;
8681
8700
  var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$3;
@@ -11158,10 +11177,10 @@ const FullNameDobReviewControl = props => {
11158
11177
  children: jsxs(PageReviewContainer, {
11159
11178
  colSpan: 3,
11160
11179
  children: [jsxs(ReviewHeader, {
11161
- children: [jsx(ReviewLabel, {
11162
- children: fieldLabel
11163
- }), requiredFields.includes(fieldName) && jsx(RequiredTextLabel, {
11164
- children: " (required)"
11180
+ children: [jsxs(ReviewLabel, {
11181
+ children: [fieldLabel, requiredFields.includes(fieldName) && jsx(RequiredTextLabel, {
11182
+ children: " (required)"
11183
+ })]
11165
11184
  }), stepId !== undefined && !((_uischema$options2 = uischema.options) != null && (_uischema$options2 = _uischema$options2.componentProps) != null && _uischema$options2.readOnly) && jsx(GoabButton, {
11166
11185
  type: "tertiary",
11167
11186
  size: "compact",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.64.8",
3
+ "version": "2.66.0",
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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-05-29T20:08:51.477Z",
4
- "sourceCommit": "0aeeeac85e6e764cf36ced103d88c83bc2fa5173",
3
+ "generatedAt": "2026-06-08T20:22:06.103Z",
4
+ "sourceCommit": "301d2b4c08a76d91e5de2db4cdca0b9eca9f6ef3",
5
5
  "sourcePath": "libs/jsonforms-components/src/index.ts",
6
6
  "rendererCount": 33,
7
7
  "renderers": [
package/index.esm.css DELETED
@@ -1,21 +0,0 @@
1
- /* This css file is here to override any parent/root css files
2
- that add spacing, sizes, color that the help content uses
3
- to display markdown content it uses.
4
- */
5
- li > ul,
6
- li > ol,
7
- li > ul,
8
- li > ol {
9
- padding-left: var(--goa-space-m) !important;
10
- margin-top: initial;
11
- }
12
-
13
- em {
14
- font-size: var(--goa-typography-body-s) !important;
15
- color: var(--goa-color-text-default) !important;
16
- }
17
-
18
- .help-content-markdown{
19
- font-size: var(--goa-font-size-4) !important;
20
- line-height: var(--goa-line-height-0.5) !important;
21
- }