@commercelayer/app-elements 2.2.9 → 2.3.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/dist/{InputDateComponent-BndjVyG2.js → InputDateComponent-Cu4p3vdh.js} +1 -1
- package/dist/{main-DVER16S7.js → main-CGIaJFpK.js} +10759 -10461
- package/dist/main.js +1 -1
- package/dist/ui/atoms/Icon/icons.d.ts +2 -0
- package/dist/ui/composite/HomePageLayout.d.ts +6 -1
- package/dist/ui/forms/InputDateRange/InputDateRange.d.ts +17 -13
- package/dist/ui/forms/InputSelect/AsyncComponent.d.ts +4 -8
- package/dist/ui/forms/InputSelect/AsyncCreatableComponent.d.ts +5 -0
- package/dist/ui/forms/InputSelect/CreatableComponent.d.ts +1 -2
- package/dist/ui/forms/InputSelect/GenericAsyncComponent.d.ts +12 -0
- package/dist/ui/forms/InputSelect/SelectComponent.d.ts +1 -2
- package/dist/ui/resources/ResourceList/adaptMetricsOrderToCore.d.ts +69 -0
- package/dist/ui/resources/ResourceList/adaptMetricsOrderToCore.test.d.ts +1 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { aE as s, bh as t, aF as o, aG as r, aH as n, aI as u, aJ as c, aK as i, aL as l, aM as p, bi as d, aN as b, aO as g, au as m, bj as S, bk as I, bl as k, bm as D, aP as T, ay as R, az as y, aQ as h, aR as A, bn as C, bA as H, bB as F, bD as P, bF as f, bH as v, bL as B, bN as O, bS as G, bV as L, bY as N, c3 as w, c5 as E, c7 as V, c9 as x, cb as M, cf as W, cg as J, aS as U, aT as Y, bC as j, bE as q, bG as z, bI as X, bK as Z, bM as _, bO as $, bP as K, bQ as Q, bR as aa, bT as ea, bU as sa, bW as ta, bZ as oa, c4 as ra, c6 as na, c8 as ua, ca, cc as ia, cd as la, ce as pa, bo as da, bp as ba, bq as ga, br as ma, aB as Sa, bs as Ia, aU as ka, bt as Da, bu as Ta, aV as Ra, aW as ya, aX as ha, aY as Aa, bv as Ca, cj as Ha, ck as Fa, cn as Pa, co as fa, cp as va, cq as Ba, cr as Oa, cs as Ga, ct as La, aZ as Na, bw as wa, a_ as Ea, a$ as Va, b0 as xa, b1 as Ma, b3 as Wa, b4 as Ja, b5 as Ua, b6 as Ya, b7 as ja, bc as qa, b8 as za, bx as Xa, bd as Za, be as _a, b9 as $a, bf as Ka, ba as Qa, by as ae, aC as ee, bz as se, bg as te, bb as oe, aa as re, ax as ne, ad as ue, ae as ce, Z as ie, _ as le, a9 as pe, b_ as de, bJ as be, $ as ge, a0 as me, a1 as Se, ab as Ie, ac as ke, af as De, cv as Te, cw as Re, b$ as ye, a2 as he, a3 as Ae, a4 as Ce, cx as He, cy as Fe, cz as Pe, cA as fe, cB as ve, ag as Be, ah as Oe, cC as Ge, cD as Le, cE as Ne, cF as we, ai as Ee, aj as Ve, cG as xe, cH as Me, cI as We, am as Je, an as Ue, V as Ye, ak as je, al as qe, X as ze, c0 as Xe, c1 as Ze, c2 as _e, a5 as $e, W as Ke, Y as Qe, a6 as as, cl as es, ch as ss, a7 as ts, a8 as os, ao as rs, av as ns, aw as us, ap as cs, aq as is, bX as ls, ar as ps, as as ds, at as bs, cm as gs, cu as ms, aA as Ss, aD as Is, ci as ks, b2 as Ds } from "./main-
|
|
2
|
+
import { aE as s, bh as t, aF as o, aG as r, aH as n, aI as u, aJ as c, aK as i, aL as l, aM as p, bi as d, aN as b, aO as g, au as m, bj as S, bk as I, bl as k, bm as D, aP as T, ay as R, az as y, aQ as h, aR as A, bn as C, bA as H, bB as F, bD as P, bF as f, bH as v, bL as B, bN as O, bS as G, bV as L, bY as N, c3 as w, c5 as E, c7 as V, c9 as x, cb as M, cf as W, cg as J, aS as U, aT as Y, bC as j, bE as q, bG as z, bI as X, bK as Z, bM as _, bO as $, bP as K, bQ as Q, bR as aa, bT as ea, bU as sa, bW as ta, bZ as oa, c4 as ra, c6 as na, c8 as ua, ca, cc as ia, cd as la, ce as pa, bo as da, bp as ba, bq as ga, br as ma, aB as Sa, bs as Ia, aU as ka, bt as Da, bu as Ta, aV as Ra, aW as ya, aX as ha, aY as Aa, bv as Ca, cj as Ha, ck as Fa, cn as Pa, co as fa, cp as va, cq as Ba, cr as Oa, cs as Ga, ct as La, aZ as Na, bw as wa, a_ as Ea, a$ as Va, b0 as xa, b1 as Ma, b3 as Wa, b4 as Ja, b5 as Ua, b6 as Ya, b7 as ja, bc as qa, b8 as za, bx as Xa, bd as Za, be as _a, b9 as $a, bf as Ka, ba as Qa, by as ae, aC as ee, bz as se, bg as te, bb as oe, aa as re, ax as ne, ad as ue, ae as ce, Z as ie, _ as le, a9 as pe, b_ as de, bJ as be, $ as ge, a0 as me, a1 as Se, ab as Ie, ac as ke, af as De, cv as Te, cw as Re, b$ as ye, a2 as he, a3 as Ae, a4 as Ce, cx as He, cy as Fe, cz as Pe, cA as fe, cB as ve, ag as Be, ah as Oe, cC as Ge, cD as Le, cE as Ne, cF as we, ai as Ee, aj as Ve, cG as xe, cH as Me, cI as We, am as Je, an as Ue, V as Ye, ak as je, al as qe, X as ze, c0 as Xe, c1 as Ze, c2 as _e, a5 as $e, W as Ke, Y as Qe, a6 as as, cl as es, ch as ss, a7 as ts, a8 as os, ao as rs, av as ns, aw as us, ap as cs, aq as is, bX as ls, ar as ps, as as ds, at as bs, cm as gs, cu as ms, aA as Ss, aD as Is, ci as ks, b2 as Ds } from "./main-CGIaJFpK.js";
|
|
3
3
|
export {
|
|
4
4
|
s as A,
|
|
5
5
|
t as ActionButtons,
|
|
@@ -23,6 +23,7 @@ export declare const iconMapping: {
|
|
|
23
23
|
readonly calculator: phosphor.Icon;
|
|
24
24
|
readonly calendarBlank: phosphor.Icon;
|
|
25
25
|
readonly calendarCheck: phosphor.Icon;
|
|
26
|
+
readonly calendarDots: phosphor.Icon;
|
|
26
27
|
readonly camera: phosphor.Icon;
|
|
27
28
|
readonly caretDown: phosphor.Icon;
|
|
28
29
|
readonly caretRight: phosphor.Icon;
|
|
@@ -56,6 +57,7 @@ export declare const iconMapping: {
|
|
|
56
57
|
readonly info: phosphor.Icon;
|
|
57
58
|
readonly lifebuoy: phosphor.Icon;
|
|
58
59
|
readonly lightbulbFilament: phosphor.Icon;
|
|
60
|
+
readonly lightning: phosphor.Icon;
|
|
59
61
|
readonly linkSimple: phosphor.Icon;
|
|
60
62
|
readonly list: phosphor.Icon;
|
|
61
63
|
readonly lockSimple: phosphor.Icon;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { PageHeadingProps } from '../atoms/PageHeading';
|
|
2
|
+
import { PageHeadingToolbarProps } from '../atoms/PageHeading/PageHeadingToolbar';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
3
4
|
|
|
4
5
|
export interface HomePageLayoutProps extends Pick<PageHeadingProps, 'title'> {
|
|
@@ -6,12 +7,16 @@ export interface HomePageLayoutProps extends Pick<PageHeadingProps, 'title'> {
|
|
|
6
7
|
* Page content
|
|
7
8
|
*/
|
|
8
9
|
children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* When set, it will render a proper toolbar on the right side of the first row
|
|
12
|
+
*/
|
|
13
|
+
toolbar?: PageHeadingToolbarProps;
|
|
9
14
|
}
|
|
10
15
|
/**
|
|
11
16
|
* This component renders a standard `PageLayout` but holds some logic
|
|
12
17
|
* to define some default behavior for the home page, such as the navigation button label and action.
|
|
13
18
|
*/
|
|
14
|
-
export declare function HomePageLayout({ title, children }: HomePageLayoutProps): JSX.Element;
|
|
19
|
+
export declare function HomePageLayout({ title, children, toolbar }: HomePageLayoutProps): JSX.Element;
|
|
15
20
|
export declare namespace HomePageLayout {
|
|
16
21
|
var displayName: string;
|
|
17
22
|
}
|
|
@@ -1,22 +1,26 @@
|
|
|
1
1
|
import { InputWrapperBaseProps } from '../../internals/InputWrapper';
|
|
2
2
|
import { InputDateProps, MaybeDate } from '../InputDate/InputDateComponent';
|
|
3
3
|
|
|
4
|
-
export interface InputDateRangeProps extends Pick<InputDateProps, 'isClearable' | 'format' | 'autoPlaceholder'>, InputWrapperBaseProps {
|
|
5
|
-
/**
|
|
6
|
-
* a tuple that represents the [from, to] dates
|
|
7
|
-
*/
|
|
4
|
+
export interface InputDateRangeProps extends Pick<InputDateProps, 'isClearable' | 'format' | 'autoPlaceholder' | 'showTimeSelect'>, InputWrapperBaseProps {
|
|
5
|
+
/** a tuple that represents the [from, to] dates */
|
|
8
6
|
value: [MaybeDate, MaybeDate];
|
|
9
|
-
/**
|
|
10
|
-
* callback triggered when one of the two dates changes
|
|
11
|
-
*/
|
|
7
|
+
/** callback triggered when one of the two dates changes */
|
|
12
8
|
onChange: (dates: [MaybeDate, MaybeDate]) => void;
|
|
13
|
-
/**
|
|
14
|
-
|
|
15
|
-
|
|
9
|
+
/** label to be displayed on the `from` date input. */
|
|
10
|
+
fromLabel?: string;
|
|
11
|
+
/** optional placeholder text for the `from` date */
|
|
16
12
|
fromPlaceholder?: string;
|
|
17
|
-
/**
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
/** optional hint text for the `from` date */
|
|
14
|
+
fromHint?: InputWrapperBaseProps['hint'];
|
|
15
|
+
/** label to be displayed on the `to` date input */
|
|
16
|
+
/** optional feedback message for the `from` date */
|
|
17
|
+
fromFeedback?: InputWrapperBaseProps['feedback'];
|
|
18
|
+
toLabel?: string;
|
|
19
|
+
/** optional placeholder text for the `to` date */
|
|
20
20
|
toPlaceholder?: string;
|
|
21
|
+
/** optional hint text for the `to` date */
|
|
22
|
+
toHint?: InputWrapperBaseProps['hint'];
|
|
23
|
+
/** optional feedback message for the `to` date */
|
|
24
|
+
toFeedback?: InputWrapperBaseProps['feedback'];
|
|
21
25
|
}
|
|
22
26
|
export declare const InputDateRange: import('react').ForwardRefExoticComponent<InputDateRangeProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import { GroupBase, SelectInstance
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { GroupBase, SelectInstance } from 'react-select';
|
|
2
|
+
import { GenericAsyncSelectComponentProps } from './GenericAsyncComponent';
|
|
3
|
+
import { InputSelectValue } from './InputSelect';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
styles: StylesConfig<InputSelectValue>;
|
|
7
|
-
}
|
|
8
|
-
export declare const AsyncSelectComponent: import('react').ForwardRefExoticComponent<AsyncSelectComponentProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
9
|
-
export {};
|
|
5
|
+
export declare const AsyncSelectComponent: import('react').ForwardRefExoticComponent<GenericAsyncSelectComponentProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { GroupBase, SelectInstance } from 'react-select';
|
|
2
|
+
import { GenericAsyncSelectComponentProps } from './GenericAsyncComponent';
|
|
3
|
+
import { InputSelectValue } from './InputSelect';
|
|
4
|
+
|
|
5
|
+
export declare const AsyncCreatableSelectComponent: import('react').ForwardRefExoticComponent<GenericAsyncSelectComponentProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GroupBase, SelectInstance, StylesConfig } from 'react-select';
|
|
2
2
|
import { InputSelectProps, InputSelectValue } from './InputSelect';
|
|
3
3
|
|
|
4
|
-
interface CreatableComponentProps extends Omit<InputSelectProps, 'loadAsyncValues' | 'label' | 'hint'> {
|
|
4
|
+
export interface CreatableComponentProps extends Omit<InputSelectProps, 'loadAsyncValues' | 'label' | 'hint'> {
|
|
5
5
|
styles: StylesConfig<InputSelectValue>;
|
|
6
6
|
}
|
|
7
7
|
export declare const CreatableComponent: import('react').ForwardRefExoticComponent<CreatableComponentProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
8
|
-
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { GroupBase, SelectInstance, StylesConfig } from 'react-select';
|
|
2
|
+
import { default as AsyncSelect } from 'react-select/async';
|
|
3
|
+
import { default as AsyncCreatableSelect } from 'react-select/async-creatable';
|
|
4
|
+
import { SetRequired } from 'type-fest';
|
|
5
|
+
import { InputSelectProps, InputSelectValue } from './InputSelect';
|
|
6
|
+
|
|
7
|
+
export interface GenericAsyncSelectComponentProps extends Omit<SetRequired<InputSelectProps, 'loadAsyncValues'>, 'label' | 'hint'> {
|
|
8
|
+
styles: StylesConfig<InputSelectValue>;
|
|
9
|
+
}
|
|
10
|
+
export declare const GenericAsyncSelectComponent: import('react').ForwardRefExoticComponent<GenericAsyncSelectComponentProps & {
|
|
11
|
+
SelectComponent: AsyncSelect | AsyncCreatableSelect;
|
|
12
|
+
} & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { GroupBase, SelectInstance, StylesConfig } from 'react-select';
|
|
2
2
|
import { InputSelectProps, InputSelectValue } from './InputSelect';
|
|
3
3
|
|
|
4
|
-
interface SelectComponentProps extends Omit<InputSelectProps, 'loadAsyncValues' | 'label' | 'hint'> {
|
|
4
|
+
export interface SelectComponentProps extends Omit<InputSelectProps, 'loadAsyncValues' | 'label' | 'hint'> {
|
|
5
5
|
styles: StylesConfig<InputSelectValue>;
|
|
6
6
|
}
|
|
7
7
|
export declare const SelectComponent: import('react').ForwardRefExoticComponent<SelectComponentProps & import('react').RefAttributes<SelectInstance<InputSelectValue, boolean, GroupBase<InputSelectValue>>>>;
|
|
8
|
-
export {};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { Order } from '@commercelayer/sdk';
|
|
2
|
+
|
|
3
|
+
export interface MetricsResourceOrder {
|
|
4
|
+
id: string;
|
|
5
|
+
type: 'orders';
|
|
6
|
+
adjustment_amount?: number;
|
|
7
|
+
adjustment_tax_amount?: number;
|
|
8
|
+
adjustment_taxable_amount?: number;
|
|
9
|
+
country_code?: string | null;
|
|
10
|
+
created_at?: string;
|
|
11
|
+
currency_code?: string;
|
|
12
|
+
discount_amount?: number;
|
|
13
|
+
fulfillment_status?: string;
|
|
14
|
+
gift_card_amount?: number;
|
|
15
|
+
guest?: boolean;
|
|
16
|
+
language_code?: string;
|
|
17
|
+
line_item_options_count?: number;
|
|
18
|
+
number?: string;
|
|
19
|
+
payment_method_amount?: number;
|
|
20
|
+
payment_method_tax_amount?: number;
|
|
21
|
+
payment_method_taxable_amount?: number;
|
|
22
|
+
payment_status?: string;
|
|
23
|
+
payment_updated_at?: string;
|
|
24
|
+
placed_at?: string;
|
|
25
|
+
shipments_count?: number;
|
|
26
|
+
shipping_amount?: number;
|
|
27
|
+
shipping_taxable_amount?: number;
|
|
28
|
+
skus_count?: number;
|
|
29
|
+
status?: string;
|
|
30
|
+
subtotal_amount?: number;
|
|
31
|
+
subtotal_tax_amount?: number;
|
|
32
|
+
subtotal_taxable_amount?: number;
|
|
33
|
+
tax_included?: boolean;
|
|
34
|
+
total_amount?: number;
|
|
35
|
+
total_amount_with_taxes?: number;
|
|
36
|
+
total_tax_amount?: number;
|
|
37
|
+
total_taxable_amount?: number;
|
|
38
|
+
returned?: boolean;
|
|
39
|
+
updated_at?: string;
|
|
40
|
+
seconds_in_draft?: number;
|
|
41
|
+
refunded?: boolean;
|
|
42
|
+
refunds_total_amount_with_taxes?: number;
|
|
43
|
+
total_amount_with_taxes_net_of_refunds?: number;
|
|
44
|
+
aggregated_details?: string;
|
|
45
|
+
mode?: string;
|
|
46
|
+
placed_day_of_week?: number;
|
|
47
|
+
discounted?: boolean;
|
|
48
|
+
gift_card?: boolean;
|
|
49
|
+
coupon?: boolean;
|
|
50
|
+
options?: boolean;
|
|
51
|
+
archived?: boolean;
|
|
52
|
+
market?: {
|
|
53
|
+
id: string;
|
|
54
|
+
name?: string;
|
|
55
|
+
number?: string;
|
|
56
|
+
};
|
|
57
|
+
billing_address?: {
|
|
58
|
+
business?: boolean;
|
|
59
|
+
city?: string;
|
|
60
|
+
country_code?: string;
|
|
61
|
+
geocoded?: boolean;
|
|
62
|
+
localized?: boolean;
|
|
63
|
+
state_code?: string;
|
|
64
|
+
zip_code?: string;
|
|
65
|
+
first_name?: string;
|
|
66
|
+
last_name?: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
export declare function adaptMetricsOrderToCore(metricsOrder: MetricsResourceOrder): Order;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|