@universe-platform/ui 0.1.0-beta.30 → 0.1.0-beta.31
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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1304 -1052
- package/dist/index.mjs +894 -649
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -177,7 +177,8 @@ var COLUMN_TYPES = [
|
|
|
177
177
|
"LINK",
|
|
178
178
|
"SUB_TABLE",
|
|
179
179
|
"PHONE",
|
|
180
|
-
"GOOGLE_CONTACT"
|
|
180
|
+
"GOOGLE_CONTACT",
|
|
181
|
+
"FORMULA"
|
|
181
182
|
];
|
|
182
183
|
var TEXT_REPRESENTABLE_TYPES = [
|
|
183
184
|
"STRING",
|
|
@@ -203,7 +204,8 @@ var COLUMN_CAPABILITIES = {
|
|
|
203
204
|
LINK: { supportsDefault: false, supportsUnique: false, supportsRequired: true },
|
|
204
205
|
SUB_TABLE: { supportsDefault: false, supportsUnique: false, supportsRequired: false },
|
|
205
206
|
PHONE: { supportsDefault: false, supportsUnique: true, supportsRequired: true },
|
|
206
|
-
GOOGLE_CONTACT: { supportsDefault: false, supportsUnique: false, supportsRequired: false }
|
|
207
|
+
GOOGLE_CONTACT: { supportsDefault: false, supportsUnique: false, supportsRequired: false },
|
|
208
|
+
FORMULA: { supportsDefault: false, supportsUnique: false, supportsRequired: false }
|
|
207
209
|
};
|
|
208
210
|
var COLUMN_TYPE_LABELS = {
|
|
209
211
|
STRING: "\u05D8\u05E7\u05E1\u05D8 (STRING)",
|
|
@@ -217,7 +219,8 @@ var COLUMN_TYPE_LABELS = {
|
|
|
217
219
|
LINK: "\u05E7\u05D9\u05E9\u05D5\u05E8 (LINK)",
|
|
218
220
|
SUB_TABLE: "\u05EA\u05EA-\u05D8\u05D1\u05DC\u05D4 (SUB_TABLE)",
|
|
219
221
|
PHONE: "\u05D8\u05DC\u05E4\u05D5\u05DF (PHONE)",
|
|
220
|
-
GOOGLE_CONTACT: "\u05D0\u05D9\u05E9 \u05E7\u05E9\u05E8 \u05D2\u05D5\u05D2\u05DC (GOOGLE_CONTACT)"
|
|
222
|
+
GOOGLE_CONTACT: "\u05D0\u05D9\u05E9 \u05E7\u05E9\u05E8 \u05D2\u05D5\u05D2\u05DC (GOOGLE_CONTACT)",
|
|
223
|
+
FORMULA: "\u05E0\u05D5\u05E1\u05D7\u05D4 (FORMULA)"
|
|
221
224
|
};
|
|
222
225
|
var COLUMN_DEFAULT_INPUT_CONFIG = {
|
|
223
226
|
STRING: { inputType: "text", placeholder: "\u05D4\u05E9\u05D0\u05E8 \u05E8\u05D9\u05E7 \u05D0\u05DD \u05D0\u05D9\u05DF" },
|
|
@@ -231,7 +234,8 @@ var COLUMN_DEFAULT_INPUT_CONFIG = {
|
|
|
231
234
|
LINK: { inputType: "text" },
|
|
232
235
|
SUB_TABLE: { inputType: "text" },
|
|
233
236
|
PHONE: { inputType: "tel" },
|
|
234
|
-
GOOGLE_CONTACT: { inputType: "text" }
|
|
237
|
+
GOOGLE_CONTACT: { inputType: "text" },
|
|
238
|
+
FORMULA: { inputType: "text" }
|
|
235
239
|
};
|
|
236
240
|
|
|
237
241
|
// ../shared/src/whatsappValidation.ts
|
|
@@ -704,6 +708,212 @@ function formatFileSize(bytes) {
|
|
|
704
708
|
return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + " " + sizes[i];
|
|
705
709
|
}
|
|
706
710
|
|
|
711
|
+
// ../shared/src/formula.ts
|
|
712
|
+
var FORMULA_COLUMN_TYPE = "FORMULA";
|
|
713
|
+
var FORMULA_SOURCE_TYPES = ["NUMBER", "CURRENCY", "STRING"];
|
|
714
|
+
function extractFormulaFields(expr) {
|
|
715
|
+
const out = /* @__PURE__ */ new Set();
|
|
716
|
+
for (const m of (expr || "").matchAll(/\{([^{}]+)\}/g)) out.add(m[1].trim());
|
|
717
|
+
return [...out];
|
|
718
|
+
}
|
|
719
|
+
function tokenize(src) {
|
|
720
|
+
const toks = [];
|
|
721
|
+
let i = 0;
|
|
722
|
+
while (i < src.length) {
|
|
723
|
+
const c = src[i];
|
|
724
|
+
if (/\s/.test(c)) {
|
|
725
|
+
i++;
|
|
726
|
+
continue;
|
|
727
|
+
}
|
|
728
|
+
if (c === "{") {
|
|
729
|
+
const end = src.indexOf("}", i);
|
|
730
|
+
if (end === -1) throw new Error("\u05D7\u05E1\u05E8 } \u05D1\u05E0\u05D5\u05E1\u05D7\u05D4");
|
|
731
|
+
toks.push({ k: "field", v: src.slice(i + 1, end).trim() });
|
|
732
|
+
i = end + 1;
|
|
733
|
+
continue;
|
|
734
|
+
}
|
|
735
|
+
if (c === '"') {
|
|
736
|
+
const end = src.indexOf('"', i + 1);
|
|
737
|
+
if (end === -1) throw new Error('\u05D7\u05E1\u05E8 " \u05D1\u05E0\u05D5\u05E1\u05D7\u05D4');
|
|
738
|
+
toks.push({ k: "str", v: src.slice(i + 1, end) });
|
|
739
|
+
i = end + 1;
|
|
740
|
+
continue;
|
|
741
|
+
}
|
|
742
|
+
const rest = src.slice(i);
|
|
743
|
+
const num = /^\d+(\.\d+)?/.exec(rest);
|
|
744
|
+
if (num) {
|
|
745
|
+
toks.push({ k: "num", v: num[0] });
|
|
746
|
+
i += num[0].length;
|
|
747
|
+
continue;
|
|
748
|
+
}
|
|
749
|
+
const id = /^[A-Za-z_]+/.exec(rest);
|
|
750
|
+
if (id) {
|
|
751
|
+
toks.push({ k: "id", v: id[0].toUpperCase() });
|
|
752
|
+
i += id[0].length;
|
|
753
|
+
continue;
|
|
754
|
+
}
|
|
755
|
+
const op = /^(>=|<=|<>|[-+*/%(),<>=&])/.exec(rest);
|
|
756
|
+
if (op) {
|
|
757
|
+
toks.push({ k: "op", v: op[0] });
|
|
758
|
+
i += op[0].length;
|
|
759
|
+
continue;
|
|
760
|
+
}
|
|
761
|
+
throw new Error(`\u05EA\u05D5 \u05DC\u05D0 \u05DE\u05D5\u05DB\u05E8 \u05D1\u05E0\u05D5\u05E1\u05D7\u05D4: ${c}`);
|
|
762
|
+
}
|
|
763
|
+
return toks;
|
|
764
|
+
}
|
|
765
|
+
var toNum = (x) => {
|
|
766
|
+
if (x === null || x === "") return 0;
|
|
767
|
+
const n = typeof x === "number" ? x : Number(x);
|
|
768
|
+
return Number.isFinite(n) ? n : NaN;
|
|
769
|
+
};
|
|
770
|
+
function evaluateFormula(expr, getField) {
|
|
771
|
+
const toks = tokenize(expr);
|
|
772
|
+
let p = 0;
|
|
773
|
+
const isOp = (...vs) => {
|
|
774
|
+
var _a;
|
|
775
|
+
return ((_a = toks[p]) == null ? void 0 : _a.k) === "op" && vs.includes(toks[p].v);
|
|
776
|
+
};
|
|
777
|
+
const eat = (v) => {
|
|
778
|
+
const t = toks[p];
|
|
779
|
+
if (!t || v !== void 0 && t.v !== v) throw new Error("\u05E0\u05D5\u05E1\u05D7\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4");
|
|
780
|
+
p++;
|
|
781
|
+
return t;
|
|
782
|
+
};
|
|
783
|
+
function parseExpr() {
|
|
784
|
+
let l = parseConcat();
|
|
785
|
+
while (isOp(">", "<", ">=", "<=", "=", "<>")) {
|
|
786
|
+
const op = eat().v, r = parseConcat();
|
|
787
|
+
const a = toNum(l), b = toNum(r);
|
|
788
|
+
l = (op === ">" ? a > b : op === "<" ? a < b : op === ">=" ? a >= b : op === "<=" ? a <= b : op === "=" ? a === b : a !== b) ? 1 : 0;
|
|
789
|
+
}
|
|
790
|
+
return l;
|
|
791
|
+
}
|
|
792
|
+
function parseConcat() {
|
|
793
|
+
let l = parseAdd();
|
|
794
|
+
while (isOp("&")) {
|
|
795
|
+
eat();
|
|
796
|
+
const r = parseAdd();
|
|
797
|
+
l = `${l != null ? l : ""}${r != null ? r : ""}`;
|
|
798
|
+
}
|
|
799
|
+
return l;
|
|
800
|
+
}
|
|
801
|
+
function parseAdd() {
|
|
802
|
+
let l = parseMul();
|
|
803
|
+
while (isOp("+", "-")) {
|
|
804
|
+
const op = eat().v, r = parseMul();
|
|
805
|
+
l = op === "+" ? toNum(l) + toNum(r) : toNum(l) - toNum(r);
|
|
806
|
+
}
|
|
807
|
+
return l;
|
|
808
|
+
}
|
|
809
|
+
function parseMul() {
|
|
810
|
+
let l = parseUnary();
|
|
811
|
+
while (isOp("*", "/", "%")) {
|
|
812
|
+
const op = eat().v, r = parseUnary();
|
|
813
|
+
const a = toNum(l), b = toNum(r);
|
|
814
|
+
l = op === "*" ? a * b : op === "/" ? a / b : a % b;
|
|
815
|
+
}
|
|
816
|
+
return l;
|
|
817
|
+
}
|
|
818
|
+
function parseUnary() {
|
|
819
|
+
if (isOp("-")) {
|
|
820
|
+
eat();
|
|
821
|
+
return -toNum(parseUnary());
|
|
822
|
+
}
|
|
823
|
+
return parsePrimary();
|
|
824
|
+
}
|
|
825
|
+
function parsePrimary() {
|
|
826
|
+
var _a, _b, _c;
|
|
827
|
+
const t = toks[p];
|
|
828
|
+
if (!t) throw new Error("\u05E0\u05D5\u05E1\u05D7\u05D4 \u05DC\u05D0 \u05E9\u05DC\u05DE\u05D4");
|
|
829
|
+
if (t.k === "num") {
|
|
830
|
+
p++;
|
|
831
|
+
return Number(t.v);
|
|
832
|
+
}
|
|
833
|
+
if (t.k === "str") {
|
|
834
|
+
p++;
|
|
835
|
+
return t.v;
|
|
836
|
+
}
|
|
837
|
+
if (t.k === "field") {
|
|
838
|
+
p++;
|
|
839
|
+
const v = getField(t.v);
|
|
840
|
+
return v === void 0 || v === null ? null : v;
|
|
841
|
+
}
|
|
842
|
+
if (isOp("(")) {
|
|
843
|
+
eat();
|
|
844
|
+
const v = parseExpr();
|
|
845
|
+
eat(")");
|
|
846
|
+
return v;
|
|
847
|
+
}
|
|
848
|
+
if (t.k === "id") {
|
|
849
|
+
p++;
|
|
850
|
+
eat("(");
|
|
851
|
+
const args = [];
|
|
852
|
+
if (!isOp(")")) {
|
|
853
|
+
args.push(parseExpr());
|
|
854
|
+
while (isOp(",")) {
|
|
855
|
+
eat();
|
|
856
|
+
args.push(parseExpr());
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
eat(")");
|
|
860
|
+
const n = args.map(toNum);
|
|
861
|
+
switch (t.v) {
|
|
862
|
+
case "ROUND": {
|
|
863
|
+
const f = 10 ** ((_a = n[1]) != null ? _a : 0);
|
|
864
|
+
return Math.round(n[0] * f) / f;
|
|
865
|
+
}
|
|
866
|
+
case "MIN":
|
|
867
|
+
return Math.min(...n);
|
|
868
|
+
case "MAX":
|
|
869
|
+
return Math.max(...n);
|
|
870
|
+
case "ABS":
|
|
871
|
+
return Math.abs(n[0]);
|
|
872
|
+
case "IF":
|
|
873
|
+
return toNum(args[0]) ? (_b = args[1]) != null ? _b : null : (_c = args[2]) != null ? _c : null;
|
|
874
|
+
default:
|
|
875
|
+
throw new Error(`\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4 \u05DC\u05D0 \u05DE\u05D5\u05DB\u05E8\u05EA: ${t.v}`);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
throw new Error("\u05E0\u05D5\u05E1\u05D7\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4");
|
|
879
|
+
}
|
|
880
|
+
const result = parseExpr();
|
|
881
|
+
if (p < toks.length) throw new Error("\u05E0\u05D5\u05E1\u05D7\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4");
|
|
882
|
+
return typeof result === "number" && !Number.isFinite(result) ? null : result;
|
|
883
|
+
}
|
|
884
|
+
function validateFormula(expr, availableFields) {
|
|
885
|
+
if (!expr || !expr.trim()) return "\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D4\u05D6\u05D9\u05DF \u05E0\u05D5\u05E1\u05D7\u05D4";
|
|
886
|
+
try {
|
|
887
|
+
for (const f of extractFormulaFields(expr)) {
|
|
888
|
+
if (!availableFields.includes(f)) return `\u05D4\u05E9\u05D3\u05D4 "${f}" \u05DC\u05D0 \u05E7\u05D9\u05D9\u05DD \u05D0\u05D5 \u05E9\u05D0\u05D9 \u05D0\u05E4\u05E9\u05E8 \u05DC\u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05D5 \u05D1\u05E0\u05D5\u05E1\u05D7\u05D4`;
|
|
889
|
+
}
|
|
890
|
+
evaluateFormula(expr, () => 1);
|
|
891
|
+
return null;
|
|
892
|
+
} catch (e) {
|
|
893
|
+
return (e == null ? void 0 : e.message) || "\u05E0\u05D5\u05E1\u05D7\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05E0\u05D4";
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
function computeFormulaValue(col, rowData) {
|
|
897
|
+
var _a;
|
|
898
|
+
const f = (_a = col.config) == null ? void 0 : _a.formula;
|
|
899
|
+
if (!(f == null ? void 0 : f.expression)) return null;
|
|
900
|
+
try {
|
|
901
|
+
const v = evaluateFormula(f.expression, (n) => rowData == null ? void 0 : rowData[n]);
|
|
902
|
+
if (v === null) return null;
|
|
903
|
+
if (f.resultType === "STRING") return String(v);
|
|
904
|
+
const num = toNum(v);
|
|
905
|
+
return Number.isFinite(num) ? num : null;
|
|
906
|
+
} catch (e) {
|
|
907
|
+
return null;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
function applyFormulaColumns(data, columns) {
|
|
911
|
+
for (const col of columns || []) {
|
|
912
|
+
if (col.type === FORMULA_COLUMN_TYPE) data[col.name] = computeFormulaValue(col, data);
|
|
913
|
+
}
|
|
914
|
+
return data;
|
|
915
|
+
}
|
|
916
|
+
|
|
707
917
|
// src/components/TableBlock/TableBlockClient.tsx
|
|
708
918
|
import React12, { useState as useState13, useMemo as useMemo6, useEffect as useEffect11, useCallback as useCallback11, useRef as useRef10 } from "react";
|
|
709
919
|
|
|
@@ -3333,8 +3543,35 @@ function RelationPickerCell({
|
|
|
3333
3543
|
);
|
|
3334
3544
|
}
|
|
3335
3545
|
|
|
3546
|
+
// src/components/TableBlock/fields/FormulaCell.tsx
|
|
3547
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
3548
|
+
var SYMBOLS = { USD: "$", EUR: "\u20AC", ILS: "\u20AA", GBP: "\xA3" };
|
|
3549
|
+
function formatFormulaValue(value, column) {
|
|
3550
|
+
var _a;
|
|
3551
|
+
if (value === null || value === void 0 || value === "") return "";
|
|
3552
|
+
const f = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.formula;
|
|
3553
|
+
if (typeof value === "number") {
|
|
3554
|
+
const text = new Intl.NumberFormat("en-US", { maximumFractionDigits: 6 }).format(value);
|
|
3555
|
+
if ((f == null ? void 0 : f.resultType) === "CURRENCY") {
|
|
3556
|
+
const code = f.currencySymbol;
|
|
3557
|
+
const s = code ? SYMBOLS[code.toUpperCase()] || code : "";
|
|
3558
|
+
return s ? `${s} ${text}` : text;
|
|
3559
|
+
}
|
|
3560
|
+
return text;
|
|
3561
|
+
}
|
|
3562
|
+
return String(value);
|
|
3563
|
+
}
|
|
3564
|
+
var FormulaDisplay = ({ value, column }) => {
|
|
3565
|
+
const text = formatFormulaValue(value, column);
|
|
3566
|
+
return /* @__PURE__ */ jsx8(SmartTextCell, { value: text, tooltipText: text, readOnly: true });
|
|
3567
|
+
};
|
|
3568
|
+
var FormulaInputRenderer = ({ value, column, context }) => {
|
|
3569
|
+
const live = (context == null ? void 0 : context.rowData) ? computeFormulaValue(column, context.rowData) : value;
|
|
3570
|
+
return /* @__PURE__ */ jsx8(FormulaDisplay, { value: live, column });
|
|
3571
|
+
};
|
|
3572
|
+
|
|
3336
3573
|
// src/components/TableBlock/fields/fieldRegistry.tsx
|
|
3337
|
-
import { jsx as
|
|
3574
|
+
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3338
3575
|
var CURRENCY_SYMBOLS = {
|
|
3339
3576
|
USD: "$",
|
|
3340
3577
|
EUR: "\u20AC",
|
|
@@ -3346,7 +3583,8 @@ function getCurrencySymbol(code) {
|
|
|
3346
3583
|
return CURRENCY_SYMBOLS[code.toUpperCase()] || code;
|
|
3347
3584
|
}
|
|
3348
3585
|
var FORM_INPUTS = {
|
|
3349
|
-
|
|
3586
|
+
FORMULA: FormulaInputRenderer,
|
|
3587
|
+
DATE: ({ value, onChange, column, readOnly }) => /* @__PURE__ */ jsx9(DatePickerCell, { value, onChange, column, readOnly }),
|
|
3350
3588
|
CURRENCY: ({ value, column, onChange, readOnly }) => {
|
|
3351
3589
|
var _a;
|
|
3352
3590
|
const symbol = getCurrencySymbol((_a = column.config) == null ? void 0 : _a.currencySymbol);
|
|
@@ -3355,7 +3593,7 @@ var FORM_INPUTS = {
|
|
|
3355
3593
|
const formattedValue = value !== null && value !== void 0 && !isNaN(num) ? new Intl.NumberFormat("en-US").format(num) : "";
|
|
3356
3594
|
const fullText = formattedValue ? symbol ? `${symbol} ${formattedValue}` : formattedValue : "";
|
|
3357
3595
|
if (readOnly) {
|
|
3358
|
-
return /* @__PURE__ */
|
|
3596
|
+
return /* @__PURE__ */ jsx9(
|
|
3359
3597
|
SmartTextCell,
|
|
3360
3598
|
{
|
|
3361
3599
|
value: fullText,
|
|
@@ -3365,14 +3603,14 @@ var FORM_INPUTS = {
|
|
|
3365
3603
|
);
|
|
3366
3604
|
}
|
|
3367
3605
|
const displayValue = !isFocused && value !== void 0 && value !== null && !isNaN(Number(value)) ? new Intl.NumberFormat("en-US").format(Number(value)) : value !== void 0 && value !== null ? value : "";
|
|
3368
|
-
return /* @__PURE__ */
|
|
3606
|
+
return /* @__PURE__ */ jsx9(
|
|
3369
3607
|
SmartTextCell,
|
|
3370
3608
|
{
|
|
3371
3609
|
value: displayValue,
|
|
3372
3610
|
tooltipText: fullText || String(displayValue),
|
|
3373
3611
|
type: isFocused ? "number" : "text",
|
|
3374
3612
|
step: "any",
|
|
3375
|
-
prefix: symbol ? /* @__PURE__ */
|
|
3613
|
+
prefix: symbol ? /* @__PURE__ */ jsx9("span", { className: "text-slate-400 pl-2 shrink-0 text-sm select-none pointer-events-none", children: symbol }) : void 0,
|
|
3376
3614
|
className: symbol ? "pl-1 pr-2" : "px-2",
|
|
3377
3615
|
onFocus: () => setIsFocused(true),
|
|
3378
3616
|
onBlur: () => setIsFocused(false),
|
|
@@ -3382,9 +3620,9 @@ var FORM_INPUTS = {
|
|
|
3382
3620
|
}
|
|
3383
3621
|
);
|
|
3384
3622
|
},
|
|
3385
|
-
TIME: ({ value, onChange, column, readOnly }) => /* @__PURE__ */
|
|
3386
|
-
LINK: ({ value, onChange, column, readOnly }) => /* @__PURE__ */
|
|
3387
|
-
BOOLEAN: ({ value, onChange, readOnly }) => /* @__PURE__ */
|
|
3623
|
+
TIME: ({ value, onChange, column, readOnly }) => /* @__PURE__ */ jsx9(TimePickerCell, { value, onChange, column, readOnly }),
|
|
3624
|
+
LINK: ({ value, onChange, column, readOnly }) => /* @__PURE__ */ jsx9(LinkPickerCell, { value, onChange, column, readOnly }),
|
|
3625
|
+
BOOLEAN: ({ value, onChange, readOnly }) => /* @__PURE__ */ jsx9("div", { className: "flex items-center justify-center w-full h-full p-2", children: /* @__PURE__ */ jsx9(
|
|
3388
3626
|
"input",
|
|
3389
3627
|
{
|
|
3390
3628
|
type: "checkbox",
|
|
@@ -3394,7 +3632,7 @@ var FORM_INPUTS = {
|
|
|
3394
3632
|
className: `w-4 h-4 rounded border-slate-300 text-brand ${readOnly ? "cursor-not-allowed opacity-70" : "cursor-pointer"}`
|
|
3395
3633
|
}
|
|
3396
3634
|
) }),
|
|
3397
|
-
GOOGLE_DRIVE_FILE: ({ value, onChange, column, rowId, context, readOnly }) => /* @__PURE__ */
|
|
3635
|
+
GOOGLE_DRIVE_FILE: ({ value, onChange, column, rowId, context, readOnly }) => /* @__PURE__ */ jsx9(
|
|
3398
3636
|
DrivePickerCell,
|
|
3399
3637
|
{
|
|
3400
3638
|
value: value || [],
|
|
@@ -3407,7 +3645,7 @@ var FORM_INPUTS = {
|
|
|
3407
3645
|
readOnly
|
|
3408
3646
|
}
|
|
3409
3647
|
),
|
|
3410
|
-
RELATION: ({ value, onChange, column, context, rowId, readOnly }) => /* @__PURE__ */
|
|
3648
|
+
RELATION: ({ value, onChange, column, context, rowId, readOnly }) => /* @__PURE__ */ jsx9(
|
|
3411
3649
|
RelationPickerCell,
|
|
3412
3650
|
{
|
|
3413
3651
|
value,
|
|
@@ -3418,7 +3656,7 @@ var FORM_INPUTS = {
|
|
|
3418
3656
|
readOnly
|
|
3419
3657
|
}
|
|
3420
3658
|
),
|
|
3421
|
-
NUMBER: ({ value, onChange, readOnly }) => /* @__PURE__ */
|
|
3659
|
+
NUMBER: ({ value, onChange, readOnly }) => /* @__PURE__ */ jsx9(
|
|
3422
3660
|
SmartTextCell,
|
|
3423
3661
|
{
|
|
3424
3662
|
value,
|
|
@@ -3431,7 +3669,7 @@ var FORM_INPUTS = {
|
|
|
3431
3669
|
var _a;
|
|
3432
3670
|
const enableWhatsApp = (_a = column == null ? void 0 : column.config) == null ? void 0 : _a.enableWhatsApp;
|
|
3433
3671
|
const formatted = value ? formatPhoneDisplay(String(value)) : "";
|
|
3434
|
-
const whatsAppButton = enableWhatsApp && value ? /* @__PURE__ */
|
|
3672
|
+
const whatsAppButton = enableWhatsApp && value ? /* @__PURE__ */ jsx9(
|
|
3435
3673
|
"button",
|
|
3436
3674
|
{
|
|
3437
3675
|
type: "button",
|
|
@@ -3441,11 +3679,11 @@ var FORM_INPUTS = {
|
|
|
3441
3679
|
e.stopPropagation();
|
|
3442
3680
|
openWhatsAppChat(String(value));
|
|
3443
3681
|
},
|
|
3444
|
-
children: /* @__PURE__ */
|
|
3682
|
+
children: /* @__PURE__ */ jsx9("svg", { className: "w-4 h-4", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx9("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51a5.816 5.816 0 00-.571-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) })
|
|
3445
3683
|
}
|
|
3446
3684
|
) : null;
|
|
3447
3685
|
if (readOnly) {
|
|
3448
|
-
return /* @__PURE__ */
|
|
3686
|
+
return /* @__PURE__ */ jsx9(
|
|
3449
3687
|
SmartTextCell,
|
|
3450
3688
|
{
|
|
3451
3689
|
value: formatted,
|
|
@@ -3456,7 +3694,7 @@ var FORM_INPUTS = {
|
|
|
3456
3694
|
}
|
|
3457
3695
|
);
|
|
3458
3696
|
}
|
|
3459
|
-
return /* @__PURE__ */
|
|
3697
|
+
return /* @__PURE__ */ jsx9(
|
|
3460
3698
|
SmartTextCell,
|
|
3461
3699
|
{
|
|
3462
3700
|
value: value !== void 0 && value !== null ? String(value) : "",
|
|
@@ -3591,23 +3829,23 @@ var FORM_INPUTS = {
|
|
|
3591
3829
|
};
|
|
3592
3830
|
if (value && value.synced && value.url) {
|
|
3593
3831
|
return /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-1.5 h-8 px-2 group whitespace-nowrap overflow-hidden max-w-full", children: [
|
|
3594
|
-
/* @__PURE__ */
|
|
3595
|
-
!readOnly && /* @__PURE__ */
|
|
3832
|
+
/* @__PURE__ */ jsx9("a", { href: value.url, target: "_blank", rel: "noopener noreferrer", className: "text-blue-600 hover:underline flex-1 truncate text-xs whitespace-nowrap", children: "\u05D0\u05D9\u05E9 \u05E7\u05E9\u05E8 \u05D2\u05D5\u05D2\u05DC" }),
|
|
3833
|
+
!readOnly && /* @__PURE__ */ jsx9(
|
|
3596
3834
|
"button",
|
|
3597
3835
|
{
|
|
3598
3836
|
type: "button",
|
|
3599
3837
|
onClick: handleUnlink,
|
|
3600
3838
|
className: "text-slate-400 hover:text-rose-500 opacity-0 group-hover:opacity-100 transition-opacity p-1 shrink-0",
|
|
3601
3839
|
title: "\u05D1\u05D8\u05DC \u05E1\u05E0\u05DB\u05E8\u05D5\u05DF",
|
|
3602
|
-
children: /* @__PURE__ */
|
|
3840
|
+
children: /* @__PURE__ */ jsx9("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx9("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })
|
|
3603
3841
|
}
|
|
3604
3842
|
)
|
|
3605
3843
|
] });
|
|
3606
3844
|
}
|
|
3607
3845
|
if (readOnly) {
|
|
3608
|
-
return /* @__PURE__ */
|
|
3846
|
+
return /* @__PURE__ */ jsx9("span", { className: "px-2 py-1 flex items-center h-full text-slate-300 text-xs italic", children: "\u05DC\u05D0 \u05DE\u05E1\u05D5\u05E0\u05DB\u05E8\u05DF" });
|
|
3609
3847
|
}
|
|
3610
|
-
return /* @__PURE__ */
|
|
3848
|
+
return /* @__PURE__ */ jsx9("div", { className: "flex items-center h-8 px-2 whitespace-nowrap overflow-hidden max-w-full", children: /* @__PURE__ */ jsxs8(
|
|
3611
3849
|
"button",
|
|
3612
3850
|
{
|
|
3613
3851
|
type: "button",
|
|
@@ -3616,15 +3854,15 @@ var FORM_INPUTS = {
|
|
|
3616
3854
|
className: "inline-flex items-center gap-1.5 px-2.5 py-1 bg-blue-50 text-blue-600 hover:bg-blue-100 border border-blue-200 rounded-md text-xs font-medium transition-colors whitespace-nowrap shrink-0 disabled:opacity-50 cursor-pointer max-w-full overflow-hidden",
|
|
3617
3855
|
children: [
|
|
3618
3856
|
isSyncing ? /* @__PURE__ */ jsxs8("svg", { className: "w-3.5 h-3.5 animate-spin shrink-0", viewBox: "0 0 24 24", fill: "none", children: [
|
|
3619
|
-
/* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
] }) : /* @__PURE__ */
|
|
3622
|
-
/* @__PURE__ */
|
|
3857
|
+
/* @__PURE__ */ jsx9("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
|
|
3858
|
+
/* @__PURE__ */ jsx9("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })
|
|
3859
|
+
] }) : /* @__PURE__ */ jsx9("svg", { className: "w-3.5 h-3.5 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx9("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 4v16m8-8H4" }) }),
|
|
3860
|
+
/* @__PURE__ */ jsx9("span", { className: "whitespace-nowrap truncate", children: "\u05E1\u05E0\u05DB\u05E8\u05DF \u05DC\u05D2\u05D5\u05D2\u05DC" })
|
|
3623
3861
|
]
|
|
3624
3862
|
}
|
|
3625
3863
|
) });
|
|
3626
3864
|
},
|
|
3627
|
-
DEFAULT: ({ value, onChange, readOnly }) => /* @__PURE__ */
|
|
3865
|
+
DEFAULT: ({ value, onChange, readOnly }) => /* @__PURE__ */ jsx9(
|
|
3628
3866
|
SmartTextCell,
|
|
3629
3867
|
{
|
|
3630
3868
|
value,
|
|
@@ -3635,14 +3873,14 @@ var FORM_INPUTS = {
|
|
|
3635
3873
|
),
|
|
3636
3874
|
SUB_TABLE: ({ value, column, context }) => {
|
|
3637
3875
|
var _a, _b, _c;
|
|
3638
|
-
if (!Array.isArray(value)) return /* @__PURE__ */
|
|
3876
|
+
if (!Array.isArray(value)) return /* @__PURE__ */ jsx9("span", { className: "px-2 py-1 flex items-center h-full text-slate-300 text-xs italic", children: "\u05E8\u05D9\u05E7" });
|
|
3639
3877
|
const selected = value.filter((e) => e == null ? void 0 : e.isSelected);
|
|
3640
|
-
if (selected.length === 0) return /* @__PURE__ */
|
|
3878
|
+
if (selected.length === 0) return /* @__PURE__ */ jsx9("span", { className: "px-2 py-1 flex items-center h-full text-slate-300 text-xs italic", children: "\u05E8\u05D9\u05E7" });
|
|
3641
3879
|
const displayFields = ((_a = column.config) == null ? void 0 : _a.subTableDisplayFields) || [];
|
|
3642
3880
|
const isWhatsApp = ((_b = column.config) == null ? void 0 : _b.actionType) === "WHATSAPP";
|
|
3643
3881
|
const actionPhoneCol = (_c = column.config) == null ? void 0 : _c.actionPhoneColumn;
|
|
3644
3882
|
const primaryEntry = selected.find((e) => e == null ? void 0 : e.isPrimary) || selected[0];
|
|
3645
|
-
return /* @__PURE__ */
|
|
3883
|
+
return /* @__PURE__ */ jsx9("div", { className: "px-1.5 py-1 flex flex-row flex-wrap items-center gap-1.5 h-full min-h-[inherit] overflow-hidden max-w-full", children: selected.map((entry, idx) => {
|
|
3646
3884
|
var _a2, _b2;
|
|
3647
3885
|
let label = "";
|
|
3648
3886
|
if (entry._resolvedData) {
|
|
@@ -3679,15 +3917,15 @@ var FORM_INPUTS = {
|
|
|
3679
3917
|
if (subStatus === "success") {
|
|
3680
3918
|
btnClass = "bg-emerald-50 hover:bg-emerald-100 text-emerald-800 border-emerald-400";
|
|
3681
3919
|
iconClass = "text-emerald-600";
|
|
3682
|
-
statusIcon = /* @__PURE__ */
|
|
3920
|
+
statusIcon = /* @__PURE__ */ jsx9("span", { className: "text-[10px] select-none shrink-0", title: "\u05E0\u05E9\u05DC\u05D7 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4", children: "\u2705" });
|
|
3683
3921
|
} else if (subStatus === "failed") {
|
|
3684
3922
|
btnClass = "bg-rose-50 hover:bg-rose-100 text-rose-800 border-rose-300 hover:border-rose-400";
|
|
3685
3923
|
iconClass = "text-rose-600";
|
|
3686
|
-
statusIcon = /* @__PURE__ */
|
|
3924
|
+
statusIcon = /* @__PURE__ */ jsx9("span", { className: "text-[10px] select-none shrink-0", title: subTooltip || "\u05E9\u05DC\u05D9\u05D7\u05D4 \u05E0\u05DB\u05E9\u05DC\u05D4", children: "\u274C" });
|
|
3687
3925
|
} else if (subStatus === "skipped") {
|
|
3688
3926
|
btnClass = "bg-amber-50 hover:bg-amber-100 text-amber-800 border-amber-300 hover:border-amber-400";
|
|
3689
3927
|
iconClass = "text-amber-600";
|
|
3690
|
-
statusIcon = /* @__PURE__ */
|
|
3928
|
+
statusIcon = /* @__PURE__ */ jsx9("span", { className: "text-[10px] select-none shrink-0", title: subTooltip || "\u05DC\u05DC\u05D0 \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF", children: "\u26A0\uFE0F" });
|
|
3691
3929
|
}
|
|
3692
3930
|
return /* @__PURE__ */ jsxs8(
|
|
3693
3931
|
"button",
|
|
@@ -3700,9 +3938,9 @@ var FORM_INPUTS = {
|
|
|
3700
3938
|
className: `inline-flex items-center gap-1 px-1.5 py-0.5 rounded-full text-xs font-medium max-w-full truncate cursor-pointer transition-colors shadow-xs shrink border ${btnClass}`,
|
|
3701
3939
|
title: `${subTooltip ? `[${subTooltip}] ` : ""}\u05E4\u05EA\u05D9\u05D7\u05EA \u05D5\u05D5\u05D0\u05D8\u05E1\u05D0\u05E4 (${phone})${isPrimary ? " - \u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9" : ""}`,
|
|
3702
3940
|
children: [
|
|
3703
|
-
statusIcon || /* @__PURE__ */
|
|
3704
|
-
/* @__PURE__ */
|
|
3705
|
-
isPrimary && /* @__PURE__ */
|
|
3941
|
+
statusIcon || /* @__PURE__ */ jsx9("svg", { className: `w-3 h-3 ${iconClass} shrink-0`, fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx9("path", { d: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51a5.816 5.816 0 00-.571-.01c-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z" }) }),
|
|
3942
|
+
/* @__PURE__ */ jsx9("span", { className: "truncate", children: label }),
|
|
3943
|
+
isPrimary && /* @__PURE__ */ jsx9("span", { className: "text-amber-500 font-bold text-[10px] ml-0.5", title: "\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9", children: "\u2605" })
|
|
3706
3944
|
]
|
|
3707
3945
|
},
|
|
3708
3946
|
entry.recordId || idx
|
|
@@ -3713,13 +3951,13 @@ var FORM_INPUTS = {
|
|
|
3713
3951
|
let statusBadge = null;
|
|
3714
3952
|
if (subStatus === "success") {
|
|
3715
3953
|
chipClass = "bg-emerald-50 text-emerald-800 border-emerald-300";
|
|
3716
|
-
statusBadge = /* @__PURE__ */
|
|
3954
|
+
statusBadge = /* @__PURE__ */ jsx9("span", { className: "text-[10px] select-none shrink-0", title: "\u05E0\u05E9\u05DC\u05D7 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4", children: "\u2705" });
|
|
3717
3955
|
} else if (subStatus === "failed") {
|
|
3718
3956
|
chipClass = "bg-rose-50 text-rose-800 border-rose-300";
|
|
3719
|
-
statusBadge = /* @__PURE__ */
|
|
3957
|
+
statusBadge = /* @__PURE__ */ jsx9("span", { className: "text-[10px] select-none shrink-0", title: subTooltip || "\u05E9\u05DC\u05D9\u05D7\u05D4 \u05E0\u05DB\u05E9\u05DC\u05D4", children: "\u274C" });
|
|
3720
3958
|
} else if (subStatus === "skipped") {
|
|
3721
3959
|
chipClass = "bg-amber-50 text-amber-800 border-amber-300";
|
|
3722
|
-
statusBadge = /* @__PURE__ */
|
|
3960
|
+
statusBadge = /* @__PURE__ */ jsx9("span", { className: "text-[10px] select-none shrink-0", title: subTooltip || "\u05DC\u05DC\u05D0 \u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05EA\u05E7\u05D9\u05DF", children: "\u26A0\uFE0F" });
|
|
3723
3961
|
}
|
|
3724
3962
|
return /* @__PURE__ */ jsxs8(
|
|
3725
3963
|
"span",
|
|
@@ -3728,8 +3966,8 @@ var FORM_INPUTS = {
|
|
|
3728
3966
|
title: `${subTooltip ? `[${subTooltip}] ` : ""}${label}${isPrimary ? " - \u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9" : ""}`,
|
|
3729
3967
|
children: [
|
|
3730
3968
|
statusBadge,
|
|
3731
|
-
/* @__PURE__ */
|
|
3732
|
-
isPrimary && /* @__PURE__ */
|
|
3969
|
+
/* @__PURE__ */ jsx9("span", { className: "truncate", children: label }),
|
|
3970
|
+
isPrimary && /* @__PURE__ */ jsx9("span", { className: "text-amber-500 font-bold text-[10px]", title: "\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9", children: "\u2605" })
|
|
3733
3971
|
]
|
|
3734
3972
|
},
|
|
3735
3973
|
entry.recordId || idx
|
|
@@ -3885,7 +4123,7 @@ function useColumnReorder({
|
|
|
3885
4123
|
|
|
3886
4124
|
// src/components/TableBlock/columnTitleUtils.tsx
|
|
3887
4125
|
import { useState as useState10, useEffect as useEffect8 } from "react";
|
|
3888
|
-
import { jsx as
|
|
4126
|
+
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3889
4127
|
var canvas = null;
|
|
3890
4128
|
function measureTextWidth(text, font = '600 14px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif') {
|
|
3891
4129
|
if (typeof document === "undefined") return text.length * 9;
|
|
@@ -3948,22 +4186,22 @@ function ColumnHeaderTitle({ name, width, isSubTable = false }) {
|
|
|
3948
4186
|
}, []);
|
|
3949
4187
|
const { isSingleWord, line1, line2 } = splitHeaderTitle(name);
|
|
3950
4188
|
if (!isMounted || isSingleWord || !line2) {
|
|
3951
|
-
return /* @__PURE__ */
|
|
4189
|
+
return /* @__PURE__ */ jsx10("span", { className: "whitespace-nowrap select-none overflow-hidden text-right flex-1", title: name, children: name });
|
|
3952
4190
|
}
|
|
3953
4191
|
const font = isSubTable ? '600 12px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif' : '600 14px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif';
|
|
3954
4192
|
const chromeWidth = isSubTable ? 24 : 26;
|
|
3955
4193
|
const fullTitleWidth = measureTextWidth(name, font) + chromeWidth;
|
|
3956
4194
|
if (width !== void 0 && width >= fullTitleWidth) {
|
|
3957
|
-
return /* @__PURE__ */
|
|
4195
|
+
return /* @__PURE__ */ jsx10("span", { className: "whitespace-nowrap select-none overflow-hidden text-right flex-1", title: name, children: name });
|
|
3958
4196
|
}
|
|
3959
4197
|
return /* @__PURE__ */ jsxs9("span", { className: "flex flex-col justify-center leading-tight select-none overflow-hidden text-right flex-1", title: name, children: [
|
|
3960
|
-
/* @__PURE__ */
|
|
3961
|
-
/* @__PURE__ */
|
|
4198
|
+
/* @__PURE__ */ jsx10("span", { className: "whitespace-nowrap block", children: line1 }),
|
|
4199
|
+
/* @__PURE__ */ jsx10("span", { className: "whitespace-nowrap block", children: line2 })
|
|
3962
4200
|
] });
|
|
3963
4201
|
}
|
|
3964
4202
|
|
|
3965
4203
|
// src/components/TableBlock/fields/SubTableViewer.tsx
|
|
3966
|
-
import { jsx as
|
|
4204
|
+
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3967
4205
|
function formatConflictCellValue(rawVal, colDef, relationOptionsMap) {
|
|
3968
4206
|
var _a, _b, _c;
|
|
3969
4207
|
if (rawVal === void 0 || rawVal === null || rawVal === "") {
|
|
@@ -3974,11 +4212,11 @@ function formatConflictCellValue(rawVal, colDef, relationOptionsMap) {
|
|
|
3974
4212
|
return rawVal ? "\u05DB\u05DF" : "\u05DC\u05D0";
|
|
3975
4213
|
}
|
|
3976
4214
|
if (colType === "GOOGLE_CONTACT" || typeof rawVal === "object" && rawVal !== null && ("resourceName" in rawVal || "synced" in rawVal)) {
|
|
3977
|
-
return /* @__PURE__ */
|
|
4215
|
+
return /* @__PURE__ */ jsx11("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[11px] font-medium bg-violet-50 text-violet-700 border border-violet-200", children: "\u05D0\u05D9\u05E9 \u05E7\u05E9\u05E8 \u05D2\u05D5\u05D2\u05DC" });
|
|
3978
4216
|
}
|
|
3979
4217
|
if (colType === "GOOGLE_DRIVE_FILE" || typeof rawVal === "object" && rawVal !== null && ("fileId" in rawVal || "fileUrl" in rawVal || "fileName" in rawVal)) {
|
|
3980
4218
|
const fileName = rawVal == null ? void 0 : rawVal.fileName;
|
|
3981
|
-
return /* @__PURE__ */
|
|
4219
|
+
return /* @__PURE__ */ jsx11("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[11px] font-medium bg-rose-50 text-rose-700 border border-rose-200 truncate max-w-[150px]", title: fileName || "\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3", children: fileName ? String(fileName) : "\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3" });
|
|
3982
4220
|
}
|
|
3983
4221
|
if (colType === "LINK" || typeof rawVal === "object" && rawVal !== null && ("url" in rawVal || "label" in rawVal)) {
|
|
3984
4222
|
const text = (rawVal == null ? void 0 : rawVal.label) || (rawVal == null ? void 0 : rawVal.url);
|
|
@@ -4014,7 +4252,7 @@ function formatConflictCellValue(rawVal, colDef, relationOptionsMap) {
|
|
|
4014
4252
|
return String(relDisplay);
|
|
4015
4253
|
}
|
|
4016
4254
|
}
|
|
4017
|
-
return /* @__PURE__ */
|
|
4255
|
+
return /* @__PURE__ */ jsx11("span", { className: "inline-flex items-center px-1.5 py-0.5 rounded text-[11px] font-medium bg-indigo-50 text-indigo-700 border border-indigo-200", children: "\u05E8\u05E9\u05D5\u05DE\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8\u05EA" });
|
|
4018
4256
|
}
|
|
4019
4257
|
if (Array.isArray(rawVal)) {
|
|
4020
4258
|
const allPrimitives = rawVal.every((v) => typeof v !== "object");
|
|
@@ -4215,7 +4453,7 @@ function SubTableCell({
|
|
|
4215
4453
|
const subTableMetaId = (targetSchema == null ? void 0 : targetSchema.tableMetaId) || (targetSchema == null ? void 0 : targetSchema.id) || referencedTableId;
|
|
4216
4454
|
const parentTableId = (context == null ? void 0 : context.parentTableId) || (context == null ? void 0 : context.tableId);
|
|
4217
4455
|
const effectiveParentRecordId = parentRowId || ((_c = context == null ? void 0 : context.parentRecord) == null ? void 0 : _c.recordId) || ((_d = context == null ? void 0 : context.parentRecord) == null ? void 0 : _d.id) || (context == null ? void 0 : context.rowId);
|
|
4218
|
-
return /* @__PURE__ */
|
|
4456
|
+
return /* @__PURE__ */ jsx11(
|
|
4219
4457
|
"td",
|
|
4220
4458
|
{
|
|
4221
4459
|
ref: cellRef,
|
|
@@ -4224,7 +4462,7 @@ function SubTableCell({
|
|
|
4224
4462
|
title: validationError || void 0,
|
|
4225
4463
|
style: width ? { width, minWidth: width, maxWidth: width, height: "100%" } : { height: "100%" },
|
|
4226
4464
|
className: `border border-slate-200 p-0 relative h-full min-h-[32px] transition-colors ${colType === "RELATION" ? "overflow-visible" : "overflow-hidden"} ${validationError ? "border-rose-400 ring-1 ring-rose-400 bg-rose-50/20" : ""}`,
|
|
4227
|
-
children: /* @__PURE__ */
|
|
4465
|
+
children: /* @__PURE__ */ jsx11(
|
|
4228
4466
|
InputComponent,
|
|
4229
4467
|
{
|
|
4230
4468
|
value: draftValue,
|
|
@@ -4839,7 +5077,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4839
5077
|
};
|
|
4840
5078
|
return /* @__PURE__ */ jsxs10("div", { className: "p-3 animate-in fade-in slide-in-from-top-2 duration-200", dir: "rtl", children: [
|
|
4841
5079
|
/* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-4 mb-2.5", children: [
|
|
4842
|
-
/* @__PURE__ */
|
|
5080
|
+
/* @__PURE__ */ jsx11("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ jsx11("span", { className: "text-xs font-bold text-slate-600", children: (_e = targetSchema == null ? void 0 : targetSchema.name) != null ? _e : (_d = column.config) == null ? void 0 : _d.referencedTableName }) }),
|
|
4843
5081
|
!isReadOnly && /* @__PURE__ */ jsxs10("div", { className: "flex items-center gap-1.5", children: [
|
|
4844
5082
|
/* @__PURE__ */ jsxs10("div", { className: "relative", ref: searchRef, children: [
|
|
4845
5083
|
/* @__PURE__ */ jsxs10(
|
|
@@ -4849,13 +5087,13 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4849
5087
|
onClick: () => setIsSearchOpen((prev) => !prev),
|
|
4850
5088
|
className: "h-7 px-2.5 text-[11px] font-semibold bg-blue-50 hover:bg-blue-100 text-blue-700 border border-blue-200 rounded-md transition-colors cursor-pointer flex items-center gap-1",
|
|
4851
5089
|
children: [
|
|
4852
|
-
/* @__PURE__ */
|
|
5090
|
+
/* @__PURE__ */ jsx11("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) }),
|
|
4853
5091
|
"\u05E7\u05D9\u05E9\u05D5\u05E8 \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA"
|
|
4854
5092
|
]
|
|
4855
5093
|
}
|
|
4856
5094
|
),
|
|
4857
5095
|
isSearchOpen && /* @__PURE__ */ jsxs10("div", { className: "absolute right-0 top-full mt-1 w-72 bg-white border border-slate-200 rounded-lg shadow-xl z-50 p-2", children: [
|
|
4858
|
-
/* @__PURE__ */
|
|
5096
|
+
/* @__PURE__ */ jsx11(
|
|
4859
5097
|
"input",
|
|
4860
5098
|
{
|
|
4861
5099
|
type: "text",
|
|
@@ -4866,7 +5104,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4866
5104
|
autoFocus: true
|
|
4867
5105
|
}
|
|
4868
5106
|
),
|
|
4869
|
-
/* @__PURE__ */
|
|
5107
|
+
/* @__PURE__ */ jsx11("div", { className: "max-h-48 overflow-y-auto", children: isSearching ? /* @__PURE__ */ jsx11("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx11("div", { className: "w-4 h-4 border-2 border-blue-400 border-t-transparent rounded-full animate-spin" }) }) : searchResults.length > 0 ? searchResults.map((r) => /* @__PURE__ */ jsx11(
|
|
4870
5108
|
"button",
|
|
4871
5109
|
{
|
|
4872
5110
|
type: "button",
|
|
@@ -4875,7 +5113,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4875
5113
|
children: getDisplayLabel(r)
|
|
4876
5114
|
},
|
|
4877
5115
|
r.id
|
|
4878
|
-
)) : searchQuery.trim() ? /* @__PURE__ */
|
|
5116
|
+
)) : searchQuery.trim() ? /* @__PURE__ */ jsx11("p", { className: "text-xs text-slate-400 text-center py-3", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA" }) : /* @__PURE__ */ jsx11("p", { className: "text-xs text-slate-400 text-center py-3", children: "\u05D4\u05E7\u05DC\u05D3 \u05DC\u05D7\u05D9\u05E4\u05D5\u05E9..." }) })
|
|
4879
5117
|
] })
|
|
4880
5118
|
] }),
|
|
4881
5119
|
/* @__PURE__ */ jsxs10(
|
|
@@ -4898,18 +5136,18 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4898
5136
|
},
|
|
4899
5137
|
className: "h-7 px-2.5 text-[11px] font-semibold bg-emerald-50 hover:bg-emerald-100 text-emerald-700 border border-emerald-200 rounded-md transition-colors cursor-pointer flex items-center gap-1",
|
|
4900
5138
|
children: [
|
|
4901
|
-
/* @__PURE__ */
|
|
5139
|
+
/* @__PURE__ */ jsx11("svg", { className: "w-3 h-3", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2.5", d: "M12 4v16m8-8H4" }) }),
|
|
4902
5140
|
"\u05E8\u05E9\u05D5\u05DE\u05D4 \u05D7\u05D3\u05E9\u05D4"
|
|
4903
5141
|
]
|
|
4904
5142
|
}
|
|
4905
5143
|
)
|
|
4906
5144
|
] })
|
|
4907
5145
|
] }),
|
|
4908
|
-
isLoading ? /* @__PURE__ */
|
|
4909
|
-
/* @__PURE__ */
|
|
4910
|
-
/* @__PURE__ */
|
|
4911
|
-
/* @__PURE__ */
|
|
4912
|
-
/* @__PURE__ */
|
|
5146
|
+
isLoading ? /* @__PURE__ */ jsx11("div", { className: "flex items-center justify-center py-6", children: /* @__PURE__ */ jsx11("div", { className: "w-5 h-5 border-2 border-blue-400 border-t-transparent rounded-full animate-spin" }) }) : entries.length === 0 && !isCreating ? /* @__PURE__ */ jsx11("div", { className: "text-center py-6 text-xs text-slate-400", children: isReadOnly ? "\u05D0\u05D9\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05E7\u05D5\u05E9\u05E8\u05D5\u05EA \u05DC\u05D4\u05E6\u05D2\u05D4." : "\u05D0\u05D9\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05E7\u05D5\u05E9\u05E8\u05D5\u05EA. \u05D4\u05E9\u05EA\u05DE\u05E9 \u05D1\u05D7\u05D9\u05E4\u05D5\u05E9 \u05DB\u05D3\u05D9 \u05DC\u05E7\u05E9\u05E8 \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05E7\u05D9\u05D9\u05DE\u05D5\u05EA, \u05D0\u05D5 \u05D4\u05D5\u05E1\u05E3 \u05E8\u05E9\u05D5\u05DE\u05D4 \u05D7\u05D3\u05E9\u05D4." }) : /* @__PURE__ */ jsx11("div", { className: "overflow-x-auto pb-1", children: /* @__PURE__ */ jsxs10("table", { className: "w-full text-xs border-collapse table-auto", children: [
|
|
5147
|
+
/* @__PURE__ */ jsx11("thead", { children: /* @__PURE__ */ jsxs10("tr", { className: "bg-slate-100/80 h-12 min-h-[48px]", children: [
|
|
5148
|
+
/* @__PURE__ */ jsx11("th", { className: "border border-slate-200 px-1 py-1.5 text-center font-semibold text-slate-500 h-12 min-h-[48px] align-middle", style: { width: 68, minWidth: 68, maxWidth: 68 }, children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center gap-1 text-[11px]", title: "\u05E0\u05D1\u05D7\u05E8 / \u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9", children: [
|
|
5149
|
+
/* @__PURE__ */ jsx11("span", { children: "\u05E0\u05D1\u05D7\u05E8" }),
|
|
5150
|
+
/* @__PURE__ */ jsx11("span", { className: "text-amber-500 font-bold", title: "\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9", children: "\u2605" })
|
|
4913
5151
|
] }) }),
|
|
4914
5152
|
targetColumns.map((col) => {
|
|
4915
5153
|
const dragProps = isReadOnly ? {} : getHeaderDragProps(col.name);
|
|
@@ -4925,7 +5163,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4925
5163
|
}, dragProps), {
|
|
4926
5164
|
className: `relative border border-slate-200 px-3 py-1.5 font-semibold text-slate-600 select-none ${isReadOnly ? "cursor-default" : "cursor-grab active:cursor-grabbing"} transition-colors h-12 min-h-[48px] align-middle ${isDragging ? "opacity-40 bg-slate-200 border-dashed border-2 border-brand" : ""} ${isDragOver ? "bg-blue-50 border-r-4 border-r-brand text-brand font-bold" : isReadOnly ? "" : "hover:bg-slate-200/60"}`,
|
|
4927
5165
|
children: [
|
|
4928
|
-
/* @__PURE__ */
|
|
5166
|
+
/* @__PURE__ */ jsx11(
|
|
4929
5167
|
"div",
|
|
4930
5168
|
{
|
|
4931
5169
|
onMouseDown: (e) => {
|
|
@@ -4938,15 +5176,15 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4938
5176
|
}
|
|
4939
5177
|
),
|
|
4940
5178
|
/* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-between gap-1.5 group overflow-hidden w-full", title: col.name, children: [
|
|
4941
|
-
/* @__PURE__ */
|
|
4942
|
-
!isReadOnly && /* @__PURE__ */
|
|
5179
|
+
/* @__PURE__ */ jsx11(ColumnHeaderTitle, { name: col.name, width: currentWidth, isSubTable: true }),
|
|
5180
|
+
!isReadOnly && /* @__PURE__ */ jsx11(
|
|
4943
5181
|
"svg",
|
|
4944
5182
|
{
|
|
4945
5183
|
className: "w-3.5 h-3.5 text-slate-400 opacity-40 group-hover:opacity-100 transition-opacity shrink-0 cursor-grab",
|
|
4946
5184
|
fill: "none",
|
|
4947
5185
|
viewBox: "0 0 24 24",
|
|
4948
5186
|
stroke: "currentColor",
|
|
4949
|
-
children: /* @__PURE__ */
|
|
5187
|
+
children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M8 9h.01M8 15h.01M16 9h.01M16 15h.01" })
|
|
4950
5188
|
}
|
|
4951
5189
|
)
|
|
4952
5190
|
] })
|
|
@@ -4955,8 +5193,8 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4955
5193
|
col.name
|
|
4956
5194
|
);
|
|
4957
5195
|
}),
|
|
4958
|
-
/* @__PURE__ */
|
|
4959
|
-
/* @__PURE__ */
|
|
5196
|
+
/* @__PURE__ */ jsx11("th", { className: "border border-slate-200 px-2 py-1.5 w-14 h-12 min-h-[48px]", style: { width: 56, minWidth: 56, maxWidth: 56 } }),
|
|
5197
|
+
/* @__PURE__ */ jsx11("th", { className: "w-full min-w-[50px] border border-slate-200 pointer-events-none h-12 min-h-[48px]" })
|
|
4960
5198
|
] }) }),
|
|
4961
5199
|
/* @__PURE__ */ jsxs10("tbody", { children: [
|
|
4962
5200
|
entries.map((entry) => {
|
|
@@ -4967,10 +5205,10 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4967
5205
|
const subStatus = typeof subStatusObj === "string" ? subStatusObj : subStatusObj == null ? void 0 : subStatusObj.status;
|
|
4968
5206
|
const subTooltip = typeof subStatusObj === "object" ? subStatusObj == null ? void 0 : subStatusObj.tooltip : void 0;
|
|
4969
5207
|
return /* @__PURE__ */ jsxs10("tr", { className: "hover:bg-blue-50/30 transition-colors", children: [
|
|
4970
|
-
/* @__PURE__ */
|
|
5208
|
+
/* @__PURE__ */ jsx11("td", { className: "border border-slate-200 px-1 py-1 text-center", style: { width: 68, minWidth: 68, maxWidth: 68 }, children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center gap-1.5", children: [
|
|
4971
5209
|
subStatus && (() => {
|
|
4972
5210
|
if (subStatus === "success") {
|
|
4973
|
-
return /* @__PURE__ */
|
|
5211
|
+
return /* @__PURE__ */ jsx11(
|
|
4974
5212
|
"span",
|
|
4975
5213
|
{
|
|
4976
5214
|
className: "text-xs select-none cursor-help inline-flex items-center justify-center",
|
|
@@ -4980,7 +5218,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4980
5218
|
);
|
|
4981
5219
|
}
|
|
4982
5220
|
if (subStatus === "failed") {
|
|
4983
|
-
return /* @__PURE__ */
|
|
5221
|
+
return /* @__PURE__ */ jsx11(
|
|
4984
5222
|
"span",
|
|
4985
5223
|
{
|
|
4986
5224
|
className: "text-xs select-none cursor-help inline-flex items-center justify-center",
|
|
@@ -4990,7 +5228,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
4990
5228
|
);
|
|
4991
5229
|
}
|
|
4992
5230
|
if (subStatus === "skipped") {
|
|
4993
|
-
return /* @__PURE__ */
|
|
5231
|
+
return /* @__PURE__ */ jsx11(
|
|
4994
5232
|
"span",
|
|
4995
5233
|
{
|
|
4996
5234
|
className: "text-xs select-none cursor-help inline-flex items-center justify-center",
|
|
@@ -5001,7 +5239,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5001
5239
|
}
|
|
5002
5240
|
return null;
|
|
5003
5241
|
})(),
|
|
5004
|
-
/* @__PURE__ */
|
|
5242
|
+
/* @__PURE__ */ jsx11(
|
|
5005
5243
|
"input",
|
|
5006
5244
|
{
|
|
5007
5245
|
type: "checkbox",
|
|
@@ -5012,7 +5250,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5012
5250
|
className: `w-3.5 h-3.5 rounded border-slate-300 text-blue-600 ${isReadOnly ? "cursor-not-allowed opacity-60" : "cursor-pointer"}`
|
|
5013
5251
|
}
|
|
5014
5252
|
),
|
|
5015
|
-
/* @__PURE__ */
|
|
5253
|
+
/* @__PURE__ */ jsx11(
|
|
5016
5254
|
"button",
|
|
5017
5255
|
{
|
|
5018
5256
|
type: "button",
|
|
@@ -5020,7 +5258,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5020
5258
|
onClick: () => handleTogglePrimary(entry.recordId),
|
|
5021
5259
|
title: !entry.isSelected ? "\u05D9\u05E9 \u05DC\u05E1\u05DE\u05DF \u05D0\u05EA \u05D4\u05E8\u05E9\u05D5\u05DE\u05D4 \u05DB\u05D3\u05D9 \u05DC\u05D4\u05D2\u05D3\u05D9\u05E8\u05D4 \u05DB\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9" : entry.recordId === effectivePrimaryRecordId ? "\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9" : "\u05D4\u05D2\u05D3\u05E8 \u05DB\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9",
|
|
5022
5260
|
className: `p-0.5 rounded transition-all inline-flex items-center justify-center ${entry.recordId === effectivePrimaryRecordId ? "text-amber-500 hover:text-amber-600 scale-110" : "text-slate-300 hover:text-amber-400 hover:scale-105"} ${isReadOnly || !entry.isSelected ? "opacity-25 cursor-not-allowed" : "cursor-pointer"}`,
|
|
5023
|
-
children: /* @__PURE__ */
|
|
5261
|
+
children: /* @__PURE__ */ jsx11(
|
|
5024
5262
|
Star,
|
|
5025
5263
|
{
|
|
5026
5264
|
className: `w-3.5 h-3.5 ${entry.recordId === effectivePrimaryRecordId ? "fill-amber-400 text-amber-500" : "text-slate-300"}`
|
|
@@ -5032,17 +5270,17 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5032
5270
|
targetColumns.map((col) => {
|
|
5033
5271
|
const currentWidth = columnWidths[col.name] || 150;
|
|
5034
5272
|
if (!record) {
|
|
5035
|
-
return /* @__PURE__ */
|
|
5273
|
+
return /* @__PURE__ */ jsx11(
|
|
5036
5274
|
"td",
|
|
5037
5275
|
{
|
|
5038
5276
|
style: { width: currentWidth, minWidth: currentWidth, maxWidth: currentWidth },
|
|
5039
5277
|
className: "border border-slate-200 p-0 relative h-8 overflow-hidden",
|
|
5040
|
-
children: /* @__PURE__ */
|
|
5278
|
+
children: /* @__PURE__ */ jsx11("span", { className: "text-slate-300 italic px-2", children: "\u05D8\u05D5\u05E2\u05DF..." })
|
|
5041
5279
|
},
|
|
5042
5280
|
col.name
|
|
5043
5281
|
);
|
|
5044
5282
|
}
|
|
5045
|
-
return /* @__PURE__ */
|
|
5283
|
+
return /* @__PURE__ */ jsx11(
|
|
5046
5284
|
SubTableCell,
|
|
5047
5285
|
{
|
|
5048
5286
|
record,
|
|
@@ -5062,7 +5300,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5062
5300
|
`${record.id}_${col.name}`
|
|
5063
5301
|
);
|
|
5064
5302
|
}),
|
|
5065
|
-
/* @__PURE__ */
|
|
5303
|
+
/* @__PURE__ */ jsx11("td", { className: "border border-slate-200 px-1 py-1 text-center", style: { width: 56, minWidth: 56, maxWidth: 56 }, children: /* @__PURE__ */ jsx11("div", { className: "flex items-center justify-center gap-1", children: !isReadOnly && /* @__PURE__ */ jsx11(
|
|
5066
5304
|
"button",
|
|
5067
5305
|
{
|
|
5068
5306
|
type: "button",
|
|
@@ -5072,26 +5310,26 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5072
5310
|
},
|
|
5073
5311
|
className: "text-slate-400 hover:text-rose-500 p-0.5 rounded transition-colors cursor-pointer inline-flex items-center justify-center",
|
|
5074
5312
|
title: "\u05D4\u05E1\u05E8 \u05E7\u05D9\u05E9\u05D5\u05E8",
|
|
5075
|
-
children: /* @__PURE__ */
|
|
5313
|
+
children: /* @__PURE__ */ jsx11("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M6 18L18 6M6 6l12 12" }) })
|
|
5076
5314
|
}
|
|
5077
5315
|
) }) }),
|
|
5078
|
-
/* @__PURE__ */
|
|
5316
|
+
/* @__PURE__ */ jsx11("td", { className: "border border-slate-200 bg-white pointer-events-none" })
|
|
5079
5317
|
] }, entry.recordId);
|
|
5080
5318
|
}),
|
|
5081
5319
|
isCreating && !isReadOnly && /* @__PURE__ */ jsxs10("tr", { className: "bg-emerald-50/40", children: [
|
|
5082
|
-
/* @__PURE__ */
|
|
5320
|
+
/* @__PURE__ */ jsx11("td", { className: "border border-emerald-200 px-1 py-1 text-center", style: { width: 68, minWidth: 68, maxWidth: 68 }, children: /* @__PURE__ */ jsx11("span", { className: "text-emerald-500 font-bold text-[10px]", children: "\u05D7\u05D3\u05E9" }) }),
|
|
5083
5321
|
targetColumns.map((col) => {
|
|
5084
5322
|
var _a2, _b2, _c2, _d2, _e2;
|
|
5085
5323
|
const colType = ((_a2 = col.type) == null ? void 0 : _a2.toUpperCase()) || "DEFAULT";
|
|
5086
5324
|
const InputComponent = FORM_INPUTS[colType] || FORM_INPUTS.DEFAULT;
|
|
5087
5325
|
const currentWidth = columnWidths[col.name] || 150;
|
|
5088
5326
|
const effectiveParentId = rowId || ((_b2 = context == null ? void 0 : context.parentRecord) == null ? void 0 : _b2.recordId) || ((_c2 = context == null ? void 0 : context.parentRecord) == null ? void 0 : _c2.id) || (context == null ? void 0 : context.rowId);
|
|
5089
|
-
return /* @__PURE__ */
|
|
5327
|
+
return /* @__PURE__ */ jsx11(
|
|
5090
5328
|
"td",
|
|
5091
5329
|
{
|
|
5092
5330
|
style: { width: currentWidth, minWidth: currentWidth, maxWidth: currentWidth },
|
|
5093
5331
|
className: `border border-emerald-200 p-0 relative h-8 ${colType === "RELATION" ? "overflow-visible" : "overflow-hidden"}`,
|
|
5094
|
-
children: /* @__PURE__ */
|
|
5332
|
+
children: /* @__PURE__ */ jsx11(
|
|
5095
5333
|
InputComponent,
|
|
5096
5334
|
{
|
|
5097
5335
|
value: (_d2 = newRecordData[col.name]) != null ? _d2 : colType === "BOOLEAN" ? false : "",
|
|
@@ -5119,18 +5357,18 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5119
5357
|
`new_${col.name}`
|
|
5120
5358
|
);
|
|
5121
5359
|
}),
|
|
5122
|
-
/* @__PURE__ */
|
|
5123
|
-
/* @__PURE__ */
|
|
5360
|
+
/* @__PURE__ */ jsx11("td", { className: "border border-emerald-200 px-1 py-1 text-center", style: { width: 56, minWidth: 56, maxWidth: 56 }, children: /* @__PURE__ */ jsxs10("div", { className: "flex items-center justify-center gap-1", children: [
|
|
5361
|
+
/* @__PURE__ */ jsx11(
|
|
5124
5362
|
"button",
|
|
5125
5363
|
{
|
|
5126
5364
|
type: "button",
|
|
5127
5365
|
onClick: handleCreateRecord,
|
|
5128
5366
|
className: "p-1 text-emerald-600 hover:bg-emerald-100 rounded transition-colors",
|
|
5129
5367
|
title: "\u05E9\u05DE\u05D5\u05E8",
|
|
5130
|
-
children: /* @__PURE__ */
|
|
5368
|
+
children: /* @__PURE__ */ jsx11("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2.5", d: "M5 13l4 4L19 7" }) })
|
|
5131
5369
|
}
|
|
5132
5370
|
),
|
|
5133
|
-
/* @__PURE__ */
|
|
5371
|
+
/* @__PURE__ */ jsx11(
|
|
5134
5372
|
"button",
|
|
5135
5373
|
{
|
|
5136
5374
|
type: "button",
|
|
@@ -5139,15 +5377,15 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5139
5377
|
},
|
|
5140
5378
|
className: "p-1 text-rose-500 hover:bg-rose-100 rounded transition-colors",
|
|
5141
5379
|
title: "\u05D1\u05D9\u05D8\u05D5\u05DC",
|
|
5142
|
-
children: /* @__PURE__ */
|
|
5380
|
+
children: /* @__PURE__ */ jsx11("svg", { className: "w-3.5 h-3.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2.5", d: "M6 18L18 6M6 6l12 12" }) })
|
|
5143
5381
|
}
|
|
5144
5382
|
)
|
|
5145
5383
|
] }) }),
|
|
5146
|
-
/* @__PURE__ */
|
|
5384
|
+
/* @__PURE__ */ jsx11("td", { className: "border border-emerald-200 bg-emerald-50/40 pointer-events-none" })
|
|
5147
5385
|
] })
|
|
5148
5386
|
] })
|
|
5149
5387
|
] }) }),
|
|
5150
|
-
conflictModalState.isOpen && /* @__PURE__ */
|
|
5388
|
+
conflictModalState.isOpen && /* @__PURE__ */ jsx11(
|
|
5151
5389
|
"div",
|
|
5152
5390
|
{
|
|
5153
5391
|
className: "fixed inset-0 z-50 flex items-center justify-center p-4 bg-slate-900/60 backdrop-blur-sm animate-in fade-in duration-200",
|
|
@@ -5160,17 +5398,17 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5160
5398
|
onClick: (e) => e.stopPropagation(),
|
|
5161
5399
|
children: [
|
|
5162
5400
|
/* @__PURE__ */ jsxs10("div", { className: "p-5 border-b border-slate-100 flex items-center gap-3", children: [
|
|
5163
|
-
/* @__PURE__ */
|
|
5401
|
+
/* @__PURE__ */ jsx11("div", { className: "w-10 h-10 rounded-full bg-blue-50 border border-blue-200 flex items-center justify-center text-blue-600 flex-shrink-0", children: /* @__PURE__ */ jsx11("svg", { className: "w-5 h-5", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" }) }) }),
|
|
5164
5402
|
/* @__PURE__ */ jsxs10("div", { children: [
|
|
5165
|
-
/* @__PURE__ */
|
|
5166
|
-
/* @__PURE__ */
|
|
5403
|
+
/* @__PURE__ */ jsx11("h3", { className: "text-base font-bold text-slate-800", children: conflictModalState.matchingRecords.length > 1 ? "\u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05E7\u05D9\u05D9\u05DE\u05D5\u05EA \u05D1\u05D8\u05D1\u05DC\u05D4" : "\u05E8\u05E9\u05D5\u05DE\u05D4 \u05E7\u05D9\u05D9\u05DE\u05EA \u05D1\u05D8\u05D1\u05DC\u05D4" }),
|
|
5404
|
+
/* @__PURE__ */ jsx11("p", { className: "text-xs text-slate-500", children: "\u05E0\u05DE\u05E6\u05D0\u05D4 \u05E8\u05E9\u05D5\u05DE\u05D4 \u05E7\u05D9\u05D9\u05DE\u05EA \u05E2\u05DD \u05D0\u05D5\u05EA\u05D5 \u05E2\u05E8\u05DA \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9" })
|
|
5167
5405
|
] })
|
|
5168
5406
|
] }),
|
|
5169
5407
|
/* @__PURE__ */ jsxs10("div", { className: "p-5 space-y-3", children: [
|
|
5170
5408
|
/* @__PURE__ */ jsxs10("p", { className: "text-sm text-slate-700 leading-relaxed", children: [
|
|
5171
5409
|
"\u05E7\u05D9\u05D9\u05DE\u05EA \u05DB\u05D1\u05E8 \u05E8\u05E9\u05D5\u05DE\u05D4 \u05E2\u05DD \u05D4\u05E2\u05E8\u05DA \u05E9\u05E0\u05D1\u05D7\u05E8 \u05D1\u05E9\u05D3\u05D4",
|
|
5172
5410
|
" ",
|
|
5173
|
-
/* @__PURE__ */
|
|
5411
|
+
/* @__PURE__ */ jsx11("span", { className: "font-bold text-slate-900 bg-slate-100 px-1.5 py-0.5 rounded border border-slate-200", children: conflictModalState.fieldName }),
|
|
5174
5412
|
". \u05D4\u05D0\u05DD \u05EA\u05E8\u05E6\u05D4 \u05DC\u05E7\u05E9\u05E8 \u05D0\u05D5\u05EA\u05D4 \u05DC\u05EA\u05EA-\u05D4\u05D8\u05D1\u05DC\u05D4 \u05D1\u05DE\u05E7\u05D5\u05DD \u05DC\u05D9\u05E6\u05D5\u05E8 \u05D7\u05D3\u05E9\u05D4?"
|
|
5175
5413
|
] }),
|
|
5176
5414
|
conflictModalState.matchingRecords.length > 1 && /* @__PURE__ */ jsxs10("div", { className: "p-3 bg-blue-50 border border-blue-200 rounded-lg text-xs font-semibold text-blue-800", children: [
|
|
@@ -5178,8 +5416,8 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5178
5416
|
conflictModalState.matchingRecords.length,
|
|
5179
5417
|
" \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05E7\u05D9\u05D9\u05DE\u05D5\u05EA. \u05D4\u05D0\u05DD \u05DC\u05E7\u05E9\u05E8 \u05D0\u05EA \u05DB\u05D5\u05DC\u05DF?"
|
|
5180
5418
|
] }),
|
|
5181
|
-
conflictModalState.matchingRecords.length > 0 && /* @__PURE__ */
|
|
5182
|
-
/* @__PURE__ */
|
|
5419
|
+
conflictModalState.matchingRecords.length > 0 && /* @__PURE__ */ jsx11("div", { className: "overflow-x-auto border border-slate-200 rounded-lg max-h-48 text-xs bg-white", children: /* @__PURE__ */ jsxs10("table", { className: "w-full text-right border-collapse", children: [
|
|
5420
|
+
/* @__PURE__ */ jsx11("thead", { children: /* @__PURE__ */ jsx11("tr", { className: "bg-slate-100 text-slate-700 font-semibold border-b whitespace-nowrap", children: (targetColumns.length > 0 ? targetColumns.filter((c) => c.name !== "_id" && c.name !== "id") : Object.keys(((_f = conflictModalState.matchingRecords[0]) == null ? void 0 : _f.data) || {}).filter((k) => k !== "_id" && k !== "id").map((name) => ({ name }))).map((col) => /* @__PURE__ */ jsx11(
|
|
5183
5421
|
"th",
|
|
5184
5422
|
{
|
|
5185
5423
|
className: "bg-slate-100 text-slate-700 font-semibold p-2 border-b whitespace-nowrap",
|
|
@@ -5187,14 +5425,14 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5187
5425
|
},
|
|
5188
5426
|
col.name
|
|
5189
5427
|
)) }) }),
|
|
5190
|
-
/* @__PURE__ */
|
|
5428
|
+
/* @__PURE__ */ jsx11("tbody", { children: conflictModalState.matchingRecords.map((r, idx) => {
|
|
5191
5429
|
const cols = targetColumns.length > 0 ? targetColumns.filter((c) => c.name !== "_id" && c.name !== "id") : Object.keys(r.data || {}).filter((k) => k !== "_id" && k !== "id").map((name) => ({ name }));
|
|
5192
|
-
return /* @__PURE__ */
|
|
5430
|
+
return /* @__PURE__ */ jsx11("tr", { className: "hover:bg-slate-50/80 transition-colors", children: cols.map((col) => {
|
|
5193
5431
|
var _a2;
|
|
5194
5432
|
const rawVal = (_a2 = r.data) == null ? void 0 : _a2[col.name];
|
|
5195
5433
|
const colDef = targetColumns.find((c) => c.name === col.name) || col;
|
|
5196
5434
|
const displayVal = formatConflictCellValue(rawVal, colDef, relationOptions || (context == null ? void 0 : context.relationOptions));
|
|
5197
|
-
return /* @__PURE__ */
|
|
5435
|
+
return /* @__PURE__ */ jsx11(
|
|
5198
5436
|
"td",
|
|
5199
5437
|
{
|
|
5200
5438
|
className: "p-2 border-b border-slate-100 whitespace-nowrap text-slate-800",
|
|
@@ -5207,7 +5445,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5207
5445
|
] }) })
|
|
5208
5446
|
] }),
|
|
5209
5447
|
/* @__PURE__ */ jsxs10("div", { className: "p-4 bg-slate-50 border-t border-slate-100 flex items-center justify-end gap-2.5", children: [
|
|
5210
|
-
/* @__PURE__ */
|
|
5448
|
+
/* @__PURE__ */ jsx11(
|
|
5211
5449
|
"button",
|
|
5212
5450
|
{
|
|
5213
5451
|
type: "button",
|
|
@@ -5223,7 +5461,7 @@ function SubTableViewer({ rowId, column, value, onChange, context, readOnly }) {
|
|
|
5223
5461
|
onClick: handleConfirmLinkConflict,
|
|
5224
5462
|
className: "px-4 py-2 text-sm font-semibold text-white bg-blue-600 hover:bg-blue-700 rounded-lg shadow transition-colors flex items-center gap-1.5 cursor-pointer",
|
|
5225
5463
|
children: [
|
|
5226
|
-
/* @__PURE__ */
|
|
5464
|
+
/* @__PURE__ */ jsx11("svg", { className: "w-4 h-4", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx11("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1" }) }),
|
|
5227
5465
|
conflictModalState.matchingRecords.length > 1 ? "\u05E7\u05E9\u05E8 \u05D0\u05EA \u05DB\u05D5\u05DC\u05DF" : "\u05E7\u05E9\u05E8 \u05E8\u05E9\u05D5\u05DE\u05D4"
|
|
5228
5466
|
]
|
|
5229
5467
|
}
|
|
@@ -5243,7 +5481,7 @@ import { X as X8, Copy as Copy2, RotateCcw as RotateCcw2, Download, Filter, Load
|
|
|
5243
5481
|
// src/components/TableBlock/RelationFilterPopover.tsx
|
|
5244
5482
|
import { useState as useState12, useEffect as useEffect10, useRef as useRef9, useMemo as useMemo5, useCallback as useCallback10 } from "react";
|
|
5245
5483
|
import { Search as Search2, X as X7, RotateCcw } from "lucide-react";
|
|
5246
|
-
import { jsx as
|
|
5484
|
+
import { jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
5247
5485
|
function calculatePopoverCoords(rect) {
|
|
5248
5486
|
if (!rect || typeof window === "undefined") return null;
|
|
5249
5487
|
const popoverWidth = 260;
|
|
@@ -5464,26 +5702,26 @@ function RelationFilterPopover({
|
|
|
5464
5702
|
"(\u05D4\u05DB\u05DC \u05DC\u05DE\u05E2\u05D8 ",
|
|
5465
5703
|
excludedSet.size,
|
|
5466
5704
|
")"
|
|
5467
|
-
] }) : mode === "exclude" && excludedSet.size === 0 ? /* @__PURE__ */
|
|
5705
|
+
] }) : mode === "exclude" && excludedSet.size === 0 ? /* @__PURE__ */ jsx12("span", { className: "text-[10px] text-brand font-semibold", children: "(\u05D4\u05DB\u05DC \u05E0\u05D1\u05D7\u05E8)" }) : selectedCount > 0 ? /* @__PURE__ */ jsxs11("span", { className: "text-[10px] text-brand font-semibold", children: [
|
|
5468
5706
|
"(",
|
|
5469
5707
|
selectedCount,
|
|
5470
5708
|
" \u05E0\u05D1\u05D7\u05E8\u05D5)"
|
|
5471
5709
|
] }) : null
|
|
5472
5710
|
] }),
|
|
5473
|
-
/* @__PURE__ */
|
|
5711
|
+
/* @__PURE__ */ jsx12(
|
|
5474
5712
|
"button",
|
|
5475
5713
|
{
|
|
5476
5714
|
type: "button",
|
|
5477
5715
|
onClick: onClose,
|
|
5478
5716
|
className: "text-slate-400 hover:text-slate-600 p-0.5 rounded hover:bg-slate-100 transition-colors cursor-pointer",
|
|
5479
5717
|
title: "\u05E1\u05D2\u05D5\u05E8",
|
|
5480
|
-
children: /* @__PURE__ */
|
|
5718
|
+
children: /* @__PURE__ */ jsx12(X7, { className: "w-3.5 h-3.5" })
|
|
5481
5719
|
}
|
|
5482
5720
|
)
|
|
5483
5721
|
] }),
|
|
5484
5722
|
/* @__PURE__ */ jsxs11("div", { className: "relative mb-2", children: [
|
|
5485
|
-
/* @__PURE__ */
|
|
5486
|
-
/* @__PURE__ */
|
|
5723
|
+
/* @__PURE__ */ jsx12(Search2, { className: "w-3.5 h-3.5 text-slate-400 absolute right-2.5 top-1/2 -translate-y-1/2 pointer-events-none" }),
|
|
5724
|
+
/* @__PURE__ */ jsx12(
|
|
5487
5725
|
"input",
|
|
5488
5726
|
{
|
|
5489
5727
|
ref: searchInputRef,
|
|
@@ -5494,19 +5732,19 @@ function RelationFilterPopover({
|
|
|
5494
5732
|
className: "h-7 text-xs pr-7 pl-6 w-full rounded-md border border-slate-200 bg-slate-50 focus:bg-white focus:border-brand focus:ring-1 focus:ring-brand text-slate-800 transition-all placeholder:text-slate-400"
|
|
5495
5733
|
}
|
|
5496
5734
|
),
|
|
5497
|
-
searchQuery && /* @__PURE__ */
|
|
5735
|
+
searchQuery && /* @__PURE__ */ jsx12(
|
|
5498
5736
|
"button",
|
|
5499
5737
|
{
|
|
5500
5738
|
type: "button",
|
|
5501
5739
|
onClick: () => setSearchQuery(""),
|
|
5502
5740
|
className: "absolute left-1.5 top-1/2 -translate-y-1/2 p-0.5 text-slate-400 hover:text-slate-600 rounded",
|
|
5503
|
-
children: /* @__PURE__ */
|
|
5741
|
+
children: /* @__PURE__ */ jsx12(X7, { className: "w-3 h-3" })
|
|
5504
5742
|
}
|
|
5505
5743
|
)
|
|
5506
5744
|
] }),
|
|
5507
5745
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-1.5 py-1 mb-1 rounded hover:bg-slate-50 transition-colors border-b border-slate-100 pb-1.5", children: [
|
|
5508
5746
|
/* @__PURE__ */ jsxs11("label", { className: "flex items-center gap-2 cursor-pointer text-xs font-medium text-slate-700 flex-1", children: [
|
|
5509
|
-
/* @__PURE__ */
|
|
5747
|
+
/* @__PURE__ */ jsx12(
|
|
5510
5748
|
"input",
|
|
5511
5749
|
{
|
|
5512
5750
|
ref: selectAllRef,
|
|
@@ -5516,7 +5754,7 @@ function RelationFilterPopover({
|
|
|
5516
5754
|
className: "w-3.5 h-3.5 rounded border-slate-300 text-brand focus:ring-brand cursor-pointer accent-[#0d9488]"
|
|
5517
5755
|
}
|
|
5518
5756
|
),
|
|
5519
|
-
/* @__PURE__ */
|
|
5757
|
+
/* @__PURE__ */ jsx12("span", { children: "\u05D1\u05D7\u05E8 \u05D4\u05DB\u05DC" })
|
|
5520
5758
|
] }),
|
|
5521
5759
|
(mode === "exclude" || checkedSet.size > 0) && /* @__PURE__ */ jsxs11(
|
|
5522
5760
|
"button",
|
|
@@ -5526,23 +5764,23 @@ function RelationFilterPopover({
|
|
|
5526
5764
|
className: "text-[11px] text-blue-600 hover:text-blue-700 hover:underline flex items-center gap-1 cursor-pointer",
|
|
5527
5765
|
title: "\u05E0\u05E7\u05D4 \u05E1\u05D9\u05E0\u05D5\u05DF \u05D5\u05D4\u05E6\u05D2 \u05D4\u05DB\u05DC",
|
|
5528
5766
|
children: [
|
|
5529
|
-
/* @__PURE__ */
|
|
5530
|
-
/* @__PURE__ */
|
|
5767
|
+
/* @__PURE__ */ jsx12(RotateCcw, { className: "w-2.5 h-2.5" }),
|
|
5768
|
+
/* @__PURE__ */ jsx12("span", { children: "\u05E0\u05E7\u05D4" })
|
|
5531
5769
|
]
|
|
5532
5770
|
}
|
|
5533
5771
|
)
|
|
5534
5772
|
] }),
|
|
5535
|
-
/* @__PURE__ */
|
|
5536
|
-
/* @__PURE__ */
|
|
5537
|
-
/* @__PURE__ */
|
|
5538
|
-
] }) : filteredOptions.length === 0 ? /* @__PURE__ */
|
|
5773
|
+
/* @__PURE__ */ jsx12("div", { className: "max-h-[250px] overflow-y-auto space-y-0.5 custom-scrollbar pr-0.5", children: isLoading ? /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-center py-6 text-slate-400 text-xs", children: [
|
|
5774
|
+
/* @__PURE__ */ jsx12("div", { className: "w-4 h-4 border-2 border-brand border-t-transparent rounded-full animate-spin ml-2" }),
|
|
5775
|
+
/* @__PURE__ */ jsx12("span", { children: "\u05D8\u05D5\u05E2\u05DF \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA..." })
|
|
5776
|
+
] }) : filteredOptions.length === 0 ? /* @__PURE__ */ jsx12("div", { className: "py-6 text-center text-xs text-slate-400", children: "\u05DC\u05D0 \u05E0\u05DE\u05E6\u05D0\u05D5 \u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA" }) : filteredOptions.map((opt) => {
|
|
5539
5777
|
const isChecked = isOptionChecked(opt.label);
|
|
5540
5778
|
return /* @__PURE__ */ jsxs11(
|
|
5541
5779
|
"label",
|
|
5542
5780
|
{
|
|
5543
5781
|
className: `flex items-center gap-2 px-2 py-1 rounded cursor-pointer transition-colors text-xs ${isChecked ? "text-slate-800 font-medium bg-slate-50/60" : "text-slate-500 hover:bg-slate-50"}`,
|
|
5544
5782
|
children: [
|
|
5545
|
-
/* @__PURE__ */
|
|
5783
|
+
/* @__PURE__ */ jsx12(
|
|
5546
5784
|
"input",
|
|
5547
5785
|
{
|
|
5548
5786
|
type: "checkbox",
|
|
@@ -5551,7 +5789,7 @@ function RelationFilterPopover({
|
|
|
5551
5789
|
className: "w-3.5 h-3.5 rounded border-slate-300 text-brand focus:ring-brand cursor-pointer accent-[#0d9488]"
|
|
5552
5790
|
}
|
|
5553
5791
|
),
|
|
5554
|
-
/* @__PURE__ */
|
|
5792
|
+
/* @__PURE__ */ jsx12("span", { className: "truncate flex-1", title: opt.label, children: opt.label })
|
|
5555
5793
|
]
|
|
5556
5794
|
},
|
|
5557
5795
|
opt.id
|
|
@@ -5562,7 +5800,7 @@ function RelationFilterPopover({
|
|
|
5562
5800
|
filteredOptions.length,
|
|
5563
5801
|
" \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA"
|
|
5564
5802
|
] }),
|
|
5565
|
-
/* @__PURE__ */
|
|
5803
|
+
/* @__PURE__ */ jsx12(
|
|
5566
5804
|
"button",
|
|
5567
5805
|
{
|
|
5568
5806
|
type: "button",
|
|
@@ -5578,7 +5816,7 @@ function RelationFilterPopover({
|
|
|
5578
5816
|
}
|
|
5579
5817
|
|
|
5580
5818
|
// src/components/TableBlock/TableBlockClient.tsx
|
|
5581
|
-
import { jsx as
|
|
5819
|
+
import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
5582
5820
|
function TableBlockClient({
|
|
5583
5821
|
data: initialRecords,
|
|
5584
5822
|
settings: schema,
|
|
@@ -6940,13 +7178,13 @@ function TableBlockClient({
|
|
|
6940
7178
|
className: `flex flex-col w-full bg-white border border-slate-200 rounded-xl shadow-xs flex-1 min-h-0 overflow-hidden ${className}`,
|
|
6941
7179
|
dir: "rtl",
|
|
6942
7180
|
children: [
|
|
6943
|
-
errorMessage && /* @__PURE__ */
|
|
6944
|
-
/* @__PURE__ */
|
|
6945
|
-
/* @__PURE__ */
|
|
7181
|
+
errorMessage && /* @__PURE__ */ jsx13("div", { className: "p-3 bg-rose-50 border-b border-rose-200 text-rose-700 text-sm flex items-center justify-between shrink-0", children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
|
|
7182
|
+
/* @__PURE__ */ jsx13("svg", { className: "w-4 h-4 text-rose-500 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" }) }),
|
|
7183
|
+
/* @__PURE__ */ jsx13("span", { children: errorMessage })
|
|
6946
7184
|
] }) }),
|
|
6947
7185
|
/* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center justify-between gap-3 p-3.5 sm:p-4 bg-slate-50 border-b border-slate-200 shrink-0", children: [
|
|
6948
7186
|
/* @__PURE__ */ jsxs12("div", { className: "flex flex-wrap items-center gap-2.5", children: [
|
|
6949
|
-
((schema == null ? void 0 : schema.title) || (schema == null ? void 0 : schema.name)) && /* @__PURE__ */
|
|
7187
|
+
((schema == null ? void 0 : schema.title) || (schema == null ? void 0 : schema.name)) && /* @__PURE__ */ jsx13("div", { className: "font-bold text-slate-800 text-sm sm:text-base border-l border-slate-300 pl-3 ml-1", children: /* @__PURE__ */ jsx13("span", { children: schema.title || schema.name }) }),
|
|
6950
7188
|
(() => {
|
|
6951
7189
|
const tableMetaId = (schema == null ? void 0 : schema.tableMetaId) || (schema == null ? void 0 : schema.tableId) || (schema == null ? void 0 : schema.id);
|
|
6952
7190
|
const isOwner = role === "OWNER";
|
|
@@ -6961,30 +7199,30 @@ function TableBlockClient({
|
|
|
6961
7199
|
className: "inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs font-medium bg-white hover:bg-slate-100 border border-slate-300 text-slate-700 hover:text-slate-900 transition-colors shadow-2xs shrink-0 cursor-pointer ml-1",
|
|
6962
7200
|
title: "\u05E2\u05E8\u05D5\u05DA \u05DE\u05D5\u05D3\u05DC \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD \u05D1\u05DC\u05D5\u05D7 \u05D4\u05D1\u05E7\u05E8\u05D4",
|
|
6963
7201
|
children: [
|
|
6964
|
-
/* @__PURE__ */
|
|
6965
|
-
/* @__PURE__ */
|
|
7202
|
+
/* @__PURE__ */ jsx13("span", { children: "\u05E2\u05E8\u05D5\u05DA \u05DE\u05D5\u05D3\u05DC \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD" }),
|
|
7203
|
+
/* @__PURE__ */ jsx13(ExternalLink2, { className: "w-3.5 h-3.5 text-slate-500" })
|
|
6966
7204
|
]
|
|
6967
7205
|
}
|
|
6968
7206
|
);
|
|
6969
7207
|
})(),
|
|
6970
|
-
!effectiveReadOnly && effectivePermissions.canCreate && /* @__PURE__ */
|
|
7208
|
+
!effectiveReadOnly && effectivePermissions.canCreate && /* @__PURE__ */ jsx13(
|
|
6971
7209
|
"button",
|
|
6972
7210
|
{
|
|
6973
7211
|
onClick: handleAddRow,
|
|
6974
7212
|
disabled: isInitialLoading || isLoading || isUpdatingActive,
|
|
6975
7213
|
className: `w-9 h-9 text-white rounded-lg shadow-xs flex items-center justify-center transition-all ${isInitialLoading || isLoading || isUpdatingActive ? "bg-emerald-950/80 text-emerald-400/60 pointer-events-none cursor-not-allowed" : "bg-emerald-600 hover:bg-emerald-700 active:bg-emerald-800 cursor-pointer"}`,
|
|
6976
7214
|
title: isInitialLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05D4\u05D5\u05E1\u05E3 \u05E9\u05D5\u05E8\u05D4 \u05D7\u05D3\u05E9\u05D4",
|
|
6977
|
-
children: /* @__PURE__ */
|
|
7215
|
+
children: /* @__PURE__ */ jsx13("svg", { className: "w-4.5 h-4.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2.5", d: "M12 4v16m8-8H4" }) })
|
|
6978
7216
|
}
|
|
6979
7217
|
),
|
|
6980
|
-
!effectiveReadOnly && effectivePermissions.canCreate && /* @__PURE__ */
|
|
7218
|
+
!effectiveReadOnly && effectivePermissions.canCreate && /* @__PURE__ */ jsx13(
|
|
6981
7219
|
"button",
|
|
6982
7220
|
{
|
|
6983
7221
|
onClick: handleDuplicateRow,
|
|
6984
7222
|
disabled: isInitialLoading || isLoading || isUpdatingActive || selectedIds.size !== 1,
|
|
6985
7223
|
className: "w-9 h-9 bg-blue-50 hover:bg-blue-100 border border-blue-200 text-blue-700 rounded-lg shadow-2xs flex items-center justify-center transition-all disabled:opacity-40 disabled:pointer-events-none cursor-pointer",
|
|
6986
7224
|
title: "\u05E9\u05DB\u05E4\u05DC \u05E9\u05D5\u05E8\u05D4 \u05E0\u05D1\u05D7\u05E8\u05EA",
|
|
6987
|
-
children: /* @__PURE__ */
|
|
7225
|
+
children: /* @__PURE__ */ jsx13(Copy2, { className: "w-4 h-4 text-blue-600 shrink-0" })
|
|
6988
7226
|
}
|
|
6989
7227
|
),
|
|
6990
7228
|
!effectiveReadOnly && effectivePermissions.canDelete && /* @__PURE__ */ jsxs12(
|
|
@@ -6995,8 +7233,8 @@ function TableBlockClient({
|
|
|
6995
7233
|
className: "w-9 h-9 bg-rose-50 hover:bg-rose-100 border border-rose-200 text-rose-700 rounded-lg shadow-2xs flex items-center justify-center relative transition-all disabled:opacity-40 disabled:pointer-events-none cursor-pointer",
|
|
6996
7234
|
title: "\u05DE\u05D7\u05E7 \u05E9\u05D5\u05E8\u05D5\u05EA \u05E0\u05D1\u05D7\u05E8\u05D5\u05EA",
|
|
6997
7235
|
children: [
|
|
6998
|
-
/* @__PURE__ */
|
|
6999
|
-
selectedIds.size > 0 && /* @__PURE__ */
|
|
7236
|
+
/* @__PURE__ */ jsx13("svg", { className: "w-4.5 h-4.5 text-rose-600 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" }) }),
|
|
7237
|
+
selectedIds.size > 0 && /* @__PURE__ */ jsx13("span", { className: "absolute -top-1.5 -right-1.5 bg-rose-600 text-white min-w-[18px] h-[18px] px-1 rounded-full text-[10px] font-bold flex items-center justify-center shadow-xs", children: selectedIds.size })
|
|
7000
7238
|
]
|
|
7001
7239
|
}
|
|
7002
7240
|
),
|
|
@@ -7008,8 +7246,8 @@ function TableBlockClient({
|
|
|
7008
7246
|
className: `h-9 px-3 border font-semibold rounded-lg shadow-2xs flex items-center gap-1.5 text-xs transition-all disabled:opacity-40 disabled:pointer-events-none cursor-pointer ${showSummary ? "bg-indigo-50 border-indigo-200 text-indigo-700 hover:bg-indigo-100" : "bg-white border-slate-300 text-slate-700 hover:bg-slate-100"}`,
|
|
7009
7247
|
title: "\u05D4\u05E6\u05D2/\u05D4\u05E1\u05EA\u05E8 \u05E9\u05D5\u05E8\u05EA \u05E1\u05D9\u05DB\u05D5\u05DD",
|
|
7010
7248
|
children: [
|
|
7011
|
-
/* @__PURE__ */
|
|
7012
|
-
/* @__PURE__ */
|
|
7249
|
+
/* @__PURE__ */ jsx13("svg", { className: "w-4 h-4 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) }),
|
|
7250
|
+
/* @__PURE__ */ jsx13("span", { className: "hidden sm:inline", children: "\u05E1\u05DB\u05D9\u05DE\u05D4" })
|
|
7013
7251
|
]
|
|
7014
7252
|
}
|
|
7015
7253
|
),
|
|
@@ -7022,15 +7260,15 @@ function TableBlockClient({
|
|
|
7022
7260
|
className: "h-9 px-3 bg-white hover:bg-slate-100 border border-slate-300 text-slate-700 font-semibold rounded-lg shadow-2xs flex items-center gap-1.5 text-xs transition-all disabled:opacity-40 disabled:pointer-events-none cursor-pointer",
|
|
7023
7261
|
title: "\u05D4\u05E6\u05D2/\u05D4\u05E1\u05EA\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA",
|
|
7024
7262
|
children: [
|
|
7025
|
-
/* @__PURE__ */
|
|
7026
|
-
/* @__PURE__ */
|
|
7263
|
+
/* @__PURE__ */ jsx13("svg", { className: "w-4 h-4 text-slate-600 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M9 17V7m0 10a2 2 0 01-2 2H5a2 2 0 01-2-2V7a2 2 0 012-2h2a2 2 0 012 2m0 10a2 2 0 002 2h2a2 2 0 002-2M9 7a2 2 0 012-2h2a2 2 0 012 2m0 10V7m0 10a2 2 0 002 2h2a2 2 0 002-2V7a2 2 0 00-2-2h-2a2 2 0 00-2 2" }) }),
|
|
7264
|
+
/* @__PURE__ */ jsx13("svg", { className: `w-3.5 h-3.5 text-slate-500 transition-transform ${isColumnsDropdownOpen ? "rotate-180" : ""}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M19 9l-7 7-7-7" }) })
|
|
7027
7265
|
]
|
|
7028
7266
|
}
|
|
7029
7267
|
),
|
|
7030
7268
|
isColumnsDropdownOpen && /* @__PURE__ */ jsxs12("div", { className: "absolute right-0 top-full mt-1.5 w-56 bg-white border border-slate-200 rounded-xl shadow-xl z-50 p-1.5 dir-rtl animate-in fade-in slide-in-from-top-2 duration-150", children: [
|
|
7031
7269
|
/* @__PURE__ */ jsxs12("div", { className: "px-2 py-1.5 text-xs font-bold text-slate-500 border-b border-slate-100 mb-1 flex items-center justify-between", children: [
|
|
7032
7270
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-1.5", children: [
|
|
7033
|
-
/* @__PURE__ */
|
|
7271
|
+
/* @__PURE__ */ jsx13("span", { children: "\u05D4\u05E6\u05D2\u05EA \u05E2\u05DE\u05D5\u05D3\u05D5\u05EA" }),
|
|
7034
7272
|
/* @__PURE__ */ jsxs12("span", { className: "text-[10px] font-normal text-slate-400", children: [
|
|
7035
7273
|
"(",
|
|
7036
7274
|
customizableColumns.filter((c) => !c.isHidden).length,
|
|
@@ -7039,7 +7277,7 @@ function TableBlockClient({
|
|
|
7039
7277
|
")"
|
|
7040
7278
|
] })
|
|
7041
7279
|
] }),
|
|
7042
|
-
/* @__PURE__ */
|
|
7280
|
+
/* @__PURE__ */ jsx13(
|
|
7043
7281
|
"button",
|
|
7044
7282
|
{
|
|
7045
7283
|
type: "button",
|
|
@@ -7049,7 +7287,7 @@ function TableBlockClient({
|
|
|
7049
7287
|
}
|
|
7050
7288
|
)
|
|
7051
7289
|
] }),
|
|
7052
|
-
/* @__PURE__ */
|
|
7290
|
+
/* @__PURE__ */ jsx13("div", { className: "max-h-60 overflow-y-auto space-y-0.5", children: customizableColumns.map((col) => {
|
|
7053
7291
|
const isRequired = col.isRequired === true || String(col.isRequired) === "true";
|
|
7054
7292
|
const isUnique = col.isUnique === true || String(col.isUnique) === "true";
|
|
7055
7293
|
const isProtected = isRequired || isUnique;
|
|
@@ -7075,7 +7313,7 @@ function TableBlockClient({
|
|
|
7075
7313
|
className: `group flex items-center justify-between px-2.5 py-1.5 rounded-lg text-xs transition-colors select-none ${isProtected ? "opacity-75 bg-slate-50 border border-slate-100/70 cursor-not-allowed" : "hover:bg-slate-100 active:bg-slate-200 cursor-pointer"}`,
|
|
7076
7314
|
children: [
|
|
7077
7315
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2 min-w-0", children: [
|
|
7078
|
-
/* @__PURE__ */
|
|
7316
|
+
/* @__PURE__ */ jsx13(
|
|
7079
7317
|
"input",
|
|
7080
7318
|
{
|
|
7081
7319
|
type: "checkbox",
|
|
@@ -7086,7 +7324,7 @@ function TableBlockClient({
|
|
|
7086
7324
|
className: "w-3.5 h-3.5 rounded border-slate-300 text-brand focus:ring-brand/20 cursor-pointer disabled:cursor-not-allowed disabled:opacity-60"
|
|
7087
7325
|
}
|
|
7088
7326
|
),
|
|
7089
|
-
/* @__PURE__ */
|
|
7327
|
+
/* @__PURE__ */ jsx13("span", { className: `font-medium truncate ${isProtected ? "text-slate-500" : "text-slate-700"}`, children: col.name })
|
|
7090
7328
|
] }),
|
|
7091
7329
|
isProtected && /* @__PURE__ */ jsxs12(
|
|
7092
7330
|
"div",
|
|
@@ -7094,8 +7332,8 @@ function TableBlockClient({
|
|
|
7094
7332
|
className: "flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-semibold bg-amber-50 text-amber-800 border border-amber-200/80 cursor-help",
|
|
7095
7333
|
title: protectedExplanation,
|
|
7096
7334
|
children: [
|
|
7097
|
-
/* @__PURE__ */
|
|
7098
|
-
/* @__PURE__ */
|
|
7335
|
+
/* @__PURE__ */ jsx13("svg", { className: "w-3 h-3 text-amber-600 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: "2.2", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z" }) }),
|
|
7336
|
+
/* @__PURE__ */ jsx13("span", { children: badgeLabel })
|
|
7099
7337
|
]
|
|
7100
7338
|
}
|
|
7101
7339
|
)
|
|
@@ -7115,14 +7353,14 @@ function TableBlockClient({
|
|
|
7115
7353
|
title: exportButtonText,
|
|
7116
7354
|
"data-testid": "export-csv-button",
|
|
7117
7355
|
children: [
|
|
7118
|
-
isExporting ? /* @__PURE__ */
|
|
7119
|
-
/* @__PURE__ */
|
|
7356
|
+
isExporting ? /* @__PURE__ */ jsx13(Loader23, { className: "w-4 h-4 shrink-0 animate-spin text-slate-500" }) : /* @__PURE__ */ jsx13(ExportButtonIcon, { className: "w-4 h-4 shrink-0" }),
|
|
7357
|
+
/* @__PURE__ */ jsx13("span", { children: isExporting ? "\u05DE\u05D9\u05D9\u05E6\u05D0..." : exportButtonText })
|
|
7120
7358
|
]
|
|
7121
7359
|
}
|
|
7122
7360
|
),
|
|
7123
|
-
/* @__PURE__ */
|
|
7361
|
+
/* @__PURE__ */ jsx13("div", { className: "h-5 w-px bg-slate-300 mx-1 hidden sm:block" }),
|
|
7124
7362
|
/* @__PURE__ */ jsxs12("div", { className: "relative flex-1 sm:w-64 max-w-xs", children: [
|
|
7125
|
-
/* @__PURE__ */
|
|
7363
|
+
/* @__PURE__ */ jsx13(
|
|
7126
7364
|
"input",
|
|
7127
7365
|
{
|
|
7128
7366
|
placeholder: "\u05D7\u05D9\u05E4\u05D5\u05E9 \u05D1\u05E8\u05E9\u05D5\u05DE\u05D5\u05EA...",
|
|
@@ -7132,28 +7370,28 @@ function TableBlockClient({
|
|
|
7132
7370
|
className: "w-full h-9 px-3 pr-9 text-xs border border-slate-300 rounded-lg bg-white shadow-2xs focus:outline-none focus:ring-2 focus:ring-blue-500/20 focus:border-blue-500 text-slate-800 disabled:opacity-50"
|
|
7133
7371
|
}
|
|
7134
7372
|
),
|
|
7135
|
-
searchQuery ? /* @__PURE__ */
|
|
7373
|
+
searchQuery ? /* @__PURE__ */ jsx13(
|
|
7136
7374
|
"button",
|
|
7137
7375
|
{
|
|
7138
7376
|
type: "button",
|
|
7139
7377
|
onClick: () => setSearchQuery(""),
|
|
7140
7378
|
className: "absolute right-2.5 top-2.5 text-slate-400 hover:text-slate-600 transition-colors p-0.5 rounded-full hover:bg-slate-100 cursor-pointer",
|
|
7141
7379
|
title: "Clear search",
|
|
7142
|
-
children: /* @__PURE__ */
|
|
7380
|
+
children: /* @__PURE__ */ jsx13(X8, { className: "w-3.5 h-3.5" })
|
|
7143
7381
|
}
|
|
7144
|
-
) : /* @__PURE__ */
|
|
7382
|
+
) : /* @__PURE__ */ jsx13("svg", { className: "w-4 h-4 text-slate-400 absolute right-2.5 top-2.5", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2", d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" }) })
|
|
7145
7383
|
] })
|
|
7146
7384
|
] }),
|
|
7147
7385
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-3", children: [
|
|
7148
7386
|
isUpdatingActive ? /* @__PURE__ */ jsxs12("span", { className: "text-xs text-blue-600 font-semibold flex items-center gap-1.5 bg-blue-50 border border-blue-200 px-3 py-1.5 rounded-lg animate-pulse", children: [
|
|
7149
|
-
/* @__PURE__ */
|
|
7387
|
+
/* @__PURE__ */ jsx13("span", { className: "w-2 h-2 rounded-full bg-blue-500 inline-block" }),
|
|
7150
7388
|
"\u05DE\u05E2\u05D3\u05DB\u05DF..."
|
|
7151
7389
|
] }) : isSaveSuccess ? /* @__PURE__ */ jsxs12("span", { className: "text-xs text-emerald-700 font-semibold flex items-center gap-1.5 bg-emerald-50 border border-emerald-200 px-3 py-1.5 rounded-lg animate-in fade-in duration-200", children: [
|
|
7152
|
-
/* @__PURE__ */
|
|
7390
|
+
/* @__PURE__ */ jsx13("svg", { className: "w-4 h-4 text-emerald-600 shrink-0", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2.5", d: "M5 13l4 4L19 7" }) }),
|
|
7153
7391
|
"\u05E2\u05D5\u05D3\u05DB\u05DF \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4"
|
|
7154
7392
|
] }) : !effectiveReadOnly && effectivePermissions.canUpdate && hasChanges ? /* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-1.5 animate-in fade-in", children: [
|
|
7155
|
-
/* @__PURE__ */
|
|
7156
|
-
/* @__PURE__ */
|
|
7393
|
+
/* @__PURE__ */ jsx13("span", { className: "text-xs font-semibold text-amber-700", children: "\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05E9\u05DC\u05D0 \u05E0\u05E9\u05DE\u05E8\u05D5" }),
|
|
7394
|
+
/* @__PURE__ */ jsx13(
|
|
7157
7395
|
"button",
|
|
7158
7396
|
{
|
|
7159
7397
|
type: "button",
|
|
@@ -7162,31 +7400,31 @@ function TableBlockClient({
|
|
|
7162
7400
|
className: "p-1 text-amber-700 hover:text-amber-900 hover:bg-amber-100/80 active:bg-amber-200/80 rounded-md transition-colors cursor-pointer disabled:opacity-50 disabled:pointer-events-none",
|
|
7163
7401
|
title: "\u05D1\u05D8\u05DC \u05D0\u05EA \u05DB\u05DC \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05E9\u05DC\u05D0 \u05E0\u05E9\u05DE\u05E8\u05D5",
|
|
7164
7402
|
"aria-label": "\u05D1\u05D8\u05DC \u05D0\u05EA \u05DB\u05DC \u05D4\u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD \u05E9\u05DC\u05D0 \u05E0\u05E9\u05DE\u05E8\u05D5",
|
|
7165
|
-
children: /* @__PURE__ */
|
|
7403
|
+
children: /* @__PURE__ */ jsx13(RotateCcw2, { className: "w-3.5 h-3.5" })
|
|
7166
7404
|
}
|
|
7167
7405
|
)
|
|
7168
7406
|
] }) : null,
|
|
7169
|
-
!effectiveReadOnly && effectivePermissions.canUpdate && /* @__PURE__ */
|
|
7407
|
+
!effectiveReadOnly && effectivePermissions.canUpdate && /* @__PURE__ */ jsx13(
|
|
7170
7408
|
"button",
|
|
7171
7409
|
{
|
|
7172
7410
|
onClick: handleSave,
|
|
7173
7411
|
disabled: isUpdatingActive || isLoading || !hasChanges,
|
|
7174
7412
|
className: `h-9 px-4 text-xs font-bold rounded-lg shadow-2xs transition-all flex items-center justify-center cursor-pointer ${hasChanges && !isUpdatingActive && !isLoading ? "bg-brand hover:bg-brand-hover active:bg-[#00897b] text-white shadow-teal-500/20" : "opacity-50 grayscale bg-slate-200 text-slate-400 cursor-not-allowed"}`,
|
|
7175
|
-
children: /* @__PURE__ */
|
|
7413
|
+
children: /* @__PURE__ */ jsx13("span", { children: isUpdatingActive ? "\u05E9\u05D5\u05DE\u05E8..." : "\u05E9\u05DE\u05D9\u05E8\u05EA \u05E9\u05D9\u05E0\u05D5\u05D9\u05D9\u05DD" })
|
|
7176
7414
|
}
|
|
7177
7415
|
)
|
|
7178
7416
|
] })
|
|
7179
7417
|
] }),
|
|
7180
7418
|
/* @__PURE__ */ jsxs12("div", { className: `overflow-x-auto overflow-y-auto relative max-h-[calc(100vh-240px)] min-h-[260px] flex-1 transition-opacity duration-200 ${isMounted ? "opacity-100" : "opacity-0"}`, children: [
|
|
7181
|
-
isFetching && /* @__PURE__ */
|
|
7419
|
+
isFetching && /* @__PURE__ */ jsx13("div", { className: "absolute top-0 left-0 right-0 h-0.5 bg-blue-500/20 overflow-hidden z-30", children: /* @__PURE__ */ jsx13("div", { className: "w-full h-full bg-brand animate-pulse" }) }),
|
|
7182
7420
|
isLoading && /* @__PURE__ */ jsxs12("div", { className: "absolute inset-0 bg-white/80 backdrop-blur-xs z-20 flex flex-col items-center justify-center gap-2", children: [
|
|
7183
|
-
/* @__PURE__ */
|
|
7184
|
-
/* @__PURE__ */
|
|
7421
|
+
/* @__PURE__ */ jsx13("div", { className: "w-6 h-6 border-2 border-brand border-t-transparent rounded-full animate-spin" }),
|
|
7422
|
+
/* @__PURE__ */ jsx13("span", { className: "text-sm font-medium text-slate-600", children: "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." })
|
|
7185
7423
|
] }),
|
|
7186
7424
|
/* @__PURE__ */ jsxs12("table", { className: "w-full text-sm text-right border-collapse table-auto", children: [
|
|
7187
|
-
/* @__PURE__ */
|
|
7188
|
-
/* @__PURE__ */
|
|
7189
|
-
/* @__PURE__ */
|
|
7425
|
+
/* @__PURE__ */ jsx13("thead", { className: "bg-white text-slate-700 sticky top-0 z-10 shadow-xs", children: /* @__PURE__ */ jsxs12("tr", { className: "h-12 min-h-[48px]", children: [
|
|
7426
|
+
/* @__PURE__ */ jsx13("th", { className: "border-b border-l border-slate-200 p-1.5 text-center shrink-0 h-12 min-h-[48px] align-middle bg-white", style: { width: 80, minWidth: 80, maxWidth: 80 }, children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-center gap-1.5", children: [
|
|
7427
|
+
/* @__PURE__ */ jsx13(
|
|
7190
7428
|
"input",
|
|
7191
7429
|
{
|
|
7192
7430
|
type: "checkbox",
|
|
@@ -7199,7 +7437,7 @@ function TableBlockClient({
|
|
|
7199
7437
|
filteredColumns.some((c) => {
|
|
7200
7438
|
var _a;
|
|
7201
7439
|
return ((_a = c.type) == null ? void 0 : _a.toUpperCase()) === "SUB_TABLE";
|
|
7202
|
-
}) && /* @__PURE__ */
|
|
7440
|
+
}) && /* @__PURE__ */ jsx13("div", { className: "w-5 h-5 shrink-0" })
|
|
7203
7441
|
] }) }),
|
|
7204
7442
|
filteredColumns.map((col) => {
|
|
7205
7443
|
var _a, _b;
|
|
@@ -7229,7 +7467,7 @@ function TableBlockClient({
|
|
|
7229
7467
|
}, dragProps), {
|
|
7230
7468
|
className: `group relative border-b border-l border-slate-200 px-2 py-1 font-semibold text-slate-700 select-none transition-colors h-12 min-h-[48px] align-middle bg-white ${isSearching ? "cursor-default bg-blue-50/40" : canReorderColumns ? "cursor-grab active:cursor-grabbing hover:bg-slate-100" : "cursor-default"} ${isDragging ? "opacity-40 bg-slate-200 border-dashed border-2 border-brand" : ""} ${isDragOver ? "bg-blue-50 border-r-4 border-r-brand text-brand font-bold" : ""}`,
|
|
7231
7469
|
children: [
|
|
7232
|
-
/* @__PURE__ */
|
|
7470
|
+
/* @__PURE__ */ jsx13(
|
|
7233
7471
|
"div",
|
|
7234
7472
|
{
|
|
7235
7473
|
onMouseDown: (e) => {
|
|
@@ -7249,7 +7487,7 @@ function TableBlockClient({
|
|
|
7249
7487
|
onClick: (e) => e.stopPropagation(),
|
|
7250
7488
|
onMouseDown: (e) => e.stopPropagation(),
|
|
7251
7489
|
children: [
|
|
7252
|
-
/* @__PURE__ */
|
|
7490
|
+
/* @__PURE__ */ jsx13("div", { className: "relative flex items-center w-full min-w-0", children: /* @__PURE__ */ jsx13(
|
|
7253
7491
|
"input",
|
|
7254
7492
|
{
|
|
7255
7493
|
autoFocus: true,
|
|
@@ -7267,7 +7505,7 @@ function TableBlockClient({
|
|
|
7267
7505
|
className: "h-7 text-xs px-2 w-full rounded border border-blue-400 bg-white text-slate-800 focus:outline-none focus:ring-1 focus:ring-blue-400"
|
|
7268
7506
|
}
|
|
7269
7507
|
) }),
|
|
7270
|
-
/* @__PURE__ */
|
|
7508
|
+
/* @__PURE__ */ jsx13(
|
|
7271
7509
|
"button",
|
|
7272
7510
|
{
|
|
7273
7511
|
type: "button",
|
|
@@ -7282,13 +7520,13 @@ function TableBlockClient({
|
|
|
7282
7520
|
},
|
|
7283
7521
|
className: "p-1 text-slate-400 hover:text-slate-700 hover:bg-slate-200/70 rounded transition-colors cursor-pointer shrink-0",
|
|
7284
7522
|
title: "\u05E0\u05E7\u05D4 \u05D5\u05E1\u05D2\u05D5\u05E8 \u05D7\u05D9\u05E4\u05D5\u05E9",
|
|
7285
|
-
children: /* @__PURE__ */
|
|
7523
|
+
children: /* @__PURE__ */ jsx13(X8, { className: "w-3.5 h-3.5" })
|
|
7286
7524
|
}
|
|
7287
7525
|
)
|
|
7288
7526
|
]
|
|
7289
7527
|
}
|
|
7290
7528
|
) : /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center w-full h-full min-w-0 select-none py-0.5", title: col.name, children: [
|
|
7291
|
-
((_b = col.type) == null ? void 0 : _b.toUpperCase()) !== "SUB_TABLE" && /* @__PURE__ */
|
|
7529
|
+
((_b = col.type) == null ? void 0 : _b.toUpperCase()) !== "SUB_TABLE" && /* @__PURE__ */ jsx13(
|
|
7292
7530
|
"button",
|
|
7293
7531
|
{
|
|
7294
7532
|
ref: (el) => {
|
|
@@ -7316,21 +7554,21 @@ function TableBlockClient({
|
|
|
7316
7554
|
},
|
|
7317
7555
|
className: `p-0.5 rounded transition-colors cursor-pointer mb-0.5 shrink-0 ${hasActiveFilter ? "opacity-100 text-blue-600 bg-blue-100 hover:bg-blue-200" : activeRelationCol === col.name ? "opacity-100 text-blue-600 bg-blue-100" : isRelation ? "opacity-100 text-slate-400 hover:text-slate-600 hover:bg-slate-200/60" : "opacity-0 group-hover:opacity-100 text-slate-400 hover:text-slate-600 hover:bg-slate-200/60"}`,
|
|
7318
7556
|
title: filterTooltip,
|
|
7319
|
-
children: /* @__PURE__ */
|
|
7557
|
+
children: /* @__PURE__ */ jsx13(Filter, { className: "w-3 h-3" })
|
|
7320
7558
|
}
|
|
7321
7559
|
),
|
|
7322
|
-
/* @__PURE__ */
|
|
7560
|
+
/* @__PURE__ */ jsx13(ColumnHeaderTitle, { name: col.name, width: currentWidth, isSubTable: false })
|
|
7323
7561
|
] })
|
|
7324
7562
|
]
|
|
7325
7563
|
}),
|
|
7326
7564
|
col.name
|
|
7327
7565
|
);
|
|
7328
7566
|
}),
|
|
7329
|
-
/* @__PURE__ */
|
|
7567
|
+
/* @__PURE__ */ jsx13("th", { className: "w-full min-w-[50px] border-b border-slate-200 pointer-events-none h-12 min-h-[48px] bg-white" })
|
|
7330
7568
|
] }) }),
|
|
7331
|
-
/* @__PURE__ */
|
|
7332
|
-
/* @__PURE__ */
|
|
7333
|
-
/* @__PURE__ */
|
|
7569
|
+
/* @__PURE__ */ jsx13("tbody", { className: `bg-white transition-opacity duration-150 ${isFetching ? "opacity-50 pointer-events-none" : "opacity-100"}`, children: (isStateEmpty || filteredData.length === 0) && !isLoading && !isFetching ? /* @__PURE__ */ jsx13("tr", { children: /* @__PURE__ */ jsx13("td", { colSpan: filteredColumns.length + 2, className: "text-center py-12 text-slate-400", children: /* @__PURE__ */ jsxs12("div", { className: "flex flex-col items-center justify-center gap-2", children: [
|
|
7570
|
+
/* @__PURE__ */ jsx13("svg", { className: "w-8 h-8 text-slate-300", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5", d: "M20 13V6a2 2 0 00-2-2H6a2 2 0 00-2 2v7m16 0v5a2 2 0 01-2 2H6a2 2 0 01-2-2v-5m16 0h-2.586a1 1 0 00-.707.293l-2.414 2.414a1 1 0 01-.707.293h-3.172a1 1 0 01-.707-.293l-2.414-2.414A1 1 0 006.586 13H4" }) }),
|
|
7571
|
+
/* @__PURE__ */ jsx13("span", { children: "\u05D0\u05D9\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DC\u05D4\u05E6\u05D2\u05D4." })
|
|
7334
7572
|
] }) }) }) : filteredData.map((row) => {
|
|
7335
7573
|
const hasSubTableCols = filteredColumns.some((c) => {
|
|
7336
7574
|
var _a;
|
|
@@ -7343,7 +7581,7 @@ function TableBlockClient({
|
|
|
7343
7581
|
});
|
|
7344
7582
|
const rowKey = String((row == null ? void 0 : row.id) || (row == null ? void 0 : row._id) || "");
|
|
7345
7583
|
const rowStatus = rowStatusMap ? rowStatusMap[rowKey] || rowStatusMap[row == null ? void 0 : row.id] || rowStatusMap[row == null ? void 0 : row._id] : void 0;
|
|
7346
|
-
return /* @__PURE__ */
|
|
7584
|
+
return /* @__PURE__ */ jsx13(
|
|
7347
7585
|
TableRow,
|
|
7348
7586
|
{
|
|
7349
7587
|
row,
|
|
@@ -7379,8 +7617,8 @@ function TableBlockClient({
|
|
|
7379
7617
|
row.id
|
|
7380
7618
|
);
|
|
7381
7619
|
}) }),
|
|
7382
|
-
showSummary && filteredData.length > 0 && /* @__PURE__ */
|
|
7383
|
-
/* @__PURE__ */
|
|
7620
|
+
showSummary && filteredData.length > 0 && /* @__PURE__ */ jsx13("tfoot", { className: "bg-slate-50 border-t-2 border-slate-300 sticky bottom-0 z-10 shadow-[0_-2px_4px_rgba(0,0,0,0.02)]", children: /* @__PURE__ */ jsxs12("tr", { children: [
|
|
7621
|
+
/* @__PURE__ */ jsx13("td", { className: "border-b border-l border-slate-200 p-1.5 text-center font-bold text-slate-600 text-xs", children: '\u05E1\u05D4"\u05DB' }),
|
|
7384
7622
|
filteredColumns.map((col) => {
|
|
7385
7623
|
var _a, _b;
|
|
7386
7624
|
const typeUpper = (_a = col.type) == null ? void 0 : _a.toUpperCase();
|
|
@@ -7394,15 +7632,15 @@ function TableBlockClient({
|
|
|
7394
7632
|
displayVal = symbol ? `${symbol} ${displayVal}` : displayVal;
|
|
7395
7633
|
}
|
|
7396
7634
|
}
|
|
7397
|
-
return /* @__PURE__ */
|
|
7635
|
+
return /* @__PURE__ */ jsx13("td", { className: "border-b border-l border-slate-200 p-2 text-sm font-semibold text-slate-700 bg-slate-50 relative", children: isNumeric && /* @__PURE__ */ jsx13("div", { className: "flex items-center text-right justify-start", children: /* @__PURE__ */ jsx13("span", { className: "truncate", children: displayVal }) }) }, col.name);
|
|
7398
7636
|
}),
|
|
7399
|
-
/* @__PURE__ */
|
|
7637
|
+
/* @__PURE__ */ jsx13("td", { className: "border-b border-slate-200 bg-slate-50 pointer-events-none" })
|
|
7400
7638
|
] }) })
|
|
7401
7639
|
] })
|
|
7402
7640
|
] }),
|
|
7403
7641
|
/* @__PURE__ */ jsxs12("div", { className: "flex flex-col sm:flex-row items-center justify-between gap-3 px-4 py-3 bg-slate-50 border-t border-slate-200 text-xs text-slate-600 rounded-b-xl shrink-0", children: [
|
|
7404
7642
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-2", children: [
|
|
7405
|
-
/* @__PURE__ */
|
|
7643
|
+
/* @__PURE__ */ jsx13("span", { className: "font-medium text-slate-700", children: "\u05E9\u05D5\u05E8\u05D5\u05EA \u05DC\u05E2\u05DE\u05D5\u05D3:" }),
|
|
7406
7644
|
/* @__PURE__ */ jsxs12(
|
|
7407
7645
|
"select",
|
|
7408
7646
|
{
|
|
@@ -7411,9 +7649,9 @@ function TableBlockClient({
|
|
|
7411
7649
|
disabled: isLoading || isUpdatingActive,
|
|
7412
7650
|
className: "bg-white border border-slate-300 rounded-lg px-2.5 py-1 text-slate-700 font-semibold shadow-2xs cursor-pointer focus:outline-none focus:ring-2 focus:ring-brand disabled:opacity-50",
|
|
7413
7651
|
children: [
|
|
7414
|
-
/* @__PURE__ */
|
|
7415
|
-
/* @__PURE__ */
|
|
7416
|
-
/* @__PURE__ */
|
|
7652
|
+
/* @__PURE__ */ jsx13("option", { value: 20, children: "20" }),
|
|
7653
|
+
/* @__PURE__ */ jsx13("option", { value: 50, children: "50" }),
|
|
7654
|
+
/* @__PURE__ */ jsx13("option", { value: 100, children: "100" })
|
|
7417
7655
|
]
|
|
7418
7656
|
}
|
|
7419
7657
|
)
|
|
@@ -7421,9 +7659,9 @@ function TableBlockClient({
|
|
|
7421
7659
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-4", children: [
|
|
7422
7660
|
/* @__PURE__ */ jsxs12("span", { className: "font-medium text-slate-600", children: [
|
|
7423
7661
|
"\u05E2\u05DE\u05D5\u05D3 ",
|
|
7424
|
-
/* @__PURE__ */
|
|
7662
|
+
/* @__PURE__ */ jsx13("strong", { className: "text-slate-900", children: page }),
|
|
7425
7663
|
" \u05DE\u05EA\u05D5\u05DA ",
|
|
7426
|
-
/* @__PURE__ */
|
|
7664
|
+
/* @__PURE__ */ jsx13("strong", { className: "text-slate-900", children: totalPages || 1 }),
|
|
7427
7665
|
totalRecords > 0 && /* @__PURE__ */ jsxs12("span", { className: "text-slate-500 font-normal", children: [
|
|
7428
7666
|
" (",
|
|
7429
7667
|
totalRecords,
|
|
@@ -7431,7 +7669,7 @@ function TableBlockClient({
|
|
|
7431
7669
|
] })
|
|
7432
7670
|
] }),
|
|
7433
7671
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-1.5", children: [
|
|
7434
|
-
/* @__PURE__ */
|
|
7672
|
+
/* @__PURE__ */ jsx13(
|
|
7435
7673
|
"button",
|
|
7436
7674
|
{
|
|
7437
7675
|
onClick: handlePrevPage,
|
|
@@ -7441,7 +7679,7 @@ function TableBlockClient({
|
|
|
7441
7679
|
children: "\u05D4\u05E7\u05D5\u05D3\u05DD"
|
|
7442
7680
|
}
|
|
7443
7681
|
),
|
|
7444
|
-
/* @__PURE__ */
|
|
7682
|
+
/* @__PURE__ */ jsx13(
|
|
7445
7683
|
"button",
|
|
7446
7684
|
{
|
|
7447
7685
|
onClick: handleNextPage,
|
|
@@ -7459,7 +7697,7 @@ function TableBlockClient({
|
|
|
7459
7697
|
if (!activeColDef) return null;
|
|
7460
7698
|
const rawSelected = columnFilters[activeRelationCol];
|
|
7461
7699
|
const currentSelected = typeof rawSelected === "object" && rawSelected !== null ? rawSelected : void 0;
|
|
7462
|
-
return /* @__PURE__ */
|
|
7700
|
+
return /* @__PURE__ */ jsx13(
|
|
7463
7701
|
RelationFilterPopover,
|
|
7464
7702
|
{
|
|
7465
7703
|
isOpen: Boolean(activeRelationCol),
|
|
@@ -7495,7 +7733,7 @@ function ExpandedSubTables({
|
|
|
7495
7733
|
if (subTableColumns.length === 0) return null;
|
|
7496
7734
|
if (subTableColumns.length === 1) {
|
|
7497
7735
|
const stCol = subTableColumns[0];
|
|
7498
|
-
return /* @__PURE__ */
|
|
7736
|
+
return /* @__PURE__ */ jsx13("tr", { children: /* @__PURE__ */ jsx13("td", { colSpan: filteredColumnsLength + 2, className: "p-0 border-b border-slate-200 bg-slate-50/50", children: /* @__PURE__ */ jsx13(
|
|
7499
7737
|
SubTableViewer,
|
|
7500
7738
|
{
|
|
7501
7739
|
rowId,
|
|
@@ -7507,8 +7745,8 @@ function ExpandedSubTables({
|
|
|
7507
7745
|
) }) });
|
|
7508
7746
|
}
|
|
7509
7747
|
const activeCol = subTableColumns.find((c) => c.name === activeTab) || subTableColumns[0];
|
|
7510
|
-
return /* @__PURE__ */
|
|
7511
|
-
/* @__PURE__ */
|
|
7748
|
+
return /* @__PURE__ */ jsx13("tr", { children: /* @__PURE__ */ jsxs12("td", { colSpan: filteredColumnsLength + 2, className: "p-0 border-b border-slate-200 bg-slate-50/50 overflow-hidden", children: [
|
|
7749
|
+
/* @__PURE__ */ jsx13("div", { className: "flex border-b border-slate-200 bg-slate-100/50 px-2 pt-2 gap-1 overflow-hidden", children: subTableColumns.map((col) => /* @__PURE__ */ jsx13(
|
|
7512
7750
|
"button",
|
|
7513
7751
|
{
|
|
7514
7752
|
type: "button",
|
|
@@ -7518,7 +7756,7 @@ function ExpandedSubTables({
|
|
|
7518
7756
|
},
|
|
7519
7757
|
col.name
|
|
7520
7758
|
)) }),
|
|
7521
|
-
/* @__PURE__ */
|
|
7759
|
+
/* @__PURE__ */ jsx13("div", { className: "bg-white", children: /* @__PURE__ */ jsx13(
|
|
7522
7760
|
SubTableViewer,
|
|
7523
7761
|
{
|
|
7524
7762
|
rowId,
|
|
@@ -7565,12 +7803,12 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7565
7803
|
}) {
|
|
7566
7804
|
return /* @__PURE__ */ jsxs12(React12.Fragment, { children: [
|
|
7567
7805
|
/* @__PURE__ */ jsxs12("tr", { className: `transition-colors group hover:bg-blue-50 ${isSelected ? "bg-blue-50" : ""}`, children: [
|
|
7568
|
-
/* @__PURE__ */
|
|
7806
|
+
/* @__PURE__ */ jsx13("td", { className: "border-b border-l border-slate-200 p-1.5 text-center bg-white group-hover:bg-transparent", style: { width: 80, minWidth: 80, maxWidth: 80 }, children: /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-center gap-1.5", children: [
|
|
7569
7807
|
rowStatus && (() => {
|
|
7570
7808
|
const status = typeof rowStatus === "string" ? rowStatus : rowStatus.status;
|
|
7571
7809
|
const tooltip = typeof rowStatus === "object" && rowStatus.tooltip ? rowStatus.tooltip : void 0;
|
|
7572
7810
|
if (status === "success") {
|
|
7573
|
-
return /* @__PURE__ */
|
|
7811
|
+
return /* @__PURE__ */ jsx13(
|
|
7574
7812
|
"span",
|
|
7575
7813
|
{
|
|
7576
7814
|
className: "text-xs select-none cursor-help inline-flex items-center justify-center",
|
|
@@ -7580,7 +7818,7 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7580
7818
|
);
|
|
7581
7819
|
}
|
|
7582
7820
|
if (status === "failed") {
|
|
7583
|
-
return /* @__PURE__ */
|
|
7821
|
+
return /* @__PURE__ */ jsx13(
|
|
7584
7822
|
"span",
|
|
7585
7823
|
{
|
|
7586
7824
|
className: "text-xs select-none cursor-help inline-flex items-center justify-center",
|
|
@@ -7590,7 +7828,7 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7590
7828
|
);
|
|
7591
7829
|
}
|
|
7592
7830
|
if (status === "skipped") {
|
|
7593
|
-
return /* @__PURE__ */
|
|
7831
|
+
return /* @__PURE__ */ jsx13(
|
|
7594
7832
|
"span",
|
|
7595
7833
|
{
|
|
7596
7834
|
className: "text-xs select-none cursor-help inline-flex items-center justify-center",
|
|
@@ -7600,7 +7838,7 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7600
7838
|
);
|
|
7601
7839
|
}
|
|
7602
7840
|
if (status === "partial") {
|
|
7603
|
-
return /* @__PURE__ */
|
|
7841
|
+
return /* @__PURE__ */ jsx13(
|
|
7604
7842
|
"span",
|
|
7605
7843
|
{
|
|
7606
7844
|
className: "text-xs select-none cursor-help inline-flex items-center justify-center",
|
|
@@ -7611,7 +7849,7 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7611
7849
|
}
|
|
7612
7850
|
return null;
|
|
7613
7851
|
})(),
|
|
7614
|
-
/* @__PURE__ */
|
|
7852
|
+
/* @__PURE__ */ jsx13(
|
|
7615
7853
|
"input",
|
|
7616
7854
|
{
|
|
7617
7855
|
type: "checkbox",
|
|
@@ -7621,14 +7859,14 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7621
7859
|
className: "w-4 h-4 rounded border-slate-300 text-brand"
|
|
7622
7860
|
}
|
|
7623
7861
|
),
|
|
7624
|
-
hasSubTableCols && /* @__PURE__ */
|
|
7862
|
+
hasSubTableCols && /* @__PURE__ */ jsx13(
|
|
7625
7863
|
"button",
|
|
7626
7864
|
{
|
|
7627
7865
|
type: "button",
|
|
7628
7866
|
onClick: () => onToggleExpand(row.id),
|
|
7629
7867
|
className: "w-5 h-5 rounded-full bg-slate-500 hover:bg-slate-600 text-white flex items-center justify-center transition-colors cursor-pointer shrink-0 shadow-sm",
|
|
7630
7868
|
title: isExpanded ? "\u05E1\u05D2\u05D5\u05E8 \u05EA\u05EA-\u05D8\u05D1\u05DC\u05D4" : "\u05E4\u05EA\u05D7 \u05EA\u05EA-\u05D8\u05D1\u05DC\u05D4",
|
|
7631
|
-
children: /* @__PURE__ */
|
|
7869
|
+
children: /* @__PURE__ */ jsx13("svg", { className: `w-3 h-3 transition-transform duration-150 ${isExpanded ? "rotate-90" : "rotate-180"}`, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx13("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "3", d: "M9 5l7 7-7 7" }) })
|
|
7632
7870
|
}
|
|
7633
7871
|
)
|
|
7634
7872
|
] }) }),
|
|
@@ -7646,12 +7884,12 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7646
7884
|
}
|
|
7647
7885
|
}
|
|
7648
7886
|
if (value === void 0) value = null;
|
|
7649
|
-
return /* @__PURE__ */
|
|
7887
|
+
return /* @__PURE__ */ jsx13(
|
|
7650
7888
|
"td",
|
|
7651
7889
|
{
|
|
7652
7890
|
className: `border-b border-l border-slate-200 p-0 relative h-full ${colType === "RELATION" ? "overflow-visible" : "overflow-hidden"}`,
|
|
7653
7891
|
style: { width: currentWidth, minWidth: currentWidth, maxWidth: currentWidth, height: "100%" },
|
|
7654
|
-
children: /* @__PURE__ */
|
|
7892
|
+
children: /* @__PURE__ */ jsx13(
|
|
7655
7893
|
InputComponent,
|
|
7656
7894
|
{
|
|
7657
7895
|
value,
|
|
@@ -7684,9 +7922,9 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7684
7922
|
col.name
|
|
7685
7923
|
);
|
|
7686
7924
|
}),
|
|
7687
|
-
/* @__PURE__ */
|
|
7925
|
+
/* @__PURE__ */ jsx13("td", { className: "border-b border-slate-200 bg-white pointer-events-none" })
|
|
7688
7926
|
] }),
|
|
7689
|
-
isExpanded && /* @__PURE__ */
|
|
7927
|
+
isExpanded && /* @__PURE__ */ jsx13(
|
|
7690
7928
|
ExpandedSubTables,
|
|
7691
7929
|
{
|
|
7692
7930
|
rowId: row.id,
|
|
@@ -7713,9 +7951,9 @@ var TableRow = React12.memo(function TableRow2({
|
|
|
7713
7951
|
});
|
|
7714
7952
|
|
|
7715
7953
|
// src/components/TableBlock/TableBlock.tsx
|
|
7716
|
-
import { jsx as
|
|
7954
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
7717
7955
|
function TableBlock(props) {
|
|
7718
|
-
return /* @__PURE__ */
|
|
7956
|
+
return /* @__PURE__ */ jsx14(TableBlockClient, __spreadValues({}, props));
|
|
7719
7957
|
}
|
|
7720
7958
|
|
|
7721
7959
|
// src/components/PlacementBlock/PlacementBlock.tsx
|
|
@@ -7824,7 +8062,7 @@ function readColumnValue(data, ref) {
|
|
|
7824
8062
|
}
|
|
7825
8063
|
|
|
7826
8064
|
// src/components/PlacementBlock/PlacementSettings.tsx
|
|
7827
|
-
import { Fragment as Fragment3, jsx as
|
|
8065
|
+
import { Fragment as Fragment3, jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
7828
8066
|
var DEFAULT_PLACEMENT_STATUS_COLORS = [
|
|
7829
8067
|
{ id: "1", hex: "#10b981", label: "\u05DE\u05EA\u05D0\u05D9\u05DD / \u05D0\u05D5\u05E9\u05E8" },
|
|
7830
8068
|
{ id: "2", hex: "#f59e0b", label: "\u05DE\u05DE\u05EA\u05D9\u05DF \u05DC\u05E8\u05D0\u05D9\u05D5\u05DF" },
|
|
@@ -7837,15 +8075,15 @@ function resolveDefaultStatusId(list, wanted) {
|
|
|
7837
8075
|
return (_b = (_a = list[0]) == null ? void 0 : _a.id) != null ? _b : "";
|
|
7838
8076
|
}
|
|
7839
8077
|
var SummaryRow = ({ label, value, hint }) => /* @__PURE__ */ jsxs13("div", { className: "flex items-start gap-2 text-sm", children: [
|
|
7840
|
-
/* @__PURE__ */
|
|
8078
|
+
/* @__PURE__ */ jsx15("span", { className: value ? "text-emerald-600" : "text-slate-300", children: value ? "\u2713" : "\u25CB" }),
|
|
7841
8079
|
/* @__PURE__ */ jsxs13("span", { className: "text-slate-500 shrink-0", children: [
|
|
7842
8080
|
label,
|
|
7843
8081
|
":"
|
|
7844
8082
|
] }),
|
|
7845
8083
|
value ? /* @__PURE__ */ jsxs13("span", { className: "font-semibold text-slate-800 break-words", children: [
|
|
7846
8084
|
value,
|
|
7847
|
-
hint && /* @__PURE__ */
|
|
7848
|
-
] }) : /* @__PURE__ */
|
|
8085
|
+
hint && /* @__PURE__ */ jsx15("span", { className: "mr-2 text-[11px] font-normal text-indigo-600", children: hint })
|
|
8086
|
+
] }) : /* @__PURE__ */ jsx15("span", { className: "text-slate-400", children: "\u05D8\u05E8\u05DD \u05E0\u05D1\u05D7\u05E8" })
|
|
7849
8087
|
] });
|
|
7850
8088
|
var PlacementStatusEditor = ({ config, onChange }) => {
|
|
7851
8089
|
var _a;
|
|
@@ -7872,10 +8110,10 @@ var PlacementStatusEditor = ({ config, onChange }) => {
|
|
|
7872
8110
|
setStatuses(next);
|
|
7873
8111
|
};
|
|
7874
8112
|
return /* @__PURE__ */ jsxs13("div", { className: "p-4 border border-emerald-200 bg-emerald-50/50 rounded space-y-3", children: [
|
|
7875
|
-
/* @__PURE__ */
|
|
7876
|
-
/* @__PURE__ */
|
|
7877
|
-
/* @__PURE__ */
|
|
7878
|
-
/* @__PURE__ */
|
|
8113
|
+
/* @__PURE__ */ jsx15("h4", { className: "font-semibold text-emerald-900", children: "\u05E9\u05DC\u05D1 3: \u05E1\u05D8\u05D8\u05D5\u05E1\u05D9\u05DD (\u05D4\u05E2\u05D9\u05D2\u05D5\u05DC\u05D9\u05DD \u05D4\u05E6\u05D1\u05E2\u05D5\u05E0\u05D9\u05D9\u05DD)" }),
|
|
8114
|
+
/* @__PURE__ */ jsx15("p", { className: "text-xs text-slate-500", children: "\u05DC\u05D7\u05D9\u05E6\u05D4 \u05E2\u05DC \u05E2\u05D9\u05D2\u05D5\u05DC \u05D1\u05E8\u05DB\u05D9\u05D1 \u05DE\u05D7\u05DC\u05D9\u05E4\u05D4 \u05D1\u05D9\u05DF \u05D4\u05E1\u05D8\u05D8\u05D5\u05E1\u05D9\u05DD \u05DC\u05E4\u05D9 \u05D4\u05E1\u05D3\u05E8 \u05E9\u05DB\u05D0\u05DF. \u05D4\u05D8\u05E7\u05E1\u05D8 \u05DE\u05D5\u05E4\u05D9\u05E2 \u05D1\u05D1\u05D5\u05E2\u05D4 \u05DB\u05E9\u05D4\u05E2\u05DB\u05D1\u05E8 \u05E2\u05D5\u05DE\u05D3 \u05DE\u05E2\u05DC \u05D4\u05E2\u05D9\u05D2\u05D5\u05DC." }),
|
|
8115
|
+
/* @__PURE__ */ jsx15("div", { className: "space-y-2", children: statuses.map((st, i) => /* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-2 bg-white border rounded p-2", children: [
|
|
8116
|
+
/* @__PURE__ */ jsx15(
|
|
7879
8117
|
"input",
|
|
7880
8118
|
{
|
|
7881
8119
|
type: "color",
|
|
@@ -7885,7 +8123,7 @@ var PlacementStatusEditor = ({ config, onChange }) => {
|
|
|
7885
8123
|
"aria-label": "\u05E6\u05D1\u05E2"
|
|
7886
8124
|
}
|
|
7887
8125
|
),
|
|
7888
|
-
/* @__PURE__ */
|
|
8126
|
+
/* @__PURE__ */ jsx15(
|
|
7889
8127
|
"input",
|
|
7890
8128
|
{
|
|
7891
8129
|
type: "text",
|
|
@@ -7896,7 +8134,7 @@ var PlacementStatusEditor = ({ config, onChange }) => {
|
|
|
7896
8134
|
}
|
|
7897
8135
|
),
|
|
7898
8136
|
/* @__PURE__ */ jsxs13("label", { className: "flex items-center gap-1 text-xs text-slate-600 shrink-0 cursor-pointer", title: "\u05D4\u05E1\u05D8\u05D8\u05D5\u05E1 \u05D4\u05D4\u05EA\u05D7\u05DC\u05EA\u05D9, \u05D5\u05D2\u05DD \u05D6\u05D4 \u05E9\u05D0\u05DC\u05D9\u05D5 \u05D7\u05D5\u05D6\u05E8 \u05DE\u05D5\u05E2\u05DE\u05D3 \u05E9\u05DE\u05D5\u05D7\u05D6\u05E8 \u05DC\u05E8\u05E9\u05D9\u05DE\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8", children: [
|
|
7899
|
-
/* @__PURE__ */
|
|
8137
|
+
/* @__PURE__ */ jsx15(
|
|
7900
8138
|
"input",
|
|
7901
8139
|
{
|
|
7902
8140
|
type: "radio",
|
|
@@ -7907,13 +8145,13 @@ var PlacementStatusEditor = ({ config, onChange }) => {
|
|
|
7907
8145
|
),
|
|
7908
8146
|
"\u05D1\u05E8\u05D9\u05E8\u05EA \u05DE\u05D7\u05D3\u05DC"
|
|
7909
8147
|
] }),
|
|
7910
|
-
/* @__PURE__ */
|
|
7911
|
-
/* @__PURE__ */
|
|
7912
|
-
/* @__PURE__ */
|
|
8148
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => moveStatus(i, -1), disabled: i === 0, className: "px-2 py-1 border rounded text-xs disabled:opacity-30", "aria-label": "\u05D4\u05D6\u05D6 \u05DC\u05DE\u05E2\u05DC\u05D4", children: "\u25B2" }),
|
|
8149
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => moveStatus(i, 1), disabled: i === statuses.length - 1, className: "px-2 py-1 border rounded text-xs disabled:opacity-30", "aria-label": "\u05D4\u05D6\u05D6 \u05DC\u05DE\u05D8\u05D4", children: "\u25BC" }),
|
|
8150
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => removeStatus(st.id), disabled: statuses.length <= 1, className: "px-2 py-1 border border-rose-300 text-rose-600 rounded text-xs disabled:opacity-30", "aria-label": "\u05DE\u05D7\u05E7 \u05E1\u05D8\u05D8\u05D5\u05E1", children: "\u2715" })
|
|
7913
8151
|
] }, st.id)) }),
|
|
7914
8152
|
/* @__PURE__ */ jsxs13("div", { className: "flex items-center gap-3", children: [
|
|
7915
|
-
/* @__PURE__ */
|
|
7916
|
-
/* @__PURE__ */
|
|
8153
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: addStatus, className: "px-3 py-1.5 rounded text-sm font-medium bg-emerald-600 text-white hover:bg-emerald-700", children: "+ \u05D4\u05D5\u05E1\u05E3 \u05E1\u05D8\u05D8\u05D5\u05E1" }),
|
|
8154
|
+
/* @__PURE__ */ jsx15("button", { type: "button", onClick: () => setStatuses(DEFAULT_PLACEMENT_STATUS_COLORS, "3"), className: "text-xs text-slate-500 underline", children: "\u05D0\u05E4\u05E1 \u05DC\u05D1\u05E8\u05D9\u05E8\u05EA \u05D4\u05DE\u05D7\u05D3\u05DC" })
|
|
7917
8155
|
] })
|
|
7918
8156
|
] });
|
|
7919
8157
|
};
|
|
@@ -7950,14 +8188,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
7950
8188
|
};
|
|
7951
8189
|
const selectClass = "w-full border p-2 rounded bg-white text-sm";
|
|
7952
8190
|
return /* @__PURE__ */ jsxs13("div", { className: "p-4 border rounded shadow-sm bg-gray-50 space-y-6", dir: "rtl", children: [
|
|
7953
|
-
/* @__PURE__ */
|
|
8191
|
+
/* @__PURE__ */ jsx15("h3", { className: "text-lg font-bold", children: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E8\u05DB\u05D9\u05D1 \u05E9\u05D9\u05D1\u05D5\u05E5" }),
|
|
7954
8192
|
/* @__PURE__ */ jsxs13("div", { className: "p-4 border border-indigo-200 bg-indigo-50/60 rounded space-y-2", "aria-live": "polite", children: [
|
|
7955
|
-
/* @__PURE__ */
|
|
8193
|
+
/* @__PURE__ */ jsx15("h4", { className: "font-semibold text-indigo-900 text-sm", children: "\u05D4\u05D1\u05D7\u05D9\u05E8\u05D5\u05EA \u05E9\u05E0\u05E2\u05E9\u05D5 \u05E2\u05D3 \u05DB\u05D4" }),
|
|
7956
8194
|
/* @__PURE__ */ jsxs13("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-x-6 gap-y-1.5", children: [
|
|
7957
8195
|
/* @__PURE__ */ jsxs13("div", { className: "space-y-1.5", children: [
|
|
7958
|
-
/* @__PURE__ */
|
|
7959
|
-
/* @__PURE__ */
|
|
7960
|
-
/* @__PURE__ */
|
|
8196
|
+
/* @__PURE__ */ jsx15("div", { className: "text-xs font-bold text-slate-500", children: "\u05DE\u05E7\u05D5\u05E8" }),
|
|
8197
|
+
/* @__PURE__ */ jsx15(SummaryRow, { label: "\u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8", value: sourceTable == null ? void 0 : sourceTable.name }),
|
|
8198
|
+
/* @__PURE__ */ jsx15(
|
|
7961
8199
|
SummaryRow,
|
|
7962
8200
|
{
|
|
7963
8201
|
label: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05DE\u05D9\u05D3\u05E2",
|
|
@@ -7967,9 +8205,9 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
7967
8205
|
)
|
|
7968
8206
|
] }),
|
|
7969
8207
|
/* @__PURE__ */ jsxs13("div", { className: "space-y-1.5", children: [
|
|
7970
|
-
/* @__PURE__ */
|
|
7971
|
-
/* @__PURE__ */
|
|
7972
|
-
/* @__PURE__ */
|
|
8208
|
+
/* @__PURE__ */ jsx15("div", { className: "text-xs font-bold text-slate-500", children: "\u05D9\u05E2\u05D3" }),
|
|
8209
|
+
/* @__PURE__ */ jsx15(SummaryRow, { label: "\u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3", value: targetTable == null ? void 0 : targetTable.name }),
|
|
8210
|
+
/* @__PURE__ */ jsx15(
|
|
7973
8211
|
SummaryRow,
|
|
7974
8212
|
{
|
|
7975
8213
|
label: "\u05E1\u05D9\u05E0\u05D5\u05DF 1",
|
|
@@ -7977,7 +8215,7 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
7977
8215
|
hint: relatedHint(config.targetFilterField1Id, targetTextColumns)
|
|
7978
8216
|
}
|
|
7979
8217
|
),
|
|
7980
|
-
/* @__PURE__ */
|
|
8218
|
+
/* @__PURE__ */ jsx15(
|
|
7981
8219
|
SummaryRow,
|
|
7982
8220
|
{
|
|
7983
8221
|
label: "\u05E1\u05D9\u05E0\u05D5\u05DF 2",
|
|
@@ -7985,7 +8223,7 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
7985
8223
|
hint: relatedHint(config.targetFilterField2Id, targetTextColumns)
|
|
7986
8224
|
}
|
|
7987
8225
|
),
|
|
7988
|
-
/* @__PURE__ */
|
|
8226
|
+
/* @__PURE__ */ jsx15(
|
|
7989
8227
|
SummaryRow,
|
|
7990
8228
|
{
|
|
7991
8229
|
label: "\u05D1\u05D7\u05D9\u05E8\u05EA \u05E8\u05E9\u05D5\u05DE\u05D4",
|
|
@@ -7993,15 +8231,15 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
7993
8231
|
hint: relatedHint(config.targetSelectorFieldId, targetTextColumns)
|
|
7994
8232
|
}
|
|
7995
8233
|
),
|
|
7996
|
-
/* @__PURE__ */
|
|
8234
|
+
/* @__PURE__ */ jsx15(SummaryRow, { label: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E9\u05D9\u05D1\u05D5\u05E5", value: config.targetAssignmentFieldId })
|
|
7997
8235
|
] })
|
|
7998
8236
|
] })
|
|
7999
8237
|
] }),
|
|
8000
8238
|
/* @__PURE__ */ jsxs13("div", { className: "p-4 border border-slate-200 bg-white rounded space-y-3", children: [
|
|
8001
|
-
/* @__PURE__ */
|
|
8239
|
+
/* @__PURE__ */ jsx15("h4", { className: "font-semibold text-slate-800", children: "\u05E9\u05DC\u05D1 1: \u05D8\u05D1\u05DC\u05EA \u05D4\u05DE\u05E7\u05D5\u05E8" }),
|
|
8002
8240
|
/* @__PURE__ */ jsxs13("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
8003
8241
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8004
|
-
/* @__PURE__ */
|
|
8242
|
+
/* @__PURE__ */ jsx15("label", { className: "block text-sm font-medium mb-1", children: "\u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 (\u05DC\u05DE\u05E9\u05DC: \u05DE\u05D3\u05E8\u05D9\u05DB\u05D9\u05DD):" }),
|
|
8005
8243
|
/* @__PURE__ */ jsxs13(
|
|
8006
8244
|
"select",
|
|
8007
8245
|
{
|
|
@@ -8009,14 +8247,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8009
8247
|
value: config.sourceTableId || "",
|
|
8010
8248
|
onChange: (e) => handleSourceTableChange(e.target.value),
|
|
8011
8249
|
children: [
|
|
8012
|
-
/* @__PURE__ */
|
|
8013
|
-
tables == null ? void 0 : tables.map((t) => /* @__PURE__ */
|
|
8250
|
+
/* @__PURE__ */ jsx15("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 --" }),
|
|
8251
|
+
tables == null ? void 0 : tables.map((t) => /* @__PURE__ */ jsx15("option", { value: t.id, children: t.name }, t.id))
|
|
8014
8252
|
]
|
|
8015
8253
|
}
|
|
8016
8254
|
)
|
|
8017
8255
|
] }),
|
|
8018
8256
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8019
|
-
/* @__PURE__ */
|
|
8257
|
+
/* @__PURE__ */ jsx15("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05D4 \u05DC\u05E7\u05D7\u05EA \u05DE\u05DE\u05E0\u05D4 \u05DE\u05D9\u05D3\u05E2 (\u05DC\u05DE\u05E9\u05DC: \u05E9\u05DD \u05DE\u05D3\u05E8\u05D9\u05DA):" }),
|
|
8020
8258
|
/* @__PURE__ */ jsxs13(
|
|
8021
8259
|
"select",
|
|
8022
8260
|
{
|
|
@@ -8025,8 +8263,8 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8025
8263
|
value: config.sourceDisplayFieldId || "",
|
|
8026
8264
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { sourceDisplayFieldId: e.target.value })),
|
|
8027
8265
|
children: [
|
|
8028
|
-
/* @__PURE__ */
|
|
8029
|
-
sourceColumns.map((f) => /* @__PURE__ */
|
|
8266
|
+
/* @__PURE__ */ jsx15("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05EA \u05DE\u05E7\u05D5\u05E8 --" }),
|
|
8267
|
+
sourceColumns.map((f) => /* @__PURE__ */ jsx15("option", { value: f.id, children: f.name }, f.id))
|
|
8030
8268
|
]
|
|
8031
8269
|
}
|
|
8032
8270
|
)
|
|
@@ -8034,9 +8272,9 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8034
8272
|
] })
|
|
8035
8273
|
] }),
|
|
8036
8274
|
/* @__PURE__ */ jsxs13("div", { className: "p-4 border border-blue-200 bg-blue-50 rounded space-y-3", children: [
|
|
8037
|
-
/* @__PURE__ */
|
|
8275
|
+
/* @__PURE__ */ jsx15("h4", { className: "font-semibold text-blue-900", children: "\u05E9\u05DC\u05D1 2: \u05D8\u05D1\u05DC\u05EA \u05D4\u05D9\u05E2\u05D3" }),
|
|
8038
8276
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8039
|
-
/* @__PURE__ */
|
|
8277
|
+
/* @__PURE__ */ jsx15("label", { className: "block text-sm font-medium mb-1", children: "\u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3:" }),
|
|
8040
8278
|
/* @__PURE__ */ jsxs13(
|
|
8041
8279
|
"select",
|
|
8042
8280
|
{
|
|
@@ -8044,8 +8282,8 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8044
8282
|
value: config.targetTableId || "",
|
|
8045
8283
|
onChange: (e) => handleTargetTableChange(e.target.value),
|
|
8046
8284
|
children: [
|
|
8047
|
-
/* @__PURE__ */
|
|
8048
|
-
tables == null ? void 0 : tables.map((t) => /* @__PURE__ */
|
|
8285
|
+
/* @__PURE__ */ jsx15("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3 --" }),
|
|
8286
|
+
tables == null ? void 0 : tables.map((t) => /* @__PURE__ */ jsx15("option", { value: t.id, children: t.name }, t.id))
|
|
8049
8287
|
]
|
|
8050
8288
|
}
|
|
8051
8289
|
)
|
|
@@ -8053,7 +8291,7 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8053
8291
|
config.targetTableId && /* @__PURE__ */ jsxs13(Fragment3, { children: [
|
|
8054
8292
|
/* @__PURE__ */ jsxs13("div", { className: "grid grid-cols-3 gap-4", children: [
|
|
8055
8293
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8056
|
-
/* @__PURE__ */
|
|
8294
|
+
/* @__PURE__ */ jsx15("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E1\u05D9\u05E0\u05D5\u05DF 1:" }),
|
|
8057
8295
|
/* @__PURE__ */ jsxs13(
|
|
8058
8296
|
"select",
|
|
8059
8297
|
{
|
|
@@ -8061,14 +8299,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8061
8299
|
value: config.targetFilterField1Id || "",
|
|
8062
8300
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetFilterField1Id: e.target.value })),
|
|
8063
8301
|
children: [
|
|
8064
|
-
/* @__PURE__ */
|
|
8065
|
-
optionsFor(targetTextColumns, "targetFilterField1Id").map((f) => /* @__PURE__ */
|
|
8302
|
+
/* @__PURE__ */ jsx15("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
|
|
8303
|
+
optionsFor(targetTextColumns, "targetFilterField1Id").map((f) => /* @__PURE__ */ jsx15("option", { value: f.id, children: f.name }, f.id))
|
|
8066
8304
|
]
|
|
8067
8305
|
}
|
|
8068
8306
|
)
|
|
8069
8307
|
] }),
|
|
8070
8308
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8071
|
-
/* @__PURE__ */
|
|
8309
|
+
/* @__PURE__ */ jsx15("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05E1\u05D9\u05E0\u05D5\u05DF 2:" }),
|
|
8072
8310
|
/* @__PURE__ */ jsxs13(
|
|
8073
8311
|
"select",
|
|
8074
8312
|
{
|
|
@@ -8076,14 +8314,14 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8076
8314
|
value: config.targetFilterField2Id || "",
|
|
8077
8315
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetFilterField2Id: e.target.value })),
|
|
8078
8316
|
children: [
|
|
8079
|
-
/* @__PURE__ */
|
|
8080
|
-
optionsFor(targetTextColumns, "targetFilterField2Id").map((f) => /* @__PURE__ */
|
|
8317
|
+
/* @__PURE__ */ jsx15("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
|
|
8318
|
+
optionsFor(targetTextColumns, "targetFilterField2Id").map((f) => /* @__PURE__ */ jsx15("option", { value: f.id, children: f.name }, f.id))
|
|
8081
8319
|
]
|
|
8082
8320
|
}
|
|
8083
8321
|
)
|
|
8084
8322
|
] }),
|
|
8085
8323
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8086
|
-
/* @__PURE__ */
|
|
8324
|
+
/* @__PURE__ */ jsx15("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D1\u05D7\u05D9\u05E8\u05EA \u05D4\u05E8\u05E9\u05D5\u05DE\u05D4:" }),
|
|
8087
8325
|
/* @__PURE__ */ jsxs13(
|
|
8088
8326
|
"select",
|
|
8089
8327
|
{
|
|
@@ -8091,15 +8329,15 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8091
8329
|
value: config.targetSelectorFieldId || "",
|
|
8092
8330
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetSelectorFieldId: e.target.value })),
|
|
8093
8331
|
children: [
|
|
8094
|
-
/* @__PURE__ */
|
|
8095
|
-
optionsFor(targetTextColumns, "targetSelectorFieldId").map((f) => /* @__PURE__ */
|
|
8332
|
+
/* @__PURE__ */ jsx15("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4 --" }),
|
|
8333
|
+
optionsFor(targetTextColumns, "targetSelectorFieldId").map((f) => /* @__PURE__ */ jsx15("option", { value: f.id, children: f.name }, f.id))
|
|
8096
8334
|
]
|
|
8097
8335
|
}
|
|
8098
8336
|
)
|
|
8099
8337
|
] })
|
|
8100
8338
|
] }),
|
|
8101
8339
|
/* @__PURE__ */ jsxs13("div", { children: [
|
|
8102
|
-
/* @__PURE__ */
|
|
8340
|
+
/* @__PURE__ */ jsx15("label", { className: "block text-sm font-medium mb-1", children: "\u05E2\u05DE\u05D5\u05D3\u05D4 \u05D1\u05D8\u05D1\u05DC\u05EA \u05D4\u05D9\u05E2\u05D3 \u05D0\u05DC\u05D9\u05D4 \u05D9\u05D9\u05DB\u05E0\u05E1 \u05D4\u05DE\u05D9\u05D3\u05E2 \u05DE\u05D4\u05DE\u05E7\u05D5\u05E8:" }),
|
|
8103
8341
|
/* @__PURE__ */ jsxs13(
|
|
8104
8342
|
"select",
|
|
8105
8343
|
{
|
|
@@ -8107,20 +8345,20 @@ var PlacementSettings = ({ config, onChange, tables }) => {
|
|
|
8107
8345
|
value: config.targetAssignmentFieldId || "",
|
|
8108
8346
|
onChange: (e) => onChange(__spreadProps(__spreadValues({}, config), { targetAssignmentFieldId: e.target.value })),
|
|
8109
8347
|
children: [
|
|
8110
|
-
/* @__PURE__ */
|
|
8111
|
-
optionsFor(targetColumns, "targetAssignmentFieldId").map((f) => /* @__PURE__ */
|
|
8348
|
+
/* @__PURE__ */ jsx15("option", { value: "", disabled: true, children: "-- \u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3 --" }),
|
|
8349
|
+
optionsFor(targetColumns, "targetAssignmentFieldId").map((f) => /* @__PURE__ */ jsx15("option", { value: f.id, children: f.name }, f.id))
|
|
8112
8350
|
]
|
|
8113
8351
|
}
|
|
8114
8352
|
)
|
|
8115
8353
|
] })
|
|
8116
8354
|
] })
|
|
8117
8355
|
] }),
|
|
8118
|
-
/* @__PURE__ */
|
|
8356
|
+
/* @__PURE__ */ jsx15(PlacementStatusEditor, { config, onChange })
|
|
8119
8357
|
] });
|
|
8120
8358
|
};
|
|
8121
8359
|
|
|
8122
8360
|
// src/components/PlacementBlock/PlacementBlock.tsx
|
|
8123
|
-
import { jsx as
|
|
8361
|
+
import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
8124
8362
|
ModuleRegistry.registerModules([AllCommunityModule]);
|
|
8125
8363
|
var FETCH_LIMIT = 1e3;
|
|
8126
8364
|
function normalizeRows(records) {
|
|
@@ -8157,7 +8395,7 @@ var ColorDotRenderer = (props) => {
|
|
|
8157
8395
|
const { statuses, defaultStatusId } = props;
|
|
8158
8396
|
const status = statuses.find((c) => c.id === item.statusId) || statuses.find((c) => c.id === defaultStatusId) || statuses[0];
|
|
8159
8397
|
if (!status) return null;
|
|
8160
|
-
return /* @__PURE__ */
|
|
8398
|
+
return /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx16(
|
|
8161
8399
|
"button",
|
|
8162
8400
|
{
|
|
8163
8401
|
type: "button",
|
|
@@ -8171,7 +8409,7 @@ var ColorDotRenderer = (props) => {
|
|
|
8171
8409
|
};
|
|
8172
8410
|
var CheckCellRenderer = (props) => {
|
|
8173
8411
|
if (!props.data) return null;
|
|
8174
|
-
return /* @__PURE__ */
|
|
8412
|
+
return /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center h-full", children: /* @__PURE__ */ jsx16(
|
|
8175
8413
|
"input",
|
|
8176
8414
|
{
|
|
8177
8415
|
type: "checkbox",
|
|
@@ -8182,7 +8420,7 @@ var CheckCellRenderer = (props) => {
|
|
|
8182
8420
|
}
|
|
8183
8421
|
) });
|
|
8184
8422
|
};
|
|
8185
|
-
var CheckHeader = (props) => /* @__PURE__ */
|
|
8423
|
+
var CheckHeader = (props) => /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center w-full", children: /* @__PURE__ */ jsx16(
|
|
8186
8424
|
"input",
|
|
8187
8425
|
{
|
|
8188
8426
|
type: "checkbox",
|
|
@@ -8545,20 +8783,20 @@ var PlacementBlock = (props) => {
|
|
|
8545
8783
|
}, [selectorField, targetColumns, displayValue]);
|
|
8546
8784
|
const previewColumns = useMemo7(() => targetColumns.filter((c) => isUserColumn(c) && c.name !== assignmentField && !["id", "_id", "id_", "statusId"].includes(c.name)), [targetColumns, assignmentField]);
|
|
8547
8785
|
if (!config || !sourceTableId || !targetTableId) {
|
|
8548
|
-
return /* @__PURE__ */
|
|
8786
|
+
return /* @__PURE__ */ jsx16("div", { className: "p-4 text-xs text-slate-500 border border-dashed border-slate-300 rounded-xl", dir: "rtl", children: "\u05E8\u05DB\u05D9\u05D1 \u05D4\u05E9\u05D9\u05D1\u05D5\u05E5 \u05DC\u05D0 \u05D4\u05D5\u05D2\u05D3\u05E8 (\u05D7\u05E1\u05E8\u05D5\u05EA \u05D8\u05D1\u05DC\u05EA \u05DE\u05E7\u05D5\u05E8 / \u05D8\u05D1\u05DC\u05EA \u05D9\u05E2\u05D3)." });
|
|
8549
8787
|
}
|
|
8550
8788
|
const selectClass = "w-full p-2 border border-slate-300 rounded-lg text-xs font-medium text-slate-700 bg-slate-50 outline-none focus:border-brand";
|
|
8551
8789
|
const labelClass = "block text-[11px] font-semibold text-slate-500 mb-1";
|
|
8552
8790
|
return /* @__PURE__ */ jsxs14("div", { className: `w-full flex flex-col gap-4 p-4 bg-slate-50 min-h-[850px] rounded-xl border border-slate-200 ${className}`, dir: "rtl", children: [
|
|
8553
|
-
(loadError || saveError) && /* @__PURE__ */
|
|
8791
|
+
(loadError || saveError) && /* @__PURE__ */ jsx16("div", { className: "p-3 text-xs rounded-lg bg-rose-50 border border-rose-200 text-rose-700", children: loadError || saveError }),
|
|
8554
8792
|
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col lg:flex-row gap-4", children: [
|
|
8555
8793
|
/* @__PURE__ */ jsxs14("div", { className: "w-full lg:w-1/3 bg-teal-50/40 p-4 rounded-xl border border-teal-100 shadow-xs flex flex-col", children: [
|
|
8556
8794
|
/* @__PURE__ */ jsxs14("h4", { className: "font-bold text-teal-900 border-b border-teal-200 pb-2 mb-3 text-sm flex items-center gap-2", children: [
|
|
8557
|
-
/* @__PURE__ */
|
|
8795
|
+
/* @__PURE__ */ jsx16("span", { children: "\u{1F4CC}" }),
|
|
8558
8796
|
" \u05E4\u05E8\u05D8\u05D9 \u05D4\u05D9\u05E2\u05D3 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5"
|
|
8559
8797
|
] }),
|
|
8560
8798
|
activeTarget ? /* @__PURE__ */ jsxs14("div", { className: "space-y-2 text-xs text-slate-700 overflow-y-auto pr-1 max-h-32", children: [
|
|
8561
|
-
/* @__PURE__ */
|
|
8799
|
+
/* @__PURE__ */ jsx16("div", { className: "font-bold text-slate-900 text-sm mb-1", children: targetLabel(activeTarget) }),
|
|
8562
8800
|
previewColumns.map((col) => ({ col, text: displayValue(col, readColumnValue(activeTarget.data, col.name)) })).filter(({ col, text }) => {
|
|
8563
8801
|
var _a2;
|
|
8564
8802
|
return text && (col.type === "RELATION" || typeof ((_a2 = activeTarget.data) == null ? void 0 : _a2[col.name]) !== "object");
|
|
@@ -8567,23 +8805,23 @@ var PlacementBlock = (props) => {
|
|
|
8567
8805
|
col.label || col.name,
|
|
8568
8806
|
":"
|
|
8569
8807
|
] }),
|
|
8570
|
-
/* @__PURE__ */
|
|
8808
|
+
/* @__PURE__ */ jsx16("span", { className: "break-words line-clamp-2", children: text })
|
|
8571
8809
|
] }, col.name)),
|
|
8572
8810
|
assignmentField && assignedText && /* @__PURE__ */ jsxs14("div", { className: "flex gap-2 items-start", children: [
|
|
8573
8811
|
/* @__PURE__ */ jsxs14("span", { className: "font-semibold shrink-0", children: [
|
|
8574
8812
|
assignmentLabel,
|
|
8575
8813
|
":"
|
|
8576
8814
|
] }),
|
|
8577
|
-
/* @__PURE__ */
|
|
8815
|
+
/* @__PURE__ */ jsx16("span", { className: "break-words line-clamp-2", title: assignedText, children: assignedText })
|
|
8578
8816
|
] }),
|
|
8579
8817
|
/* @__PURE__ */ jsxs14("div", { className: "mt-3 pt-3 border-t border-teal-200/60 text-teal-800 font-bold", children: [
|
|
8580
8818
|
"\u05DE\u05E9\u05D5\u05D1\u05E6\u05D9\u05DD \u05DB\u05E8\u05D2\u05E2: ",
|
|
8581
8819
|
assignedIds.length
|
|
8582
8820
|
] })
|
|
8583
|
-
] }) : /* @__PURE__ */
|
|
8821
|
+
] }) : /* @__PURE__ */ jsx16("div", { className: "text-slate-500 text-xs text-center py-6", children: isLoading ? "\u05D8\u05D5\u05E2\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9\u05DD..." : "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05E8\u05E9\u05D5\u05DE\u05EA \u05D9\u05E2\u05D3." })
|
|
8584
8822
|
] }),
|
|
8585
|
-
/* @__PURE__ */
|
|
8586
|
-
/* @__PURE__ */
|
|
8823
|
+
/* @__PURE__ */ jsx16("div", { className: "w-full lg:w-2/3 bg-white p-4 rounded-xl border border-slate-200 shadow-xs flex flex-col", children: /* @__PURE__ */ jsxs14("div", { children: [
|
|
8824
|
+
/* @__PURE__ */ jsx16("h4", { className: "font-bold text-slate-800 mb-3 text-sm", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05D4\u05D9\u05E2\u05D3" }),
|
|
8587
8825
|
/* @__PURE__ */ jsxs14("div", { className: "flex flex-col sm:flex-row gap-3", children: [
|
|
8588
8826
|
filterColumns.map((col, index) => {
|
|
8589
8827
|
const previousColumns = filterColumns.slice(0, index);
|
|
@@ -8598,7 +8836,7 @@ var PlacementBlock = (props) => {
|
|
|
8598
8836
|
validRowsForThisFilter.map((r) => displayValue(col, readColumnValue(r.data, col.name)))
|
|
8599
8837
|
)).filter(Boolean).sort((a, b) => a.localeCompare(b, "he"));
|
|
8600
8838
|
return /* @__PURE__ */ jsxs14("div", { className: "flex-1 basis-0 min-w-0", children: [
|
|
8601
|
-
/* @__PURE__ */
|
|
8839
|
+
/* @__PURE__ */ jsx16("label", { className: labelClass, children: col.label || columnRefLabel(col.name) }),
|
|
8602
8840
|
/* @__PURE__ */ jsxs14(
|
|
8603
8841
|
"select",
|
|
8604
8842
|
{
|
|
@@ -8615,22 +8853,22 @@ var PlacementBlock = (props) => {
|
|
|
8615
8853
|
});
|
|
8616
8854
|
},
|
|
8617
8855
|
children: [
|
|
8618
|
-
/* @__PURE__ */
|
|
8619
|
-
uniqueValues.map((v) => /* @__PURE__ */
|
|
8856
|
+
/* @__PURE__ */ jsx16("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
|
|
8857
|
+
uniqueValues.map((v) => /* @__PURE__ */ jsx16("option", { value: v, children: v }, v))
|
|
8620
8858
|
]
|
|
8621
8859
|
}
|
|
8622
8860
|
)
|
|
8623
8861
|
] }, col.name);
|
|
8624
8862
|
}),
|
|
8625
8863
|
/* @__PURE__ */ jsxs14("div", { className: "flex-1 basis-0 min-w-0", children: [
|
|
8626
|
-
/* @__PURE__ */
|
|
8864
|
+
/* @__PURE__ */ jsx16("label", { className: labelClass, children: selectorLabel }),
|
|
8627
8865
|
/* @__PURE__ */ jsxs14("select", { className: selectClass, value: selectedTargetId, onChange: (e) => setSelectedTargetId(e.target.value), children: [
|
|
8628
8866
|
/* @__PURE__ */ jsxs14("option", { value: "", children: [
|
|
8629
8867
|
"-- \u05D1\u05D7\u05E8 \u05DE\u05EA\u05D5\u05DA ",
|
|
8630
8868
|
filteredTargetRows.length,
|
|
8631
8869
|
" \u05EA\u05D5\u05E6\u05D0\u05D5\u05EA --"
|
|
8632
8870
|
] }),
|
|
8633
|
-
filteredTargetRows.map((r) => /* @__PURE__ */
|
|
8871
|
+
filteredTargetRows.map((r) => /* @__PURE__ */ jsx16("option", { value: r.id, children: targetLabel(r) }, r.id))
|
|
8634
8872
|
] })
|
|
8635
8873
|
] })
|
|
8636
8874
|
] })
|
|
@@ -8645,11 +8883,11 @@ var PlacementBlock = (props) => {
|
|
|
8645
8883
|
availableGridData.length,
|
|
8646
8884
|
")"
|
|
8647
8885
|
] }),
|
|
8648
|
-
/* @__PURE__ */
|
|
8886
|
+
/* @__PURE__ */ jsx16("span", { className: "text-[11px] font-normal text-slate-500 bg-white px-2 py-0.5 rounded-full shadow-sm border border-slate-200", children: "\u05D2\u05E8\u05D5\u05E8 \u05E9\u05DE\u05D0\u05DC\u05D4 \u05DC\u05E9\u05D9\u05D1\u05D5\u05E5 \u2190" })
|
|
8649
8887
|
] }),
|
|
8650
|
-
/* @__PURE__ */
|
|
8888
|
+
/* @__PURE__ */ jsx16("input", { type: "search", value: sourceSearch, onChange: (e) => setSourceSearch(e.target.value), placeholder: "\u05E1\u05D9\u05E0\u05D5\u05DF...", className: "w-full p-2 border border-slate-300 rounded-lg text-xs bg-white outline-none focus:border-brand" })
|
|
8651
8889
|
] }),
|
|
8652
|
-
/* @__PURE__ */
|
|
8890
|
+
/* @__PURE__ */ jsx16("div", { ref: sourceContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx16(AgGridReact, { rowData: availableGridData, columnDefs: sourceColDefs, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: sourceSearch, onGridReady: (e) => setSourceApi(e.api), loading: isLoading }) })
|
|
8653
8891
|
] }),
|
|
8654
8892
|
/* @__PURE__ */ jsxs14("div", { className: "w-full lg:w-1/2 flex flex-col border border-blue-200 rounded-xl shadow-xs bg-white overflow-hidden ring-1 ring-blue-100", children: [
|
|
8655
8893
|
/* @__PURE__ */ jsxs14("div", { className: "bg-blue-50/80 p-3 border-b border-blue-100 flex flex-col gap-2", children: [
|
|
@@ -8660,17 +8898,17 @@ var PlacementBlock = (props) => {
|
|
|
8660
8898
|
candidateGridData.length,
|
|
8661
8899
|
")"
|
|
8662
8900
|
] }),
|
|
8663
|
-
/* @__PURE__ */
|
|
8901
|
+
/* @__PURE__ */ jsx16("span", { className: "text-[11px] font-normal text-blue-700 bg-white px-2 py-0.5 rounded-full shadow-sm border border-blue-100", children: "\u2192 \u05D2\u05E8\u05D5\u05E8 \u05D9\u05DE\u05D9\u05E0\u05D4 \u05DC\u05D4\u05D7\u05D6\u05E8\u05D4" })
|
|
8664
8902
|
] }),
|
|
8665
8903
|
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-2", children: [
|
|
8666
|
-
/* @__PURE__ */
|
|
8667
|
-
/* @__PURE__ */
|
|
8668
|
-
/* @__PURE__ */
|
|
8904
|
+
/* @__PURE__ */ jsx16("button", { type: "button", onClick: returnAll, disabled: candidateIds.length === 0, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-amber-400 hover:bg-amber-500 text-slate-900 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u21BA \u05D4\u05D7\u05D6\u05E8 \u05D4\u05DB\u05DC" }),
|
|
8905
|
+
/* @__PURE__ */ jsx16("button", { type: "button", onClick: submitAssignment, disabled: !selectedTargetId || !isDirty || isSaving, className: "px-4 py-1.5 rounded-lg text-xs font-bold bg-blue-600 hover:bg-blue-700 text-white disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: isSaving ? "\u05E9\u05D5\u05DE\u05E8..." : "\u05E9\u05D1\u05E5" }),
|
|
8906
|
+
/* @__PURE__ */ jsx16("button", { type: "button", onClick: cancelAssignment, disabled: !selectedTargetId || assignedIds.length === 0 || isSaving, className: "px-3 py-1.5 rounded-lg text-xs font-bold bg-white hover:bg-rose-50 text-rose-600 border border-rose-300 disabled:opacity-40 disabled:cursor-not-allowed transition-colors", children: "\u05D1\u05D9\u05D8\u05D5\u05DC \u05E9\u05D9\u05D1\u05D5\u05E5" })
|
|
8669
8907
|
] })
|
|
8670
8908
|
] }),
|
|
8671
|
-
/* @__PURE__ */
|
|
8909
|
+
/* @__PURE__ */ jsx16("input", { type: "search", value: candidateSearch, onChange: (e) => setCandidateSearch(e.target.value), placeholder: "\u05E1\u05D9\u05E0\u05D5\u05DF...", className: "w-full p-2 border border-slate-300 rounded-lg text-xs bg-white outline-none focus:border-brand" })
|
|
8672
8910
|
] }),
|
|
8673
|
-
/* @__PURE__ */
|
|
8911
|
+
/* @__PURE__ */ jsx16("div", { ref: assignedContainerRef, className: "ag-theme-quartz flex-1 w-full h-full", children: /* @__PURE__ */ jsx16(AgGridReact, { rowData: candidateGridData, columnDefs: candidateColDefs, getRowId, enableRtl: true, rowDragManaged: false, quickFilterText: candidateSearch, onGridReady: (e) => setAssignedApi(e.api), loading: isLoading }) })
|
|
8674
8912
|
] })
|
|
8675
8913
|
] })
|
|
8676
8914
|
] });
|
|
@@ -8824,7 +9062,7 @@ function readFileAsBase64(file) {
|
|
|
8824
9062
|
}
|
|
8825
9063
|
|
|
8826
9064
|
// src/components/WhatsAppComponent/CreateTemplateModal.tsx
|
|
8827
|
-
import { Fragment as Fragment4, jsx as
|
|
9065
|
+
import { Fragment as Fragment4, jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
8828
9066
|
function CreateTemplateModal({
|
|
8829
9067
|
isOpen,
|
|
8830
9068
|
onClose,
|
|
@@ -9176,7 +9414,7 @@ function CreateTemplateModal({
|
|
|
9176
9414
|
}
|
|
9177
9415
|
};
|
|
9178
9416
|
if (!isOpen) return null;
|
|
9179
|
-
return /* @__PURE__ */
|
|
9417
|
+
return /* @__PURE__ */ jsx17(
|
|
9180
9418
|
"div",
|
|
9181
9419
|
{
|
|
9182
9420
|
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",
|
|
@@ -9191,41 +9429,41 @@ function CreateTemplateModal({
|
|
|
9191
9429
|
children: [
|
|
9192
9430
|
/* @__PURE__ */ jsxs15("div", { className: "px-6 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
|
|
9193
9431
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2.5", children: [
|
|
9194
|
-
/* @__PURE__ */
|
|
9432
|
+
/* @__PURE__ */ jsx17("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx17(Plus, { className: "w-4 h-4" }) }),
|
|
9195
9433
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
9196
|
-
/* @__PURE__ */
|
|
9197
|
-
/* @__PURE__ */
|
|
9434
|
+
/* @__PURE__ */ jsx17("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" }),
|
|
9435
|
+
/* @__PURE__ */ jsx17("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" })
|
|
9198
9436
|
] })
|
|
9199
9437
|
] }),
|
|
9200
|
-
/* @__PURE__ */
|
|
9438
|
+
/* @__PURE__ */ jsx17(
|
|
9201
9439
|
"button",
|
|
9202
9440
|
{
|
|
9203
9441
|
type: "button",
|
|
9204
9442
|
onClick: onClose,
|
|
9205
9443
|
className: "p-1.5 text-slate-400 hover:text-slate-700 hover:bg-slate-200/60 rounded-lg transition-colors cursor-pointer",
|
|
9206
9444
|
"aria-label": "\u05E1\u05D2\u05D5\u05E8",
|
|
9207
|
-
children: /* @__PURE__ */
|
|
9445
|
+
children: /* @__PURE__ */ jsx17(X9, { className: "w-5 h-5" })
|
|
9208
9446
|
}
|
|
9209
9447
|
)
|
|
9210
9448
|
] }),
|
|
9211
9449
|
/* @__PURE__ */ jsxs15("form", { onSubmit: handleSubmit, className: "flex flex-col overflow-hidden flex-1", children: [
|
|
9212
9450
|
/* @__PURE__ */ jsxs15("div", { className: "p-6 overflow-y-auto space-y-5 flex-1", children: [
|
|
9213
9451
|
submitError && /* @__PURE__ */ jsxs15("div", { className: "p-3 bg-rose-50 border border-rose-200 rounded-xl text-xs text-rose-800 flex items-center gap-2", children: [
|
|
9214
|
-
/* @__PURE__ */
|
|
9215
|
-
/* @__PURE__ */
|
|
9452
|
+
/* @__PURE__ */ jsx17(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
|
|
9453
|
+
/* @__PURE__ */ jsx17("span", { children: submitError })
|
|
9216
9454
|
] }),
|
|
9217
9455
|
/* @__PURE__ */ jsxs15("div", { className: "space-y-1.5", children: [
|
|
9218
9456
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between", children: [
|
|
9219
9457
|
/* @__PURE__ */ jsxs15("label", { className: "block text-xs font-bold text-slate-800", children: [
|
|
9220
9458
|
"\u05E9\u05DD \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4 ",
|
|
9221
|
-
/* @__PURE__ */
|
|
9459
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9222
9460
|
] }),
|
|
9223
9461
|
templateName && isNamePatternValid && !isNameDuplicate && /* @__PURE__ */ jsxs15("span", { className: "text-[11px] text-emerald-600 font-semibold flex items-center gap-1", children: [
|
|
9224
|
-
/* @__PURE__ */
|
|
9462
|
+
/* @__PURE__ */ jsx17(CheckCircle22, { className: "w-3.5 h-3.5" }),
|
|
9225
9463
|
" \u05E9\u05DD \u05EA\u05E7\u05D9\u05DF"
|
|
9226
9464
|
] })
|
|
9227
9465
|
] }),
|
|
9228
|
-
/* @__PURE__ */
|
|
9466
|
+
/* @__PURE__ */ jsx17(
|
|
9229
9467
|
"input",
|
|
9230
9468
|
{
|
|
9231
9469
|
type: "text",
|
|
@@ -9237,9 +9475,9 @@ function CreateTemplateModal({
|
|
|
9237
9475
|
required: true
|
|
9238
9476
|
}
|
|
9239
9477
|
),
|
|
9240
|
-
/* @__PURE__ */
|
|
9478
|
+
/* @__PURE__ */ jsx17("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." }),
|
|
9241
9479
|
!isNameEmpty && isNameDuplicate && /* @__PURE__ */ jsxs15("p", { className: "text-[11px] text-rose-600 font-semibold flex items-center gap-1 mt-1", children: [
|
|
9242
|
-
/* @__PURE__ */
|
|
9480
|
+
/* @__PURE__ */ jsx17(AlertCircle2, { className: "w-3.5 h-3.5 shrink-0" }),
|
|
9243
9481
|
"\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 (",
|
|
9244
9482
|
language,
|
|
9245
9483
|
"). \u05D0\u05E0\u05D0 \u05D1\u05D7\u05E8 \u05E9\u05DD \u05D9\u05D9\u05D7\u05D5\u05D3\u05D9 \u05D0\u05D5 \u05E9\u05E4\u05D4 \u05D0\u05D7\u05E8\u05EA."
|
|
@@ -9247,26 +9485,26 @@ function CreateTemplateModal({
|
|
|
9247
9485
|
] }),
|
|
9248
9486
|
/* @__PURE__ */ jsxs15("div", { className: "grid grid-cols-2 gap-4", children: [
|
|
9249
9487
|
/* @__PURE__ */ jsxs15("div", { className: "space-y-1.5", children: [
|
|
9250
|
-
/* @__PURE__ */
|
|
9251
|
-
/* @__PURE__ */
|
|
9488
|
+
/* @__PURE__ */ jsx17("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E9\u05E4\u05D4" }),
|
|
9489
|
+
/* @__PURE__ */ jsx17(
|
|
9252
9490
|
"select",
|
|
9253
9491
|
{
|
|
9254
9492
|
value: language,
|
|
9255
9493
|
onChange: (e) => setLanguage(e.target.value),
|
|
9256
9494
|
className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
|
|
9257
|
-
children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */
|
|
9495
|
+
children: LANGUAGE_OPTIONS.map((opt) => /* @__PURE__ */ jsx17("option", { value: opt.value, children: opt.label }, opt.value))
|
|
9258
9496
|
}
|
|
9259
9497
|
)
|
|
9260
9498
|
] }),
|
|
9261
9499
|
/* @__PURE__ */ jsxs15("div", { className: "space-y-1.5", children: [
|
|
9262
|
-
/* @__PURE__ */
|
|
9263
|
-
/* @__PURE__ */
|
|
9500
|
+
/* @__PURE__ */ jsx17("label", { className: "block text-xs font-semibold text-slate-700", children: "\u05E7\u05D8\u05D2\u05D5\u05E8\u05D9\u05D4" }),
|
|
9501
|
+
/* @__PURE__ */ jsx17(
|
|
9264
9502
|
"select",
|
|
9265
9503
|
{
|
|
9266
9504
|
value: category,
|
|
9267
9505
|
onChange: (e) => setCategory(e.target.value),
|
|
9268
9506
|
className: "w-full px-3 py-2 text-xs bg-slate-50 border border-slate-200 rounded-xl text-slate-800 outline-hidden",
|
|
9269
|
-
children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */
|
|
9507
|
+
children: CATEGORY_OPTIONS.map((opt) => /* @__PURE__ */ jsx17("option", { value: opt.value, children: opt.label }, opt.value))
|
|
9270
9508
|
}
|
|
9271
9509
|
)
|
|
9272
9510
|
] })
|
|
@@ -9274,10 +9512,10 @@ function CreateTemplateModal({
|
|
|
9274
9512
|
/* @__PURE__ */ jsxs15("div", { className: "space-y-2", children: [
|
|
9275
9513
|
/* @__PURE__ */ jsxs15("label", { className: "block text-xs font-bold text-slate-800", children: [
|
|
9276
9514
|
"\u05EA\u05D5\u05DB\u05DF \u05D2\u05D5\u05E3 \u05D4\u05D4\u05D5\u05D3\u05E2\u05D4 ",
|
|
9277
|
-
/* @__PURE__ */
|
|
9515
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9278
9516
|
] }),
|
|
9279
9517
|
/* @__PURE__ */ jsxs15("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: [
|
|
9280
|
-
/* @__PURE__ */
|
|
9518
|
+
/* @__PURE__ */ jsx17(
|
|
9281
9519
|
"textarea",
|
|
9282
9520
|
{
|
|
9283
9521
|
ref: textareaRef,
|
|
@@ -9299,7 +9537,7 @@ function CreateTemplateModal({
|
|
|
9299
9537
|
dir: language === "en_US" ? "ltr" : "rtl",
|
|
9300
9538
|
children: [
|
|
9301
9539
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1", children: [
|
|
9302
|
-
/* @__PURE__ */
|
|
9540
|
+
/* @__PURE__ */ jsx17(
|
|
9303
9541
|
"button",
|
|
9304
9542
|
{
|
|
9305
9543
|
type: "button",
|
|
@@ -9307,10 +9545,10 @@ function CreateTemplateModal({
|
|
|
9307
9545
|
onClick: () => handleApplyFormatting("*"),
|
|
9308
9546
|
title: "\u05DE\u05D5\u05D3\u05D2\u05E9 (Bold) *\u05D8\u05E7\u05E1\u05D8*",
|
|
9309
9547
|
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",
|
|
9310
|
-
children: /* @__PURE__ */
|
|
9548
|
+
children: /* @__PURE__ */ jsx17(Bold, { className: "w-3.5 h-3.5" })
|
|
9311
9549
|
}
|
|
9312
9550
|
),
|
|
9313
|
-
/* @__PURE__ */
|
|
9551
|
+
/* @__PURE__ */ jsx17(
|
|
9314
9552
|
"button",
|
|
9315
9553
|
{
|
|
9316
9554
|
type: "button",
|
|
@@ -9318,10 +9556,10 @@ function CreateTemplateModal({
|
|
|
9318
9556
|
onClick: () => handleApplyFormatting("_"),
|
|
9319
9557
|
title: "\u05E0\u05D8\u05D5\u05D9 (Italic) _\u05D8\u05E7\u05E1\u05D8_",
|
|
9320
9558
|
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",
|
|
9321
|
-
children: /* @__PURE__ */
|
|
9559
|
+
children: /* @__PURE__ */ jsx17(Italic, { className: "w-3.5 h-3.5" })
|
|
9322
9560
|
}
|
|
9323
9561
|
),
|
|
9324
|
-
/* @__PURE__ */
|
|
9562
|
+
/* @__PURE__ */ jsx17(
|
|
9325
9563
|
"button",
|
|
9326
9564
|
{
|
|
9327
9565
|
type: "button",
|
|
@@ -9329,12 +9567,12 @@ function CreateTemplateModal({
|
|
|
9329
9567
|
onClick: () => handleApplyFormatting("~"),
|
|
9330
9568
|
title: "\u05E7\u05D5 \u05D7\u05D5\u05E6\u05D4 (Strikethrough) ~\u05D8\u05E7\u05E1\u05D8~",
|
|
9331
9569
|
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",
|
|
9332
|
-
children: /* @__PURE__ */
|
|
9570
|
+
children: /* @__PURE__ */ jsx17(Strikethrough, { className: "w-3.5 h-3.5" })
|
|
9333
9571
|
}
|
|
9334
9572
|
),
|
|
9335
|
-
/* @__PURE__ */
|
|
9573
|
+
/* @__PURE__ */ jsx17("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
|
|
9336
9574
|
/* @__PURE__ */ jsxs15("div", { className: "relative inline-block", ref: emojiPickerRef, children: [
|
|
9337
|
-
/* @__PURE__ */
|
|
9575
|
+
/* @__PURE__ */ jsx17(
|
|
9338
9576
|
"button",
|
|
9339
9577
|
{
|
|
9340
9578
|
type: "button",
|
|
@@ -9342,16 +9580,16 @@ function CreateTemplateModal({
|
|
|
9342
9580
|
onClick: () => setIsEmojiPickerOpen(!isEmojiPickerOpen),
|
|
9343
9581
|
title: "\u05D4\u05D5\u05E1\u05E3 \u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9 (Emoji)",
|
|
9344
9582
|
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"}`,
|
|
9345
|
-
children: /* @__PURE__ */
|
|
9583
|
+
children: /* @__PURE__ */ jsx17(Smile, { className: "w-4 h-4" })
|
|
9346
9584
|
}
|
|
9347
9585
|
),
|
|
9348
|
-
isEmojiPickerOpen && /* @__PURE__ */
|
|
9586
|
+
isEmojiPickerOpen && /* @__PURE__ */ jsx17(
|
|
9349
9587
|
"div",
|
|
9350
9588
|
{
|
|
9351
9589
|
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`,
|
|
9352
9590
|
dir: "ltr",
|
|
9353
9591
|
onMouseDown: (e) => e.stopPropagation(),
|
|
9354
|
-
children: /* @__PURE__ */
|
|
9592
|
+
children: /* @__PURE__ */ jsx17(
|
|
9355
9593
|
EmojiPicker,
|
|
9356
9594
|
{
|
|
9357
9595
|
onEmojiClick: (emojiData) => {
|
|
@@ -9368,7 +9606,7 @@ function CreateTemplateModal({
|
|
|
9368
9606
|
}
|
|
9369
9607
|
)
|
|
9370
9608
|
] }),
|
|
9371
|
-
/* @__PURE__ */
|
|
9609
|
+
/* @__PURE__ */ jsx17("div", { className: "h-4 w-px bg-slate-200 mx-1" }),
|
|
9372
9610
|
/* @__PURE__ */ jsxs15(
|
|
9373
9611
|
"button",
|
|
9374
9612
|
{
|
|
@@ -9379,8 +9617,8 @@ function CreateTemplateModal({
|
|
|
9379
9617
|
"aria-label": language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4",
|
|
9380
9618
|
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",
|
|
9381
9619
|
children: [
|
|
9382
|
-
/* @__PURE__ */
|
|
9383
|
-
/* @__PURE__ */
|
|
9620
|
+
/* @__PURE__ */ jsx17(Plus, { className: "w-3.5 h-3.5" }),
|
|
9621
|
+
/* @__PURE__ */ jsx17("span", { children: language === "en_US" ? "Add variable" : "\u05DE\u05E9\u05EA\u05E0\u05D4" })
|
|
9384
9622
|
]
|
|
9385
9623
|
}
|
|
9386
9624
|
)
|
|
@@ -9392,15 +9630,15 @@ function CreateTemplateModal({
|
|
|
9392
9630
|
dir: "ltr",
|
|
9393
9631
|
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)",
|
|
9394
9632
|
children: [
|
|
9395
|
-
/* @__PURE__ */
|
|
9633
|
+
/* @__PURE__ */ jsx17(
|
|
9396
9634
|
"span",
|
|
9397
9635
|
{
|
|
9398
9636
|
className: `font-semibold transition-colors ${bodyText.length >= 1024 ? "text-rose-600" : bodyText.length >= 950 ? "text-amber-600" : "text-slate-500"}`,
|
|
9399
9637
|
children: bodyText.length
|
|
9400
9638
|
}
|
|
9401
9639
|
),
|
|
9402
|
-
/* @__PURE__ */
|
|
9403
|
-
/* @__PURE__ */
|
|
9640
|
+
/* @__PURE__ */ jsx17("span", { className: "text-slate-300", children: "/" }),
|
|
9641
|
+
/* @__PURE__ */ jsx17("span", { className: "text-slate-400", children: "1024" })
|
|
9404
9642
|
]
|
|
9405
9643
|
}
|
|
9406
9644
|
)
|
|
@@ -9408,7 +9646,7 @@ function CreateTemplateModal({
|
|
|
9408
9646
|
}
|
|
9409
9647
|
)
|
|
9410
9648
|
] }),
|
|
9411
|
-
/* @__PURE__ */
|
|
9649
|
+
/* @__PURE__ */ jsx17("div", { className: "flex flex-wrap items-center justify-between text-[11px] text-slate-400 px-1 gap-2", children: /* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-3", children: [
|
|
9412
9650
|
/* @__PURE__ */ jsxs15("span", { children: [
|
|
9413
9651
|
ratioInfo.staticWordsCount,
|
|
9414
9652
|
" \u05DE\u05D9\u05DC\u05D9\u05DD"
|
|
@@ -9420,18 +9658,18 @@ function CreateTemplateModal({
|
|
|
9420
9658
|
] }) }),
|
|
9421
9659
|
uniqueVariables.length > 0 && /* @__PURE__ */ jsxs15("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
|
|
9422
9660
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1.5 text-xs font-bold text-slate-800", children: [
|
|
9423
|
-
/* @__PURE__ */
|
|
9424
|
-
/* @__PURE__ */
|
|
9661
|
+
/* @__PURE__ */ jsx17(Info2, { className: "w-4 h-4 text-emerald-600" }),
|
|
9662
|
+
/* @__PURE__ */ jsx17("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)" })
|
|
9425
9663
|
] }),
|
|
9426
|
-
/* @__PURE__ */
|
|
9427
|
-
/* @__PURE__ */
|
|
9664
|
+
/* @__PURE__ */ jsx17("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." }),
|
|
9665
|
+
/* @__PURE__ */ jsx17("div", { className: "grid grid-cols-1 sm:grid-cols-2 gap-3 pt-1", children: uniqueVariables.map((idx) => /* @__PURE__ */ jsxs15("div", { className: "space-y-1", children: [
|
|
9428
9666
|
/* @__PURE__ */ jsxs15("label", { className: "block text-[11px] font-semibold text-slate-700 font-mono", children: [
|
|
9429
9667
|
"\u05D3\u05D5\u05D2\u05DE\u05D4 \u05E2\u05D1\u05D5\u05E8 ",
|
|
9430
9668
|
`{{${idx}}}`,
|
|
9431
9669
|
" ",
|
|
9432
|
-
/* @__PURE__ */
|
|
9670
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9433
9671
|
] }),
|
|
9434
|
-
/* @__PURE__ */
|
|
9672
|
+
/* @__PURE__ */ jsx17(
|
|
9435
9673
|
"input",
|
|
9436
9674
|
{
|
|
9437
9675
|
type: "text",
|
|
@@ -9448,19 +9686,19 @@ function CreateTemplateModal({
|
|
|
9448
9686
|
] }),
|
|
9449
9687
|
bodyText.trim().length > 0 && validationResult.errors.length > 0 && /* @__PURE__ */ jsxs15("div", { className: "p-3.5 bg-amber-50 border border-amber-200 rounded-xl space-y-1.5 text-xs text-amber-900", children: [
|
|
9450
9688
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-1.5 font-bold", children: [
|
|
9451
|
-
/* @__PURE__ */
|
|
9452
|
-
/* @__PURE__ */
|
|
9689
|
+
/* @__PURE__ */ jsx17(AlertCircle2, { className: "w-4 h-4 text-amber-600 shrink-0" }),
|
|
9690
|
+
/* @__PURE__ */ jsx17("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:" })
|
|
9453
9691
|
] }),
|
|
9454
|
-
/* @__PURE__ */
|
|
9692
|
+
/* @__PURE__ */ jsx17("ul", { className: "list-disc list-inside space-y-1 text-[11px] pr-2 leading-relaxed", children: validationResult.errors.map((err, i) => /* @__PURE__ */ jsx17("li", { children: err }, i)) })
|
|
9455
9693
|
] })
|
|
9456
9694
|
] }),
|
|
9457
9695
|
/* @__PURE__ */ jsxs15("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3", children: [
|
|
9458
9696
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between", children: [
|
|
9459
9697
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
9460
|
-
/* @__PURE__ */
|
|
9461
|
-
/* @__PURE__ */
|
|
9698
|
+
/* @__PURE__ */ jsx17(Paperclip, { className: "w-4 h-4 text-slate-600" }),
|
|
9699
|
+
/* @__PURE__ */ jsx17("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)" })
|
|
9462
9700
|
] }),
|
|
9463
|
-
/* @__PURE__ */
|
|
9701
|
+
/* @__PURE__ */ jsx17(
|
|
9464
9702
|
"input",
|
|
9465
9703
|
{
|
|
9466
9704
|
type: "checkbox",
|
|
@@ -9478,10 +9716,10 @@ function CreateTemplateModal({
|
|
|
9478
9716
|
] }),
|
|
9479
9717
|
hasFileHeader && /* @__PURE__ */ jsxs15("div", { className: "space-y-3 pt-1", children: [
|
|
9480
9718
|
fileError && /* @__PURE__ */ jsxs15("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: [
|
|
9481
|
-
/* @__PURE__ */
|
|
9482
|
-
/* @__PURE__ */
|
|
9719
|
+
/* @__PURE__ */ jsx17(AlertCircle2, { className: "w-4 h-4 text-rose-600 shrink-0" }),
|
|
9720
|
+
/* @__PURE__ */ jsx17("span", { children: fileError })
|
|
9483
9721
|
] }),
|
|
9484
|
-
/* @__PURE__ */
|
|
9722
|
+
/* @__PURE__ */ jsx17(
|
|
9485
9723
|
"input",
|
|
9486
9724
|
{
|
|
9487
9725
|
ref: fileInputRef,
|
|
@@ -9501,33 +9739,33 @@ function CreateTemplateModal({
|
|
|
9501
9739
|
},
|
|
9502
9740
|
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",
|
|
9503
9741
|
children: [
|
|
9504
|
-
/* @__PURE__ */
|
|
9742
|
+
/* @__PURE__ */ jsx17("div", { className: "w-9 h-9 rounded-full bg-slate-100 text-slate-500 flex items-center justify-center", children: /* @__PURE__ */ jsx17(Upload2, { className: "w-4 h-4" }) }),
|
|
9505
9743
|
/* @__PURE__ */ jsxs15("div", { className: "text-center", children: [
|
|
9506
|
-
/* @__PURE__ */
|
|
9507
|
-
/* @__PURE__ */
|
|
9744
|
+
/* @__PURE__ */ jsx17("span", { className: "text-xs font-bold text-emerald-700 block", children: "\u05DC\u05D7\u05E5 \u05DC\u05D1\u05D7\u05D9\u05E8\u05EA \u05E7\u05D5\u05D1\u05E5" }),
|
|
9745
|
+
/* @__PURE__ */ jsx17("span", { className: "text-[10px] text-slate-400", children: "PDF, JPG, PNG, MP4 \u05E2\u05D3 5MB" })
|
|
9508
9746
|
] })
|
|
9509
9747
|
]
|
|
9510
9748
|
}
|
|
9511
9749
|
),
|
|
9512
9750
|
selectedFile && /* @__PURE__ */ jsxs15("div", { className: "p-3 bg-white border border-emerald-200 rounded-xl flex items-center justify-between gap-3 shadow-2xs", children: [
|
|
9513
9751
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2.5 overflow-hidden", children: [
|
|
9514
|
-
/* @__PURE__ */
|
|
9752
|
+
/* @__PURE__ */ jsx17("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__ */ jsx17(FileText2, { className: "w-4 h-4" }) : selectedFile.type.includes("video") || selectedFile.name.toLowerCase().match(/\.(mp4|mov|avi|webm)$/) ? /* @__PURE__ */ jsx17(Video, { className: "w-4 h-4" }) : /* @__PURE__ */ jsx17(ImageIcon, { className: "w-4 h-4" }) }),
|
|
9515
9753
|
/* @__PURE__ */ jsxs15("div", { className: "overflow-hidden", children: [
|
|
9516
|
-
/* @__PURE__ */
|
|
9517
|
-
/* @__PURE__ */
|
|
9754
|
+
/* @__PURE__ */ jsx17("p", { className: "text-xs font-bold text-slate-800 truncate", title: selectedFile.name, children: /* @__PURE__ */ jsx17("span", { dir: "ltr", className: "inline-block truncate max-w-full", children: selectedFile.name }) }),
|
|
9755
|
+
/* @__PURE__ */ jsx17("p", { className: "text-[10px] text-slate-400", children: /* @__PURE__ */ jsxs15("span", { dir: "ltr", className: "inline-block", children: [
|
|
9518
9756
|
formatFileSize(selectedFile.size),
|
|
9519
9757
|
selectedFile.type ? ` \u2022 ${selectedFile.type}` : ""
|
|
9520
9758
|
] }) })
|
|
9521
9759
|
] })
|
|
9522
9760
|
] }),
|
|
9523
|
-
/* @__PURE__ */
|
|
9761
|
+
/* @__PURE__ */ jsx17(
|
|
9524
9762
|
"button",
|
|
9525
9763
|
{
|
|
9526
9764
|
type: "button",
|
|
9527
9765
|
onClick: handleRemoveFile,
|
|
9528
9766
|
className: "p-1 text-slate-400 hover:text-rose-600 rounded-md transition-colors cursor-pointer",
|
|
9529
9767
|
title: "\u05D4\u05E1\u05E8 \u05E7\u05D5\u05D1\u05E5",
|
|
9530
|
-
children: /* @__PURE__ */
|
|
9768
|
+
children: /* @__PURE__ */ jsx17(Trash22, { className: "w-4 h-4" })
|
|
9531
9769
|
}
|
|
9532
9770
|
)
|
|
9533
9771
|
] })
|
|
@@ -9536,10 +9774,10 @@ function CreateTemplateModal({
|
|
|
9536
9774
|
/* @__PURE__ */ jsxs15("div", { className: "p-4 bg-slate-50 border border-slate-200 rounded-xl space-y-3.5", children: [
|
|
9537
9775
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between", children: [
|
|
9538
9776
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
9539
|
-
/* @__PURE__ */
|
|
9777
|
+
/* @__PURE__ */ jsx17(MousePointerClick, { className: "w-4 h-4 text-slate-600" }),
|
|
9540
9778
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
9541
|
-
/* @__PURE__ */
|
|
9542
|
-
/* @__PURE__ */
|
|
9779
|
+
/* @__PURE__ */ jsx17("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)" }),
|
|
9780
|
+
/* @__PURE__ */ jsx17("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)" })
|
|
9543
9781
|
] })
|
|
9544
9782
|
] }),
|
|
9545
9783
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center gap-2", children: [
|
|
@@ -9563,9 +9801,9 @@ function CreateTemplateModal({
|
|
|
9563
9801
|
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"}`,
|
|
9564
9802
|
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",
|
|
9565
9803
|
children: [
|
|
9566
|
-
/* @__PURE__ */
|
|
9567
|
-
/* @__PURE__ */
|
|
9568
|
-
/* @__PURE__ */
|
|
9804
|
+
/* @__PURE__ */ jsx17(Plus, { className: "w-3.5 h-3.5" }),
|
|
9805
|
+
/* @__PURE__ */ jsx17("span", { children: "\u05D4\u05D5\u05E1\u05E3 \u05DB\u05E4\u05EA\u05D5\u05E8" }),
|
|
9806
|
+
/* @__PURE__ */ jsx17(
|
|
9569
9807
|
ChevronDown2,
|
|
9570
9808
|
{
|
|
9571
9809
|
className: `w-3.5 h-3.5 transition-transform ${isAddButtonOpen ? "rotate-180" : ""}`
|
|
@@ -9582,10 +9820,10 @@ function CreateTemplateModal({
|
|
|
9582
9820
|
onClick: () => handleAddButton("QUICK_REPLY"),
|
|
9583
9821
|
className: "w-full p-2 text-right rounded-lg hover:bg-slate-50 flex items-start gap-2.5 transition-colors cursor-pointer group",
|
|
9584
9822
|
children: [
|
|
9585
|
-
/* @__PURE__ */
|
|
9823
|
+
/* @__PURE__ */ jsx17("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__ */ jsx17(MessageSquare, { className: "w-3.5 h-3.5" }) }),
|
|
9586
9824
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
9587
|
-
/* @__PURE__ */
|
|
9588
|
-
/* @__PURE__ */
|
|
9825
|
+
/* @__PURE__ */ jsx17("p", { className: "text-xs font-semibold text-slate-800", children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" }),
|
|
9826
|
+
/* @__PURE__ */ jsx17("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" })
|
|
9589
9827
|
] })
|
|
9590
9828
|
]
|
|
9591
9829
|
}
|
|
@@ -9597,10 +9835,10 @@ function CreateTemplateModal({
|
|
|
9597
9835
|
onClick: () => handleAddButton("URL"),
|
|
9598
9836
|
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",
|
|
9599
9837
|
children: [
|
|
9600
|
-
/* @__PURE__ */
|
|
9838
|
+
/* @__PURE__ */ jsx17("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__ */ jsx17(ExternalLink3, { className: "w-3.5 h-3.5" }) }),
|
|
9601
9839
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
9602
|
-
/* @__PURE__ */
|
|
9603
|
-
/* @__PURE__ */
|
|
9840
|
+
/* @__PURE__ */ jsx17("p", { className: "text-xs font-semibold text-slate-800", children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" }),
|
|
9841
|
+
/* @__PURE__ */ jsx17("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" })
|
|
9604
9842
|
] })
|
|
9605
9843
|
]
|
|
9606
9844
|
}
|
|
@@ -9612,10 +9850,10 @@ function CreateTemplateModal({
|
|
|
9612
9850
|
onClick: () => handleAddButton("PHONE_NUMBER"),
|
|
9613
9851
|
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",
|
|
9614
9852
|
children: [
|
|
9615
|
-
/* @__PURE__ */
|
|
9853
|
+
/* @__PURE__ */ jsx17("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__ */ jsx17(Phone, { className: "w-3.5 h-3.5" }) }),
|
|
9616
9854
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
9617
|
-
/* @__PURE__ */
|
|
9618
|
-
/* @__PURE__ */
|
|
9855
|
+
/* @__PURE__ */ jsx17("p", { className: "text-xs font-semibold text-slate-800", children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" }),
|
|
9856
|
+
/* @__PURE__ */ jsx17("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" })
|
|
9619
9857
|
] })
|
|
9620
9858
|
]
|
|
9621
9859
|
}
|
|
@@ -9627,10 +9865,10 @@ function CreateTemplateModal({
|
|
|
9627
9865
|
onClick: () => handleAddButton("COPY_CODE"),
|
|
9628
9866
|
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",
|
|
9629
9867
|
children: [
|
|
9630
|
-
/* @__PURE__ */
|
|
9868
|
+
/* @__PURE__ */ jsx17("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__ */ jsx17(Copy3, { className: "w-3.5 h-3.5" }) }),
|
|
9631
9869
|
/* @__PURE__ */ jsxs15("div", { children: [
|
|
9632
|
-
/* @__PURE__ */
|
|
9633
|
-
/* @__PURE__ */
|
|
9870
|
+
/* @__PURE__ */ jsx17("p", { className: "text-xs font-semibold text-slate-800", children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" }),
|
|
9871
|
+
/* @__PURE__ */ jsx17("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" })
|
|
9634
9872
|
] })
|
|
9635
9873
|
]
|
|
9636
9874
|
}
|
|
@@ -9639,8 +9877,8 @@ function CreateTemplateModal({
|
|
|
9639
9877
|
] })
|
|
9640
9878
|
] })
|
|
9641
9879
|
] }),
|
|
9642
|
-
buttons.length === 0 && /* @__PURE__ */
|
|
9643
|
-
buttons.length > 0 && /* @__PURE__ */
|
|
9880
|
+
buttons.length === 0 && /* @__PURE__ */ jsx17("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.' }),
|
|
9881
|
+
buttons.length > 0 && /* @__PURE__ */ jsx17("div", { className: "space-y-2.5", children: buttons.map((btn, index) => {
|
|
9644
9882
|
const btnNum = index + 1;
|
|
9645
9883
|
return /* @__PURE__ */ jsxs15(
|
|
9646
9884
|
"div",
|
|
@@ -9654,30 +9892,30 @@ function CreateTemplateModal({
|
|
|
9654
9892
|
btnNum
|
|
9655
9893
|
] }),
|
|
9656
9894
|
btn.type === "QUICK_REPLY" && /* @__PURE__ */ jsxs15("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: [
|
|
9657
|
-
/* @__PURE__ */
|
|
9658
|
-
/* @__PURE__ */
|
|
9895
|
+
/* @__PURE__ */ jsx17(MessageSquare, { className: "w-3 h-3" }),
|
|
9896
|
+
/* @__PURE__ */ jsx17("span", { children: "Custom (\u05EA\u05D2\u05D5\u05D1\u05D4 \u05DE\u05D4\u05D9\u05E8\u05D4)" })
|
|
9659
9897
|
] }),
|
|
9660
9898
|
btn.type === "URL" && /* @__PURE__ */ jsxs15("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: [
|
|
9661
|
-
/* @__PURE__ */
|
|
9662
|
-
/* @__PURE__ */
|
|
9899
|
+
/* @__PURE__ */ jsx17(ExternalLink3, { className: "w-3 h-3" }),
|
|
9900
|
+
/* @__PURE__ */ jsx17("span", { children: "Visit website (\u05E7\u05D9\u05E9\u05D5\u05E8 \u05DC\u05D0\u05EA\u05E8)" })
|
|
9663
9901
|
] }),
|
|
9664
9902
|
btn.type === "PHONE_NUMBER" && /* @__PURE__ */ jsxs15("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: [
|
|
9665
|
-
/* @__PURE__ */
|
|
9666
|
-
/* @__PURE__ */
|
|
9903
|
+
/* @__PURE__ */ jsx17(Phone, { className: "w-3 h-3" }),
|
|
9904
|
+
/* @__PURE__ */ jsx17("span", { children: "Call phone number (\u05D7\u05D9\u05D5\u05D2 \u05DC\u05DE\u05E1\u05E4\u05E8)" })
|
|
9667
9905
|
] }),
|
|
9668
9906
|
btn.type === "COPY_CODE" && /* @__PURE__ */ jsxs15("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: [
|
|
9669
|
-
/* @__PURE__ */
|
|
9670
|
-
/* @__PURE__ */
|
|
9907
|
+
/* @__PURE__ */ jsx17(Copy3, { className: "w-3 h-3" }),
|
|
9908
|
+
/* @__PURE__ */ jsx17("span", { children: "Copy offer code (\u05D4\u05E2\u05EA\u05E7\u05EA \u05E7\u05D5\u05D3)" })
|
|
9671
9909
|
] })
|
|
9672
9910
|
] }),
|
|
9673
|
-
/* @__PURE__ */
|
|
9911
|
+
/* @__PURE__ */ jsx17(
|
|
9674
9912
|
"button",
|
|
9675
9913
|
{
|
|
9676
9914
|
type: "button",
|
|
9677
9915
|
onClick: () => handleRemoveButton(index),
|
|
9678
9916
|
className: "p-1 text-slate-400 hover:text-rose-600 hover:bg-rose-50 rounded-lg transition-colors cursor-pointer",
|
|
9679
9917
|
title: "\u05D4\u05E1\u05E8 \u05DB\u05E4\u05EA\u05D5\u05E8",
|
|
9680
|
-
children: /* @__PURE__ */
|
|
9918
|
+
children: /* @__PURE__ */ jsx17(Trash22, { className: "w-3.5 h-3.5" })
|
|
9681
9919
|
}
|
|
9682
9920
|
)
|
|
9683
9921
|
] }),
|
|
@@ -9685,7 +9923,7 @@ function CreateTemplateModal({
|
|
|
9685
9923
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
9686
9924
|
/* @__PURE__ */ jsxs15("label", { className: "font-semibold text-slate-700", children: [
|
|
9687
9925
|
"\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
|
|
9688
|
-
/* @__PURE__ */
|
|
9926
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9689
9927
|
] }),
|
|
9690
9928
|
/* @__PURE__ */ jsxs15(
|
|
9691
9929
|
"span",
|
|
@@ -9698,7 +9936,7 @@ function CreateTemplateModal({
|
|
|
9698
9936
|
}
|
|
9699
9937
|
)
|
|
9700
9938
|
] }),
|
|
9701
|
-
/* @__PURE__ */
|
|
9939
|
+
/* @__PURE__ */ jsx17(
|
|
9702
9940
|
"input",
|
|
9703
9941
|
{
|
|
9704
9942
|
type: "text",
|
|
@@ -9715,7 +9953,7 @@ function CreateTemplateModal({
|
|
|
9715
9953
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
9716
9954
|
/* @__PURE__ */ jsxs15("label", { className: "font-semibold text-slate-700", children: [
|
|
9717
9955
|
"\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
|
|
9718
|
-
/* @__PURE__ */
|
|
9956
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9719
9957
|
] }),
|
|
9720
9958
|
/* @__PURE__ */ jsxs15(
|
|
9721
9959
|
"span",
|
|
@@ -9728,7 +9966,7 @@ function CreateTemplateModal({
|
|
|
9728
9966
|
}
|
|
9729
9967
|
)
|
|
9730
9968
|
] }),
|
|
9731
|
-
/* @__PURE__ */
|
|
9969
|
+
/* @__PURE__ */ jsx17(
|
|
9732
9970
|
"input",
|
|
9733
9971
|
{
|
|
9734
9972
|
type: "text",
|
|
@@ -9744,14 +9982,14 @@ function CreateTemplateModal({
|
|
|
9744
9982
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
9745
9983
|
/* @__PURE__ */ jsxs15("label", { className: "font-semibold text-slate-700", children: [
|
|
9746
9984
|
"\u05DB\u05EA\u05D5\u05D1\u05EA URL \u05E1\u05D8\u05D8\u05D9\u05EA ",
|
|
9747
|
-
/* @__PURE__ */
|
|
9985
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9748
9986
|
] }),
|
|
9749
9987
|
/* @__PURE__ */ jsxs15("span", { className: "font-mono text-[10px] text-slate-400", children: [
|
|
9750
9988
|
(btn.url || "").length,
|
|
9751
9989
|
"/2000"
|
|
9752
9990
|
] })
|
|
9753
9991
|
] }),
|
|
9754
|
-
/* @__PURE__ */
|
|
9992
|
+
/* @__PURE__ */ jsx17(
|
|
9755
9993
|
"input",
|
|
9756
9994
|
{
|
|
9757
9995
|
type: "url",
|
|
@@ -9770,7 +10008,7 @@ function CreateTemplateModal({
|
|
|
9770
10008
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
9771
10009
|
/* @__PURE__ */ jsxs15("label", { className: "font-semibold text-slate-700", children: [
|
|
9772
10010
|
"\u05D8\u05E7\u05E1\u05D8 \u05D4\u05DB\u05E4\u05EA\u05D5\u05E8 ",
|
|
9773
|
-
/* @__PURE__ */
|
|
10011
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9774
10012
|
] }),
|
|
9775
10013
|
/* @__PURE__ */ jsxs15(
|
|
9776
10014
|
"span",
|
|
@@ -9783,7 +10021,7 @@ function CreateTemplateModal({
|
|
|
9783
10021
|
}
|
|
9784
10022
|
)
|
|
9785
10023
|
] }),
|
|
9786
|
-
/* @__PURE__ */
|
|
10024
|
+
/* @__PURE__ */ jsx17(
|
|
9787
10025
|
"input",
|
|
9788
10026
|
{
|
|
9789
10027
|
type: "text",
|
|
@@ -9799,14 +10037,14 @@ function CreateTemplateModal({
|
|
|
9799
10037
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
9800
10038
|
/* @__PURE__ */ jsxs15("label", { className: "font-semibold text-slate-700", children: [
|
|
9801
10039
|
"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF (\u05E4\u05D5\u05E8\u05DE\u05D8: +[\u05E7\u05D9\u05D3\u05D5\u05DE\u05EA][\u05DE\u05E1\u05E4\u05E8]) ",
|
|
9802
|
-
/* @__PURE__ */
|
|
10040
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9803
10041
|
] }),
|
|
9804
10042
|
/* @__PURE__ */ jsxs15("span", { className: "font-mono text-[10px] text-slate-400", children: [
|
|
9805
10043
|
(btn.phone_number || "").length,
|
|
9806
10044
|
"/20"
|
|
9807
10045
|
] })
|
|
9808
10046
|
] }),
|
|
9809
|
-
/* @__PURE__ */
|
|
10047
|
+
/* @__PURE__ */ jsx17(
|
|
9810
10048
|
"input",
|
|
9811
10049
|
{
|
|
9812
10050
|
type: "tel",
|
|
@@ -9825,7 +10063,7 @@ function CreateTemplateModal({
|
|
|
9825
10063
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
9826
10064
|
/* @__PURE__ */ jsxs15("label", { className: "font-semibold text-slate-700", children: [
|
|
9827
10065
|
"\u05E7\u05D5\u05D3 \u05D4\u05E6\u05E2\u05D4 / \u05E7\u05D5\u05E4\u05D5\u05DF ",
|
|
9828
|
-
/* @__PURE__ */
|
|
10066
|
+
/* @__PURE__ */ jsx17("span", { className: "text-rose-500", children: "*" })
|
|
9829
10067
|
] }),
|
|
9830
10068
|
/* @__PURE__ */ jsxs15(
|
|
9831
10069
|
"span",
|
|
@@ -9838,7 +10076,7 @@ function CreateTemplateModal({
|
|
|
9838
10076
|
}
|
|
9839
10077
|
)
|
|
9840
10078
|
] }),
|
|
9841
|
-
/* @__PURE__ */
|
|
10079
|
+
/* @__PURE__ */ jsx17(
|
|
9842
10080
|
"input",
|
|
9843
10081
|
{
|
|
9844
10082
|
type: "text",
|
|
@@ -9853,13 +10091,13 @@ function CreateTemplateModal({
|
|
|
9853
10091
|
] }),
|
|
9854
10092
|
/* @__PURE__ */ jsxs15("div", { className: "space-y-1", children: [
|
|
9855
10093
|
/* @__PURE__ */ jsxs15("div", { className: "flex items-center justify-between text-[11px]", children: [
|
|
9856
|
-
/* @__PURE__ */
|
|
10094
|
+
/* @__PURE__ */ jsx17("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)" }),
|
|
9857
10095
|
/* @__PURE__ */ jsxs15("span", { className: "font-mono text-[10px] text-slate-400", children: [
|
|
9858
10096
|
(btn.text || "").length,
|
|
9859
10097
|
"/25"
|
|
9860
10098
|
] })
|
|
9861
10099
|
] }),
|
|
9862
|
-
/* @__PURE__ */
|
|
10100
|
+
/* @__PURE__ */ jsx17(
|
|
9863
10101
|
"input",
|
|
9864
10102
|
{
|
|
9865
10103
|
type: "text",
|
|
@@ -9880,7 +10118,7 @@ function CreateTemplateModal({
|
|
|
9880
10118
|
] })
|
|
9881
10119
|
] }),
|
|
9882
10120
|
/* @__PURE__ */ jsxs15("div", { className: "px-6 py-4 border-t border-slate-100 flex items-center justify-end gap-3 bg-slate-50/50", children: [
|
|
9883
|
-
/* @__PURE__ */
|
|
10121
|
+
/* @__PURE__ */ jsx17(
|
|
9884
10122
|
"button",
|
|
9885
10123
|
{
|
|
9886
10124
|
type: "button",
|
|
@@ -9890,7 +10128,7 @@ function CreateTemplateModal({
|
|
|
9890
10128
|
children: "\u05D1\u05D9\u05D8\u05D5\u05DC"
|
|
9891
10129
|
}
|
|
9892
10130
|
),
|
|
9893
|
-
/* @__PURE__ */
|
|
10131
|
+
/* @__PURE__ */ jsx17(
|
|
9894
10132
|
"button",
|
|
9895
10133
|
{
|
|
9896
10134
|
type: "submit",
|
|
@@ -9898,11 +10136,11 @@ function CreateTemplateModal({
|
|
|
9898
10136
|
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"}`,
|
|
9899
10137
|
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",
|
|
9900
10138
|
children: isSubmitting ? /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
9901
|
-
/* @__PURE__ */
|
|
9902
|
-
/* @__PURE__ */
|
|
10139
|
+
/* @__PURE__ */ jsx17(Loader24, { className: "w-4 h-4 animate-spin" }),
|
|
10140
|
+
/* @__PURE__ */ jsx17("span", { children: submittingStep || "\u05D9\u05D5\u05E6\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA..." })
|
|
9903
10141
|
] }) : /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
9904
|
-
/* @__PURE__ */
|
|
9905
|
-
/* @__PURE__ */
|
|
10142
|
+
/* @__PURE__ */ jsx17(CheckCircle22, { className: "w-4 h-4" }),
|
|
10143
|
+
/* @__PURE__ */ jsx17("span", { children: "\u05E9\u05DC\u05D7 \u05DC\u05D1\u05D3\u05D9\u05E7\u05D4" })
|
|
9906
10144
|
] })
|
|
9907
10145
|
}
|
|
9908
10146
|
)
|
|
@@ -12610,7 +12848,7 @@ import {
|
|
|
12610
12848
|
CheckCircle2 as CheckCircle23,
|
|
12611
12849
|
AlertCircle as AlertCircle3
|
|
12612
12850
|
} from "lucide-react";
|
|
12613
|
-
import { Fragment as Fragment5, jsx as
|
|
12851
|
+
import { Fragment as Fragment5, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
12614
12852
|
function TemplateSelectionBlock({
|
|
12615
12853
|
selectedTemplate,
|
|
12616
12854
|
selectedTemplateId,
|
|
@@ -12641,8 +12879,8 @@ function TemplateSelectionBlock({
|
|
|
12641
12879
|
/* @__PURE__ */ jsxs16("div", { className: "space-y-1.5 shrink-0", children: [
|
|
12642
12880
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between pb-1.5 border-b border-slate-200/70 shrink-0 gap-2", children: [
|
|
12643
12881
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
12644
|
-
/* @__PURE__ */
|
|
12645
|
-
/* @__PURE__ */
|
|
12882
|
+
/* @__PURE__ */ jsx18(FileText3, { className: "w-4 h-4 text-emerald-600 shrink-0" }),
|
|
12883
|
+
/* @__PURE__ */ jsx18("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" })
|
|
12646
12884
|
] }),
|
|
12647
12885
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1.5 shrink-0", children: [
|
|
12648
12886
|
/* @__PURE__ */ jsxs16(
|
|
@@ -12654,8 +12892,8 @@ function TemplateSelectionBlock({
|
|
|
12654
12892
|
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"}`,
|
|
12655
12893
|
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}"`,
|
|
12656
12894
|
children: [
|
|
12657
|
-
isDeleting ? /* @__PURE__ */
|
|
12658
|
-
/* @__PURE__ */
|
|
12895
|
+
isDeleting ? /* @__PURE__ */ jsx18(Loader25, { className: "w-3.5 h-3.5 animate-spin text-rose-500" }) : /* @__PURE__ */ jsx18(Trash23, { className: "w-3.5 h-3.5 text-rose-500" }),
|
|
12896
|
+
/* @__PURE__ */ jsx18("span", { children: "\u05DE\u05D7\u05D9\u05E7\u05D4" })
|
|
12659
12897
|
]
|
|
12660
12898
|
}
|
|
12661
12899
|
),
|
|
@@ -12667,8 +12905,8 @@ function TemplateSelectionBlock({
|
|
|
12667
12905
|
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",
|
|
12668
12906
|
title: "\u05E6\u05D5\u05E8 \u05EA\u05D1\u05E0\u05D9\u05EA \u05D7\u05D3\u05E9\u05D4",
|
|
12669
12907
|
children: [
|
|
12670
|
-
/* @__PURE__ */
|
|
12671
|
-
/* @__PURE__ */
|
|
12908
|
+
/* @__PURE__ */ jsx18(Plus2, { className: "w-3.5 h-3.5" }),
|
|
12909
|
+
/* @__PURE__ */ jsx18("span", { children: "\u05D7\u05D3\u05E9" })
|
|
12672
12910
|
]
|
|
12673
12911
|
}
|
|
12674
12912
|
)
|
|
@@ -12683,13 +12921,13 @@ function TemplateSelectionBlock({
|
|
|
12683
12921
|
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",
|
|
12684
12922
|
children: [
|
|
12685
12923
|
selectedTemplate ? /* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 overflow-hidden", children: [
|
|
12686
|
-
/* @__PURE__ */
|
|
12924
|
+
/* @__PURE__ */ jsx18(
|
|
12687
12925
|
"span",
|
|
12688
12926
|
{
|
|
12689
12927
|
className: `w-2 h-2 rounded-full shrink-0 ${getStatusConfig(selectedTemplate.status).dotColor}`
|
|
12690
12928
|
}
|
|
12691
12929
|
),
|
|
12692
|
-
/* @__PURE__ */
|
|
12930
|
+
/* @__PURE__ */ jsx18("span", { className: "text-xs font-semibold text-slate-900 truncate", children: selectedTemplate.name }),
|
|
12693
12931
|
/* @__PURE__ */ jsxs16("span", { className: "text-[10px] text-slate-400 shrink-0", children: [
|
|
12694
12932
|
"(",
|
|
12695
12933
|
selectedTemplate.category,
|
|
@@ -12697,10 +12935,10 @@ function TemplateSelectionBlock({
|
|
|
12697
12935
|
selectedTemplate.language,
|
|
12698
12936
|
")"
|
|
12699
12937
|
] })
|
|
12700
|
-
] }) : /* @__PURE__ */
|
|
12938
|
+
] }) : /* @__PURE__ */ jsx18("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..." }),
|
|
12701
12939
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-1.5 shrink-0 mr-1", children: [
|
|
12702
|
-
isLoadingTemplates && /* @__PURE__ */
|
|
12703
|
-
/* @__PURE__ */
|
|
12940
|
+
isLoadingTemplates && /* @__PURE__ */ jsx18(Loader25, { className: "w-3.5 h-3.5 text-emerald-600 animate-spin" }),
|
|
12941
|
+
/* @__PURE__ */ jsx18(
|
|
12704
12942
|
ChevronDown3,
|
|
12705
12943
|
{
|
|
12706
12944
|
className: `w-3.5 h-3.5 text-slate-400 transition-transform ${isDropdownOpen ? "rotate-180" : ""}`
|
|
@@ -12711,7 +12949,7 @@ function TemplateSelectionBlock({
|
|
|
12711
12949
|
}
|
|
12712
12950
|
),
|
|
12713
12951
|
isDropdownOpen && /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
12714
|
-
/* @__PURE__ */
|
|
12952
|
+
/* @__PURE__ */ jsx18(
|
|
12715
12953
|
"div",
|
|
12716
12954
|
{
|
|
12717
12955
|
className: "fixed inset-0 z-40",
|
|
@@ -12719,7 +12957,7 @@ function TemplateSelectionBlock({
|
|
|
12719
12957
|
}
|
|
12720
12958
|
),
|
|
12721
12959
|
/* @__PURE__ */ jsxs16("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: [
|
|
12722
|
-
templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */
|
|
12960
|
+
templates.length === 0 && !isLoadingTemplates && /* @__PURE__ */ jsx18("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".' }),
|
|
12723
12961
|
templates.map((tpl) => {
|
|
12724
12962
|
const statusConfig = getStatusConfig(tpl.status);
|
|
12725
12963
|
const isSelected = tpl.id === selectedTemplateId;
|
|
@@ -12738,14 +12976,14 @@ function TemplateSelectionBlock({
|
|
|
12738
12976
|
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,
|
|
12739
12977
|
children: [
|
|
12740
12978
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 overflow-hidden", children: [
|
|
12741
|
-
/* @__PURE__ */
|
|
12979
|
+
/* @__PURE__ */ jsx18(
|
|
12742
12980
|
"span",
|
|
12743
12981
|
{
|
|
12744
12982
|
className: `w-2 h-2 rounded-full shrink-0 ${statusConfig.dotColor}`
|
|
12745
12983
|
}
|
|
12746
12984
|
),
|
|
12747
12985
|
/* @__PURE__ */ jsxs16("div", { className: "overflow-hidden", children: [
|
|
12748
|
-
/* @__PURE__ */
|
|
12986
|
+
/* @__PURE__ */ jsx18(
|
|
12749
12987
|
"p",
|
|
12750
12988
|
{
|
|
12751
12989
|
className: `text-xs font-semibold truncate ${isSelected ? "text-emerald-700" : canSelect ? "text-slate-800" : "text-slate-500"}`,
|
|
@@ -12759,7 +12997,7 @@ function TemplateSelectionBlock({
|
|
|
12759
12997
|
] })
|
|
12760
12998
|
] })
|
|
12761
12999
|
] }),
|
|
12762
|
-
/* @__PURE__ */
|
|
13000
|
+
/* @__PURE__ */ jsx18(
|
|
12763
13001
|
"span",
|
|
12764
13002
|
{
|
|
12765
13003
|
className: `text-[9px] font-semibold px-2 py-0.5 rounded-full border shrink-0 ${statusConfig.badgeBg} ${statusConfig.badgeText}`,
|
|
@@ -12777,16 +13015,16 @@ function TemplateSelectionBlock({
|
|
|
12777
13015
|
] }),
|
|
12778
13016
|
/* @__PURE__ */ jsxs16("div", { className: "flex-1 min-h-0 flex flex-col gap-2", children: [
|
|
12779
13017
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-600 shrink-0", children: [
|
|
12780
|
-
/* @__PURE__ */
|
|
13018
|
+
/* @__PURE__ */ jsx18("span", { children: "\u05EA\u05E6\u05D5\u05D2\u05EA \u05D4\u05D5\u05D3\u05E2\u05D4" }),
|
|
12781
13019
|
selectedTemplate && /* @__PURE__ */ jsxs16("span", { className: "text-[10px] text-slate-400", children: [
|
|
12782
13020
|
"(",
|
|
12783
13021
|
templateBodyText.length,
|
|
12784
13022
|
" \u05EA\u05D5\u05D5\u05D9\u05DD)"
|
|
12785
13023
|
] })
|
|
12786
13024
|
] }),
|
|
12787
|
-
selectedTemplate ? /* @__PURE__ */
|
|
12788
|
-
/* @__PURE__ */
|
|
12789
|
-
/* @__PURE__ */
|
|
13025
|
+
selectedTemplate ? /* @__PURE__ */ jsx18("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__ */ jsxs16("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: [
|
|
13026
|
+
/* @__PURE__ */ jsx18("span", { children: "\u05DC\u05D0 \u05E0\u05D1\u05D7\u05E8\u05D4 \u05EA\u05D1\u05E0\u05D9\u05EA" }),
|
|
13027
|
+
/* @__PURE__ */ jsx18("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"' })
|
|
12790
13028
|
] }),
|
|
12791
13029
|
selectedTemplate && (() => {
|
|
12792
13030
|
var _a;
|
|
@@ -12795,7 +13033,7 @@ function TemplateSelectionBlock({
|
|
|
12795
13033
|
);
|
|
12796
13034
|
const tplButtons = (buttonsComp == null ? void 0 : buttonsComp.buttons) || [];
|
|
12797
13035
|
if (!tplButtons || tplButtons.length === 0) return null;
|
|
12798
|
-
return /* @__PURE__ */
|
|
13036
|
+
return /* @__PURE__ */ jsx18("div", { className: "flex flex-wrap gap-1.5 shrink-0 pt-0.5", children: tplButtons.map((btn, idx) => {
|
|
12799
13037
|
const btnType = (btn.type || "").toUpperCase();
|
|
12800
13038
|
const btnText = btn.text || (btnType === "COPY_CODE" ? `\u05D4\u05E2\u05EA\u05E7 \u05E7\u05D5\u05D3: ${btn.example}` : "\u05DB\u05E4\u05EA\u05D5\u05E8");
|
|
12801
13039
|
return /* @__PURE__ */ jsxs16(
|
|
@@ -12803,11 +13041,11 @@ function TemplateSelectionBlock({
|
|
|
12803
13041
|
{
|
|
12804
13042
|
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",
|
|
12805
13043
|
children: [
|
|
12806
|
-
btnType === "QUICK_REPLY" && /* @__PURE__ */
|
|
12807
|
-
btnType === "URL" && /* @__PURE__ */
|
|
12808
|
-
btnType === "PHONE_NUMBER" && /* @__PURE__ */
|
|
12809
|
-
btnType === "COPY_CODE" && /* @__PURE__ */
|
|
12810
|
-
/* @__PURE__ */
|
|
13044
|
+
btnType === "QUICK_REPLY" && /* @__PURE__ */ jsx18(MessageSquare2, { className: "w-3 h-3 text-emerald-600" }),
|
|
13045
|
+
btnType === "URL" && /* @__PURE__ */ jsx18(ExternalLink4, { className: "w-3 h-3 text-sky-600" }),
|
|
13046
|
+
btnType === "PHONE_NUMBER" && /* @__PURE__ */ jsx18(Phone2, { className: "w-3 h-3 text-violet-600" }),
|
|
13047
|
+
btnType === "COPY_CODE" && /* @__PURE__ */ jsx18(Copy4, { className: "w-3 h-3 text-amber-600" }),
|
|
13048
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate max-w-[180px]", children: btnText })
|
|
12811
13049
|
]
|
|
12812
13050
|
},
|
|
12813
13051
|
idx
|
|
@@ -12823,8 +13061,8 @@ function TemplateSelectionBlock({
|
|
|
12823
13061
|
const hasValidMedia = Boolean(headerMediaUrl && headerMediaUrl.trim() && headerMediaUrl.startsWith("http"));
|
|
12824
13062
|
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";
|
|
12825
13063
|
return /* @__PURE__ */ jsxs16("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: [
|
|
12826
|
-
/* @__PURE__ */
|
|
12827
|
-
/* @__PURE__ */
|
|
13064
|
+
/* @__PURE__ */ jsx18("div", { className: "flex items-center gap-2.5 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
13065
|
+
/* @__PURE__ */ jsx18("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__ */ jsx18(
|
|
12828
13066
|
"img",
|
|
12829
13067
|
{
|
|
12830
13068
|
src: headerMediaUrl,
|
|
@@ -12834,33 +13072,33 @@ function TemplateSelectionBlock({
|
|
|
12834
13072
|
e.currentTarget.style.display = "none";
|
|
12835
13073
|
}
|
|
12836
13074
|
}
|
|
12837
|
-
) : /* @__PURE__ */
|
|
13075
|
+
) : /* @__PURE__ */ jsx18(ImageIcon2, { className: "w-4 h-4 text-amber-600" }) }),
|
|
12838
13076
|
/* @__PURE__ */ jsxs16("div", { className: "overflow-hidden", children: [
|
|
12839
|
-
/* @__PURE__ */
|
|
12840
|
-
/* @__PURE__ */
|
|
13077
|
+
/* @__PURE__ */ jsx18("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" }),
|
|
13078
|
+
/* @__PURE__ */ jsx18("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" })
|
|
12841
13079
|
] })
|
|
12842
13080
|
] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
12843
|
-
/* @__PURE__ */
|
|
13081
|
+
/* @__PURE__ */ jsx18("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__ */ jsx18(FileText3, { className: "w-4 h-4" }) }),
|
|
12844
13082
|
/* @__PURE__ */ jsxs16("div", { className: "overflow-hidden", children: [
|
|
12845
|
-
/* @__PURE__ */
|
|
12846
|
-
/* @__PURE__ */
|
|
13083
|
+
/* @__PURE__ */ jsx18("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
|
|
13084
|
+
/* @__PURE__ */ jsx18("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" })
|
|
12847
13085
|
] })
|
|
12848
13086
|
] }) : /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
12849
|
-
/* @__PURE__ */
|
|
13087
|
+
/* @__PURE__ */ jsx18("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__ */ jsx18(Video2, { className: "w-4 h-4" }) }),
|
|
12850
13088
|
/* @__PURE__ */ jsxs16("div", { className: "overflow-hidden", children: [
|
|
12851
|
-
/* @__PURE__ */
|
|
12852
|
-
/* @__PURE__ */
|
|
13089
|
+
/* @__PURE__ */ jsx18("span", { className: "text-xs font-bold text-slate-800 block truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" }),
|
|
13090
|
+
/* @__PURE__ */ jsx18("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" })
|
|
12853
13091
|
] })
|
|
12854
13092
|
] }) }),
|
|
12855
13093
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
12856
13094
|
hasValidMedia ? /* @__PURE__ */ jsxs16("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: [
|
|
12857
|
-
/* @__PURE__ */
|
|
13095
|
+
/* @__PURE__ */ jsx18(CheckCircle23, { className: "w-3 h-3 text-emerald-600" }),
|
|
12858
13096
|
"\u05E7\u05D5\u05D1\u05E5 \u05DE\u05E6\u05D5\u05E8\u05E3 \u05EA\u05E7\u05D9\u05DF"
|
|
12859
13097
|
] }) : /* @__PURE__ */ jsxs16("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: [
|
|
12860
|
-
/* @__PURE__ */
|
|
13098
|
+
/* @__PURE__ */ jsx18(AlertCircle3, { className: "w-3 h-3 text-amber-600 shrink-0" }),
|
|
12861
13099
|
"\u05E0\u05D3\u05E8\u05E9 \u05E6\u05D9\u05E8\u05D5\u05E3 \u05E7\u05D5\u05D1\u05E5 \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA \u05D6\u05D5"
|
|
12862
13100
|
] }),
|
|
12863
|
-
hasValidMedia && /* @__PURE__ */
|
|
13101
|
+
hasValidMedia && /* @__PURE__ */ jsx18(
|
|
12864
13102
|
"a",
|
|
12865
13103
|
{
|
|
12866
13104
|
href: headerMediaUrl,
|
|
@@ -12868,10 +13106,10 @@ function TemplateSelectionBlock({
|
|
|
12868
13106
|
rel: "noopener noreferrer",
|
|
12869
13107
|
title: "\u05EA\u05E6\u05D5\u05D2\u05D4 \u05DE\u05E7\u05D3\u05D9\u05DE\u05D4 \u05E9\u05DC \u05D4\u05E7\u05D5\u05D1\u05E5",
|
|
12870
13108
|
className: "p-1 text-slate-400 hover:text-emerald-700 hover:bg-slate-200/60 rounded-md transition-colors",
|
|
12871
|
-
children: /* @__PURE__ */
|
|
13109
|
+
children: /* @__PURE__ */ jsx18(ExternalLink4, { className: "w-3.5 h-3.5" })
|
|
12872
13110
|
}
|
|
12873
13111
|
),
|
|
12874
|
-
/* @__PURE__ */
|
|
13112
|
+
/* @__PURE__ */ jsx18(
|
|
12875
13113
|
"input",
|
|
12876
13114
|
{
|
|
12877
13115
|
ref: fileInputRef,
|
|
@@ -12889,7 +13127,7 @@ function TemplateSelectionBlock({
|
|
|
12889
13127
|
disabled: isUploadingMedia
|
|
12890
13128
|
}
|
|
12891
13129
|
),
|
|
12892
|
-
/* @__PURE__ */
|
|
13130
|
+
/* @__PURE__ */ jsx18(
|
|
12893
13131
|
"button",
|
|
12894
13132
|
{
|
|
12895
13133
|
type: "button",
|
|
@@ -12901,11 +13139,11 @@ function TemplateSelectionBlock({
|
|
|
12901
13139
|
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"}`,
|
|
12902
13140
|
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`,
|
|
12903
13141
|
children: isUploadingMedia ? /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
12904
|
-
/* @__PURE__ */
|
|
12905
|
-
/* @__PURE__ */
|
|
13142
|
+
/* @__PURE__ */ jsx18(Loader25, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
13143
|
+
/* @__PURE__ */ jsx18("span", { children: "\u05DE\u05E2\u05DC\u05D4..." })
|
|
12906
13144
|
] }) : /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
12907
|
-
/* @__PURE__ */
|
|
12908
|
-
/* @__PURE__ */
|
|
13145
|
+
/* @__PURE__ */ jsx18(Upload3, { className: "w-3.5 h-3.5" }),
|
|
13146
|
+
/* @__PURE__ */ jsx18("span", { children: hasValidMedia ? "\u05D4\u05D7\u05DC\u05E3 \u05E7\u05D5\u05D1\u05E5" : uploadButtonLabel })
|
|
12909
13147
|
] })
|
|
12910
13148
|
}
|
|
12911
13149
|
)
|
|
@@ -12914,13 +13152,13 @@ function TemplateSelectionBlock({
|
|
|
12914
13152
|
})(),
|
|
12915
13153
|
selectedTemplate && templateVariables.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "shrink-0 flex flex-col gap-1.5 pt-2 border-t border-slate-200/80 pb-0", children: [
|
|
12916
13154
|
/* @__PURE__ */ jsxs16("div", { className: "flex items-center justify-between shrink-0", children: [
|
|
12917
|
-
/* @__PURE__ */
|
|
13155
|
+
/* @__PURE__ */ jsx18("span", { className: "text-[11px] font-bold text-slate-700", children: "\u05DE\u05D9\u05E4\u05D5\u05D9 \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD" }),
|
|
12918
13156
|
/* @__PURE__ */ jsxs16("span", { className: "text-[9px] font-semibold text-emerald-700 bg-emerald-50 px-1.5 py-0.5 rounded border border-emerald-200", children: [
|
|
12919
13157
|
templateVariables.length,
|
|
12920
13158
|
" \u05DE\u05E9\u05EA\u05E0\u05D9\u05DD"
|
|
12921
13159
|
] })
|
|
12922
13160
|
] }),
|
|
12923
|
-
/* @__PURE__ */
|
|
13161
|
+
/* @__PURE__ */ jsx18("div", { className: "max-h-48 overflow-y-auto space-y-1.5 pr-0.5", children: templateVariables.map((varKey) => {
|
|
12924
13162
|
var _a;
|
|
12925
13163
|
const mapping = variableMapping[varKey] || { type: "column", value: "" };
|
|
12926
13164
|
const isStatic = mapping.type === "static";
|
|
@@ -12930,9 +13168,9 @@ function TemplateSelectionBlock({
|
|
|
12930
13168
|
{
|
|
12931
13169
|
className: "flex items-center gap-1.5 p-1 bg-white border border-slate-200 rounded-xl text-xs shrink-0",
|
|
12932
13170
|
children: [
|
|
12933
|
-
/* @__PURE__ */
|
|
13171
|
+
/* @__PURE__ */ jsx18("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}}}` }),
|
|
12934
13172
|
/* @__PURE__ */ jsxs16("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: [
|
|
12935
|
-
/* @__PURE__ */
|
|
13173
|
+
/* @__PURE__ */ jsx18(
|
|
12936
13174
|
"button",
|
|
12937
13175
|
{
|
|
12938
13176
|
type: "button",
|
|
@@ -12941,7 +13179,7 @@ function TemplateSelectionBlock({
|
|
|
12941
13179
|
children: "\u05E2\u05DE\u05D5\u05D3\u05D4"
|
|
12942
13180
|
}
|
|
12943
13181
|
),
|
|
12944
|
-
/* @__PURE__ */
|
|
13182
|
+
/* @__PURE__ */ jsx18(
|
|
12945
13183
|
"button",
|
|
12946
13184
|
{
|
|
12947
13185
|
type: "button",
|
|
@@ -12951,7 +13189,7 @@ function TemplateSelectionBlock({
|
|
|
12951
13189
|
}
|
|
12952
13190
|
)
|
|
12953
13191
|
] }),
|
|
12954
|
-
isStatic ? /* @__PURE__ */
|
|
13192
|
+
isStatic ? /* @__PURE__ */ jsx18(
|
|
12955
13193
|
"input",
|
|
12956
13194
|
{
|
|
12957
13195
|
type: "text",
|
|
@@ -12968,12 +13206,12 @@ function TemplateSelectionBlock({
|
|
|
12968
13206
|
onChange: (e) => handleVariableValueChange(varKey, e.target.value),
|
|
12969
13207
|
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",
|
|
12970
13208
|
children: [
|
|
12971
|
-
/* @__PURE__ */
|
|
12972
|
-
textableColumnOptions.map((opt) => /* @__PURE__ */
|
|
13209
|
+
/* @__PURE__ */ jsx18("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
|
|
13210
|
+
textableColumnOptions.map((opt) => /* @__PURE__ */ jsx18("option", { value: opt.id, children: opt.label }, opt.id))
|
|
12973
13211
|
]
|
|
12974
13212
|
}
|
|
12975
13213
|
),
|
|
12976
|
-
/* @__PURE__ */
|
|
13214
|
+
/* @__PURE__ */ jsx18(ChevronDown3, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
12977
13215
|
] })
|
|
12978
13216
|
]
|
|
12979
13217
|
},
|
|
@@ -12993,7 +13231,7 @@ import {
|
|
|
12993
13231
|
CheckSquare,
|
|
12994
13232
|
RefreshCw
|
|
12995
13233
|
} from "lucide-react";
|
|
12996
|
-
import { Fragment as Fragment6, jsx as
|
|
13234
|
+
import { Fragment as Fragment6, jsx as jsx19, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
12997
13235
|
function DynamicFiltersBlock({
|
|
12998
13236
|
filterableColumns,
|
|
12999
13237
|
filters,
|
|
@@ -13012,9 +13250,9 @@ function DynamicFiltersBlock({
|
|
|
13012
13250
|
/* @__PURE__ */ jsxs17("div", { className: "space-y-2", children: [
|
|
13013
13251
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: [
|
|
13014
13252
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center gap-2", children: [
|
|
13015
|
-
/* @__PURE__ */
|
|
13016
|
-
/* @__PURE__ */
|
|
13017
|
-
activeFiltersCount > 0 && /* @__PURE__ */
|
|
13253
|
+
/* @__PURE__ */ jsx19(Filter2, { className: "w-4 h-4 text-emerald-600" }),
|
|
13254
|
+
/* @__PURE__ */ jsx19("span", { className: "text-xs font-bold text-slate-800", children: "\u05E1\u05D9\u05E0\u05D5\u05DF \u05D3\u05D9\u05E0\u05DE\u05D9" }),
|
|
13255
|
+
activeFiltersCount > 0 && /* @__PURE__ */ jsx19("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 })
|
|
13018
13256
|
] }),
|
|
13019
13257
|
activeFiltersCount > 0 && /* @__PURE__ */ jsxs17(
|
|
13020
13258
|
"button",
|
|
@@ -13023,16 +13261,16 @@ function DynamicFiltersBlock({
|
|
|
13023
13261
|
onClick: handleClearFilters,
|
|
13024
13262
|
className: "text-[11px] text-rose-600 hover:text-rose-700 font-semibold hover:underline flex items-center gap-1 cursor-pointer",
|
|
13025
13263
|
children: [
|
|
13026
|
-
/* @__PURE__ */
|
|
13027
|
-
/* @__PURE__ */
|
|
13264
|
+
/* @__PURE__ */ jsx19(X10, { className: "w-3 h-3" }),
|
|
13265
|
+
/* @__PURE__ */ jsx19("span", { children: "\u05E0\u05E7\u05D4" })
|
|
13028
13266
|
]
|
|
13029
13267
|
}
|
|
13030
13268
|
)
|
|
13031
13269
|
] }),
|
|
13032
|
-
/* @__PURE__ */
|
|
13033
|
-
/* @__PURE__ */
|
|
13034
|
-
/* @__PURE__ */
|
|
13035
|
-
] }) : /* @__PURE__ */
|
|
13270
|
+
/* @__PURE__ */ jsx19("div", { className: "py-1", children: filterableColumns.length === 0 ? /* @__PURE__ */ jsxs17("div", { className: "flex flex-col items-center justify-center text-center p-4 text-xs text-slate-400 gap-1", children: [
|
|
13271
|
+
/* @__PURE__ */ jsx19("span", { children: "\u05D0\u05D9\u05DF \u05E9\u05D3\u05D5\u05EA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF \u05D1\u05D8\u05D1\u05DC\u05D4 \u05D6\u05D5" }),
|
|
13272
|
+
/* @__PURE__ */ jsx19("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" })
|
|
13273
|
+
] }) : /* @__PURE__ */ jsx19("div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-1 gap-2", children: filterableColumns.map((col) => {
|
|
13036
13274
|
var _a, _b, _c;
|
|
13037
13275
|
const colType = (_a = col.type) == null ? void 0 : _a.toUpperCase();
|
|
13038
13276
|
const isBoolean = colType === "BOOLEAN";
|
|
@@ -13042,7 +13280,7 @@ function DynamicFiltersBlock({
|
|
|
13042
13280
|
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] : [];
|
|
13043
13281
|
return /* @__PURE__ */ jsxs17("div", { className: "space-y-1", children: [
|
|
13044
13282
|
/* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between", children: [
|
|
13045
|
-
/* @__PURE__ */
|
|
13283
|
+
/* @__PURE__ */ jsx19(
|
|
13046
13284
|
"label",
|
|
13047
13285
|
{
|
|
13048
13286
|
className: "text-[11px] font-semibold text-slate-700 truncate max-w-[130px]",
|
|
@@ -13050,7 +13288,7 @@ function DynamicFiltersBlock({
|
|
|
13050
13288
|
children: col.name
|
|
13051
13289
|
}
|
|
13052
13290
|
),
|
|
13053
|
-
/* @__PURE__ */
|
|
13291
|
+
/* @__PURE__ */ jsx19("span", { className: "text-[9px] text-slate-400 font-mono", children: isBoolean ? "\u05DB\u05DF/\u05DC\u05D0" : "\u05E7\u05E9\u05E8" })
|
|
13054
13292
|
] }),
|
|
13055
13293
|
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
13056
13294
|
/* @__PURE__ */ jsxs17(
|
|
@@ -13060,15 +13298,15 @@ function DynamicFiltersBlock({
|
|
|
13060
13298
|
onChange: (e) => handleFilterChange(col.name, e.target.value),
|
|
13061
13299
|
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"}`,
|
|
13062
13300
|
children: [
|
|
13063
|
-
/* @__PURE__ */
|
|
13301
|
+
/* @__PURE__ */ jsx19("option", { value: "", children: "\u05D4\u05DB\u05DC" }),
|
|
13064
13302
|
isBoolean ? /* @__PURE__ */ jsxs17(Fragment6, { children: [
|
|
13065
|
-
/* @__PURE__ */
|
|
13066
|
-
/* @__PURE__ */
|
|
13067
|
-
] }) : options.map((opt) => /* @__PURE__ */
|
|
13303
|
+
/* @__PURE__ */ jsx19("option", { value: "true", children: "\u05DB\u05DF" }),
|
|
13304
|
+
/* @__PURE__ */ jsx19("option", { value: "false", children: "\u05DC\u05D0" })
|
|
13305
|
+
] }) : options.map((opt) => /* @__PURE__ */ jsx19("option", { value: opt.id || opt._id, children: getRelationOptionLabel(opt, col, relationOptions) }, opt.id || opt._id))
|
|
13068
13306
|
]
|
|
13069
13307
|
}
|
|
13070
13308
|
),
|
|
13071
|
-
/* @__PURE__ */
|
|
13309
|
+
/* @__PURE__ */ jsx19(ChevronDown4, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13072
13310
|
] })
|
|
13073
13311
|
] }, col.name);
|
|
13074
13312
|
}) }) })
|
|
@@ -13079,7 +13317,7 @@ function DynamicFiltersBlock({
|
|
|
13079
13317
|
{
|
|
13080
13318
|
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"}`,
|
|
13081
13319
|
children: [
|
|
13082
|
-
/* @__PURE__ */
|
|
13320
|
+
/* @__PURE__ */ jsx19(
|
|
13083
13321
|
CheckSquare,
|
|
13084
13322
|
{
|
|
13085
13323
|
className: `w-3 h-3 ${selectedRowIds.length > 0 ? "text-emerald-600" : "text-slate-400"}`
|
|
@@ -13092,7 +13330,7 @@ function DynamicFiltersBlock({
|
|
|
13092
13330
|
]
|
|
13093
13331
|
}
|
|
13094
13332
|
),
|
|
13095
|
-
/* @__PURE__ */
|
|
13333
|
+
/* @__PURE__ */ jsx19(
|
|
13096
13334
|
"button",
|
|
13097
13335
|
{
|
|
13098
13336
|
type: "button",
|
|
@@ -13100,7 +13338,7 @@ function DynamicFiltersBlock({
|
|
|
13100
13338
|
disabled: isLoadingTableData,
|
|
13101
13339
|
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",
|
|
13102
13340
|
title: "\u05E8\u05E2\u05E0\u05DF \u05E0\u05EA\u05D5\u05E0\u05D9 \u05D8\u05D1\u05DC\u05D4",
|
|
13103
|
-
children: /* @__PURE__ */
|
|
13341
|
+
children: /* @__PURE__ */ jsx19(
|
|
13104
13342
|
RefreshCw,
|
|
13105
13343
|
{
|
|
13106
13344
|
className: `w-3.5 h-3.5 ${isLoadingTableData ? "animate-spin text-emerald-600" : ""}`
|
|
@@ -13123,7 +13361,7 @@ import {
|
|
|
13123
13361
|
X as X11,
|
|
13124
13362
|
CheckSquare as CheckSquare2
|
|
13125
13363
|
} from "lucide-react";
|
|
13126
|
-
import { Fragment as Fragment7, jsx as
|
|
13364
|
+
import { Fragment as Fragment7, jsx as jsx20, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
13127
13365
|
function SettingsAndActionsBlock({
|
|
13128
13366
|
isScanningPhoneColumns,
|
|
13129
13367
|
targetPhoneOptions,
|
|
@@ -13168,27 +13406,27 @@ function SettingsAndActionsBlock({
|
|
|
13168
13406
|
var _a;
|
|
13169
13407
|
return /* @__PURE__ */ jsxs18("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: [
|
|
13170
13408
|
/* @__PURE__ */ jsxs18("div", { className: "space-y-2", children: [
|
|
13171
|
-
/* @__PURE__ */
|
|
13172
|
-
/* @__PURE__ */
|
|
13173
|
-
/* @__PURE__ */
|
|
13409
|
+
/* @__PURE__ */ jsx20("div", { className: "flex items-center justify-between pb-2 border-b border-slate-200/70 shrink-0", children: /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
13410
|
+
/* @__PURE__ */ jsx20("span", { className: "text-sm", children: "\u2699\uFE0F" }),
|
|
13411
|
+
/* @__PURE__ */ jsx20("span", { className: "text-xs font-bold text-slate-800", children: "\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05D5\u05E4\u05E2\u05D5\u05DC\u05D5\u05EA" })
|
|
13174
13412
|
] }) }),
|
|
13175
13413
|
/* @__PURE__ */ jsxs18("div", { className: "space-y-2.5 py-1", children: [
|
|
13176
13414
|
isScanningPhoneColumns && targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs18("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: [
|
|
13177
|
-
/* @__PURE__ */
|
|
13178
|
-
/* @__PURE__ */
|
|
13415
|
+
/* @__PURE__ */ jsx20(Loader26, { className: "w-4 h-4 animate-spin text-emerald-600 shrink-0" }),
|
|
13416
|
+
/* @__PURE__ */ jsx20("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..." })
|
|
13179
13417
|
] }) : targetPhoneOptions.length === 0 ? /* @__PURE__ */ jsxs18("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: [
|
|
13180
|
-
/* @__PURE__ */
|
|
13181
|
-
/* @__PURE__ */
|
|
13418
|
+
/* @__PURE__ */ jsx20(AlertCircle4, { className: "w-4 h-4 text-amber-600 shrink-0" }),
|
|
13419
|
+
/* @__PURE__ */ jsx20("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" })
|
|
13182
13420
|
] }) : targetPhoneOptions.length === 1 && targetPhoneOptions[0].type === "DIRECT" ? /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
13183
13421
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
13184
13422
|
/* @__PURE__ */ jsxs18("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
|
|
13185
|
-
/* @__PURE__ */
|
|
13186
|
-
/* @__PURE__ */
|
|
13423
|
+
/* @__PURE__ */ jsx20(Phone3, { className: "w-3 h-3 text-slate-400" }),
|
|
13424
|
+
/* @__PURE__ */ jsx20("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
|
|
13187
13425
|
] }),
|
|
13188
|
-
/* @__PURE__ */
|
|
13426
|
+
/* @__PURE__ */ jsx20("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" })
|
|
13189
13427
|
] }),
|
|
13190
13428
|
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
13191
|
-
/* @__PURE__ */
|
|
13429
|
+
/* @__PURE__ */ jsx20(
|
|
13192
13430
|
"input",
|
|
13193
13431
|
{
|
|
13194
13432
|
type: "text",
|
|
@@ -13198,27 +13436,27 @@ function SettingsAndActionsBlock({
|
|
|
13198
13436
|
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"
|
|
13199
13437
|
}
|
|
13200
13438
|
),
|
|
13201
|
-
/* @__PURE__ */
|
|
13439
|
+
/* @__PURE__ */ jsx20(Phone3, { className: "w-3.5 h-3.5 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13202
13440
|
] })
|
|
13203
13441
|
] }) : /* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
13204
13442
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
13205
13443
|
/* @__PURE__ */ jsxs18("label", { className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1", children: [
|
|
13206
|
-
/* @__PURE__ */
|
|
13207
|
-
/* @__PURE__ */
|
|
13444
|
+
/* @__PURE__ */ jsx20(Phone3, { className: "w-3 h-3 text-slate-400" }),
|
|
13445
|
+
/* @__PURE__ */ jsx20("span", { children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D8\u05DC\u05E4\u05D5\u05DF \u05D9\u05E2\u05D3" })
|
|
13208
13446
|
] }),
|
|
13209
|
-
/* @__PURE__ */
|
|
13447
|
+
/* @__PURE__ */ jsx20("span", { className: "text-[9px] text-slate-400", children: "\u05D7\u05D5\u05D1\u05D4" })
|
|
13210
13448
|
] }),
|
|
13211
13449
|
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
13212
|
-
/* @__PURE__ */
|
|
13450
|
+
/* @__PURE__ */ jsx20(
|
|
13213
13451
|
"select",
|
|
13214
13452
|
{
|
|
13215
13453
|
value: phoneColumnId,
|
|
13216
13454
|
onChange: (e) => setPhoneColumnId(e.target.value),
|
|
13217
13455
|
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",
|
|
13218
|
-
children: targetPhoneOptions.map((opt) => /* @__PURE__ */
|
|
13456
|
+
children: targetPhoneOptions.map((opt) => /* @__PURE__ */ jsx20("option", { value: opt.id, children: opt.label }, opt.id))
|
|
13219
13457
|
}
|
|
13220
13458
|
),
|
|
13221
|
-
/* @__PURE__ */
|
|
13459
|
+
/* @__PURE__ */ jsx20(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-2 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13222
13460
|
] })
|
|
13223
13461
|
] }),
|
|
13224
13462
|
/* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
@@ -13229,14 +13467,14 @@ function SettingsAndActionsBlock({
|
|
|
13229
13467
|
htmlFor: "whatsapp-auto-select-records",
|
|
13230
13468
|
className: "text-[11px] font-semibold text-slate-700 flex items-center gap-1 cursor-pointer",
|
|
13231
13469
|
children: [
|
|
13232
|
-
/* @__PURE__ */
|
|
13233
|
-
/* @__PURE__ */
|
|
13470
|
+
/* @__PURE__ */ jsx20(CheckSquare2, { className: "w-3 h-3 text-slate-400" }),
|
|
13471
|
+
/* @__PURE__ */ jsx20("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)" })
|
|
13234
13472
|
]
|
|
13235
13473
|
}
|
|
13236
13474
|
),
|
|
13237
13475
|
autoSelectCount !== null && autoSelectCount > 0 && /* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 animate-in fade-in duration-150", children: [
|
|
13238
13476
|
/* @__PURE__ */ jsxs18("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: [
|
|
13239
|
-
/* @__PURE__ */
|
|
13477
|
+
/* @__PURE__ */ jsx20("span", { className: "w-1.5 h-1.5 rounded-full bg-emerald-500 animate-pulse" }),
|
|
13240
13478
|
/* @__PURE__ */ jsxs18("span", { children: [
|
|
13241
13479
|
"\u05E0\u05D1\u05D7\u05E8\u05D5 ",
|
|
13242
13480
|
selectedRowIdsCount,
|
|
@@ -13252,14 +13490,14 @@ function SettingsAndActionsBlock({
|
|
|
13252
13490
|
title: "\u05E0\u05E7\u05D4 \u05D1\u05D7\u05D9\u05E8\u05D4 \u05D0\u05D5\u05D8\u05D5\u05DE\u05D8\u05D9\u05EA",
|
|
13253
13491
|
"aria-label": "Clear auto select count",
|
|
13254
13492
|
children: [
|
|
13255
|
-
/* @__PURE__ */
|
|
13256
|
-
/* @__PURE__ */
|
|
13493
|
+
/* @__PURE__ */ jsx20(X11, { className: "w-3 h-3" }),
|
|
13494
|
+
/* @__PURE__ */ jsx20("span", { children: "\u05E0\u05E7\u05D4" })
|
|
13257
13495
|
]
|
|
13258
13496
|
}
|
|
13259
13497
|
)
|
|
13260
13498
|
] })
|
|
13261
13499
|
] }),
|
|
13262
|
-
/* @__PURE__ */
|
|
13500
|
+
/* @__PURE__ */ jsx20("div", { className: "relative", children: /* @__PURE__ */ jsx20(
|
|
13263
13501
|
"input",
|
|
13264
13502
|
{
|
|
13265
13503
|
id: "whatsapp-auto-select-records",
|
|
@@ -13289,7 +13527,7 @@ function SettingsAndActionsBlock({
|
|
|
13289
13527
|
] }),
|
|
13290
13528
|
(selectedPhoneOption == null ? void 0 : selectedPhoneOption.type) === "SUBTABLE" && /* @__PURE__ */ jsxs18("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: [
|
|
13291
13529
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 pb-1 border-b border-emerald-200/60", children: [
|
|
13292
|
-
/* @__PURE__ */
|
|
13530
|
+
/* @__PURE__ */ jsx20(Users, { className: "w-3.5 h-3.5 text-emerald-700" }),
|
|
13293
13531
|
/* @__PURE__ */ jsxs18("span", { className: "text-[10.5px] font-bold text-emerald-900 truncate", children: [
|
|
13294
13532
|
"\u05D4\u05D2\u05D3\u05E8\u05D5\u05EA \u05E9\u05DC\u05D9\u05D7\u05D4 \u05DC\u05EA\u05EA-\u05D8\u05D1\u05DC\u05D4 \u05DE\u05E7\u05D5\u05E9\u05E8\u05EA (",
|
|
13295
13533
|
selectedPhoneOption.parentColumnName,
|
|
@@ -13297,7 +13535,7 @@ function SettingsAndActionsBlock({
|
|
|
13297
13535
|
] })
|
|
13298
13536
|
] }),
|
|
13299
13537
|
/* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
13300
|
-
/* @__PURE__ */
|
|
13538
|
+
/* @__PURE__ */ jsx20("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsx20("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:" }) }),
|
|
13301
13539
|
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
13302
13540
|
/* @__PURE__ */ jsxs18(
|
|
13303
13541
|
"select",
|
|
@@ -13309,7 +13547,7 @@ function SettingsAndActionsBlock({
|
|
|
13309
13547
|
},
|
|
13310
13548
|
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",
|
|
13311
13549
|
children: [
|
|
13312
|
-
/* @__PURE__ */
|
|
13550
|
+
/* @__PURE__ */ jsx20("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)" }),
|
|
13313
13551
|
subtableFilterableColumns.map((col) => {
|
|
13314
13552
|
var _a2;
|
|
13315
13553
|
return /* @__PURE__ */ jsxs18("option", { value: col.name, children: [
|
|
@@ -13322,13 +13560,13 @@ function SettingsAndActionsBlock({
|
|
|
13322
13560
|
]
|
|
13323
13561
|
}
|
|
13324
13562
|
),
|
|
13325
|
-
/* @__PURE__ */
|
|
13563
|
+
/* @__PURE__ */ jsx20(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13326
13564
|
] })
|
|
13327
13565
|
] }),
|
|
13328
13566
|
selectedSubtableFilterCol && /* @__PURE__ */ jsxs18("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
|
|
13329
13567
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
13330
|
-
/* @__PURE__ */
|
|
13331
|
-
!subtableFilterValue && /* @__PURE__ */
|
|
13568
|
+
/* @__PURE__ */ jsx20("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:" }),
|
|
13569
|
+
!subtableFilterValue && /* @__PURE__ */ jsx20("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." })
|
|
13332
13570
|
] }),
|
|
13333
13571
|
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
13334
13572
|
/* @__PURE__ */ jsxs18(
|
|
@@ -13338,14 +13576,14 @@ function SettingsAndActionsBlock({
|
|
|
13338
13576
|
onChange: (e) => setSubtableFilterValue(e.target.value),
|
|
13339
13577
|
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"}`,
|
|
13340
13578
|
children: [
|
|
13341
|
-
/* @__PURE__ */
|
|
13579
|
+
/* @__PURE__ */ jsx20("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA \u05DC\u05E1\u05D9\u05E0\u05D5\u05DF..." }),
|
|
13342
13580
|
((_a = selectedSubtableFilterCol.type) == null ? void 0 : _a.toUpperCase()) === "BOOLEAN" ? /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
13343
|
-
/* @__PURE__ */
|
|
13344
|
-
/* @__PURE__ */
|
|
13581
|
+
/* @__PURE__ */ jsx20("option", { value: "true", children: "\u05DB\u05DF (true)" }),
|
|
13582
|
+
/* @__PURE__ */ jsx20("option", { value: "false", children: "\u05DC\u05D0 (false)" })
|
|
13345
13583
|
] }) : getRelationOptionsForCol(
|
|
13346
13584
|
selectedSubtableFilterCol.name,
|
|
13347
13585
|
selectedPhoneOption.parentColumnName
|
|
13348
|
-
).map((opt) => /* @__PURE__ */
|
|
13586
|
+
).map((opt) => /* @__PURE__ */ jsx20("option", { value: opt.id, children: getRelationOptionLabel(
|
|
13349
13587
|
opt,
|
|
13350
13588
|
selectedSubtableFilterCol,
|
|
13351
13589
|
relationOptions
|
|
@@ -13353,11 +13591,11 @@ function SettingsAndActionsBlock({
|
|
|
13353
13591
|
]
|
|
13354
13592
|
}
|
|
13355
13593
|
),
|
|
13356
|
-
/* @__PURE__ */
|
|
13594
|
+
/* @__PURE__ */ jsx20(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13357
13595
|
] })
|
|
13358
13596
|
] }),
|
|
13359
13597
|
/* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
13360
|
-
/* @__PURE__ */
|
|
13598
|
+
/* @__PURE__ */ jsx20("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:" }),
|
|
13361
13599
|
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
13362
13600
|
/* @__PURE__ */ jsxs18(
|
|
13363
13601
|
"select",
|
|
@@ -13366,19 +13604,19 @@ function SettingsAndActionsBlock({
|
|
|
13366
13604
|
onChange: (e) => setSubtableSendLimit(e.target.value),
|
|
13367
13605
|
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",
|
|
13368
13606
|
children: [
|
|
13369
|
-
/* @__PURE__ */
|
|
13370
|
-
/* @__PURE__ */
|
|
13371
|
-
/* @__PURE__ */
|
|
13607
|
+
/* @__PURE__ */ jsx20("option", { value: "PRIMARY", children: "\u05DC\u05E0\u05E6\u05D9\u05D2 \u05E8\u05D0\u05E9\u05D9 \u05D1\u05DC\u05D1\u05D3" }),
|
|
13608
|
+
/* @__PURE__ */ jsx20("option", { value: "FIRST", children: "\u05E0\u05E6\u05D9\u05D2 \u05D0\u05D7\u05D3 \u05D1\u05DC\u05D1\u05D3" }),
|
|
13609
|
+
/* @__PURE__ */ jsx20("option", { value: "ALL", children: "\u05DB\u05DC \u05D4\u05E0\u05E6\u05D9\u05D2\u05D9\u05DD" })
|
|
13372
13610
|
]
|
|
13373
13611
|
}
|
|
13374
13612
|
),
|
|
13375
|
-
/* @__PURE__ */
|
|
13613
|
+
/* @__PURE__ */ jsx20(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13376
13614
|
] })
|
|
13377
13615
|
] })
|
|
13378
13616
|
] }),
|
|
13379
13617
|
/* @__PURE__ */ jsxs18("div", { className: "pt-2 border-t border-slate-200/70 space-y-2", children: [
|
|
13380
13618
|
/* @__PURE__ */ jsxs18("label", { className: "flex items-center gap-2 cursor-pointer select-none", children: [
|
|
13381
|
-
/* @__PURE__ */
|
|
13619
|
+
/* @__PURE__ */ jsx20(
|
|
13382
13620
|
"input",
|
|
13383
13621
|
{
|
|
13384
13622
|
type: "checkbox",
|
|
@@ -13395,13 +13633,13 @@ function SettingsAndActionsBlock({
|
|
|
13395
13633
|
className: "w-3.5 h-3.5 rounded border-slate-300 text-emerald-600 focus:ring-emerald-500 cursor-pointer"
|
|
13396
13634
|
}
|
|
13397
13635
|
),
|
|
13398
|
-
/* @__PURE__ */
|
|
13636
|
+
/* @__PURE__ */ jsx20("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" })
|
|
13399
13637
|
] }),
|
|
13400
|
-
enablePostSendAction && /* @__PURE__ */
|
|
13638
|
+
enablePostSendAction && /* @__PURE__ */ jsx20("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__ */ jsx20("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__ */ jsxs18(Fragment7, { children: [
|
|
13401
13639
|
/* @__PURE__ */ jsxs18("div", { className: "space-y-1", children: [
|
|
13402
13640
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
13403
|
-
/* @__PURE__ */
|
|
13404
|
-
selectedPostSendOption && /* @__PURE__ */
|
|
13641
|
+
/* @__PURE__ */ jsx20("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" }),
|
|
13642
|
+
selectedPostSendOption && /* @__PURE__ */ jsx20(
|
|
13405
13643
|
"span",
|
|
13406
13644
|
{
|
|
13407
13645
|
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"}`,
|
|
@@ -13423,18 +13661,18 @@ function SettingsAndActionsBlock({
|
|
|
13423
13661
|
},
|
|
13424
13662
|
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",
|
|
13425
13663
|
children: [
|
|
13426
|
-
/* @__PURE__ */
|
|
13427
|
-
postSendActionTargetOptions.map((opt) => /* @__PURE__ */
|
|
13664
|
+
/* @__PURE__ */ jsx20("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05DE\u05D5\u05D3\u05D4..." }),
|
|
13665
|
+
postSendActionTargetOptions.map((opt) => /* @__PURE__ */ jsx20("option", { value: opt.id, children: opt.label }, opt.id))
|
|
13428
13666
|
]
|
|
13429
13667
|
}
|
|
13430
13668
|
),
|
|
13431
|
-
/* @__PURE__ */
|
|
13669
|
+
/* @__PURE__ */ jsx20(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13432
13670
|
] })
|
|
13433
13671
|
] }),
|
|
13434
13672
|
selectedPostSendOption && /* @__PURE__ */ jsxs18("div", { className: "space-y-1 animate-in fade-in duration-150", children: [
|
|
13435
13673
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
13436
|
-
/* @__PURE__ */
|
|
13437
|
-
!postSendActionValue && /* @__PURE__ */
|
|
13674
|
+
/* @__PURE__ */ jsx20("label", { className: "text-[10px] font-semibold text-slate-600 block", children: "\u05E2\u05E8\u05DA \u05DC\u05E2\u05D3\u05DB\u05D5\u05DF" }),
|
|
13675
|
+
!postSendActionValue && /* @__PURE__ */ jsx20("span", { className: "text-[9px] text-amber-600 font-medium", children: "\u05D7\u05D5\u05D1\u05D4 \u05DC\u05D1\u05D7\u05D5\u05E8 \u05E2\u05E8\u05DA" })
|
|
13438
13676
|
] }),
|
|
13439
13677
|
/* @__PURE__ */ jsxs18("div", { className: "relative", children: [
|
|
13440
13678
|
/* @__PURE__ */ jsxs18(
|
|
@@ -13444,14 +13682,14 @@ function SettingsAndActionsBlock({
|
|
|
13444
13682
|
onChange: (e) => setPostSendActionValue(e.target.value),
|
|
13445
13683
|
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"}`,
|
|
13446
13684
|
children: [
|
|
13447
|
-
/* @__PURE__ */
|
|
13685
|
+
/* @__PURE__ */ jsx20("option", { value: "", children: "\u05D1\u05D7\u05E8 \u05E2\u05E8\u05DA..." }),
|
|
13448
13686
|
selectedPostSendOption.type === "BOOLEAN" ? /* @__PURE__ */ jsxs18(Fragment7, { children: [
|
|
13449
|
-
/* @__PURE__ */
|
|
13450
|
-
/* @__PURE__ */
|
|
13687
|
+
/* @__PURE__ */ jsx20("option", { value: "true", children: "\u05DB\u05DF (Yes)" }),
|
|
13688
|
+
/* @__PURE__ */ jsx20("option", { value: "false", children: "\u05DC\u05D0 (No)" })
|
|
13451
13689
|
] }) : getRelationOptionsForCol(
|
|
13452
13690
|
selectedPostSendOption.columnName,
|
|
13453
13691
|
selectedPostSendOption.parentColumnName
|
|
13454
|
-
).map((opt) => /* @__PURE__ */
|
|
13692
|
+
).map((opt) => /* @__PURE__ */ jsx20("option", { value: opt.id, children: getRelationOptionLabel(
|
|
13455
13693
|
opt,
|
|
13456
13694
|
selectedPostSendOption,
|
|
13457
13695
|
relationOptions
|
|
@@ -13459,7 +13697,7 @@ function SettingsAndActionsBlock({
|
|
|
13459
13697
|
]
|
|
13460
13698
|
}
|
|
13461
13699
|
),
|
|
13462
|
-
/* @__PURE__ */
|
|
13700
|
+
/* @__PURE__ */ jsx20(ChevronDown5, { className: "w-3 h-3 text-slate-400 absolute left-1.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
13463
13701
|
] })
|
|
13464
13702
|
] })
|
|
13465
13703
|
] }) })
|
|
@@ -13476,8 +13714,8 @@ function SettingsAndActionsBlock({
|
|
|
13476
13714
|
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"}`,
|
|
13477
13715
|
title: testButtonTitle,
|
|
13478
13716
|
children: [
|
|
13479
|
-
/* @__PURE__ */
|
|
13480
|
-
/* @__PURE__ */
|
|
13717
|
+
/* @__PURE__ */ jsx20(Phone3, { className: "w-3 h-3" }),
|
|
13718
|
+
/* @__PURE__ */ jsx20("span", { children: "\u05E9\u05DC\u05D7 \u05D8\u05E1\u05D8" })
|
|
13481
13719
|
]
|
|
13482
13720
|
}
|
|
13483
13721
|
),
|
|
@@ -13489,8 +13727,8 @@ function SettingsAndActionsBlock({
|
|
|
13489
13727
|
children: [
|
|
13490
13728
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between text-[11px] font-semibold text-slate-700", children: [
|
|
13491
13729
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 text-emerald-800 font-bold", children: [
|
|
13492
|
-
/* @__PURE__ */
|
|
13493
|
-
/* @__PURE__ */
|
|
13730
|
+
/* @__PURE__ */ jsx20(Loader26, { className: "w-3.5 h-3.5 animate-spin text-emerald-600 shrink-0" }),
|
|
13731
|
+
/* @__PURE__ */ jsx20("span", { children: "\u05E9\u05D5\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D1\u05EA\u05E4\u05D5\u05E6\u05D4..." })
|
|
13494
13732
|
] }),
|
|
13495
13733
|
/* @__PURE__ */ jsxs18("span", { className: "text-emerald-700 font-bold", children: [
|
|
13496
13734
|
(broadcastProgress == null ? void 0 : broadcastProgress.percent) || 0,
|
|
@@ -13501,7 +13739,7 @@ function SettingsAndActionsBlock({
|
|
|
13501
13739
|
")"
|
|
13502
13740
|
] })
|
|
13503
13741
|
] }),
|
|
13504
|
-
/* @__PURE__ */
|
|
13742
|
+
/* @__PURE__ */ jsx20("div", { className: "w-full h-2.5 bg-slate-100 rounded-full overflow-hidden border border-slate-200", children: /* @__PURE__ */ jsx20(
|
|
13505
13743
|
"div",
|
|
13506
13744
|
{
|
|
13507
13745
|
className: "h-full bg-emerald-500 rounded-full transition-all duration-300 ease-out",
|
|
@@ -13512,15 +13750,15 @@ function SettingsAndActionsBlock({
|
|
|
13512
13750
|
) }),
|
|
13513
13751
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-around pt-1 text-[11px] font-medium border-t border-slate-100", children: [
|
|
13514
13752
|
/* @__PURE__ */ jsxs18("span", { className: "text-emerald-700 flex items-center gap-1", title: "\u05E0\u05E9\u05DC\u05D7\u05D5 \u05D1\u05D4\u05E6\u05DC\u05D7\u05D4", children: [
|
|
13515
|
-
/* @__PURE__ */
|
|
13516
|
-
/* @__PURE__ */
|
|
13753
|
+
/* @__PURE__ */ jsx20("span", { children: "\u2705" }),
|
|
13754
|
+
/* @__PURE__ */ jsx20("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.successful) || 0 })
|
|
13517
13755
|
] }),
|
|
13518
13756
|
/* @__PURE__ */ jsxs18("span", { className: "text-rose-600 flex items-center gap-1", title: "\u05E9\u05DC\u05D9\u05D7\u05D4 \u05E0\u05DB\u05E9\u05DC\u05D4", children: [
|
|
13519
|
-
/* @__PURE__ */
|
|
13520
|
-
/* @__PURE__ */
|
|
13757
|
+
/* @__PURE__ */ jsx20("span", { children: "\u274C" }),
|
|
13758
|
+
/* @__PURE__ */ jsx20("span", { className: "font-bold", children: (broadcastProgress == null ? void 0 : broadcastProgress.failed) || 0 })
|
|
13521
13759
|
] }),
|
|
13522
13760
|
/* @__PURE__ */ jsxs18("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: [
|
|
13523
|
-
/* @__PURE__ */
|
|
13761
|
+
/* @__PURE__ */ jsx20("span", { children: "\u26A0\uFE0F" }),
|
|
13524
13762
|
/* @__PURE__ */ jsxs18("span", { className: "font-bold", children: [
|
|
13525
13763
|
(broadcastProgress == null ? void 0 : broadcastProgress.skipped) || 0,
|
|
13526
13764
|
" \u05DC\u05DC\u05D0 \u05D8\u05DC\u05E4\u05D5\u05DF"
|
|
@@ -13539,8 +13777,8 @@ function SettingsAndActionsBlock({
|
|
|
13539
13777
|
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"}`,
|
|
13540
13778
|
title: sendButtonTitle,
|
|
13541
13779
|
children: [
|
|
13542
|
-
/* @__PURE__ */
|
|
13543
|
-
/* @__PURE__ */
|
|
13780
|
+
/* @__PURE__ */ jsx20(Send, { className: "w-3.5 h-3.5" }),
|
|
13781
|
+
/* @__PURE__ */ jsx20("span", { children: finalRecipientCount > 0 ? `\u05E9\u05DC\u05D7 \u05DC-${finalRecipientCount} \u05E0\u05DE\u05E2\u05E0\u05D9\u05DD` : "\u05E9\u05DC\u05D7 \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA" })
|
|
13544
13782
|
]
|
|
13545
13783
|
}
|
|
13546
13784
|
),
|
|
@@ -13557,37 +13795,37 @@ function SettingsAndActionsBlock({
|
|
|
13557
13795
|
children: [
|
|
13558
13796
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center justify-between", children: [
|
|
13559
13797
|
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-1.5 text-[11px] font-bold text-slate-700", children: [
|
|
13560
|
-
/* @__PURE__ */
|
|
13561
|
-
/* @__PURE__ */
|
|
13798
|
+
/* @__PURE__ */ jsx20("span", { className: "text-xs", children: "\u{1F4CA}" }),
|
|
13799
|
+
/* @__PURE__ */ jsx20("span", { children: "\u05E1\u05D9\u05DB\u05D5\u05DD \u05E9\u05D9\u05D3\u05D5\u05E8 \u05D0\u05D7\u05E8\u05D5\u05DF" })
|
|
13562
13800
|
] }),
|
|
13563
|
-
clearBroadcastSummary && /* @__PURE__ */
|
|
13801
|
+
clearBroadcastSummary && /* @__PURE__ */ jsx20(
|
|
13564
13802
|
"button",
|
|
13565
13803
|
{
|
|
13566
13804
|
type: "button",
|
|
13567
13805
|
onClick: clearBroadcastSummary,
|
|
13568
13806
|
className: "text-slate-400 hover:text-slate-600 p-0.5 rounded-md hover:bg-slate-200/60 transition-colors cursor-pointer",
|
|
13569
13807
|
title: "\u05E1\u05D2\u05D5\u05E8 \u05E1\u05D9\u05DB\u05D5\u05DD",
|
|
13570
|
-
children: /* @__PURE__ */
|
|
13808
|
+
children: /* @__PURE__ */ jsx20(X11, { className: "w-3.5 h-3.5" })
|
|
13571
13809
|
}
|
|
13572
13810
|
)
|
|
13573
13811
|
] }),
|
|
13574
13812
|
/* @__PURE__ */ jsxs18("div", { className: "flex flex-wrap items-center gap-1.5 pt-0.5", children: [
|
|
13575
13813
|
/* @__PURE__ */ jsxs18("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: [
|
|
13576
|
-
/* @__PURE__ */
|
|
13814
|
+
/* @__PURE__ */ jsx20("span", { children: "\u2705" }),
|
|
13577
13815
|
/* @__PURE__ */ jsxs18("span", { children: [
|
|
13578
13816
|
broadcastSummary.successful,
|
|
13579
13817
|
" \u05E0\u05E9\u05DC\u05D7\u05D5"
|
|
13580
13818
|
] })
|
|
13581
13819
|
] }),
|
|
13582
13820
|
broadcastSummary.failed > 0 && /* @__PURE__ */ jsxs18("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: [
|
|
13583
|
-
/* @__PURE__ */
|
|
13821
|
+
/* @__PURE__ */ jsx20("span", { children: "\u274C" }),
|
|
13584
13822
|
/* @__PURE__ */ jsxs18("span", { children: [
|
|
13585
13823
|
broadcastSummary.failed,
|
|
13586
13824
|
" \u05E0\u05DB\u05E9\u05DC\u05D5"
|
|
13587
13825
|
] })
|
|
13588
13826
|
] }),
|
|
13589
13827
|
broadcastSummary.skipped > 0 && /* @__PURE__ */ jsxs18("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: [
|
|
13590
|
-
/* @__PURE__ */
|
|
13828
|
+
/* @__PURE__ */ jsx20("span", { children: "\u26A0\uFE0F" }),
|
|
13591
13829
|
/* @__PURE__ */ jsxs18("span", { children: [
|
|
13592
13830
|
broadcastSummary.skipped,
|
|
13593
13831
|
" \u05DC\u05DC\u05D0 \u05D8\u05DC\u05E4\u05D5\u05DF"
|
|
@@ -13686,14 +13924,14 @@ function useInboxState(orgId, actions) {
|
|
|
13686
13924
|
|
|
13687
13925
|
// src/components/WhatsAppComponent/inbox/ConversationList.tsx
|
|
13688
13926
|
import { Search as Search4, User } from "lucide-react";
|
|
13689
|
-
import { jsx as
|
|
13927
|
+
import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
13690
13928
|
function ConversationList({ conversations, activeId, onSelect }) {
|
|
13691
13929
|
return /* @__PURE__ */ jsxs19("div", { className: "w-80 border-l border-slate-200 bg-white flex flex-col h-full shrink-0", children: [
|
|
13692
13930
|
/* @__PURE__ */ jsxs19("div", { className: "p-4 border-b border-slate-100 bg-slate-50", children: [
|
|
13693
|
-
/* @__PURE__ */
|
|
13931
|
+
/* @__PURE__ */ jsx21("h2", { className: "text-lg font-bold text-slate-800 mb-3", children: "\u05E9\u05D9\u05D7\u05D5\u05EA \u05E0\u05DB\u05E0\u05E1\u05D5\u05EA" }),
|
|
13694
13932
|
/* @__PURE__ */ jsxs19("div", { className: "relative", children: [
|
|
13695
|
-
/* @__PURE__ */
|
|
13696
|
-
/* @__PURE__ */
|
|
13933
|
+
/* @__PURE__ */ jsx21(Search4, { className: "w-4 h-4 absolute right-3 top-1/2 -translate-y-1/2 text-slate-400" }),
|
|
13934
|
+
/* @__PURE__ */ jsx21(
|
|
13697
13935
|
"input",
|
|
13698
13936
|
{
|
|
13699
13937
|
type: "text",
|
|
@@ -13703,11 +13941,11 @@ function ConversationList({ conversations, activeId, onSelect }) {
|
|
|
13703
13941
|
)
|
|
13704
13942
|
] })
|
|
13705
13943
|
] }),
|
|
13706
|
-
/* @__PURE__ */
|
|
13944
|
+
/* @__PURE__ */ jsx21("div", { className: "flex-1 overflow-y-auto", children: (() => {
|
|
13707
13945
|
const sortedConversations = [...conversations].sort(
|
|
13708
13946
|
(a, b) => new Date(b.lastMessageAt).getTime() - new Date(a.lastMessageAt).getTime()
|
|
13709
13947
|
);
|
|
13710
|
-
return sortedConversations.length === 0 ? /* @__PURE__ */
|
|
13948
|
+
return sortedConversations.length === 0 ? /* @__PURE__ */ jsx21("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) => {
|
|
13711
13949
|
var _a, _b;
|
|
13712
13950
|
return /* @__PURE__ */ jsxs19(
|
|
13713
13951
|
"button",
|
|
@@ -13715,15 +13953,15 @@ function ConversationList({ conversations, activeId, onSelect }) {
|
|
|
13715
13953
|
onClick: () => onSelect(conv.id),
|
|
13716
13954
|
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"}`,
|
|
13717
13955
|
children: [
|
|
13718
|
-
/* @__PURE__ */
|
|
13956
|
+
/* @__PURE__ */ jsx21("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx21(User, { className: "w-5 h-5 text-slate-500" }) }),
|
|
13719
13957
|
/* @__PURE__ */ jsxs19("div", { className: "flex-1 overflow-hidden", children: [
|
|
13720
13958
|
/* @__PURE__ */ jsxs19("div", { className: "flex justify-between items-center mb-1", children: [
|
|
13721
|
-
/* @__PURE__ */
|
|
13722
|
-
/* @__PURE__ */
|
|
13959
|
+
/* @__PURE__ */ jsx21("span", { className: "font-semibold text-slate-800 text-sm truncate", children: conv.contactName || conv.contactPhone }),
|
|
13960
|
+
/* @__PURE__ */ jsx21("span", { className: "text-[10px] text-slate-400", children: new Date(conv.lastMessageAt).toLocaleTimeString("he-IL", { hour: "2-digit", minute: "2-digit" }) })
|
|
13723
13961
|
] }),
|
|
13724
13962
|
/* @__PURE__ */ jsxs19("div", { className: "flex justify-between items-center", children: [
|
|
13725
|
-
/* @__PURE__ */
|
|
13726
|
-
conv.unreadCount > 0 && /* @__PURE__ */
|
|
13963
|
+
/* @__PURE__ */ jsx21("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" }),
|
|
13964
|
+
conv.unreadCount > 0 && /* @__PURE__ */ jsx21("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 })
|
|
13727
13965
|
] })
|
|
13728
13966
|
] })
|
|
13729
13967
|
]
|
|
@@ -13738,7 +13976,7 @@ function ConversationList({ conversations, activeId, onSelect }) {
|
|
|
13738
13976
|
// src/components/WhatsAppComponent/inbox/ChatWindow.tsx
|
|
13739
13977
|
import { useState as useState18, useRef as useRef16, useEffect as useEffect16 } from "react";
|
|
13740
13978
|
import { Send as Send2, User as User2, Loader2 as Loader27 } from "lucide-react";
|
|
13741
|
-
import { jsx as
|
|
13979
|
+
import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
13742
13980
|
function ChatWindow({ activeConversation, messages, isLoading, isSending, onSendMessage }) {
|
|
13743
13981
|
const [inputText, setInputText] = useState18("");
|
|
13744
13982
|
const messagesTopRef = useRef16(null);
|
|
@@ -13757,33 +13995,33 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
|
|
|
13757
13995
|
};
|
|
13758
13996
|
if (!activeConversation) {
|
|
13759
13997
|
return /* @__PURE__ */ jsxs20("div", { className: "flex-1 bg-slate-50 flex items-center justify-center flex-col gap-4 text-slate-400", children: [
|
|
13760
|
-
/* @__PURE__ */
|
|
13761
|
-
/* @__PURE__ */
|
|
13998
|
+
/* @__PURE__ */ jsx22("div", { className: "w-16 h-16 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx22("svg", { className: "w-8 h-8 text-slate-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ jsx22("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" }) }) }),
|
|
13999
|
+
/* @__PURE__ */ jsx22("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" })
|
|
13762
14000
|
] });
|
|
13763
14001
|
}
|
|
13764
14002
|
return /* @__PURE__ */ jsxs20("div", { className: "flex-1 flex flex-col bg-[#efeae2] h-full relative", children: [
|
|
13765
14003
|
/* @__PURE__ */ jsxs20("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: [
|
|
13766
|
-
/* @__PURE__ */
|
|
14004
|
+
/* @__PURE__ */ jsx22("div", { className: "w-10 h-10 rounded-full bg-slate-200 flex items-center justify-center", children: /* @__PURE__ */ jsx22(User2, { className: "w-5 h-5 text-slate-500" }) }),
|
|
13767
14005
|
/* @__PURE__ */ jsxs20("div", { children: [
|
|
13768
|
-
/* @__PURE__ */
|
|
13769
|
-
/* @__PURE__ */
|
|
14006
|
+
/* @__PURE__ */ jsx22("h3", { className: "font-bold text-slate-800", children: activeConversation.contactName || activeConversation.contactPhone }),
|
|
14007
|
+
/* @__PURE__ */ jsx22("p", { className: "text-xs text-slate-500", dir: "ltr", children: activeConversation.contactPhone })
|
|
13770
14008
|
] })
|
|
13771
14009
|
] }),
|
|
13772
14010
|
/* @__PURE__ */ jsxs20("div", { className: "flex-1 overflow-y-auto p-6 space-y-4", children: [
|
|
13773
|
-
/* @__PURE__ */
|
|
13774
|
-
isLoading ? /* @__PURE__ */
|
|
14011
|
+
/* @__PURE__ */ jsx22("div", { ref: messagesTopRef }),
|
|
14012
|
+
isLoading ? /* @__PURE__ */ jsx22("div", { className: "flex justify-center py-10", children: /* @__PURE__ */ jsx22(Loader27, { className: "w-6 h-6 animate-spin text-emerald-600" }) }) : messages.map((msg, idx) => {
|
|
13775
14013
|
const isOutbound = msg.direction === "OUTBOUND";
|
|
13776
|
-
return /* @__PURE__ */
|
|
13777
|
-
/* @__PURE__ */
|
|
14014
|
+
return /* @__PURE__ */ jsx22("div", { className: `flex ${isOutbound ? "justify-start" : "justify-end"}`, children: /* @__PURE__ */ jsxs20("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: [
|
|
14015
|
+
/* @__PURE__ */ jsx22("p", { className: "text-sm whitespace-pre-wrap", children: msg.content }),
|
|
13778
14016
|
/* @__PURE__ */ jsxs20("div", { className: "text-[11px] text-slate-600 mt-1 text-left flex items-center justify-end gap-1", children: [
|
|
13779
14017
|
new Date(msg.createdAt).toLocaleString("he-IL", { day: "2-digit", month: "2-digit", year: "numeric", hour: "2-digit", minute: "2-digit" }),
|
|
13780
|
-
isOutbound && /* @__PURE__ */
|
|
14018
|
+
isOutbound && /* @__PURE__ */ jsx22("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" })
|
|
13781
14019
|
] })
|
|
13782
14020
|
] }) }, msg.id || idx);
|
|
13783
14021
|
})
|
|
13784
14022
|
] }),
|
|
13785
|
-
/* @__PURE__ */
|
|
13786
|
-
/* @__PURE__ */
|
|
14023
|
+
/* @__PURE__ */ jsx22("div", { className: "bg-slate-50 p-4 border-t border-slate-200 shrink-0", children: /* @__PURE__ */ jsxs20("form", { onSubmit: handleSend, className: "flex items-end gap-2 max-w-4xl mx-auto", children: [
|
|
14024
|
+
/* @__PURE__ */ jsx22("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__ */ jsx22(
|
|
13787
14025
|
"textarea",
|
|
13788
14026
|
{
|
|
13789
14027
|
rows: 1,
|
|
@@ -13799,13 +14037,13 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
|
|
|
13799
14037
|
className: "w-full max-h-32 min-h-[44px] p-3 text-sm bg-transparent outline-none resize-none"
|
|
13800
14038
|
}
|
|
13801
14039
|
) }),
|
|
13802
|
-
/* @__PURE__ */
|
|
14040
|
+
/* @__PURE__ */ jsx22(
|
|
13803
14041
|
"button",
|
|
13804
14042
|
{
|
|
13805
14043
|
type: "submit",
|
|
13806
14044
|
disabled: !inputText.trim() || isSending,
|
|
13807
14045
|
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"}`,
|
|
13808
|
-
children: isSending ? /* @__PURE__ */
|
|
14046
|
+
children: isSending ? /* @__PURE__ */ jsx22(Loader27, { className: "w-5 h-5 animate-spin" }) : /* @__PURE__ */ jsx22(Send2, { className: "w-5 h-5 -ml-1" })
|
|
13809
14047
|
}
|
|
13810
14048
|
)
|
|
13811
14049
|
] }) })
|
|
@@ -13813,7 +14051,7 @@ function ChatWindow({ activeConversation, messages, isLoading, isSending, onSend
|
|
|
13813
14051
|
}
|
|
13814
14052
|
|
|
13815
14053
|
// src/components/WhatsAppComponent/inbox/WhatsAppInbox.tsx
|
|
13816
|
-
import { jsx as
|
|
14054
|
+
import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
13817
14055
|
function WhatsAppInbox({
|
|
13818
14056
|
orgId,
|
|
13819
14057
|
getConversationsAction,
|
|
@@ -13835,7 +14073,7 @@ function WhatsAppInbox({
|
|
|
13835
14073
|
});
|
|
13836
14074
|
const activeConversation = conversations.find((c) => c.id === activeConversationId);
|
|
13837
14075
|
return /* @__PURE__ */ jsxs21("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: [
|
|
13838
|
-
/* @__PURE__ */
|
|
14076
|
+
/* @__PURE__ */ jsx23(
|
|
13839
14077
|
ConversationList,
|
|
13840
14078
|
{
|
|
13841
14079
|
conversations,
|
|
@@ -13843,7 +14081,7 @@ function WhatsAppInbox({
|
|
|
13843
14081
|
onSelect: handleSelectConversation
|
|
13844
14082
|
}
|
|
13845
14083
|
),
|
|
13846
|
-
/* @__PURE__ */
|
|
14084
|
+
/* @__PURE__ */ jsx23(
|
|
13847
14085
|
ChatWindow,
|
|
13848
14086
|
{
|
|
13849
14087
|
activeConversation,
|
|
@@ -13857,7 +14095,7 @@ function WhatsAppInbox({
|
|
|
13857
14095
|
}
|
|
13858
14096
|
|
|
13859
14097
|
// src/components/WhatsAppComponent/WhatsAppComponent.tsx
|
|
13860
|
-
import { Fragment as Fragment8, jsx as
|
|
14098
|
+
import { Fragment as Fragment8, jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
13861
14099
|
function WhatsAppComponent(props) {
|
|
13862
14100
|
var _a;
|
|
13863
14101
|
const { className = "", settings, orgId, componentId, executeAction } = props;
|
|
@@ -13871,7 +14109,7 @@ function WhatsAppComponent(props) {
|
|
|
13871
14109
|
dir: "rtl",
|
|
13872
14110
|
children: [
|
|
13873
14111
|
/* @__PURE__ */ jsxs22("div", { className: "flex border-b border-slate-200 bg-slate-50 px-6 pt-3 gap-4 shrink-0", children: [
|
|
13874
|
-
/* @__PURE__ */
|
|
14112
|
+
/* @__PURE__ */ jsx24(
|
|
13875
14113
|
"button",
|
|
13876
14114
|
{
|
|
13877
14115
|
type: "button",
|
|
@@ -13880,7 +14118,7 @@ function WhatsAppComponent(props) {
|
|
|
13880
14118
|
children: "\u{1F4E4} \u05E9\u05DC\u05D9\u05D7\u05EA \u05D4\u05D5\u05D3\u05E2\u05D5\u05EA \u05D5\u05EA\u05E4\u05D5\u05E6\u05D4"
|
|
13881
14119
|
}
|
|
13882
14120
|
),
|
|
13883
|
-
/* @__PURE__ */
|
|
14121
|
+
/* @__PURE__ */ jsx24(
|
|
13884
14122
|
"button",
|
|
13885
14123
|
{
|
|
13886
14124
|
type: "button",
|
|
@@ -13890,7 +14128,7 @@ function WhatsAppComponent(props) {
|
|
|
13890
14128
|
}
|
|
13891
14129
|
)
|
|
13892
14130
|
] }),
|
|
13893
|
-
activeTab === "inbox" ? /* @__PURE__ */
|
|
14131
|
+
activeTab === "inbox" ? /* @__PURE__ */ jsx24("div", { className: "p-4 flex-1", children: /* @__PURE__ */ jsx24(
|
|
13894
14132
|
WhatsAppInbox,
|
|
13895
14133
|
{
|
|
13896
14134
|
orgId: orgId || props.organizationId || "",
|
|
@@ -13936,16 +14174,16 @@ function WhatsAppComponent(props) {
|
|
|
13936
14174
|
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"}`,
|
|
13937
14175
|
children: [
|
|
13938
14176
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
|
|
13939
|
-
state.feedback.type === "success" ? /* @__PURE__ */
|
|
13940
|
-
/* @__PURE__ */
|
|
14177
|
+
state.feedback.type === "success" ? /* @__PURE__ */ jsx24(CheckCircle24, { className: "w-4 h-4 text-emerald-600 shrink-0" }) : /* @__PURE__ */ jsx24(AlertCircle5, { className: "w-4 h-4 text-rose-600 shrink-0" }),
|
|
14178
|
+
/* @__PURE__ */ jsx24("span", { children: state.feedback.message })
|
|
13941
14179
|
] }),
|
|
13942
|
-
/* @__PURE__ */
|
|
14180
|
+
/* @__PURE__ */ jsx24(
|
|
13943
14181
|
"button",
|
|
13944
14182
|
{
|
|
13945
14183
|
type: "button",
|
|
13946
14184
|
onClick: () => state.setFeedback(null),
|
|
13947
14185
|
className: "text-slate-400 hover:text-slate-700 cursor-pointer",
|
|
13948
|
-
children: /* @__PURE__ */
|
|
14186
|
+
children: /* @__PURE__ */ jsx24(X12, { className: "w-4 h-4" })
|
|
13949
14187
|
}
|
|
13950
14188
|
)
|
|
13951
14189
|
]
|
|
@@ -13953,13 +14191,13 @@ function WhatsAppComponent(props) {
|
|
|
13953
14191
|
),
|
|
13954
14192
|
state.fetchError && !state.isLoadingTemplates && /* @__PURE__ */ jsxs22("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: [
|
|
13955
14193
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", children: [
|
|
13956
|
-
/* @__PURE__ */
|
|
14194
|
+
/* @__PURE__ */ jsx24(AlertCircle5, { className: "w-4 h-4 text-amber-600 shrink-0" }),
|
|
13957
14195
|
/* @__PURE__ */ jsxs22("span", { children: [
|
|
13958
14196
|
"\u05E9\u05D2\u05D9\u05D0\u05D4 \u05D1\u05D8\u05E2\u05D9\u05E0\u05EA \u05EA\u05D1\u05E0\u05D9\u05D5\u05EA \u05DE-Meta: ",
|
|
13959
14197
|
state.fetchError
|
|
13960
14198
|
] })
|
|
13961
14199
|
] }),
|
|
13962
|
-
/* @__PURE__ */
|
|
14200
|
+
/* @__PURE__ */ jsx24(
|
|
13963
14201
|
"button",
|
|
13964
14202
|
{
|
|
13965
14203
|
type: "button",
|
|
@@ -13971,7 +14209,7 @@ function WhatsAppComponent(props) {
|
|
|
13971
14209
|
] }),
|
|
13972
14210
|
/* @__PURE__ */ jsxs22("div", { className: "p-4 flex flex-col gap-4", children: [
|
|
13973
14211
|
/* @__PURE__ */ jsxs22("div", { className: "grid grid-cols-1 lg:grid-cols-12 gap-4 shrink-0 items-stretch", children: [
|
|
13974
|
-
/* @__PURE__ */
|
|
14212
|
+
/* @__PURE__ */ jsx24(
|
|
13975
14213
|
TemplateSelectionBlock,
|
|
13976
14214
|
{
|
|
13977
14215
|
selectedTemplate: state.selectedTemplate,
|
|
@@ -13999,7 +14237,7 @@ function WhatsAppComponent(props) {
|
|
|
13999
14237
|
handleFileUpload: state.handleFileUpload
|
|
14000
14238
|
}
|
|
14001
14239
|
),
|
|
14002
|
-
/* @__PURE__ */
|
|
14240
|
+
/* @__PURE__ */ jsx24(
|
|
14003
14241
|
DynamicFiltersBlock,
|
|
14004
14242
|
{
|
|
14005
14243
|
filterableColumns: state.filterableColumns,
|
|
@@ -14016,7 +14254,7 @@ function WhatsAppComponent(props) {
|
|
|
14016
14254
|
isLoadingTableData: state.isLoadingTableData
|
|
14017
14255
|
}
|
|
14018
14256
|
),
|
|
14019
|
-
/* @__PURE__ */
|
|
14257
|
+
/* @__PURE__ */ jsx24(
|
|
14020
14258
|
SettingsAndActionsBlock,
|
|
14021
14259
|
{
|
|
14022
14260
|
isScanningPhoneColumns: state.isScanningPhoneColumns,
|
|
@@ -14062,13 +14300,13 @@ function WhatsAppComponent(props) {
|
|
|
14062
14300
|
}
|
|
14063
14301
|
)
|
|
14064
14302
|
] }),
|
|
14065
|
-
/* @__PURE__ */
|
|
14066
|
-
/* @__PURE__ */
|
|
14067
|
-
/* @__PURE__ */
|
|
14303
|
+
/* @__PURE__ */ jsx24("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__ */ jsxs22("div", { className: "flex-1 flex flex-col items-center justify-center p-12 text-center text-xs text-slate-400 gap-2", children: [
|
|
14304
|
+
/* @__PURE__ */ jsx24(Loader28, { className: "w-6 h-6 animate-spin text-emerald-600" }),
|
|
14305
|
+
/* @__PURE__ */ jsx24("span", { children: "\u05D8\u05D5\u05E2\u05DF \u05E8\u05E9\u05D5\u05DE\u05D5\u05EA \u05DE\u05D4\u05D8\u05D1\u05DC\u05D4..." })
|
|
14068
14306
|
] }) : state.tableError ? /* @__PURE__ */ jsxs22("div", { className: "flex-1 flex items-center justify-center p-6 text-center text-xs text-rose-600 bg-rose-50 gap-2", children: [
|
|
14069
|
-
/* @__PURE__ */
|
|
14070
|
-
/* @__PURE__ */
|
|
14071
|
-
] }) : !(settings == null ? void 0 : settings.tableMetaId) ? /* @__PURE__ */
|
|
14307
|
+
/* @__PURE__ */ jsx24(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
|
|
14308
|
+
/* @__PURE__ */ jsx24("span", { children: state.tableError })
|
|
14309
|
+
] }) : !(settings == null ? void 0 : settings.tableMetaId) ? /* @__PURE__ */ jsx24("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__ */ jsx24(
|
|
14072
14310
|
TableBlockClient,
|
|
14073
14311
|
{
|
|
14074
14312
|
settings: {
|
|
@@ -14090,7 +14328,7 @@ function WhatsAppComponent(props) {
|
|
|
14090
14328
|
}
|
|
14091
14329
|
) })
|
|
14092
14330
|
] }),
|
|
14093
|
-
/* @__PURE__ */
|
|
14331
|
+
/* @__PURE__ */ jsx24(
|
|
14094
14332
|
CreateTemplateModal,
|
|
14095
14333
|
{
|
|
14096
14334
|
isOpen: state.isModalOpen,
|
|
@@ -14104,7 +14342,7 @@ function WhatsAppComponent(props) {
|
|
|
14104
14342
|
orgId: state.orgId || orgId
|
|
14105
14343
|
}
|
|
14106
14344
|
),
|
|
14107
|
-
state.isTestPromptOpen && /* @__PURE__ */
|
|
14345
|
+
state.isTestPromptOpen && /* @__PURE__ */ jsx24(
|
|
14108
14346
|
"div",
|
|
14109
14347
|
{
|
|
14110
14348
|
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",
|
|
@@ -14124,13 +14362,13 @@ function WhatsAppComponent(props) {
|
|
|
14124
14362
|
children: [
|
|
14125
14363
|
/* @__PURE__ */ jsxs22("div", { className: "px-5 py-4 border-b border-slate-100 flex items-center justify-between bg-slate-50/70", children: [
|
|
14126
14364
|
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2.5", children: [
|
|
14127
|
-
/* @__PURE__ */
|
|
14365
|
+
/* @__PURE__ */ jsx24("div", { className: "w-8 h-8 rounded-lg bg-emerald-100 text-emerald-700 flex items-center justify-center shrink-0", children: /* @__PURE__ */ jsx24(Phone4, { className: "w-4 h-4" }) }),
|
|
14128
14366
|
/* @__PURE__ */ jsxs22("div", { children: [
|
|
14129
|
-
/* @__PURE__ */
|
|
14130
|
-
/* @__PURE__ */
|
|
14367
|
+
/* @__PURE__ */ jsx24("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)" }),
|
|
14368
|
+
/* @__PURE__ */ jsx24("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" })
|
|
14131
14369
|
] })
|
|
14132
14370
|
] }),
|
|
14133
|
-
/* @__PURE__ */
|
|
14371
|
+
/* @__PURE__ */ jsx24(
|
|
14134
14372
|
"button",
|
|
14135
14373
|
{
|
|
14136
14374
|
type: "button",
|
|
@@ -14142,25 +14380,25 @@ function WhatsAppComponent(props) {
|
|
|
14142
14380
|
},
|
|
14143
14381
|
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"}`,
|
|
14144
14382
|
title: "\u05E1\u05D2\u05D5\u05E8",
|
|
14145
|
-
children: /* @__PURE__ */
|
|
14383
|
+
children: /* @__PURE__ */ jsx24(X12, { className: "w-4 h-4" })
|
|
14146
14384
|
}
|
|
14147
14385
|
)
|
|
14148
14386
|
] }),
|
|
14149
14387
|
/* @__PURE__ */ jsxs22("div", { className: "p-5 space-y-4", children: [
|
|
14150
14388
|
/* @__PURE__ */ jsxs22("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
|
|
14151
|
-
/* @__PURE__ */
|
|
14152
|
-
/* @__PURE__ */
|
|
14389
|
+
/* @__PURE__ */ jsx24("span", { className: "text-slate-500 font-medium", children: "\u05EA\u05D1\u05E0\u05D9\u05EA \u05E0\u05D1\u05D7\u05E8\u05EA:" }),
|
|
14390
|
+
/* @__PURE__ */ jsx24("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" })
|
|
14153
14391
|
] }),
|
|
14154
14392
|
state.selectedPhoneOption && /* @__PURE__ */ jsxs22("div", { className: "p-2 bg-emerald-50/50 border border-emerald-200/60 rounded-xl flex items-center justify-between text-[11px]", children: [
|
|
14155
|
-
/* @__PURE__ */
|
|
14156
|
-
/* @__PURE__ */
|
|
14393
|
+
/* @__PURE__ */ jsx24("span", { className: "text-emerald-800 font-medium", children: "\u05E2\u05DE\u05D5\u05D3\u05EA \u05D9\u05E2\u05D3:" }),
|
|
14394
|
+
/* @__PURE__ */ jsx24("span", { className: "font-bold text-emerald-950 font-mono", children: state.selectedPhoneOption.label })
|
|
14157
14395
|
] }),
|
|
14158
14396
|
state.templateHeaderComp && (() => {
|
|
14159
14397
|
const headerFormat = (state.templateHeaderComp.format || "").toUpperCase();
|
|
14160
14398
|
const docFilename = resolveDocumentFilename(state.templateHeaderComp, state.headerMediaUrl);
|
|
14161
14399
|
return /* @__PURE__ */ jsxs22("div", { className: "p-2.5 bg-slate-50 border border-slate-200/80 rounded-xl flex items-center justify-between text-xs", children: [
|
|
14162
|
-
/* @__PURE__ */
|
|
14163
|
-
/* @__PURE__ */
|
|
14400
|
+
/* @__PURE__ */ jsx24("div", { className: "flex items-center gap-2 overflow-hidden", children: headerFormat === "IMAGE" ? /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
14401
|
+
/* @__PURE__ */ jsx24("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__ */ jsx24(
|
|
14164
14402
|
"img",
|
|
14165
14403
|
{
|
|
14166
14404
|
src: state.headerMediaUrl,
|
|
@@ -14170,28 +14408,28 @@ function WhatsAppComponent(props) {
|
|
|
14170
14408
|
e.currentTarget.style.display = "none";
|
|
14171
14409
|
}
|
|
14172
14410
|
}
|
|
14173
|
-
) : /* @__PURE__ */
|
|
14174
|
-
/* @__PURE__ */
|
|
14411
|
+
) : /* @__PURE__ */ jsx24(ImageIcon3, { className: "w-3.5 h-3.5 text-emerald-600" }) }),
|
|
14412
|
+
/* @__PURE__ */ jsx24("span", { className: "font-semibold text-slate-800 truncate", children: "\u05EA\u05DE\u05D5\u05E0\u05EA \u05DB\u05D5\u05EA\u05E8\u05EA" })
|
|
14175
14413
|
] }) : headerFormat === "DOCUMENT" ? /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
14176
|
-
/* @__PURE__ */
|
|
14414
|
+
/* @__PURE__ */ jsx24("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__ */ jsx24(FileText4, { className: "w-3.5 h-3.5" }) }),
|
|
14177
14415
|
/* @__PURE__ */ jsxs22("div", { className: "overflow-hidden", children: [
|
|
14178
|
-
/* @__PURE__ */
|
|
14179
|
-
/* @__PURE__ */
|
|
14416
|
+
/* @__PURE__ */ jsx24("span", { className: "font-semibold text-slate-800 block truncate", children: "\u05DE\u05E1\u05DE\u05DA \u05DB\u05D5\u05EA\u05E8\u05EA (PDF)" }),
|
|
14417
|
+
/* @__PURE__ */ jsx24("span", { className: "text-[10px] text-slate-500 font-mono block truncate", title: docFilename, children: docFilename })
|
|
14180
14418
|
] })
|
|
14181
14419
|
] }) : /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
14182
|
-
/* @__PURE__ */
|
|
14183
|
-
/* @__PURE__ */
|
|
14420
|
+
/* @__PURE__ */ jsx24("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__ */ jsx24(Video3, { className: "w-3.5 h-3.5" }) }),
|
|
14421
|
+
/* @__PURE__ */ jsx24("span", { className: "font-semibold text-slate-800 truncate", children: "\u05E1\u05E8\u05D8\u05D5\u05DF \u05DB\u05D5\u05EA\u05E8\u05EA" })
|
|
14184
14422
|
] }) }),
|
|
14185
|
-
state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */
|
|
14423
|
+
state.headerMediaUrl && state.headerMediaUrl.startsWith("http") ? /* @__PURE__ */ jsx24("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__ */ jsx24("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" })
|
|
14186
14424
|
] });
|
|
14187
14425
|
})(),
|
|
14188
14426
|
/* @__PURE__ */ jsxs22("div", { className: "space-y-1.5", children: [
|
|
14189
14427
|
/* @__PURE__ */ jsxs22("label", { className: "text-xs font-semibold text-slate-700 block", children: [
|
|
14190
14428
|
"\u05DE\u05E1\u05E4\u05E8 \u05D8\u05DC\u05E4\u05D5\u05DF \u05DC\u05D8\u05E1\u05D8 ",
|
|
14191
|
-
/* @__PURE__ */
|
|
14429
|
+
/* @__PURE__ */ jsx24("span", { className: "text-rose-500", children: "*" })
|
|
14192
14430
|
] }),
|
|
14193
14431
|
/* @__PURE__ */ jsxs22("div", { className: "relative", children: [
|
|
14194
|
-
/* @__PURE__ */
|
|
14432
|
+
/* @__PURE__ */ jsx24(
|
|
14195
14433
|
"input",
|
|
14196
14434
|
{
|
|
14197
14435
|
type: "tel",
|
|
@@ -14213,17 +14451,17 @@ function WhatsAppComponent(props) {
|
|
|
14213
14451
|
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"
|
|
14214
14452
|
}
|
|
14215
14453
|
),
|
|
14216
|
-
/* @__PURE__ */
|
|
14454
|
+
/* @__PURE__ */ jsx24(Phone4, { className: "w-4 h-4 text-slate-400 absolute left-2.5 top-1/2 -translate-y-1/2 pointer-events-none" })
|
|
14217
14455
|
] }),
|
|
14218
|
-
/* @__PURE__ */
|
|
14456
|
+
/* @__PURE__ */ jsx24("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." })
|
|
14219
14457
|
] }),
|
|
14220
14458
|
state.testFeedback && /* @__PURE__ */ jsxs22("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: [
|
|
14221
|
-
/* @__PURE__ */
|
|
14222
|
-
/* @__PURE__ */
|
|
14459
|
+
/* @__PURE__ */ jsx24(AlertCircle5, { className: "w-4 h-4 text-rose-500 shrink-0" }),
|
|
14460
|
+
/* @__PURE__ */ jsx24("span", { children: state.testFeedback })
|
|
14223
14461
|
] })
|
|
14224
14462
|
] }),
|
|
14225
14463
|
/* @__PURE__ */ jsxs22("div", { className: "px-5 py-3.5 bg-slate-50/70 border-t border-slate-100 flex items-center justify-end gap-2", children: [
|
|
14226
|
-
/* @__PURE__ */
|
|
14464
|
+
/* @__PURE__ */ jsx24(
|
|
14227
14465
|
"button",
|
|
14228
14466
|
{
|
|
14229
14467
|
type: "button",
|
|
@@ -14237,7 +14475,7 @@ function WhatsAppComponent(props) {
|
|
|
14237
14475
|
children: "\u05D1\u05D9\u05D8\u05D5\u05DC"
|
|
14238
14476
|
}
|
|
14239
14477
|
),
|
|
14240
|
-
/* @__PURE__ */
|
|
14478
|
+
/* @__PURE__ */ jsx24(
|
|
14241
14479
|
"button",
|
|
14242
14480
|
{
|
|
14243
14481
|
type: "button",
|
|
@@ -14246,11 +14484,11 @@ function WhatsAppComponent(props) {
|
|
|
14246
14484
|
title: state.testButtonTitle,
|
|
14247
14485
|
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"}`,
|
|
14248
14486
|
children: state.isSendingTest ? /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
14249
|
-
/* @__PURE__ */
|
|
14250
|
-
/* @__PURE__ */
|
|
14487
|
+
/* @__PURE__ */ jsx24(Loader28, { className: "w-3.5 h-3.5 animate-spin" }),
|
|
14488
|
+
/* @__PURE__ */ jsx24("span", { children: "\u05E9\u05D5\u05DC\u05D7..." })
|
|
14251
14489
|
] }) : /* @__PURE__ */ jsxs22(Fragment8, { children: [
|
|
14252
|
-
/* @__PURE__ */
|
|
14253
|
-
/* @__PURE__ */
|
|
14490
|
+
/* @__PURE__ */ jsx24(Send3, { className: "w-3.5 h-3.5" }),
|
|
14491
|
+
/* @__PURE__ */ jsx24("span", { children: "\u05E9\u05DC\u05D7 \u05E2\u05DB\u05E9\u05D9\u05D5" })
|
|
14254
14492
|
] })
|
|
14255
14493
|
}
|
|
14256
14494
|
)
|
|
@@ -14269,7 +14507,7 @@ function WhatsAppComponent(props) {
|
|
|
14269
14507
|
// src/components/FormBlock/FormBlock.tsx
|
|
14270
14508
|
import { useState as useState19, useEffect as useEffect17 } from "react";
|
|
14271
14509
|
import { Loader2 as Loader29, CheckCircle2 as CheckCircle25 } from "lucide-react";
|
|
14272
|
-
import { jsx as
|
|
14510
|
+
import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
14273
14511
|
function FormBlock({ settings: schema, executeAction, componentId, className = "", onSuccess }) {
|
|
14274
14512
|
const { showError, addToast } = useToast();
|
|
14275
14513
|
const [formData, setFormData] = useState19({});
|
|
@@ -14361,20 +14599,20 @@ function FormBlock({ settings: schema, executeAction, componentId, className = "
|
|
|
14361
14599
|
};
|
|
14362
14600
|
if (isLoadingSchema) {
|
|
14363
14601
|
return /* @__PURE__ */ jsxs23("div", { className: "p-8 flex items-center justify-center gap-2 text-slate-500", children: [
|
|
14364
|
-
/* @__PURE__ */
|
|
14365
|
-
/* @__PURE__ */
|
|
14602
|
+
/* @__PURE__ */ jsx25(Loader29, { className: "w-5 h-5 animate-spin text-brand" }),
|
|
14603
|
+
/* @__PURE__ */ jsx25("span", { className: "text-sm", children: "\u05D8\u05D5\u05E2\u05DF \u05E9\u05D3\u05D5\u05EA \u05D8\u05D5\u05E4\u05E1..." })
|
|
14366
14604
|
] });
|
|
14367
14605
|
}
|
|
14368
14606
|
if (!formColumns || formColumns.length === 0) {
|
|
14369
|
-
return /* @__PURE__ */
|
|
14607
|
+
return /* @__PURE__ */ jsx25("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." });
|
|
14370
14608
|
}
|
|
14371
14609
|
if (isSubmitted) {
|
|
14372
14610
|
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.";
|
|
14373
14611
|
return /* @__PURE__ */ jsxs23("div", { id: componentId, className: `bg-white p-8 rounded-xl shadow-xs border border-slate-200 text-center dir-rtl ${className}`, children: [
|
|
14374
|
-
/* @__PURE__ */
|
|
14375
|
-
/* @__PURE__ */
|
|
14376
|
-
/* @__PURE__ */
|
|
14377
|
-
/* @__PURE__ */
|
|
14612
|
+
/* @__PURE__ */ jsx25("div", { className: "w-16 h-16 bg-emerald-50 text-emerald-600 rounded-full flex items-center justify-center mx-auto mb-4 animate-in zoom-in duration-200", children: /* @__PURE__ */ jsx25(CheckCircle25, { className: "w-8 h-8" }) }),
|
|
14613
|
+
/* @__PURE__ */ jsx25("h3", { className: "text-2xl font-bold text-slate-800 mb-2", children: "\u05D4\u05D5\u05D3\u05E2\u05D4 \u05E0\u05E9\u05DC\u05D7\u05D4" }),
|
|
14614
|
+
/* @__PURE__ */ jsx25("p", { className: "text-slate-600 text-base max-w-md mx-auto whitespace-pre-wrap", children: customMessage }),
|
|
14615
|
+
/* @__PURE__ */ jsx25(
|
|
14378
14616
|
"button",
|
|
14379
14617
|
{
|
|
14380
14618
|
type: "button",
|
|
@@ -14386,7 +14624,7 @@ function FormBlock({ settings: schema, executeAction, componentId, className = "
|
|
|
14386
14624
|
] });
|
|
14387
14625
|
}
|
|
14388
14626
|
return /* @__PURE__ */ jsxs23("div", { id: componentId, className: `bg-white p-6 rounded-xl shadow-xs border border-slate-200 dir-rtl ${className}`, children: [
|
|
14389
|
-
(schema == null ? void 0 : schema.title) && /* @__PURE__ */
|
|
14627
|
+
(schema == null ? void 0 : schema.title) && /* @__PURE__ */ jsx25("h2", { className: "text-xl font-bold text-slate-800 mb-6", children: schema.title }),
|
|
14390
14628
|
/* @__PURE__ */ jsxs23("form", { onSubmit: handleSubmit, className: "space-y-4", children: [
|
|
14391
14629
|
formColumns.map((col) => {
|
|
14392
14630
|
var _a, _b;
|
|
@@ -14396,9 +14634,9 @@ function FormBlock({ settings: schema, executeAction, componentId, className = "
|
|
|
14396
14634
|
/* @__PURE__ */ jsxs23("label", { className: "text-sm font-semibold text-slate-700", children: [
|
|
14397
14635
|
col.name,
|
|
14398
14636
|
" ",
|
|
14399
|
-
col.isRequired && /* @__PURE__ */
|
|
14637
|
+
col.isRequired && /* @__PURE__ */ jsx25("span", { className: "text-rose-500", children: "*" })
|
|
14400
14638
|
] }),
|
|
14401
|
-
/* @__PURE__ */
|
|
14639
|
+
/* @__PURE__ */ jsx25("div", { className: "border border-slate-200 rounded-lg min-h-[40px] relative", children: /* @__PURE__ */ jsx25(
|
|
14402
14640
|
InputComponent,
|
|
14403
14641
|
{
|
|
14404
14642
|
column: col,
|
|
@@ -14413,15 +14651,15 @@ function FormBlock({ settings: schema, executeAction, componentId, className = "
|
|
|
14413
14651
|
) })
|
|
14414
14652
|
] }, col.name);
|
|
14415
14653
|
}),
|
|
14416
|
-
/* @__PURE__ */
|
|
14654
|
+
/* @__PURE__ */ jsx25("div", { className: "pt-4 border-t border-slate-100 flex justify-end", children: /* @__PURE__ */ jsxs23(
|
|
14417
14655
|
"button",
|
|
14418
14656
|
{
|
|
14419
14657
|
type: "submit",
|
|
14420
14658
|
disabled: isSubmitting,
|
|
14421
14659
|
className: "flex items-center gap-2 px-6 py.2.5 bg-brand hover:bg-brand-hover text-white font-bold rounded-lg shadow-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed",
|
|
14422
14660
|
children: [
|
|
14423
|
-
isSubmitting && /* @__PURE__ */
|
|
14424
|
-
/* @__PURE__ */
|
|
14661
|
+
isSubmitting && /* @__PURE__ */ jsx25(Loader29, { className: "w-4 h-4 animate-spin" }),
|
|
14662
|
+
/* @__PURE__ */ jsx25("span", { children: isSubmitting ? "\u05E9\u05D5\u05DE\u05E8..." : "\u05E9\u05DC\u05D9\u05D7\u05D4" })
|
|
14425
14663
|
]
|
|
14426
14664
|
}
|
|
14427
14665
|
) })
|
|
@@ -14446,6 +14684,8 @@ export {
|
|
|
14446
14684
|
DEFAULT_PLACEMENT_STATUS_COLORS,
|
|
14447
14685
|
DatePickerCell,
|
|
14448
14686
|
DynamicFiltersBlock,
|
|
14687
|
+
FORMULA_COLUMN_TYPE,
|
|
14688
|
+
FORMULA_SOURCE_TYPES,
|
|
14449
14689
|
LinkPickerCell,
|
|
14450
14690
|
NON_TEXT_TYPES,
|
|
14451
14691
|
PASTEL_PALETTES,
|
|
@@ -14467,13 +14707,17 @@ export {
|
|
|
14467
14707
|
TruncatedTooltip,
|
|
14468
14708
|
UNIVERSE_COMPONENTS,
|
|
14469
14709
|
WhatsAppComponent,
|
|
14710
|
+
applyFormulaColumns,
|
|
14470
14711
|
buildColumnOptions,
|
|
14471
14712
|
buildRelationRef,
|
|
14472
14713
|
calculateMinColumnWidth,
|
|
14473
14714
|
checkElementTruncation,
|
|
14474
14715
|
cn,
|
|
14475
14716
|
columnRefLabel,
|
|
14717
|
+
computeFormulaValue,
|
|
14476
14718
|
enrichRowsWithRelations,
|
|
14719
|
+
evaluateFormula,
|
|
14720
|
+
extractFormulaFields,
|
|
14477
14721
|
extractUniqueVariableIndices,
|
|
14478
14722
|
extractVariableIndices,
|
|
14479
14723
|
findVariableAtPosition,
|
|
@@ -14521,6 +14765,7 @@ export {
|
|
|
14521
14765
|
useSmartTooltip,
|
|
14522
14766
|
useToast,
|
|
14523
14767
|
useWhatsAppState,
|
|
14768
|
+
validateFormula,
|
|
14524
14769
|
validateSequentialVariables,
|
|
14525
14770
|
validateTemplateBody,
|
|
14526
14771
|
validateTemplateButtons,
|