@abgov/jsonforms-components 2.47.7 → 2.47.9

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;
@@ -10470,11 +10470,13 @@ const ContextProviderFactory = () => new ContextProviderClass().setup;
10470
10470
  const JsonFormContext = /*#__PURE__*/createContext(null);
10471
10471
 
10472
10472
  const RenderStepElements = props => {
10473
+ var _props$category;
10473
10474
  const memoizedSchema = useMemo(() => Object.assign({}, props.schema), [props.schema]);
10474
10475
  return jsx(Visible, {
10475
10476
  visible: props.visible,
10476
- "data-testid": `${props.path}-categories-${props.categoryIndex}`,
10477
+ "data-testid": `${(props == null ? void 0 : props.path) || ((_props$category = props.category) == null ? void 0 : _props$category.label)}-categories-${props.categoryIndex}`,
10477
10478
  children: props.category.elements.map((uiSchema, index) => {
10479
+ var _props$category2;
10478
10480
  return jsx(JsonFormsDispatch, {
10479
10481
  schema: memoizedSchema,
10480
10482
  uischema: uiSchema,
@@ -10483,7 +10485,7 @@ const RenderStepElements = props => {
10483
10485
  path: props.path,
10484
10486
  visible: props.visible,
10485
10487
  enabled: props.enabled
10486
- }, `${props.path}-category-page-${index}`);
10488
+ }, `${(props == null ? void 0 : props.path) || ((_props$category2 = props.category) == null ? void 0 : _props$category2.label)}-category-page-${index}`);
10487
10489
  })
10488
10490
  });
10489
10491
  };
@@ -16970,6 +16972,13 @@ const FullNameDobControl = props => {
16970
16972
  setErrors(err);
16971
16973
  };
16972
16974
  useSyncAutofillFields(['firstName', 'middleName', 'lastName', 'dateOfBirth'], formData, updateFormData, handleRequiredFieldBlur);
16975
+ const hostRef = useRef(null);
16976
+ useEffect(() => {
16977
+ var _hostRef$current, _host$shadowRoot;
16978
+ const host = (_hostRef$current = hostRef.current) != null ? _hostRef$current : document.querySelector('goa-input[type="date"]');
16979
+ host == null || (_host$shadowRoot = host.shadowRoot) == null || _host$shadowRoot.querySelector('input[type="date"]');
16980
+ ensureGoaDatePointerCursor(host);
16981
+ }, []);
16973
16982
  /* istanbul ignore next */
16974
16983
  useEffect(() => {
16975
16984
  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.9",
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;