@lunejs/admin-ui 0.1.5 → 0.2.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/_virtual/index10.js +5 -2
- package/dist/_virtual/index11.js +4 -0
- package/dist/_virtual/index6.js +3 -3
- package/dist/_virtual/index8.js +3 -5
- package/dist/lib/api/codegen/graphql.d.ts +1 -0
- package/dist/lib/api/codegen/graphql.js +8 -8
- package/dist/lib/collections/components/collection-details/cards/general-card.js +20 -14
- package/dist/lib/custom-fields/components/details/is-list/custom-field-is-list.js +6 -4
- package/dist/lib/custom-fields/components/details/use-form/form-schema.d.ts +1 -0
- package/dist/lib/custom-fields/components/details/use-form/form-schema.js +4 -3
- package/dist/lib/custom-fields/components/fields/color.js +3 -3
- package/dist/lib/custom-fields/components/fields/custom-field.js +44 -36
- package/dist/lib/custom-fields/components/fields/rich-text.d.ts +8 -0
- package/dist/lib/custom-fields/components/fields/rich-text.js +17 -0
- package/dist/lib/custom-fields/components/fields/shared/primitive.d.ts +2 -1
- package/dist/lib/custom-fields/components/fields/shared/primitive.js +67 -61
- package/dist/lib/custom-fields/utils/custom-field.utils.js +63 -51
- package/dist/lib/dashboard/pages/dashboard-page.js +5 -5
- package/dist/lib/product/components/product-details/cards/general-product-card.js +18 -12
- package/dist/lib/translate/components/form/translate-form-row-data.d.ts +2 -1
- package/dist/lib/translate/components/form/translate-form-row-data.js +51 -19
- package/dist/lib/translate/components/form/translate-rich-text.d.ts +8 -0
- package/dist/lib/translate/components/form/translate-rich-text.js +65 -0
- package/dist/lib/translate/components/product-form/custom-fields/translate-product-custom-fields.js +95 -63
- package/dist/lib/translate/components/product-form/translate-product-form.js +19 -18
- package/dist/node_modules/@tiptap/core/dist/index.js +3566 -0
- package/dist/node_modules/@tiptap/core/dist/jsx-runtime/jsx-runtime.js +17 -0
- package/dist/node_modules/@tiptap/extension-bold/dist/index.js +80 -0
- package/dist/node_modules/@tiptap/extension-document/dist/index.js +13 -0
- package/dist/node_modules/@tiptap/extension-heading/dist/index.js +64 -0
- package/dist/node_modules/@tiptap/extension-italic/dist/index.js +78 -0
- package/dist/node_modules/@tiptap/extension-link/dist/index.js +305 -0
- package/dist/node_modules/@tiptap/extension-list/dist/index.js +713 -0
- package/dist/node_modules/@tiptap/extension-paragraph/dist/index.js +42 -0
- package/dist/node_modules/@tiptap/extension-table/dist/index.js +380 -0
- package/dist/node_modules/@tiptap/extension-text/dist/index.js +14 -0
- package/dist/node_modules/@tiptap/extension-text-style/dist/index.js +240 -0
- package/dist/node_modules/@tiptap/extension-underline/dist/index.js +66 -0
- package/dist/node_modules/@tiptap/extensions/dist/index.js +288 -0
- package/dist/node_modules/@tiptap/react/dist/index.js +482 -0
- package/dist/node_modules/es-toolkit/dist/compat/object/cloneDeep.js +1 -1
- package/dist/node_modules/es-toolkit/dist/object/cloneDeep.js +1 -1
- package/dist/node_modules/eventemitter3/index.js +1 -1
- package/dist/node_modules/eventemitter3/index2.js +1 -1
- package/dist/node_modules/fast-equals/dist/es/index.js +324 -0
- package/dist/node_modules/linkifyjs/dist/linkify.js +707 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/baseline.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/between-horizontal-end.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/between-vertical-end.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/bold.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/grid-2x2-plus.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/grid-2x2-x.js +16 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/italic.js +10 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/layout-list.js +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/link.js +9 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/list-ordered.js +13 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/table-columns-split.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/table-rows-split.js +18 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/table.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/underline.js +9 -0
- package/dist/node_modules/orderedmap/dist/index.js +103 -0
- package/dist/node_modules/prosemirror-commands/dist/index.js +388 -0
- package/dist/node_modules/prosemirror-dropcursor/dist/index.js +86 -0
- package/dist/node_modules/prosemirror-gapcursor/dist/index.js +204 -0
- package/dist/node_modules/prosemirror-history/dist/index.js +248 -0
- package/dist/node_modules/prosemirror-keymap/dist/index.js +62 -0
- package/dist/node_modules/prosemirror-model/dist/index.js +2733 -0
- package/dist/node_modules/prosemirror-schema-list/dist/index.js +88 -0
- package/dist/node_modules/prosemirror-state/dist/index.js +822 -0
- package/dist/node_modules/prosemirror-tables/dist/index.js +1446 -0
- package/dist/node_modules/prosemirror-transform/dist/index.js +1520 -0
- package/dist/node_modules/prosemirror-view/dist/index.js +3772 -0
- package/dist/node_modules/react-is/index.js +1 -1
- package/dist/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/node_modules/recharts/es6/util/ReactUtils.js +1 -1
- package/dist/node_modules/rope-sequence/dist/index.js +100 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +1 -1
- package/dist/node_modules/w3c-keyname/index.js +93 -0
- package/dist/packages/lune-ui/dist/_virtual/index3.js +2 -5
- package/dist/packages/lune-ui/dist/_virtual/index6.js +5 -2
- package/dist/packages/lune-ui/dist/components/popover.js +15 -11
- package/dist/packages/lune-ui/dist/components/select.js +6 -6
- package/dist/packages/lune-ui/dist/form/form-date-picker.js +2 -2
- package/dist/packages/lune-ui/dist/form/form.js +4 -4
- package/dist/packages/lune-ui/dist/node_modules/@radix-ui/react-popover/dist/index.js +39 -38
- package/dist/packages/lune-ui/dist/node_modules/prop-types/index.js +1 -1
- package/dist/packages/lune-ui/dist/packages/lune-ui/node_modules/recharts/es6/util/Events.js +1 -1
- package/dist/shared/components/color-picker/color-picker.d.ts +2 -1
- package/dist/shared/components/color-picker/color-picker.js +11 -11
- package/dist/shared/components/data-table/data-table-filter.js +4 -4
- package/dist/shared/components/rich-editor/rich-editor.d.ts +8 -0
- package/dist/shared/components/rich-editor/rich-editor.js +97 -0
- package/dist/shared/components/rich-editor/toolbar/bold/rich-editor-toolbar-bold.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/bold/rich-editor-toolbar-bold.js +66 -0
- package/dist/shared/components/rich-editor/toolbar/color/rich-editor-toolbar-color.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/color/rich-editor-toolbar-color.js +66 -0
- package/dist/shared/components/rich-editor/toolbar/heading/rich-editor-toolbar-heading.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/heading/rich-editor-toolbar-heading.js +115 -0
- package/dist/shared/components/rich-editor/toolbar/italic/rich-editor-toolbar-italic.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/italic/rich-editor-toolbar-italic.js +66 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link-form.d.ts +2 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link-form.js +103 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/link/rich-editor-toolbar-link.js +64 -0
- package/dist/shared/components/rich-editor/toolbar/ol-list/rich-editor-toolbar-ul-list.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/ol-list/rich-editor-toolbar-ul-list.js +66 -0
- package/dist/shared/components/rich-editor/toolbar/table/rich-editor-toolbar-table.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/table/rich-editor-toolbar-table.js +108 -0
- package/dist/shared/components/rich-editor/toolbar/toolbar.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/toolbar.js +64 -0
- package/dist/shared/components/rich-editor/toolbar/ul-list/rich-editor-toolbar-ul-list.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/ul-list/rich-editor-toolbar-ul-list.js +66 -0
- package/dist/shared/components/rich-editor/toolbar/underline/rich-editor-toolbar-underline.d.ts +1 -0
- package/dist/shared/components/rich-editor/toolbar/underline/rich-editor-toolbar-underline.js +66 -0
- package/package.json +6 -1
|
@@ -4,64 +4,76 @@ import u from "../../../node_modules/lucide-react/dist/esm/icons/boxes.js";
|
|
|
4
4
|
import s from "../../../node_modules/lucide-react/dist/esm/icons/package.js";
|
|
5
5
|
import p from "../../../node_modules/lucide-react/dist/esm/icons/pipette.js";
|
|
6
6
|
import f from "../../../node_modules/lucide-react/dist/esm/icons/calendar.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
7
|
+
import b from "../../../node_modules/lucide-react/dist/esm/icons/toggle-left.js";
|
|
8
|
+
import C from "../../../node_modules/lucide-react/dist/esm/icons/image.js";
|
|
9
9
|
import g from "../../../node_modules/lucide-react/dist/esm/icons/dollar-sign.js";
|
|
10
|
-
import
|
|
10
|
+
import c from "../../../node_modules/lucide-react/dist/esm/icons/hash.js";
|
|
11
|
+
import T from "../../../node_modules/lucide-react/dist/esm/icons/layout-list.js";
|
|
11
12
|
import d from "../../../node_modules/lucide-react/dist/esm/icons/earth.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
class
|
|
17
|
-
constructor(
|
|
18
|
-
this.title =
|
|
13
|
+
import x from "../../../node_modules/lucide-react/dist/esm/icons/text.js";
|
|
14
|
+
import R from "../../../node_modules/lucide-react/dist/esm/icons/type.js";
|
|
15
|
+
import v from "../../../node_modules/lucide-react/dist/esm/icons/shopping-cart.js";
|
|
16
|
+
import w from "../../../node_modules/lucide-react/dist/esm/icons/user.js";
|
|
17
|
+
class t {
|
|
18
|
+
constructor(i, n) {
|
|
19
|
+
this.title = i, this.icon = n;
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
|
-
const
|
|
22
|
+
const D = {
|
|
22
23
|
// Text
|
|
23
|
-
[e.SingleLineText]: new
|
|
24
|
-
[e.MultiLineText]: new
|
|
25
|
-
[e.Url]: new
|
|
24
|
+
[e.SingleLineText]: new t("Single line text", R),
|
|
25
|
+
[e.MultiLineText]: new t("Multi line text", x),
|
|
26
|
+
[e.Url]: new t("URL", d),
|
|
27
|
+
[e.RichText]: new t("Rich text", T),
|
|
26
28
|
// Number
|
|
27
|
-
[e.Integer]: new
|
|
28
|
-
[e.Decimal]: new
|
|
29
|
-
[e.Money]: new
|
|
29
|
+
[e.Integer]: new t("Integer", c),
|
|
30
|
+
[e.Decimal]: new t("Decimal", c),
|
|
31
|
+
[e.Money]: new t("Money", g),
|
|
30
32
|
// Media
|
|
31
|
-
[e.Image]: new
|
|
33
|
+
[e.Image]: new t("Image", C),
|
|
32
34
|
// Other
|
|
33
|
-
[e.Boolean]: new
|
|
34
|
-
[e.Date]: new
|
|
35
|
-
[e.Color]: new
|
|
35
|
+
[e.Boolean]: new t("Boolean", b),
|
|
36
|
+
[e.Date]: new t("Date", f),
|
|
37
|
+
[e.Color]: new t("Color", p),
|
|
36
38
|
// Reference
|
|
37
|
-
[e.ProductReference]: new
|
|
38
|
-
[e.CollectionReference]: new
|
|
39
|
-
[e.CustomObjectReference]: new
|
|
40
|
-
customer: new
|
|
41
|
-
order: new
|
|
42
|
-
},
|
|
39
|
+
[e.ProductReference]: new t("Product", s),
|
|
40
|
+
[e.CollectionReference]: new t("Collection", u),
|
|
41
|
+
[e.CustomObjectReference]: new t("Custom object", m),
|
|
42
|
+
customer: new t("Customer", w),
|
|
43
|
+
order: new t("Order", v)
|
|
44
|
+
}, _ = (l) => ({
|
|
43
45
|
[r.Product]: "Product",
|
|
44
46
|
[r.Collection]: "Collection",
|
|
45
47
|
[r.CustomObject]: "Custom object",
|
|
46
48
|
[r.OptionValue]: "Option value"
|
|
47
|
-
})[
|
|
49
|
+
})[l], o = (l) => D[l], G = (l) => [
|
|
50
|
+
e.SingleLineText,
|
|
51
|
+
e.MultiLineText,
|
|
52
|
+
e.RichText,
|
|
53
|
+
e.Url
|
|
54
|
+
].includes(l), $ = [
|
|
48
55
|
{
|
|
49
56
|
label: "Text",
|
|
50
57
|
items: [
|
|
51
58
|
{
|
|
52
59
|
label: "Single line text",
|
|
53
60
|
value: e.SingleLineText,
|
|
54
|
-
icon:
|
|
61
|
+
icon: o(e.SingleLineText).icon
|
|
55
62
|
},
|
|
56
63
|
{
|
|
57
64
|
label: "Multi line text",
|
|
58
65
|
value: e.MultiLineText,
|
|
59
|
-
icon:
|
|
66
|
+
icon: o(e.MultiLineText).icon
|
|
60
67
|
},
|
|
61
68
|
{
|
|
62
|
-
label:
|
|
69
|
+
label: o(e.RichText).title,
|
|
70
|
+
value: e.RichText,
|
|
71
|
+
icon: o(e.RichText).icon
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
label: o(e.Url).title,
|
|
63
75
|
value: e.Url,
|
|
64
|
-
icon:
|
|
76
|
+
icon: o(e.Url).icon
|
|
65
77
|
}
|
|
66
78
|
]
|
|
67
79
|
},
|
|
@@ -71,17 +83,17 @@ const w = {
|
|
|
71
83
|
{
|
|
72
84
|
label: "Integer",
|
|
73
85
|
value: e.Integer,
|
|
74
|
-
icon:
|
|
86
|
+
icon: o(e.Integer).icon
|
|
75
87
|
},
|
|
76
88
|
{
|
|
77
89
|
label: "Decimal",
|
|
78
90
|
value: e.Decimal,
|
|
79
|
-
icon:
|
|
91
|
+
icon: o(e.Decimal).icon
|
|
80
92
|
},
|
|
81
93
|
{
|
|
82
94
|
label: "Money",
|
|
83
95
|
value: e.Money,
|
|
84
|
-
icon:
|
|
96
|
+
icon: o(e.Money).icon
|
|
85
97
|
}
|
|
86
98
|
]
|
|
87
99
|
},
|
|
@@ -91,7 +103,7 @@ const w = {
|
|
|
91
103
|
{
|
|
92
104
|
label: "Image",
|
|
93
105
|
value: e.Image,
|
|
94
|
-
icon:
|
|
106
|
+
icon: o(e.Image).icon
|
|
95
107
|
}
|
|
96
108
|
]
|
|
97
109
|
},
|
|
@@ -101,17 +113,17 @@ const w = {
|
|
|
101
113
|
{
|
|
102
114
|
label: "Product",
|
|
103
115
|
value: e.ProductReference,
|
|
104
|
-
icon:
|
|
116
|
+
icon: o(e.ProductReference).icon
|
|
105
117
|
},
|
|
106
118
|
{
|
|
107
119
|
label: "Collection",
|
|
108
120
|
value: e.CollectionReference,
|
|
109
|
-
icon:
|
|
121
|
+
icon: o(e.CollectionReference).icon
|
|
110
122
|
},
|
|
111
123
|
{
|
|
112
124
|
label: "Custom object",
|
|
113
125
|
value: e.CustomObjectReference,
|
|
114
|
-
icon:
|
|
126
|
+
icon: o(e.CustomObjectReference).icon
|
|
115
127
|
}
|
|
116
128
|
]
|
|
117
129
|
},
|
|
@@ -121,28 +133,28 @@ const w = {
|
|
|
121
133
|
{
|
|
122
134
|
label: "Boolean",
|
|
123
135
|
value: e.Boolean,
|
|
124
|
-
icon:
|
|
136
|
+
icon: o(e.Boolean).icon
|
|
125
137
|
},
|
|
126
138
|
{
|
|
127
139
|
label: "Date",
|
|
128
140
|
value: e.Date,
|
|
129
|
-
icon:
|
|
141
|
+
icon: o(e.Date).icon
|
|
130
142
|
},
|
|
131
143
|
{
|
|
132
|
-
label:
|
|
144
|
+
label: o(e.Color).title,
|
|
133
145
|
value: e.Color,
|
|
134
|
-
icon:
|
|
146
|
+
icon: o(e.Color).icon
|
|
135
147
|
}
|
|
136
148
|
]
|
|
137
149
|
}
|
|
138
|
-
],
|
|
139
|
-
const
|
|
140
|
-
return
|
|
150
|
+
], k = (l, i) => {
|
|
151
|
+
const n = l.values.find((a) => a.field.id === i.displayField?.id);
|
|
152
|
+
return n ? n.value : `${i.name}#${l.slug.toUpperCase()}`;
|
|
141
153
|
};
|
|
142
154
|
export {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
155
|
+
$ as CUSTOM_FIELD_TYPE_GROUPS,
|
|
156
|
+
o as getCustomFieldTypeData,
|
|
157
|
+
k as getDisplayFieldValue,
|
|
158
|
+
_ as getEntityName,
|
|
159
|
+
G as isTranslatable
|
|
148
160
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, Fragment as f, jsxs as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as N, useMemo as v, useEffect as P } from "react";
|
|
3
3
|
import { UTCDate as m } from "../../../node_modules/@date-fns/utc/date/index.js";
|
|
4
4
|
import "../../../node_modules/@date-fns/utc/date/mini.js";
|
|
5
5
|
import "../../../packages/lune-ui/dist/node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
@@ -49,16 +49,16 @@ import { formatDate as a } from "../../../node_modules/date-fns/format.js";
|
|
|
49
49
|
import H from "../../../node_modules/lucide-react/dist/esm/icons/calendar-range.js";
|
|
50
50
|
import I from "../../../node_modules/lucide-react/dist/esm/icons/inbox.js";
|
|
51
51
|
function Et() {
|
|
52
|
-
const [r, L] =
|
|
52
|
+
const [r, L] = N({
|
|
53
53
|
from: g(new m()),
|
|
54
54
|
to: h(new m())
|
|
55
|
-
}), o =
|
|
55
|
+
}), o = v(
|
|
56
56
|
() => ({
|
|
57
57
|
startsAt: r?.from ?? g(new m()),
|
|
58
58
|
endsAt: r?.to ?? h(new m())
|
|
59
59
|
}),
|
|
60
60
|
[r]
|
|
61
|
-
), { totalSales: w, ...s } = F(o), { totalOrders: x, ...l } = B(o), { totalNewCustomers: O, ...n } = $(o), { totalAvgOrderValue:
|
|
61
|
+
), { totalSales: w, ...s } = F(o), { totalOrders: x, ...l } = B(o), { totalNewCustomers: O, ...n } = $(o), { totalAvgOrderValue: C, ...d } = k(o), { count: i } = j({ filters: { states: [u.Placed] } });
|
|
62
62
|
return P(() => {
|
|
63
63
|
s.refetch(), l.refetch(), n.refetch(), d.refetch();
|
|
64
64
|
}, [r]), s.isLoading || l.isLoading || n.isLoading || d.isLoading ? /* @__PURE__ */ t(G, {}) : /* @__PURE__ */ t(f, { children: /* @__PURE__ */ e(z, { className: "max-w-3xl mx-auto w-full flex flex-col gap-8", children: [
|
|
@@ -108,7 +108,7 @@ function Et() {
|
|
|
108
108
|
totalSales: w,
|
|
109
109
|
ordersCount: x,
|
|
110
110
|
newCustomers: O,
|
|
111
|
-
avgOrderValue:
|
|
111
|
+
avgOrderValue: C
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
114
|
!!i && /* @__PURE__ */ e("div", { className: "flex items-center gap-4", children: [
|
|
@@ -10,7 +10,7 @@ import "../../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/
|
|
|
10
10
|
import "../../../../../packages/lune-ui/dist/node_modules/@date-fns/tz/date/mini.js";
|
|
11
11
|
import "../../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js";
|
|
12
12
|
import "../../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/esm/locale/en-US.js";
|
|
13
|
-
import { Card as
|
|
13
|
+
import { Card as p, CardHeader as e, CardTitle as a, CardContent as l } from "../../../../../packages/lune-ui/dist/components/card.js";
|
|
14
14
|
import "../../../../../packages/lune-ui/dist/components/chart.js";
|
|
15
15
|
import "../../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-checkbox/dist/index.js";
|
|
16
16
|
import "../../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-collapsible/dist/index.js";
|
|
@@ -31,21 +31,27 @@ import "../../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-toggle
|
|
|
31
31
|
import "../../../../../packages/lune-ui/dist/components/toggle-group.js";
|
|
32
32
|
import "../../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-tooltip/dist/index.js";
|
|
33
33
|
import "../../../../../packages/lune-ui/dist/form/form.js";
|
|
34
|
-
import { FormInput as
|
|
35
|
-
import {
|
|
36
|
-
import { ProductAssetUploader as
|
|
34
|
+
import { FormInput as s } from "../../../../../packages/lune-ui/dist/form/form-input.js";
|
|
35
|
+
import { RichEditor as d } from "../../../../../shared/components/rich-editor/rich-editor.js";
|
|
36
|
+
import { ProductAssetUploader as n } from "../../asset-uploader/product-asset-uploader.js";
|
|
37
37
|
import { useProductDetailsFormContext as c } from "../use-form/use-product-details-form.js";
|
|
38
|
-
const
|
|
38
|
+
const Y = () => {
|
|
39
39
|
const { product: m, ...o } = c();
|
|
40
|
-
return /* @__PURE__ */ t(
|
|
41
|
-
/* @__PURE__ */ r(
|
|
42
|
-
/* @__PURE__ */ t(
|
|
43
|
-
/* @__PURE__ */ r(
|
|
44
|
-
/* @__PURE__ */ r(
|
|
45
|
-
|
|
40
|
+
return /* @__PURE__ */ t(p, { children: [
|
|
41
|
+
/* @__PURE__ */ r(e, { className: "flex", children: /* @__PURE__ */ r(a, { children: "General" }) }),
|
|
42
|
+
/* @__PURE__ */ t(l, { className: "flex flex-col gap-3", children: [
|
|
43
|
+
/* @__PURE__ */ r(s, { control: o.control, name: "name", label: "Name", placeholder: "T-Shirt" }),
|
|
44
|
+
/* @__PURE__ */ r(
|
|
45
|
+
d,
|
|
46
|
+
{
|
|
47
|
+
defaultValue: o.formState.defaultValues?.description,
|
|
48
|
+
onChange: (i) => o.setValue("description", i)
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ r(n, { product: m })
|
|
46
52
|
] })
|
|
47
53
|
] });
|
|
48
54
|
};
|
|
49
55
|
export {
|
|
50
|
-
|
|
56
|
+
Y as GeneralProductCard
|
|
51
57
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
export declare const TranslateFormRowData: ({ children, field, reference, className }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const TranslateFormRowData: ({ children, field, reference, richText, className }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
type Props = PropsWithChildren & {
|
|
4
4
|
className?: string | {
|
|
5
5
|
row?: string;
|
|
@@ -8,5 +8,6 @@ type Props = PropsWithChildren & {
|
|
|
8
8
|
};
|
|
9
9
|
field: string | null | undefined;
|
|
10
10
|
reference: string | null | undefined;
|
|
11
|
+
richText?: boolean;
|
|
11
12
|
};
|
|
12
13
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, Fragment as s, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as p } from "../../../../packages/lune-ui/dist/lib/utils.js";
|
|
5
5
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js";
|
|
6
6
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-avatar/dist/index.js";
|
|
7
7
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-separator/dist/index.js";
|
|
@@ -24,7 +24,7 @@ import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-radio-gro
|
|
|
24
24
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-select/dist/index.js";
|
|
25
25
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
26
26
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-switch/dist/index.js";
|
|
27
|
-
import { TableRow as
|
|
27
|
+
import { TableRow as u } from "../../../../packages/lune-ui/dist/components/table.js";
|
|
28
28
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-tabs/dist/index.js";
|
|
29
29
|
import "../../../../packages/lune-ui/dist/components/theme-provider.js";
|
|
30
30
|
import "../../../../packages/lune-ui/dist/node_modules/sonner/dist/index.js";
|
|
@@ -32,37 +32,69 @@ import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-toggle/di
|
|
|
32
32
|
import "../../../../packages/lune-ui/dist/components/toggle-group.js";
|
|
33
33
|
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-tooltip/dist/index.js";
|
|
34
34
|
import "../../../../packages/lune-ui/dist/form/form.js";
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
35
|
+
import { RichEditor as l } from "../../../../shared/components/rich-editor/rich-editor.js";
|
|
36
|
+
import { TranslateFormCell as i } from "./translate-form-cell.js";
|
|
37
|
+
import { TranslateFormRow as e } from "./translate-form-row.js";
|
|
38
|
+
const X = ({
|
|
39
|
+
children: n,
|
|
40
|
+
field: m,
|
|
41
|
+
reference: o,
|
|
42
|
+
richText: d,
|
|
43
|
+
className: t
|
|
44
|
+
}) => /* @__PURE__ */ a(s, { children: [
|
|
45
|
+
/* @__PURE__ */ a(
|
|
46
|
+
u,
|
|
40
47
|
{
|
|
41
|
-
className:
|
|
48
|
+
className: p(
|
|
42
49
|
"bg-transparent! hidden lg:table-row",
|
|
43
50
|
typeof t == "string" ? t : t?.row
|
|
44
51
|
),
|
|
45
52
|
children: [
|
|
46
|
-
/* @__PURE__ */ r(
|
|
47
|
-
/* @__PURE__ */ r(
|
|
48
|
-
|
|
53
|
+
/* @__PURE__ */ r(i, { children: m }),
|
|
54
|
+
d ? /* @__PURE__ */ r(
|
|
55
|
+
i,
|
|
49
56
|
{
|
|
50
|
-
|
|
57
|
+
isDisabled: !0,
|
|
58
|
+
className: p(
|
|
59
|
+
typeof t == "string" ? void 0 : t?.referenceCell,
|
|
60
|
+
"text-muted-foreground p-0"
|
|
61
|
+
),
|
|
62
|
+
children: /* @__PURE__ */ r(
|
|
63
|
+
l,
|
|
64
|
+
{
|
|
65
|
+
disabled: !0,
|
|
66
|
+
className: "rounded-none [&_.tiptap]:max-h-48 ring-0! border-none! [&_.rich-editor-content]:text-muted-foreground!",
|
|
67
|
+
defaultValue: o ?? ""
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
) : /* @__PURE__ */ r(
|
|
72
|
+
i,
|
|
73
|
+
{
|
|
74
|
+
className: p(
|
|
51
75
|
typeof t == "string" ? void 0 : t?.referenceCell,
|
|
52
76
|
"text-muted-foreground"
|
|
53
77
|
),
|
|
54
78
|
isDisabled: !0,
|
|
55
|
-
children:
|
|
79
|
+
children: o
|
|
56
80
|
}
|
|
57
81
|
),
|
|
58
|
-
|
|
82
|
+
n
|
|
59
83
|
]
|
|
60
84
|
}
|
|
61
85
|
),
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */ r(
|
|
86
|
+
m && /* @__PURE__ */ r(e, { className: "lg:hidden", children: /* @__PURE__ */ r(i, { children: m }) }),
|
|
87
|
+
o && !d && /* @__PURE__ */ r(e, { className: "lg:hidden", children: /* @__PURE__ */ r(i, { isDisabled: !0, className: "text-muted-foreground", children: o }) }),
|
|
88
|
+
o && d && /* @__PURE__ */ r(e, { className: "lg:hidden", children: /* @__PURE__ */ r(i, { isDisabled: !0, className: "text-muted-foreground p-0", children: /* @__PURE__ */ r(
|
|
89
|
+
l,
|
|
90
|
+
{
|
|
91
|
+
disabled: !0,
|
|
92
|
+
className: "rounded-none [&_.tiptap]:max-h-48 ring-0! border-none! [&_.rich-editor-content]:text-muted-foreground!",
|
|
93
|
+
defaultValue: o ?? ""
|
|
94
|
+
}
|
|
95
|
+
) }) }),
|
|
96
|
+
/* @__PURE__ */ r(e, { className: "lg:hidden", children: n })
|
|
65
97
|
] });
|
|
66
98
|
export {
|
|
67
|
-
|
|
99
|
+
X as TranslateFormRowData
|
|
68
100
|
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const TranslateRichText: ({ onChange, defaultValue, label, className }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
type Props = {
|
|
3
|
+
className?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
defaultValue?: string;
|
|
6
|
+
onChange: (html: string) => void;
|
|
7
|
+
};
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { jsxs as e, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useId as l } from "react";
|
|
3
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-accordion/dist/index.js";
|
|
4
|
+
import { cn as s } from "../../../../packages/lune-ui/dist/lib/utils.js";
|
|
5
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js";
|
|
6
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-avatar/dist/index.js";
|
|
7
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-separator/dist/index.js";
|
|
8
|
+
import "../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/esm/UI.js";
|
|
9
|
+
import "../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/esm/classes/DateLib.js";
|
|
10
|
+
import "../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/esm/useDayPicker.js";
|
|
11
|
+
import "../../../../packages/lune-ui/dist/node_modules/@date-fns/tz/date/mini.js";
|
|
12
|
+
import "../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/esm/helpers/calculateFocusTarget.js";
|
|
13
|
+
import "../../../../packages/lune-ui/dist/node_modules/react-day-picker/dist/esm/locale/en-US.js";
|
|
14
|
+
import "../../../../packages/lune-ui/dist/components/chart.js";
|
|
15
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-checkbox/dist/index.js";
|
|
16
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-collapsible/dist/index.js";
|
|
17
|
+
import "../../../../packages/lune-ui/dist/node_modules/cmdk/dist/index.js";
|
|
18
|
+
import "../../../../packages/lune-ui/dist/components/dialog.js";
|
|
19
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js";
|
|
20
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-label/dist/index.js";
|
|
21
|
+
import "../../../../packages/lune-ui/dist/components/phone-input.js";
|
|
22
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-popover/dist/index.js";
|
|
23
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-radio-group/dist/index.js";
|
|
24
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-select/dist/index.js";
|
|
25
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
26
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-switch/dist/index.js";
|
|
27
|
+
import { TableCell as a } from "../../../../packages/lune-ui/dist/components/table.js";
|
|
28
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-tabs/dist/index.js";
|
|
29
|
+
import "../../../../packages/lune-ui/dist/components/theme-provider.js";
|
|
30
|
+
import "../../../../packages/lune-ui/dist/node_modules/sonner/dist/index.js";
|
|
31
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-toggle/dist/index.js";
|
|
32
|
+
import "../../../../packages/lune-ui/dist/components/toggle-group.js";
|
|
33
|
+
import "../../../../packages/lune-ui/dist/node_modules/@radix-ui/react-tooltip/dist/index.js";
|
|
34
|
+
import "../../../../packages/lune-ui/dist/form/form.js";
|
|
35
|
+
import { RichEditor as n } from "../../../../shared/components/rich-editor/rich-editor.js";
|
|
36
|
+
const S = ({ onChange: i, defaultValue: m, label: r, className: p }) => {
|
|
37
|
+
const t = l();
|
|
38
|
+
return /* @__PURE__ */ e(
|
|
39
|
+
a,
|
|
40
|
+
{
|
|
41
|
+
onClick: () => {
|
|
42
|
+
document.getElementById(t)?.focus();
|
|
43
|
+
},
|
|
44
|
+
className: s(
|
|
45
|
+
"cursor-text align-top h-full p-0 [&:has(textarea:focus-visible)]:ring-primary/50 [&:has(textarea:focus-visible)]:ring-[1px]",
|
|
46
|
+
r && "flex flex-col gap-1 w-full lg:table-cell",
|
|
47
|
+
p
|
|
48
|
+
),
|
|
49
|
+
children: [
|
|
50
|
+
r && /* @__PURE__ */ o("label", { className: "pl-4 pt-4 text-muted-foreground lg:hidden", htmlFor: t, children: r }),
|
|
51
|
+
/* @__PURE__ */ o(
|
|
52
|
+
n,
|
|
53
|
+
{
|
|
54
|
+
className: "rounded-none [&_.tiptap]:max-h-48 ring-0! border-none!",
|
|
55
|
+
defaultValue: m,
|
|
56
|
+
onChange: i
|
|
57
|
+
}
|
|
58
|
+
)
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
S as TranslateRichText
|
|
65
|
+
};
|