@abgov/jsonforms-components 2.47.7 → 2.47.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/index.esm.js CHANGED
@@ -3553,6 +3553,19 @@ const onChangeForNumericControl = props => {
3553
3553
  handleChange(path, value === '' ? undefined : value);
3554
3554
  }
3555
3555
  };
3556
+ const ensureGoaDatePointerCursor = host => {
3557
+ if (!host) return;
3558
+ const sr = host.shadowRoot;
3559
+ if (!sr) return;
3560
+ if (sr.getElementById('goa-date-cursor-style')) return;
3561
+ const style = document.createElement('style');
3562
+ style.id = 'goa-date-cursor-style';
3563
+ style.textContent = `
3564
+ input[type="date"] { cursor: pointer !important; }
3565
+ input[type="date"]:disabled { cursor: not-allowed !important; }
3566
+ `;
3567
+ sr.appendChild(style);
3568
+ };
3556
3569
 
3557
3570
  let _$b = t => t,
3558
3571
  _t$c,
@@ -7627,19 +7640,6 @@ const GoADateInput = props => {
7627
7640
  } else if (!allowPastDate && allowFutureDate) {
7628
7641
  minDate = todayLocalYmd();
7629
7642
  }
7630
- const ensureGoaDatePointerCursor = host => {
7631
- if (!host) return;
7632
- const sr = host.shadowRoot;
7633
- if (!sr) return;
7634
- if (sr.getElementById('goa-date-cursor-style')) return;
7635
- const style = document.createElement('style');
7636
- style.id = 'goa-date-cursor-style';
7637
- style.textContent = `
7638
- input[type="date"] { cursor: pointer !important; }
7639
- input[type="date"]:disabled { cursor: not-allowed !important; }
7640
- `;
7641
- sr.appendChild(style);
7642
- };
7643
7643
  const hostRef = useRef(null);
7644
7644
  useEffect(() => {
7645
7645
  var _hostRef$current, _host$shadowRoot;
@@ -16970,6 +16970,13 @@ const FullNameDobControl = props => {
16970
16970
  setErrors(err);
16971
16971
  };
16972
16972
  useSyncAutofillFields(['firstName', 'middleName', 'lastName', 'dateOfBirth'], formData, updateFormData, handleRequiredFieldBlur);
16973
+ const hostRef = useRef(null);
16974
+ useEffect(() => {
16975
+ var _hostRef$current, _host$shadowRoot;
16976
+ const host = (_hostRef$current = hostRef.current) != null ? _hostRef$current : document.querySelector('goa-input[type="date"]');
16977
+ host == null || (_host$shadowRoot = host.shadowRoot) == null || _host$shadowRoot.querySelector('input[type="date"]');
16978
+ ensureGoaDatePointerCursor(host);
16979
+ }, []);
16973
16980
  /* istanbul ignore next */
16974
16981
  useEffect(() => {
16975
16982
  if (stepperState != null && stepperState.targetScope && stepperState.targetScope === uischema.scope && controlRef.current) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "2.47.7",
3
+ "version": "2.47.8",
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",
@@ -80,3 +80,4 @@ export declare const onChangeForNumericControl: (props: EventChangeControlProps)
80
80
  * @returns {string[]}
81
81
  */
82
82
  export declare const onChangeForCheckboxData: (data: any, name: string, value: string) => any;
83
+ export declare const ensureGoaDatePointerCursor: (host: Element | null) => void;