@abgov/jsonforms-components 2.64.9 → 2.66.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.
package/index.esm.js CHANGED
@@ -7403,12 +7403,10 @@ const InnerGoAInputText = props => {
7403
7403
  useEffect(() => {
7404
7404
  if (!user || data || manualInput || hasDefault) return;
7405
7405
  const autoPopulatedValue = autoPopulateValue(user, props);
7406
+ // clean-code-ignore: 2.18
7406
7407
  if (shouldAutoPopulateValue(autoPopulatedValue, data)) {
7407
- const timeout = setTimeout(() => {
7408
- handleChange(props.path, autoPopulatedValue);
7409
- setLocalValue(autoPopulatedValue);
7410
- }, 1000);
7411
- return () => clearTimeout(timeout);
7408
+ handleChange(props.path, autoPopulatedValue);
7409
+ setLocalValue(autoPopulatedValue);
7412
7410
  }
7413
7411
  // eslint-disable-next-line react-hooks/exhaustive-deps
7414
7412
  }, [user]);
@@ -7634,6 +7632,16 @@ const MultiLineTextControlInput = props => jsx(GoAInputBaseControl, Object.assig
7634
7632
  const MultiLineTextControlTester = rankWith(3, and(isStringControl, optionIs('multi', true)));
7635
7633
  const MultiLineTextControl = withJsonFormsControlProps(MultiLineTextControlInput);
7636
7634
 
7635
+ function _objectWithoutPropertiesLoose(r, e) {
7636
+ if (null == r) return {};
7637
+ var t = {};
7638
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
7639
+ if (-1 !== e.indexOf(n)) continue;
7640
+ t[n] = r[n];
7641
+ }
7642
+ return t;
7643
+ }
7644
+
7637
7645
  var toIntegerOrInfinity$1 = toIntegerOrInfinity$9;
7638
7646
  var toString$8 = toString$n;
7639
7647
  var requireObjectCoercible$3 = requireObjectCoercible$e;
@@ -7700,6 +7708,7 @@ $$b({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
7700
7708
  }
7701
7709
  });
7702
7710
 
7711
+ const _excluded$6 = ["onFocus", "onBlur", "onChange", "onKeyPress"];
7703
7712
  const errMalformedDate = (scope, type) => {
7704
7713
  return `${type}-date for variable '${scope}' has an incorrect format.`;
7705
7714
  };
@@ -7735,8 +7744,18 @@ const GoADateInput = props => {
7735
7744
  const inputName = (appliedUiSchemaOptions == null ? void 0 : appliedUiSchemaOptions.name) || `${id || label}-input`;
7736
7745
  const allowPastDate = uischema == null || (_uischema$options3 = uischema.options) == null ? void 0 : _uischema$options3.allowPastDate;
7737
7746
  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;
7747
+ const componentProps = reformatDateProps(uischema == null || (_uischema$options5 = uischema.options) == null ? void 0 : _uischema$options5.componentProps);
7748
+ const {
7749
+ onFocus: componentOnFocus,
7750
+ onBlur: componentOnBlur,
7751
+ onChange: componentOnChange,
7752
+ onKeyPress: componentOnKeyPress
7753
+ } = componentProps,
7754
+ additionalComponentProps = _objectWithoutPropertiesLoose(componentProps, _excluded$6);
7755
+ const [isFocused, setIsFocused] = useState(false);
7756
+ const inputType = componentProps != null && componentProps.placeholder && !data && !isFocused ? 'text' : 'date';
7757
+ let minDate = uischema == null || (_uischema$options6 = uischema.options) == null || (_uischema$options6 = _uischema$options6.componentProps) == null ? void 0 : _uischema$options6.min;
7758
+ let maxDate = uischema == null || (_uischema$options7 = uischema.options) == null || (_uischema$options7 = _uischema$options7.componentProps) == null ? void 0 : _uischema$options7.max;
7740
7759
  const todayLocalYmd = () => {
7741
7760
  const d = new Date();
7742
7761
  const y = d.getFullYear();
@@ -7754,9 +7773,9 @@ const GoADateInput = props => {
7754
7773
  const host = document.querySelector(`goa-input[name="${inputName}"]`);
7755
7774
  host == null || (_host$shadowRoot = host.shadowRoot) == null || _host$shadowRoot.querySelector('input[type="date"]');
7756
7775
  ensureGoaDatePointerCursor(host);
7757
- }, [inputName]);
7758
- return jsx(GoabInput, Object.assign({
7759
- type: "date",
7776
+ }, [inputName, inputType]);
7777
+ return jsx(GoabInput, Object.assign({}, additionalComponentProps, {
7778
+ type: inputType,
7760
7779
  error: isVisited && errors.length > 0,
7761
7780
  width: width,
7762
7781
  name: inputName,
@@ -7767,6 +7786,10 @@ const GoADateInput = props => {
7767
7786
  ariaLabel: `appliedUiSchemaOptions?.name date`,
7768
7787
  min: minDate ? standardizeDate(minDate) || undefined : undefined,
7769
7788
  max: maxDate ? standardizeDate(maxDate) || undefined : undefined,
7789
+ onFocus: detail => {
7790
+ setIsFocused(true);
7791
+ componentOnFocus == null || componentOnFocus(detail);
7792
+ },
7770
7793
  onChange: detail => {
7771
7794
  var _detail$name;
7772
7795
  if (isVisited === false && setIsVisited) {
@@ -7777,6 +7800,7 @@ const GoADateInput = props => {
7777
7800
  value: detail.value,
7778
7801
  controlProps: props
7779
7802
  });
7803
+ componentOnChange == null || componentOnChange(detail);
7780
7804
  },
7781
7805
  onKeyPress: detail => {
7782
7806
  onKeyPressForDateControl({
@@ -7785,8 +7809,10 @@ const GoADateInput = props => {
7785
7809
  key: detail.key,
7786
7810
  controlProps: props
7787
7811
  });
7812
+ componentOnKeyPress == null || componentOnKeyPress(detail);
7788
7813
  },
7789
7814
  onBlur: detail => {
7815
+ setIsFocused(false);
7790
7816
  if (isVisited === false && setIsVisited) {
7791
7817
  setIsVisited();
7792
7818
  }
@@ -7795,8 +7821,9 @@ const GoADateInput = props => {
7795
7821
  value: detail.value,
7796
7822
  controlProps: props
7797
7823
  });
7824
+ componentOnBlur == null || componentOnBlur(detail);
7798
7825
  }
7799
- }, reformatDateProps(uischema == null || (_uischema$options7 = uischema.options) == null ? void 0 : _uischema$options7.componentProps)));
7826
+ }));
7800
7827
  };
7801
7828
  const GoADateControl = props => jsx(GoAInputBaseControl, Object.assign({}, props, {
7802
7829
  input: GoADateInput
@@ -8666,16 +8693,6 @@ const GoInputBaseReview = props => jsx(GoAInputBaseControl, Object.assign({}, pr
8666
8693
  }));
8667
8694
  const GoAInputBaseReviewControl = withJsonFormsControlProps(GoInputBaseReview);
8668
8695
 
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
8696
  var isArray$1 = isArray$5;
8680
8697
  var lengthOfArrayLike$5 = lengthOfArrayLike$c;
8681
8698
  var doesNotExceedSafeInteger$1 = doesNotExceedSafeInteger$3;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.64.9",
3
+ "version": "2.66.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",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": "1.0.0",
3
- "generatedAt": "2026-05-29T21:56:06.433Z",
4
- "sourceCommit": "6c99340d89cc8ab585d0b5b64214891442a4b29c",
3
+ "generatedAt": "2026-06-09T15:33:01.950Z",
4
+ "sourceCommit": "77099bc119cd4af5ff0ef3020ca33354a35b3bd5",
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
- }