@unchainedshop/admin-ui 4.8.29 → 4.8.30
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/chunk-3L6EZQ6P.js +135 -0
- package/dist/chunk-5WPFHQZN.js +388 -0
- package/dist/chunk-BMDNY67T.js +22547 -0
- package/dist/{chunk-JAVEZY3Q.js → chunk-BOMSMJF2.js} +17 -5
- package/dist/{chunk-2RTX42IE.js → chunk-E77YIMGR.js} +2 -2
- package/dist/{chunk-XHOCXPD5.js → chunk-F6LBNV3H.js} +1 -1
- package/dist/chunk-FDHXLNZQ.js +44 -0
- package/dist/{chunk-XJBPMIC4.js → chunk-HERLM47Z.js} +81 -56
- package/dist/{chunk-MSPWYMDY.js → chunk-HJKRGBDG.js} +87 -58
- package/dist/{chunk-7PPOGX7R.js → chunk-I64TXIE7.js} +48 -11
- package/dist/chunk-ICJH36K4.js +326 -0
- package/dist/chunk-IWKDBADX.js +73 -0
- package/dist/{chunk-QNLGYFV7.js → chunk-IYKPRAWC.js} +4 -0
- package/dist/chunk-J23QSWDL.js +8 -0
- package/dist/chunk-KRIRF7F6.js +76 -0
- package/dist/chunk-OTXM2UCD.js +19 -0
- package/dist/chunk-PJLYVMUM.js +3308 -0
- package/dist/{chunk-SRAAKMWY.js → chunk-PUI5BIKO.js} +4 -2
- package/dist/chunk-QHR23GVH.js +1099 -0
- package/dist/chunk-VBO377AY.js +14 -0
- package/dist/chunk-VYEXPG3M.js +107 -0
- package/dist/{chunk-4VNS5WPM.js → chunk-WPLOTFGW.js} +7 -8
- package/dist/{chunk-VDKQGOMV.js → chunk-ZUOVKRKC.js} +118 -1
- package/dist/components/ui/Badge.d.ts.map +1 -1
- package/dist/components/ui/BreadCrumbs.d.ts.map +1 -1
- package/dist/components/ui/Pagination.d.ts.map +1 -1
- package/dist/components/ui/form/ChoicesField.d.ts.map +1 -1
- package/dist/components/ui/form/Combobox.d.ts.map +1 -1
- package/dist/components/ui/form/TextField.d.ts.map +1 -1
- package/dist/components/ui/form/index.d.ts +1 -0
- package/dist/components/ui/form/index.d.ts.map +1 -1
- package/dist/components/ui/index.d.ts +5 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/form.js +1808 -27501
- package/dist/gql/operation-types.d.ts +201 -5
- package/dist/gql/operation-types.d.ts.map +1 -1
- package/dist/gql/schema-types.d.ts +63 -7
- package/dist/gql/schema-types.d.ts.map +1 -1
- package/dist/hooks.js +13 -6
- package/dist/modal.js +11 -78
- package/dist/modules/Auth/AuthContext.d.ts +9 -0
- package/dist/modules/Auth/AuthContext.d.ts.map +1 -0
- package/dist/modules/Auth/useAuth.d.ts +6 -0
- package/dist/modules/Auth/useAuth.d.ts.map +1 -0
- package/dist/modules/accounts.js +183 -3
- package/dist/modules/assortment.js +83 -4
- package/dist/modules/common/components/AppContext.d.ts.map +1 -1
- package/dist/modules/common/components/FormWrapper.d.ts.map +1 -1
- package/dist/modules/common/components/LocaleWrapper.d.ts +7 -0
- package/dist/modules/common/components/LocaleWrapper.d.ts.map +1 -0
- package/dist/modules/common/components/MediaAvatar.d.ts +6 -0
- package/dist/modules/common/components/MediaAvatar.d.ts.map +1 -0
- package/dist/modules/common/components/SelectOptions.d.ts +17 -0
- package/dist/modules/common/components/SelectOptions.d.ts.map +1 -0
- package/dist/modules/common/components/Table.d.ts +25 -0
- package/dist/modules/common/components/Table.d.ts.map +1 -0
- package/dist/modules/common/components/TableCell.d.ts +12 -0
- package/dist/modules/common/components/TableCell.d.ts.map +1 -0
- package/dist/modules/common/components/TableRow.d.ts +10 -0
- package/dist/modules/common/components/TableRow.d.ts.map +1 -0
- package/dist/modules/common/components/ThemeWrapper.d.ts.map +1 -1
- package/dist/modules/common/data/miscellaneous.d.ts +1 -0
- package/dist/modules/common/data/miscellaneous.d.ts.map +1 -1
- package/dist/modules/common/utils/sharedContext.d.ts +9 -0
- package/dist/modules/common/utils/sharedContext.d.ts.map +1 -0
- package/dist/modules/country.js +1 -1
- package/dist/modules/currency.js +1 -1
- package/dist/modules/delivery-provider.js +1 -1
- package/dist/modules/enrollment.js +66 -9
- package/dist/modules/event.js +1 -1
- package/dist/modules/filter.js +52 -3
- package/dist/modules/forms/lib/FormContext.d.ts.map +1 -1
- package/dist/modules/language.js +1 -1
- package/dist/modules/modal/hooks/useModal.d.ts.map +1 -1
- package/dist/modules/modal/utils/ModalContext.d.ts.map +1 -1
- package/dist/modules/order.js +2 -2
- package/dist/modules/payment-providers.js +1 -1
- package/dist/modules/product-review.js +4 -4
- package/dist/modules/product.js +5000 -11
- package/dist/modules/quotation.js +8 -1
- package/dist/modules/token.js +3 -3
- package/dist/modules/warehousing-providers.js +1 -1
- package/dist/modules/work.js +23 -111
- package/dist/plugins.js +1 -1
- package/dist/providers.js +8 -5
- package/dist/sdk/hooks.d.ts +3 -0
- package/dist/sdk/hooks.d.ts.map +1 -1
- package/dist/shims/admin-ui-plugins.js +1 -1
- package/dist/shims/apollo-client-react.js +1 -1
- package/dist/shims/apollo-client.js +1 -1
- package/dist/shims/next-head.js +1 -1
- package/dist/shims/next-image.js +1 -1
- package/dist/shims/next-link.js +1 -1
- package/dist/shims/next-router.js +1 -1
- package/dist/shims/react-dom-client.js +1 -1
- package/dist/shims/react-dom.js +1 -1
- package/dist/shims/react-hook-form.js +1 -1
- package/dist/shims/react-intl.js +1 -1
- package/dist/shims/react-jsx-runtime.js +1 -1
- package/dist/shims/react-toastify.js +1 -1
- package/dist/shims/react.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/ui.js +3476 -3103
- package/out/403/index.html +2 -2
- package/out/404/index.html +2 -2
- package/out/404.html +2 -2
- package/out/423/index.html +2 -2
- package/out/500/index.html +2 -2
- package/out/_next/static/{4-xf4wPkZc5rcBq3jUTDg → F8ReqaxPvLqFJ2DaPfMdn}/_buildManifest.js +1 -1
- package/out/_next/static/chunks/{2we4fnghpvprw.js → 217_5onj-woma.js} +1 -1
- package/out/_next/static/chunks/{1wvicoevgxhkk.js → 2jjgby8cd1gdj.js} +2 -2
- package/out/_next/static/chunks/{turbopack-1zn9gl4fpayoc.js → turbopack-0ptvhnhsw0_c7.js} +1 -1
- package/out/_offline/index.html +2 -2
- package/out/account/forgot-password/index.html +2 -2
- package/out/account/index.html +2 -2
- package/out/assortments/AssortmentDetailPage/index.html +2 -2
- package/out/assortments/index.html +2 -2
- package/out/assortments/new/index.html +2 -2
- package/out/copilot/index.html +2 -2
- package/out/country/CountryDetailPage/index.html +2 -2
- package/out/country/index.html +2 -2
- package/out/country/new/index.html +2 -2
- package/out/currency/CurrencyDetailPage/index.html +2 -2
- package/out/currency/index.html +2 -2
- package/out/currency/new/index.html +2 -2
- package/out/delivery-provider/DeliveryProviderDetailPage/index.html +2 -2
- package/out/delivery-provider/index.html +2 -2
- package/out/delivery-provider/new/index.html +2 -2
- package/out/enrollments/EnrollmentDetailPage/index.html +2 -2
- package/out/enrollments/index.html +2 -2
- package/out/events/EventDetailPage/index.html +2 -2
- package/out/events/index.html +2 -2
- package/out/exports/index.html +2 -2
- package/out/external/index.html +2 -2
- package/out/filters/FilterDetailPage/index.html +2 -2
- package/out/filters/index.html +2 -2
- package/out/filters/new/index.html +2 -2
- package/out/index.html +2 -2
- package/out/install/index.html +2 -2
- package/out/language/LanguageDetailPage/index.html +2 -2
- package/out/language/index.html +2 -2
- package/out/language/new/index.html +2 -2
- package/out/log-in/index.html +2 -2
- package/out/orders/OrderDetailPage/index.html +2 -2
- package/out/orders/index.html +2 -2
- package/out/payment-provider/PaymentProviderDetailPage/index.html +2 -2
- package/out/payment-provider/index.html +2 -2
- package/out/payment-provider/new/index.html +2 -2
- package/out/products/ProductDetailPage/index.html +2 -2
- package/out/products/index.html +2 -2
- package/out/products/new/index.html +2 -2
- package/out/quotations/QuotationDetailPage/index.html +2 -2
- package/out/quotations/index.html +2 -2
- package/out/reset-password/index.html +2 -2
- package/out/sign-up/index.html +2 -2
- package/out/styleguide/index.html +2 -2
- package/out/tokens/TokenDetailPage/index.html +2 -2
- package/out/tokens/index.html +2 -2
- package/out/users/UserDetailPage/index.html +2 -2
- package/out/users/index.html +2 -2
- package/out/users/new/index.html +2 -2
- package/out/verify-email/index.html +2 -2
- package/out/warehousing-provider/WarehousingProviderDetailPage/index.html +2 -2
- package/out/warehousing-provider/index.html +2 -2
- package/out/warehousing-provider/new/index.html +2 -2
- package/out/works/WorkDetailPage/index.html +2 -2
- package/out/works/WorkQueueListView/index.html +2 -2
- package/out/works/index.html +2 -2
- package/out/works/management/index.html +2 -2
- package/package.json +1 -1
- package/dist/chunk-F2TCVEQX.js +0 -514
- package/dist/chunk-KCN7DDPH.js +0 -1116
- package/dist/chunk-RORNAN2J.js +0 -12
- package/dist/chunk-RVG6IOFC.js +0 -11
- package/dist/chunk-YZGQJJCD.js +0 -37
- /package/out/_next/static/{4-xf4wPkZc5rcBq3jUTDg → F8ReqaxPvLqFJ2DaPfMdn}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{4-xf4wPkZc5rcBq3jUTDg → F8ReqaxPvLqFJ2DaPfMdn}/_ssgManifest.js +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { textColor,
|
|
2
|
-
import { useField_default, validateRequiredTag, useFormContext_default } from './chunk-
|
|
3
|
-
import { QuestionMarkCircleIcon_default } from './chunk-
|
|
1
|
+
import { textColor, badgeButtonColors, borderColor, bgColor } from './chunk-ZUOVKRKC.js';
|
|
2
|
+
import { FormContext_default, useField_default, validateRequiredTag, useFormContext_default } from './chunk-I64TXIE7.js';
|
|
3
|
+
import { QuestionMarkCircleIcon_default } from './chunk-HERLM47Z.js';
|
|
4
4
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import { useRouter } from 'next/router';
|
|
6
|
-
import * as
|
|
7
|
-
import
|
|
6
|
+
import * as React6 from 'react';
|
|
7
|
+
import React6__default, { useState, useRef, useEffect, useCallback, useMemo } from 'react';
|
|
8
8
|
import { useIntl } from 'react-intl';
|
|
9
|
-
import { useFormContext } from 'react-hook-form';
|
|
9
|
+
import { FormProvider, useFormContext } from 'react-hook-form';
|
|
10
10
|
|
|
11
11
|
// ../node_modules/clsx/dist/clsx.mjs
|
|
12
12
|
function r(e) {
|
|
@@ -55,7 +55,7 @@ var Badge = ({
|
|
|
55
55
|
"span",
|
|
56
56
|
{
|
|
57
57
|
className: clsx_default(
|
|
58
|
-
"inline-flex items-center bg-
|
|
58
|
+
"inline-flex items-center bg-surface-raised px-2.5 py-0.5",
|
|
59
59
|
{
|
|
60
60
|
"rounded-full": !square,
|
|
61
61
|
"rounded-md": square
|
|
@@ -78,7 +78,7 @@ var Badge = ({
|
|
|
78
78
|
id: "badge-x-button",
|
|
79
79
|
type: "button",
|
|
80
80
|
onClick,
|
|
81
|
-
className: "ml-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-text-primary hover:bg-
|
|
81
|
+
className: "ml-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-text-primary hover:bg-surface-raised focus:outline-hidden focus:bg-surface-raised",
|
|
82
82
|
children: /* @__PURE__ */ jsx(
|
|
83
83
|
"svg",
|
|
84
84
|
{
|
|
@@ -120,13 +120,7 @@ var Badge = ({
|
|
|
120
120
|
className: `ml-0.5 inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full ${textColor(
|
|
121
121
|
normalizedColor,
|
|
122
122
|
400
|
|
123
|
-
)}
|
|
124
|
-
normalizedColor,
|
|
125
|
-
200
|
|
126
|
-
)} hover:text-${normalizedColor}-500 focus:outline-hidden focus:${bgColor(
|
|
127
|
-
normalizedColor,
|
|
128
|
-
500
|
|
129
|
-
)} focus:text-white`,
|
|
123
|
+
)} ${badgeButtonColors(normalizedColor)} focus:outline-hidden focus:text-white`,
|
|
130
124
|
children: /* @__PURE__ */ jsx(
|
|
131
125
|
"svg",
|
|
132
126
|
{
|
|
@@ -219,35 +213,10 @@ var Tab = ({
|
|
|
219
213
|
},
|
|
220
214
|
option.id
|
|
221
215
|
)) }) }) }),
|
|
222
|
-
/* @__PURE__ */ jsx("div", { className: "mt-5", children:
|
|
216
|
+
/* @__PURE__ */ jsx("div", { className: "mt-5", children: React6__default.cloneElement(children, { selectedView: currentTab }) })
|
|
223
217
|
] });
|
|
224
218
|
};
|
|
225
219
|
var Tab_default = Tab;
|
|
226
|
-
var JSONView = ({
|
|
227
|
-
value,
|
|
228
|
-
className,
|
|
229
|
-
onChange = () => {
|
|
230
|
-
},
|
|
231
|
-
rows: defaultRows = 7,
|
|
232
|
-
...props
|
|
233
|
-
}) => {
|
|
234
|
-
const lineCount = value ? value.split("\n").length : 1;
|
|
235
|
-
const rows = Math.max(lineCount, defaultRows);
|
|
236
|
-
return /* @__PURE__ */ jsx(
|
|
237
|
-
"textarea",
|
|
238
|
-
{
|
|
239
|
-
className: clsx_default(
|
|
240
|
-
"text-black dark:bg-slate-900 dark:text-slate-200 border-transparent border-t border-t-border-subtle resize-y",
|
|
241
|
-
className
|
|
242
|
-
),
|
|
243
|
-
value,
|
|
244
|
-
onChange,
|
|
245
|
-
rows,
|
|
246
|
-
...props
|
|
247
|
-
}
|
|
248
|
-
);
|
|
249
|
-
};
|
|
250
|
-
var JSONView_default = JSONView;
|
|
251
220
|
var normalizeTagValue = (tags) => {
|
|
252
221
|
if (tags) {
|
|
253
222
|
if (Array.isArray(tags)) return tags;
|
|
@@ -430,6 +399,20 @@ var TagInput = ({
|
|
|
430
399
|
] });
|
|
431
400
|
};
|
|
432
401
|
var TagInput_default = TagInput;
|
|
402
|
+
var Form = ({ form, children, className = "", ...props }) => {
|
|
403
|
+
return /* @__PURE__ */ jsx(FormContext_default.Provider, { value: form, children: /* @__PURE__ */ jsx(FormProvider, { ...form.rhf, children: /* @__PURE__ */ jsx(
|
|
404
|
+
"form",
|
|
405
|
+
{
|
|
406
|
+
onReset: () => form.api.handleReset(),
|
|
407
|
+
onSubmit: form.api.handleSubmit,
|
|
408
|
+
method: "POST",
|
|
409
|
+
className,
|
|
410
|
+
...props,
|
|
411
|
+
children
|
|
412
|
+
}
|
|
413
|
+
) }) });
|
|
414
|
+
};
|
|
415
|
+
var Form_default = Form;
|
|
433
416
|
var FieldWrapper = ({
|
|
434
417
|
children,
|
|
435
418
|
className,
|
|
@@ -574,7 +557,7 @@ function CheckIcon({
|
|
|
574
557
|
titleId,
|
|
575
558
|
...props
|
|
576
559
|
}, svgRef) {
|
|
577
|
-
return /* @__PURE__ */
|
|
560
|
+
return /* @__PURE__ */ React6.createElement("svg", Object.assign({
|
|
578
561
|
xmlns: "http://www.w3.org/2000/svg",
|
|
579
562
|
viewBox: "0 0 20 20",
|
|
580
563
|
fill: "currentColor",
|
|
@@ -582,22 +565,22 @@ function CheckIcon({
|
|
|
582
565
|
"data-slot": "icon",
|
|
583
566
|
ref: svgRef,
|
|
584
567
|
"aria-labelledby": titleId
|
|
585
|
-
}, props), title ? /* @__PURE__ */
|
|
568
|
+
}, props), title ? /* @__PURE__ */ React6.createElement("title", {
|
|
586
569
|
id: titleId
|
|
587
|
-
}, title) : null, /* @__PURE__ */
|
|
570
|
+
}, title) : null, /* @__PURE__ */ React6.createElement("path", {
|
|
588
571
|
fillRule: "evenodd",
|
|
589
572
|
d: "M16.704 4.153a.75.75 0 0 1 .143 1.052l-8 10.5a.75.75 0 0 1-1.127.075l-4.5-4.5a.75.75 0 0 1 1.06-1.06l3.894 3.893 7.48-9.817a.75.75 0 0 1 1.05-.143Z",
|
|
590
573
|
clipRule: "evenodd"
|
|
591
574
|
}));
|
|
592
575
|
}
|
|
593
|
-
var ForwardRef = /* @__PURE__ */
|
|
576
|
+
var ForwardRef = /* @__PURE__ */ React6.forwardRef(CheckIcon);
|
|
594
577
|
var CheckIcon_default = ForwardRef;
|
|
595
578
|
function ChevronDownIcon({
|
|
596
579
|
title,
|
|
597
580
|
titleId,
|
|
598
581
|
...props
|
|
599
582
|
}, svgRef) {
|
|
600
|
-
return /* @__PURE__ */
|
|
583
|
+
return /* @__PURE__ */ React6.createElement("svg", Object.assign({
|
|
601
584
|
xmlns: "http://www.w3.org/2000/svg",
|
|
602
585
|
viewBox: "0 0 20 20",
|
|
603
586
|
fill: "currentColor",
|
|
@@ -605,22 +588,22 @@ function ChevronDownIcon({
|
|
|
605
588
|
"data-slot": "icon",
|
|
606
589
|
ref: svgRef,
|
|
607
590
|
"aria-labelledby": titleId
|
|
608
|
-
}, props), title ? /* @__PURE__ */
|
|
591
|
+
}, props), title ? /* @__PURE__ */ React6.createElement("title", {
|
|
609
592
|
id: titleId
|
|
610
|
-
}, title) : null, /* @__PURE__ */
|
|
593
|
+
}, title) : null, /* @__PURE__ */ React6.createElement("path", {
|
|
611
594
|
fillRule: "evenodd",
|
|
612
595
|
d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
|
|
613
596
|
clipRule: "evenodd"
|
|
614
597
|
}));
|
|
615
598
|
}
|
|
616
|
-
var ForwardRef2 = /* @__PURE__ */
|
|
599
|
+
var ForwardRef2 = /* @__PURE__ */ React6.forwardRef(ChevronDownIcon);
|
|
617
600
|
var ChevronDownIcon_default = ForwardRef2;
|
|
618
601
|
function ChevronUpDownIcon({
|
|
619
602
|
title,
|
|
620
603
|
titleId,
|
|
621
604
|
...props
|
|
622
605
|
}, svgRef) {
|
|
623
|
-
return /* @__PURE__ */
|
|
606
|
+
return /* @__PURE__ */ React6.createElement("svg", Object.assign({
|
|
624
607
|
xmlns: "http://www.w3.org/2000/svg",
|
|
625
608
|
viewBox: "0 0 20 20",
|
|
626
609
|
fill: "currentColor",
|
|
@@ -628,22 +611,22 @@ function ChevronUpDownIcon({
|
|
|
628
611
|
"data-slot": "icon",
|
|
629
612
|
ref: svgRef,
|
|
630
613
|
"aria-labelledby": titleId
|
|
631
|
-
}, props), title ? /* @__PURE__ */
|
|
614
|
+
}, props), title ? /* @__PURE__ */ React6.createElement("title", {
|
|
632
615
|
id: titleId
|
|
633
|
-
}, title) : null, /* @__PURE__ */
|
|
616
|
+
}, title) : null, /* @__PURE__ */ React6.createElement("path", {
|
|
634
617
|
fillRule: "evenodd",
|
|
635
618
|
d: "M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z",
|
|
636
619
|
clipRule: "evenodd"
|
|
637
620
|
}));
|
|
638
621
|
}
|
|
639
|
-
var ForwardRef3 = /* @__PURE__ */
|
|
622
|
+
var ForwardRef3 = /* @__PURE__ */ React6.forwardRef(ChevronUpDownIcon);
|
|
640
623
|
var ChevronUpDownIcon_default = ForwardRef3;
|
|
641
624
|
function ChevronUpIcon({
|
|
642
625
|
title,
|
|
643
626
|
titleId,
|
|
644
627
|
...props
|
|
645
628
|
}, svgRef) {
|
|
646
|
-
return /* @__PURE__ */
|
|
629
|
+
return /* @__PURE__ */ React6.createElement("svg", Object.assign({
|
|
647
630
|
xmlns: "http://www.w3.org/2000/svg",
|
|
648
631
|
viewBox: "0 0 20 20",
|
|
649
632
|
fill: "currentColor",
|
|
@@ -651,15 +634,61 @@ function ChevronUpIcon({
|
|
|
651
634
|
"data-slot": "icon",
|
|
652
635
|
ref: svgRef,
|
|
653
636
|
"aria-labelledby": titleId
|
|
654
|
-
}, props), title ? /* @__PURE__ */
|
|
637
|
+
}, props), title ? /* @__PURE__ */ React6.createElement("title", {
|
|
655
638
|
id: titleId
|
|
656
|
-
}, title) : null, /* @__PURE__ */
|
|
639
|
+
}, title) : null, /* @__PURE__ */ React6.createElement("path", {
|
|
657
640
|
fillRule: "evenodd",
|
|
658
641
|
d: "M9.47 6.47a.75.75 0 0 1 1.06 0l4.25 4.25a.75.75 0 1 1-1.06 1.06L10 8.06l-3.72 3.72a.75.75 0 0 1-1.06-1.06l4.25-4.25Z",
|
|
659
642
|
clipRule: "evenodd"
|
|
660
643
|
}));
|
|
661
644
|
}
|
|
662
|
-
var ForwardRef4 = /* @__PURE__ */
|
|
645
|
+
var ForwardRef4 = /* @__PURE__ */ React6.forwardRef(ChevronUpIcon);
|
|
663
646
|
var ChevronUpIcon_default = ForwardRef4;
|
|
647
|
+
function PencilSquareIcon({
|
|
648
|
+
title,
|
|
649
|
+
titleId,
|
|
650
|
+
...props
|
|
651
|
+
}, svgRef) {
|
|
652
|
+
return /* @__PURE__ */ React6.createElement("svg", Object.assign({
|
|
653
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
654
|
+
viewBox: "0 0 20 20",
|
|
655
|
+
fill: "currentColor",
|
|
656
|
+
"aria-hidden": "true",
|
|
657
|
+
"data-slot": "icon",
|
|
658
|
+
ref: svgRef,
|
|
659
|
+
"aria-labelledby": titleId
|
|
660
|
+
}, props), title ? /* @__PURE__ */ React6.createElement("title", {
|
|
661
|
+
id: titleId
|
|
662
|
+
}, title) : null, /* @__PURE__ */ React6.createElement("path", {
|
|
663
|
+
d: "m5.433 13.917 1.262-3.155A4 4 0 0 1 7.58 9.42l6.92-6.918a2.121 2.121 0 0 1 3 3l-6.92 6.918c-.383.383-.84.685-1.343.886l-3.154 1.262a.5.5 0 0 1-.65-.65Z"
|
|
664
|
+
}), /* @__PURE__ */ React6.createElement("path", {
|
|
665
|
+
d: "M3.5 5.75c0-.69.56-1.25 1.25-1.25H10A.75.75 0 0 0 10 3H4.75A2.75 2.75 0 0 0 2 5.75v9.5A2.75 2.75 0 0 0 4.75 18h9.5A2.75 2.75 0 0 0 17 15.25V10a.75.75 0 0 0-1.5 0v5.25c0 .69-.56 1.25-1.25 1.25h-9.5c-.69 0-1.25-.56-1.25-1.25v-9.5Z"
|
|
666
|
+
}));
|
|
667
|
+
}
|
|
668
|
+
var ForwardRef5 = /* @__PURE__ */ React6.forwardRef(PencilSquareIcon);
|
|
669
|
+
var PencilSquareIcon_default = ForwardRef5;
|
|
670
|
+
function TrashIcon({
|
|
671
|
+
title,
|
|
672
|
+
titleId,
|
|
673
|
+
...props
|
|
674
|
+
}, svgRef) {
|
|
675
|
+
return /* @__PURE__ */ React6.createElement("svg", Object.assign({
|
|
676
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
677
|
+
viewBox: "0 0 20 20",
|
|
678
|
+
fill: "currentColor",
|
|
679
|
+
"aria-hidden": "true",
|
|
680
|
+
"data-slot": "icon",
|
|
681
|
+
ref: svgRef,
|
|
682
|
+
"aria-labelledby": titleId
|
|
683
|
+
}, props), title ? /* @__PURE__ */ React6.createElement("title", {
|
|
684
|
+
id: titleId
|
|
685
|
+
}, title) : null, /* @__PURE__ */ React6.createElement("path", {
|
|
686
|
+
fillRule: "evenodd",
|
|
687
|
+
d: "M8.75 1A2.75 2.75 0 0 0 6 3.75v.443c-.795.077-1.584.176-2.365.298a.75.75 0 1 0 .23 1.482l.149-.022.841 10.518A2.75 2.75 0 0 0 7.596 19h4.807a2.75 2.75 0 0 0 2.742-2.53l.841-10.52.149.023a.75.75 0 0 0 .23-1.482A41.03 41.03 0 0 0 14 4.193V3.75A2.75 2.75 0 0 0 11.25 1h-2.5ZM10 4c.84 0 1.673.025 2.5.075V3.75c0-.69-.56-1.25-1.25-1.25h-2.5c-.69 0-1.25.56-1.25 1.25v.325C8.327 4.025 9.16 4 10 4ZM8.58 7.72a.75.75 0 0 0-1.5.06l.3 7.5a.75.75 0 1 0 1.5-.06l-.3-7.5Zm4.34.06a.75.75 0 1 0-1.5-.06l-.3 7.5a.75.75 0 1 0 1.5.06l.3-7.5Z",
|
|
688
|
+
clipRule: "evenodd"
|
|
689
|
+
}));
|
|
690
|
+
}
|
|
691
|
+
var ForwardRef6 = /* @__PURE__ */ React6.forwardRef(TrashIcon);
|
|
692
|
+
var TrashIcon_default = ForwardRef6;
|
|
664
693
|
|
|
665
|
-
export { Badge_default, CheckIcon_default, ChevronDownIcon_default, ChevronUpDownIcon_default, ChevronUpIcon_default, FieldWrapper_default, HelpText_default,
|
|
694
|
+
export { Badge_default, CheckIcon_default, ChevronDownIcon_default, ChevronUpDownIcon_default, ChevronUpIcon_default, FieldWrapper_default, Form_default, HelpText_default, PencilSquareIcon_default, SubmitButton_default, Tab_default, TagInputField_default, TagInput_default, TrashIcon_default, clsx, clsx_default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { __commonJS, __toESM } from './chunk-
|
|
1
|
+
import { sharedContext } from './chunk-J23QSWDL.js';
|
|
2
|
+
import { __commonJS, __toESM } from './chunk-WPLOTFGW.js';
|
|
3
3
|
import React, { useContext, useRef } from 'react';
|
|
4
4
|
import { useIntl } from 'react-intl';
|
|
5
5
|
import { useController } from 'react-hook-form';
|
|
@@ -421,14 +421,17 @@ var require_isEmail = __commonJS({
|
|
|
421
421
|
module.exports.default = exports.default;
|
|
422
422
|
}
|
|
423
423
|
});
|
|
424
|
-
var FormContext =
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
}
|
|
424
|
+
var FormContext = sharedContext(
|
|
425
|
+
"FormContext",
|
|
426
|
+
React.createContext({
|
|
427
|
+
submitError: "",
|
|
428
|
+
rhf: null,
|
|
429
|
+
api: null,
|
|
430
|
+
setSubmitError: () => {
|
|
431
|
+
},
|
|
432
|
+
disabled: false
|
|
433
|
+
})
|
|
434
|
+
);
|
|
432
435
|
var FormContext_default = FormContext;
|
|
433
436
|
|
|
434
437
|
// src/modules/forms/hooks/useFormContext.ts
|
|
@@ -438,6 +441,40 @@ var useFormContext_default = useFormContext;
|
|
|
438
441
|
// src/modules/forms/lib/validators.ts
|
|
439
442
|
var import_isLength = __toESM(require_isLength(), 1);
|
|
440
443
|
var import_isEmail = __toESM(require_isEmail(), 1);
|
|
444
|
+
var millisecondsInWeek = 6048e5;
|
|
445
|
+
var millisecondsInDay = 864e5;
|
|
446
|
+
var constructFromSymbol = /* @__PURE__ */ Symbol.for("constructDateFrom");
|
|
447
|
+
|
|
448
|
+
// ../node_modules/date-fns/constructFrom.js
|
|
449
|
+
function constructFrom(date, value) {
|
|
450
|
+
if (typeof date === "function") return date(value);
|
|
451
|
+
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
452
|
+
return date[constructFromSymbol](value);
|
|
453
|
+
if (date instanceof Date) return new date.constructor(value);
|
|
454
|
+
return new Date(value);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// ../node_modules/date-fns/toDate.js
|
|
458
|
+
function toDate(argument, context) {
|
|
459
|
+
return constructFrom(context || argument, argument);
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// ../node_modules/date-fns/startOfDay.js
|
|
463
|
+
function startOfDay(date, options) {
|
|
464
|
+
const _date = toDate(date, options?.in);
|
|
465
|
+
_date.setHours(0, 0, 0, 0);
|
|
466
|
+
return _date;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
// ../node_modules/date-fns/isDate.js
|
|
470
|
+
function isDate(value) {
|
|
471
|
+
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
// ../node_modules/date-fns/isValid.js
|
|
475
|
+
function isValid(date) {
|
|
476
|
+
return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
|
|
477
|
+
}
|
|
441
478
|
var isString = (value) => typeof value === "string";
|
|
442
479
|
var validateMaxLength = (max) => ({
|
|
443
480
|
isValid: (value) => (0, import_isLength.default)(value || "", { max }),
|
|
@@ -578,4 +615,4 @@ var useField = (props) => {
|
|
|
578
615
|
};
|
|
579
616
|
var useField_default = useField;
|
|
580
617
|
|
|
581
|
-
export { FormContext_default, useField_default, useFormContext_default, validateDate, validateEmail, validateMaxLength, validateRequiredTag };
|
|
618
|
+
export { FormContext_default, constructFrom, isValid, millisecondsInDay, millisecondsInWeek, startOfDay, toDate, useField_default, useFormContext_default, validateDate, validateEmail, validateMaxLength, validateRequiredTag };
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
import { clsx_default, SubmitButton_default } from './chunk-HJKRGBDG.js';
|
|
2
|
+
import { NoSymbolIcon_default } from './chunk-HERLM47Z.js';
|
|
3
|
+
import { sharedContext } from './chunk-J23QSWDL.js';
|
|
4
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import { FormattedMessage, useIntl } from 'react-intl';
|
|
6
|
+
import Image from 'next/image';
|
|
7
|
+
import { createContext, useState } from 'react';
|
|
8
|
+
|
|
9
|
+
var Button = ({
|
|
10
|
+
text,
|
|
11
|
+
children,
|
|
12
|
+
onClick,
|
|
13
|
+
className = "",
|
|
14
|
+
disabled = false,
|
|
15
|
+
id = "",
|
|
16
|
+
variant = "primary",
|
|
17
|
+
size = "md",
|
|
18
|
+
type = "button",
|
|
19
|
+
loading = false,
|
|
20
|
+
icon,
|
|
21
|
+
iconRight,
|
|
22
|
+
fullWidth = false,
|
|
23
|
+
rounded = "md",
|
|
24
|
+
ariaLabel,
|
|
25
|
+
...props
|
|
26
|
+
}) => {
|
|
27
|
+
const baseClasses = "inline-flex items-center justify-center font-medium shadow-xs focus:outline-hidden focus:ring-2 focus:ring-offset-2 transition-colors duration-200 disabled:cursor-not-allowed disabled:opacity-50";
|
|
28
|
+
const sizeClasses = {
|
|
29
|
+
xs: "px-2.5 py-1.5 text-xs h-6",
|
|
30
|
+
sm: "px-3 py-2 text-sm h-8",
|
|
31
|
+
md: "px-4 py-2 text-sm h-9",
|
|
32
|
+
lg: "px-6 py-3 text-base h-11"
|
|
33
|
+
};
|
|
34
|
+
const roundedClasses = {
|
|
35
|
+
none: "rounded-none",
|
|
36
|
+
sm: "rounded-sm",
|
|
37
|
+
md: "rounded-md",
|
|
38
|
+
lg: "rounded-lg",
|
|
39
|
+
full: "rounded-full"
|
|
40
|
+
};
|
|
41
|
+
const variantClasses = {
|
|
42
|
+
primary: "border border-accent bg-accent text-text-on-accent hover:bg-accent-hover focus:ring-focus-ring",
|
|
43
|
+
secondary: "border border-border-default bg-surface text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",
|
|
44
|
+
tertiary: "border border-border-subtle bg-surface text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",
|
|
45
|
+
quaternary: "bg-transparent text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",
|
|
46
|
+
danger: "border border-danger bg-surface text-danger hover:bg-rose-50 dark:hover:bg-rose-900/10 focus:ring-rose-500",
|
|
47
|
+
ghost: "bg-transparent border border-transparent text-text-secondary hover:text-text-primary hover:bg-surface-raised focus:ring-focus-ring",
|
|
48
|
+
success: "border border-emerald-500 dark:border-emerald-400 bg-emerald-50 dark:bg-emerald-900/20 text-emerald-600 dark:text-emerald-400 hover:bg-emerald-100 dark:hover:bg-emerald-900/30 focus:ring-emerald-500",
|
|
49
|
+
neutral: "border border-border-default bg-surface-raised text-text-secondary hover:bg-surface-raised focus:ring-focus-ring",
|
|
50
|
+
input: "border border-border-default bg-surface text-text-primary hover:border-slate-400 dark:hover:border-slate-500 focus:ring-focus-ring focus:border-slate-500"
|
|
51
|
+
};
|
|
52
|
+
const content = children || text;
|
|
53
|
+
const hasIcon = icon || iconRight;
|
|
54
|
+
const spacingClass = hasIcon && content ? "gap-2" : "";
|
|
55
|
+
return /* @__PURE__ */ jsx(
|
|
56
|
+
"button",
|
|
57
|
+
{
|
|
58
|
+
id,
|
|
59
|
+
type,
|
|
60
|
+
disabled: disabled || loading,
|
|
61
|
+
onClick,
|
|
62
|
+
"aria-label": ariaLabel,
|
|
63
|
+
className: clsx_default(
|
|
64
|
+
baseClasses,
|
|
65
|
+
sizeClasses[size],
|
|
66
|
+
roundedClasses[rounded],
|
|
67
|
+
variantClasses[variant],
|
|
68
|
+
spacingClass,
|
|
69
|
+
{
|
|
70
|
+
"w-full": fullWidth
|
|
71
|
+
},
|
|
72
|
+
className
|
|
73
|
+
),
|
|
74
|
+
...props,
|
|
75
|
+
children: loading ? /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
76
|
+
/* @__PURE__ */ jsx("div", { className: "w-4 h-4 border-2 border-current border-t-transparent rounded-full animate-spin" }),
|
|
77
|
+
content
|
|
78
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
79
|
+
icon,
|
|
80
|
+
content,
|
|
81
|
+
iconRight
|
|
82
|
+
] })
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
var Button_default = Button;
|
|
87
|
+
var NoData = ({ message, className = "", Icon = null }) => {
|
|
88
|
+
return /* @__PURE__ */ jsx(
|
|
89
|
+
"div",
|
|
90
|
+
{
|
|
91
|
+
className: clsx_default(
|
|
92
|
+
"rounded-md flex w-full flex-col items-center justify-center min-h-[176px] py-8 border-1 border-dashed border-border-default text-slate-500 dark:text-slate-600",
|
|
93
|
+
className
|
|
94
|
+
),
|
|
95
|
+
children: /* @__PURE__ */ jsxs("div", { className: "grid items-center justify-center", children: [
|
|
96
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center text-slate-400 dark:text-slate-600", children: Icon || /* @__PURE__ */ jsx(NoSymbolIcon_default, { className: "h-6 w-6" }) }),
|
|
97
|
+
/* @__PURE__ */ jsx(
|
|
98
|
+
FormattedMessage,
|
|
99
|
+
{
|
|
100
|
+
id: "no_data_message",
|
|
101
|
+
defaultMessage: "<p>No <span> {message} available</span> </p>",
|
|
102
|
+
values: {
|
|
103
|
+
p: (chunks) => /* @__PURE__ */ jsx("p", { className: "mt-2 m-auto flex items-center justify-center", children: chunks }),
|
|
104
|
+
span: (chunks) => /* @__PURE__ */ jsxs("span", { className: "capitalize ml-1", children: [
|
|
105
|
+
" ",
|
|
106
|
+
chunks,
|
|
107
|
+
" "
|
|
108
|
+
] }),
|
|
109
|
+
message
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
] })
|
|
114
|
+
}
|
|
115
|
+
);
|
|
116
|
+
};
|
|
117
|
+
var NoData_default = NoData;
|
|
118
|
+
var NoImageSvg = ({
|
|
119
|
+
className = "w-full h-full",
|
|
120
|
+
width = 200,
|
|
121
|
+
height = 200
|
|
122
|
+
}) => {
|
|
123
|
+
return /* @__PURE__ */ jsxs(
|
|
124
|
+
"svg",
|
|
125
|
+
{
|
|
126
|
+
width,
|
|
127
|
+
height,
|
|
128
|
+
viewBox: "0 0 200 200",
|
|
129
|
+
fill: "none",
|
|
130
|
+
className,
|
|
131
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
132
|
+
children: [
|
|
133
|
+
/* @__PURE__ */ jsx(
|
|
134
|
+
"rect",
|
|
135
|
+
{
|
|
136
|
+
x: "10",
|
|
137
|
+
y: "10",
|
|
138
|
+
width: "180",
|
|
139
|
+
height: "180",
|
|
140
|
+
rx: "8",
|
|
141
|
+
stroke: "currentColor",
|
|
142
|
+
strokeWidth: "3",
|
|
143
|
+
strokeDasharray: "8 4",
|
|
144
|
+
fill: "transparent",
|
|
145
|
+
className: "text-slate-800 dark:text-slate-400"
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
"rect",
|
|
150
|
+
{
|
|
151
|
+
x: "40",
|
|
152
|
+
y: "40",
|
|
153
|
+
width: "120",
|
|
154
|
+
height: "80",
|
|
155
|
+
rx: "4",
|
|
156
|
+
stroke: "currentColor",
|
|
157
|
+
strokeWidth: "3",
|
|
158
|
+
fill: "transparent"
|
|
159
|
+
}
|
|
160
|
+
),
|
|
161
|
+
/* @__PURE__ */ jsx(
|
|
162
|
+
"path",
|
|
163
|
+
{
|
|
164
|
+
d: "M50 100 L70 80 L90 95 L110 75 L130 90 L150 70",
|
|
165
|
+
stroke: "currentColor",
|
|
166
|
+
strokeWidth: "3",
|
|
167
|
+
fill: "none",
|
|
168
|
+
strokeLinecap: "round",
|
|
169
|
+
strokeLinejoin: "round"
|
|
170
|
+
}
|
|
171
|
+
),
|
|
172
|
+
/* @__PURE__ */ jsx(
|
|
173
|
+
"circle",
|
|
174
|
+
{
|
|
175
|
+
cx: "130",
|
|
176
|
+
cy: "55",
|
|
177
|
+
r: "8",
|
|
178
|
+
stroke: "currentColor",
|
|
179
|
+
strokeWidth: "3",
|
|
180
|
+
fill: "transparent"
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ jsx(
|
|
184
|
+
"text",
|
|
185
|
+
{
|
|
186
|
+
x: "100",
|
|
187
|
+
y: "145",
|
|
188
|
+
textAnchor: "middle",
|
|
189
|
+
className: "text-text-secondary text-sm font-semibold",
|
|
190
|
+
fill: "currentColor",
|
|
191
|
+
children: "No Image"
|
|
192
|
+
}
|
|
193
|
+
)
|
|
194
|
+
]
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
};
|
|
198
|
+
var NoImageSvg_default = NoImageSvg;
|
|
199
|
+
|
|
200
|
+
// src/modules/common/utils/defaultNextImageLoader.ts
|
|
201
|
+
var defaultNextImageLoader = ({ src, width, quality = 75 }) => {
|
|
202
|
+
if (src) return `${src}?w=${width}&q=${quality}`;
|
|
203
|
+
return "/no-image.jpg";
|
|
204
|
+
};
|
|
205
|
+
var defaultNextImageLoader_default = defaultNextImageLoader;
|
|
206
|
+
var ImageWithFallback = ({ fallbackSrc = "", src, ...props }) => {
|
|
207
|
+
const [imageSrc, setImageSrc] = useState(src);
|
|
208
|
+
const [hasError, setHasError] = useState(false);
|
|
209
|
+
const { formatMessage } = useIntl();
|
|
210
|
+
if (hasError || !imageSrc) {
|
|
211
|
+
return /* @__PURE__ */ jsx(
|
|
212
|
+
"div",
|
|
213
|
+
{
|
|
214
|
+
className: props.className || "w-full h-full flex items-center justify-center bg-surface",
|
|
215
|
+
children: /* @__PURE__ */ jsx(
|
|
216
|
+
NoImageSvg_default,
|
|
217
|
+
{
|
|
218
|
+
width: props.width || 200,
|
|
219
|
+
height: props.height || 200,
|
|
220
|
+
className: "max-w-full max-h-full"
|
|
221
|
+
}
|
|
222
|
+
)
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
return /* @__PURE__ */ jsx(
|
|
227
|
+
Image,
|
|
228
|
+
{
|
|
229
|
+
src: imageSrc,
|
|
230
|
+
loader: defaultNextImageLoader_default,
|
|
231
|
+
alt: formatMessage({
|
|
232
|
+
id: "image-not-found",
|
|
233
|
+
defaultMessage: "Image not found"
|
|
234
|
+
}),
|
|
235
|
+
...props,
|
|
236
|
+
onError: () => {
|
|
237
|
+
if (fallbackSrc && imageSrc !== fallbackSrc) {
|
|
238
|
+
setImageSrc(fallbackSrc);
|
|
239
|
+
} else {
|
|
240
|
+
setHasError(true);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
);
|
|
245
|
+
};
|
|
246
|
+
var ImageWithFallback_default = ImageWithFallback;
|
|
247
|
+
var FormWrapperContext = sharedContext(
|
|
248
|
+
"FormWrapperContext",
|
|
249
|
+
createContext(false)
|
|
250
|
+
);
|
|
251
|
+
var FormWrapper = ({ children, className = "" }) => {
|
|
252
|
+
return /* @__PURE__ */ jsx(FormWrapperContext.Provider, { value: true, children: /* @__PURE__ */ jsx("div", { className: "sm:max-w-full", children: /* @__PURE__ */ jsx(
|
|
253
|
+
"div",
|
|
254
|
+
{
|
|
255
|
+
className: clsx_default(
|
|
256
|
+
"bg-surface rounded-md shadow-sm overflow-hidden",
|
|
257
|
+
className
|
|
258
|
+
),
|
|
259
|
+
children
|
|
260
|
+
}
|
|
261
|
+
) }) });
|
|
262
|
+
};
|
|
263
|
+
var FormWrapper_default = FormWrapper;
|
|
264
|
+
var SaveAndCancelButtons = ({
|
|
265
|
+
cancelText = null,
|
|
266
|
+
showCancel = true,
|
|
267
|
+
submitText = null,
|
|
268
|
+
showSubmit = true,
|
|
269
|
+
onCancel,
|
|
270
|
+
className = ""
|
|
271
|
+
}) => {
|
|
272
|
+
const { formatMessage } = useIntl();
|
|
273
|
+
return /* @__PURE__ */ jsxs(
|
|
274
|
+
"span",
|
|
275
|
+
{
|
|
276
|
+
className: clsx_default(
|
|
277
|
+
"flex shrink-0 items-center space-x-4 py-5 pl-1",
|
|
278
|
+
className
|
|
279
|
+
),
|
|
280
|
+
children: [
|
|
281
|
+
showCancel ? /* @__PURE__ */ jsx(
|
|
282
|
+
"button",
|
|
283
|
+
{
|
|
284
|
+
onClick: onCancel,
|
|
285
|
+
"data-id": "cancel_update",
|
|
286
|
+
type: "button",
|
|
287
|
+
className: clsx_default(
|
|
288
|
+
"focus:ring-focus-ring",
|
|
289
|
+
"inline-flex items-center rounded-md border border-border-default bg-surface px-4 py-2 text-sm font-medium text-text-secondary shadow-xs hover:bg-surface-raised focus:outline-hidden focus:ring-2 focus:ring-focus-ring focus:ring-offset-2"
|
|
290
|
+
),
|
|
291
|
+
children: cancelText || formatMessage({
|
|
292
|
+
id: "cancel",
|
|
293
|
+
defaultMessage: "Cancel"
|
|
294
|
+
})
|
|
295
|
+
}
|
|
296
|
+
) : null,
|
|
297
|
+
showSubmit ? /* @__PURE__ */ jsx(
|
|
298
|
+
SubmitButton_default,
|
|
299
|
+
{
|
|
300
|
+
label: submitText || formatMessage({
|
|
301
|
+
id: "save",
|
|
302
|
+
defaultMessage: "Save"
|
|
303
|
+
})
|
|
304
|
+
}
|
|
305
|
+
) : null
|
|
306
|
+
]
|
|
307
|
+
}
|
|
308
|
+
);
|
|
309
|
+
};
|
|
310
|
+
var SaveAndCancelButtons_default = SaveAndCancelButtons;
|
|
311
|
+
var DraggableIcon = () => {
|
|
312
|
+
return /* @__PURE__ */ jsx(
|
|
313
|
+
"svg",
|
|
314
|
+
{
|
|
315
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
316
|
+
className: "h-5 w-4 text-slate-900 group-hover:text-slate-800 dark:text-slate-500 dark:group-hover:text-slate-400",
|
|
317
|
+
viewBox: "0 0 20 20",
|
|
318
|
+
fill: "currentColor",
|
|
319
|
+
"aria-hidden": "true",
|
|
320
|
+
children: /* @__PURE__ */ jsx("path", { d: "M8.5 17c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7-10c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm-7 3c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm7 0c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 7c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm-7-14c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" })
|
|
321
|
+
}
|
|
322
|
+
);
|
|
323
|
+
};
|
|
324
|
+
var DraggableIcon_default = DraggableIcon;
|
|
325
|
+
|
|
326
|
+
export { Button_default, DraggableIcon_default, FormWrapperContext, FormWrapper_default, ImageWithFallback_default, NoData_default, NoImageSvg_default, SaveAndCancelButtons_default };
|