@commercelayer/app-elements 1.17.0 → 1.17.2
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-Ba_0quKu.js → InputDateComponent-DocNjnnQ.js} +1 -1
- package/dist/dictionaries/promotions.d.ts +1 -1
- package/dist/{main-BlYhThqr.js → main-bvrBIWhO.js} +404 -395
- package/dist/main.js +1 -1
- package/dist/ui/resources/ResourceListItem/ResourceListItem.mocks.d.ts +3 -15
- package/dist/ui/resources/ResourceListItem/transformers/promotions.d.ts +0 -3
- package/dist/ui/resources/useResourceFilters/FiltersSearchBar.d.ts +3 -6
- package/dist/ui/resources/useResourceFilters/useResourceFilters.d.ts +5 -0
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { a4 as s, aK as t, a5 as o, a6 as r, a7 as n, a8 as u, a9 as i, aa as l, ab as p, ac as b, ad as c, aL as d, ae as g, af as S, V as m, aM as I, aN as k, aO as T, aP as D, ag as R, Z as y, _ as h, ah as C, ai as H, aQ as P, b0 as A, b1 as f, b3 as B, b5 as F, b7 as v, bb as L, bd as N, bi as O, bl as G, bn as w, bu as V, bw as x, by as E, bA as M, bC as W, bG as J, bH as U, aj as Y, ak as q, b2 as z, b4 as K, b6 as Q, b8 as Z, ba as _, bc as $, be as j, bf as X, bg as aa, bh as ea, bj as sa, bk as ta, bm as oa, bo as ra, bv as na, bx as ua, bz as ia, bB as la, bD as pa, bE as ba, bF as ca, aR as da, aS as ga, aT as Sa, aU as ma, a0 as Ia, aV as ka, al as Ta, aW as Da, aX as Ra, am as ya, an as ha, ao as Ca, ap as Ha, aY as Pa, bK as Aa, bL as fa, bM as Ba, bN as Fa, bO as va, bP as La, bQ as Na, bR as Oa, aq as Ga, aZ as wa, ar as Va, as as xa, at as Ea, au as Ma, aw as Wa, ax as Ja, ay as Ua, az as Ya, aA as qa, aF as za, aB as Ka, a_ as Qa, aG as Za, aH as _a, aC as $a, aI as ja, aD as Xa, a$ as ae, a1 as ee, aJ as se, aE as te, B as oe, a3 as re, E as ne, F as ue, k as ie, A as le, bp as pe, b9 as be, l as ce, m as de, q as ge, C as Se, D as me, G as Ie, bT as ke, bU as Te, bq as De, s as Re, t as ye, u as he, v as Ce, bV as He, bW as Pe, bX as Ae, bY as fe, bZ as Be, H as Fe, J as ve, b_ as Le, b$ as Ne, c0 as Oe, c1 as Ge, K as we, L as Ve, c2 as xe, c3 as Ee, c4 as Me, O as We, P as Je, e as Ue, M as Ye, N as qe, h as ze, br as Ke, bs as Qe, bt as Ze, n as _e, r as $e, x as je, bI as Xe, y as as, z as es, Q as ss, W as ts, Y as os, R as rs, S as ns, T as us, U as is, bS as ls, $ as ps, a2 as bs, bJ as cs, av as ds } from "./main-
|
|
2
|
+
import { a4 as s, aK as t, a5 as o, a6 as r, a7 as n, a8 as u, a9 as i, aa as l, ab as p, ac as b, ad as c, aL as d, ae as g, af as S, V as m, aM as I, aN as k, aO as T, aP as D, ag as R, Z as y, _ as h, ah as C, ai as H, aQ as P, b0 as A, b1 as f, b3 as B, b5 as F, b7 as v, bb as L, bd as N, bi as O, bl as G, bn as w, bu as V, bw as x, by as E, bA as M, bC as W, bG as J, bH as U, aj as Y, ak as q, b2 as z, b4 as K, b6 as Q, b8 as Z, ba as _, bc as $, be as j, bf as X, bg as aa, bh as ea, bj as sa, bk as ta, bm as oa, bo as ra, bv as na, bx as ua, bz as ia, bB as la, bD as pa, bE as ba, bF as ca, aR as da, aS as ga, aT as Sa, aU as ma, a0 as Ia, aV as ka, al as Ta, aW as Da, aX as Ra, am as ya, an as ha, ao as Ca, ap as Ha, aY as Pa, bK as Aa, bL as fa, bM as Ba, bN as Fa, bO as va, bP as La, bQ as Na, bR as Oa, aq as Ga, aZ as wa, ar as Va, as as xa, at as Ea, au as Ma, aw as Wa, ax as Ja, ay as Ua, az as Ya, aA as qa, aF as za, aB as Ka, a_ as Qa, aG as Za, aH as _a, aC as $a, aI as ja, aD as Xa, a$ as ae, a1 as ee, aJ as se, aE as te, B as oe, a3 as re, E as ne, F as ue, k as ie, A as le, bp as pe, b9 as be, l as ce, m as de, q as ge, C as Se, D as me, G as Ie, bT as ke, bU as Te, bq as De, s as Re, t as ye, u as he, v as Ce, bV as He, bW as Pe, bX as Ae, bY as fe, bZ as Be, H as Fe, J as ve, b_ as Le, b$ as Ne, c0 as Oe, c1 as Ge, K as we, L as Ve, c2 as xe, c3 as Ee, c4 as Me, O as We, P as Je, e as Ue, M as Ye, N as qe, h as ze, br as Ke, bs as Qe, bt as Ze, n as _e, r as $e, x as je, bI as Xe, y as as, z as es, Q as ss, W as ts, Y as os, R as rs, S as ns, T as us, U as is, bS as ls, $ as ps, a2 as bs, bJ as cs, av as ds } from "./main-bvrBIWhO.js";
|
|
3
3
|
export {
|
|
4
4
|
s as A,
|
|
5
5
|
t as ActionButtons,
|
|
@@ -583,7 +583,6 @@ export declare const presetResourceListItem: {
|
|
|
583
583
|
};
|
|
584
584
|
promotionActive: {
|
|
585
585
|
type: "percentage_discount_promotions";
|
|
586
|
-
reference_origin: "app-promotions";
|
|
587
586
|
id: string;
|
|
588
587
|
created_at: string;
|
|
589
588
|
updated_at: string;
|
|
@@ -596,7 +595,6 @@ export declare const presetResourceListItem: {
|
|
|
596
595
|
};
|
|
597
596
|
promotionDisabled: {
|
|
598
597
|
type: "percentage_discount_promotions";
|
|
599
|
-
reference_origin: "app-promotions";
|
|
600
598
|
id: string;
|
|
601
599
|
created_at: string;
|
|
602
600
|
updated_at: string;
|
|
@@ -610,7 +608,6 @@ export declare const presetResourceListItem: {
|
|
|
610
608
|
};
|
|
611
609
|
promotionUpcoming: {
|
|
612
610
|
type: "free_shipping_promotions";
|
|
613
|
-
reference_origin: "app-promotions";
|
|
614
611
|
id: string;
|
|
615
612
|
created_at: string;
|
|
616
613
|
updated_at: string;
|
|
@@ -622,7 +619,6 @@ export declare const presetResourceListItem: {
|
|
|
622
619
|
};
|
|
623
620
|
promotionDisabledAndUpcoming: {
|
|
624
621
|
type: "free_shipping_promotions";
|
|
625
|
-
reference_origin: "app-promotions";
|
|
626
622
|
id: string;
|
|
627
623
|
created_at: string;
|
|
628
624
|
updated_at: string;
|
|
@@ -635,7 +631,6 @@ export declare const presetResourceListItem: {
|
|
|
635
631
|
};
|
|
636
632
|
promotionExpired: {
|
|
637
633
|
type: "free_gift_promotions";
|
|
638
|
-
reference_origin: "app-promotions";
|
|
639
634
|
id: string;
|
|
640
635
|
created_at: string;
|
|
641
636
|
updated_at: string;
|
|
@@ -645,9 +640,8 @@ export declare const presetResourceListItem: {
|
|
|
645
640
|
total_usage_limit: number;
|
|
646
641
|
active: false;
|
|
647
642
|
};
|
|
648
|
-
|
|
643
|
+
promotionUsed: {
|
|
649
644
|
type: "percentage_discount_promotions";
|
|
650
|
-
reference_origin: "app-promotions";
|
|
651
645
|
id: string;
|
|
652
646
|
created_at: string;
|
|
653
647
|
updated_at: string;
|
|
@@ -655,17 +649,11 @@ export declare const presetResourceListItem: {
|
|
|
655
649
|
expires_at: string;
|
|
656
650
|
name: string;
|
|
657
651
|
percentage: number;
|
|
652
|
+
total_usage_count: number;
|
|
658
653
|
total_usage_limit: number;
|
|
659
654
|
active: true;
|
|
660
|
-
coupons: {
|
|
661
|
-
code: string;
|
|
662
|
-
created_at: string;
|
|
663
|
-
id: string;
|
|
664
|
-
type: "coupons";
|
|
665
|
-
updated_at: string;
|
|
666
|
-
}[];
|
|
667
655
|
};
|
|
668
|
-
|
|
656
|
+
promotionWithCoupons: {
|
|
669
657
|
type: "percentage_discount_promotions";
|
|
670
658
|
id: string;
|
|
671
659
|
created_at: string;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
1
|
import type { Promotion } from '@commercelayer/sdk';
|
|
2
2
|
import { type ResourceToProps } from '../types';
|
|
3
|
-
export declare const referenceOrigins: {
|
|
4
|
-
readonly appPromotions: "app-promotions";
|
|
5
|
-
};
|
|
6
3
|
export declare const promotionToProps: ResourceToProps<Omit<Promotion, 'type'>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { type SearchBarProps } from '../../composite/SearchBar';
|
|
2
3
|
import { type FiltersInstructions } from './types';
|
|
3
|
-
export interface FilterSearchBarProps {
|
|
4
|
+
export interface FilterSearchBarProps extends Pick<SearchBarProps, 'placeholder' | 'debounceMs'> {
|
|
4
5
|
/**
|
|
5
6
|
* Array of instruction items to build the filters behaviors
|
|
6
7
|
*/
|
|
@@ -16,10 +17,6 @@ export interface FilterSearchBarProps {
|
|
|
16
17
|
* It must be "reactive", so most of the time it should come for router.
|
|
17
18
|
*/
|
|
18
19
|
queryString: string;
|
|
19
|
-
/**
|
|
20
|
-
* Input placeholder
|
|
21
|
-
*/
|
|
22
|
-
placeholder?: string;
|
|
23
20
|
/**
|
|
24
21
|
* By default, we strip out all filters that are not part of the `instructions` array.
|
|
25
22
|
* The option `predicateWhitelist` is used to whitelist a set of predicates that you want to use as filters.
|
|
@@ -34,7 +31,7 @@ export interface FilterSearchBarProps {
|
|
|
34
31
|
*/
|
|
35
32
|
predicateWhitelist: string[];
|
|
36
33
|
}
|
|
37
|
-
declare function FiltersSearchBar({ instructions, placeholder, onUpdate, queryString, predicateWhitelist }: FilterSearchBarProps): JSX.Element;
|
|
34
|
+
declare function FiltersSearchBar({ instructions, placeholder, onUpdate, queryString, predicateWhitelist, debounceMs }: FilterSearchBarProps): JSX.Element;
|
|
38
35
|
declare namespace FiltersSearchBar {
|
|
39
36
|
var displayName: string;
|
|
40
37
|
}
|
|
@@ -46,6 +46,11 @@ interface UseResourceFiltersHook {
|
|
|
46
46
|
* @default 'Search...'
|
|
47
47
|
*/
|
|
48
48
|
searchBarPlaceholder?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Milliseconds to wait before triggering the search bar callback
|
|
51
|
+
* @default 500
|
|
52
|
+
*/
|
|
53
|
+
searchBarDebounceMs?: number;
|
|
49
54
|
}) => JSX.Element;
|
|
50
55
|
/**
|
|
51
56
|
* Form component with filters fields based on provided instructions
|