@commercelayer/app-elements 5.7.0 → 6.0.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-NpCZmpgY.js → InputDateComponent-CRYU-ypz.js} +83 -83
- package/dist/{RuleEngineComponent-BbIy4caP.js → RuleEngineComponent-CtAd-_XC.js} +56 -57
- package/dist/{en-DdkLpGfg.js → en-DZFYYpbl.js} +1 -0
- package/dist/hooks/useViewJsonOverlay.d.ts +11 -0
- package/dist/{it-4Qxbs7VI.js → it-B_kKLza9.js} +1 -0
- package/dist/locales/en.d.ts +1 -0
- package/dist/{main-BqlK85T7.js → main-os-TPFjB.js} +8564 -7654
- package/dist/main.d.ts +1 -0
- package/dist/main.js +11 -10
- package/dist/{parseISO-B-bk2SyC.js → parseISO-B-vBXvVj.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/tailwind.global.css +314 -0
- package/dist/ui/atoms/Tooltip.d.ts +5 -0
- package/dist/ui/forms/InputCheckboxGroup/InputCheckboxGroupItem.d.ts +2 -1
- package/dist/ui/internals/Overlay.d.ts +21 -6
- package/dist/vendor.css +2 -1
- package/package.json +10 -10
- package/dist/CodeEditorComponent--5lVbv6t.js +0 -720
- package/dist/fetchCoreResourcesSuggestions-DLZhtrDX.js +0 -124
- package/dist/tailwind.config.js +0 -196
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
const c = /* @__PURE__ */ (() => {
|
|
3
|
-
let t;
|
|
4
|
-
return async (a = !0) => {
|
|
5
|
-
if (a) {
|
|
6
|
-
for (; t == null; )
|
|
7
|
-
await new Promise((e) => setTimeout(e, 100));
|
|
8
|
-
return t;
|
|
9
|
-
}
|
|
10
|
-
return t != null || (t = await fetch("https://core.commercelayer.io/api/public/resources").then(async (e) => await e.json()).then((e) => ({
|
|
11
|
-
data: e.data.concat([
|
|
12
|
-
{
|
|
13
|
-
id: "inventory",
|
|
14
|
-
type: "resources",
|
|
15
|
-
attributes: {
|
|
16
|
-
fields: {
|
|
17
|
-
available: {
|
|
18
|
-
type: "boolean",
|
|
19
|
-
desc: "Indicates if the sku is available."
|
|
20
|
-
},
|
|
21
|
-
quantity: {
|
|
22
|
-
type: "integer",
|
|
23
|
-
desc: "The available stock quantity."
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
relationships: {}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
]).map((s) => s.id === "sku" ? (delete s.attributes.fields.inventory, {
|
|
30
|
-
...s,
|
|
31
|
-
attributes: {
|
|
32
|
-
...s.attributes,
|
|
33
|
-
relationships: {
|
|
34
|
-
...s.attributes.relationships,
|
|
35
|
-
inventory: {
|
|
36
|
-
type: "has_one",
|
|
37
|
-
desc: "The associated inventory.",
|
|
38
|
-
required: "required",
|
|
39
|
-
creatable: !0,
|
|
40
|
-
updatable: !0,
|
|
41
|
-
filterable: !0,
|
|
42
|
-
sortable: !0,
|
|
43
|
-
parent_resource: "Api::SkuResource",
|
|
44
|
-
class_name: "Inventory"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}) : s)
|
|
49
|
-
})).then(
|
|
50
|
-
({ data: e }) => e.reduce((s, r, i, u) => ({
|
|
51
|
-
...s,
|
|
52
|
-
[r.id]: {
|
|
53
|
-
...r,
|
|
54
|
-
fields: Object.entries(r.attributes.fields).filter(([n]) => !n.startsWith("_")),
|
|
55
|
-
relationships: Object.entries(r.attributes.relationships).filter(([n]) => !n.startsWith("_")).filter(
|
|
56
|
-
([, n]) => e.find(
|
|
57
|
-
(o) => o.id === h(n.class_name)
|
|
58
|
-
) != null
|
|
59
|
-
)
|
|
60
|
-
}
|
|
61
|
-
}), {})
|
|
62
|
-
).catch((e) => {
|
|
63
|
-
throw e;
|
|
64
|
-
})), t;
|
|
65
|
-
};
|
|
66
|
-
})();
|
|
67
|
-
c(!1);
|
|
68
|
-
async function f(t, a) {
|
|
69
|
-
if (!new RegExp(`^(${t.join("|")})(.|$)`).test(a))
|
|
70
|
-
return t.map((r) => ({
|
|
71
|
-
value: r,
|
|
72
|
-
type: "relationship"
|
|
73
|
-
}));
|
|
74
|
-
const e = await p(a);
|
|
75
|
-
return [].concat(
|
|
76
|
-
e.resource?.fields.map(([r]) => ({
|
|
77
|
-
value: `${e.resourcePath}.${r}`,
|
|
78
|
-
type: "field"
|
|
79
|
-
})) ?? []
|
|
80
|
-
).concat(
|
|
81
|
-
e.resource?.relationships.map(([r]) => ({
|
|
82
|
-
value: `${e.resourcePath}.${r}`,
|
|
83
|
-
type: "relationship"
|
|
84
|
-
})) ?? []
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
async function p(t, a) {
|
|
88
|
-
const e = await c(), s = t.replace(/\.$/, "").split("."), r = s.shift();
|
|
89
|
-
return a ??= e[r ?? ""], s.reduce(
|
|
90
|
-
(i, u) => {
|
|
91
|
-
const n = i.resource?.relationships.find(
|
|
92
|
-
([l]) => l === u
|
|
93
|
-
)?.[1].class_name;
|
|
94
|
-
if (n == null) {
|
|
95
|
-
const l = i.resource?.fields.find(([d]) => d === u)?.[1];
|
|
96
|
-
return {
|
|
97
|
-
...i,
|
|
98
|
-
field: l != null ? {
|
|
99
|
-
...l,
|
|
100
|
-
name: u
|
|
101
|
-
} : void 0
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
const o = e[h(n)];
|
|
105
|
-
return o == null ? i : {
|
|
106
|
-
path: i.path,
|
|
107
|
-
resourcePath: `${i.resourcePath == null ? "" : `${i.resourcePath}.`}${u}`,
|
|
108
|
-
resource: o
|
|
109
|
-
};
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
path: t,
|
|
113
|
-
resourcePath: a != null ? r ?? "" : "",
|
|
114
|
-
resource: a
|
|
115
|
-
}
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
function h(t) {
|
|
119
|
-
return t.replace(/([A-Z])/g, "_$1").replace(/^_/, "").toLowerCase();
|
|
120
|
-
}
|
|
121
|
-
export {
|
|
122
|
-
p as a,
|
|
123
|
-
f
|
|
124
|
-
};
|
package/dist/tailwind.config.js
DELETED
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
const colorBrand = "#101111"
|
|
2
|
-
|
|
3
|
-
/** @type {(percentage: number) => string} */
|
|
4
|
-
function alphaToHex(percentage) {
|
|
5
|
-
return Math.floor((percentage * 255) / 100)
|
|
6
|
-
.toString(16)
|
|
7
|
-
.toUpperCase()
|
|
8
|
-
.padStart(2, "0")
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** @type {import('tailwindcss').Config} */
|
|
12
|
-
module.exports = {
|
|
13
|
-
content: ["./src/**/*.{js,ts,jsx,tsx}"],
|
|
14
|
-
theme: {
|
|
15
|
-
screens: {
|
|
16
|
-
md: "768px",
|
|
17
|
-
lg: "992px",
|
|
18
|
-
xl: "1280px",
|
|
19
|
-
},
|
|
20
|
-
container: {
|
|
21
|
-
screens: {
|
|
22
|
-
md: "632px",
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
borderRadius: {
|
|
26
|
-
DEFAULT: "0.313rem",
|
|
27
|
-
sm: "0.188rem",
|
|
28
|
-
md: "0.625rem",
|
|
29
|
-
full: "9999px",
|
|
30
|
-
},
|
|
31
|
-
colors: {
|
|
32
|
-
inherit: "inherit",
|
|
33
|
-
primary: {
|
|
34
|
-
light: `${colorBrand}${alphaToHex(80)}`,
|
|
35
|
-
DEFAULT: colorBrand,
|
|
36
|
-
50: "#F8F8F8",
|
|
37
|
-
100: "#EDEEEE",
|
|
38
|
-
200: "#E6E7E7",
|
|
39
|
-
300: "#BBBEBE",
|
|
40
|
-
400: "#878888",
|
|
41
|
-
500: "#686E6E",
|
|
42
|
-
600: "#404141",
|
|
43
|
-
700: "#343535",
|
|
44
|
-
800: "#282929",
|
|
45
|
-
900: "#1D1E1E",
|
|
46
|
-
},
|
|
47
|
-
transparent: "transparent",
|
|
48
|
-
black: "#101111",
|
|
49
|
-
white: "#fff",
|
|
50
|
-
violet: {
|
|
51
|
-
DEFAULT: "#666EFF",
|
|
52
|
-
50: "#ECF2FF",
|
|
53
|
-
100: "#DDE6FF",
|
|
54
|
-
200: "#C2D1FF",
|
|
55
|
-
300: "#9CB1FF",
|
|
56
|
-
400: "#7586FF",
|
|
57
|
-
500: "#666EFF",
|
|
58
|
-
600: "#3B36F5",
|
|
59
|
-
700: "#322AD8",
|
|
60
|
-
800: "#2925AE",
|
|
61
|
-
900: "#181650",
|
|
62
|
-
},
|
|
63
|
-
gray: {
|
|
64
|
-
50: "#F8F8F8",
|
|
65
|
-
100: "#EDEEEE",
|
|
66
|
-
200: "#E6E7E7",
|
|
67
|
-
300: "#BBBEBE",
|
|
68
|
-
400: "#878888",
|
|
69
|
-
500: "#686E6E",
|
|
70
|
-
600: "#404141",
|
|
71
|
-
700: "#343535",
|
|
72
|
-
800: "#282929",
|
|
73
|
-
900: "#1D1E1E",
|
|
74
|
-
},
|
|
75
|
-
green: {
|
|
76
|
-
DEFAULT: "#1FDA8A",
|
|
77
|
-
50: "#F0FDF7",
|
|
78
|
-
100: "#DBFDEE",
|
|
79
|
-
200: "#B9F9DC",
|
|
80
|
-
300: "#83F2C2",
|
|
81
|
-
400: "#45E39F",
|
|
82
|
-
500: "#1FDA8A",
|
|
83
|
-
600: "#11A868",
|
|
84
|
-
700: "#11784C",
|
|
85
|
-
800: "#0A472D",
|
|
86
|
-
900: "#03160E",
|
|
87
|
-
},
|
|
88
|
-
orange: {
|
|
89
|
-
DEFAULT: "#FFAB2E",
|
|
90
|
-
50: "#FFF5E6",
|
|
91
|
-
100: "#FFEDD1",
|
|
92
|
-
200: "#FFDCA8",
|
|
93
|
-
300: "#FFCC80",
|
|
94
|
-
400: "#FFBB57",
|
|
95
|
-
500: "#FFAB2E",
|
|
96
|
-
600: "#f98107",
|
|
97
|
-
700: "#dd5c02",
|
|
98
|
-
800: "#942e0c",
|
|
99
|
-
900: "#461202",
|
|
100
|
-
},
|
|
101
|
-
red: {
|
|
102
|
-
DEFAULT: "#FF656B",
|
|
103
|
-
50: "#FFF4F4",
|
|
104
|
-
100: "#FFDFE1",
|
|
105
|
-
200: "#FFB7B9",
|
|
106
|
-
300: "#FF8E92",
|
|
107
|
-
400: "#FF656B",
|
|
108
|
-
500: "#FF2D35",
|
|
109
|
-
600: "#F40009",
|
|
110
|
-
700: "#BC0007",
|
|
111
|
-
800: "#840005",
|
|
112
|
-
900: "#4B0003",
|
|
113
|
-
},
|
|
114
|
-
teal: {
|
|
115
|
-
DEFAULT: "#055463",
|
|
116
|
-
50: "#EDFBFE",
|
|
117
|
-
100: "#C7F4FC",
|
|
118
|
-
200: "#A0ECFA",
|
|
119
|
-
300: "#79E4F8",
|
|
120
|
-
400: "#52DCF6",
|
|
121
|
-
500: "#18D0F3",
|
|
122
|
-
600: "#0BB7D8",
|
|
123
|
-
700: "#0996B1",
|
|
124
|
-
800: "#07758A",
|
|
125
|
-
900: "#055463",
|
|
126
|
-
},
|
|
127
|
-
yellow: {
|
|
128
|
-
DEFAULT: "#FFEA2E",
|
|
129
|
-
50: "#FFFCE6",
|
|
130
|
-
100: "#FFFAD1",
|
|
131
|
-
200: "#FFF6A8",
|
|
132
|
-
300: "#FFF280",
|
|
133
|
-
400: "#FFEE57",
|
|
134
|
-
500: "#FFEA2E",
|
|
135
|
-
600: "#F5DC00",
|
|
136
|
-
700: "#BDAA00",
|
|
137
|
-
800: "#857700",
|
|
138
|
-
900: "#4D4500",
|
|
139
|
-
},
|
|
140
|
-
pink: {
|
|
141
|
-
DEFAULT: "#FE84BA",
|
|
142
|
-
50: "#FFE9F3",
|
|
143
|
-
100: "#FFD5E7",
|
|
144
|
-
200: "#FEACD1",
|
|
145
|
-
300: "#FE84BA",
|
|
146
|
-
400: "#FE4C9B",
|
|
147
|
-
500: "#FD157C",
|
|
148
|
-
600: "#D80261",
|
|
149
|
-
700: "#A00148",
|
|
150
|
-
800: "#69012F",
|
|
151
|
-
900: "#310016",
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
fontFamily: {
|
|
155
|
-
sans: ["Manrope", "ui-sans-serif", "sans-serif"],
|
|
156
|
-
mono: ["Roboto Mono", "ui-monospace", "Menlo", "monospace"],
|
|
157
|
-
},
|
|
158
|
-
fontSize: {
|
|
159
|
-
"2xs": ".688rem",
|
|
160
|
-
xs: ".75rem",
|
|
161
|
-
sm: ".875rem",
|
|
162
|
-
base: "1rem",
|
|
163
|
-
lg: "1.125rem",
|
|
164
|
-
xl: "1.25rem",
|
|
165
|
-
"2xl": "1.5rem",
|
|
166
|
-
"2.5xl": "2rem",
|
|
167
|
-
"3xl": "1.875rem",
|
|
168
|
-
"4xl": "2.25rem",
|
|
169
|
-
"5xl": "3rem",
|
|
170
|
-
"6xl": "4rem",
|
|
171
|
-
"8xl": "6rem",
|
|
172
|
-
"10xl": "8rem",
|
|
173
|
-
title: "2rem",
|
|
174
|
-
},
|
|
175
|
-
extend: {
|
|
176
|
-
boxShadow: {
|
|
177
|
-
hover: "0 0 0 1px #101111",
|
|
178
|
-
focus: "0 0 0 2px #101111",
|
|
179
|
-
inputfocus: "inset 0 0 0 2px #101111",
|
|
180
|
-
},
|
|
181
|
-
lineHeight: {
|
|
182
|
-
title: "2.375rem",
|
|
183
|
-
},
|
|
184
|
-
transitionProperty: {
|
|
185
|
-
bg: "background",
|
|
186
|
-
},
|
|
187
|
-
objectPosition: {
|
|
188
|
-
"out-of-bounds": "-99999px 99999px",
|
|
189
|
-
},
|
|
190
|
-
fontWeight: {
|
|
191
|
-
inherit: "inherit",
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
plugins: [require("@tailwindcss/forms")],
|
|
196
|
-
}
|