@commercelayer/app-elements 1.24.3 → 2.0.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.
Files changed (51) hide show
  1. package/dist/{InputDateComponent-CleoXv8d.js → InputDateComponent-DQG3Ma3D.js} +1 -1
  2. package/dist/helpers/appsNavigation.d.ts +1 -1
  3. package/dist/helpers/currencies.d.ts +7 -0
  4. package/dist/helpers/resources.d.ts +1 -2
  5. package/dist/helpers/tracking.d.ts +8 -8
  6. package/dist/{main-DR41ueVi.js → main-Dk3oz_Du.js} +19021 -15100
  7. package/dist/main.d.ts +3 -3
  8. package/dist/main.js +78 -76
  9. package/dist/providers/CoreSdkProvider/useCoreApi.d.ts +1 -2
  10. package/dist/providers/TokenProvider/TokenProvider.d.ts +1 -2
  11. package/dist/providers/TokenProvider/types.d.ts +1 -1
  12. package/dist/style.css +1 -1
  13. package/dist/ui/atoms/Card.d.ts +12 -12
  14. package/dist/ui/atoms/Icon/icons.d.ts +1 -0
  15. package/dist/ui/atoms/{PageHeading.d.ts → PageHeading/PageHeading.d.ts} +7 -6
  16. package/dist/ui/atoms/PageHeading/PageHeading.test.d.ts +1 -0
  17. package/dist/ui/atoms/PageHeading/PageHeadingToolbar.d.ts +25 -0
  18. package/dist/ui/atoms/PageHeading/PageHeadingToolbar.test.d.ts +1 -0
  19. package/dist/ui/atoms/PageHeading/index.d.ts +1 -0
  20. package/dist/ui/composite/Dropdown/DropdownItem.d.ts +14 -14
  21. package/dist/ui/composite/PageLayout.d.ts +2 -2
  22. package/dist/ui/forms/InputRadioGroup/InputRadioGroup.d.ts +2 -2
  23. package/dist/ui/forms/InputReadonly.d.ts +1 -1
  24. package/dist/ui/forms/InputResourceGroup/FullList.d.ts +12 -6
  25. package/dist/ui/forms/InputResourceGroup/InputResourceGroup.d.ts +1 -1
  26. package/dist/ui/forms/InputResourceGroup/index.d.ts +1 -0
  27. package/dist/ui/forms/InputResourceGroup/utils.d.ts +1 -2
  28. package/dist/ui/forms/InputSelect/InputSelect.d.ts +1 -1
  29. package/dist/ui/forms/InputSelect/overrides.d.ts +3 -1
  30. package/dist/ui/forms/ReactHookForm/setApiFormErrors.d.ts +1 -1
  31. package/dist/ui/resources/ResourceAddress/ResourceAddress.d.ts +7 -0
  32. package/dist/ui/resources/ResourceAddress/ResourceAddress.mocks.d.ts +21 -0
  33. package/dist/ui/resources/ResourceAddress/ResourceAddressForm.d.ts +2 -0
  34. package/dist/ui/resources/ResourceAddress/ResourceAddressFormFields.d.ts +56 -1
  35. package/dist/ui/resources/ResourceAddress/useResourceAddressOverlay.d.ts +2 -1
  36. package/dist/ui/resources/ResourceList/ResourceList.d.ts +13 -5
  37. package/dist/ui/resources/ResourceList/infiniteFetcher.d.ts +1 -2
  38. package/dist/ui/resources/ResourceList/metricsApiClient.d.ts +1 -2
  39. package/dist/ui/resources/ResourceList/reducer.d.ts +1 -1
  40. package/dist/ui/resources/ResourceListItem/common.d.ts +2 -2
  41. package/dist/ui/resources/ResourceMetadata/ResourceMetadata.d.ts +1 -1
  42. package/dist/ui/resources/ResourceMetadata/ResourceMetadataForm.d.ts +1 -1
  43. package/dist/ui/resources/ResourceTags.d.ts +1 -1
  44. package/dist/ui/resources/useResourceFilters/adaptFormValuesToSdk.d.ts +1 -1
  45. package/dist/ui/resources/useResourceFilters/adaptSdkToMetrics.d.ts +1 -2
  46. package/dist/ui/resources/useResourceFilters/adaptSdkToUrlQuery.d.ts +1 -1
  47. package/dist/ui/resources/useResourceFilters/adaptUrlQueryToSdk.d.ts +1 -1
  48. package/dist/ui/resources/useResourceFilters/adapters.types.d.ts +1 -1
  49. package/dist/ui/resources/useResourceFilters/useResourceFilters.d.ts +1 -2
  50. package/package.json +3 -3
  51. /package/dist/{ui/atoms/PageHeading.test.d.ts → helpers/currencies.test.d.ts} +0 -0
@@ -2,7 +2,7 @@
2
2
  var qr = Object.defineProperty;
3
3
  var Gr = (a, n, t) => n in a ? qr(a, n, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[n] = t;
4
4
  var y = (a, n, t) => (Gr(a, typeof n != "symbol" ? n + "" : n, t), t);
5
- import { t as _, c as W, m as lt, a as pt, b as Ce, d as oe, g as Rt, e as zr, f as Xr, s as Ze, h as br, i as Zr, j as kr, k as _r, l as Jr, n as _t, o as en, w as Bt, p as tn, q as jt, r as rn, u as nn, v as Oe, x as Ut, y as an, z as on, A as Pe, B as _e, C as Ne, D as Je, E as xe, F as Ct, G as sn, H as Lt, I as cn, J as ln, K as et, L as tt, M as pn, N as un, O as dn, P as ve, Q as fn, R as hn, S as mn, T as gn, X as Dn } from "./main-DR41ueVi.js";
5
+ import { t as _, c as W, m as lt, a as pt, b as Ce, d as oe, g as Rt, e as zr, f as Xr, s as Ze, h as br, i as Zr, j as kr, k as _r, l as Jr, n as _t, o as en, w as Bt, p as tn, q as jt, r as rn, u as nn, v as Oe, x as Ut, y as an, z as on, A as Pe, B as _e, C as Ne, D as Je, E as xe, F as Ct, G as sn, H as Lt, I as cn, J as ln, K as et, L as tt, M as pn, N as un, O as dn, P as ve, Q as fn, R as hn, S as mn, T as gn, X as Dn } from "./main-Dk3oz_Du.js";
6
6
  import * as M from "react";
7
7
  import f, { createElement as yn, Component as vn, useLayoutEffect as Cr, useEffect as Mr, createRef as wn, forwardRef as bn } from "react";
8
8
  import * as kn from "react-dom";
@@ -67,6 +67,6 @@ interface NavigateToExternalParams {
67
67
  */
68
68
  export declare function navigateTo(params: NavigateToInternalParams | NavigateToExternalParams): {
69
69
  href: string;
70
- onClick: (e: React.MouseEvent<HTMLAnchorElement | HTMLDivElement, MouseEvent>) => void;
70
+ onClick: (e: React.MouseEvent<HTMLAnchorElement | HTMLDivElement | HTMLButtonElement, MouseEvent>) => void;
71
71
  } | null;
72
72
  export {};
@@ -1,3 +1,5 @@
1
+ import { GroupedSelectValues } from '../ui/forms/InputSelect/InputSelect';
2
+
1
3
  export interface Currency {
2
4
  symbol: string;
3
5
  subunit_to_unit: number;
@@ -2727,3 +2729,8 @@ export declare const currencies: {
2727
2729
  smallest_denomination: number;
2728
2730
  };
2729
2731
  };
2732
+ /**
2733
+ * List of all currencies ready to be used in the `InputSelect` component.
2734
+ * The list is grouped by the top currencies and the rest of the currencies.
2735
+ */
2736
+ export declare const currencyInputSelectOptions: GroupedSelectValues;
@@ -1,5 +1,4 @@
1
- import { ResourceUpdate } from '@commercelayer/sdk/lib/cjs/resource';
2
- import { ListableResourceType } from '@commercelayer/sdk/lib/cjs/api';
1
+ import { ListableResourceType, ResourceUpdate } from '@commercelayer/sdk';
3
2
 
4
3
  /**
5
4
  * Format a resource name for display in the UI based on the count and format.
@@ -60,27 +60,27 @@ declare const trackingDetailSchema: z.ZodObject<{
60
60
  zip: z.ZodNullable<z.ZodString>;
61
61
  }, "strip", z.ZodTypeAny, {
62
62
  object: "TrackingLocation";
63
+ country: string | null;
63
64
  city: string | null;
64
65
  state: string | null;
65
- country: string | null;
66
66
  zip: string | null;
67
67
  }, {
68
68
  object: "TrackingLocation";
69
+ country: string | null;
69
70
  city: string | null;
70
71
  state: string | null;
71
- country: string | null;
72
72
  zip: string | null;
73
73
  }>, SetNonNullable<{
74
74
  object: "TrackingLocation";
75
+ country: string | null;
75
76
  city: string | null;
76
77
  state: string | null;
77
- country: string | null;
78
78
  zip: string | null;
79
79
  }, "city"> | null, {
80
80
  object: "TrackingLocation";
81
+ country: string | null;
81
82
  city: string | null;
82
83
  state: string | null;
83
- country: string | null;
84
84
  zip: string | null;
85
85
  }>;
86
86
  description: z.ZodNullable<z.ZodString>;
@@ -89,15 +89,15 @@ declare const trackingDetailSchema: z.ZodObject<{
89
89
  object: "TrackingDetail";
90
90
  description: string | null;
91
91
  source: string | null;
92
- status: string | null;
93
92
  message: string | null;
93
+ status: string | null;
94
94
  status_detail: string | null;
95
95
  datetime: string | null;
96
96
  tracking_location: SetNonNullable<{
97
97
  object: "TrackingLocation";
98
+ country: string | null;
98
99
  city: string | null;
99
100
  state: string | null;
100
- country: string | null;
101
101
  zip: string | null;
102
102
  }, "city"> | null;
103
103
  carrier_code: string | null;
@@ -105,15 +105,15 @@ declare const trackingDetailSchema: z.ZodObject<{
105
105
  object: "TrackingDetail";
106
106
  description: string | null;
107
107
  source: string | null;
108
- status: string | null;
109
108
  message: string | null;
109
+ status: string | null;
110
110
  status_detail: string | null;
111
111
  datetime: string | null;
112
112
  tracking_location: {
113
113
  object: "TrackingLocation";
114
+ country: string | null;
114
115
  city: string | null;
115
116
  state: string | null;
116
- country: string | null;
117
117
  zip: string | null;
118
118
  };
119
119
  carrier_code: string | null;