@universe-platform/ui 0.1.0-beta.61 → 0.1.0-beta.62
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/index.d.mts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +715 -665
- package/dist/index.mjs +715 -665
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -10859,8 +10859,57 @@ async function uploadFileToDrive(file, opts) {
|
|
|
10859
10859
|
};
|
|
10860
10860
|
}
|
|
10861
10861
|
|
|
10862
|
-
// src/components/PaymentReportsBlock/
|
|
10862
|
+
// src/components/PaymentReportsBlock/PortalLinksBar.tsx
|
|
10863
10863
|
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
10864
|
+
function platformOrigin() {
|
|
10865
|
+
const w = typeof window !== "undefined" ? window : {};
|
|
10866
|
+
const base = w.NEXT_PUBLIC_UNIVERSE_SERVER_URL || w.NEXT_PUBLIC_UNIVERSE_API_URL || process.env.NEXT_PUBLIC_UNIVERSE_SERVER_URL || process.env.NEXT_PUBLIC_UNIVERSE_API_URL || (typeof window !== "undefined" ? window.location.origin : "");
|
|
10867
|
+
return String(base).replace(/\/$/, "");
|
|
10868
|
+
}
|
|
10869
|
+
function PortalLinksBar({ config, componentId }) {
|
|
10870
|
+
const { addToast } = useToast();
|
|
10871
|
+
if (!config.portalEnabled || !config.reportersTableId) return null;
|
|
10872
|
+
const origin = platformOrigin();
|
|
10873
|
+
const links = [
|
|
10874
|
+
config.registrationFormId && {
|
|
10875
|
+
label: "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D4\u05E8\u05E9\u05DE\u05D4 (\u05D8\u05D5\u05E4\u05E1 1)",
|
|
10876
|
+
url: `${origin}/embed/form/${config.reportersTableId}?form=${encodeURIComponent(config.registrationFormId)}`
|
|
10877
|
+
},
|
|
10878
|
+
componentId && {
|
|
10879
|
+
label: "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D3\u05D9\u05D5\u05D5\u05D7 (\u05D8\u05D5\u05E4\u05E1 2, \u05D1\u05DB\u05E0\u05D9\u05E1\u05D4 \u05E2\u05DD \u05E7\u05D5\u05D3 \u05D1\u05D0\u05D9\u05DE\u05D9\u05D9\u05DC)",
|
|
10880
|
+
url: `${origin}/embed/reporter-report/${config.reportsTableId}?c=${encodeURIComponent(componentId)}`
|
|
10881
|
+
}
|
|
10882
|
+
].filter(Boolean);
|
|
10883
|
+
if (!links.length) return null;
|
|
10884
|
+
const copy = async (url, label) => {
|
|
10885
|
+
try {
|
|
10886
|
+
await navigator.clipboard.writeText(url);
|
|
10887
|
+
addToast({ type: "success", message: `${label}: \u05D4\u05D5\u05E2\u05EA\u05E7` });
|
|
10888
|
+
} catch (e) {
|
|
10889
|
+
window.prompt("\u05D4\u05E2\u05EA\u05E7 \u05D9\u05D3\u05E0\u05D9\u05EA:", url);
|
|
10890
|
+
}
|
|
10891
|
+
};
|
|
10892
|
+
return /* @__PURE__ */ jsx29("div", { className: "flex flex-col gap-1.5 rounded-lg border border-slate-200 bg-slate-50 px-3 py-2 text-xs", children: links.map((l) => /* @__PURE__ */ jsxs23("div", { className: "flex flex-wrap items-center gap-2", children: [
|
|
10893
|
+
/* @__PURE__ */ jsxs23("span", { className: "font-semibold text-slate-600 whitespace-nowrap", children: [
|
|
10894
|
+
l.label,
|
|
10895
|
+
":"
|
|
10896
|
+
] }),
|
|
10897
|
+
/* @__PURE__ */ jsx29(
|
|
10898
|
+
"input",
|
|
10899
|
+
{
|
|
10900
|
+
readOnly: true,
|
|
10901
|
+
dir: "ltr",
|
|
10902
|
+
value: l.url,
|
|
10903
|
+
onFocus: (e) => e.currentTarget.select(),
|
|
10904
|
+
className: "flex-1 min-w-[200px] rounded-md border border-slate-200 bg-white px-2 py-1 text-[11px] text-slate-600"
|
|
10905
|
+
}
|
|
10906
|
+
),
|
|
10907
|
+
/* @__PURE__ */ jsx29("button", { type: "button", onClick: () => copy(l.url, l.label), className: "font-semibold text-blue-600 hover:underline cursor-pointer whitespace-nowrap", children: "\u05D4\u05E2\u05EA\u05E7" })
|
|
10908
|
+
] }, l.url)) });
|
|
10909
|
+
}
|
|
10910
|
+
|
|
10911
|
+
// src/components/PaymentReportsBlock/PaymentReportsBlock.tsx
|
|
10912
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10864
10913
|
var EMPTY = { rows: [], columns: [], relationOptions: {} };
|
|
10865
10914
|
var PaymentReportsBlock = (props) => {
|
|
10866
10915
|
const { executeAction, orgId, role, readOnly, permissions, className } = props;
|
|
@@ -11028,16 +11077,17 @@ var PaymentReportsBlock = (props) => {
|
|
|
11028
11077
|
}
|
|
11029
11078
|
};
|
|
11030
11079
|
if (!config || missing.length) {
|
|
11031
|
-
return /* @__PURE__ */
|
|
11080
|
+
return /* @__PURE__ */ jsx30("div", { dir: "rtl", className: "p-6 rounded-xl border border-dashed border-slate-300 text-slate-500 text-sm text-center", children: '\u05D4\u05E8\u05DB\u05D9\u05D1 "\u05D3\u05D9\u05D5\u05D5\u05D7\u05D9\u05DD \u05DC\u05EA\u05E9\u05DC\u05D5\u05DD" \u05E2\u05D3\u05D9\u05D9\u05DF \u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8 \u05D1\u05DE\u05DC\u05D5\u05D0\u05D5. \u05D9\u05E9 \u05DC\u05D4\u05E9\u05DC\u05D9\u05DD \u05D0\u05EA \u05D4\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D1\u05E2\u05D5\u05E8\u05DA \u05D4\u05E2\u05DE\u05D5\u05D3.' });
|
|
11032
11081
|
}
|
|
11033
11082
|
const tabs = [
|
|
11034
11083
|
{ key: "unpaid", label: "\u05D3\u05D9\u05D5\u05D5\u05D7\u05D9\u05DD (\u05D8\u05E8\u05DD \u05E9\u05D5\u05DC\u05DE\u05D5)", count: unpaidCount },
|
|
11035
11084
|
{ key: "paid", label: "\u05E9\u05D5\u05DC\u05DD (\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05E7\u05D1\u05DC\u05D4)", count: model.payments.filter((p) => !p.receiptDate).length },
|
|
11036
11085
|
{ key: "receipts", label: '\u05E7\u05D1\u05DC\u05D5\u05EA \u05D5\u05D4\u05E0\u05D4"\u05D7', count: model.payments.filter((p) => !!p.receiptDate).length }
|
|
11037
11086
|
];
|
|
11038
|
-
return /* @__PURE__ */
|
|
11039
|
-
config.title && /* @__PURE__ */
|
|
11040
|
-
/* @__PURE__ */
|
|
11087
|
+
return /* @__PURE__ */ jsxs24("div", { dir: "rtl", className: `w-full flex flex-col gap-4 ${className || ""}`, children: [
|
|
11088
|
+
config.title && /* @__PURE__ */ jsx30("h2", { className: "text-2xl font-bold text-slate-800", children: config.title }),
|
|
11089
|
+
canEdit && /* @__PURE__ */ jsx30(PortalLinksBar, { config, componentId: props.componentId }),
|
|
11090
|
+
/* @__PURE__ */ jsx30("div", { className: "flex border-b border-slate-200 overflow-x-auto", children: tabs.map((t) => /* @__PURE__ */ jsxs24(
|
|
11041
11091
|
"button",
|
|
11042
11092
|
{
|
|
11043
11093
|
type: "button",
|
|
@@ -11046,7 +11096,7 @@ var PaymentReportsBlock = (props) => {
|
|
|
11046
11096
|
children: [
|
|
11047
11097
|
t.label,
|
|
11048
11098
|
" ",
|
|
11049
|
-
/* @__PURE__ */
|
|
11099
|
+
/* @__PURE__ */ jsxs24("span", { className: "text-xs opacity-70", children: [
|
|
11050
11100
|
"(",
|
|
11051
11101
|
t.count,
|
|
11052
11102
|
")"
|
|
@@ -11055,8 +11105,8 @@ var PaymentReportsBlock = (props) => {
|
|
|
11055
11105
|
},
|
|
11056
11106
|
t.key
|
|
11057
11107
|
)) }),
|
|
11058
|
-
/* @__PURE__ */
|
|
11059
|
-
/* @__PURE__ */
|
|
11108
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-wrap items-center gap-3", children: [
|
|
11109
|
+
/* @__PURE__ */ jsx30(
|
|
11060
11110
|
"input",
|
|
11061
11111
|
{
|
|
11062
11112
|
type: "text",
|
|
@@ -11066,24 +11116,24 @@ var PaymentReportsBlock = (props) => {
|
|
|
11066
11116
|
className: "border border-slate-300 rounded-lg px-3 py-2 text-sm bg-white w-64"
|
|
11067
11117
|
}
|
|
11068
11118
|
),
|
|
11069
|
-
config.reportDateColumn && /* @__PURE__ */
|
|
11119
|
+
config.reportDateColumn && /* @__PURE__ */ jsxs24(
|
|
11070
11120
|
"select",
|
|
11071
11121
|
{
|
|
11072
11122
|
value: month,
|
|
11073
11123
|
onChange: (e) => setMonth(e.target.value),
|
|
11074
11124
|
className: "border border-slate-300 rounded-lg px-3 py-2 text-sm bg-white",
|
|
11075
11125
|
children: [
|
|
11076
|
-
/* @__PURE__ */
|
|
11077
|
-
months.map((m) => /* @__PURE__ */
|
|
11126
|
+
/* @__PURE__ */ jsx30("option", { value: "", children: "\u05DB\u05DC \u05D4\u05D7\u05D5\u05D3\u05E9\u05D9\u05DD" }),
|
|
11127
|
+
months.map((m) => /* @__PURE__ */ jsx30("option", { value: m, children: monthLabel(m) }, m))
|
|
11078
11128
|
]
|
|
11079
11129
|
}
|
|
11080
11130
|
)
|
|
11081
11131
|
] }),
|
|
11082
|
-
error && /* @__PURE__ */
|
|
11083
|
-
/* @__PURE__ */
|
|
11084
|
-
/* @__PURE__ */
|
|
11132
|
+
error && /* @__PURE__ */ jsxs24("div", { className: "rounded-lg bg-rose-50 border border-rose-200 text-rose-700 text-sm px-4 py-3 flex items-center justify-between", children: [
|
|
11133
|
+
/* @__PURE__ */ jsx30("span", { children: error }),
|
|
11134
|
+
/* @__PURE__ */ jsx30("button", { type: "button", onClick: () => load(), className: "underline cursor-pointer", children: "\u05E0\u05E1\u05D4 \u05E9\u05D5\u05D1" })
|
|
11085
11135
|
] }),
|
|
11086
|
-
loading ? /* @__PURE__ */
|
|
11136
|
+
loading ? /* @__PURE__ */ jsx30("div", { className: "py-16 text-center text-slate-400 text-sm", children: "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." }) : tab === "unpaid" ? /* @__PURE__ */ jsx30(
|
|
11087
11137
|
UnpaidReportsTab,
|
|
11088
11138
|
{
|
|
11089
11139
|
config,
|
|
@@ -11098,8 +11148,8 @@ var PaymentReportsBlock = (props) => {
|
|
|
11098
11148
|
paymentLabels,
|
|
11099
11149
|
handlers
|
|
11100
11150
|
}
|
|
11101
|
-
) : tab === "paid" ? /* @__PURE__ */
|
|
11102
|
-
details && /* @__PURE__ */
|
|
11151
|
+
) : tab === "paid" ? /* @__PURE__ */ jsx30(PaidPaymentsTab, { config, symbol, canEdit, payments: pendingPayments, search, handlers }) : /* @__PURE__ */ jsx30(ReceiptsTab, { config, symbol, canEdit, payments: receivedPayments, search, handlers }),
|
|
11152
|
+
details && /* @__PURE__ */ jsx30(
|
|
11103
11153
|
PaymentDetailsModal,
|
|
11104
11154
|
{
|
|
11105
11155
|
payment: model.payments.find((p) => p.id === details.id) || details,
|
|
@@ -11110,7 +11160,7 @@ var PaymentReportsBlock = (props) => {
|
|
|
11110
11160
|
onClose: () => setDetails(null)
|
|
11111
11161
|
}
|
|
11112
11162
|
),
|
|
11113
|
-
confirm && /* @__PURE__ */
|
|
11163
|
+
confirm && /* @__PURE__ */ jsx30(
|
|
11114
11164
|
ConfirmModal,
|
|
11115
11165
|
{
|
|
11116
11166
|
danger: true,
|
|
@@ -11119,11 +11169,11 @@ var PaymentReportsBlock = (props) => {
|
|
|
11119
11169
|
confirmLabel: confirm.kind === "deleteReports" ? "\u05DE\u05D7\u05E7" : "\u05D1\u05D8\u05DC",
|
|
11120
11170
|
onConfirm: runConfirmed,
|
|
11121
11171
|
onClose: () => setConfirm(null),
|
|
11122
|
-
message: confirm.kind === "deleteReports" ? /* @__PURE__ */
|
|
11172
|
+
message: confirm.kind === "deleteReports" ? /* @__PURE__ */ jsx30("p", { children: "\u05DC\u05DE\u05D7\u05D5\u05E7 \u05D0\u05EA \u05D4\u05D3\u05D9\u05D5\u05D5\u05D7? \u05D4\u05E4\u05E2\u05D5\u05DC\u05D4 \u05D0\u05D9\u05E0\u05D4 \u05D4\u05E4\u05D9\u05DB\u05D4." }) : confirm.kind === "cancelPayment" ? /* @__PURE__ */ jsxs24("p", { children: [
|
|
11123
11173
|
'\u05D4\u05EA\u05E9\u05DC\u05D5\u05DD \u05D9\u05D9\u05DE\u05D7\u05E7, \u05D4\u05D3\u05D9\u05D5\u05D5\u05D7\u05D9\u05DD \u05D9\u05D7\u05D6\u05E8\u05D5 \u05DC\u05DC\u05E9\u05D5\u05E0\u05D9\u05EA "\u05D3\u05D9\u05D5\u05D5\u05D7\u05D9\u05DD (\u05D8\u05E8\u05DD \u05E9\u05D5\u05DC\u05DE\u05D5)"',
|
|
11124
11174
|
confirm.payment.proof.length > 0 ? ", \u05D5\u05D4\u05D0\u05E1\u05DE\u05DB\u05EA\u05D0 \u05EA\u05D9\u05DE\u05D7\u05E7 \u05D2\u05DD \u05DE-Google Drive" : "",
|
|
11125
11175
|
". \u05DC\u05D4\u05DE\u05E9\u05D9\u05DA?"
|
|
11126
|
-
] }) : /* @__PURE__ */
|
|
11176
|
+
] }) : /* @__PURE__ */ jsx30("p", { children: '\u05D0\u05D9\u05E9\u05D5\u05E8 \u05D4\u05E7\u05D1\u05DC\u05D4 \u05D9\u05D1\u05D5\u05D8\u05DC \u05D5\u05D4\u05EA\u05E9\u05DC\u05D5\u05DD \u05D9\u05D7\u05D6\u05D5\u05E8 \u05DC\u05DC\u05E9\u05D5\u05E0\u05D9\u05EA "\u05E9\u05D5\u05DC\u05DD (\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05E7\u05D1\u05DC\u05D4)". \u05DC\u05D4\u05DE\u05E9\u05D9\u05DA?' })
|
|
11127
11177
|
}
|
|
11128
11178
|
)
|
|
11129
11179
|
] });
|
|
@@ -11277,7 +11327,7 @@ function readFileAsBase64(file) {
|
|
|
11277
11327
|
}
|
|
11278
11328
|
|
|
11279
11329
|
// src/components/WhatsAppComponent/CreateTemplateModal.tsx
|
|
11280
|
-
import { Fragment as Fragment6, jsx as
|
|
11330
|
+
import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
11281
11331
|
function CreateTemplateModal({
|
|
11282
11332
|
isOpen,
|
|
11283
11333
|
onClose,
|
|
@@ -11629,12 +11679,12 @@ function CreateTemplateModal({
|
|
|
11629
11679
|
}
|
|
11630
11680
|
};
|
|
11631
11681
|
if (!isOpen) return null;
|
|
11632
|
-
return /* @__PURE__ */
|
|
11682
|
+
return /* @__PURE__ */ jsx31(
|
|
11633
11683
|
"div",
|
|
11634
11684
|
{
|
|
11635
11685
|
className: "fixed inset-0 bg-slate-900/60 backdrop-blur-xs z-50 flex items-center justify-center p-4 overflow-y-auto animate-in fade-in duration-200",
|
|
11636
11686
|
dir: "rtl",
|
|
11637
|
-
children: /* @__PURE__ */
|
|
11687
|
+
children: /* @__PURE__ */ jsxs25(
|
|
11638
11688
|
"div",
|
|
11639
11689
|
{
|
|
11640
11690
|
className: "bg-white rounded-2xl border border-slate-200 shadow-2xl w-full max-w-2xl max-h-[92vh] flex flex-col overflow-hidden animate-in zoom-in-95 duration-150",
|
|
@@ -11642,43 +11692,43 @@ function CreateTemplateModal({
|
|
|
11642
11692
|
"aria-modal": "true",
|
|
11643
11693
|
"aria-labelledby": "modal-title",
|
|
11644
11694
|
children: [
|
|
11645
|
-
/* @__PURE__ */
|
|
11646
|
-
/* @__PURE__ */
|
|
11647
|
-
/* @__PURE__ */
|
|
11648
|
-
/* @__PURE__ */
|
|
11649
|
-
/* @__PURE__ */
|
|
11650
|
-
/* @__PURE__ */
|
|
11695
|
+
/* @__PURE__ */ jsxs25("div", { className: "px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
|
|
11696
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2.5", children: [
|
|
11697
|
+
/* @__PURE__ */ jsx31("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx31(Plus, { className: "w-4 h-4" }) }),
|
|
11698
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
11699
|
+
/* @__PURE__ */ jsx31("h3", { id: "modal-title", className: "text-sm font-bold text-slate-900", children: "\u05D9\u05E6\u05D9\u05E8\u05EA \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4" }),
|
|
11700
|
+
/* @__PURE__ */ jsx31("p", { className: "text-xs text-slate-500", children: "\u05D4\u05D2\u05D3\u05E8\u05EA \u05EA\u05D5\u05DB\u05DF \u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05DE\u05E9\u05EA\u05E0\u05D9\u05DD \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta Cloud API" })
|
|
11651
11701
|
] })
|
|
11652
11702
|
] }),
|
|
11653
|
-
/* @__PURE__ */
|
|
11703
|
+
/* @__PURE__ */ jsx31(
|
|
11654
11704
|
"button",
|
|
11655
11705
|
{
|
|
11656
11706
|
type: "button",
|
|
11657
11707
|
onClick: onClose,
|
|
11658
11708
|
className: "p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-200/60 rounded-lg transition-colors cursor-pointer",
|
|
11659
11709
|
"aria-label": "\u05E1\u05D2\u05D5\u05E8",
|
|
11660
|
-
children: /* @__PURE__ */
|
|
11710
|
+
children: /* @__PURE__ */ jsx31(X9, { className: "w-5 h-5" })
|
|
11661
11711
|
}
|
|
11662
11712
|
)
|
|
11663
11713
|
] }),
|
|
11664
|
-
/* @__PURE__ */
|
|
11665
|
-
/* @__PURE__ */
|
|
11666
|
-
submitError && /* @__PURE__ */
|
|
11667
|
-
/* @__PURE__ */
|
|
11668
|
-
/* @__PURE__ */
|
|
11714
|
+
/* @__PURE__ */ jsxs25("form", { onSubmit: handleSubmit, className: "flex flex-col overflow-hidden flex-1", children: [
|
|
11715
|
+
/* @__PURE__ */ jsxs25("div", { className: "p-6 overflow-y-auto space-y-5 flex-1", children: [
|
|
11716
|
+
submitError && /* @__PURE__ */ jsxs25("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-800 flex items-center gap-2", children: [
|
|
11717
|
+
/* @__PURE__ */ jsx31(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
|
|
11718
|
+
/* @__PURE__ */ jsx31("span", { children: submitError })
|
|
11669
11719
|
] }),
|
|
11670
|
-
/* @__PURE__ */
|
|
11671
|
-
/* @__PURE__ */
|
|
11672
|
-
/* @__PURE__ */
|
|
11720
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1.5", children: [
|
|
11721
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
|
|
11722
|
+
/* @__PURE__ */ jsxs25("label", { className: "block text-xs font-bold text-slate-800", children: [
|
|
11673
11723
|
"\u05E9\u05DD \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4 ",
|
|
11674
|
-
/* @__PURE__ */
|
|
11724
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
11675
11725
|
] }),
|
|
11676
|
-
templateName && isNamePatternValid && !isNameDuplicate && /* @__PURE__ */
|
|
11677
|
-
/* @__PURE__ */
|
|
11726
|
+
templateName && isNamePatternValid && !isNameDuplicate && /* @__PURE__ */ jsxs25("span", { className: "text-[11px] text-emerald-600 font-semibold flex items-center gap-1", children: [
|
|
11727
|
+
/* @__PURE__ */ jsx31(CheckCircle22, { className: "w-3.5 h-3.5" }),
|
|
11678
11728
|
" \u05E9\u05DD \u05EA\u05E7\u05D9\u05DF"
|
|
11679
11729
|
] })
|
|
11680
11730
|
] }),
|
|
11681
|
-
/* @__PURE__ */
|
|
11731
|
+
/* @__PURE__ */ jsx31(
|
|
11682
11732
|
"input",
|
|
11683
11733
|
{
|
|
11684
11734
|
type: "text",
|
|
@@ -11690,47 +11740,47 @@ function CreateTemplateModal({
|
|
|
11690
11740
|
required: true
|
|
11691
11741
|
}
|
|
11692
11742
|
),
|
|
11693
|
-
/* @__PURE__ */
|
|
11694
|
-
!isNameEmpty && isNameDuplicate && /* @__PURE__ */
|
|
11695
|
-
/* @__PURE__ */
|
|
11743
|
+
/* @__PURE__ */ jsx31("p", { className: "text-[10px] text-slate-400 mt-1", children: "\u05D0\u05D5\u05EA\u05D9\u05D5\u05EA \u05E7\u05D8\u05E0\u05D5\u05EA \u05D1\u05D0\u05E0\u05D2\u05DC\u05D9\u05EA, \u05DE\u05E1\u05E4\u05E8\u05D9\u05DD \u05D5\u05E7\u05D5\u05D5\u05D9\u05DD \u05EA\u05D7\u05EA\u05D5\u05E0\u05D9\u05DD \u05D1\u05DC\u05D1\u05D3." }),
|
|
11744
|
+
!isNameEmpty && isNameDuplicate && /* @__PURE__ */ jsxs25("p", { className: "text-[11px] text-rose-600 font-semibold flex items-center gap-1 mt-1", children: [
|
|
11745
|
+
/* @__PURE__ */ jsx31(AlertCircle2, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
11696
11746
|
"\u05E9\u05DD \u05D4\u05EA\u05D1\u05E0\u05D9\u05EA \u05DB\u05D1\u05E8 \u05E7\u05D9\u05D9\u05DD \u05D1\u05D7\u05E9\u05D1\u05D5\u05DF \u05E2\u05D1\u05D5\u05E8 \u05E9\u05E4\u05D4 \u05D6\u05D5 (",
|
|
11697
11747
|
language,
|
|
11698
11748
|
"). \u05D0\u05E0\u05D0 \u05D1\u05D7\u05E8 \u05E9\u05DD \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9 \u05D0\u05D5 \u05E9\u05E4\u05D4 \u05D0\u05D7\u05E8\u05EA."
|
|
11699
11749
|
] })
|
|
11700
11750
|
] }),
|
|
11701
|
-
/* @__PURE__ */
|
|
11702
|
-
/* @__PURE__ */
|
|
11703
|
-
/* @__PURE__ */
|
|
11704
|
-
/* @__PURE__ */
|
|
11751
|
+
/* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
11752
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1.5", children: [
|
|
11753
|
+
/* @__PURE__ */ jsx31("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E9\u05E4\u05D4" }),
|
|
11754
|
+
/* @__PURE__ */ jsx31(
|
|
11705
11755
|
"select",
|
|
11706
11756
|
{
|
|
11707
11757
|
value: language,
|
|
11708
11758
|
onChange: (e) => setLanguage(e.target.value),
|
|
11709
11759
|
className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
|
|
11710
|
-
children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */
|
|
11760
|
+
children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */ jsx31("option", { value: opt.value, children: opt.label }, opt.value))
|
|
11711
11761
|
}
|
|
11712
11762
|
)
|
|
11713
11763
|
] }),
|
|
11714
|
-
/* @__PURE__ */
|
|
11715
|
-
/* @__PURE__ */
|
|
11716
|
-
/* @__PURE__ */
|
|
11764
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1.5", children: [
|
|
11765
|
+
/* @__PURE__ */ jsx31("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E7\u05D8\u05D2\u05D5\u05E8\u05D9\u05D4" }),
|
|
11766
|
+
/* @__PURE__ */ jsx31(
|
|
11717
11767
|
"select",
|
|
11718
11768
|
{
|
|
11719
11769
|
value: category,
|
|
11720
11770
|
onChange: (e) => setCategory(e.target.value),
|
|
11721
11771
|
className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
|
|
11722
|
-
children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */
|
|
11772
|
+
children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */ jsx31("option", { value: opt.value, children: opt.label }, opt.value))
|
|
11723
11773
|
}
|
|
11724
11774
|
)
|
|
11725
11775
|
] })
|
|
11726
11776
|
] }),
|
|
11727
|
-
/* @__PURE__ */
|
|
11728
|
-
/* @__PURE__ */
|
|
11777
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-2", children: [
|
|
11778
|
+
/* @__PURE__ */ jsxs25("label", { className: "block text-xs font-bold text-slate-800", children: [
|
|
11729
11779
|
"\u05EA\u05D5\u05DB\u05DF \u05D2\u05D5\u05E3 \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 ",
|
|
11730
|
-
/* @__PURE__ */
|
|
11780
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
11731
11781
|
] }),
|
|
11732
|
-
/* @__PURE__ */
|
|
11733
|
-
/* @__PURE__ */
|
|
11782
|
+
/* @__PURE__ */ jsxs25("div", { className: "border border-slate-200 focus-within:border-emerald-500 focus-within:ring-1 focus-within:ring-emerald-500 rounded-xl overflow-visible bg-white transition-all shadow-xs relative", children: [
|
|
11783
|
+
/* @__PURE__ */ jsx31(
|
|
11734
11784
|
"textarea",
|
|
11735
11785
|
{
|
|
11736
11786
|
ref: textareaRef,
|
|
@@ -11745,14 +11795,14 @@ function CreateTemplateModal({
|
|
|
11745
11795
|
required: true
|
|
11746
11796
|
}
|
|
11747
11797
|
),
|
|
11748
|
-
/* @__PURE__ */
|
|
11798
|
+
/* @__PURE__ */ jsxs25(
|
|
11749
11799
|
"div",
|
|
11750
11800
|
{
|
|
11751
11801
|
className: "bg-slate-50/90 border-t border-slate-100 px-3 py-1.5 flex items-center justify-between gap-2 select-none relative",
|
|
11752
11802
|
dir: language === "en_US" ? "ltr" : "rtl",
|
|
11753
11803
|
children: [
|
|
11754
|
-
/* @__PURE__ */
|
|
11755
|
-
/* @__PURE__ */
|
|
11804
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1", children: [
|
|
11805
|
+
/* @__PURE__ */ jsx31(
|
|
11756
11806
|
"button",
|
|
11757
11807
|
{
|
|
11758
11808
|
type: "button",
|
|
@@ -11760,10 +11810,10 @@ function CreateTemplateModal({
|
|
|
11760
11810
|
onClick: () => handleApplyFormatting("*"),
|
|
11761
11811
|
title: "\u05DE\u05D5\u05D3\u05D2\u05E9 (Bold) *\u05D8\u05E7\u05E1\u05D8*",
|
|
11762
11812
|
className: "w-7 h-7 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center justify-center font-bold text-xs transition-colors cursor-pointer",
|
|
11763
|
-
children: /* @__PURE__ */
|
|
11813
|
+
children: /* @__PURE__ */ jsx31(Bold, { className: "w-3.5 h-3.5" })
|
|
11764
11814
|
}
|
|
11765
11815
|
),
|
|
11766
|
-
/* @__PURE__ */
|
|
11816
|
+
/* @__PURE__ */ jsx31(
|
|
11767
11817
|
"button",
|
|
11768
11818
|
{
|
|
11769
11819
|
type: "button",
|
|
@@ -11771,10 +11821,10 @@ function CreateTemplateModal({
|
|
|
11771
11821
|
onClick: () => handleApplyFormatting("_"),
|
|
11772
11822
|
title: "\u05E0\u05D8\u05D5\u05D9 (Italic) _\u05D8\u05E7\u05E1\u05D8_",
|
|
11773
11823
|
className: "w-7 h-7 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center justify-center italic text-xs transition-colors cursor-pointer",
|
|
11774
|
-
children: /* @__PURE__ */
|
|
11824
|
+
children: /* @__PURE__ */ jsx31(Italic, { className: "w-3.5 h-3.5" })
|
|
11775
11825
|
}
|
|
11776
11826
|
),
|
|
11777
|
-
/* @__PURE__ */
|
|
11827
|
+
/* @__PURE__ */ jsx31(
|
|
11778
11828
|
"button",
|
|
11779
11829
|
{
|
|
11780
11830
|
type: "button",
|
|
@@ -11782,12 +11832,12 @@ function CreateTemplateModal({
|
|
|
11782
11832
|
onClick: () => handleApplyFormatting("~"),
|
|
11783
11833
|
title: "\u05E7\u05D5 \u05D7\u05D5\u05E6\u05D4 (Strikethrough) ~\u05D8\u05E7\u05E1\u05D8~",
|
|
11784
11834
|
className: "w-7 h-7 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center justify-center text-xs transition-colors cursor-pointer",
|
|
11785
|
-
children: /* @__PURE__ */
|
|
11835
|
+
children: /* @__PURE__ */ jsx31(Strikethrough, { className: "w-3.5 h-3.5" })
|
|
11786
11836
|
}
|
|
11787
11837
|
),
|
|
11788
|
-
/* @__PURE__ */
|
|
11789
|
-
/* @__PURE__ */
|
|
11790
|
-
/* @__PURE__ */
|
|
11838
|
+
/* @__PURE__ */ jsx31("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
|
|
11839
|
+
/* @__PURE__ */ jsxs25("div", { className: "relative inline-block", ref: emojiPickerRef, children: [
|
|
11840
|
+
/* @__PURE__ */ jsx31(
|
|
11791
11841
|
"button",
|
|
11792
11842
|
{
|
|
11793
11843
|
type: "button",
|
|
@@ -11795,16 +11845,16 @@ function CreateTemplateModal({
|
|
|
11795
11845
|
onClick: () => setIsEmojiPickerOpen(!isEmojiPickerOpen),
|
|
11796
11846
|
title: "\u05D4\u05D5\u05E1\u05E3 \u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9 (Emoji)",
|
|
11797
11847
|
className: `w-7 h-7 rounded-lg flex items-center justify-center transition-colors cursor-pointer ${isEmojiPickerOpen ? "bg-emerald-100 text-emerald-700" : "text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80"}`,
|
|
11798
|
-
children: /* @__PURE__ */
|
|
11848
|
+
children: /* @__PURE__ */ jsx31(Smile, { className: "w-4 h-4" })
|
|
11799
11849
|
}
|
|
11800
11850
|
),
|
|
11801
|
-
isEmojiPickerOpen && /* @__PURE__ */
|
|
11851
|
+
isEmojiPickerOpen && /* @__PURE__ */ jsx31(
|
|
11802
11852
|
"div",
|
|
11803
11853
|
{
|
|
11804
11854
|
className: `absolute bottom-full mb-2 ${language === "en_US" ? "left-0" : "right-0"} z-50 shadow-2xl rounded-2xl overflow-hidden border border-slate-200 animate-in fade-in zoom-in-95 duration-100`,
|
|
11805
11855
|
dir: "ltr",
|
|
11806
11856
|
onMouseDown: (e) => e.stopPropagation(),
|
|
11807
|
-
children: /* @__PURE__ */
|
|
11857
|
+
children: /* @__PURE__ */ jsx31(
|
|
11808
11858
|
EmojiPicker,
|
|
11809
11859
|
{
|
|
11810
11860
|
onEmojiClick: (emojiData) => {
|
|
@@ -11821,8 +11871,8 @@ function CreateTemplateModal({
|
|
|
11821
11871
|
}
|
|
11822
11872
|
)
|
|
11823
11873
|
] }),
|
|
11824
|
-
/* @__PURE__ */
|
|
11825
|
-
/* @__PURE__ */
|
|
11874
|
+
/* @__PURE__ */ jsx31("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
|
|
11875
|
+
/* @__PURE__ */ jsxs25(
|
|
11826
11876
|
"button",
|
|
11827
11877
|
{
|
|
11828
11878
|
type: "button",
|
|
@@ -11832,28 +11882,28 @@ function CreateTemplateModal({
|
|
|
11832
11882
|
"aria-label": language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4",
|
|
11833
11883
|
className: "h-7 px-2 rounded-lg text-slate-600 hover:text-slate-900 hover:bg-slate-200/70 active:bg-slate-300/80 flex items-center gap-1 text-xs font-medium transition-colors cursor-pointer",
|
|
11834
11884
|
children: [
|
|
11835
|
-
/* @__PURE__ */
|
|
11836
|
-
/* @__PURE__ */
|
|
11885
|
+
/* @__PURE__ */ jsx31(Plus, { className: "w-3.5 h-3.5" }),
|
|
11886
|
+
/* @__PURE__ */ jsx31("span", { children: language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4" })
|
|
11837
11887
|
]
|
|
11838
11888
|
}
|
|
11839
11889
|
)
|
|
11840
11890
|
] }),
|
|
11841
|
-
/* @__PURE__ */
|
|
11891
|
+
/* @__PURE__ */ jsxs25(
|
|
11842
11892
|
"div",
|
|
11843
11893
|
{
|
|
11844
11894
|
className: "flex items-center gap-1 font-mono text-[11px]",
|
|
11845
11895
|
dir: "ltr",
|
|
11846
11896
|
title: "\u05DE\u05D2\u05D1\u05DC\u05EA \u05EA\u05D5\u05D5\u05D9\u05DD (1024 \u05EA\u05D5\u05D5\u05D9\u05DD \u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8)",
|
|
11847
11897
|
children: [
|
|
11848
|
-
/* @__PURE__ */
|
|
11898
|
+
/* @__PURE__ */ jsx31(
|
|
11849
11899
|
"span",
|
|
11850
11900
|
{
|
|
11851
11901
|
className: `font-semibold transition-colors ${bodyText.length >= 1024 ? "text-rose-600" : bodyText.length >= 950 ? "text-amber-600" : "text-slate-500"}`,
|
|
11852
11902
|
children: bodyText.length
|
|
11853
11903
|
}
|
|
11854
11904
|
),
|
|
11855
|
-
/* @__PURE__ */
|
|
11856
|
-
/* @__PURE__ */
|
|
11905
|
+
/* @__PURE__ */ jsx31("span", { className: "text-slate-300", children: "/" }),
|
|
11906
|
+
/* @__PURE__ */ jsx31("span", { className: "text-slate-400", children: "1024" })
|
|
11857
11907
|
]
|
|
11858
11908
|
}
|
|
11859
11909
|
)
|
|
@@ -11861,30 +11911,30 @@ function CreateTemplateModal({
|
|
|
11861
11911
|
}
|
|
11862
11912
|
)
|
|
11863
11913
|
] }),
|
|
11864
|
-
/* @__PURE__ */
|
|
11865
|
-
/* @__PURE__ */
|
|
11914
|
+
/* @__PURE__ */ jsx31("div", { className: "flex flex-wrap items-center justify-between text-[11px] text-slate-400 px-1 gap-2", children: /* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3", children: [
|
|
11915
|
+
/* @__PURE__ */ jsxs25("span", { children: [
|
|
11866
11916
|
ratioInfo.staticWordsCount,
|
|
11867
11917
|
" \u05DE\u05D9\u05DC\u05D9\u05DD"
|
|
11868
11918
|
] }),
|
|
11869
|
-
/* @__PURE__ */
|
|
11919
|
+
/* @__PURE__ */ jsxs25("span", { children: [
|
|
11870
11920
|
ratioInfo.variableCount,
|
|
11871
11921
|
" \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD"
|
|
11872
11922
|
] })
|
|
11873
11923
|
] }) }),
|
|
11874
|
-
uniqueVariables.length > 0 && /* @__PURE__ */
|
|
11875
|
-
/* @__PURE__ */
|
|
11876
|
-
/* @__PURE__ */
|
|
11877
|
-
/* @__PURE__ */
|
|
11924
|
+
uniqueVariables.length > 0 && /* @__PURE__ */ jsxs25("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
|
|
11925
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1.5 text-xs font-bold text-slate-800", children: [
|
|
11926
|
+
/* @__PURE__ */ jsx31(Info2, { className: "w-4 h-4 text-emerald-600" }),
|
|
11927
|
+
/* @__PURE__ */ jsx31("span", { children: "\u05E2\u05E8\u05DB\u05D9\u05DD \u05DC\u05D3\u05D5\u05D2\u05DE\u05D4 \u05DC\u05DE\u05E9\u05EA\u05E0\u05D9\u05DD (\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta)" })
|
|
11878
11928
|
] }),
|
|
11879
|
-
/* @__PURE__ */
|
|
11880
|
-
/* @__PURE__ */
|
|
11881
|
-
/* @__PURE__ */
|
|
11929
|
+
/* @__PURE__ */ jsx31("p", { className: "text-[11px] text-slate-500 leading-relaxed", children: "Meta \u05D3\u05D5\u05E8\u05E9\u05EA \u05D3\u05D5\u05D2\u05DE\u05D4 \u05E2\u05D1\u05D5\u05E8 \u05DB\u05DC \u05DE\u05E9\u05EA\u05E0\u05D4 \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9 \u05DB\u05D3\u05D9 \u05DC\u05D5\u05D5\u05D3\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA \u05EA\u05D5\u05DB\u05DF." }),
|
|
11930
|
+
/* @__PURE__ */ jsx31("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1", children: uniqueVariables.map((idx) => /* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
11931
|
+
/* @__PURE__ */ jsxs25("label", { className: "block text-[11px] font-semibold text-slate-700 font-mono", children: [
|
|
11882
11932
|
"\u05D3\u05D5\u05D2\u05DE\u05D4 \u05E2\u05D1\u05D5\u05E8 ",
|
|
11883
11933
|
`{{${idx}}}`,
|
|
11884
11934
|
" ",
|
|
11885
|
-
/* @__PURE__ */
|
|
11935
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
11886
11936
|
] }),
|
|
11887
|
-
/* @__PURE__ */
|
|
11937
|
+
/* @__PURE__ */ jsx31(
|
|
11888
11938
|
"input",
|
|
11889
11939
|
{
|
|
11890
11940
|
type: "text",
|
|
@@ -11899,21 +11949,21 @@ function CreateTemplateModal({
|
|
|
11899
11949
|
)
|
|
11900
11950
|
] }, idx)) })
|
|
11901
11951
|
] }),
|
|
11902
|
-
bodyText.trim().length > 0 && validationResult.errors.length > 0 && /* @__PURE__ */
|
|
11903
|
-
/* @__PURE__ */
|
|
11904
|
-
/* @__PURE__ */
|
|
11905
|
-
/* @__PURE__ */
|
|
11952
|
+
bodyText.trim().length > 0 && validationResult.errors.length > 0 && /* @__PURE__ */ jsxs25("div", { className: "p-3.5 bg-amber-50 border border-amber-200 rounded-xl space-y-1.5 text-xs text-amber-900", children: [
|
|
11953
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-1.5 font-bold", children: [
|
|
11954
|
+
/* @__PURE__ */ jsx31(AlertCircle2, { className: "w-4 h-4 text-amber-600 shrink-0" }),
|
|
11955
|
+
/* @__PURE__ */ jsx31("span", { children: "\u05D3\u05E8\u05D9\u05E9\u05D5\u05EA \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA Meta \u05DC\u05D7\u05E1\u05D9\u05DE\u05EA \u05E9\u05D2\u05D9\u05D0\u05D5\u05EA:" })
|
|
11906
11956
|
] }),
|
|
11907
|
-
/* @__PURE__ */
|
|
11957
|
+
/* @__PURE__ */ jsx31("ul", { className: "list-disc list-inside space-y-1 text-[11px] pr-2 leading-relaxed", children: validationResult.errors.map((err, i) => /* @__PURE__ */ jsx31("li", { children: err }, i)) })
|
|
11908
11958
|
] })
|
|
11909
11959
|
] }),
|
|
11910
|
-
/* @__PURE__ */
|
|
11911
|
-
/* @__PURE__ */
|
|
11912
|
-
/* @__PURE__ */
|
|
11913
|
-
/* @__PURE__ */
|
|
11914
|
-
/* @__PURE__ */
|
|
11960
|
+
/* @__PURE__ */ jsxs25("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
|
|
11961
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
|
|
11962
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
11963
|
+
/* @__PURE__ */ jsx31(Paperclip, { className: "w-4 h-4 text-slate-600" }),
|
|
11964
|
+
/* @__PURE__ */ jsx31("label", { htmlFor: "modalHeaderFileCheckbox", className: "text-xs font-bold text-slate-800 cursor-pointer", children: "\u05E7\u05D5\u05D1\u05E5 \u05DB\u05D5\u05EA\u05E8\u05EA \u05DE\u05E6\u05D5\u05E8\u05E3 (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" })
|
|
11915
11965
|
] }),
|
|
11916
|
-
/* @__PURE__ */
|
|
11966
|
+
/* @__PURE__ */ jsx31(
|
|
11917
11967
|
"input",
|
|
11918
11968
|
{
|
|
11919
11969
|
type: "checkbox",
|
|
@@ -11929,12 +11979,12 @@ function CreateTemplateModal({
|
|
|
11929
11979
|
}
|
|
11930
11980
|
)
|
|
11931
11981
|
] }),
|
|
11932
|
-
hasFileHeader && /* @__PURE__ */
|
|
11933
|
-
fileError && /* @__PURE__ */
|
|
11934
|
-
/* @__PURE__ */
|
|
11935
|
-
/* @__PURE__ */
|
|
11982
|
+
hasFileHeader && /* @__PURE__ */ jsxs25("div", { className: "space-y-3 pt-1", children: [
|
|
11983
|
+
fileError && /* @__PURE__ */ jsxs25("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl flex items-center gap-2 text-xs text-rose-700 font-semibold animate-in fade-in duration-150", children: [
|
|
11984
|
+
/* @__PURE__ */ jsx31(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
|
|
11985
|
+
/* @__PURE__ */ jsx31("span", { children: fileError })
|
|
11936
11986
|
] }),
|
|
11937
|
-
/* @__PURE__ */
|
|
11987
|
+
/* @__PURE__ */ jsx31(
|
|
11938
11988
|
"input",
|
|
11939
11989
|
{
|
|
11940
11990
|
ref: fileInputRef,
|
|
@@ -11944,7 +11994,7 @@ function CreateTemplateModal({
|
|
|
11944
11994
|
className: "hidden"
|
|
11945
11995
|
}
|
|
11946
11996
|
),
|
|
11947
|
-
!selectedFile && /* @__PURE__ */
|
|
11997
|
+
!selectedFile && /* @__PURE__ */ jsxs25(
|
|
11948
11998
|
"button",
|
|
11949
11999
|
{
|
|
11950
12000
|
type: "button",
|
|
@@ -11954,49 +12004,49 @@ function CreateTemplateModal({
|
|
|
11954
12004
|
},
|
|
11955
12005
|
className: "w-full p-4 border-2 border-dashed border-slate-300 hover:border-emerald-500 rounded-xl flex flex-col items-center justify-center gap-2 bg-white hover:bg-emerald-50/30 transition-all cursor-pointer",
|
|
11956
12006
|
children: [
|
|
11957
|
-
/* @__PURE__ */
|
|
11958
|
-
/* @__PURE__ */
|
|
11959
|
-
/* @__PURE__ */
|
|
11960
|
-
/* @__PURE__ */
|
|
12007
|
+
/* @__PURE__ */ jsx31("div", { className: "w-9 h-9 rounded-full bg-slate-100 text-slate-500 flex items-center justify-center", children: /* @__PURE__ */ jsx31(Upload2, { className: "w-4 h-4" }) }),
|
|
12008
|
+
/* @__PURE__ */ jsxs25("div", { className: "text-center", children: [
|
|
12009
|
+
/* @__PURE__ */ jsx31("span", { className: "text-xs font-bold text-emerald-700 block", children: "\u05DC\u05D7\u05E5 \u05DC\u05D1\u05D7\u05D9\u05E8\u05EA \u05E7\u05D5\u05D1\u05E5" }),
|
|
12010
|
+
/* @__PURE__ */ jsx31("span", { className: "text-[10px] text-slate-400", children: "PDF, JPG, PNG, MP4 \u05E2\u05D3 5MB" })
|
|
11961
12011
|
] })
|
|
11962
12012
|
]
|
|
11963
12013
|
}
|
|
11964
12014
|
),
|
|
11965
|
-
selectedFile && /* @__PURE__ */
|
|
11966
|
-
/* @__PURE__ */
|
|
11967
|
-
/* @__PURE__ */
|
|
11968
|
-
/* @__PURE__ */
|
|
11969
|
-
/* @__PURE__ */
|
|
11970
|
-
/* @__PURE__ */
|
|
12015
|
+
selectedFile && /* @__PURE__ */ jsxs25("div", { className: "p-3 bg-white border border-emerald-200 rounded-xl flex items-center justify-between gap-3 shadow-2xs", children: [
|
|
12016
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2.5 overflow-hidden", children: [
|
|
12017
|
+
/* @__PURE__ */ jsx31("div", { className: "w-8 h-8 rounded-lg bg-emerald-50 text-emerald-600 flex items-center justify-center shrink-0", children: selectedFile.type.includes("pdf") || selectedFile.name.toLowerCase().endsWith(".pdf") ? /* @__PURE__ */ jsx31(FileText2, { className: "w-4 h-4" }) : selectedFile.type.includes("video") || selectedFile.name.toLowerCase().match(/\.(mp4|mov|avi|webm)$/) ? /* @__PURE__ */ jsx31(Video, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx31(ImageIcon, { className: "w-4 h-4" }) }),
|
|
12018
|
+
/* @__PURE__ */ jsxs25("div", { className: "overflow-hidden", children: [
|
|
12019
|
+
/* @__PURE__ */ jsx31("p", { className: "text-xs font-bold text-slate-800 truncate", title: selectedFile.name, children: /* @__PURE__ */ jsx31("span", { dir: "ltr", className: "inline-block truncate max-w-full", children: selectedFile.name }) }),
|
|
12020
|
+
/* @__PURE__ */ jsx31("p", { className: "text-[10px] text-slate-400", children: /* @__PURE__ */ jsxs25("span", { dir: "ltr", className: "inline-block", children: [
|
|
11971
12021
|
formatFileSize(selectedFile.size),
|
|
11972
12022
|
selectedFile.type ? ` \u2022 ${selectedFile.type}` : ""
|
|
11973
12023
|
] }) })
|
|
11974
12024
|
] })
|
|
11975
12025
|
] }),
|
|
11976
|
-
/* @__PURE__ */
|
|
12026
|
+
/* @__PURE__ */ jsx31(
|
|
11977
12027
|
"button",
|
|
11978
12028
|
{
|
|
11979
12029
|
type: "button",
|
|
11980
12030
|
onClick: handleRemoveFile,
|
|
11981
12031
|
className: "p-1 text-slate-400 hover:text-rose-600 rounded-md transition-colors cursor-pointer",
|
|
11982
12032
|
title: "\u05D4\u05E1\u05E8 \u05E7\u05D5\u05D1\u05E5",
|
|
11983
|
-
children: /* @__PURE__ */
|
|
12033
|
+
children: /* @__PURE__ */ jsx31(Trash22, { className: "w-4 h-4" })
|
|
11984
12034
|
}
|
|
11985
12035
|
)
|
|
11986
12036
|
] })
|
|
11987
12037
|
] })
|
|
11988
12038
|
] }),
|
|
11989
|
-
/* @__PURE__ */
|
|
11990
|
-
/* @__PURE__ */
|
|
11991
|
-
/* @__PURE__ */
|
|
11992
|
-
/* @__PURE__ */
|
|
11993
|
-
/* @__PURE__ */
|
|
11994
|
-
/* @__PURE__ */
|
|
11995
|
-
/* @__PURE__ */
|
|
12039
|
+
/* @__PURE__ */ jsxs25("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3.5", children: [
|
|
12040
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
|
|
12041
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
12042
|
+
/* @__PURE__ */ jsx31(MousePointerClick, { className: "w-4 h-4 text-slate-600" }),
|
|
12043
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
12044
|
+
/* @__PURE__ */ jsx31("span", { className: "text-xs font-bold text-slate-800 block", children: "\u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD \u05D0\u05D9\u05E0\u05D8\u05E8\u05D0\u05E7\u05D8\u05D9\u05D1\u05D9\u05D9\u05DD (\u05D0\u05D5\u05E4\u05E6\u05D9\u05D5\u05E0\u05DC\u05D9)" }),
|
|
12045
|
+
/* @__PURE__ */ jsx31("span", { className: "text-[10px] text-slate-400 block", children: "\u05D4\u05D5\u05E1\u05E4\u05EA \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9 \u05E7\u05E8\u05D9\u05D0\u05D4 \u05DC\u05E4\u05E2\u05D5\u05DC\u05D4 (CTA) \u05D5\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4 (\u05E2\u05D3 10 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD)" })
|
|
11996
12046
|
] })
|
|
11997
12047
|
] }),
|
|
11998
|
-
/* @__PURE__ */
|
|
11999
|
-
/* @__PURE__ */
|
|
12048
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
12049
|
+
/* @__PURE__ */ jsxs25(
|
|
12000
12050
|
"span",
|
|
12001
12051
|
{
|
|
12002
12052
|
className: `text-[10px] font-mono px-2 py-0.5 rounded-full border ${buttons.length >= 10 ? "bg-amber-50 text-amber-700 border-amber-200 font-bold" : "bg-white text-slate-500 border-slate-200"}`,
|
|
@@ -12006,8 +12056,8 @@ function CreateTemplateModal({
|
|
|
12006
12056
|
]
|
|
12007
12057
|
}
|
|
12008
12058
|
),
|
|
12009
|
-
/* @__PURE__ */
|
|
12010
|
-
/* @__PURE__ */
|
|
12059
|
+
/* @__PURE__ */ jsxs25("div", { className: "relative", ref: addButtonDropdownRef, children: [
|
|
12060
|
+
/* @__PURE__ */ jsxs25(
|
|
12011
12061
|
"button",
|
|
12012
12062
|
{
|
|
12013
12063
|
type: "button",
|
|
@@ -12016,9 +12066,9 @@ function CreateTemplateModal({
|
|
|
12016
12066
|
className: `inline-flex items-center gap-1.5 px-3 py-1.5 text-xs font-semibold rounded-xl border transition-all ${buttons.length >= 10 ? "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed opacity-60" : "bg-white text-emerald-700 border-emerald-200 hover:bg-emerald-50/80 active:scale-[0.98] shadow-2xs cursor-pointer"}`,
|
|
12017
12067
|
title: buttons.length >= 10 ? "\u05D4\u05D2\u05E2\u05EA \u05DC\u05DE\u05D2\u05D1\u05DC\u05D4 \u05D4\u05DE\u05E8\u05D1\u05D9\u05EA \u05E9\u05DC 10 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD" : "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8 \u05D7\u05D3\u05E9",
|
|
12018
12068
|
children: [
|
|
12019
|
-
/* @__PURE__ */
|
|
12020
|
-
/* @__PURE__ */
|
|
12021
|
-
/* @__PURE__ */
|
|
12069
|
+
/* @__PURE__ */ jsx31(Plus, { className: "w-3.5 h-3.5" }),
|
|
12070
|
+
/* @__PURE__ */ jsx31("span", { children: "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" }),
|
|
12071
|
+
/* @__PURE__ */ jsx31(
|
|
12022
12072
|
ChevronDown3,
|
|
12023
12073
|
{
|
|
12024
12074
|
className: `w-3.5 h-3.5 transition-transform ${isAddButtonOpen ? "rotate-180" : ""}`
|
|
@@ -12027,63 +12077,63 @@ function CreateTemplateModal({
|
|
|
12027
12077
|
]
|
|
12028
12078
|
}
|
|
12029
12079
|
),
|
|
12030
|
-
isAddButtonOpen && /* @__PURE__ */
|
|
12031
|
-
/* @__PURE__ */
|
|
12080
|
+
isAddButtonOpen && /* @__PURE__ */ jsxs25("div", { className: "absolute top-full left-0 mt-1.5 w-64 bg-white border border-slate-200 rounded-xl shadow-xl z-30 p-1.5 space-y-1 animate-in fade-in-50 zoom-in-95 duration-100 divide-y divide-slate-100", children: [
|
|
12081
|
+
/* @__PURE__ */ jsxs25(
|
|
12032
12082
|
"button",
|
|
12033
12083
|
{
|
|
12034
12084
|
type: "button",
|
|
12035
12085
|
onClick: () => handleAddButton("QUICK_REPLY"),
|
|
12036
12086
|
className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group",
|
|
12037
12087
|
children: [
|
|
12038
|
-
/* @__PURE__ */
|
|
12039
|
-
/* @__PURE__ */
|
|
12040
|
-
/* @__PURE__ */
|
|
12041
|
-
/* @__PURE__ */
|
|
12088
|
+
/* @__PURE__ */ jsx31("div", { className: "w-7 h-7 rounded-md bg-emerald-50 text-emerald-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-emerald-100", children: /* @__PURE__ */ jsx31(MessageSquare, { className: "w-3.5 h-3.5" }) }),
|
|
12089
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
12090
|
+
/* @__PURE__ */ jsx31("p", { className: "text-xs font-semibold text-slate-800", children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" }),
|
|
12091
|
+
/* @__PURE__ */ jsx31("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05DE\u05E2\u05E0\u05D4 \u05DE\u05D4\u05D9\u05E8 \u05D1\u05DC\u05D7\u05D9\u05E6\u05D4 \u05D0\u05D7\u05EA" })
|
|
12042
12092
|
] })
|
|
12043
12093
|
]
|
|
12044
12094
|
}
|
|
12045
12095
|
),
|
|
12046
|
-
/* @__PURE__ */
|
|
12096
|
+
/* @__PURE__ */ jsxs25(
|
|
12047
12097
|
"button",
|
|
12048
12098
|
{
|
|
12049
12099
|
type: "button",
|
|
12050
12100
|
onClick: () => handleAddButton("URL"),
|
|
12051
12101
|
className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group pt-2",
|
|
12052
12102
|
children: [
|
|
12053
|
-
/* @__PURE__ */
|
|
12054
|
-
/* @__PURE__ */
|
|
12055
|
-
/* @__PURE__ */
|
|
12056
|
-
/* @__PURE__ */
|
|
12103
|
+
/* @__PURE__ */ jsx31("div", { className: "w-7 h-7 rounded-md bg-sky-50 text-sky-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-sky-100", children: /* @__PURE__ */ jsx31(ExternalLink3, { className: "w-3.5 h-3.5" }) }),
|
|
12104
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
12105
|
+
/* @__PURE__ */ jsx31("p", { className: "text-xs font-semibold text-slate-800", children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" }),
|
|
12106
|
+
/* @__PURE__ */ jsx31("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05E7\u05D9\u05E9\u05D5\u05E8 \u05D0\u05D9\u05E0\u05D8\u05E8\u05E0\u05D8 \u05E1\u05D8\u05D8\u05D9" })
|
|
12057
12107
|
] })
|
|
12058
12108
|
]
|
|
12059
12109
|
}
|
|
12060
12110
|
),
|
|
12061
|
-
/* @__PURE__ */
|
|
12111
|
+
/* @__PURE__ */ jsxs25(
|
|
12062
12112
|
"button",
|
|
12063
12113
|
{
|
|
12064
12114
|
type: "button",
|
|
12065
12115
|
onClick: () => handleAddButton("PHONE_NUMBER"),
|
|
12066
12116
|
className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group pt-2",
|
|
12067
12117
|
children: [
|
|
12068
|
-
/* @__PURE__ */
|
|
12069
|
-
/* @__PURE__ */
|
|
12070
|
-
/* @__PURE__ */
|
|
12071
|
-
/* @__PURE__ */
|
|
12118
|
+
/* @__PURE__ */ jsx31("div", { className: "w-7 h-7 rounded-md bg-violet-50 text-violet-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-violet-100", children: /* @__PURE__ */ jsx31(Phone, { className: "w-3.5 h-3.5" }) }),
|
|
12119
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
12120
|
+
/* @__PURE__ */ jsx31("p", { className: "text-xs font-semibold text-slate-800", children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" }),
|
|
12121
|
+
/* @__PURE__ */ jsx31("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05D7\u05D9\u05D5\u05D2 \u05D9\u05E9\u05D9\u05E8 \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF" })
|
|
12072
12122
|
] })
|
|
12073
12123
|
]
|
|
12074
12124
|
}
|
|
12075
12125
|
),
|
|
12076
|
-
/* @__PURE__ */
|
|
12126
|
+
/* @__PURE__ */ jsxs25(
|
|
12077
12127
|
"button",
|
|
12078
12128
|
{
|
|
12079
12129
|
type: "button",
|
|
12080
12130
|
onClick: () => handleAddButton("COPY_CODE"),
|
|
12081
12131
|
className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group pt-2",
|
|
12082
12132
|
children: [
|
|
12083
|
-
/* @__PURE__ */
|
|
12084
|
-
/* @__PURE__ */
|
|
12085
|
-
/* @__PURE__ */
|
|
12086
|
-
/* @__PURE__ */
|
|
12133
|
+
/* @__PURE__ */ jsx31("div", { className: "w-7 h-7 rounded-md bg-amber-50 text-amber-600 flex items-center justify-center shrink-0 mt-0.5 group-hover:bg-amber-100", children: /* @__PURE__ */ jsx31(Copy3, { className: "w-3.5 h-3.5" }) }),
|
|
12134
|
+
/* @__PURE__ */ jsxs25("div", { children: [
|
|
12135
|
+
/* @__PURE__ */ jsx31("p", { className: "text-xs font-semibold text-slate-800", children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" }),
|
|
12136
|
+
/* @__PURE__ */ jsx31("p", { className: "text-[10px] text-slate-400 leading-tight", children: "\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3 \u05E7\u05D5\u05E4\u05D5\u05DF \u05DC\u05DC\u05D5\u05D7" })
|
|
12087
12137
|
] })
|
|
12088
12138
|
]
|
|
12089
12139
|
}
|
|
@@ -12092,55 +12142,55 @@ function CreateTemplateModal({
|
|
|
12092
12142
|
] })
|
|
12093
12143
|
] })
|
|
12094
12144
|
] }),
|
|
12095
|
-
buttons.length === 0 && /* @__PURE__ */
|
|
12096
|
-
buttons.length > 0 && /* @__PURE__ */
|
|
12145
|
+
buttons.length === 0 && /* @__PURE__ */ jsx31("div", { className: "p-3 text-center border border-dashed border-slate-200 rounded-lg text-slate-400 text-xs bg-white/60", children: '\u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8\u05D5 \u05DB\u05E4\u05EA\u05D5\u05E8\u05D9\u05DD. \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" \u05DB\u05D3\u05D9 \u05DC\u05D4\u05D5\u05E1\u05D9\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8 \u05E8\u05D0\u05E9\u05D5\u05DF \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA.' }),
|
|
12146
|
+
buttons.length > 0 && /* @__PURE__ */ jsx31("div", { className: "space-y-2.5", children: buttons.map((btn, index) => {
|
|
12097
12147
|
const btnNum = index + 1;
|
|
12098
|
-
return /* @__PURE__ */
|
|
12148
|
+
return /* @__PURE__ */ jsxs25(
|
|
12099
12149
|
"div",
|
|
12100
12150
|
{
|
|
12101
12151
|
className: "p-3 bg-white border border-slate-200 rounded-xl space-y-2.5 shadow-2xs transition-all hover:border-slate-300",
|
|
12102
12152
|
children: [
|
|
12103
|
-
/* @__PURE__ */
|
|
12104
|
-
/* @__PURE__ */
|
|
12105
|
-
/* @__PURE__ */
|
|
12153
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between", children: [
|
|
12154
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2", children: [
|
|
12155
|
+
/* @__PURE__ */ jsxs25("span", { className: "text-[11px] font-bold text-slate-400 font-mono", children: [
|
|
12106
12156
|
"#",
|
|
12107
12157
|
btnNum
|
|
12108
12158
|
] }),
|
|
12109
|
-
btn.type === "QUICK_REPLY" && /* @__PURE__ */
|
|
12110
|
-
/* @__PURE__ */
|
|
12111
|
-
/* @__PURE__ */
|
|
12159
|
+
btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs25("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-emerald-50 text-emerald-700 border border-emerald-200 text-[10px] font-semibold", children: [
|
|
12160
|
+
/* @__PURE__ */ jsx31(MessageSquare, { className: "w-3 h-3" }),
|
|
12161
|
+
/* @__PURE__ */ jsx31("span", { children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" })
|
|
12112
12162
|
] }),
|
|
12113
|
-
btn.type === "URL" && /* @__PURE__ */
|
|
12114
|
-
/* @__PURE__ */
|
|
12115
|
-
/* @__PURE__ */
|
|
12163
|
+
btn.type === "URL" && /* @__PURE__ */ jsxs25("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-sky-50 text-sky-700 border border-sky-200 text-[10px] font-semibold", children: [
|
|
12164
|
+
/* @__PURE__ */ jsx31(ExternalLink3, { className: "w-3 h-3" }),
|
|
12165
|
+
/* @__PURE__ */ jsx31("span", { children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" })
|
|
12116
12166
|
] }),
|
|
12117
|
-
btn.type === "PHONE_NUMBER" && /* @__PURE__ */
|
|
12118
|
-
/* @__PURE__ */
|
|
12119
|
-
/* @__PURE__ */
|
|
12167
|
+
btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs25("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-violet-50 text-violet-700 border border-violet-200 text-[10px] font-semibold", children: [
|
|
12168
|
+
/* @__PURE__ */ jsx31(Phone, { className: "w-3 h-3" }),
|
|
12169
|
+
/* @__PURE__ */ jsx31("span", { children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" })
|
|
12120
12170
|
] }),
|
|
12121
|
-
btn.type === "COPY_CODE" && /* @__PURE__ */
|
|
12122
|
-
/* @__PURE__ */
|
|
12123
|
-
/* @__PURE__ */
|
|
12171
|
+
btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs25("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-amber-50 text-amber-700 border border-amber-200 text-[10px] font-semibold", children: [
|
|
12172
|
+
/* @__PURE__ */ jsx31(Copy3, { className: "w-3 h-3" }),
|
|
12173
|
+
/* @__PURE__ */ jsx31("span", { children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" })
|
|
12124
12174
|
] })
|
|
12125
12175
|
] }),
|
|
12126
|
-
/* @__PURE__ */
|
|
12176
|
+
/* @__PURE__ */ jsx31(
|
|
12127
12177
|
"button",
|
|
12128
12178
|
{
|
|
12129
12179
|
type: "button",
|
|
12130
12180
|
onClick: () => handleRemoveButton(index),
|
|
12131
12181
|
className: "p-1 text-slate-400 hover:text-rose-600 hover:bg-rose-50 rounded-lg transition-colors cursor-pointer",
|
|
12132
12182
|
title: "\u05D4\u05E1\u05E8 \u05DB\u05E4\u05EA\u05D5\u05E8",
|
|
12133
|
-
children: /* @__PURE__ */
|
|
12183
|
+
children: /* @__PURE__ */ jsx31(Trash22, { className: "w-3.5 h-3.5" })
|
|
12134
12184
|
}
|
|
12135
12185
|
)
|
|
12136
12186
|
] }),
|
|
12137
|
-
btn.type === "QUICK_REPLY" && /* @__PURE__ */
|
|
12138
|
-
/* @__PURE__ */
|
|
12139
|
-
/* @__PURE__ */
|
|
12187
|
+
btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
12188
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
12189
|
+
/* @__PURE__ */ jsxs25("label", { className: "font-semibold text-slate-700", children: [
|
|
12140
12190
|
"\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
|
|
12141
|
-
/* @__PURE__ */
|
|
12191
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
12142
12192
|
] }),
|
|
12143
|
-
/* @__PURE__ */
|
|
12193
|
+
/* @__PURE__ */ jsxs25(
|
|
12144
12194
|
"span",
|
|
12145
12195
|
{
|
|
12146
12196
|
className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
|
|
@@ -12151,7 +12201,7 @@ function CreateTemplateModal({
|
|
|
12151
12201
|
}
|
|
12152
12202
|
)
|
|
12153
12203
|
] }),
|
|
12154
|
-
/* @__PURE__ */
|
|
12204
|
+
/* @__PURE__ */ jsx31(
|
|
12155
12205
|
"input",
|
|
12156
12206
|
{
|
|
12157
12207
|
type: "text",
|
|
@@ -12163,14 +12213,14 @@ function CreateTemplateModal({
|
|
|
12163
12213
|
}
|
|
12164
12214
|
)
|
|
12165
12215
|
] }),
|
|
12166
|
-
btn.type === "URL" && /* @__PURE__ */
|
|
12167
|
-
/* @__PURE__ */
|
|
12168
|
-
/* @__PURE__ */
|
|
12169
|
-
/* @__PURE__ */
|
|
12216
|
+
btn.type === "URL" && /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
|
|
12217
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
12218
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
12219
|
+
/* @__PURE__ */ jsxs25("label", { className: "font-semibold text-slate-700", children: [
|
|
12170
12220
|
"\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
|
|
12171
|
-
/* @__PURE__ */
|
|
12221
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
12172
12222
|
] }),
|
|
12173
|
-
/* @__PURE__ */
|
|
12223
|
+
/* @__PURE__ */ jsxs25(
|
|
12174
12224
|
"span",
|
|
12175
12225
|
{
|
|
12176
12226
|
className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
|
|
@@ -12181,7 +12231,7 @@ function CreateTemplateModal({
|
|
|
12181
12231
|
}
|
|
12182
12232
|
)
|
|
12183
12233
|
] }),
|
|
12184
|
-
/* @__PURE__ */
|
|
12234
|
+
/* @__PURE__ */ jsx31(
|
|
12185
12235
|
"input",
|
|
12186
12236
|
{
|
|
12187
12237
|
type: "text",
|
|
@@ -12193,18 +12243,18 @@ function CreateTemplateModal({
|
|
|
12193
12243
|
}
|
|
12194
12244
|
)
|
|
12195
12245
|
] }),
|
|
12196
|
-
/* @__PURE__ */
|
|
12197
|
-
/* @__PURE__ */
|
|
12198
|
-
/* @__PURE__ */
|
|
12246
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
12247
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
12248
|
+
/* @__PURE__ */ jsxs25("label", { className: "font-semibold text-slate-700", children: [
|
|
12199
12249
|
"\u05DB\u05EA\u05D5\u05D1\u05EA URL \u05E1\u05D8\u05D8\u05D9\u05EA ",
|
|
12200
|
-
/* @__PURE__ */
|
|
12250
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
12201
12251
|
] }),
|
|
12202
|
-
/* @__PURE__ */
|
|
12252
|
+
/* @__PURE__ */ jsxs25("span", { className: "font-mono text-[10px] text-slate-400", children: [
|
|
12203
12253
|
(btn.url || "").length,
|
|
12204
12254
|
"/2000"
|
|
12205
12255
|
] })
|
|
12206
12256
|
] }),
|
|
12207
|
-
/* @__PURE__ */
|
|
12257
|
+
/* @__PURE__ */ jsx31(
|
|
12208
12258
|
"input",
|
|
12209
12259
|
{
|
|
12210
12260
|
type: "url",
|
|
@@ -12218,14 +12268,14 @@ function CreateTemplateModal({
|
|
|
12218
12268
|
)
|
|
12219
12269
|
] })
|
|
12220
12270
|
] }),
|
|
12221
|
-
btn.type === "PHONE_NUMBER" && /* @__PURE__ */
|
|
12222
|
-
/* @__PURE__ */
|
|
12223
|
-
/* @__PURE__ */
|
|
12224
|
-
/* @__PURE__ */
|
|
12271
|
+
btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
|
|
12272
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
12273
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
12274
|
+
/* @__PURE__ */ jsxs25("label", { className: "font-semibold text-slate-700", children: [
|
|
12225
12275
|
"\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
|
|
12226
|
-
/* @__PURE__ */
|
|
12276
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
12227
12277
|
] }),
|
|
12228
|
-
/* @__PURE__ */
|
|
12278
|
+
/* @__PURE__ */ jsxs25(
|
|
12229
12279
|
"span",
|
|
12230
12280
|
{
|
|
12231
12281
|
className: `font-mono text-[10px] ${(btn.text || "").length >= 25 ? "text-amber-600 font-bold" : "text-slate-400"}`,
|
|
@@ -12236,7 +12286,7 @@ function CreateTemplateModal({
|
|
|
12236
12286
|
}
|
|
12237
12287
|
)
|
|
12238
12288
|
] }),
|
|
12239
|
-
/* @__PURE__ */
|
|
12289
|
+
/* @__PURE__ */ jsx31(
|
|
12240
12290
|
"input",
|
|
12241
12291
|
{
|
|
12242
12292
|
type: "text",
|
|
@@ -12248,18 +12298,18 @@ function CreateTemplateModal({
|
|
|
12248
12298
|
}
|
|
12249
12299
|
)
|
|
12250
12300
|
] }),
|
|
12251
|
-
/* @__PURE__ */
|
|
12252
|
-
/* @__PURE__ */
|
|
12253
|
-
/* @__PURE__ */
|
|
12301
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
12302
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
12303
|
+
/* @__PURE__ */ jsxs25("label", { className: "font-semibold text-slate-700", children: [
|
|
12254
12304
|
"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF (\u05E4\u05D5\u05E8\u05DE\u05D8: +[\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA][\u05DE\u05E1\u05E4\u05E8]) ",
|
|
12255
|
-
/* @__PURE__ */
|
|
12305
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
12256
12306
|
] }),
|
|
12257
|
-
/* @__PURE__ */
|
|
12307
|
+
/* @__PURE__ */ jsxs25("span", { className: "font-mono text-[10px] text-slate-400", children: [
|
|
12258
12308
|
(btn.phone_number || "").length,
|
|
12259
12309
|
"/20"
|
|
12260
12310
|
] })
|
|
12261
12311
|
] }),
|
|
12262
|
-
/* @__PURE__ */
|
|
12312
|
+
/* @__PURE__ */ jsx31(
|
|
12263
12313
|
"input",
|
|
12264
12314
|
{
|
|
12265
12315
|
type: "tel",
|
|
@@ -12273,14 +12323,14 @@ function CreateTemplateModal({
|
|
|
12273
12323
|
)
|
|
12274
12324
|
] })
|
|
12275
12325
|
] }),
|
|
12276
|
-
btn.type === "COPY_CODE" && /* @__PURE__ */
|
|
12277
|
-
/* @__PURE__ */
|
|
12278
|
-
/* @__PURE__ */
|
|
12279
|
-
/* @__PURE__ */
|
|
12326
|
+
btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs25("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3", children: [
|
|
12327
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
12328
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
12329
|
+
/* @__PURE__ */ jsxs25("label", { className: "font-semibold text-slate-700", children: [
|
|
12280
12330
|
"\u05E7\u05D5\u05D3 \u05D4\u05E6\u05E2\u05D4 / \u05E7\u05D5\u05E4\u05D5\u05DF ",
|
|
12281
|
-
/* @__PURE__ */
|
|
12331
|
+
/* @__PURE__ */ jsx31("span", { className: "text-rose-500", children: "*" })
|
|
12282
12332
|
] }),
|
|
12283
|
-
/* @__PURE__ */
|
|
12333
|
+
/* @__PURE__ */ jsxs25(
|
|
12284
12334
|
"span",
|
|
12285
12335
|
{
|
|
12286
12336
|
className: `font-mono text-[10px] ${(btn.example || "").length >= 15 ? "text-amber-600 font-bold" : "text-slate-400"}`,
|
|
@@ -12291,7 +12341,7 @@ function CreateTemplateModal({
|
|
|
12291
12341
|
}
|
|
12292
12342
|
)
|
|
12293
12343
|
] }),
|
|
12294
|
-
/* @__PURE__ */
|
|
12344
|
+
/* @__PURE__ */ jsx31(
|
|
12295
12345
|
"input",
|
|
12296
12346
|
{
|
|
12297
12347
|
type: "text",
|
|
@@ -12304,15 +12354,15 @@ function CreateTemplateModal({
|
|
|
12304
12354
|
}
|
|
12305
12355
|
)
|
|
12306
12356
|
] }),
|
|
12307
|
-
/* @__PURE__ */
|
|
12308
|
-
/* @__PURE__ */
|
|
12309
|
-
/* @__PURE__ */
|
|
12310
|
-
/* @__PURE__ */
|
|
12357
|
+
/* @__PURE__ */ jsxs25("div", { className: "space-y-1", children: [
|
|
12358
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
12359
|
+
/* @__PURE__ */ jsx31("label", { className: "font-semibold text-slate-700", children: "\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 (\u05D1\u05E8\u05D9\u05E8\u05EA \u05DE\u05D7\u05D3\u05DC: \u05D4\u05E2\u05EA\u05E7 \u05E7\u05D5\u05D3)" }),
|
|
12360
|
+
/* @__PURE__ */ jsxs25("span", { className: "font-mono text-[10px] text-slate-400", children: [
|
|
12311
12361
|
(btn.text || "").length,
|
|
12312
12362
|
"/25"
|
|
12313
12363
|
] })
|
|
12314
12364
|
] }),
|
|
12315
|
-
/* @__PURE__ */
|
|
12365
|
+
/* @__PURE__ */ jsx31(
|
|
12316
12366
|
"input",
|
|
12317
12367
|
{
|
|
12318
12368
|
type: "text",
|
|
@@ -12332,8 +12382,8 @@ function CreateTemplateModal({
|
|
|
12332
12382
|
}) })
|
|
12333
12383
|
] })
|
|
12334
12384
|
] }),
|
|
12335
|
-
/* @__PURE__ */
|
|
12336
|
-
/* @__PURE__ */
|
|
12385
|
+
/* @__PURE__ */ jsxs25("div", { className: "px-6 py-4 border-t border-slate-100 flex items-center justify-end gap-3 bg-slate-50/50", children: [
|
|
12386
|
+
/* @__PURE__ */ jsx31(
|
|
12337
12387
|
"button",
|
|
12338
12388
|
{
|
|
12339
12389
|
type: "button",
|
|
@@ -12343,19 +12393,19 @@ function CreateTemplateModal({
|
|
|
12343
12393
|
children: "\u05D1\u05D9\u05D8\u05D5\u05DC"
|
|
12344
12394
|
}
|
|
12345
12395
|
),
|
|
12346
|
-
/* @__PURE__ */
|
|
12396
|
+
/* @__PURE__ */ jsx31(
|
|
12347
12397
|
"button",
|
|
12348
12398
|
{
|
|
12349
12399
|
type: "submit",
|
|
12350
12400
|
disabled: !canSubmit,
|
|
12351
12401
|
className: `inline-flex items-center gap-2 px-5 py-2 text-xs font-semibold text-white rounded-xl shadow-xs transition-all cursor-pointer active:scale-[0.98] ${canSubmit ? "bg-emerald-600 hover:bg-emerald-700" : "bg-slate-300 text-slate-500 cursor-not-allowed opacity-60"}`,
|
|
12352
12402
|
title: !canSubmit ? fileError || validationResult.errors[0] || "\u05D9\u05E9 \u05DC\u05D4\u05E9\u05DC\u05D9\u05DD \u05D0\u05EA \u05DB\u05DC \u05E9\u05D3\u05D5\u05EA \u05D4\u05D7\u05D5\u05D1\u05D4 \u05D1\u05D0\u05D5\u05E4\u05DF \u05EA\u05E7\u05D9\u05DF" : "\u05E9\u05DC\u05D7 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DC\u05D0\u05D9\u05E9\u05D5\u05E8 Meta",
|
|
12353
|
-
children: isSubmitting ? /* @__PURE__ */
|
|
12354
|
-
/* @__PURE__ */
|
|
12355
|
-
/* @__PURE__ */
|
|
12356
|
-
] }) : /* @__PURE__ */
|
|
12357
|
-
/* @__PURE__ */
|
|
12358
|
-
/* @__PURE__ */
|
|
12403
|
+
children: isSubmitting ? /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
12404
|
+
/* @__PURE__ */ jsx31(Loader24, { className: "w-4 h-4 animate-spin" }),
|
|
12405
|
+
/* @__PURE__ */ jsx31("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
|
|
12406
|
+
] }) : /* @__PURE__ */ jsxs25(Fragment6, { children: [
|
|
12407
|
+
/* @__PURE__ */ jsx31(CheckCircle22, { className: "w-4 h-4" }),
|
|
12408
|
+
/* @__PURE__ */ jsx31("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
|
|
12359
12409
|
] })
|
|
12360
12410
|
}
|
|
12361
12411
|
)
|
|
@@ -15063,7 +15113,7 @@ import {
|
|
|
15063
15113
|
CheckCircle2 as CheckCircle23,
|
|
15064
15114
|
AlertCircle as AlertCircle3
|
|
15065
15115
|
} from "lucide-react";
|
|
15066
|
-
import { Fragment as Fragment7, jsx as
|
|
15116
|
+
import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
15067
15117
|
function TemplateSelectionBlock({
|
|
15068
15118
|
selectedTemplate,
|
|
15069
15119
|
selectedTemplateId,
|
|
@@ -15090,15 +15140,15 @@ function TemplateSelectionBlock({
|
|
|
15090
15140
|
handleFileUpload
|
|
15091
15141
|
}) {
|
|
15092
15142
|
const fileInputRef = useRef20(null);
|
|
15093
|
-
return /* @__PURE__ */
|
|
15094
|
-
/* @__PURE__ */
|
|
15095
|
-
/* @__PURE__ */
|
|
15096
|
-
/* @__PURE__ */
|
|
15097
|
-
/* @__PURE__ */
|
|
15098
|
-
/* @__PURE__ */
|
|
15143
|
+
return /* @__PURE__ */ jsxs26("div", { className: "col-span-12 lg:col-span-5 min-h-[26rem] h-full flex flex-col bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 relative", children: [
|
|
15144
|
+
/* @__PURE__ */ jsxs26("div", { className: "space-y-1.5 shrink-0", children: [
|
|
15145
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between pb-1.5 border-b border-slate-200/70 shrink-0 gap-2", children: [
|
|
15146
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
15147
|
+
/* @__PURE__ */ jsx32(FileText3, { className: "w-4 h-4 text-emerald-600 shrink-0" }),
|
|
15148
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs font-bold text-slate-800 truncate", children: "\u05EA\u05D1\u05E0\u05D9\u05EA \u05D5\u05EA\u05D5\u05DB\u05DF \u05D4\u05D5\u05D3\u05E2\u05D4" })
|
|
15099
15149
|
] }),
|
|
15100
|
-
/* @__PURE__ */
|
|
15101
|
-
/* @__PURE__ */
|
|
15150
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
15151
|
+
/* @__PURE__ */ jsxs26(
|
|
15102
15152
|
"button",
|
|
15103
15153
|
{
|
|
15104
15154
|
type: "button",
|
|
@@ -15107,12 +15157,12 @@ function TemplateSelectionBlock({
|
|
|
15107
15157
|
className: `h-7 px-2 text-[11px] font-semibold rounded-lg border transition-all flex items-center gap-1 ${selectedTemplate && !isDeleting ? "bg-white text-rose-600 hover:bg-rose-50 border-rose-200 active:scale-[0.98] shadow-2xs cursor-pointer" : "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed opacity-60"}`,
|
|
15108
15158
|
title: !selectedTemplate ? "\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DB\u05D3\u05D9 \u05DC\u05DE\u05D7\u05D5\u05E7 \u05D0\u05D5\u05EA\u05D4" : `\u05DE\u05D7\u05E7 \u05D0\u05EA \u05D4\u05EA\u05D1\u05E0\u05D9\u05EA "${selectedTemplate.name}"`,
|
|
15109
15159
|
children: [
|
|
15110
|
-
isDeleting ? /* @__PURE__ */
|
|
15111
|
-
/* @__PURE__ */
|
|
15160
|
+
isDeleting ? /* @__PURE__ */ jsx32(Loader25, { className: "w-3.5 h-3.5 animate-spin text-rose-500" }) : /* @__PURE__ */ jsx32(Trash23, { className: "w-3.5 h-3.5 text-rose-500" }),
|
|
15161
|
+
/* @__PURE__ */ jsx32("span", { children: "\u05DE\u05D7\u05D9\u05E7\u05D4" })
|
|
15112
15162
|
]
|
|
15113
15163
|
}
|
|
15114
15164
|
),
|
|
15115
|
-
/* @__PURE__ */
|
|
15165
|
+
/* @__PURE__ */ jsxs26(
|
|
15116
15166
|
"button",
|
|
15117
15167
|
{
|
|
15118
15168
|
type: "button",
|
|
@@ -15120,40 +15170,40 @@ function TemplateSelectionBlock({
|
|
|
15120
15170
|
className: "h-7 px-2.5 text-[11px] font-semibold text-white bg-emerald-600 hover:bg-emerald-700 active:scale-[0.98] rounded-lg shadow-2xs transition-all flex items-center gap-1 cursor-pointer",
|
|
15121
15171
|
title: "\u05E6\u05D5\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4",
|
|
15122
15172
|
children: [
|
|
15123
|
-
/* @__PURE__ */
|
|
15124
|
-
/* @__PURE__ */
|
|
15173
|
+
/* @__PURE__ */ jsx32(Plus2, { className: "w-3.5 h-3.5" }),
|
|
15174
|
+
/* @__PURE__ */ jsx32("span", { children: "\u05D7\u05D3\u05E9" })
|
|
15125
15175
|
]
|
|
15126
15176
|
}
|
|
15127
15177
|
)
|
|
15128
15178
|
] })
|
|
15129
15179
|
] }),
|
|
15130
|
-
/* @__PURE__ */
|
|
15131
|
-
/* @__PURE__ */
|
|
15180
|
+
/* @__PURE__ */ jsxs26("div", { className: "relative", children: [
|
|
15181
|
+
/* @__PURE__ */ jsxs26(
|
|
15132
15182
|
"button",
|
|
15133
15183
|
{
|
|
15134
15184
|
type: "button",
|
|
15135
15185
|
onClick: () => setIsDropdownOpen((prev) => !prev),
|
|
15136
15186
|
className: "w-full h-8.5 px-3 bg-white hover:bg-slate-100/70 border border-slate-200 rounded-xl text-right flex items-center justify-between transition-colors cursor-pointer text-xs",
|
|
15137
15187
|
children: [
|
|
15138
|
-
selectedTemplate ? /* @__PURE__ */
|
|
15139
|
-
/* @__PURE__ */
|
|
15188
|
+
selectedTemplate ? /* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 overflow-hidden", children: [
|
|
15189
|
+
/* @__PURE__ */ jsx32(
|
|
15140
15190
|
"span",
|
|
15141
15191
|
{
|
|
15142
15192
|
className: `w-2 h-2 rounded-full shrink-0 ${getStatusConfig(selectedTemplate.status).dotColor}`
|
|
15143
15193
|
}
|
|
15144
15194
|
),
|
|
15145
|
-
/* @__PURE__ */
|
|
15146
|
-
/* @__PURE__ */
|
|
15195
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs font-semibold text-slate-900 truncate", children: selectedTemplate.name }),
|
|
15196
|
+
/* @__PURE__ */ jsxs26("span", { className: "text-[10px] text-slate-400 shrink-0", children: [
|
|
15147
15197
|
"(",
|
|
15148
15198
|
selectedTemplate.category,
|
|
15149
15199
|
" \u2022 ",
|
|
15150
15200
|
selectedTemplate.language,
|
|
15151
15201
|
")"
|
|
15152
15202
|
] })
|
|
15153
|
-
] }) : /* @__PURE__ */
|
|
15154
|
-
/* @__PURE__ */
|
|
15155
|
-
isLoadingTemplates && /* @__PURE__ */
|
|
15156
|
-
/* @__PURE__ */
|
|
15203
|
+
] }) : /* @__PURE__ */ jsx32("span", { className: "text-xs text-slate-400", children: "\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05E7\u05D9\u05D9\u05DE\u05EA \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4..." }),
|
|
15204
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-1.5 shrink-0 mr-1", children: [
|
|
15205
|
+
isLoadingTemplates && /* @__PURE__ */ jsx32(Loader25, { className: "w-3.5 h-3.5 text-emerald-600 animate-spin" }),
|
|
15206
|
+
/* @__PURE__ */ jsx32(
|
|
15157
15207
|
ChevronDown4,
|
|
15158
15208
|
{
|
|
15159
15209
|
className: `w-3.5 h-3.5 text-slate-400 transition-transform ${isDropdownOpen ? "rotate-180" : ""}`
|
|
@@ -15163,21 +15213,21 @@ function TemplateSelectionBlock({
|
|
|
15163
15213
|
]
|
|
15164
15214
|
}
|
|
15165
15215
|
),
|
|
15166
|
-
isDropdownOpen && /* @__PURE__ */
|
|
15167
|
-
/* @__PURE__ */
|
|
15216
|
+
isDropdownOpen && /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
15217
|
+
/* @__PURE__ */ jsx32(
|
|
15168
15218
|
"div",
|
|
15169
15219
|
{
|
|
15170
15220
|
className: "fixed inset-0 z-40",
|
|
15171
15221
|
onClick: () => setIsDropdownOpen(false)
|
|
15172
15222
|
}
|
|
15173
15223
|
),
|
|
15174
|
-
/* @__PURE__ */
|
|
15175
|
-
templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */
|
|
15224
|
+
/* @__PURE__ */ jsxs26("div", { className: "absolute top-full left-0 right-0 mt-1 bg-white border border-slate-200 rounded-xl shadow-xl z-50 max-h-52 overflow-y-auto divide-y divide-slate-100 animate-in fade-in-50 zoom-in-95 duration-100", children: [
|
|
15225
|
+
templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */ jsx32("div", { className: "p-3 text-center text-xs text-slate-400", children: '\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA. \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05E6\u05D5\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4".' }),
|
|
15176
15226
|
templates.map((tpl) => {
|
|
15177
15227
|
const statusConfig = getStatusConfig(tpl.status);
|
|
15178
15228
|
const isSelected = tpl.id === selectedTemplateId;
|
|
15179
15229
|
const canSelect = statusConfig.isSelectable;
|
|
15180
|
-
return /* @__PURE__ */
|
|
15230
|
+
return /* @__PURE__ */ jsxs26(
|
|
15181
15231
|
"div",
|
|
15182
15232
|
{
|
|
15183
15233
|
onClick: () => {
|
|
@@ -15190,29 +15240,29 @@ function TemplateSelectionBlock({
|
|
|
15190
15240
|
className: `p-2.5 flex items-center justify-between gap-2.5 transition-colors ${canSelect ? "hover:bg-slate-50 cursor-pointer" : "opacity-60 bg-slate-50/60 cursor-not-allowed"} ${isSelected ? "bg-emerald-50/50" : ""}`,
|
|
15191
15241
|
title: !canSelect ? `\u05E1\u05D8\u05D8\u05D5\u05E1 \u05EA\u05D1\u05E0\u05D9\u05EA: ${tpl.status}. \u05E8\u05E7 \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA \u05D1\u05DE\u05E6\u05D1 \u05DE\u05D0\u05D5\u05E9\u05E8 \u05D0\u05D5 \u05E4\u05E2\u05D9\u05DC \u05E0\u05D9\u05EA\u05E0\u05D5\u05EA \u05DC\u05D1\u05D7\u05D9\u05E8\u05D4.` : void 0,
|
|
15192
15242
|
children: [
|
|
15193
|
-
/* @__PURE__ */
|
|
15194
|
-
/* @__PURE__ */
|
|
15243
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 overflow-hidden", children: [
|
|
15244
|
+
/* @__PURE__ */ jsx32(
|
|
15195
15245
|
"span",
|
|
15196
15246
|
{
|
|
15197
15247
|
className: `w-2 h-2 rounded-full shrink-0 ${statusConfig.dotColor}`
|
|
15198
15248
|
}
|
|
15199
15249
|
),
|
|
15200
|
-
/* @__PURE__ */
|
|
15201
|
-
/* @__PURE__ */
|
|
15250
|
+
/* @__PURE__ */ jsxs26("div", { className: "overflow-hidden", children: [
|
|
15251
|
+
/* @__PURE__ */ jsx32(
|
|
15202
15252
|
"p",
|
|
15203
15253
|
{
|
|
15204
15254
|
className: `text-xs font-semibold truncate ${isSelected ? "text-emerald-700" : canSelect ? "text-slate-800" : "text-slate-500"}`,
|
|
15205
15255
|
children: tpl.name
|
|
15206
15256
|
}
|
|
15207
15257
|
),
|
|
15208
|
-
/* @__PURE__ */
|
|
15258
|
+
/* @__PURE__ */ jsxs26("p", { className: "text-[10px] text-slate-400", children: [
|
|
15209
15259
|
tpl.category,
|
|
15210
15260
|
" \u2022 ",
|
|
15211
15261
|
tpl.language
|
|
15212
15262
|
] })
|
|
15213
15263
|
] })
|
|
15214
15264
|
] }),
|
|
15215
|
-
/* @__PURE__ */
|
|
15265
|
+
/* @__PURE__ */ jsx32(
|
|
15216
15266
|
"span",
|
|
15217
15267
|
{
|
|
15218
15268
|
className: `text-[9px] font-semibold px-2 py-0.5 rounded-full border shrink-0 ${statusConfig.badgeBg} ${statusConfig.badgeText}`,
|
|
@@ -15228,18 +15278,18 @@ function TemplateSelectionBlock({
|
|
|
15228
15278
|
] })
|
|
15229
15279
|
] })
|
|
15230
15280
|
] }),
|
|
15231
|
-
/* @__PURE__ */
|
|
15232
|
-
/* @__PURE__ */
|
|
15233
|
-
/* @__PURE__ */
|
|
15234
|
-
selectedTemplate && /* @__PURE__ */
|
|
15281
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex-1 min-h-0 flex flex-col gap-2", children: [
|
|
15282
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-600 shrink-0", children: [
|
|
15283
|
+
/* @__PURE__ */ jsx32("span", { children: "\u05EA\u05E6\u05D5\u05D2\u05EA \u05D4\u05D5\u05D3\u05E2\u05D4" }),
|
|
15284
|
+
selectedTemplate && /* @__PURE__ */ jsxs26("span", { className: "text-[10px] text-slate-400", children: [
|
|
15235
15285
|
"(",
|
|
15236
15286
|
templateBodyText.length,
|
|
15237
15287
|
" \u05EA\u05D5\u05D5\u05D9\u05DD)"
|
|
15238
15288
|
] })
|
|
15239
15289
|
] }),
|
|
15240
|
-
selectedTemplate ? /* @__PURE__ */
|
|
15241
|
-
/* @__PURE__ */
|
|
15242
|
-
/* @__PURE__ */
|
|
15290
|
+
selectedTemplate ? /* @__PURE__ */ jsx32("div", { className: "flex-1 min-h-0 overflow-y-auto bg-white border border-slate-200 rounded-lg p-3 text-sm text-slate-700 leading-relaxed font-sans whitespace-pre-wrap select-all shadow-2xs", children: templateBodyText || "(\u05D2\u05D5\u05E3 \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E8\u05D9\u05E7)" }) : /* @__PURE__ */ jsxs26("div", { className: "flex-1 min-h-0 py-3 bg-white border border-dashed border-slate-200 rounded-lg text-center text-sm text-slate-400 flex flex-col items-center justify-center gap-0.5", children: [
|
|
15291
|
+
/* @__PURE__ */ jsx32("span", { children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" }),
|
|
15292
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs text-slate-400", children: '\u05D1\u05D7\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4 \u05D0\u05D5 \u05DC\u05D7\u05E5 \u05E2\u05DC "+ \u05D7\u05D3\u05E9"' })
|
|
15243
15293
|
] }),
|
|
15244
15294
|
selectedTemplate && (() => {
|
|
15245
15295
|
var _a;
|
|
@@ -15248,19 +15298,19 @@ function TemplateSelectionBlock({
|
|
|
15248
15298
|
);
|
|
15249
15299
|
const tplButtons = (buttonsComp == null ? void 0 : buttonsComp.buttons) || [];
|
|
15250
15300
|
if (!tplButtons || tplButtons.length === 0) return null;
|
|
15251
|
-
return /* @__PURE__ */
|
|
15301
|
+
return /* @__PURE__ */ jsx32("div", { className: "flex flex-wrap gap-1.5 shrink-0 pt-0.5", children: tplButtons.map((btn, idx) => {
|
|
15252
15302
|
const btnType = (btn.type || "").toUpperCase();
|
|
15253
15303
|
const btnText = btn.text || (btnType === "COPY_CODE" ? `\u05D4\u05E2\u05EA\u05E7 \u05E7\u05D5\u05D3: ${btn.example}` : "\u05DB\u05E4\u05EA\u05D5\u05E8");
|
|
15254
|
-
return /* @__PURE__ */
|
|
15304
|
+
return /* @__PURE__ */ jsxs26(
|
|
15255
15305
|
"div",
|
|
15256
15306
|
{
|
|
15257
15307
|
className: "inline-flex items-center gap-1.5 px-2.5 py-1 rounded-lg bg-white border border-slate-200/90 text-slate-700 text-xs font-semibold shadow-2xs select-none",
|
|
15258
15308
|
children: [
|
|
15259
|
-
btnType === "QUICK_REPLY" && /* @__PURE__ */
|
|
15260
|
-
btnType === "URL" && /* @__PURE__ */
|
|
15261
|
-
btnType === "PHONE_NUMBER" && /* @__PURE__ */
|
|
15262
|
-
btnType === "COPY_CODE" && /* @__PURE__ */
|
|
15263
|
-
/* @__PURE__ */
|
|
15309
|
+
btnType === "QUICK_REPLY" && /* @__PURE__ */ jsx32(MessageSquare2, { className: "w-3 h-3 text-emerald-600" }),
|
|
15310
|
+
btnType === "URL" && /* @__PURE__ */ jsx32(ExternalLink4, { className: "w-3 h-3 text-sky-600" }),
|
|
15311
|
+
btnType === "PHONE_NUMBER" && /* @__PURE__ */ jsx32(Phone2, { className: "w-3 h-3 text-violet-600" }),
|
|
15312
|
+
btnType === "COPY_CODE" && /* @__PURE__ */ jsx32(Copy4, { className: "w-3 h-3 text-amber-600" }),
|
|
15313
|
+
/* @__PURE__ */ jsx32("span", { className: "truncate max-w-[180px]", children: btnText })
|
|
15264
15314
|
]
|
|
15265
15315
|
},
|
|
15266
15316
|
idx
|
|
@@ -15275,9 +15325,9 @@ function TemplateSelectionBlock({
|
|
|
15275
15325
|
const docFilename = resolveDocumentFilename(templateHeaderComp, headerMediaUrl);
|
|
15276
15326
|
const hasValidMedia = Boolean(headerMediaUrl && headerMediaUrl.trim() && headerMediaUrl.startsWith("http"));
|
|
15277
15327
|
const uploadButtonLabel = headerFormat === "DOCUMENT" ? "\u05D4\u05E2\u05DC\u05D4 \u05DE\u05E1\u05DE\u05DA" : headerFormat === "IMAGE" ? "\u05D4\u05E2\u05DC\u05D4 \u05EA\u05DE\u05D5\u05E0\u05D4" : "\u05D4\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5";
|
|
15278
|
-
return /* @__PURE__ */
|
|
15279
|
-
/* @__PURE__ */
|
|
15280
|
-
/* @__PURE__ */
|
|
15328
|
+
return /* @__PURE__ */ jsxs26("div", { className: "p-2.5 bg-slate-50 border border-slate-200/90 rounded-xl flex items-center justify-between gap-3 shrink-0 shadow-2xs", children: [
|
|
15329
|
+
/* @__PURE__ */ jsx32("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
15330
|
+
/* @__PURE__ */ jsx32("div", { className: "w-8 h-8 rounded-lg overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: hasValidMedia ? /* @__PURE__ */ jsx32(
|
|
15281
15331
|
"img",
|
|
15282
15332
|
{
|
|
15283
15333
|
src: headerMediaUrl,
|
|
@@ -15287,33 +15337,33 @@ function TemplateSelectionBlock({
|
|
|
15287
15337
|
e.currentTarget.style.display = "none";
|
|
15288
15338
|
}
|
|
15289
15339
|
}
|
|
15290
|
-
) : /* @__PURE__ */
|
|
15291
|
-
/* @__PURE__ */
|
|
15292
|
-
/* @__PURE__ */
|
|
15293
|
-
/* @__PURE__ */
|
|
15340
|
+
) : /* @__PURE__ */ jsx32(ImageIcon2, { className: "w-4 h-4 text-amber-600" }) }),
|
|
15341
|
+
/* @__PURE__ */ jsxs26("div", { className: "overflow-hidden", children: [
|
|
15342
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" }),
|
|
15343
|
+
/* @__PURE__ */ jsx32("span", { className: "text-[10px] text-slate-400 block truncate", children: hasValidMedia ? "\u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA" : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05EA\u05DE\u05D5\u05E0\u05D4" })
|
|
15294
15344
|
] })
|
|
15295
|
-
] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */
|
|
15296
|
-
/* @__PURE__ */
|
|
15297
|
-
/* @__PURE__ */
|
|
15298
|
-
/* @__PURE__ */
|
|
15299
|
-
/* @__PURE__ */
|
|
15345
|
+
] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
15346
|
+
/* @__PURE__ */ jsx32("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-rose-50 text-rose-600 border-rose-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx32(FileText3, { className: "w-4 h-4" }) }),
|
|
15347
|
+
/* @__PURE__ */ jsxs26("div", { className: "overflow-hidden", children: [
|
|
15348
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
|
|
15349
|
+
/* @__PURE__ */ jsx32("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: hasValidMedia ? docFilename : void 0, children: hasValidMedia ? docFilename : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05DE\u05E1\u05DE\u05DA" })
|
|
15300
15350
|
] })
|
|
15301
|
-
] }) : /* @__PURE__ */
|
|
15302
|
-
/* @__PURE__ */
|
|
15303
|
-
/* @__PURE__ */
|
|
15304
|
-
/* @__PURE__ */
|
|
15305
|
-
/* @__PURE__ */
|
|
15351
|
+
] }) : /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
15352
|
+
/* @__PURE__ */ jsx32("div", { className: `w-8 h-8 rounded-lg flex items-center justify-center shrink-0 border ${hasValidMedia ? "bg-indigo-50 text-indigo-600 border-indigo-100" : "bg-slate-100 text-slate-400 border-slate-200"}`, children: /* @__PURE__ */ jsx32(Video2, { className: "w-4 h-4" }) }),
|
|
15353
|
+
/* @__PURE__ */ jsxs26("div", { className: "overflow-hidden", children: [
|
|
15354
|
+
/* @__PURE__ */ jsx32("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" }),
|
|
15355
|
+
/* @__PURE__ */ jsx32("span", { className: "text-[10px] text-slate-400 block truncate", children: hasValidMedia ? "\u05E7\u05D5\u05D1\u05E5 \u05D5\u05D9\u05D3\u05D0\u05D5 \u05DE\u05E7\u05D5\u05E9\u05E8 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA" : "\u05D8\u05E8\u05DD \u05D4\u05D5\u05E2\u05DC\u05D4 \u05E7\u05D5\u05D1\u05E5 \u05D5\u05D9\u05D3\u05D0\u05D5" })
|
|
15306
15356
|
] })
|
|
15307
15357
|
] }) }),
|
|
15308
|
-
/* @__PURE__ */
|
|
15309
|
-
hasValidMedia ? /* @__PURE__ */
|
|
15310
|
-
/* @__PURE__ */
|
|
15358
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
15359
|
+
hasValidMedia ? /* @__PURE__ */ jsxs26("span", { className: "inline-flex items-center gap-1 text-[10px] font-medium text-emerald-800 px-2 py-0.5 bg-emerald-50 border border-emerald-200 rounded-lg", children: [
|
|
15360
|
+
/* @__PURE__ */ jsx32(CheckCircle23, { className: "w-3 h-3 text-emerald-600" }),
|
|
15311
15361
|
"\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3 \u05EA\u05E7\u05D9\u05DF"
|
|
15312
|
-
] }) : /* @__PURE__ */
|
|
15313
|
-
/* @__PURE__ */
|
|
15362
|
+
] }) : /* @__PURE__ */ jsxs26("span", { className: "inline-flex items-center gap-1 text-[10px] font-semibold text-amber-800 px-2 py-0.5 bg-amber-50 border border-amber-200 rounded-lg", children: [
|
|
15363
|
+
/* @__PURE__ */ jsx32(AlertCircle3, { className: "w-3 h-3 text-amber-600 shrink-0" }),
|
|
15314
15364
|
"\u05E0\u05D3\u05E8\u05E9 \u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5"
|
|
15315
15365
|
] }),
|
|
15316
|
-
hasValidMedia && /* @__PURE__ */
|
|
15366
|
+
hasValidMedia && /* @__PURE__ */ jsx32(
|
|
15317
15367
|
"a",
|
|
15318
15368
|
{
|
|
15319
15369
|
href: headerMediaUrl,
|
|
@@ -15321,10 +15371,10 @@ function TemplateSelectionBlock({
|
|
|
15321
15371
|
rel: "noopener noreferrer",
|
|
15322
15372
|
title: "\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05E9\u05DC \u05D4\u05E7\u05D5\u05D1\u05E5",
|
|
15323
15373
|
className: "p-1 text-slate-400 hover:text-emerald-700 hover:bg-slate-200/60 rounded-md transition-colors",
|
|
15324
|
-
children: /* @__PURE__ */
|
|
15374
|
+
children: /* @__PURE__ */ jsx32(ExternalLink4, { className: "w-3.5 h-3.5" })
|
|
15325
15375
|
}
|
|
15326
15376
|
),
|
|
15327
|
-
/* @__PURE__ */
|
|
15377
|
+
/* @__PURE__ */ jsx32(
|
|
15328
15378
|
"input",
|
|
15329
15379
|
{
|
|
15330
15380
|
ref: fileInputRef,
|
|
@@ -15342,7 +15392,7 @@ function TemplateSelectionBlock({
|
|
|
15342
15392
|
disabled: isUploadingMedia
|
|
15343
15393
|
}
|
|
15344
15394
|
),
|
|
15345
|
-
/* @__PURE__ */
|
|
15395
|
+
/* @__PURE__ */ jsx32(
|
|
15346
15396
|
"button",
|
|
15347
15397
|
{
|
|
15348
15398
|
type: "button",
|
|
@@ -15353,39 +15403,39 @@ function TemplateSelectionBlock({
|
|
|
15353
15403
|
},
|
|
15354
15404
|
className: `inline-flex items-center gap-1.5 px-2.5 py-1 text-[11px] font-medium rounded-lg transition-colors border shadow-2xs ${isUploadingMedia ? "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed" : hasValidMedia ? "bg-white text-slate-700 hover:bg-slate-50 border-slate-200 hover:border-slate-300" : "bg-emerald-600 text-white hover:bg-emerald-700 border-emerald-600"}`,
|
|
15355
15405
|
title: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DE\u05D3\u05D9\u05D4 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5" : `${uploadButtonLabel} \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5`,
|
|
15356
|
-
children: isUploadingMedia ? /* @__PURE__ */
|
|
15357
|
-
/* @__PURE__ */
|
|
15358
|
-
/* @__PURE__ */
|
|
15359
|
-
] }) : /* @__PURE__ */
|
|
15360
|
-
/* @__PURE__ */
|
|
15361
|
-
/* @__PURE__ */
|
|
15406
|
+
children: isUploadingMedia ? /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
15407
|
+
/* @__PURE__ */ jsx32(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
15408
|
+
/* @__PURE__ */ jsx32("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
|
|
15409
|
+
] }) : /* @__PURE__ */ jsxs26(Fragment7, { children: [
|
|
15410
|
+
/* @__PURE__ */ jsx32(Upload3, { className: "w-3.5 h-3.5" }),
|
|
15411
|
+
/* @__PURE__ */ jsx32("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
|
|
15362
15412
|
] })
|
|
15363
15413
|
}
|
|
15364
15414
|
)
|
|
15365
15415
|
] })
|
|
15366
15416
|
] });
|
|
15367
15417
|
})(),
|
|
15368
|
-
selectedTemplate && templateVariables.length > 0 && /* @__PURE__ */
|
|
15369
|
-
/* @__PURE__ */
|
|
15370
|
-
/* @__PURE__ */
|
|
15371
|
-
/* @__PURE__ */
|
|
15418
|
+
selectedTemplate && templateVariables.length > 0 && /* @__PURE__ */ jsxs26("div", { className: "shrink-0 flex flex-col gap-1.5 pt-2 border-t border-slate-200/80 pb-0", children: [
|
|
15419
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between shrink-0", children: [
|
|
15420
|
+
/* @__PURE__ */ jsx32("span", { className: "text-[11px] font-bold text-slate-700", children: "\u05DE\u05D9\u05E4\u05D5\u05D9 \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD" }),
|
|
15421
|
+
/* @__PURE__ */ jsxs26("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 px-1.5 py-0.5 rounded border border-emerald-200", children: [
|
|
15372
15422
|
templateVariables.length,
|
|
15373
15423
|
" \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD"
|
|
15374
15424
|
] })
|
|
15375
15425
|
] }),
|
|
15376
|
-
/* @__PURE__ */
|
|
15426
|
+
/* @__PURE__ */ jsx32("div", { className: "max-h-48 overflow-y-auto space-y-1.5 pr-0.5", children: templateVariables.map((varKey) => {
|
|
15377
15427
|
var _a;
|
|
15378
15428
|
const mapping = variableMapping[varKey] || { type: "column", value: "" };
|
|
15379
15429
|
const isStatic = mapping.type === "static";
|
|
15380
15430
|
const selectedColVal = textableColumnOptions.some((o) => o.id === mapping.value) ? mapping.value : ((_a = textableColumnOptions.find((o) => o.columnName === mapping.value)) == null ? void 0 : _a.id) || mapping.value || "";
|
|
15381
|
-
return /* @__PURE__ */
|
|
15431
|
+
return /* @__PURE__ */ jsxs26(
|
|
15382
15432
|
"div",
|
|
15383
15433
|
{
|
|
15384
15434
|
className: "flex items-center gap-1.5 p-1 bg-white border border-slate-200 rounded-xl text-xs shrink-0",
|
|
15385
15435
|
children: [
|
|
15386
|
-
/* @__PURE__ */
|
|
15387
|
-
/* @__PURE__ */
|
|
15388
|
-
/* @__PURE__ */
|
|
15436
|
+
/* @__PURE__ */ jsx32("span", { className: "px-2 py-0.5 bg-emerald-50 text-emerald-800 font-mono font-bold text-[11px] rounded-lg border border-emerald-200/80 shrink-0", children: `{{${varKey}}}` }),
|
|
15437
|
+
/* @__PURE__ */ jsxs26("div", { className: "inline-flex items-center p-0.5 bg-slate-100 rounded-lg border border-slate-200/80 shrink-0 text-[10px] font-medium", children: [
|
|
15438
|
+
/* @__PURE__ */ jsx32(
|
|
15389
15439
|
"button",
|
|
15390
15440
|
{
|
|
15391
15441
|
type: "button",
|
|
@@ -15394,7 +15444,7 @@ function TemplateSelectionBlock({
|
|
|
15394
15444
|
children: "\u05E2\u05DE\u05D5\u05D3\u05D4"
|
|
15395
15445
|
}
|
|
15396
15446
|
),
|
|
15397
|
-
/* @__PURE__ */
|
|
15447
|
+
/* @__PURE__ */ jsx32(
|
|
15398
15448
|
"button",
|
|
15399
15449
|
{
|
|
15400
15450
|
type: "button",
|
|
@@ -15404,7 +15454,7 @@ function TemplateSelectionBlock({
|
|
|
15404
15454
|
}
|
|
15405
15455
|
)
|
|
15406
15456
|
] }),
|
|
15407
|
-
isStatic ? /* @__PURE__ */
|
|
15457
|
+
isStatic ? /* @__PURE__ */ jsx32(
|
|
15408
15458
|
"input",
|
|
15409
15459
|
{
|
|
15410
15460
|
type: "text",
|
|
@@ -15413,20 +15463,20 @@ function TemplateSelectionBlock({
|
|
|
15413
15463
|
placeholder: "\u05D4\u05D6\u05DF \u05E2\u05E8\u05DA \u05E7\u05D1\u05D5\u05E2 (\u05D7\u05D5\u05D1\u05D4)...",
|
|
15414
15464
|
className: `flex-1 min-w-0 h-7 px-2 text-[11px] rounded-lg border bg-white text-slate-800 placeholder:text-slate-400 focus:outline-none transition-colors ${!mapping.value || mapping.value.trim() === "" ? "border-amber-300 focus:border-amber-500 focus:ring-1 focus:ring-amber-500/20" : "border-slate-200 focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500/20"}`
|
|
15415
15465
|
}
|
|
15416
|
-
) : /* @__PURE__ */
|
|
15417
|
-
/* @__PURE__ */
|
|
15466
|
+
) : /* @__PURE__ */ jsxs26("div", { className: "relative flex-1 min-w-0", children: [
|
|
15467
|
+
/* @__PURE__ */ jsxs26(
|
|
15418
15468
|
"select",
|
|
15419
15469
|
{
|
|
15420
15470
|
value: selectedColVal,
|
|
15421
15471
|
onChange: (e) => handleVariableValueChange(varKey, e.target.value),
|
|
15422
15472
|
className: "w-full h-7 pr-2.5 pl-6 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500/20 cursor-pointer truncate appearance-none",
|
|
15423
15473
|
children: [
|
|
15424
|
-
/* @__PURE__ */
|
|
15425
|
-
textableColumnOptions.map((opt) => /* @__PURE__ */
|
|
15474
|
+
/* @__PURE__ */ jsx32("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
|
|
15475
|
+
textableColumnOptions.map((opt) => /* @__PURE__ */ jsx32("option", { value: opt.id, children: opt.label }, opt.id))
|
|
15426
15476
|
]
|
|
15427
15477
|
}
|
|
15428
15478
|
),
|
|
15429
|
-
/* @__PURE__ */
|
|
15479
|
+
/* @__PURE__ */ jsx32(ChevronDown4, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15430
15480
|
] })
|
|
15431
15481
|
]
|
|
15432
15482
|
},
|
|
@@ -15446,7 +15496,7 @@ import {
|
|
|
15446
15496
|
CheckSquare,
|
|
15447
15497
|
RefreshCw
|
|
15448
15498
|
} from "lucide-react";
|
|
15449
|
-
import { Fragment as Fragment8, jsx as
|
|
15499
|
+
import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
15450
15500
|
function DynamicFiltersBlock({
|
|
15451
15501
|
filterableColumns,
|
|
15452
15502
|
filters,
|
|
@@ -15461,31 +15511,31 @@ function DynamicFiltersBlock({
|
|
|
15461
15511
|
loadTableData,
|
|
15462
15512
|
isLoadingTableData
|
|
15463
15513
|
}) {
|
|
15464
|
-
return /* @__PURE__ */
|
|
15465
|
-
/* @__PURE__ */
|
|
15466
|
-
/* @__PURE__ */
|
|
15467
|
-
/* @__PURE__ */
|
|
15468
|
-
/* @__PURE__ */
|
|
15469
|
-
/* @__PURE__ */
|
|
15470
|
-
activeFiltersCount > 0 && /* @__PURE__ */
|
|
15514
|
+
return /* @__PURE__ */ jsxs27("div", { className: "col-span-12 lg:col-span-3 min-h-[26rem] h-full flex flex-col justify-between bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 gap-2", children: [
|
|
15515
|
+
/* @__PURE__ */ jsxs27("div", { className: "space-y-2", children: [
|
|
15516
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: [
|
|
15517
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center gap-2", children: [
|
|
15518
|
+
/* @__PURE__ */ jsx33(Filter3, { className: "w-4 h-4 text-emerald-600" }),
|
|
15519
|
+
/* @__PURE__ */ jsx33("span", { className: "text-xs font-bold text-slate-800", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05D3\u05D9\u05E0\u05DE\u05D9" }),
|
|
15520
|
+
activeFiltersCount > 0 && /* @__PURE__ */ jsx33("span", { className: "text-[10px] font-bold px-1.5 py-0.5 rounded-full bg-emerald-100 text-emerald-800 border border-emerald-200", children: activeFiltersCount })
|
|
15471
15521
|
] }),
|
|
15472
|
-
activeFiltersCount > 0 && /* @__PURE__ */
|
|
15522
|
+
activeFiltersCount > 0 && /* @__PURE__ */ jsxs27(
|
|
15473
15523
|
"button",
|
|
15474
15524
|
{
|
|
15475
15525
|
type: "button",
|
|
15476
15526
|
onClick: handleClearFilters,
|
|
15477
15527
|
className: "text-[11px] text-rose-600 hover:text-rose-700 font-semibold hover:underline flex items-center gap-1 cursor-pointer",
|
|
15478
15528
|
children: [
|
|
15479
|
-
/* @__PURE__ */
|
|
15480
|
-
/* @__PURE__ */
|
|
15529
|
+
/* @__PURE__ */ jsx33(X10, { className: "w-3 h-3" }),
|
|
15530
|
+
/* @__PURE__ */ jsx33("span", { children: "\u05E0\u05E7\u05D4" })
|
|
15481
15531
|
]
|
|
15482
15532
|
}
|
|
15483
15533
|
)
|
|
15484
15534
|
] }),
|
|
15485
|
-
/* @__PURE__ */
|
|
15486
|
-
/* @__PURE__ */
|
|
15487
|
-
/* @__PURE__ */
|
|
15488
|
-
] }) : /* @__PURE__ */
|
|
15535
|
+
/* @__PURE__ */ jsx33("div", { className: "py-1", children: filterableColumns.length === 0 ? /* @__PURE__ */ jsxs27("div", { className: "flex flex-col items-center justify-center text-center p-4 text-xs text-slate-400 gap-1", children: [
|
|
15536
|
+
/* @__PURE__ */ jsx33("span", { children: "\u05D0\u05D9\u05DF \u05E9\u05D3\u05D5\u05EA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D6\u05D5" }),
|
|
15537
|
+
/* @__PURE__ */ jsx33("span", { className: "text-[10px] text-slate-400", children: "\u05E9\u05D3\u05D5\u05EA \u05DE\u05E1\u05D5\u05D2 \u05E7\u05E9\u05E8 \u05D5\u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05D1\u05DC\u05D1\u05D3" })
|
|
15538
|
+
] }) : /* @__PURE__ */ jsx33("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 gap-2", children: filterableColumns.map((col) => {
|
|
15489
15539
|
var _a, _b, _c;
|
|
15490
15540
|
const colType = (_a = col.type) == null ? void 0 : _a.toUpperCase();
|
|
15491
15541
|
const isBoolean = colType === "BOOLEAN";
|
|
@@ -15493,9 +15543,9 @@ function DynamicFiltersBlock({
|
|
|
15493
15543
|
const isActive = Boolean(currentValue);
|
|
15494
15544
|
const refTableId = ((_b = col == null ? void 0 : col.config) == null ? void 0 : _b.referencedTableId) || (col == null ? void 0 : col.referencedTableId);
|
|
15495
15545
|
const options = ((_c = getRelationOptionsForCol ? getRelationOptionsForCol(col.name) : []) == null ? void 0 : _c.length) > 0 ? getRelationOptionsForCol(col.name) : relationOptions[col.name] && relationOptions[col.name].length > 0 ? relationOptions[col.name] : refTableId && relationOptions[refTableId] && relationOptions[refTableId].length > 0 ? relationOptions[refTableId] : col.id && relationOptions[col.id] && relationOptions[col.id].length > 0 ? relationOptions[col.id] : [];
|
|
15496
|
-
return /* @__PURE__ */
|
|
15497
|
-
/* @__PURE__ */
|
|
15498
|
-
/* @__PURE__ */
|
|
15546
|
+
return /* @__PURE__ */ jsxs27("div", { className: "space-y-1", children: [
|
|
15547
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-center justify-between", children: [
|
|
15548
|
+
/* @__PURE__ */ jsx33(
|
|
15499
15549
|
"label",
|
|
15500
15550
|
{
|
|
15501
15551
|
className: "text-[11px] font-semibold text-slate-700 truncate max-w-[130px]",
|
|
@@ -15503,49 +15553,49 @@ function DynamicFiltersBlock({
|
|
|
15503
15553
|
children: col.name
|
|
15504
15554
|
}
|
|
15505
15555
|
),
|
|
15506
|
-
/* @__PURE__ */
|
|
15556
|
+
/* @__PURE__ */ jsx33("span", { className: "text-[9px] text-slate-400 font-mono", children: isBoolean ? "\u05DB\u05DF/\u05DC\u05D0" : "\u05E7\u05E9\u05E8" })
|
|
15507
15557
|
] }),
|
|
15508
|
-
/* @__PURE__ */
|
|
15509
|
-
/* @__PURE__ */
|
|
15558
|
+
/* @__PURE__ */ jsxs27("div", { className: "relative", children: [
|
|
15559
|
+
/* @__PURE__ */ jsxs27(
|
|
15510
15560
|
"select",
|
|
15511
15561
|
{
|
|
15512
15562
|
value: currentValue,
|
|
15513
15563
|
onChange: (e) => handleFilterChange(col.name, e.target.value),
|
|
15514
15564
|
className: `w-full h-8 px-2 pr-2.5 pl-6 text-[11px] rounded-lg border transition-all appearance-none bg-white cursor-pointer truncate ${isActive ? "border-emerald-500 bg-emerald-50/20 text-emerald-900 font-medium ring-1 ring-emerald-500/20" : "border-slate-200 text-slate-700 hover:border-slate-300 focus:border-emerald-500"}`,
|
|
15515
15565
|
children: [
|
|
15516
|
-
/* @__PURE__ */
|
|
15517
|
-
isBoolean ? /* @__PURE__ */
|
|
15518
|
-
/* @__PURE__ */
|
|
15519
|
-
/* @__PURE__ */
|
|
15520
|
-
] }) : options.map((opt) => /* @__PURE__ */
|
|
15566
|
+
/* @__PURE__ */ jsx33("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
|
|
15567
|
+
isBoolean ? /* @__PURE__ */ jsxs27(Fragment8, { children: [
|
|
15568
|
+
/* @__PURE__ */ jsx33("option", { value: "true", children: "\u05DB\u05DF" }),
|
|
15569
|
+
/* @__PURE__ */ jsx33("option", { value: "false", children: "\u05DC\u05D0" })
|
|
15570
|
+
] }) : options.map((opt) => /* @__PURE__ */ jsx33("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
|
|
15521
15571
|
]
|
|
15522
15572
|
}
|
|
15523
15573
|
),
|
|
15524
|
-
/* @__PURE__ */
|
|
15574
|
+
/* @__PURE__ */ jsx33(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15525
15575
|
] })
|
|
15526
15576
|
] }, col.name);
|
|
15527
15577
|
}) }) })
|
|
15528
15578
|
] }),
|
|
15529
|
-
/* @__PURE__ */
|
|
15530
|
-
/* @__PURE__ */
|
|
15579
|
+
/* @__PURE__ */ jsxs27("div", { className: "pt-2.5 mt-2 border-t border-slate-200/80 flex items-center justify-between gap-1.5 shrink-0", children: [
|
|
15580
|
+
/* @__PURE__ */ jsxs27(
|
|
15531
15581
|
"div",
|
|
15532
15582
|
{
|
|
15533
15583
|
className: `inline-flex items-center gap-1 px-2 py-0.5 rounded-lg text-[11px] font-semibold border transition-all ${selectedRowIds.length > 0 ? "bg-emerald-50 text-emerald-800 border-emerald-200 shadow-2xs" : "bg-white text-slate-600 border-slate-200"}`,
|
|
15534
15584
|
children: [
|
|
15535
|
-
/* @__PURE__ */
|
|
15585
|
+
/* @__PURE__ */ jsx33(
|
|
15536
15586
|
CheckSquare,
|
|
15537
15587
|
{
|
|
15538
15588
|
className: `w-3 h-3 ${selectedRowIds.length > 0 ? "text-emerald-600" : "text-slate-400"}`
|
|
15539
15589
|
}
|
|
15540
15590
|
),
|
|
15541
|
-
/* @__PURE__ */
|
|
15591
|
+
/* @__PURE__ */ jsxs27("span", { children: [
|
|
15542
15592
|
"\u05E0\u05D1\u05D7\u05E8\u05D5 ",
|
|
15543
15593
|
selectedRowIds.length
|
|
15544
15594
|
] })
|
|
15545
15595
|
]
|
|
15546
15596
|
}
|
|
15547
15597
|
),
|
|
15548
|
-
/* @__PURE__ */
|
|
15598
|
+
/* @__PURE__ */ jsx33(
|
|
15549
15599
|
"button",
|
|
15550
15600
|
{
|
|
15551
15601
|
type: "button",
|
|
@@ -15553,7 +15603,7 @@ function DynamicFiltersBlock({
|
|
|
15553
15603
|
disabled: isLoadingTableData,
|
|
15554
15604
|
className: "p-1.5 text-slate-500 hover:text-slate-800 bg-white hover:bg-slate-100 border border-slate-200 rounded-lg transition-colors cursor-pointer disabled:opacity-50 shrink-0",
|
|
15555
15605
|
title: "\u05E8\u05E2\u05E0\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9 \u05D8\u05D1\u05DC\u05D4",
|
|
15556
|
-
children: /* @__PURE__ */
|
|
15606
|
+
children: /* @__PURE__ */ jsx33(
|
|
15557
15607
|
RefreshCw,
|
|
15558
15608
|
{
|
|
15559
15609
|
className: `w-3.5 h-3.5 ${isLoadingTableData ? "animate-spin text-emerald-600" : ""}`
|
|
@@ -15576,7 +15626,7 @@ import {
|
|
|
15576
15626
|
X as X11,
|
|
15577
15627
|
CheckSquare as CheckSquare2
|
|
15578
15628
|
} from "lucide-react";
|
|
15579
|
-
import { Fragment as Fragment9, jsx as
|
|
15629
|
+
import { Fragment as Fragment9, jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
15580
15630
|
function SettingsAndActionsBlock({
|
|
15581
15631
|
isScanningPhoneColumns,
|
|
15582
15632
|
targetPhoneOptions,
|
|
@@ -15619,29 +15669,29 @@ function SettingsAndActionsBlock({
|
|
|
15619
15669
|
clearBroadcastSummary
|
|
15620
15670
|
}) {
|
|
15621
15671
|
var _a;
|
|
15622
|
-
return /* @__PURE__ */
|
|
15623
|
-
/* @__PURE__ */
|
|
15624
|
-
/* @__PURE__ */
|
|
15625
|
-
/* @__PURE__ */
|
|
15626
|
-
/* @__PURE__ */
|
|
15672
|
+
return /* @__PURE__ */ jsxs28("div", { className: "col-span-12 lg:col-span-4 min-h-[26rem] flex flex-col justify-between bg-slate-50/70 border border-slate-200 rounded-2xl p-3.5 gap-2", children: [
|
|
15673
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-2", children: [
|
|
15674
|
+
/* @__PURE__ */ jsx34("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-2", children: [
|
|
15675
|
+
/* @__PURE__ */ jsx34("span", { className: "text-sm", children: "\u2699\uFE0F" }),
|
|
15676
|
+
/* @__PURE__ */ jsx34("span", { className: "text-xs font-bold text-slate-800", children: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D5\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA" })
|
|
15627
15677
|
] }) }),
|
|
15628
|
-
/* @__PURE__ */
|
|
15629
|
-
isScanningPhoneColumns && targetPhoneOptions.length === 0 ? /* @__PURE__ */
|
|
15630
|
-
/* @__PURE__ */
|
|
15631
|
-
/* @__PURE__ */
|
|
15632
|
-
] }) : targetPhoneOptions.length === 0 ? /* @__PURE__ */
|
|
15633
|
-
/* @__PURE__ */
|
|
15634
|
-
/* @__PURE__ */
|
|
15635
|
-
] }) : targetPhoneOptions.length === 1 && targetPhoneOptions[0].type === "DIRECT" ? /* @__PURE__ */
|
|
15636
|
-
/* @__PURE__ */
|
|
15637
|
-
/* @__PURE__ */
|
|
15638
|
-
/* @__PURE__ */
|
|
15639
|
-
/* @__PURE__ */
|
|
15678
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-2.5 py-1", children: [
|
|
15679
|
+
isScanningPhoneColumns && targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs28("div", { className: "p-2.5 bg-slate-100/80 border border-slate-200 rounded-xl text-slate-500 text-xs flex items-center gap-2 shadow-2xs animate-pulse", children: [
|
|
15680
|
+
/* @__PURE__ */ jsx34(Loader26, { className: "w-4 h-4 animate-spin text-emerald-600 shrink-0" }),
|
|
15681
|
+
/* @__PURE__ */ jsx34("span", { className: "font-medium text-[11px] text-slate-600", children: "\u05E1\u05D5\u05E8\u05E7 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D5\u05D1\u05D8\u05D1\u05DC\u05D0\u05D5\u05EA \u05DE\u05E7\u05D5\u05E9\u05E8\u05D5\u05EA..." })
|
|
15682
|
+
] }) : targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs28("div", { className: "p-2.5 bg-amber-50 border border-amber-200 rounded-xl text-amber-900 text-xs flex items-center gap-2 shadow-2xs", children: [
|
|
15683
|
+
/* @__PURE__ */ jsx34(AlertCircle4, { className: "w-4 h-4 text-amber-600 shrink-0" }),
|
|
15684
|
+
/* @__PURE__ */ jsx34("span", { className: "font-semibold text-[11px]", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D4 \u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4" })
|
|
15685
|
+
] }) : targetPhoneOptions.length === 1 && targetPhoneOptions[0].type === "DIRECT" ? /* @__PURE__ */ jsxs28("div", { className: "space-y-1", children: [
|
|
15686
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
15687
|
+
/* @__PURE__ */ jsxs28("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
|
|
15688
|
+
/* @__PURE__ */ jsx34(Phone3, { className: "w-3 h-3 text-slate-400" }),
|
|
15689
|
+
/* @__PURE__ */ jsx34("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
|
|
15640
15690
|
] }),
|
|
15641
|
-
/* @__PURE__ */
|
|
15691
|
+
/* @__PURE__ */ jsx34("span", { className: "text-[9px] font-medium text-slate-500 bg-slate-100 px-1.5 py-0.5 rounded border border-slate-200", children: "\u05D6\u05D5\u05D4\u05EA\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA" })
|
|
15642
15692
|
] }),
|
|
15643
|
-
/* @__PURE__ */
|
|
15644
|
-
/* @__PURE__ */
|
|
15693
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
15694
|
+
/* @__PURE__ */ jsx34(
|
|
15645
15695
|
"input",
|
|
15646
15696
|
{
|
|
15647
15697
|
type: "text",
|
|
@@ -15651,52 +15701,52 @@ function SettingsAndActionsBlock({
|
|
|
15651
15701
|
className: "w-full h-8 px-2.5 pl-7 text-[11px] rounded-lg border border-slate-200 bg-slate-100 text-slate-600 cursor-not-allowed font-medium select-none"
|
|
15652
15702
|
}
|
|
15653
15703
|
),
|
|
15654
|
-
/* @__PURE__ */
|
|
15704
|
+
/* @__PURE__ */ jsx34(Phone3, { className: "w-3.5 h-3.5 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15655
15705
|
] })
|
|
15656
|
-
] }) : /* @__PURE__ */
|
|
15657
|
-
/* @__PURE__ */
|
|
15658
|
-
/* @__PURE__ */
|
|
15659
|
-
/* @__PURE__ */
|
|
15660
|
-
/* @__PURE__ */
|
|
15706
|
+
] }) : /* @__PURE__ */ jsxs28("div", { className: "space-y-1", children: [
|
|
15707
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
15708
|
+
/* @__PURE__ */ jsxs28("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
|
|
15709
|
+
/* @__PURE__ */ jsx34(Phone3, { className: "w-3 h-3 text-slate-400" }),
|
|
15710
|
+
/* @__PURE__ */ jsx34("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
|
|
15661
15711
|
] }),
|
|
15662
|
-
/* @__PURE__ */
|
|
15712
|
+
/* @__PURE__ */ jsx34("span", { className: "text-[9px] text-slate-400", children: "\u05D7\u05D5\u05D1\u05D4" })
|
|
15663
15713
|
] }),
|
|
15664
|
-
/* @__PURE__ */
|
|
15665
|
-
/* @__PURE__ */
|
|
15714
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
15715
|
+
/* @__PURE__ */ jsx34(
|
|
15666
15716
|
"select",
|
|
15667
15717
|
{
|
|
15668
15718
|
value: phoneColumnId,
|
|
15669
15719
|
onChange: (e) => setPhoneColumnId(e.target.value),
|
|
15670
15720
|
className: "w-full h-8 px-2.5 pr-2.5 pl-6 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer",
|
|
15671
|
-
children: targetPhoneOptions.map((opt) => /* @__PURE__ */
|
|
15721
|
+
children: targetPhoneOptions.map((opt) => /* @__PURE__ */ jsx34("option", { value: opt.id, children: opt.label }, opt.id))
|
|
15672
15722
|
}
|
|
15673
15723
|
),
|
|
15674
|
-
/* @__PURE__ */
|
|
15724
|
+
/* @__PURE__ */ jsx34(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15675
15725
|
] })
|
|
15676
15726
|
] }),
|
|
15677
|
-
/* @__PURE__ */
|
|
15678
|
-
/* @__PURE__ */
|
|
15679
|
-
/* @__PURE__ */
|
|
15727
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-1", children: [
|
|
15728
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
15729
|
+
/* @__PURE__ */ jsxs28(
|
|
15680
15730
|
"label",
|
|
15681
15731
|
{
|
|
15682
15732
|
htmlFor: "whatsapp-auto-select-records",
|
|
15683
15733
|
className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1 cursor-pointer",
|
|
15684
15734
|
children: [
|
|
15685
|
-
/* @__PURE__ */
|
|
15686
|
-
/* @__PURE__ */
|
|
15735
|
+
/* @__PURE__ */ jsx34(CheckSquare2, { className: "w-3 h-3 text-slate-400" }),
|
|
15736
|
+
/* @__PURE__ */ jsx34("span", { children: "\u05D1\u05D7\u05E8 \u05E8\u05E9\u05D5\u05DE\u05D4 (\u05DB\u05DE\u05D5\u05EA \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05E8\u05D1\u05D9\u05EA)" })
|
|
15687
15737
|
]
|
|
15688
15738
|
}
|
|
15689
15739
|
),
|
|
15690
|
-
autoSelectCount !== null && autoSelectCount > 0 && /* @__PURE__ */
|
|
15691
|
-
/* @__PURE__ */
|
|
15692
|
-
/* @__PURE__ */
|
|
15693
|
-
/* @__PURE__ */
|
|
15740
|
+
autoSelectCount !== null && autoSelectCount > 0 && /* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-1.5 animate-in fade-in duration-150", children: [
|
|
15741
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 border border-emerald-200/80 px-1.5 py-0.5 rounded-full flex items-center gap-1", children: [
|
|
15742
|
+
/* @__PURE__ */ jsx34("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" }),
|
|
15743
|
+
/* @__PURE__ */ jsxs28("span", { children: [
|
|
15694
15744
|
"\u05E0\u05D1\u05D7\u05E8\u05D5 ",
|
|
15695
15745
|
selectedRowIdsCount,
|
|
15696
15746
|
" \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA"
|
|
15697
15747
|
] })
|
|
15698
15748
|
] }),
|
|
15699
|
-
/* @__PURE__ */
|
|
15749
|
+
/* @__PURE__ */ jsxs28(
|
|
15700
15750
|
"button",
|
|
15701
15751
|
{
|
|
15702
15752
|
type: "button",
|
|
@@ -15705,14 +15755,14 @@ function SettingsAndActionsBlock({
|
|
|
15705
15755
|
title: "\u05E0\u05E7\u05D4 \u05D1\u05D7\u05D9\u05E8\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA",
|
|
15706
15756
|
"aria-label": "Clear auto select count",
|
|
15707
15757
|
children: [
|
|
15708
|
-
/* @__PURE__ */
|
|
15709
|
-
/* @__PURE__ */
|
|
15758
|
+
/* @__PURE__ */ jsx34(X11, { className: "w-3 h-3" }),
|
|
15759
|
+
/* @__PURE__ */ jsx34("span", { children: "\u05E0\u05E7\u05D4" })
|
|
15710
15760
|
]
|
|
15711
15761
|
}
|
|
15712
15762
|
)
|
|
15713
15763
|
] })
|
|
15714
15764
|
] }),
|
|
15715
|
-
/* @__PURE__ */
|
|
15765
|
+
/* @__PURE__ */ jsx34("div", { className: "relative", children: /* @__PURE__ */ jsx34(
|
|
15716
15766
|
"input",
|
|
15717
15767
|
{
|
|
15718
15768
|
id: "whatsapp-auto-select-records",
|
|
@@ -15740,19 +15790,19 @@ function SettingsAndActionsBlock({
|
|
|
15740
15790
|
}
|
|
15741
15791
|
) })
|
|
15742
15792
|
] }),
|
|
15743
|
-
(selectedPhoneOption == null ? void 0 : selectedPhoneOption.type) === "SUBTABLE" && /* @__PURE__ */
|
|
15744
|
-
/* @__PURE__ */
|
|
15745
|
-
/* @__PURE__ */
|
|
15746
|
-
/* @__PURE__ */
|
|
15793
|
+
(selectedPhoneOption == null ? void 0 : selectedPhoneOption.type) === "SUBTABLE" && /* @__PURE__ */ jsxs28("div", { className: "p-2.5 bg-emerald-50/60 border border-emerald-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: [
|
|
15794
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-1.5 pb-1 border-b border-emerald-200/60", children: [
|
|
15795
|
+
/* @__PURE__ */ jsx34(Users, { className: "w-3.5 h-3.5 text-emerald-700" }),
|
|
15796
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-[10.5px] font-bold text-emerald-900 truncate", children: [
|
|
15747
15797
|
"\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DC\u05EA\u05EA-\u05D8\u05D1\u05DC\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8\u05EA (",
|
|
15748
15798
|
selectedPhoneOption.parentColumnName,
|
|
15749
15799
|
")"
|
|
15750
15800
|
] })
|
|
15751
15801
|
] }),
|
|
15752
|
-
/* @__PURE__ */
|
|
15753
|
-
/* @__PURE__ */
|
|
15754
|
-
/* @__PURE__ */
|
|
15755
|
-
/* @__PURE__ */
|
|
15802
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-1", children: [
|
|
15803
|
+
/* @__PURE__ */ jsx34("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx34("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05E1\u05E0\u05DF \u05E0\u05E6\u05D9\u05D2\u05D9\u05DD (\u05D1\u05EA\u05EA-\u05D4\u05D8\u05D1\u05DC\u05D4) \u05DC\u05E4\u05D9 \u05E2\u05DE\u05D5\u05D3\u05D4:" }) }),
|
|
15804
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
15805
|
+
/* @__PURE__ */ jsxs28(
|
|
15756
15806
|
"select",
|
|
15757
15807
|
{
|
|
15758
15808
|
value: subtableFilterColumn,
|
|
@@ -15762,10 +15812,10 @@ function SettingsAndActionsBlock({
|
|
|
15762
15812
|
},
|
|
15763
15813
|
className: "w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer truncate",
|
|
15764
15814
|
children: [
|
|
15765
|
-
/* @__PURE__ */
|
|
15815
|
+
/* @__PURE__ */ jsx34("option", { value: "", children: "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD \u05E9\u05E0\u05D1\u05D7\u05E8\u05D5 (\u05DC\u05DC\u05D0 \u05E1\u05D9\u05E0\u05D5\u05DF \u05E0\u05D5\u05E1\u05E3)" }),
|
|
15766
15816
|
subtableFilterableColumns.map((col) => {
|
|
15767
15817
|
var _a2;
|
|
15768
|
-
return /* @__PURE__ */
|
|
15818
|
+
return /* @__PURE__ */ jsxs28("option", { value: col.name, children: [
|
|
15769
15819
|
col.name,
|
|
15770
15820
|
" (",
|
|
15771
15821
|
((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) === "BOOLEAN" ? "\u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9" : "\u05E7\u05E9\u05E8",
|
|
@@ -15775,30 +15825,30 @@ function SettingsAndActionsBlock({
|
|
|
15775
15825
|
]
|
|
15776
15826
|
}
|
|
15777
15827
|
),
|
|
15778
|
-
/* @__PURE__ */
|
|
15828
|
+
/* @__PURE__ */ jsx34(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15779
15829
|
] })
|
|
15780
15830
|
] }),
|
|
15781
|
-
selectedSubtableFilterCol && /* @__PURE__ */
|
|
15782
|
-
/* @__PURE__ */
|
|
15783
|
-
/* @__PURE__ */
|
|
15784
|
-
!subtableFilterValue && /* @__PURE__ */
|
|
15831
|
+
selectedSubtableFilterCol && /* @__PURE__ */ jsxs28("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
|
|
15832
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
15833
|
+
/* @__PURE__ */ jsx34("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05E9\u05D4\u05E2\u05E8\u05DA \u05E9\u05DC\u05D4\u05DD \u05E9\u05D5\u05D5\u05D4 \u05DC:" }),
|
|
15834
|
+
!subtableFilterValue && /* @__PURE__ */ jsx34("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." })
|
|
15785
15835
|
] }),
|
|
15786
|
-
/* @__PURE__ */
|
|
15787
|
-
/* @__PURE__ */
|
|
15836
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
15837
|
+
/* @__PURE__ */ jsxs28(
|
|
15788
15838
|
"select",
|
|
15789
15839
|
{
|
|
15790
15840
|
value: subtableFilterValue,
|
|
15791
15841
|
onChange: (e) => setSubtableFilterValue(e.target.value),
|
|
15792
15842
|
className: `w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border appearance-none cursor-pointer truncate transition-colors ${!subtableFilterValue ? "border-amber-400 bg-amber-50/30 text-slate-700 focus:border-amber-500 focus:ring-1 focus:ring-amber-500" : "border-slate-200 bg-white text-slate-700 focus:border-emerald-500"}`,
|
|
15793
15843
|
children: [
|
|
15794
|
-
/* @__PURE__ */
|
|
15795
|
-
((_a = selectedSubtableFilterCol.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN" ? /* @__PURE__ */
|
|
15796
|
-
/* @__PURE__ */
|
|
15797
|
-
/* @__PURE__ */
|
|
15844
|
+
/* @__PURE__ */ jsx34("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF..." }),
|
|
15845
|
+
((_a = selectedSubtableFilterCol.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN" ? /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
15846
|
+
/* @__PURE__ */ jsx34("option", { value: "true", children: "\u05DB\u05DF (true)" }),
|
|
15847
|
+
/* @__PURE__ */ jsx34("option", { value: "false", children: "\u05DC\u05D0 (false)" })
|
|
15798
15848
|
] }) : getRelationOptionsForCol(
|
|
15799
15849
|
selectedSubtableFilterCol.name,
|
|
15800
15850
|
selectedPhoneOption.parentColumnName
|
|
15801
|
-
).map((opt) => /* @__PURE__ */
|
|
15851
|
+
).map((opt) => /* @__PURE__ */ jsx34("option", { value: opt.id, children: getRelationOptionLabel(
|
|
15802
15852
|
opt,
|
|
15803
15853
|
selectedSubtableFilterCol,
|
|
15804
15854
|
relationOptions
|
|
@@ -15806,32 +15856,32 @@ function SettingsAndActionsBlock({
|
|
|
15806
15856
|
]
|
|
15807
15857
|
}
|
|
15808
15858
|
),
|
|
15809
|
-
/* @__PURE__ */
|
|
15859
|
+
/* @__PURE__ */ jsx34(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15810
15860
|
] })
|
|
15811
15861
|
] }),
|
|
15812
|
-
/* @__PURE__ */
|
|
15813
|
-
/* @__PURE__ */
|
|
15814
|
-
/* @__PURE__ */
|
|
15815
|
-
/* @__PURE__ */
|
|
15862
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-1", children: [
|
|
15863
|
+
/* @__PURE__ */ jsx34("label", { className: "text-[10px] font-semibold text-slate-700 block", children: "\u05DE\u05D2\u05D1\u05DC\u05EA \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DC\u05DB\u05DC \u05E9\u05D5\u05E8\u05D4 \u05E8\u05D0\u05E9\u05D9\u05EA:" }),
|
|
15864
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
15865
|
+
/* @__PURE__ */ jsxs28(
|
|
15816
15866
|
"select",
|
|
15817
15867
|
{
|
|
15818
15868
|
value: subtableSendLimit,
|
|
15819
15869
|
onChange: (e) => setSubtableSendLimit(e.target.value),
|
|
15820
15870
|
className: "w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer truncate",
|
|
15821
15871
|
children: [
|
|
15822
|
-
/* @__PURE__ */
|
|
15823
|
-
/* @__PURE__ */
|
|
15824
|
-
/* @__PURE__ */
|
|
15872
|
+
/* @__PURE__ */ jsx34("option", { value: "PRIMARY", children: "\u05DC\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9 \u05D1\u05DC\u05D1\u05D3" }),
|
|
15873
|
+
/* @__PURE__ */ jsx34("option", { value: "FIRST", children: "\u05E0\u05E6\u05D9\u05D2 \u05D0\u05D7\u05D3 \u05D1\u05DC\u05D1\u05D3" }),
|
|
15874
|
+
/* @__PURE__ */ jsx34("option", { value: "ALL", children: "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD" })
|
|
15825
15875
|
]
|
|
15826
15876
|
}
|
|
15827
15877
|
),
|
|
15828
|
-
/* @__PURE__ */
|
|
15878
|
+
/* @__PURE__ */ jsx34(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15829
15879
|
] })
|
|
15830
15880
|
] })
|
|
15831
15881
|
] }),
|
|
15832
|
-
/* @__PURE__ */
|
|
15833
|
-
/* @__PURE__ */
|
|
15834
|
-
/* @__PURE__ */
|
|
15882
|
+
/* @__PURE__ */ jsxs28("div", { className: "pt-2 border-t border-slate-200/70 space-y-2", children: [
|
|
15883
|
+
/* @__PURE__ */ jsxs28("label", { className: "flex items-center gap-2 cursor-pointer select-none", children: [
|
|
15884
|
+
/* @__PURE__ */ jsx34(
|
|
15835
15885
|
"input",
|
|
15836
15886
|
{
|
|
15837
15887
|
type: "checkbox",
|
|
@@ -15848,13 +15898,13 @@ function SettingsAndActionsBlock({
|
|
|
15848
15898
|
className: "w-3.5 h-3.5 rounded border-slate-300 text-emerald-600 focus:ring-emerald-500 cursor-pointer"
|
|
15849
15899
|
}
|
|
15850
15900
|
),
|
|
15851
|
-
/* @__PURE__ */
|
|
15901
|
+
/* @__PURE__ */ jsx34("span", { className: "text-[11px] font-semibold text-slate-800", children: "\u05E2\u05D3\u05DB\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05DC\u05D0\u05D7\u05E8 \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DE\u05D5\u05E6\u05DC\u05D7\u05EA" })
|
|
15852
15902
|
] }),
|
|
15853
|
-
enablePostSendAction && /* @__PURE__ */
|
|
15854
|
-
/* @__PURE__ */
|
|
15855
|
-
/* @__PURE__ */
|
|
15856
|
-
/* @__PURE__ */
|
|
15857
|
-
selectedPostSendOption && /* @__PURE__ */
|
|
15903
|
+
enablePostSendAction && /* @__PURE__ */ jsx34("div", { className: "p-2 bg-slate-100/70 border border-slate-200/80 rounded-xl space-y-2 animate-in fade-in duration-150", children: postSendActionTargetOptions.length === 0 ? /* @__PURE__ */ jsx34("div", { className: "text-[10px] text-slate-400 text-center py-1", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA \u05E7\u05E9\u05E8 \u05D0\u05D5 \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }) : /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
15904
|
+
/* @__PURE__ */ jsxs28("div", { className: "space-y-1", children: [
|
|
15905
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
15906
|
+
/* @__PURE__ */ jsx34("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3 \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
|
|
15907
|
+
selectedPostSendOption && /* @__PURE__ */ jsx34(
|
|
15858
15908
|
"span",
|
|
15859
15909
|
{
|
|
15860
15910
|
className: `text-[9px] font-medium px-1.5 py-0.5 rounded border ${selectedPostSendOption.targetType === "SUBTABLE" ? "bg-emerald-50 text-emerald-700 border-emerald-200" : "bg-slate-100 text-slate-600 border-slate-200"}`,
|
|
@@ -15862,8 +15912,8 @@ function SettingsAndActionsBlock({
|
|
|
15862
15912
|
}
|
|
15863
15913
|
)
|
|
15864
15914
|
] }),
|
|
15865
|
-
/* @__PURE__ */
|
|
15866
|
-
/* @__PURE__ */
|
|
15915
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
15916
|
+
/* @__PURE__ */ jsxs28(
|
|
15867
15917
|
"select",
|
|
15868
15918
|
{
|
|
15869
15919
|
value: postSendActionColumn,
|
|
@@ -15876,35 +15926,35 @@ function SettingsAndActionsBlock({
|
|
|
15876
15926
|
},
|
|
15877
15927
|
className: "w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border border-slate-200 bg-white text-slate-700 appearance-none focus:border-emerald-500 cursor-pointer truncate",
|
|
15878
15928
|
children: [
|
|
15879
|
-
/* @__PURE__ */
|
|
15880
|
-
postSendActionTargetOptions.map((opt) => /* @__PURE__ */
|
|
15929
|
+
/* @__PURE__ */ jsx34("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
|
|
15930
|
+
postSendActionTargetOptions.map((opt) => /* @__PURE__ */ jsx34("option", { value: opt.id, children: opt.label }, opt.id))
|
|
15881
15931
|
]
|
|
15882
15932
|
}
|
|
15883
15933
|
),
|
|
15884
|
-
/* @__PURE__ */
|
|
15934
|
+
/* @__PURE__ */ jsx34(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15885
15935
|
] })
|
|
15886
15936
|
] }),
|
|
15887
|
-
selectedPostSendOption && /* @__PURE__ */
|
|
15888
|
-
/* @__PURE__ */
|
|
15889
|
-
/* @__PURE__ */
|
|
15890
|
-
!postSendActionValue && /* @__PURE__ */
|
|
15937
|
+
selectedPostSendOption && /* @__PURE__ */ jsxs28("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
|
|
15938
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
15939
|
+
/* @__PURE__ */ jsx34("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05E8\u05DA \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
|
|
15940
|
+
!postSendActionValue && /* @__PURE__ */ jsx34("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D1\u05D7\u05D5\u05E8 \u05E2\u05E8\u05DA" })
|
|
15891
15941
|
] }),
|
|
15892
|
-
/* @__PURE__ */
|
|
15893
|
-
/* @__PURE__ */
|
|
15942
|
+
/* @__PURE__ */ jsxs28("div", { className: "relative", children: [
|
|
15943
|
+
/* @__PURE__ */ jsxs28(
|
|
15894
15944
|
"select",
|
|
15895
15945
|
{
|
|
15896
15946
|
value: postSendActionValue,
|
|
15897
15947
|
onChange: (e) => setPostSendActionValue(e.target.value),
|
|
15898
15948
|
className: `w-full h-7 px-2 pr-2 pl-5 text-[11px] rounded-lg border appearance-none cursor-pointer truncate transition-colors ${!postSendActionValue ? "border-amber-400 bg-amber-50/30 text-slate-700 focus:border-amber-500 focus:ring-1 focus:ring-amber-500" : "border-slate-200 bg-white text-slate-700 focus:border-emerald-500"}`,
|
|
15899
15949
|
children: [
|
|
15900
|
-
/* @__PURE__ */
|
|
15901
|
-
selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */
|
|
15902
|
-
/* @__PURE__ */
|
|
15903
|
-
/* @__PURE__ */
|
|
15950
|
+
/* @__PURE__ */ jsx34("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." }),
|
|
15951
|
+
selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
15952
|
+
/* @__PURE__ */ jsx34("option", { value: "true", children: "\u05DB\u05DF (Yes)" }),
|
|
15953
|
+
/* @__PURE__ */ jsx34("option", { value: "false", children: "\u05DC\u05D0 (No)" })
|
|
15904
15954
|
] }) : getRelationOptionsForCol(
|
|
15905
15955
|
selectedPostSendOption.columnName,
|
|
15906
15956
|
selectedPostSendOption.parentColumnName
|
|
15907
|
-
).map((opt) => /* @__PURE__ */
|
|
15957
|
+
).map((opt) => /* @__PURE__ */ jsx34("option", { value: opt.id, children: getRelationOptionLabel(
|
|
15908
15958
|
opt,
|
|
15909
15959
|
selectedPostSendOption,
|
|
15910
15960
|
relationOptions
|
|
@@ -15912,15 +15962,15 @@ function SettingsAndActionsBlock({
|
|
|
15912
15962
|
]
|
|
15913
15963
|
}
|
|
15914
15964
|
),
|
|
15915
|
-
/* @__PURE__ */
|
|
15965
|
+
/* @__PURE__ */ jsx34(ChevronDown6, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
15916
15966
|
] })
|
|
15917
15967
|
] })
|
|
15918
15968
|
] }) })
|
|
15919
15969
|
] })
|
|
15920
15970
|
] })
|
|
15921
15971
|
] }),
|
|
15922
|
-
/* @__PURE__ */
|
|
15923
|
-
/* @__PURE__ */
|
|
15972
|
+
/* @__PURE__ */ jsxs28("div", { className: "mt-auto pt-2.5 border-t border-slate-200/80 space-y-2 shrink-0", children: [
|
|
15973
|
+
/* @__PURE__ */ jsxs28(
|
|
15924
15974
|
"button",
|
|
15925
15975
|
{
|
|
15926
15976
|
type: "button",
|
|
@@ -15929,23 +15979,23 @@ function SettingsAndActionsBlock({
|
|
|
15929
15979
|
className: `w-full h-8 px-3 text-xs font-semibold rounded-xl border transition-all flex items-center justify-center gap-1.5 ${isTestDisabled || isSendingBroadcast ? "bg-slate-100 text-slate-400 border-slate-200 cursor-not-allowed opacity-60" : "bg-white hover:bg-slate-50 text-slate-700 border-slate-200 active:scale-[0.98] cursor-pointer shadow-2xs"}`,
|
|
15930
15980
|
title: testButtonTitle,
|
|
15931
15981
|
children: [
|
|
15932
|
-
/* @__PURE__ */
|
|
15933
|
-
/* @__PURE__ */
|
|
15982
|
+
/* @__PURE__ */ jsx34(Phone3, { className: "w-3 h-3" }),
|
|
15983
|
+
/* @__PURE__ */ jsx34("span", { children: "\u05E9\u05DC\u05D7 \u05D8\u05E1\u05D8" })
|
|
15934
15984
|
]
|
|
15935
15985
|
}
|
|
15936
15986
|
),
|
|
15937
|
-
isSendingBroadcast ? /* @__PURE__ */
|
|
15987
|
+
isSendingBroadcast ? /* @__PURE__ */ jsxs28(
|
|
15938
15988
|
"div",
|
|
15939
15989
|
{
|
|
15940
15990
|
className: "w-full bg-white border border-emerald-200 rounded-xl p-2.5 shadow-xs space-y-2 animate-in fade-in duration-200",
|
|
15941
15991
|
"data-testid": "live-broadcast-progress",
|
|
15942
15992
|
children: [
|
|
15943
|
-
/* @__PURE__ */
|
|
15944
|
-
/* @__PURE__ */
|
|
15945
|
-
/* @__PURE__ */
|
|
15946
|
-
/* @__PURE__ */
|
|
15993
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-700", children: [
|
|
15994
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-1.5 text-emerald-800 font-bold", children: [
|
|
15995
|
+
/* @__PURE__ */ jsx34(Loader26, { className: "w-3.5 h-3.5 animate-spin text-emerald-600 shrink-0" }),
|
|
15996
|
+
/* @__PURE__ */ jsx34("span", { children: "\u05E9\u05D5\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D1\u05EA\u05E4\u05D5\u05E6\u05D4..." })
|
|
15947
15997
|
] }),
|
|
15948
|
-
/* @__PURE__ */
|
|
15998
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-emerald-700 font-bold", children: [
|
|
15949
15999
|
(broadcastProgress == null ? void 0 : broadcastProgress.percent) || 0,
|
|
15950
16000
|
"% (",
|
|
15951
16001
|
(broadcastProgress == null ? void 0 : broadcastProgress.current) || 0,
|
|
@@ -15954,7 +16004,7 @@ function SettingsAndActionsBlock({
|
|
|
15954
16004
|
")"
|
|
15955
16005
|
] })
|
|
15956
16006
|
] }),
|
|
15957
|
-
/* @__PURE__ */
|
|
16007
|
+
/* @__PURE__ */ jsx34("div", { className: "w-full h-2.5 bg-slate-100 rounded-full overflow-hidden border border-slate-200", children: /* @__PURE__ */ jsx34(
|
|
15958
16008
|
"div",
|
|
15959
16009
|
{
|
|
15960
16010
|
className: "h-full bg-emerald-500 rounded-full transition-all duration-300 ease-out",
|
|
@@ -15963,18 +16013,18 @@ function SettingsAndActionsBlock({
|
|
|
15963
16013
|
}
|
|
15964
16014
|
}
|
|
15965
16015
|
) }),
|
|
15966
|
-
/* @__PURE__ */
|
|
15967
|
-
/* @__PURE__ */
|
|
15968
|
-
/* @__PURE__ */
|
|
15969
|
-
/* @__PURE__ */
|
|
16016
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-around pt-1 text-[11px] font-medium border-t border-slate-100", children: [
|
|
16017
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-emerald-700 flex items-center gap-1", title: "\u05E0\u05E9\u05DC\u05D7\u05D5 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4", children: [
|
|
16018
|
+
/* @__PURE__ */ jsx34("span", { children: "\u2705" }),
|
|
16019
|
+
/* @__PURE__ */ jsx34("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.successful) || 0 })
|
|
15970
16020
|
] }),
|
|
15971
|
-
/* @__PURE__ */
|
|
15972
|
-
/* @__PURE__ */
|
|
15973
|
-
/* @__PURE__ */
|
|
16021
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-rose-600 flex items-center gap-1", title: "\u05E9\u05DC\u05D9\u05D7\u05D4 \u05E0\u05DB\u05E9\u05DC\u05D4", children: [
|
|
16022
|
+
/* @__PURE__ */ jsx34("span", { children: "\u274C" }),
|
|
16023
|
+
/* @__PURE__ */ jsx34("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.failed) || 0 })
|
|
15974
16024
|
] }),
|
|
15975
|
-
/* @__PURE__ */
|
|
15976
|
-
/* @__PURE__ */
|
|
15977
|
-
/* @__PURE__ */
|
|
16025
|
+
/* @__PURE__ */ jsxs28("span", { className: "text-amber-700 flex items-center gap-1", title: "\u05E9\u05D5\u05E8\u05D5\u05EA \u05E9\u05D3\u05D5\u05DC\u05D2\u05D5 \u05DC\u05DC\u05D0 \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF", children: [
|
|
16026
|
+
/* @__PURE__ */ jsx34("span", { children: "\u26A0\uFE0F" }),
|
|
16027
|
+
/* @__PURE__ */ jsxs28("span", { className: "font-bold", children: [
|
|
15978
16028
|
(broadcastProgress == null ? void 0 : broadcastProgress.skipped) || 0,
|
|
15979
16029
|
" \u05DC\u05DC\u05D0 \u05D8\u05DC\u05E4\u05D5\u05DF"
|
|
15980
16030
|
] })
|
|
@@ -15982,8 +16032,8 @@ function SettingsAndActionsBlock({
|
|
|
15982
16032
|
] })
|
|
15983
16033
|
]
|
|
15984
16034
|
}
|
|
15985
|
-
) : /* @__PURE__ */
|
|
15986
|
-
/* @__PURE__ */
|
|
16035
|
+
) : /* @__PURE__ */ jsxs28(Fragment9, { children: [
|
|
16036
|
+
/* @__PURE__ */ jsxs28(
|
|
15987
16037
|
"button",
|
|
15988
16038
|
{
|
|
15989
16039
|
type: "button",
|
|
@@ -15992,56 +16042,56 @@ function SettingsAndActionsBlock({
|
|
|
15992
16042
|
className: `w-full h-9 px-3 text-xs font-bold rounded-xl shadow-xs transition-all flex items-center justify-center gap-2 ${isSendDisabled ? "bg-emerald-600/40 text-white/70 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 active:scale-[0.98] text-white cursor-pointer"}`,
|
|
15993
16043
|
title: sendButtonTitle,
|
|
15994
16044
|
children: [
|
|
15995
|
-
/* @__PURE__ */
|
|
15996
|
-
/* @__PURE__ */
|
|
16045
|
+
/* @__PURE__ */ jsx34(Send, { className: "w-3.5 h-3.5" }),
|
|
16046
|
+
/* @__PURE__ */ jsx34("span", { children: finalRecipientCount > 0 ? `\u05E9\u05DC\u05D7 \u05DC-${finalRecipientCount} \u05E0\u05DE\u05E2\u05E0\u05D9\u05DD` : "\u05E9\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA" })
|
|
15997
16047
|
]
|
|
15998
16048
|
}
|
|
15999
16049
|
),
|
|
16000
|
-
validMainRowsCount > 0 && /* @__PURE__ */
|
|
16050
|
+
validMainRowsCount > 0 && /* @__PURE__ */ jsxs28("div", { className: "text-center text-[10.5px] text-slate-500 font-medium pt-0.5", children: [
|
|
16001
16051
|
"\u05DE\u05EA\u05D5\u05DA ",
|
|
16002
16052
|
validMainRowsCount,
|
|
16003
16053
|
" \u05E9\u05D5\u05E8\u05D5\u05EA \u05E8\u05D0\u05E9\u05D9\u05D5\u05EA"
|
|
16004
16054
|
] }),
|
|
16005
|
-
broadcastSummary && /* @__PURE__ */
|
|
16055
|
+
broadcastSummary && /* @__PURE__ */ jsxs28(
|
|
16006
16056
|
"div",
|
|
16007
16057
|
{
|
|
16008
16058
|
className: "w-full bg-slate-50/90 border border-slate-200/90 rounded-xl p-2.5 shadow-2xs space-y-2 animate-in fade-in duration-200",
|
|
16009
16059
|
"data-testid": "broadcast-summary-card",
|
|
16010
16060
|
children: [
|
|
16011
|
-
/* @__PURE__ */
|
|
16012
|
-
/* @__PURE__ */
|
|
16013
|
-
/* @__PURE__ */
|
|
16014
|
-
/* @__PURE__ */
|
|
16061
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center justify-between", children: [
|
|
16062
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex items-center gap-1.5 text-[11px] font-bold text-slate-700", children: [
|
|
16063
|
+
/* @__PURE__ */ jsx34("span", { className: "text-xs", children: "\u{1F4CA}" }),
|
|
16064
|
+
/* @__PURE__ */ jsx34("span", { children: "\u05E1\u05D9\u05DB\u05D5\u05DD \u05E9\u05D9\u05D3\u05D5\u05E8 \u05D0\u05D7\u05E8\u05D5\u05DF" })
|
|
16015
16065
|
] }),
|
|
16016
|
-
clearBroadcastSummary && /* @__PURE__ */
|
|
16066
|
+
clearBroadcastSummary && /* @__PURE__ */ jsx34(
|
|
16017
16067
|
"button",
|
|
16018
16068
|
{
|
|
16019
16069
|
type: "button",
|
|
16020
16070
|
onClick: clearBroadcastSummary,
|
|
16021
16071
|
className: "text-slate-400 hover:text-slate-600 p-0.5 rounded-md hover:bg-slate-200/60 transition-colors cursor-pointer",
|
|
16022
16072
|
title: "\u05E1\u05D2\u05D5\u05E8 \u05E1\u05D9\u05DB\u05D5\u05DD",
|
|
16023
|
-
children: /* @__PURE__ */
|
|
16073
|
+
children: /* @__PURE__ */ jsx34(X11, { className: "w-3.5 h-3.5" })
|
|
16024
16074
|
}
|
|
16025
16075
|
)
|
|
16026
16076
|
] }),
|
|
16027
|
-
/* @__PURE__ */
|
|
16028
|
-
/* @__PURE__ */
|
|
16029
|
-
/* @__PURE__ */
|
|
16030
|
-
/* @__PURE__ */
|
|
16077
|
+
/* @__PURE__ */ jsxs28("div", { className: "flex flex-wrap items-center gap-1.5 pt-0.5", children: [
|
|
16078
|
+
/* @__PURE__ */ jsxs28("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-emerald-50 text-emerald-700 border border-emerald-200/80", children: [
|
|
16079
|
+
/* @__PURE__ */ jsx34("span", { children: "\u2705" }),
|
|
16080
|
+
/* @__PURE__ */ jsxs28("span", { children: [
|
|
16031
16081
|
broadcastSummary.successful,
|
|
16032
16082
|
" \u05E0\u05E9\u05DC\u05D7\u05D5"
|
|
16033
16083
|
] })
|
|
16034
16084
|
] }),
|
|
16035
|
-
broadcastSummary.failed > 0 && /* @__PURE__ */
|
|
16036
|
-
/* @__PURE__ */
|
|
16037
|
-
/* @__PURE__ */
|
|
16085
|
+
broadcastSummary.failed > 0 && /* @__PURE__ */ jsxs28("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-rose-50 text-rose-700 border border-rose-200/80", children: [
|
|
16086
|
+
/* @__PURE__ */ jsx34("span", { children: "\u274C" }),
|
|
16087
|
+
/* @__PURE__ */ jsxs28("span", { children: [
|
|
16038
16088
|
broadcastSummary.failed,
|
|
16039
16089
|
" \u05E0\u05DB\u05E9\u05DC\u05D5"
|
|
16040
16090
|
] })
|
|
16041
16091
|
] }),
|
|
16042
|
-
broadcastSummary.skipped > 0 && /* @__PURE__ */
|
|
16043
|
-
/* @__PURE__ */
|
|
16044
|
-
/* @__PURE__ */
|
|
16092
|
+
broadcastSummary.skipped > 0 && /* @__PURE__ */ jsxs28("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-[10.5px] font-semibold bg-amber-50 text-amber-700 border border-amber-200/80", children: [
|
|
16093
|
+
/* @__PURE__ */ jsx34("span", { children: "\u26A0\uFE0F" }),
|
|
16094
|
+
/* @__PURE__ */ jsxs28("span", { children: [
|
|
16045
16095
|
broadcastSummary.skipped,
|
|
16046
16096
|
" \u05DC\u05DC\u05D0 \u05D8\u05DC\u05E4\u05D5\u05DF"
|
|
16047
16097
|
] })
|
|
@@ -16139,14 +16189,14 @@ function useInboxState(orgId, actions) {
|
|
|
16139
16189
|
|
|
16140
16190
|
// src/components/WhatsAppComponent/inbox/ConversationList.tsx
|
|
16141
16191
|
import { Search as Search4, User } from "lucide-react";
|
|
16142
|
-
import { jsx as
|
|
16192
|
+
import { jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
16143
16193
|
function ConversationList({ conversations, activeId, onSelect }) {
|
|
16144
|
-
return /* @__PURE__ */
|
|
16145
|
-
/* @__PURE__ */
|
|
16146
|
-
/* @__PURE__ */
|
|
16147
|
-
/* @__PURE__ */
|
|
16148
|
-
/* @__PURE__ */
|
|
16149
|
-
/* @__PURE__ */
|
|
16194
|
+
return /* @__PURE__ */ jsxs29("div", { className: "w-80 border-l border-slate-200 bg-white flex flex-col h-full shrink-0", children: [
|
|
16195
|
+
/* @__PURE__ */ jsxs29("div", { className: "p-4 border-b border-slate-100 bg-slate-50", children: [
|
|
16196
|
+
/* @__PURE__ */ jsx35("h2", { className: "text-lg font-bold text-slate-800 mb-3", children: "\u05E9\u05D9\u05D7\u05D5\u05EA \u05E0\u05DB\u05E0\u05E1\u05D5\u05EA" }),
|
|
16197
|
+
/* @__PURE__ */ jsxs29("div", { className: "relative", children: [
|
|
16198
|
+
/* @__PURE__ */ jsx35(Search4, { className: "w-4 h-4 absolute right-3 top-1/2 -translate-y-1/2 text-slate-400" }),
|
|
16199
|
+
/* @__PURE__ */ jsx35(
|
|
16150
16200
|
"input",
|
|
16151
16201
|
{
|
|
16152
16202
|
type: "text",
|
|
@@ -16156,27 +16206,27 @@ function ConversationList({ conversations, activeId, onSelect }) {
|
|
|
16156
16206
|
)
|
|
16157
16207
|
] })
|
|
16158
16208
|
] }),
|
|
16159
|
-
/* @__PURE__ */
|
|
16209
|
+
/* @__PURE__ */ jsx35("div", { className: "flex-1 overflow-y-auto", children: (() => {
|
|
16160
16210
|
const sortedConversations = [...conversations].sort(
|
|
16161
16211
|
(a, b) => new Date(b.lastMessageAt).getTime() - new Date(a.lastMessageAt).getTime()
|
|
16162
16212
|
);
|
|
16163
|
-
return sortedConversations.length === 0 ? /* @__PURE__ */
|
|
16213
|
+
return sortedConversations.length === 0 ? /* @__PURE__ */ jsx35("div", { className: "p-6 text-center text-sm text-slate-400", children: "\u05D0\u05D9\u05DF \u05E9\u05D9\u05D7\u05D5\u05EA \u05E4\u05E2\u05D9\u05DC\u05D5\u05EA" }) : sortedConversations.map((conv) => {
|
|
16164
16214
|
var _a, _b;
|
|
16165
|
-
return /* @__PURE__ */
|
|
16215
|
+
return /* @__PURE__ */ jsxs29(
|
|
16166
16216
|
"button",
|
|
16167
16217
|
{
|
|
16168
16218
|
onClick: () => onSelect(conv.id),
|
|
16169
16219
|
className: `w-full text-right p-4 border-b border-slate-100 transition-colors hover:bg-slate-50 flex items-start gap-3 ${activeId === conv.id ? "bg-emerald-50/50 border-r-4 border-r-emerald-500" : "border-r-4 border-r-transparent"}`,
|
|
16170
16220
|
children: [
|
|
16171
|
-
/* @__PURE__ */
|
|
16172
|
-
/* @__PURE__ */
|
|
16173
|
-
/* @__PURE__ */
|
|
16174
|
-
/* @__PURE__ */
|
|
16175
|
-
/* @__PURE__ */
|
|
16221
|
+
/* @__PURE__ */ jsx35("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx35(User, { className: "w-5 h-5 text-slate-500" }) }),
|
|
16222
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex-1 overflow-hidden", children: [
|
|
16223
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex justify-between items-center mb-1", children: [
|
|
16224
|
+
/* @__PURE__ */ jsx35("span", { className: "font-semibold text-slate-800 text-sm truncate", children: conv.contactName || conv.contactPhone }),
|
|
16225
|
+
/* @__PURE__ */ jsx35("span", { className: "text-[10px] text-slate-400", children: new Date(conv.lastMessageAt).toLocaleTimeString("he-IL", { hour: "2-digit", minute: "2-digit" }) })
|
|
16176
16226
|
] }),
|
|
16177
|
-
/* @__PURE__ */
|
|
16178
|
-
/* @__PURE__ */
|
|
16179
|
-
conv.unreadCount > 0 && /* @__PURE__ */
|
|
16227
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex justify-between items-center", children: [
|
|
16228
|
+
/* @__PURE__ */ jsx35("p", { className: "text-xs text-slate-500 truncate w-4/5", children: ((_b = (_a = conv.messages) == null ? void 0 : _a[0]) == null ? void 0 : _b.content) || "\u05D0\u05D9\u05DF \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA" }),
|
|
16229
|
+
conv.unreadCount > 0 && /* @__PURE__ */ jsx35("span", { className: "bg-emerald-500 text-white text-[10px] font-bold px-1.5 py-0.5 rounded-full min-w-[20px] text-center", children: conv.unreadCount })
|
|
16180
16230
|
] })
|
|
16181
16231
|
] })
|
|
16182
16232
|
]
|
|
@@ -16191,7 +16241,7 @@ function ConversationList({ conversations, activeId, onSelect }) {
|
|
|
16191
16241
|
// src/components/WhatsAppComponent/inbox/ChatWindow.tsx
|
|
16192
16242
|
import { useState as useState26, useRef as useRef22, useEffect as useEffect19 } from "react";
|
|
16193
16243
|
import { Send as Send2, User as User2, Loader2 as Loader27 } from "lucide-react";
|
|
16194
|
-
import { jsx as
|
|
16244
|
+
import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
16195
16245
|
function ChatWindow({ activeConversation, messages, isLoading, isSending, onSendMessage }) {
|
|
16196
16246
|
const [inputText, setInputText] = useState26("");
|
|
16197
16247
|
const messagesTopRef = useRef22(null);
|
|
@@ -16209,34 +16259,34 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
|
|
|
16209
16259
|
setInputText("");
|
|
16210
16260
|
};
|
|
16211
16261
|
if (!activeConversation) {
|
|
16212
|
-
return /* @__PURE__ */
|
|
16213
|
-
/* @__PURE__ */
|
|
16214
|
-
/* @__PURE__ */
|
|
16262
|
+
return /* @__PURE__ */ jsxs30("div", { className: "flex-1 bg-slate-50 flex items-center justify-center flex-col gap-4 text-slate-400", children: [
|
|
16263
|
+
/* @__PURE__ */ jsx36("div", { className: "w-16 h-16 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx36("svg", { className: "w-8 h-8 text-slate-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx36("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z" }) }) }),
|
|
16264
|
+
/* @__PURE__ */ jsx36("p", { children: "\u05D1\u05D7\u05E8 \u05E9\u05D9\u05D7\u05D4 \u05DE\u05D4\u05E8\u05E9\u05D9\u05DE\u05D4 \u05DB\u05D3\u05D9 \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC" })
|
|
16215
16265
|
] });
|
|
16216
16266
|
}
|
|
16217
|
-
return /* @__PURE__ */
|
|
16218
|
-
/* @__PURE__ */
|
|
16219
|
-
/* @__PURE__ */
|
|
16220
|
-
/* @__PURE__ */
|
|
16221
|
-
/* @__PURE__ */
|
|
16222
|
-
/* @__PURE__ */
|
|
16267
|
+
return /* @__PURE__ */ jsxs30("div", { className: "flex-1 flex flex-col bg-[#efeae2] h-full relative", children: [
|
|
16268
|
+
/* @__PURE__ */ jsxs30("div", { className: "h-16 bg-white border-b border-slate-200 px-6 flex items-center gap-3 shrink-0 z-10 shadow-sm", children: [
|
|
16269
|
+
/* @__PURE__ */ jsx36("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx36(User2, { className: "w-5 h-5 text-slate-500" }) }),
|
|
16270
|
+
/* @__PURE__ */ jsxs30("div", { children: [
|
|
16271
|
+
/* @__PURE__ */ jsx36("h3", { className: "font-bold text-slate-800", children: activeConversation.contactName || activeConversation.contactPhone }),
|
|
16272
|
+
/* @__PURE__ */ jsx36("p", { className: "text-xs text-slate-500", dir: "ltr", children: activeConversation.contactPhone })
|
|
16223
16273
|
] })
|
|
16224
16274
|
] }),
|
|
16225
|
-
/* @__PURE__ */
|
|
16226
|
-
/* @__PURE__ */
|
|
16227
|
-
isLoading ? /* @__PURE__ */
|
|
16275
|
+
/* @__PURE__ */ jsxs30("div", { className: "flex-1 overflow-y-auto p-6 space-y-4", children: [
|
|
16276
|
+
/* @__PURE__ */ jsx36("div", { ref: messagesTopRef }),
|
|
16277
|
+
isLoading ? /* @__PURE__ */ jsx36("div", { className: "flex justify-center py-10", children: /* @__PURE__ */ jsx36(Loader27, { className: "w-6 h-6 animate-spin text-emerald-600" }) }) : messages.map((msg, idx) => {
|
|
16228
16278
|
const isOutbound = msg.direction === "OUTBOUND";
|
|
16229
|
-
return /* @__PURE__ */
|
|
16230
|
-
/* @__PURE__ */
|
|
16231
|
-
/* @__PURE__ */
|
|
16279
|
+
return /* @__PURE__ */ jsx36("div", { className: `flex ${isOutbound ? "justify-start" : "justify-end"}`, children: /* @__PURE__ */ jsxs30("div", { className: `max-w-[70%] rounded-2xl px-4 py-2 shadow-sm relative ${isOutbound ? "bg-[#d9fdd3] text-slate-900 rounded-tr-none" : "bg-white text-slate-900 rounded-tl-none"}`, children: [
|
|
16280
|
+
/* @__PURE__ */ jsx36("p", { className: "text-sm whitespace-pre-wrap", children: msg.content }),
|
|
16281
|
+
/* @__PURE__ */ jsxs30("div", { className: "text-[11px] text-slate-600 mt-1 text-left flex items-center justify-end gap-1", children: [
|
|
16232
16282
|
new Date(msg.createdAt).toLocaleString("he-IL", { day: "2-digit", month: "2-digit", year: "numeric", hour: "2-digit", minute: "2-digit" }),
|
|
16233
|
-
isOutbound && /* @__PURE__ */
|
|
16283
|
+
isOutbound && /* @__PURE__ */ jsx36("span", { className: msg.status === "READ" || msg.status === "DELIVERED" ? "text-blue-500" : "text-slate-500", children: msg.status === "READ" ? "\u2713\u2713" : msg.status === "DELIVERED" ? "\u2713\u2713" : "\u2713" })
|
|
16234
16284
|
] })
|
|
16235
16285
|
] }) }, msg.id || idx);
|
|
16236
16286
|
})
|
|
16237
16287
|
] }),
|
|
16238
|
-
/* @__PURE__ */
|
|
16239
|
-
/* @__PURE__ */
|
|
16288
|
+
/* @__PURE__ */ jsx36("div", { className: "bg-slate-50 p-4 border-t border-slate-200 shrink-0", children: /* @__PURE__ */ jsxs30("form", { onSubmit: handleSend, className: "flex items-end gap-2 max-w-4xl mx-auto", children: [
|
|
16289
|
+
/* @__PURE__ */ jsx36("div", { className: "flex-1 bg-white border border-slate-300 rounded-2xl overflow-hidden focus-within:border-emerald-500 focus-within:ring-1 focus-within:ring-emerald-500", children: /* @__PURE__ */ jsx36(
|
|
16240
16290
|
"textarea",
|
|
16241
16291
|
{
|
|
16242
16292
|
rows: 1,
|
|
@@ -16252,13 +16302,13 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
|
|
|
16252
16302
|
className: "w-full max-h-32 min-h-[44px] p-3 text-sm bg-transparent outline-none resize-none"
|
|
16253
16303
|
}
|
|
16254
16304
|
) }),
|
|
16255
|
-
/* @__PURE__ */
|
|
16305
|
+
/* @__PURE__ */ jsx36(
|
|
16256
16306
|
"button",
|
|
16257
16307
|
{
|
|
16258
16308
|
type: "submit",
|
|
16259
16309
|
disabled: !inputText.trim() || isSending,
|
|
16260
16310
|
className: `w-11 h-11 rounded-full flex items-center justify-center shrink-0 transition-colors ${!inputText.trim() || isSending ? "bg-slate-200 text-slate-400" : "bg-emerald-600 hover:bg-emerald-700 text-white shadow-md"}`,
|
|
16261
|
-
children: isSending ? /* @__PURE__ */
|
|
16311
|
+
children: isSending ? /* @__PURE__ */ jsx36(Loader27, { className: "w-5 h-5 animate-spin" }) : /* @__PURE__ */ jsx36(Send2, { className: "w-5 h-5 -ml-1" })
|
|
16262
16312
|
}
|
|
16263
16313
|
)
|
|
16264
16314
|
] }) })
|
|
@@ -16266,7 +16316,7 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
|
|
|
16266
16316
|
}
|
|
16267
16317
|
|
|
16268
16318
|
// src/components/WhatsAppComponent/inbox/WhatsAppInbox.tsx
|
|
16269
|
-
import { jsx as
|
|
16319
|
+
import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
16270
16320
|
function WhatsAppInbox({
|
|
16271
16321
|
orgId,
|
|
16272
16322
|
getConversationsAction,
|
|
@@ -16287,8 +16337,8 @@ function WhatsAppInbox({
|
|
|
16287
16337
|
sendMessage: sendInboxMessageAction
|
|
16288
16338
|
});
|
|
16289
16339
|
const activeConversation = conversations.find((c) => c.id === activeConversationId);
|
|
16290
|
-
return /* @__PURE__ */
|
|
16291
|
-
/* @__PURE__ */
|
|
16340
|
+
return /* @__PURE__ */ jsxs31("div", { className: "flex h-[calc(100vh-140px)] min-h-[600px] w-full border border-slate-200 rounded-2xl overflow-hidden bg-white shadow-xs", dir: "rtl", children: [
|
|
16341
|
+
/* @__PURE__ */ jsx37(
|
|
16292
16342
|
ConversationList,
|
|
16293
16343
|
{
|
|
16294
16344
|
conversations,
|
|
@@ -16296,7 +16346,7 @@ function WhatsAppInbox({
|
|
|
16296
16346
|
onSelect: handleSelectConversation
|
|
16297
16347
|
}
|
|
16298
16348
|
),
|
|
16299
|
-
/* @__PURE__ */
|
|
16349
|
+
/* @__PURE__ */ jsx37(
|
|
16300
16350
|
ChatWindow,
|
|
16301
16351
|
{
|
|
16302
16352
|
activeConversation,
|
|
@@ -16310,21 +16360,21 @@ function WhatsAppInbox({
|
|
|
16310
16360
|
}
|
|
16311
16361
|
|
|
16312
16362
|
// src/components/WhatsAppComponent/WhatsAppComponent.tsx
|
|
16313
|
-
import { Fragment as Fragment10, jsx as
|
|
16363
|
+
import { Fragment as Fragment10, jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
16314
16364
|
function WhatsAppComponent(props) {
|
|
16315
16365
|
var _a;
|
|
16316
16366
|
const { className = "", settings, orgId, componentId, executeAction } = props;
|
|
16317
16367
|
const state = useWhatsAppState(props);
|
|
16318
16368
|
const [activeTab, setActiveTab] = React26.useState("broadcast");
|
|
16319
|
-
return /* @__PURE__ */
|
|
16369
|
+
return /* @__PURE__ */ jsxs32(
|
|
16320
16370
|
"div",
|
|
16321
16371
|
{
|
|
16322
16372
|
className: `w-full flex flex-col bg-white border border-slate-200 rounded-2xl shadow-xs overflow-hidden ${className}`,
|
|
16323
16373
|
"data-testid": "whatsapp-component",
|
|
16324
16374
|
dir: "rtl",
|
|
16325
16375
|
children: [
|
|
16326
|
-
/* @__PURE__ */
|
|
16327
|
-
/* @__PURE__ */
|
|
16376
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex border-b border-slate-200 bg-slate-50 px-6 pt-3 gap-4 shrink-0", children: [
|
|
16377
|
+
/* @__PURE__ */ jsx38(
|
|
16328
16378
|
"button",
|
|
16329
16379
|
{
|
|
16330
16380
|
type: "button",
|
|
@@ -16333,7 +16383,7 @@ function WhatsAppComponent(props) {
|
|
|
16333
16383
|
children: "\u{1F4E4} \u05E9\u05DC\u05D9\u05D7\u05EA \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D5\u05EA\u05E4\u05D5\u05E6\u05D4"
|
|
16334
16384
|
}
|
|
16335
16385
|
),
|
|
16336
|
-
/* @__PURE__ */
|
|
16386
|
+
/* @__PURE__ */ jsx38(
|
|
16337
16387
|
"button",
|
|
16338
16388
|
{
|
|
16339
16389
|
type: "button",
|
|
@@ -16343,7 +16393,7 @@ function WhatsAppComponent(props) {
|
|
|
16343
16393
|
}
|
|
16344
16394
|
)
|
|
16345
16395
|
] }),
|
|
16346
|
-
activeTab === "inbox" ? /* @__PURE__ */
|
|
16396
|
+
activeTab === "inbox" ? /* @__PURE__ */ jsx38("div", { className: "p-4 flex-1", children: /* @__PURE__ */ jsx38(
|
|
16347
16397
|
WhatsAppInbox,
|
|
16348
16398
|
{
|
|
16349
16399
|
orgId: orgId || props.organizationId || "",
|
|
@@ -16382,37 +16432,37 @@ function WhatsAppComponent(props) {
|
|
|
16382
16432
|
}
|
|
16383
16433
|
}
|
|
16384
16434
|
}
|
|
16385
|
-
) }) : /* @__PURE__ */
|
|
16386
|
-
state.feedback && /* @__PURE__ */
|
|
16435
|
+
) }) : /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
16436
|
+
state.feedback && /* @__PURE__ */ jsxs32(
|
|
16387
16437
|
"div",
|
|
16388
16438
|
{
|
|
16389
16439
|
className: `px-6 py-3 border-b text-xs flex items-center justify-between gap-3 ${state.feedback.type === "success" ? "bg-emerald-50 border-emerald-200 text-emerald-800" : "bg-rose-50 border-rose-200 text-rose-800"}`,
|
|
16390
16440
|
children: [
|
|
16391
|
-
/* @__PURE__ */
|
|
16392
|
-
state.feedback.type === "success" ? /* @__PURE__ */
|
|
16393
|
-
/* @__PURE__ */
|
|
16441
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
16442
|
+
state.feedback.type === "success" ? /* @__PURE__ */ jsx38(CheckCircle24, { className: "w-4 h-4 text-emerald-600 shrink-0" }) : /* @__PURE__ */ jsx38(AlertCircle5, { className: "w-4 h-4 text-rose-600 shrink-0" }),
|
|
16443
|
+
/* @__PURE__ */ jsx38("span", { children: state.feedback.message })
|
|
16394
16444
|
] }),
|
|
16395
|
-
/* @__PURE__ */
|
|
16445
|
+
/* @__PURE__ */ jsx38(
|
|
16396
16446
|
"button",
|
|
16397
16447
|
{
|
|
16398
16448
|
type: "button",
|
|
16399
16449
|
onClick: () => state.setFeedback(null),
|
|
16400
16450
|
className: "text-slate-400 hover:text-slate-700 cursor-pointer",
|
|
16401
|
-
children: /* @__PURE__ */
|
|
16451
|
+
children: /* @__PURE__ */ jsx38(X12, { className: "w-4 h-4" })
|
|
16402
16452
|
}
|
|
16403
16453
|
)
|
|
16404
16454
|
]
|
|
16405
16455
|
}
|
|
16406
16456
|
),
|
|
16407
|
-
state.fetchError && !state.isLoadingTemplates && /* @__PURE__ */
|
|
16408
|
-
/* @__PURE__ */
|
|
16409
|
-
/* @__PURE__ */
|
|
16410
|
-
/* @__PURE__ */
|
|
16457
|
+
state.fetchError && !state.isLoadingTemplates && /* @__PURE__ */ jsxs32("div", { className: "px-6 py-3 bg-amber-50 border-b border-amber-200 text-xs text-amber-900 flex items-center justify-between", children: [
|
|
16458
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2", children: [
|
|
16459
|
+
/* @__PURE__ */ jsx38(AlertCircle5, { className: "w-4 h-4 text-amber-600 shrink-0" }),
|
|
16460
|
+
/* @__PURE__ */ jsxs32("span", { children: [
|
|
16411
16461
|
"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D1\u05D8\u05E2\u05D9\u05E0\u05EA \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA \u05DE-Meta: ",
|
|
16412
16462
|
state.fetchError
|
|
16413
16463
|
] })
|
|
16414
16464
|
] }),
|
|
16415
|
-
/* @__PURE__ */
|
|
16465
|
+
/* @__PURE__ */ jsx38(
|
|
16416
16466
|
"button",
|
|
16417
16467
|
{
|
|
16418
16468
|
type: "button",
|
|
@@ -16422,9 +16472,9 @@ function WhatsAppComponent(props) {
|
|
|
16422
16472
|
}
|
|
16423
16473
|
)
|
|
16424
16474
|
] }),
|
|
16425
|
-
/* @__PURE__ */
|
|
16426
|
-
/* @__PURE__ */
|
|
16427
|
-
/* @__PURE__ */
|
|
16475
|
+
/* @__PURE__ */ jsxs32("div", { className: "p-4 flex flex-col gap-4", children: [
|
|
16476
|
+
/* @__PURE__ */ jsxs32("div", { className: "grid grid-cols-1 lg:grid-cols-12 gap-4 shrink-0 items-stretch", children: [
|
|
16477
|
+
/* @__PURE__ */ jsx38(
|
|
16428
16478
|
TemplateSelectionBlock,
|
|
16429
16479
|
{
|
|
16430
16480
|
selectedTemplate: state.selectedTemplate,
|
|
@@ -16452,7 +16502,7 @@ function WhatsAppComponent(props) {
|
|
|
16452
16502
|
handleFileUpload: state.handleFileUpload
|
|
16453
16503
|
}
|
|
16454
16504
|
),
|
|
16455
|
-
/* @__PURE__ */
|
|
16505
|
+
/* @__PURE__ */ jsx38(
|
|
16456
16506
|
DynamicFiltersBlock,
|
|
16457
16507
|
{
|
|
16458
16508
|
filterableColumns: state.filterableColumns,
|
|
@@ -16469,7 +16519,7 @@ function WhatsAppComponent(props) {
|
|
|
16469
16519
|
isLoadingTableData: state.isLoadingTableData
|
|
16470
16520
|
}
|
|
16471
16521
|
),
|
|
16472
|
-
/* @__PURE__ */
|
|
16522
|
+
/* @__PURE__ */ jsx38(
|
|
16473
16523
|
SettingsAndActionsBlock,
|
|
16474
16524
|
{
|
|
16475
16525
|
isScanningPhoneColumns: state.isScanningPhoneColumns,
|
|
@@ -16515,13 +16565,13 @@ function WhatsAppComponent(props) {
|
|
|
16515
16565
|
}
|
|
16516
16566
|
)
|
|
16517
16567
|
] }),
|
|
16518
|
-
/* @__PURE__ */
|
|
16519
|
-
/* @__PURE__ */
|
|
16520
|
-
/* @__PURE__ */
|
|
16521
|
-
] }) : state.tableError ? /* @__PURE__ */
|
|
16522
|
-
/* @__PURE__ */
|
|
16523
|
-
/* @__PURE__ */
|
|
16524
|
-
] }) : !(settings == null ? void 0 : settings.tableMetaId) ? /* @__PURE__ */
|
|
16568
|
+
/* @__PURE__ */ jsx38("div", { className: "w-full h-[calc(100vh-420px)] min-h-[320px] overflow-hidden border border-slate-200 rounded-2xl shadow-xs bg-white flex flex-col", children: state.isLoadingTableData && state.rawRecords.length === 0 ? /* @__PURE__ */ jsxs32("div", { className: "flex-1 flex flex-col items-center justify-center p-12 text-center text-xs text-slate-400 gap-2", children: [
|
|
16569
|
+
/* @__PURE__ */ jsx38(Loader28, { className: "w-6 h-6 animate-spin text-emerald-600" }),
|
|
16570
|
+
/* @__PURE__ */ jsx38("span", { children: "\u05D8\u05D5\u05E2\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05D4\u05D8\u05D1\u05DC\u05D4..." })
|
|
16571
|
+
] }) : state.tableError ? /* @__PURE__ */ jsxs32("div", { className: "flex-1 flex items-center justify-center p-6 text-center text-xs text-rose-600 bg-rose-50 gap-2", children: [
|
|
16572
|
+
/* @__PURE__ */ jsx38(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
|
|
16573
|
+
/* @__PURE__ */ jsx38("span", { children: state.tableError })
|
|
16574
|
+
] }) : !(settings == null ? void 0 : settings.tableMetaId) ? /* @__PURE__ */ jsx38("div", { className: "flex-1 flex items-center justify-center p-10 text-center text-xs text-slate-400", children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 \u05E2\u05D1\u05D5\u05E8 \u05E8\u05DB\u05D9\u05D1 WhatsApp \u05D6\u05D4" }) : /* @__PURE__ */ jsx38(
|
|
16525
16575
|
TableBlockClient,
|
|
16526
16576
|
{
|
|
16527
16577
|
settings: {
|
|
@@ -16543,7 +16593,7 @@ function WhatsAppComponent(props) {
|
|
|
16543
16593
|
}
|
|
16544
16594
|
) })
|
|
16545
16595
|
] }),
|
|
16546
|
-
/* @__PURE__ */
|
|
16596
|
+
/* @__PURE__ */ jsx38(
|
|
16547
16597
|
CreateTemplateModal,
|
|
16548
16598
|
{
|
|
16549
16599
|
isOpen: state.isModalOpen,
|
|
@@ -16557,7 +16607,7 @@ function WhatsAppComponent(props) {
|
|
|
16557
16607
|
orgId: state.orgId || orgId
|
|
16558
16608
|
}
|
|
16559
16609
|
),
|
|
16560
|
-
state.isTestPromptOpen && /* @__PURE__ */
|
|
16610
|
+
state.isTestPromptOpen && /* @__PURE__ */ jsx38(
|
|
16561
16611
|
"div",
|
|
16562
16612
|
{
|
|
16563
16613
|
className: "fixed inset-0 bg-slate-900/60 backdrop-blur-xs z-50 flex items-center justify-center p-4 overflow-y-auto animate-in fade-in duration-150",
|
|
@@ -16566,7 +16616,7 @@ function WhatsAppComponent(props) {
|
|
|
16566
16616
|
state.setIsTestPromptOpen(false);
|
|
16567
16617
|
state.setTestFeedback(null);
|
|
16568
16618
|
},
|
|
16569
|
-
children: /* @__PURE__ */
|
|
16619
|
+
children: /* @__PURE__ */ jsxs32(
|
|
16570
16620
|
"div",
|
|
16571
16621
|
{
|
|
16572
16622
|
className: "bg-white rounded-2xl border border-slate-200 shadow-2xl w-full max-w-md flex flex-col overflow-hidden animate-in zoom-in-95 duration-150",
|
|
@@ -16575,15 +16625,15 @@ function WhatsAppComponent(props) {
|
|
|
16575
16625
|
"aria-labelledby": "test-modal-title",
|
|
16576
16626
|
onClick: (e) => e.stopPropagation(),
|
|
16577
16627
|
children: [
|
|
16578
|
-
/* @__PURE__ */
|
|
16579
|
-
/* @__PURE__ */
|
|
16580
|
-
/* @__PURE__ */
|
|
16581
|
-
/* @__PURE__ */
|
|
16582
|
-
/* @__PURE__ */
|
|
16583
|
-
/* @__PURE__ */
|
|
16628
|
+
/* @__PURE__ */ jsxs32("div", { className: "px-5 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
|
|
16629
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-2.5", children: [
|
|
16630
|
+
/* @__PURE__ */ jsx38("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx38(Phone4, { className: "w-4 h-4" }) }),
|
|
16631
|
+
/* @__PURE__ */ jsxs32("div", { children: [
|
|
16632
|
+
/* @__PURE__ */ jsx38("h3", { id: "test-modal-title", className: "text-sm font-bold text-slate-900", children: "\u05E9\u05DC\u05D9\u05D7\u05EA \u05D4\u05D5\u05D3\u05E2\u05EA \u05D1\u05D3\u05D9\u05E7\u05D4 (\u05D8\u05E1\u05D8)" }),
|
|
16633
|
+
/* @__PURE__ */ jsx38("p", { className: "text-[11px] text-slate-500", children: "\u05D1\u05D3\u05D9\u05E7\u05EA \u05D4\u05EA\u05D1\u05E0\u05D9\u05EA \u05DE\u05D5\u05DC \u05E0\u05DE\u05E2\u05DF \u05D1\u05D5\u05D3\u05D3 \u05DC\u05E4\u05E0\u05D9 \u05E9\u05D9\u05D3\u05D5\u05E8 \u05E8\u05D7\u05D1" })
|
|
16584
16634
|
] })
|
|
16585
16635
|
] }),
|
|
16586
|
-
/* @__PURE__ */
|
|
16636
|
+
/* @__PURE__ */ jsx38(
|
|
16587
16637
|
"button",
|
|
16588
16638
|
{
|
|
16589
16639
|
type: "button",
|
|
@@ -16595,25 +16645,25 @@ function WhatsAppComponent(props) {
|
|
|
16595
16645
|
},
|
|
16596
16646
|
className: `w-8 h-8 rounded-lg flex items-center justify-center transition-colors ${state.isSendingTest ? "text-slate-300 cursor-not-allowed" : "text-slate-400 hover:text-slate-700 hover:bg-slate-200/50 cursor-pointer"}`,
|
|
16597
16647
|
title: "\u05E1\u05D2\u05D5\u05E8",
|
|
16598
|
-
children: /* @__PURE__ */
|
|
16648
|
+
children: /* @__PURE__ */ jsx38(X12, { className: "w-4 h-4" })
|
|
16599
16649
|
}
|
|
16600
16650
|
)
|
|
16601
16651
|
] }),
|
|
16602
|
-
/* @__PURE__ */
|
|
16603
|
-
/* @__PURE__ */
|
|
16604
|
-
/* @__PURE__ */
|
|
16605
|
-
/* @__PURE__ */
|
|
16652
|
+
/* @__PURE__ */ jsxs32("div", { className: "p-5 space-y-4", children: [
|
|
16653
|
+
/* @__PURE__ */ jsxs32("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
|
|
16654
|
+
/* @__PURE__ */ jsx38("span", { className: "text-slate-500 font-medium", children: "\u05EA\u05D1\u05E0\u05D9\u05EA \u05E0\u05D1\u05D7\u05E8\u05EA:" }),
|
|
16655
|
+
/* @__PURE__ */ jsx38("span", { className: "font-bold text-slate-800 font-mono", children: ((_a = state.selectedTemplate) == null ? void 0 : _a.name) || "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" })
|
|
16606
16656
|
] }),
|
|
16607
|
-
state.selectedPhoneOption && /* @__PURE__ */
|
|
16608
|
-
/* @__PURE__ */
|
|
16609
|
-
/* @__PURE__ */
|
|
16657
|
+
state.selectedPhoneOption && /* @__PURE__ */ jsxs32("div", { className: "p-2 bg-emerald-50/50 border border-emerald-200/60 rounded-xl flex items-center justify-between text-[11px]", children: [
|
|
16658
|
+
/* @__PURE__ */ jsx38("span", { className: "text-emerald-800 font-medium", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3:" }),
|
|
16659
|
+
/* @__PURE__ */ jsx38("span", { className: "font-bold text-emerald-950 font-mono", children: state.selectedPhoneOption.label })
|
|
16610
16660
|
] }),
|
|
16611
16661
|
state.templateHeaderComp && (() => {
|
|
16612
16662
|
const headerFormat = (state.templateHeaderComp.format || "").toUpperCase();
|
|
16613
16663
|
const docFilename = resolveDocumentFilename(state.templateHeaderComp, state.headerMediaUrl);
|
|
16614
|
-
return /* @__PURE__ */
|
|
16615
|
-
/* @__PURE__ */
|
|
16616
|
-
/* @__PURE__ */
|
|
16664
|
+
return /* @__PURE__ */ jsxs32("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
|
|
16665
|
+
/* @__PURE__ */ jsx38("div", { className: "flex items-center gap-2 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
16666
|
+
/* @__PURE__ */ jsx38("div", { className: "w-7 h-7 rounded-md overflow-hidden border border-slate-200 shrink-0 bg-slate-100 flex items-center justify-center", children: state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx38(
|
|
16617
16667
|
"img",
|
|
16618
16668
|
{
|
|
16619
16669
|
src: state.headerMediaUrl,
|
|
@@ -16623,28 +16673,28 @@ function WhatsAppComponent(props) {
|
|
|
16623
16673
|
e.currentTarget.style.display = "none";
|
|
16624
16674
|
}
|
|
16625
16675
|
}
|
|
16626
|
-
) : /* @__PURE__ */
|
|
16627
|
-
/* @__PURE__ */
|
|
16628
|
-
] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */
|
|
16629
|
-
/* @__PURE__ */
|
|
16630
|
-
/* @__PURE__ */
|
|
16631
|
-
/* @__PURE__ */
|
|
16632
|
-
/* @__PURE__ */
|
|
16676
|
+
) : /* @__PURE__ */ jsx38(ImageIcon3, { className: "w-3.5 h-3.5 text-emerald-600" }) }),
|
|
16677
|
+
/* @__PURE__ */ jsx38("span", { className: "font-semibold text-slate-800 truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" })
|
|
16678
|
+
] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
16679
|
+
/* @__PURE__ */ jsx38("div", { className: "w-7 h-7 rounded-md bg-rose-50 text-rose-600 border border-rose-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx38(FileText4, { className: "w-3.5 h-3.5" }) }),
|
|
16680
|
+
/* @__PURE__ */ jsxs32("div", { className: "overflow-hidden", children: [
|
|
16681
|
+
/* @__PURE__ */ jsx38("span", { className: "font-semibold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
|
|
16682
|
+
/* @__PURE__ */ jsx38("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: docFilename, children: docFilename })
|
|
16633
16683
|
] })
|
|
16634
|
-
] }) : /* @__PURE__ */
|
|
16635
|
-
/* @__PURE__ */
|
|
16636
|
-
/* @__PURE__ */
|
|
16684
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
16685
|
+
/* @__PURE__ */ jsx38("div", { className: "w-7 h-7 rounded-md bg-indigo-50 text-indigo-600 border border-indigo-100 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx38(Video3, { className: "w-3.5 h-3.5" }) }),
|
|
16686
|
+
/* @__PURE__ */ jsx38("span", { className: "font-semibold text-slate-800 truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" })
|
|
16637
16687
|
] }) }),
|
|
16638
|
-
state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */
|
|
16688
|
+
state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx38("span", { className: "text-[10px] text-emerald-700 bg-emerald-50 border border-emerald-200 px-1.5 py-0.5 rounded font-medium shrink-0", children: "\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3 \u05EA\u05E7\u05D9\u05DF" }) : /* @__PURE__ */ jsx38("span", { className: "text-[10px] text-amber-700 bg-amber-50 border border-amber-200 px-1.5 py-0.5 rounded font-medium shrink-0", children: "\u05E0\u05D3\u05E8\u05E9 \u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5" })
|
|
16639
16689
|
] });
|
|
16640
16690
|
})(),
|
|
16641
|
-
/* @__PURE__ */
|
|
16642
|
-
/* @__PURE__ */
|
|
16691
|
+
/* @__PURE__ */ jsxs32("div", { className: "space-y-1.5", children: [
|
|
16692
|
+
/* @__PURE__ */ jsxs32("label", { className: "text-xs font-semibold text-slate-700 block", children: [
|
|
16643
16693
|
"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05DC\u05D8\u05E1\u05D8 ",
|
|
16644
|
-
/* @__PURE__ */
|
|
16694
|
+
/* @__PURE__ */ jsx38("span", { className: "text-rose-500", children: "*" })
|
|
16645
16695
|
] }),
|
|
16646
|
-
/* @__PURE__ */
|
|
16647
|
-
/* @__PURE__ */
|
|
16696
|
+
/* @__PURE__ */ jsxs32("div", { className: "relative", children: [
|
|
16697
|
+
/* @__PURE__ */ jsx38(
|
|
16648
16698
|
"input",
|
|
16649
16699
|
{
|
|
16650
16700
|
type: "tel",
|
|
@@ -16666,17 +16716,17 @@ function WhatsAppComponent(props) {
|
|
|
16666
16716
|
className: "w-full h-10 px-3 pr-3 pl-8 text-sm rounded-xl border border-slate-200 bg-white text-slate-900 placeholder:text-slate-400 focus:outline-hidden focus:border-emerald-500 focus:ring-1 focus:ring-emerald-500 transition-all font-mono disabled:opacity-60 disabled:cursor-not-allowed"
|
|
16667
16717
|
}
|
|
16668
16718
|
),
|
|
16669
|
-
/* @__PURE__ */
|
|
16719
|
+
/* @__PURE__ */ jsx38(Phone4, { className: "w-4 h-4 text-slate-400 absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
16670
16720
|
] }),
|
|
16671
|
-
/* @__PURE__ */
|
|
16721
|
+
/* @__PURE__ */ jsx38("p", { className: "text-[11px] text-slate-500 leading-normal", children: "\u05D4\u05D5\u05D3\u05E2\u05EA \u05D4\u05D1\u05D3\u05D9\u05E7\u05D4 \u05EA\u05D9\u05E9\u05DC\u05D7 \u05D9\u05E9\u05D9\u05E8\u05D5\u05EA \u05DC\u05DE\u05E1\u05E4\u05E8 \u05D6\u05D4 \u05DC\u05E6\u05D5\u05E8\u05DA \u05D5\u05D9\u05D3\u05D5\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D5\u05EA \u05EA\u05D5\u05DB\u05DF \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 \u05D5\u05D4\u05E2\u05D9\u05E6\u05D5\u05D1." })
|
|
16672
16722
|
] }),
|
|
16673
|
-
state.testFeedback && /* @__PURE__ */
|
|
16674
|
-
/* @__PURE__ */
|
|
16675
|
-
/* @__PURE__ */
|
|
16723
|
+
state.testFeedback && /* @__PURE__ */ jsxs32("div", { className: "p-2.5 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-700 flex items-center gap-2", children: [
|
|
16724
|
+
/* @__PURE__ */ jsx38(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
|
|
16725
|
+
/* @__PURE__ */ jsx38("span", { children: state.testFeedback })
|
|
16676
16726
|
] })
|
|
16677
16727
|
] }),
|
|
16678
|
-
/* @__PURE__ */
|
|
16679
|
-
/* @__PURE__ */
|
|
16728
|
+
/* @__PURE__ */ jsxs32("div", { className: "px-5 py-3.5 bg-slate-50/70 border-t border-slate-100 flex items-center justify-end gap-2", children: [
|
|
16729
|
+
/* @__PURE__ */ jsx38(
|
|
16680
16730
|
"button",
|
|
16681
16731
|
{
|
|
16682
16732
|
type: "button",
|
|
@@ -16690,7 +16740,7 @@ function WhatsAppComponent(props) {
|
|
|
16690
16740
|
children: "\u05D1\u05D9\u05D8\u05D5\u05DC"
|
|
16691
16741
|
}
|
|
16692
16742
|
),
|
|
16693
|
-
/* @__PURE__ */
|
|
16743
|
+
/* @__PURE__ */ jsx38(
|
|
16694
16744
|
"button",
|
|
16695
16745
|
{
|
|
16696
16746
|
type: "button",
|
|
@@ -16698,12 +16748,12 @@ function WhatsAppComponent(props) {
|
|
|
16698
16748
|
onClick: state.handleSendTest,
|
|
16699
16749
|
title: state.testButtonTitle,
|
|
16700
16750
|
className: `px-4 py-2 text-xs font-bold rounded-xl transition-all flex items-center gap-1.5 ${!state.testPhoneNumber.trim() || state.isSendingTest || state.isTestDisabled ? "bg-emerald-600/40 text-white/70 cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 active:scale-[0.98] text-white shadow-xs cursor-pointer"}`,
|
|
16701
|
-
children: state.isSendingTest ? /* @__PURE__ */
|
|
16702
|
-
/* @__PURE__ */
|
|
16703
|
-
/* @__PURE__ */
|
|
16704
|
-
] }) : /* @__PURE__ */
|
|
16705
|
-
/* @__PURE__ */
|
|
16706
|
-
/* @__PURE__ */
|
|
16751
|
+
children: state.isSendingTest ? /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
16752
|
+
/* @__PURE__ */ jsx38(Loader28, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
16753
|
+
/* @__PURE__ */ jsx38("span", { children: "\u05E9\u05D5\u05DC\u05D7..." })
|
|
16754
|
+
] }) : /* @__PURE__ */ jsxs32(Fragment10, { children: [
|
|
16755
|
+
/* @__PURE__ */ jsx38(Send3, { className: "w-3.5 h-3.5" }),
|
|
16756
|
+
/* @__PURE__ */ jsx38("span", { children: "\u05E9\u05DC\u05D7 \u05E2\u05DB\u05E9\u05D9\u05D5" })
|
|
16707
16757
|
] })
|
|
16708
16758
|
}
|
|
16709
16759
|
)
|
|
@@ -16722,7 +16772,7 @@ function WhatsAppComponent(props) {
|
|
|
16722
16772
|
// src/components/FormBlock/FormBlock.tsx
|
|
16723
16773
|
import { useState as useState27, useEffect as useEffect20 } from "react";
|
|
16724
16774
|
import { Loader2 as Loader29, CheckCircle2 as CheckCircle25 } from "lucide-react";
|
|
16725
|
-
import { jsx as
|
|
16775
|
+
import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
16726
16776
|
|
|
16727
16777
|
// src/components/FormBlock/StyledFormBlock.tsx
|
|
16728
16778
|
import { useState as useState28, useEffect as useEffect21, useId, useRef as useRef23 } from "react";
|
|
@@ -16967,7 +17017,7 @@ function applyFieldOrder(cols, design) {
|
|
|
16967
17017
|
}
|
|
16968
17018
|
|
|
16969
17019
|
// src/components/FormBlock/StyledFormBlock.tsx
|
|
16970
|
-
import { jsx as
|
|
17020
|
+
import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
16971
17021
|
var SYSTEM_FIELDS = ["_id", "id", "createdAt", "updatedAt", "orgId", "tableId"];
|
|
16972
17022
|
function StyledFormBlock({
|
|
16973
17023
|
settings: schema,
|
|
@@ -17336,30 +17386,30 @@ function StyledFormBlock({
|
|
|
17336
17386
|
}
|
|
17337
17387
|
`;
|
|
17338
17388
|
if (isLoadingSchema) {
|
|
17339
|
-
return /* @__PURE__ */
|
|
17340
|
-
/* @__PURE__ */
|
|
17341
|
-
/* @__PURE__ */
|
|
17389
|
+
return /* @__PURE__ */ jsxs34("div", { className: "p-8 flex items-center justify-center gap-2 text-slate-500", dir: "rtl", children: [
|
|
17390
|
+
/* @__PURE__ */ jsx40(Loader210, { className: "w-5 h-5 animate-spin", style: { color: d.primary } }),
|
|
17391
|
+
/* @__PURE__ */ jsx40("span", { className: "text-sm", children: "\u05D8\u05D5\u05E2\u05DF \u05E9\u05D3\u05D5\u05EA \u05D8\u05D5\u05E4\u05E1..." })
|
|
17342
17392
|
] });
|
|
17343
17393
|
}
|
|
17344
17394
|
if (!formColumns || formColumns.length === 0) {
|
|
17345
|
-
return /* @__PURE__ */
|
|
17395
|
+
return /* @__PURE__ */ jsx40("div", { className: "p-4 text-center text-slate-500", children: "\u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8\u05D5 \u05E9\u05D3\u05D5\u05EA \u05DC\u05D8\u05D5\u05E4\u05E1 \u05D6\u05D4." });
|
|
17346
17396
|
}
|
|
17347
17397
|
const logoJustify = d.logoAlign === "center" ? "center" : d.logoAlign === "end" ? "flex-end" : "flex-start";
|
|
17348
|
-
const headerBlock = (schema == null ? void 0 : schema.title) || d.subtitle || d.logoUrl ? /* @__PURE__ */
|
|
17398
|
+
const headerBlock = (schema == null ? void 0 : schema.title) || d.subtitle || d.logoUrl ? /* @__PURE__ */ jsxs34(
|
|
17349
17399
|
"div",
|
|
17350
17400
|
{
|
|
17351
17401
|
style: t.headerBand ? { background: d.primary, color: "#ffffff", padding: `${t.padding * 0.8}px ${t.padding}px` } : { marginBottom: t.gap + 4 },
|
|
17352
17402
|
children: [
|
|
17353
|
-
d.logoUrl && /* @__PURE__ */
|
|
17354
|
-
(schema == null ? void 0 : schema.title) && /* @__PURE__ */
|
|
17355
|
-
d.subtitle && /* @__PURE__ */
|
|
17403
|
+
d.logoUrl && /* @__PURE__ */ jsx40("div", { style: { display: "flex", justifyContent: logoJustify, marginBottom: (schema == null ? void 0 : schema.title) || d.subtitle ? 12 : 0 }, children: /* @__PURE__ */ jsx40("img", { src: d.logoUrl, alt: "", style: { height: d.logoHeight, maxWidth: "100%", objectFit: "contain", display: "block" } }) }),
|
|
17404
|
+
(schema == null ? void 0 : schema.title) && /* @__PURE__ */ jsx40("h2", { style: __spreadValues({ fontSize: t.titleSize, fontWeight: 800, margin: 0 }, d.titleColor ? { color: d.titleColor } : {}), children: schema.title }),
|
|
17405
|
+
d.subtitle && /* @__PURE__ */ jsx40("p", { style: { fontSize: 14, margin: "6px 0 0", color: t.headerBand ? "rgba(255,255,255,0.9)" : muted }, children: d.subtitle })
|
|
17356
17406
|
]
|
|
17357
17407
|
}
|
|
17358
17408
|
) : null;
|
|
17359
17409
|
if (isSubmitted) {
|
|
17360
17410
|
const customMessage = (schema == null ? void 0 : schema.successMessage) || "\u05EA\u05D5\u05D3\u05D4 \u05E8\u05D1\u05D4! \u05D4\u05E4\u05E8\u05D8\u05D9\u05DD \u05D4\u05EA\u05E7\u05D1\u05DC\u05D5 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4.";
|
|
17361
|
-
return /* @__PURE__ */
|
|
17362
|
-
/* @__PURE__ */
|
|
17411
|
+
return /* @__PURE__ */ jsxs34("div", { id: componentId, dir: "rtl", className, style: __spreadProps(__spreadValues({}, cardStyle), { padding: t.padding || 24, textAlign: "center" }), children: [
|
|
17412
|
+
/* @__PURE__ */ jsx40(
|
|
17363
17413
|
"div",
|
|
17364
17414
|
{
|
|
17365
17415
|
style: {
|
|
@@ -17373,12 +17423,12 @@ function StyledFormBlock({
|
|
|
17373
17423
|
background: t.invertText ? "rgba(255,255,255,0.2)" : "#ecfdf5",
|
|
17374
17424
|
color: t.invertText ? "#ffffff" : "#059669"
|
|
17375
17425
|
},
|
|
17376
|
-
children: /* @__PURE__ */
|
|
17426
|
+
children: /* @__PURE__ */ jsx40(CheckCircle26, { className: "w-8 h-8" })
|
|
17377
17427
|
}
|
|
17378
17428
|
),
|
|
17379
|
-
/* @__PURE__ */
|
|
17380
|
-
/* @__PURE__ */
|
|
17381
|
-
submitMode !== "update" && /* @__PURE__ */
|
|
17429
|
+
/* @__PURE__ */ jsx40("h3", { style: { fontSize: 24, fontWeight: 800, margin: "0 0 8px" }, children: "\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4" }),
|
|
17430
|
+
/* @__PURE__ */ jsx40("p", { style: { fontSize: 16, color: muted, maxWidth: 420, margin: "0 auto", whiteSpace: "pre-wrap" }, children: customMessage }),
|
|
17431
|
+
submitMode !== "update" && /* @__PURE__ */ jsx40(
|
|
17382
17432
|
"button",
|
|
17383
17433
|
{
|
|
17384
17434
|
type: "button",
|
|
@@ -17390,11 +17440,11 @@ function StyledFormBlock({
|
|
|
17390
17440
|
] });
|
|
17391
17441
|
}
|
|
17392
17442
|
const justify = d.buttonAlign === "center" ? "center" : d.buttonAlign === "end" ? "flex-end" : d.buttonAlign === "full" ? "stretch" : "flex-start";
|
|
17393
|
-
return /* @__PURE__ */
|
|
17394
|
-
/* @__PURE__ */
|
|
17443
|
+
return /* @__PURE__ */ jsxs34("div", { id: componentId, dir: "rtl", className: `${uid} ${className}`, style: cardStyle, children: [
|
|
17444
|
+
/* @__PURE__ */ jsx40("style", { children: css }),
|
|
17395
17445
|
headerBlock,
|
|
17396
|
-
/* @__PURE__ */
|
|
17397
|
-
/* @__PURE__ */
|
|
17446
|
+
/* @__PURE__ */ jsx40("div", { style: t.headerBand ? { padding: t.padding } : void 0, children: /* @__PURE__ */ jsxs34("form", { onSubmit: handleSubmit, children: [
|
|
17447
|
+
/* @__PURE__ */ jsx40("div", { className: "fdz-grid", ref: gridRef, children: (() => {
|
|
17398
17448
|
const spanOf = (col) => {
|
|
17399
17449
|
var _a;
|
|
17400
17450
|
if (resizing && resizing.name === col.name) return resizing.span;
|
|
@@ -17412,7 +17462,7 @@ function StyledFormBlock({
|
|
|
17412
17462
|
const fieldHeight = resizing && resizing.name === col.name ? resizing.height : (_e = (_d = design == null ? void 0 : design.fields) == null ? void 0 : _d[col.name]) == null ? void 0 : _e.height;
|
|
17413
17463
|
const useTextarea = !!fieldHeight && fieldHeight > 56 && InputComponent === FORM_INPUTS.DEFAULT;
|
|
17414
17464
|
const boxStyle = __spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({}, isBoolean ? booleanBoxStyle : inputBoxStyle), fieldHeight && !isBoolean ? __spreadValues({ minHeight: fieldHeight }, useTextarea ? { height: fieldHeight } : {}) : {}), canReorder ? { pointerEvents: "none" } : {}), missingNames.includes(col.name) ? t.inputStyle === "underline" ? { borderBottom: "2px solid #f43f5e" } : { border: "1px solid #f43f5e", boxShadow: "0 0 0 3px rgba(244,63,94,0.15)" } : {}), locked ? { background: t.inputStyle === "underline" ? "transparent" : "#f1f5f9", opacity: 0.85, cursor: "not-allowed" } : {});
|
|
17415
|
-
return /* @__PURE__ */
|
|
17465
|
+
return /* @__PURE__ */ jsxs34(
|
|
17416
17466
|
"div",
|
|
17417
17467
|
{
|
|
17418
17468
|
"data-fdz-field": col.name,
|
|
@@ -17436,13 +17486,13 @@ function StyledFormBlock({
|
|
|
17436
17486
|
borderRadius: 6
|
|
17437
17487
|
} : {}),
|
|
17438
17488
|
children: [
|
|
17439
|
-
/* @__PURE__ */
|
|
17489
|
+
/* @__PURE__ */ jsxs34("label", { style: { fontSize: t.labelSize, fontWeight: 600, color: d.text }, children: [
|
|
17440
17490
|
col.name,
|
|
17441
17491
|
" ",
|
|
17442
|
-
isFieldRequired(col, design) && !locked && /* @__PURE__ */
|
|
17443
|
-
locked && /* @__PURE__ */
|
|
17492
|
+
isFieldRequired(col, design) && !locked && /* @__PURE__ */ jsx40("span", { style: { color: t.invertText ? "#fecdd3" : "#f43f5e" }, children: "*" }),
|
|
17493
|
+
locked && /* @__PURE__ */ jsx40("span", { style: { fontSize: 11, fontWeight: 400, opacity: 0.7 }, children: "(\u05DC\u05D0 \u05E0\u05D9\u05EA\u05DF \u05DC\u05E2\u05E8\u05D9\u05DB\u05D4)" })
|
|
17444
17494
|
] }),
|
|
17445
|
-
/* @__PURE__ */
|
|
17495
|
+
/* @__PURE__ */ jsx40("div", { "data-fdz-box": true, style: boxStyle, children: useTextarea ? /* @__PURE__ */ jsx40(
|
|
17446
17496
|
"textarea",
|
|
17447
17497
|
{
|
|
17448
17498
|
value: shownValue,
|
|
@@ -17462,7 +17512,7 @@ function StyledFormBlock({
|
|
|
17462
17512
|
boxSizing: "border-box"
|
|
17463
17513
|
}
|
|
17464
17514
|
}
|
|
17465
|
-
) : /* @__PURE__ */
|
|
17515
|
+
) : /* @__PURE__ */ jsx40(
|
|
17466
17516
|
InputComponent,
|
|
17467
17517
|
{
|
|
17468
17518
|
column: col,
|
|
@@ -17473,7 +17523,7 @@ function StyledFormBlock({
|
|
|
17473
17523
|
context: { executeAction: previewMode ? void 0 : executeAction, tableId: targetTableId, relationDictionaryRef: relationDictRef, orgId: schema == null ? void 0 : schema.orgId }
|
|
17474
17524
|
}
|
|
17475
17525
|
) }),
|
|
17476
|
-
canReorder && dragName && drop && drop.name === col.name && /* @__PURE__ */
|
|
17526
|
+
canReorder && dragName && drop && drop.name === col.name && /* @__PURE__ */ jsx40(
|
|
17477
17527
|
"div",
|
|
17478
17528
|
{
|
|
17479
17529
|
style: __spreadValues({
|
|
@@ -17488,7 +17538,7 @@ function StyledFormBlock({
|
|
|
17488
17538
|
}, drop.side === "before" ? { insetInlineStart: -(t.gap / 2) - 2 } : { insetInlineEnd: -(t.gap / 2) - 2 })
|
|
17489
17539
|
}
|
|
17490
17540
|
),
|
|
17491
|
-
onFieldResize && !isBoolean && /* @__PURE__ */
|
|
17541
|
+
onFieldResize && !isBoolean && /* @__PURE__ */ jsx40(
|
|
17492
17542
|
"div",
|
|
17493
17543
|
{
|
|
17494
17544
|
onMouseDown: (e) => e.stopPropagation(),
|
|
@@ -17518,7 +17568,7 @@ function StyledFormBlock({
|
|
|
17518
17568
|
};
|
|
17519
17569
|
return formColumns.map((col) => renderField(col));
|
|
17520
17570
|
})() }),
|
|
17521
|
-
formError && /* @__PURE__ */
|
|
17571
|
+
formError && /* @__PURE__ */ jsx40(
|
|
17522
17572
|
"div",
|
|
17523
17573
|
{
|
|
17524
17574
|
ref: errorRef,
|
|
@@ -17537,7 +17587,7 @@ function StyledFormBlock({
|
|
|
17537
17587
|
children: formError
|
|
17538
17588
|
}
|
|
17539
17589
|
),
|
|
17540
|
-
/* @__PURE__ */
|
|
17590
|
+
/* @__PURE__ */ jsx40(
|
|
17541
17591
|
"div",
|
|
17542
17592
|
{
|
|
17543
17593
|
style: {
|
|
@@ -17547,7 +17597,7 @@ function StyledFormBlock({
|
|
|
17547
17597
|
display: "flex",
|
|
17548
17598
|
justifyContent: justify
|
|
17549
17599
|
},
|
|
17550
|
-
children: /* @__PURE__ */
|
|
17600
|
+
children: /* @__PURE__ */ jsxs34(
|
|
17551
17601
|
"button",
|
|
17552
17602
|
{
|
|
17553
17603
|
type: "submit",
|
|
@@ -17570,8 +17620,8 @@ function StyledFormBlock({
|
|
|
17570
17620
|
opacity: isSubmitting ? 0.5 : 1
|
|
17571
17621
|
},
|
|
17572
17622
|
children: [
|
|
17573
|
-
isSubmitting && /* @__PURE__ */
|
|
17574
|
-
/* @__PURE__ */
|
|
17623
|
+
isSubmitting && /* @__PURE__ */ jsx40(Loader210, { className: "w-4 h-4 animate-spin" }),
|
|
17624
|
+
/* @__PURE__ */ jsx40("span", { children: isSubmitting ? "\u05E9\u05D5\u05DE\u05E8..." : d.buttonText })
|
|
17575
17625
|
]
|
|
17576
17626
|
}
|
|
17577
17627
|
)
|
|
@@ -17583,7 +17633,7 @@ function StyledFormBlock({
|
|
|
17583
17633
|
|
|
17584
17634
|
// src/themes/ThemeScope.tsx
|
|
17585
17635
|
import * as React29 from "react";
|
|
17586
|
-
import { jsx as
|
|
17636
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
17587
17637
|
var UNIVERSE_THEME_IDS = ["classic", "clean", "ocean", "warm"];
|
|
17588
17638
|
function resolveUniverseTheme(value) {
|
|
17589
17639
|
return typeof value === "string" && UNIVERSE_THEME_IDS.includes(value) ? value : "classic";
|
|
@@ -17593,7 +17643,7 @@ function withThemeScope(Component) {
|
|
|
17593
17643
|
var _a, _b, _c;
|
|
17594
17644
|
const p = props;
|
|
17595
17645
|
const theme = resolveUniverseTheme((_c = (_a = p.settings) == null ? void 0 : _a.theme) != null ? _c : (_b = p.config) == null ? void 0 : _b.theme);
|
|
17596
|
-
return /* @__PURE__ */
|
|
17646
|
+
return /* @__PURE__ */ jsx41("div", { "data-theme": theme, style: { display: "contents" }, children: React29.createElement(Component, props) });
|
|
17597
17647
|
}
|
|
17598
17648
|
ThemeScoped.displayName = `ThemeScoped(${Component.displayName || Component.name || "Component"})`;
|
|
17599
17649
|
return ThemeScoped;
|