@acmekit/dashboard 2.13.21 → 2.13.23
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/{api-key-management-list-HYZG23AG.mjs → api-key-management-list-QK4Q7Y5I.mjs} +73 -72
- package/dist/app.js +1079 -830
- package/dist/app.mjs +12 -4
- package/dist/chunk-QZOY6YYT.mjs +38 -0
- package/dist/en.json +8 -0
- package/dist/{workflow-execution-detail-LZXCRVNC.mjs → workflow-execution-detail-5O5VCXL3.mjs} +63 -12
- package/dist/workflow-execution-list-DETG4MRT.mjs +347 -0
- package/package.json +9 -9
- package/src/i18n/translations/$schema.json +32 -0
- package/src/i18n/translations/en.json +8 -0
- package/src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/workflow-execution-general-section.tsx +93 -16
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx +134 -12
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-filters.tsx +57 -0
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx +9 -2
- package/src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx +8 -0
- package/dist/chunk-WILMJYUB.mjs +0 -35
- package/dist/workflow-execution-list-HQ3V6TML.mjs +0 -175
package/dist/app.js
CHANGED
|
@@ -8485,27 +8485,75 @@ var init_utils2 = __esm({
|
|
|
8485
8485
|
}
|
|
8486
8486
|
});
|
|
8487
8487
|
|
|
8488
|
+
// src/components/data-table/components/data-table-status-cell/data-table-status-cell.tsx
|
|
8489
|
+
var import_ui64, import_jsx_runtime88, DataTableStatusCell;
|
|
8490
|
+
var init_data_table_status_cell = __esm({
|
|
8491
|
+
"src/components/data-table/components/data-table-status-cell/data-table-status-cell.tsx"() {
|
|
8492
|
+
"use strict";
|
|
8493
|
+
import_ui64 = require("@acmekit/ui");
|
|
8494
|
+
import_jsx_runtime88 = require("react/jsx-runtime");
|
|
8495
|
+
DataTableStatusCell = ({
|
|
8496
|
+
color,
|
|
8497
|
+
children
|
|
8498
|
+
}) => {
|
|
8499
|
+
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: "txt-compact-small text-ui-fg-subtle flex h-full w-full items-center gap-x-2 overflow-hidden", children: [
|
|
8500
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
8501
|
+
"div",
|
|
8502
|
+
{
|
|
8503
|
+
role: "presentation",
|
|
8504
|
+
className: "flex h-5 w-2 items-center justify-center",
|
|
8505
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(
|
|
8506
|
+
"div",
|
|
8507
|
+
{
|
|
8508
|
+
className: (0, import_ui64.clx)(
|
|
8509
|
+
"h-2 w-2 rounded-sm shadow-[0px_0px_0px_1px_rgba(0,0,0,0.12)_inset]",
|
|
8510
|
+
{
|
|
8511
|
+
"bg-ui-tag-neutral-icon": color === "grey",
|
|
8512
|
+
"bg-ui-tag-green-icon": color === "green",
|
|
8513
|
+
"bg-ui-tag-red-icon": color === "red",
|
|
8514
|
+
"bg-ui-tag-blue-icon": color === "blue",
|
|
8515
|
+
"bg-ui-tag-orange-icon": color === "orange",
|
|
8516
|
+
"bg-ui-tag-purple-icon": color === "purple"
|
|
8517
|
+
}
|
|
8518
|
+
)
|
|
8519
|
+
}
|
|
8520
|
+
)
|
|
8521
|
+
}
|
|
8522
|
+
),
|
|
8523
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: "truncate", children })
|
|
8524
|
+
] });
|
|
8525
|
+
};
|
|
8526
|
+
}
|
|
8527
|
+
});
|
|
8528
|
+
|
|
8488
8529
|
// src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx
|
|
8489
|
-
var
|
|
8530
|
+
var import_ui65, import_react_table5, import_react68, import_react_i18next47, import_jsx_runtime89, columnHelper5, useWorkflowExecutionTableColumns, ROOT_PREFIX;
|
|
8490
8531
|
var init_use_workflow_execution_table_columns = __esm({
|
|
8491
8532
|
"src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-columns.tsx"() {
|
|
8492
8533
|
"use strict";
|
|
8493
|
-
|
|
8534
|
+
import_ui65 = require("@acmekit/ui");
|
|
8494
8535
|
import_react_table5 = require("@tanstack/react-table");
|
|
8495
8536
|
import_react68 = require("react");
|
|
8496
8537
|
import_react_i18next47 = require("react-i18next");
|
|
8497
|
-
|
|
8538
|
+
init_date_cell();
|
|
8498
8539
|
init_types();
|
|
8499
8540
|
init_utils2();
|
|
8500
|
-
|
|
8541
|
+
init_data_table_status_cell();
|
|
8542
|
+
import_jsx_runtime89 = require("react/jsx-runtime");
|
|
8501
8543
|
columnHelper5 = (0, import_react_table5.createColumnHelper)();
|
|
8502
8544
|
useWorkflowExecutionTableColumns = () => {
|
|
8503
8545
|
const { t: t3 } = (0, import_react_i18next47.useTranslation)();
|
|
8504
8546
|
return (0, import_react68.useMemo)(
|
|
8505
8547
|
() => [
|
|
8506
|
-
columnHelper5.accessor("
|
|
8507
|
-
header: t3("workflowExecutions.
|
|
8508
|
-
cell: ({ getValue: getValue2 }) =>
|
|
8548
|
+
columnHelper5.accessor("workflow_id", {
|
|
8549
|
+
header: t3("workflowExecutions.workflowIdLabel"),
|
|
8550
|
+
cell: ({ getValue: getValue2 }) => {
|
|
8551
|
+
const workflowId = getValue2();
|
|
8552
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
8553
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_ui65.Badge, { size: "2xsmall", className: "truncate", children: workflowId }),
|
|
8554
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_ui65.Copy, { content: workflowId, className: "text-ui-fg-muted" })
|
|
8555
|
+
] });
|
|
8556
|
+
}
|
|
8509
8557
|
}),
|
|
8510
8558
|
columnHelper5.accessor("state", {
|
|
8511
8559
|
header: t3("fields.state"),
|
|
@@ -8513,7 +8561,7 @@ var init_use_workflow_execution_table_columns = __esm({
|
|
|
8513
8561
|
const state = getValue2();
|
|
8514
8562
|
const color = getTransactionStateColor(state);
|
|
8515
8563
|
const translatedState = getTransactionState(t3, state);
|
|
8516
|
-
return /* @__PURE__ */ (0,
|
|
8564
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DataTableStatusCell, { color, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "capitalize", children: translatedState }) });
|
|
8517
8565
|
}
|
|
8518
8566
|
}),
|
|
8519
8567
|
columnHelper5.accessor("execution", {
|
|
@@ -8521,7 +8569,10 @@ var init_use_workflow_execution_table_columns = __esm({
|
|
|
8521
8569
|
cell: ({ getValue: getValue2 }) => {
|
|
8522
8570
|
const steps = getValue2()?.steps;
|
|
8523
8571
|
if (!steps) {
|
|
8524
|
-
return
|
|
8572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-ui-fg-subtle whitespace-nowrap", children: t3("workflowExecutions.stepsCompletedLabel", {
|
|
8573
|
+
completed: 0,
|
|
8574
|
+
count: 0
|
|
8575
|
+
}) });
|
|
8525
8576
|
}
|
|
8526
8577
|
const actionableSteps = Object.values(steps).filter(
|
|
8527
8578
|
(step) => step.id !== ROOT_PREFIX
|
|
@@ -8529,10 +8580,76 @@ var init_use_workflow_execution_table_columns = __esm({
|
|
|
8529
8580
|
const completedSteps = actionableSteps.filter(
|
|
8530
8581
|
(step) => step.invoke.state === "done" /* DONE */
|
|
8531
8582
|
);
|
|
8532
|
-
return
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8583
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
8584
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: "flex items-center gap-x-[3px]", children: actionableSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(
|
|
8585
|
+
"div",
|
|
8586
|
+
{
|
|
8587
|
+
className: (0, import_ui65.clx)(
|
|
8588
|
+
"bg-ui-bg-switch-off shadow-details-switch-background h-3 w-1.5 rounded-full",
|
|
8589
|
+
{
|
|
8590
|
+
"bg-ui-fg-muted": step.invoke.state === "done" /* DONE */
|
|
8591
|
+
}
|
|
8592
|
+
),
|
|
8593
|
+
"data-completed": step.invoke.state === "done" /* DONE */
|
|
8594
|
+
},
|
|
8595
|
+
step.id
|
|
8596
|
+
)) }),
|
|
8597
|
+
/* @__PURE__ */ (0, import_jsx_runtime89.jsx)("span", { className: "text-ui-fg-subtle whitespace-nowrap", children: t3("workflowExecutions.stepsCompletedLabel", {
|
|
8598
|
+
completed: completedSteps.length,
|
|
8599
|
+
count: actionableSteps.length
|
|
8600
|
+
}) })
|
|
8601
|
+
] });
|
|
8602
|
+
}
|
|
8603
|
+
}),
|
|
8604
|
+
columnHelper5.display({
|
|
8605
|
+
id: "duration",
|
|
8606
|
+
header: t3("fields.duration"),
|
|
8607
|
+
cell: ({ row }) => {
|
|
8608
|
+
const createdAt = row.original.created_at;
|
|
8609
|
+
const updatedAt = row.original.updated_at;
|
|
8610
|
+
const state = row.original.state;
|
|
8611
|
+
if (!createdAt) {
|
|
8612
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_ui65.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: "-" });
|
|
8613
|
+
}
|
|
8614
|
+
const start = new Date(createdAt);
|
|
8615
|
+
const end = updatedAt && ["done", "failed", "reverted"].includes(state) ? new Date(updatedAt) : /* @__PURE__ */ new Date();
|
|
8616
|
+
if (isNaN(start.getTime()) || isNaN(end.getTime())) {
|
|
8617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_ui65.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: "-" });
|
|
8618
|
+
}
|
|
8619
|
+
const ms = end.getTime() - start.getTime();
|
|
8620
|
+
if (ms < 0) {
|
|
8621
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_ui65.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: "-" });
|
|
8622
|
+
}
|
|
8623
|
+
const seconds = Math.floor(ms / 1e3);
|
|
8624
|
+
const minutes = Math.floor(seconds / 60);
|
|
8625
|
+
const hours = Math.floor(minutes / 60);
|
|
8626
|
+
let label;
|
|
8627
|
+
if (hours > 0) {
|
|
8628
|
+
label = `${hours}h ${minutes % 60}m`;
|
|
8629
|
+
} else if (minutes > 0) {
|
|
8630
|
+
label = `${minutes}m ${seconds % 60}s`;
|
|
8631
|
+
} else if (seconds > 0) {
|
|
8632
|
+
label = `${seconds}s`;
|
|
8633
|
+
} else if (ms > 0) {
|
|
8634
|
+
label = "<1s";
|
|
8635
|
+
} else {
|
|
8636
|
+
label = "0s";
|
|
8637
|
+
}
|
|
8638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_ui65.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: label });
|
|
8639
|
+
}
|
|
8640
|
+
}),
|
|
8641
|
+
columnHelper5.accessor("created_at", {
|
|
8642
|
+
header: t3("fields.createdAt"),
|
|
8643
|
+
cell: ({ getValue: getValue2 }) => {
|
|
8644
|
+
const date = getValue2();
|
|
8645
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DateCell, { date });
|
|
8646
|
+
}
|
|
8647
|
+
}),
|
|
8648
|
+
columnHelper5.accessor("updated_at", {
|
|
8649
|
+
header: t3("fields.updatedAt"),
|
|
8650
|
+
cell: ({ getValue: getValue2 }) => {
|
|
8651
|
+
const date = getValue2();
|
|
8652
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(DateCell, { date });
|
|
8536
8653
|
}
|
|
8537
8654
|
})
|
|
8538
8655
|
],
|
|
@@ -8543,6 +8660,59 @@ var init_use_workflow_execution_table_columns = __esm({
|
|
|
8543
8660
|
}
|
|
8544
8661
|
});
|
|
8545
8662
|
|
|
8663
|
+
// src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-filters.tsx
|
|
8664
|
+
var import_react_i18next48, useWorkflowExecutionTableFilters;
|
|
8665
|
+
var init_use_workflow_execution_table_filters = __esm({
|
|
8666
|
+
"src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-filters.tsx"() {
|
|
8667
|
+
"use strict";
|
|
8668
|
+
import_react_i18next48 = require("react-i18next");
|
|
8669
|
+
useWorkflowExecutionTableFilters = () => {
|
|
8670
|
+
const { t: t3 } = (0, import_react_i18next48.useTranslation)();
|
|
8671
|
+
const stateFilter = {
|
|
8672
|
+
key: "state",
|
|
8673
|
+
label: t3("fields.status"),
|
|
8674
|
+
type: "select",
|
|
8675
|
+
multiple: true,
|
|
8676
|
+
options: [
|
|
8677
|
+
{
|
|
8678
|
+
label: t3("workflowExecutions.state.done"),
|
|
8679
|
+
value: "done"
|
|
8680
|
+
},
|
|
8681
|
+
{
|
|
8682
|
+
label: t3("workflowExecutions.state.failed"),
|
|
8683
|
+
value: "failed"
|
|
8684
|
+
},
|
|
8685
|
+
{
|
|
8686
|
+
label: t3("workflowExecutions.state.reverted"),
|
|
8687
|
+
value: "reverted"
|
|
8688
|
+
},
|
|
8689
|
+
{
|
|
8690
|
+
label: t3("workflowExecutions.state.invoking"),
|
|
8691
|
+
value: "invoking"
|
|
8692
|
+
},
|
|
8693
|
+
{
|
|
8694
|
+
label: t3("workflowExecutions.transaction.state.waitingToCompensate"),
|
|
8695
|
+
value: "waiting_to_compensate"
|
|
8696
|
+
},
|
|
8697
|
+
{
|
|
8698
|
+
label: t3("workflowExecutions.state.compensating"),
|
|
8699
|
+
value: "compensating"
|
|
8700
|
+
},
|
|
8701
|
+
{
|
|
8702
|
+
label: t3("workflowExecutions.state.notStarted"),
|
|
8703
|
+
value: "not_started"
|
|
8704
|
+
}
|
|
8705
|
+
]
|
|
8706
|
+
};
|
|
8707
|
+
const dateFilters = [
|
|
8708
|
+
{ key: "created_at", label: t3("fields.createdAt"), type: "date" },
|
|
8709
|
+
{ key: "updated_at", label: t3("fields.updatedAt"), type: "date" }
|
|
8710
|
+
];
|
|
8711
|
+
return [stateFilter, ...dateFilters];
|
|
8712
|
+
};
|
|
8713
|
+
}
|
|
8714
|
+
});
|
|
8715
|
+
|
|
8546
8716
|
// src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/use-workflow-execution-table-query.tsx
|
|
8547
8717
|
var useWorkflowExecutionTableQuery;
|
|
8548
8718
|
var init_use_workflow_execution_table_query = __esm({
|
|
@@ -8553,11 +8723,18 @@ var init_use_workflow_execution_table_query = __esm({
|
|
|
8553
8723
|
pageSize = 20,
|
|
8554
8724
|
prefix
|
|
8555
8725
|
}) => {
|
|
8556
|
-
const raw = useQueryParams(
|
|
8557
|
-
|
|
8726
|
+
const raw = useQueryParams(
|
|
8727
|
+
["q", "offset", "order", "state", "created_at", "updated_at"],
|
|
8728
|
+
prefix
|
|
8729
|
+
);
|
|
8730
|
+
const { offset, order, state, created_at, updated_at, ...rest } = raw;
|
|
8558
8731
|
const searchParams = {
|
|
8559
8732
|
limit: pageSize,
|
|
8560
8733
|
offset: offset ? parseInt(offset) : 0,
|
|
8734
|
+
order: order ?? "-created_at",
|
|
8735
|
+
state: state ? state.split(",") : void 0,
|
|
8736
|
+
created_at: created_at ? JSON.parse(created_at) : void 0,
|
|
8737
|
+
updated_at: updated_at ? JSON.parse(updated_at) : void 0,
|
|
8561
8738
|
...rest
|
|
8562
8739
|
};
|
|
8563
8740
|
return {
|
|
@@ -8569,22 +8746,23 @@ var init_use_workflow_execution_table_query = __esm({
|
|
|
8569
8746
|
});
|
|
8570
8747
|
|
|
8571
8748
|
// src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx
|
|
8572
|
-
var
|
|
8749
|
+
var import_ui66, import_react_query18, import_react_i18next49, import_jsx_runtime90, PAGE_SIZE4, WorkflowExecutionListTable;
|
|
8573
8750
|
var init_workflow_execution_list_table = __esm({
|
|
8574
8751
|
"src/routes/workflow-executions/workflow-execution-list/components/workflow-execution-list-table/workflow-execution-list-table.tsx"() {
|
|
8575
8752
|
"use strict";
|
|
8576
|
-
|
|
8753
|
+
import_ui66 = require("@acmekit/ui");
|
|
8577
8754
|
import_react_query18 = require("@tanstack/react-query");
|
|
8578
|
-
|
|
8755
|
+
import_react_i18next49 = require("react-i18next");
|
|
8579
8756
|
init_data_table4();
|
|
8580
8757
|
init_workflow_executions();
|
|
8581
8758
|
init_use_data_table();
|
|
8582
8759
|
init_use_workflow_execution_table_columns();
|
|
8760
|
+
init_use_workflow_execution_table_filters();
|
|
8583
8761
|
init_use_workflow_execution_table_query();
|
|
8584
|
-
|
|
8762
|
+
import_jsx_runtime90 = require("react/jsx-runtime");
|
|
8585
8763
|
PAGE_SIZE4 = 20;
|
|
8586
8764
|
WorkflowExecutionListTable = () => {
|
|
8587
|
-
const { t: t3 } = (0,
|
|
8765
|
+
const { t: t3 } = (0, import_react_i18next49.useTranslation)();
|
|
8588
8766
|
const { searchParams, raw } = useWorkflowExecutionTableQuery({
|
|
8589
8767
|
pageSize: PAGE_SIZE4
|
|
8590
8768
|
});
|
|
@@ -8597,6 +8775,7 @@ var init_workflow_execution_list_table = __esm({
|
|
|
8597
8775
|
}
|
|
8598
8776
|
);
|
|
8599
8777
|
const columns = useWorkflowExecutionTableColumns();
|
|
8778
|
+
const filters = useWorkflowExecutionTableFilters();
|
|
8600
8779
|
const { table } = useDataTable2({
|
|
8601
8780
|
data: workflow_executions || [],
|
|
8602
8781
|
columns,
|
|
@@ -8608,18 +8787,23 @@ var init_workflow_execution_list_table = __esm({
|
|
|
8608
8787
|
if (isError) {
|
|
8609
8788
|
throw error;
|
|
8610
8789
|
}
|
|
8611
|
-
return /* @__PURE__ */ (0,
|
|
8612
|
-
/* @__PURE__ */ (0,
|
|
8613
|
-
/* @__PURE__ */ (0,
|
|
8614
|
-
/* @__PURE__ */ (0,
|
|
8790
|
+
return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(import_ui66.Container, { className: "divide-y p-0", children: [
|
|
8791
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)("div", { children: [
|
|
8792
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_ui66.Heading, { children: t3("workflowExecutions.domain") }),
|
|
8793
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(import_ui66.Text, { className: "text-ui-fg-subtle", size: "small", children: t3(`workflowExecutions.subtitle`) })
|
|
8615
8794
|
] }) }),
|
|
8616
|
-
/* @__PURE__ */ (0,
|
|
8795
|
+
/* @__PURE__ */ (0, import_jsx_runtime90.jsx)(
|
|
8617
8796
|
_DataTable,
|
|
8618
8797
|
{
|
|
8619
8798
|
table,
|
|
8620
8799
|
columns,
|
|
8800
|
+
filters,
|
|
8621
8801
|
count,
|
|
8622
8802
|
isLoading,
|
|
8803
|
+
orderBy: [
|
|
8804
|
+
{ key: "created_at", label: t3("fields.createdAt") },
|
|
8805
|
+
{ key: "updated_at", label: t3("fields.updatedAt") }
|
|
8806
|
+
],
|
|
8623
8807
|
pageSize: PAGE_SIZE4,
|
|
8624
8808
|
navigateTo: (row) => `${row.id}`,
|
|
8625
8809
|
search: true,
|
|
@@ -8644,17 +8828,17 @@ var init_workflow_execution_list_table2 = __esm({
|
|
|
8644
8828
|
});
|
|
8645
8829
|
|
|
8646
8830
|
// src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx
|
|
8647
|
-
var
|
|
8831
|
+
var import_jsx_runtime91, WorkflowExcecutionList;
|
|
8648
8832
|
var init_workflow_execution_list = __esm({
|
|
8649
8833
|
"src/routes/workflow-executions/workflow-execution-list/workflow-execution-list.tsx"() {
|
|
8650
8834
|
"use strict";
|
|
8651
8835
|
init_workflow_execution_list_table2();
|
|
8652
8836
|
init_pages();
|
|
8653
8837
|
init_extension_provider2();
|
|
8654
|
-
|
|
8838
|
+
import_jsx_runtime91 = require("react/jsx-runtime");
|
|
8655
8839
|
WorkflowExcecutionList = () => {
|
|
8656
8840
|
const { getWidgets } = useExtension();
|
|
8657
|
-
return /* @__PURE__ */ (0,
|
|
8841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
8658
8842
|
SingleColumnPage,
|
|
8659
8843
|
{
|
|
8660
8844
|
widgets: {
|
|
@@ -8662,7 +8846,7 @@ var init_workflow_execution_list = __esm({
|
|
|
8662
8846
|
before: getWidgets("workflow.list.before")
|
|
8663
8847
|
},
|
|
8664
8848
|
hasOutlet: false,
|
|
8665
|
-
children: /* @__PURE__ */ (0,
|
|
8849
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(WorkflowExecutionListTable, {})
|
|
8666
8850
|
}
|
|
8667
8851
|
);
|
|
8668
8852
|
};
|
|
@@ -8682,12 +8866,12 @@ var init_workflow_execution_list2 = __esm({
|
|
|
8682
8866
|
});
|
|
8683
8867
|
|
|
8684
8868
|
// src/routes/workflow-executions/workflow-execution-detail/breadcrumb.tsx
|
|
8685
|
-
var
|
|
8869
|
+
var import_jsx_runtime92, WorkflowExecutionDetailBreadcrumb;
|
|
8686
8870
|
var init_breadcrumb3 = __esm({
|
|
8687
8871
|
"src/routes/workflow-executions/workflow-execution-detail/breadcrumb.tsx"() {
|
|
8688
8872
|
"use strict";
|
|
8689
8873
|
init_api();
|
|
8690
|
-
|
|
8874
|
+
import_jsx_runtime92 = require("react/jsx-runtime");
|
|
8691
8875
|
WorkflowExecutionDetailBreadcrumb = (props) => {
|
|
8692
8876
|
const { id: id2 } = props.params || {};
|
|
8693
8877
|
const { workflow_execution } = useWorkflowExecution(id2, {
|
|
@@ -8698,7 +8882,7 @@ var init_breadcrumb3 = __esm({
|
|
|
8698
8882
|
return null;
|
|
8699
8883
|
}
|
|
8700
8884
|
const cleanId = workflow_execution.id.replace("wf_exec_", "");
|
|
8701
|
-
return /* @__PURE__ */ (0,
|
|
8885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: cleanId });
|
|
8702
8886
|
};
|
|
8703
8887
|
}
|
|
8704
8888
|
});
|
|
@@ -8726,19 +8910,22 @@ var init_loader3 = __esm({
|
|
|
8726
8910
|
});
|
|
8727
8911
|
|
|
8728
8912
|
// src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/workflow-execution-general-section.tsx
|
|
8729
|
-
var
|
|
8913
|
+
var import_ui67, import_react_i18next50, import_jsx_runtime93, WorkflowExecutionGeneralSection, ROOT_PREFIX2, Progress;
|
|
8730
8914
|
var init_workflow_execution_general_section = __esm({
|
|
8731
8915
|
"src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-general-section/workflow-execution-general-section.tsx"() {
|
|
8732
8916
|
"use strict";
|
|
8733
|
-
|
|
8734
|
-
|
|
8917
|
+
import_ui67 = require("@acmekit/ui");
|
|
8918
|
+
import_react_i18next50 = require("react-i18next");
|
|
8735
8919
|
init_utils2();
|
|
8736
8920
|
init_types();
|
|
8737
|
-
|
|
8921
|
+
init_use_date();
|
|
8922
|
+
init_constants2();
|
|
8923
|
+
import_jsx_runtime93 = require("react/jsx-runtime");
|
|
8738
8924
|
WorkflowExecutionGeneralSection = ({
|
|
8739
8925
|
execution
|
|
8740
8926
|
}) => {
|
|
8741
|
-
const { t: t3 } = (0,
|
|
8927
|
+
const { t: t3 } = (0, import_react_i18next50.useTranslation)();
|
|
8928
|
+
const { getFullDate } = useDate();
|
|
8742
8929
|
const cleanId = execution.id.replace("wf_exec_", "");
|
|
8743
8930
|
const translatedState = getTransactionState(
|
|
8744
8931
|
t3,
|
|
@@ -8747,25 +8934,79 @@ var init_workflow_execution_general_section = __esm({
|
|
|
8747
8934
|
const stateColor = getTransactionStateColor(
|
|
8748
8935
|
execution.state
|
|
8749
8936
|
);
|
|
8750
|
-
|
|
8751
|
-
|
|
8752
|
-
|
|
8753
|
-
|
|
8754
|
-
|
|
8937
|
+
const createdAt = execution.created_at;
|
|
8938
|
+
const updatedAt = execution.updated_at;
|
|
8939
|
+
const allSteps = Object.values(execution.execution?.steps || {}).filter(
|
|
8940
|
+
(step) => step.id !== ROOT_PREFIX2
|
|
8941
|
+
);
|
|
8942
|
+
const totalSteps = allSteps.length;
|
|
8943
|
+
const completedSteps = allSteps.filter(
|
|
8944
|
+
(step) => step.invoke.state === "done" /* DONE */
|
|
8945
|
+
).length;
|
|
8946
|
+
const failedSteps = allSteps.filter(
|
|
8947
|
+
(step) => STEP_ERROR_STATES.includes(step.invoke.state)
|
|
8948
|
+
).length;
|
|
8949
|
+
const skippedSteps = allSteps.filter(
|
|
8950
|
+
(step) => STEP_SKIPPED_STATES.includes(step.invoke.state)
|
|
8951
|
+
).length;
|
|
8952
|
+
const compensatedSteps = allSteps.filter(
|
|
8953
|
+
(step) => step.compensate.state === "reverted" /* REVERTED */
|
|
8954
|
+
).length;
|
|
8955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(import_ui67.Container, { className: "divide-y p-0", children: [
|
|
8956
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
8957
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-x-0.5", children: [
|
|
8958
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Heading, { children: cleanId }),
|
|
8959
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Copy, { content: cleanId, className: "text-ui-fg-muted" })
|
|
8755
8960
|
] }),
|
|
8756
|
-
/* @__PURE__ */ (0,
|
|
8961
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.StatusBadge, { color: stateColor, children: translatedState })
|
|
8757
8962
|
] }),
|
|
8758
|
-
/* @__PURE__ */ (0,
|
|
8759
|
-
/* @__PURE__ */ (0,
|
|
8760
|
-
/* @__PURE__ */ (0,
|
|
8963
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
8964
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", weight: "plus", children: t3("workflowExecutions.workflowIdLabel") }),
|
|
8965
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
8966
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Badge, { size: "2xsmall", className: "w-fit", children: execution.workflow_id }),
|
|
8967
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Copy, { content: execution.workflow_id, className: "text-ui-fg-muted" })
|
|
8968
|
+
] })
|
|
8969
|
+
] }),
|
|
8970
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
8971
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", weight: "plus", children: t3("workflowExecutions.transactionIdLabel") }),
|
|
8972
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
8973
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Badge, { size: "2xsmall", className: "w-fit", children: execution.transaction_id }),
|
|
8974
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
8975
|
+
import_ui67.Copy,
|
|
8976
|
+
{
|
|
8977
|
+
content: execution.transaction_id,
|
|
8978
|
+
className: "text-ui-fg-muted"
|
|
8979
|
+
}
|
|
8980
|
+
)
|
|
8981
|
+
] })
|
|
8982
|
+
] }),
|
|
8983
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
8984
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", weight: "plus", children: t3("workflowExecutions.progressLabel") }),
|
|
8985
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Progress, { steps: execution.execution?.steps })
|
|
8986
|
+
] }),
|
|
8987
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
8988
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", weight: "plus", children: t3("fields.summary") }),
|
|
8989
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex flex-col gap-y-1", children: [
|
|
8990
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t3("workflowExecutions.metrics.stepsSummary", {
|
|
8991
|
+
completed: completedSteps,
|
|
8992
|
+
total: totalSteps
|
|
8993
|
+
}) }),
|
|
8994
|
+
failedSteps > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t3("workflowExecutions.metrics.failedSteps", {
|
|
8995
|
+
count: failedSteps
|
|
8996
|
+
}) }),
|
|
8997
|
+
skippedSteps > 0 && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t3("workflowExecutions.metrics.skippedSteps", {
|
|
8998
|
+
count: skippedSteps
|
|
8999
|
+
}) }),
|
|
9000
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: compensatedSteps > 0 ? t3("workflowExecutions.metrics.compensatedYes") : t3("workflowExecutions.metrics.compensatedNo") })
|
|
9001
|
+
] })
|
|
8761
9002
|
] }),
|
|
8762
|
-
/* @__PURE__ */ (0,
|
|
8763
|
-
/* @__PURE__ */ (0,
|
|
8764
|
-
/* @__PURE__ */ (0,
|
|
9003
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
9004
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", weight: "plus", children: t3("fields.createdAt") }),
|
|
9005
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", children: createdAt ? getFullDate({ date: createdAt, includeTime: true }) : "-" })
|
|
8765
9006
|
] }),
|
|
8766
|
-
/* @__PURE__ */ (0,
|
|
8767
|
-
/* @__PURE__ */ (0,
|
|
8768
|
-
/* @__PURE__ */ (0,
|
|
9007
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "text-ui-fg-subtle grid grid-cols-2 px-6 py-4", children: [
|
|
9008
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", weight: "plus", children: t3("fields.updatedAt") }),
|
|
9009
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", children: updatedAt ? getFullDate({ date: updatedAt, includeTime: true }) : "-" })
|
|
8769
9010
|
] })
|
|
8770
9011
|
] });
|
|
8771
9012
|
};
|
|
@@ -8773,11 +9014,11 @@ var init_workflow_execution_general_section = __esm({
|
|
|
8773
9014
|
Progress = ({
|
|
8774
9015
|
steps
|
|
8775
9016
|
}) => {
|
|
8776
|
-
const { t: t3 } = (0,
|
|
9017
|
+
const { t: t3 } = (0, import_react_i18next50.useTranslation)();
|
|
8777
9018
|
if (!steps) {
|
|
8778
|
-
return /* @__PURE__ */ (0,
|
|
9019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t3("workflowExecutions.stepsCompletedLabel", {
|
|
8779
9020
|
completed: 0,
|
|
8780
|
-
|
|
9021
|
+
count: 0
|
|
8781
9022
|
}) });
|
|
8782
9023
|
}
|
|
8783
9024
|
const actionableSteps = Object.values(steps).filter(
|
|
@@ -8786,11 +9027,11 @@ var init_workflow_execution_general_section = __esm({
|
|
|
8786
9027
|
const completedSteps = actionableSteps.filter(
|
|
8787
9028
|
(step) => step.invoke.state === "done" /* DONE */
|
|
8788
9029
|
);
|
|
8789
|
-
return /* @__PURE__ */ (0,
|
|
8790
|
-
/* @__PURE__ */ (0,
|
|
9030
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "flex w-fit items-center gap-x-2", children: [
|
|
9031
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "flex items-center gap-x-[3px]", children: actionableSteps.map((step) => /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
8791
9032
|
"div",
|
|
8792
9033
|
{
|
|
8793
|
-
className: (0,
|
|
9034
|
+
className: (0, import_ui67.clx)(
|
|
8794
9035
|
"bg-ui-bg-switch-off shadow-details-switch-background h-3 w-1.5 rounded-full",
|
|
8795
9036
|
{
|
|
8796
9037
|
"bg-ui-fg-muted": step.invoke.state === "done" /* DONE */
|
|
@@ -8799,7 +9040,7 @@ var init_workflow_execution_general_section = __esm({
|
|
|
8799
9040
|
},
|
|
8800
9041
|
step.id
|
|
8801
9042
|
)) }),
|
|
8802
|
-
/* @__PURE__ */ (0,
|
|
9043
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_ui67.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t3("workflowExecutions.stepsCompletedLabel", {
|
|
8803
9044
|
completed: completedSteps.length,
|
|
8804
9045
|
count: actionableSteps.length
|
|
8805
9046
|
}) })
|
|
@@ -8817,24 +9058,24 @@ var init_workflow_execution_general_section2 = __esm({
|
|
|
8817
9058
|
});
|
|
8818
9059
|
|
|
8819
9060
|
// src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/workflow-execution-history-section.tsx
|
|
8820
|
-
var import_icons32,
|
|
9061
|
+
var import_icons32, import_ui68, import_date_fns5, import_radix_ui14, import_react69, import_react_i18next51, import_react_router_dom41, import_jsx_runtime94, WorkflowExecutionHistorySection, Event2, StepState;
|
|
8821
9062
|
var init_workflow_execution_history_section = __esm({
|
|
8822
9063
|
"src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-history-section/workflow-execution-history-section.tsx"() {
|
|
8823
9064
|
"use strict";
|
|
8824
9065
|
import_icons32 = require("@acmekit/icons");
|
|
8825
|
-
|
|
9066
|
+
import_ui68 = require("@acmekit/ui");
|
|
8826
9067
|
import_date_fns5 = require("date-fns");
|
|
8827
9068
|
import_radix_ui14 = require("radix-ui");
|
|
8828
9069
|
import_react69 = require("react");
|
|
8829
|
-
|
|
9070
|
+
import_react_i18next51 = require("react-i18next");
|
|
8830
9071
|
import_react_router_dom41 = require("react-router-dom");
|
|
8831
9072
|
init_constants2();
|
|
8832
9073
|
init_types();
|
|
8833
|
-
|
|
9074
|
+
import_jsx_runtime94 = require("react/jsx-runtime");
|
|
8834
9075
|
WorkflowExecutionHistorySection = ({
|
|
8835
9076
|
execution
|
|
8836
9077
|
}) => {
|
|
8837
|
-
const { t: t3 } = (0,
|
|
9078
|
+
const { t: t3 } = (0, import_react_i18next51.useTranslation)();
|
|
8838
9079
|
const map = Object.values(execution.execution?.steps || {});
|
|
8839
9080
|
const steps = map.filter((step) => step.id !== "_root");
|
|
8840
9081
|
const unreachableStepId = steps.find(
|
|
@@ -8843,9 +9084,9 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8843
9084
|
const unreachableSteps = unreachableStepId ? steps.filter(
|
|
8844
9085
|
(step) => step.id !== unreachableStepId && step.id.includes(unreachableStepId)
|
|
8845
9086
|
).map((step) => step.id) : [];
|
|
8846
|
-
return /* @__PURE__ */ (0,
|
|
8847
|
-
/* @__PURE__ */ (0,
|
|
8848
|
-
/* @__PURE__ */ (0,
|
|
9087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_ui68.Container, { className: "divide-y p-0", children: [
|
|
9088
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Heading, { level: "h2", children: t3("workflowExecutions.history.sectionTitle") }) }),
|
|
9089
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex flex-col gap-y-0.5 px-6 py-4", children: steps.map((step, index) => {
|
|
8849
9090
|
const stepId = step.id.split(".").pop();
|
|
8850
9091
|
if (!stepId) {
|
|
8851
9092
|
return null;
|
|
@@ -8854,7 +9095,7 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8854
9095
|
const error = execution.context?.errors.find(
|
|
8855
9096
|
(e) => e.action === stepId
|
|
8856
9097
|
);
|
|
8857
|
-
return /* @__PURE__ */ (0,
|
|
9098
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
8858
9099
|
Event2,
|
|
8859
9100
|
{
|
|
8860
9101
|
step,
|
|
@@ -8878,7 +9119,7 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8878
9119
|
const [open, setOpen] = (0, import_react69.useState)(false);
|
|
8879
9120
|
const ref = (0, import_react69.useRef)(null);
|
|
8880
9121
|
const { hash } = (0, import_react_router_dom41.useLocation)();
|
|
8881
|
-
const { t: t3 } = (0,
|
|
9122
|
+
const { t: t3 } = (0, import_react_i18next51.useTranslation)();
|
|
8882
9123
|
const stepId = step.id.split(".").pop();
|
|
8883
9124
|
(0, import_react69.useEffect)(() => {
|
|
8884
9125
|
if (hash === `#${stepId}`) {
|
|
@@ -8886,17 +9127,17 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8886
9127
|
}
|
|
8887
9128
|
}, [hash, stepId]);
|
|
8888
9129
|
const identifier = step.id.split(".").pop();
|
|
8889
|
-
return /* @__PURE__ */ (0,
|
|
9130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
|
|
8890
9131
|
"div",
|
|
8891
9132
|
{
|
|
8892
9133
|
className: "grid grid-cols-[20px_1fr] items-start gap-x-2 px-2",
|
|
8893
9134
|
id: stepId,
|
|
8894
9135
|
children: [
|
|
8895
|
-
/* @__PURE__ */ (0,
|
|
8896
|
-
/* @__PURE__ */ (0,
|
|
9136
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "grid h-full grid-rows-[20px_1fr] items-center justify-center gap-y-0.5", children: [
|
|
9137
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex size-5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "bg-ui-bg-base shadow-borders-base flex size-2.5 items-center justify-center rounded-full", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
8897
9138
|
"div",
|
|
8898
9139
|
{
|
|
8899
|
-
className: (0,
|
|
9140
|
+
className: (0, import_ui68.clx)("size-1.5 rounded-full", {
|
|
8900
9141
|
"bg-ui-tag-neutral-bg": STEP_SKIPPED_STATES.includes(
|
|
8901
9142
|
step.invoke.state
|
|
8902
9143
|
),
|
|
@@ -8915,22 +9156,22 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8915
9156
|
})
|
|
8916
9157
|
}
|
|
8917
9158
|
) }) }),
|
|
8918
|
-
/* @__PURE__ */ (0,
|
|
9159
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: "flex h-full flex-col items-center", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
8919
9160
|
"div",
|
|
8920
9161
|
{
|
|
8921
9162
|
"aria-hidden": true,
|
|
8922
9163
|
role: "presentation",
|
|
8923
|
-
className: (0,
|
|
9164
|
+
className: (0, import_ui68.clx)({
|
|
8924
9165
|
"bg-ui-border-base h-full min-h-[14px] w-px": !isLast
|
|
8925
9166
|
})
|
|
8926
9167
|
}
|
|
8927
9168
|
) })
|
|
8928
9169
|
] }),
|
|
8929
|
-
/* @__PURE__ */ (0,
|
|
8930
|
-
/* @__PURE__ */ (0,
|
|
8931
|
-
/* @__PURE__ */ (0,
|
|
8932
|
-
/* @__PURE__ */ (0,
|
|
8933
|
-
/* @__PURE__ */ (0,
|
|
9170
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(import_radix_ui14.Collapsible.Root, { open, onOpenChange: setOpen, children: [
|
|
9171
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_radix_ui14.Collapsible.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "group flex cursor-pointer items-start justify-between outline-none", children: [
|
|
9172
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", weight: "plus", children: identifier }),
|
|
9173
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
9174
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
8934
9175
|
StepState,
|
|
8935
9176
|
{
|
|
8936
9177
|
state: step.invoke.state,
|
|
@@ -8938,14 +9179,14 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8938
9179
|
isUnreachable
|
|
8939
9180
|
}
|
|
8940
9181
|
),
|
|
8941
|
-
/* @__PURE__ */ (0,
|
|
9182
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.IconButton, { size: "2xsmall", variant: "transparent", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_icons32.TriangleDownMini, { className: "text-ui-fg-muted transition-transform group-data-[state=open]:rotate-180" }) })
|
|
8942
9183
|
] })
|
|
8943
9184
|
] }) }),
|
|
8944
|
-
/* @__PURE__ */ (0,
|
|
8945
|
-
/* @__PURE__ */ (0,
|
|
8946
|
-
/* @__PURE__ */ (0,
|
|
8947
|
-
/* @__PURE__ */ (0,
|
|
8948
|
-
|
|
9185
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_radix_ui14.Collapsible.Content, { ref, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex flex-col gap-y-2 pb-4 pt-2", children: [
|
|
9186
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2", children: [
|
|
9187
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", children: t3("workflowExecutions.history.definitionLabel") }),
|
|
9188
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9189
|
+
import_ui68.CodeBlock,
|
|
8949
9190
|
{
|
|
8950
9191
|
snippets: [
|
|
8951
9192
|
{
|
|
@@ -8955,14 +9196,14 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8955
9196
|
hideLineNumbers: true
|
|
8956
9197
|
}
|
|
8957
9198
|
],
|
|
8958
|
-
children: /* @__PURE__ */ (0,
|
|
9199
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.CodeBlock.Body, {})
|
|
8959
9200
|
}
|
|
8960
9201
|
)
|
|
8961
9202
|
] }),
|
|
8962
|
-
stepInvokeContext && /* @__PURE__ */ (0,
|
|
8963
|
-
/* @__PURE__ */ (0,
|
|
8964
|
-
/* @__PURE__ */ (0,
|
|
8965
|
-
|
|
9203
|
+
stepInvokeContext && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2", children: [
|
|
9204
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", children: t3("workflowExecutions.history.outputLabel") }),
|
|
9205
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9206
|
+
import_ui68.CodeBlock,
|
|
8966
9207
|
{
|
|
8967
9208
|
snippets: [
|
|
8968
9209
|
{
|
|
@@ -8977,14 +9218,14 @@ var init_workflow_execution_history_section = __esm({
|
|
|
8977
9218
|
hideLineNumbers: true
|
|
8978
9219
|
}
|
|
8979
9220
|
],
|
|
8980
|
-
children: /* @__PURE__ */ (0,
|
|
9221
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.CodeBlock.Body, {})
|
|
8981
9222
|
}
|
|
8982
9223
|
)
|
|
8983
9224
|
] }),
|
|
8984
|
-
!!stepInvokeContext?.output?.compensateInput && step.compensate.state === "reverted" /* REVERTED */ && /* @__PURE__ */ (0,
|
|
8985
|
-
/* @__PURE__ */ (0,
|
|
8986
|
-
/* @__PURE__ */ (0,
|
|
8987
|
-
|
|
9225
|
+
!!stepInvokeContext?.output?.compensateInput && step.compensate.state === "reverted" /* REVERTED */ && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2", children: [
|
|
9226
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", children: t3("workflowExecutions.history.compensateInputLabel") }),
|
|
9227
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9228
|
+
import_ui68.CodeBlock,
|
|
8988
9229
|
{
|
|
8989
9230
|
snippets: [
|
|
8990
9231
|
{
|
|
@@ -9001,14 +9242,14 @@ var init_workflow_execution_history_section = __esm({
|
|
|
9001
9242
|
hideLineNumbers: true
|
|
9002
9243
|
}
|
|
9003
9244
|
],
|
|
9004
|
-
children: /* @__PURE__ */ (0,
|
|
9245
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.CodeBlock.Body, {})
|
|
9005
9246
|
}
|
|
9006
9247
|
)
|
|
9007
9248
|
] }),
|
|
9008
|
-
stepError && /* @__PURE__ */ (0,
|
|
9009
|
-
/* @__PURE__ */ (0,
|
|
9010
|
-
/* @__PURE__ */ (0,
|
|
9011
|
-
|
|
9249
|
+
stepError && /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col gap-y-2", children: [
|
|
9250
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", children: t3("workflowExecutions.history.errorLabel") }),
|
|
9251
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
|
|
9252
|
+
import_ui68.CodeBlock,
|
|
9012
9253
|
{
|
|
9013
9254
|
snippets: [
|
|
9014
9255
|
{
|
|
@@ -9025,7 +9266,7 @@ var init_workflow_execution_history_section = __esm({
|
|
|
9025
9266
|
hideLineNumbers: true
|
|
9026
9267
|
}
|
|
9027
9268
|
],
|
|
9028
|
-
children: /* @__PURE__ */ (0,
|
|
9269
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.CodeBlock.Body, {})
|
|
9029
9270
|
}
|
|
9030
9271
|
)
|
|
9031
9272
|
] })
|
|
@@ -9040,7 +9281,7 @@ var init_workflow_execution_history_section = __esm({
|
|
|
9040
9281
|
startedAt,
|
|
9041
9282
|
isUnreachable
|
|
9042
9283
|
}) => {
|
|
9043
|
-
const { t: t3 } = (0,
|
|
9284
|
+
const { t: t3 } = (0, import_react_i18next51.useTranslation)();
|
|
9044
9285
|
const isFailed = state === "failed" /* FAILED */;
|
|
9045
9286
|
const isRunning = state === "invoking" /* INVOKING */;
|
|
9046
9287
|
const isSkipped = state === "skipped" /* SKIPPED */;
|
|
@@ -9049,9 +9290,9 @@ var init_workflow_execution_history_section = __esm({
|
|
|
9049
9290
|
return null;
|
|
9050
9291
|
}
|
|
9051
9292
|
if (isRunning) {
|
|
9052
|
-
return /* @__PURE__ */ (0,
|
|
9053
|
-
/* @__PURE__ */ (0,
|
|
9054
|
-
/* @__PURE__ */ (0,
|
|
9293
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "flex items-center gap-x-1", children: [
|
|
9294
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: t3("workflowExecutions.history.runningState") }),
|
|
9295
|
+
/* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_icons32.Spinner, { className: "text-ui-fg-interactive animate-spin" })
|
|
9055
9296
|
] });
|
|
9056
9297
|
}
|
|
9057
9298
|
let stateText;
|
|
@@ -9063,10 +9304,10 @@ var init_workflow_execution_history_section = __esm({
|
|
|
9063
9304
|
stateText = t3("workflowExecutions.history.failedState");
|
|
9064
9305
|
}
|
|
9065
9306
|
if (stateText !== null) {
|
|
9066
|
-
return /* @__PURE__ */ (0,
|
|
9307
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", className: "text-ui-fg-subtle", children: stateText });
|
|
9067
9308
|
}
|
|
9068
9309
|
if (startedAt) {
|
|
9069
|
-
return /* @__PURE__ */ (0,
|
|
9310
|
+
return /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_ui68.Text, { size: "small", leading: "compact", className: "text-ui-fg-muted", children: (0, import_date_fns5.format)(startedAt, "dd MMM yyyy HH:mm:ss") });
|
|
9070
9311
|
}
|
|
9071
9312
|
};
|
|
9072
9313
|
}
|
|
@@ -9081,12 +9322,12 @@ var init_workflow_execution_history_section2 = __esm({
|
|
|
9081
9322
|
});
|
|
9082
9323
|
|
|
9083
9324
|
// src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/workflow-execution-payload-section.tsx
|
|
9084
|
-
var
|
|
9325
|
+
var import_jsx_runtime95, WorkflowExecutionPayloadSection;
|
|
9085
9326
|
var init_workflow_execution_payload_section = __esm({
|
|
9086
9327
|
"src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-payload-section/workflow-execution-payload-section.tsx"() {
|
|
9087
9328
|
"use strict";
|
|
9088
9329
|
init_json_view_section2();
|
|
9089
|
-
|
|
9330
|
+
import_jsx_runtime95 = require("react/jsx-runtime");
|
|
9090
9331
|
WorkflowExecutionPayloadSection = ({
|
|
9091
9332
|
execution
|
|
9092
9333
|
}) => {
|
|
@@ -9097,7 +9338,7 @@ var init_workflow_execution_payload_section = __esm({
|
|
|
9097
9338
|
if (typeof payload !== "object") {
|
|
9098
9339
|
payload = { input: payload };
|
|
9099
9340
|
}
|
|
9100
|
-
return /* @__PURE__ */ (0,
|
|
9341
|
+
return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(JsonViewSection, { data: payload });
|
|
9101
9342
|
};
|
|
9102
9343
|
}
|
|
9103
9344
|
});
|
|
@@ -9111,26 +9352,26 @@ var init_workflow_execution_payload_section2 = __esm({
|
|
|
9111
9352
|
});
|
|
9112
9353
|
|
|
9113
9354
|
// src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx
|
|
9114
|
-
var import_icons33,
|
|
9355
|
+
var import_icons33, import_ui69, import_react70, import_react71, import_react_i18next52, import_react_router_dom42, import_jsx_runtime96, WorkflowExecutionTimelineSection, createNodeClusters, getNextCluster, defaultState, MAX_ZOOM, MIN_ZOOM, ZOOM_STEP, Canvas, HorizontalArrow, MiddleArrow, EndArrow, Arrow, Line, Node;
|
|
9115
9356
|
var init_workflow_execution_timeline_section = __esm({
|
|
9116
9357
|
"src/routes/workflow-executions/workflow-execution-detail/components/workflow-execution-timeline-section/workflow-execution-timeline-section.tsx"() {
|
|
9117
9358
|
"use strict";
|
|
9118
9359
|
import_icons33 = require("@acmekit/icons");
|
|
9119
|
-
|
|
9360
|
+
import_ui69 = require("@acmekit/ui");
|
|
9120
9361
|
import_react70 = require("motion/react");
|
|
9121
9362
|
import_react71 = require("react");
|
|
9122
|
-
|
|
9363
|
+
import_react_i18next52 = require("react-i18next");
|
|
9123
9364
|
import_react_router_dom42 = require("react-router-dom");
|
|
9124
9365
|
init_constants2();
|
|
9125
9366
|
init_use_document_direction();
|
|
9126
|
-
|
|
9367
|
+
import_jsx_runtime96 = require("react/jsx-runtime");
|
|
9127
9368
|
WorkflowExecutionTimelineSection = ({
|
|
9128
9369
|
execution
|
|
9129
9370
|
}) => {
|
|
9130
|
-
const { t: t3 } = (0,
|
|
9131
|
-
return /* @__PURE__ */ (0,
|
|
9132
|
-
/* @__PURE__ */ (0,
|
|
9133
|
-
/* @__PURE__ */ (0,
|
|
9371
|
+
const { t: t3 } = (0, import_react_i18next52.useTranslation)();
|
|
9372
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_ui69.Container, { className: "overflow-hidden px-0 pb-8 pt-0", children: [
|
|
9373
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex items-center justify-between px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_ui69.Heading, { level: "h2", children: t3("general.timeline") }) }),
|
|
9374
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "w-full overflow-hidden border-y", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Canvas, { execution }) })
|
|
9134
9375
|
] });
|
|
9135
9376
|
};
|
|
9136
9377
|
createNodeClusters = (steps) => {
|
|
@@ -9210,8 +9451,8 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9210
9451
|
const resetCanvas = () => {
|
|
9211
9452
|
controls.start(defaultState);
|
|
9212
9453
|
};
|
|
9213
|
-
return /* @__PURE__ */ (0,
|
|
9214
|
-
/* @__PURE__ */ (0,
|
|
9454
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "h-[400px] w-full", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { ref: dragConstraints, className: "relative size-full", children: [
|
|
9455
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "relative size-full overflow-hidden object-contain", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9215
9456
|
import_react70.motion.div,
|
|
9216
9457
|
{
|
|
9217
9458
|
onMouseDown: () => setIsDragging(true),
|
|
@@ -9229,7 +9470,7 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9229
9470
|
y,
|
|
9230
9471
|
scale
|
|
9231
9472
|
},
|
|
9232
|
-
className: (0,
|
|
9473
|
+
className: (0, import_ui69.clx)(
|
|
9233
9474
|
"bg-ui-bg-subtle relative size-[500rem] origin-top-left items-start justify-start overflow-hidden",
|
|
9234
9475
|
"bg-[radial-gradient(var(--border-base)_1.5px,transparent_0)] bg-[length:20px_20px] bg-repeat",
|
|
9235
9476
|
{
|
|
@@ -9237,18 +9478,18 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9237
9478
|
"cursor-grabbing": isDragging
|
|
9238
9479
|
}
|
|
9239
9480
|
),
|
|
9240
|
-
children: /* @__PURE__ */ (0,
|
|
9481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("main", { className: "size-full", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "absolute left-[1100px] top-[1100px] flex select-none items-start", children: Object.entries(clusters).map(([depth, cluster]) => {
|
|
9241
9482
|
const next = getNextCluster(clusters, Number(depth));
|
|
9242
|
-
return /* @__PURE__ */ (0,
|
|
9243
|
-
/* @__PURE__ */ (0,
|
|
9244
|
-
/* @__PURE__ */ (0,
|
|
9483
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-start", children: [
|
|
9484
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex flex-col justify-center gap-y-2", children: cluster.map((step) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Node, { step }, step.id)) }),
|
|
9485
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Line, { next })
|
|
9245
9486
|
] }, depth);
|
|
9246
9487
|
}) }) })
|
|
9247
9488
|
}
|
|
9248
9489
|
) }) }),
|
|
9249
|
-
/* @__PURE__ */ (0,
|
|
9250
|
-
/* @__PURE__ */ (0,
|
|
9251
|
-
/* @__PURE__ */ (0,
|
|
9490
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "bg-ui-bg-base shadow-borders-base text-ui-fg-subtle absolute bottom-4 left-6 flex h-7 items-center overflow-hidden rounded-md", children: [
|
|
9491
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex items-center", children: [
|
|
9492
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9252
9493
|
"button",
|
|
9253
9494
|
{
|
|
9254
9495
|
onClick: zoomIn,
|
|
@@ -9256,12 +9497,12 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9256
9497
|
disabled: !canZoomIn,
|
|
9257
9498
|
"aria-label": "Zoom in",
|
|
9258
9499
|
className: "disabled:text-ui-fg-disabled transition-fg hover:bg-ui-bg-base-hover active:bg-ui-bg-base-pressed focus-visible:bg-ui-bg-base-pressed border-r p-1 outline-none",
|
|
9259
|
-
children: /* @__PURE__ */ (0,
|
|
9500
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_icons33.PlusMini, {})
|
|
9260
9501
|
}
|
|
9261
9502
|
),
|
|
9262
|
-
/* @__PURE__ */ (0,
|
|
9263
|
-
/* @__PURE__ */ (0,
|
|
9264
|
-
|
|
9503
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_ui69.DropdownMenu, { dir: direction, children: [
|
|
9504
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_ui69.DropdownMenu.Trigger, { className: "disabled:text-ui-fg-disabled transition-fg hover:bg-ui-bg-base-hover active:bg-ui-bg-base-pressed focus-visible:bg-ui-bg-base-pressed flex w-[50px] items-center justify-center border-r p-1 outline-none", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
9505
|
+
import_ui69.Text,
|
|
9265
9506
|
{
|
|
9266
9507
|
as: "span",
|
|
9267
9508
|
size: "xsmall",
|
|
@@ -9273,8 +9514,8 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9273
9514
|
]
|
|
9274
9515
|
}
|
|
9275
9516
|
) }),
|
|
9276
|
-
/* @__PURE__ */ (0,
|
|
9277
|
-
|
|
9517
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_ui69.DropdownMenu.Content, { children: [50, 75, 100, 125, 150].map((value) => /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
9518
|
+
import_ui69.DropdownMenu.Item,
|
|
9278
9519
|
{
|
|
9279
9520
|
onClick: () => changeZoom(value / 100),
|
|
9280
9521
|
children: [
|
|
@@ -9285,7 +9526,7 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9285
9526
|
value
|
|
9286
9527
|
)) })
|
|
9287
9528
|
] }) }),
|
|
9288
|
-
/* @__PURE__ */ (0,
|
|
9529
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9289
9530
|
"button",
|
|
9290
9531
|
{
|
|
9291
9532
|
onClick: zoomOut,
|
|
@@ -9293,25 +9534,25 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9293
9534
|
disabled: !canZoomOut,
|
|
9294
9535
|
"aria-label": "Zoom out",
|
|
9295
9536
|
className: "disabled:text-ui-fg-disabled transition-fg hover:bg-ui-bg-base-hover active:bg-ui-bg-base-pressed focus-visible:bg-ui-bg-base-pressed border-r p-1 outline-none",
|
|
9296
|
-
children: /* @__PURE__ */ (0,
|
|
9537
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_icons33.MinusMini, {})
|
|
9297
9538
|
}
|
|
9298
9539
|
)
|
|
9299
9540
|
] }),
|
|
9300
|
-
/* @__PURE__ */ (0,
|
|
9541
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9301
9542
|
"button",
|
|
9302
9543
|
{
|
|
9303
9544
|
onClick: resetCanvas,
|
|
9304
9545
|
type: "button",
|
|
9305
9546
|
"aria-label": "Reset canvas",
|
|
9306
9547
|
className: "disabled:text-ui-fg-disabled transition-fg hover:bg-ui-bg-base-hover active:bg-ui-bg-base-pressed focus-visible:bg-ui-bg-base-pressed p-1 outline-none",
|
|
9307
|
-
children: /* @__PURE__ */ (0,
|
|
9548
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_icons33.ArrowPathMini, {})
|
|
9308
9549
|
}
|
|
9309
9550
|
)
|
|
9310
9551
|
] })
|
|
9311
9552
|
] }) });
|
|
9312
9553
|
};
|
|
9313
9554
|
HorizontalArrow = () => {
|
|
9314
|
-
return /* @__PURE__ */ (0,
|
|
9555
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9315
9556
|
"svg",
|
|
9316
9557
|
{
|
|
9317
9558
|
width: "42",
|
|
@@ -9319,7 +9560,7 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9319
9560
|
viewBox: "0 0 42 12",
|
|
9320
9561
|
fill: "none",
|
|
9321
9562
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9322
|
-
children: /* @__PURE__ */ (0,
|
|
9563
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9323
9564
|
"path",
|
|
9324
9565
|
{
|
|
9325
9566
|
d: "M41.5303 6.53033C41.8232 6.23744 41.8232 5.76256 41.5303 5.46967L36.7574 0.696699C36.4645 0.403806 35.9896 0.403806 35.6967 0.696699C35.4038 0.989593 35.4038 1.46447 35.6967 1.75736L39.9393 6L35.6967 10.2426C35.4038 10.5355 35.4038 11.0104 35.6967 11.3033C35.9896 11.5962 36.4645 11.5962 36.7574 11.3033L41.5303 6.53033ZM0.999996 5.25C0.585785 5.25 0.249996 5.58579 0.249996 6C0.249996 6.41421 0.585785 6.75 0.999996 6.75V5.25ZM41 5.25L0.999996 5.25V6.75L41 6.75V5.25Z",
|
|
@@ -9330,7 +9571,7 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9330
9571
|
);
|
|
9331
9572
|
};
|
|
9332
9573
|
MiddleArrow = () => {
|
|
9333
|
-
return /* @__PURE__ */ (0,
|
|
9574
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9334
9575
|
"svg",
|
|
9335
9576
|
{
|
|
9336
9577
|
width: "22",
|
|
@@ -9339,7 +9580,7 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9339
9580
|
fill: "none",
|
|
9340
9581
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9341
9582
|
className: "-mt-[6px]",
|
|
9342
|
-
children: /* @__PURE__ */ (0,
|
|
9583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9343
9584
|
"path",
|
|
9344
9585
|
{
|
|
9345
9586
|
d: "M0.999878 32H0.249878V32.75H0.999878V32ZM21.5284 32.5303C21.8213 32.2374 21.8213 31.7626 21.5284 31.4697L16.7554 26.6967C16.4625 26.4038 15.9876 26.4038 15.6947 26.6967C15.4019 26.9896 15.4019 27.4645 15.6947 27.7574L19.9374 32L15.6947 36.2426C15.4019 36.5355 15.4019 37.0104 15.6947 37.3033C15.9876 37.5962 16.4625 37.5962 16.7554 37.3033L21.5284 32.5303ZM0.249878 0L0.249878 32H1.74988L1.74988 0H0.249878ZM0.999878 32.75L20.998 32.75V31.25L0.999878 31.25V32.75Z",
|
|
@@ -9350,7 +9591,7 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9350
9591
|
);
|
|
9351
9592
|
};
|
|
9352
9593
|
EndArrow = () => {
|
|
9353
|
-
return /* @__PURE__ */ (0,
|
|
9594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9354
9595
|
"svg",
|
|
9355
9596
|
{
|
|
9356
9597
|
width: "22",
|
|
@@ -9359,7 +9600,7 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9359
9600
|
fill: "none",
|
|
9360
9601
|
xmlns: "http://www.w3.org/2000/svg",
|
|
9361
9602
|
className: "-mt-[6px]",
|
|
9362
|
-
children: /* @__PURE__ */ (0,
|
|
9603
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9363
9604
|
"path",
|
|
9364
9605
|
{
|
|
9365
9606
|
d: "M21.5284 32.5303C21.8213 32.2374 21.8213 31.7626 21.5284 31.4697L16.7554 26.6967C16.4625 26.4038 15.9876 26.4038 15.6947 26.6967C15.4019 26.9896 15.4019 27.4645 15.6947 27.7574L19.9374 32L15.6947 36.2426C15.4019 36.5355 15.4019 37.0104 15.6947 37.3033C15.9876 37.5962 16.4625 37.5962 16.7554 37.3033L21.5284 32.5303ZM0.249878 0L0.249878 28H1.74988L1.74988 0H0.249878ZM4.99988 32.75L20.998 32.75V31.25L4.99988 31.25V32.75ZM0.249878 28C0.249878 30.6234 2.37653 32.75 4.99988 32.75V31.25C3.20495 31.25 1.74988 29.7949 1.74988 28H0.249878Z",
|
|
@@ -9371,28 +9612,28 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9371
9612
|
};
|
|
9372
9613
|
Arrow = ({ depth }) => {
|
|
9373
9614
|
if (depth === 1) {
|
|
9374
|
-
return /* @__PURE__ */ (0,
|
|
9615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HorizontalArrow, {});
|
|
9375
9616
|
}
|
|
9376
9617
|
if (depth === 2) {
|
|
9377
|
-
return /* @__PURE__ */ (0,
|
|
9378
|
-
/* @__PURE__ */ (0,
|
|
9379
|
-
/* @__PURE__ */ (0,
|
|
9618
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col items-end", children: [
|
|
9619
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HorizontalArrow, {}),
|
|
9620
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(EndArrow, {})
|
|
9380
9621
|
] });
|
|
9381
9622
|
}
|
|
9382
|
-
const inbetween = Array.from({ length: depth - 2 }).map((_, index) => /* @__PURE__ */ (0,
|
|
9383
|
-
return /* @__PURE__ */ (0,
|
|
9384
|
-
/* @__PURE__ */ (0,
|
|
9623
|
+
const inbetween = Array.from({ length: depth - 2 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(MiddleArrow, {}, index));
|
|
9624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex flex-col items-end", children: [
|
|
9625
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(HorizontalArrow, {}),
|
|
9385
9626
|
inbetween,
|
|
9386
|
-
/* @__PURE__ */ (0,
|
|
9627
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(EndArrow, {})
|
|
9387
9628
|
] });
|
|
9388
9629
|
};
|
|
9389
9630
|
Line = ({ next }) => {
|
|
9390
9631
|
if (!next) {
|
|
9391
9632
|
return null;
|
|
9392
9633
|
}
|
|
9393
|
-
return /* @__PURE__ */ (0,
|
|
9394
|
-
/* @__PURE__ */ (0,
|
|
9395
|
-
/* @__PURE__ */ (0,
|
|
9634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "-ml-[5px] -mr-[7px] w-[60px] pr-[7px]", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "flex min-h-[24px] w-full items-start", children: [
|
|
9635
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex h-6 w-2.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "bg-ui-button-neutral shadow-borders-base size-2.5 shrink-0 rounded-full" }) }),
|
|
9636
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "pt-1.5", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Arrow, { depth: next.length }) })
|
|
9396
9637
|
] }) });
|
|
9397
9638
|
};
|
|
9398
9639
|
Node = ({ step }) => {
|
|
@@ -9415,22 +9656,22 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9415
9656
|
});
|
|
9416
9657
|
}, 100);
|
|
9417
9658
|
};
|
|
9418
|
-
return /* @__PURE__ */ (0,
|
|
9659
|
+
return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9419
9660
|
import_react_router_dom42.Link,
|
|
9420
9661
|
{
|
|
9421
9662
|
to: `#${stepId}`,
|
|
9422
9663
|
onClick: handleScrollTo,
|
|
9423
9664
|
className: "focus-visible:shadow-borders-focus transition-fg rounded-md outline-none",
|
|
9424
|
-
children: /* @__PURE__ */ (0,
|
|
9665
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(
|
|
9425
9666
|
"div",
|
|
9426
9667
|
{
|
|
9427
9668
|
className: "bg-ui-bg-base shadow-borders-base flex min-w-[120px] items-center gap-x-0.5 rounded-md p-0.5",
|
|
9428
9669
|
"data-step-id": step.id,
|
|
9429
9670
|
children: [
|
|
9430
|
-
/* @__PURE__ */ (0,
|
|
9671
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)("div", { className: "flex size-5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9431
9672
|
"div",
|
|
9432
9673
|
{
|
|
9433
|
-
className: (0,
|
|
9674
|
+
className: (0, import_ui69.clx)(
|
|
9434
9675
|
"size-2 rounded-sm shadow-[inset_0_0_0_1px_rgba(0,0,0,0.12)]",
|
|
9435
9676
|
{
|
|
9436
9677
|
"bg-ui-tag-neutral-bg": STEP_SKIPPED_STATES.includes(
|
|
@@ -9452,8 +9693,8 @@ var init_workflow_execution_timeline_section = __esm({
|
|
|
9452
9693
|
)
|
|
9453
9694
|
}
|
|
9454
9695
|
) }),
|
|
9455
|
-
/* @__PURE__ */ (0,
|
|
9456
|
-
|
|
9696
|
+
/* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
|
|
9697
|
+
import_ui69.Text,
|
|
9457
9698
|
{
|
|
9458
9699
|
size: "xsmall",
|
|
9459
9700
|
leading: "compact",
|
|
@@ -9480,7 +9721,7 @@ var init_workflow_execution_timeline_section2 = __esm({
|
|
|
9480
9721
|
});
|
|
9481
9722
|
|
|
9482
9723
|
// src/routes/workflow-executions/workflow-execution-detail/workflow-detail.tsx
|
|
9483
|
-
var import_react_router_dom43,
|
|
9724
|
+
var import_react_router_dom43, import_jsx_runtime97, ExecutionDetail;
|
|
9484
9725
|
var init_workflow_detail = __esm({
|
|
9485
9726
|
"src/routes/workflow-executions/workflow-execution-detail/workflow-detail.tsx"() {
|
|
9486
9727
|
"use strict";
|
|
@@ -9493,18 +9734,18 @@ var init_workflow_detail = __esm({
|
|
|
9493
9734
|
init_workflow_execution_history_section2();
|
|
9494
9735
|
init_workflow_execution_payload_section2();
|
|
9495
9736
|
init_workflow_execution_timeline_section2();
|
|
9496
|
-
|
|
9737
|
+
import_jsx_runtime97 = require("react/jsx-runtime");
|
|
9497
9738
|
ExecutionDetail = () => {
|
|
9498
9739
|
const { id: id2 } = (0, import_react_router_dom43.useParams)();
|
|
9499
9740
|
const { workflow_execution, isLoading, isError, error } = useWorkflowExecution(id2);
|
|
9500
9741
|
const { getWidgets } = useExtension();
|
|
9501
9742
|
if (isLoading || !workflow_execution) {
|
|
9502
|
-
return /* @__PURE__ */ (0,
|
|
9743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(SingleColumnPageSkeleton, { sections: 4, showJSON: true });
|
|
9503
9744
|
}
|
|
9504
9745
|
if (isError) {
|
|
9505
9746
|
throw error;
|
|
9506
9747
|
}
|
|
9507
|
-
return /* @__PURE__ */ (0,
|
|
9748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(
|
|
9508
9749
|
SingleColumnPage,
|
|
9509
9750
|
{
|
|
9510
9751
|
widgets: {
|
|
@@ -9514,10 +9755,10 @@ var init_workflow_detail = __esm({
|
|
|
9514
9755
|
data: workflow_execution,
|
|
9515
9756
|
showJSON: true,
|
|
9516
9757
|
children: [
|
|
9517
|
-
/* @__PURE__ */ (0,
|
|
9518
|
-
/* @__PURE__ */ (0,
|
|
9519
|
-
/* @__PURE__ */ (0,
|
|
9520
|
-
/* @__PURE__ */ (0,
|
|
9758
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(WorkflowExecutionGeneralSection, { execution: workflow_execution }),
|
|
9759
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(WorkflowExecutionTimelineSection, { execution: workflow_execution }),
|
|
9760
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(WorkflowExecutionPayloadSection, { execution: workflow_execution }),
|
|
9761
|
+
/* @__PURE__ */ (0, import_jsx_runtime97.jsx)(WorkflowExecutionHistorySection, { execution: workflow_execution })
|
|
9521
9762
|
]
|
|
9522
9763
|
}
|
|
9523
9764
|
);
|
|
@@ -9542,22 +9783,22 @@ var init_workflow_execution_detail = __esm({
|
|
|
9542
9783
|
});
|
|
9543
9784
|
|
|
9544
9785
|
// src/components/common/icon-avatar/icon-avatar.tsx
|
|
9545
|
-
var
|
|
9786
|
+
var import_ui70, import_jsx_runtime98, IconAvatar;
|
|
9546
9787
|
var init_icon_avatar = __esm({
|
|
9547
9788
|
"src/components/common/icon-avatar/icon-avatar.tsx"() {
|
|
9548
9789
|
"use strict";
|
|
9549
|
-
|
|
9550
|
-
|
|
9790
|
+
import_ui70 = require("@acmekit/ui");
|
|
9791
|
+
import_jsx_runtime98 = require("react/jsx-runtime");
|
|
9551
9792
|
IconAvatar = ({
|
|
9552
9793
|
size = "small",
|
|
9553
9794
|
variant = "rounded",
|
|
9554
9795
|
children,
|
|
9555
9796
|
className
|
|
9556
9797
|
}) => {
|
|
9557
|
-
return /* @__PURE__ */ (0,
|
|
9798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
|
|
9558
9799
|
"div",
|
|
9559
9800
|
{
|
|
9560
|
-
className: (0,
|
|
9801
|
+
className: (0, import_ui70.clx)(
|
|
9561
9802
|
"shadow-borders-base flex size-7 items-center justify-center",
|
|
9562
9803
|
variant === "squared" && "rounded-md",
|
|
9563
9804
|
variant === "rounded" && "rounded-full",
|
|
@@ -9569,7 +9810,7 @@ var init_icon_avatar = __esm({
|
|
|
9569
9810
|
},
|
|
9570
9811
|
className
|
|
9571
9812
|
),
|
|
9572
|
-
children: /* @__PURE__ */ (0,
|
|
9813
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)("div", { children })
|
|
9573
9814
|
}
|
|
9574
9815
|
);
|
|
9575
9816
|
};
|
|
@@ -9585,22 +9826,22 @@ var init_icon_avatar2 = __esm({
|
|
|
9585
9826
|
});
|
|
9586
9827
|
|
|
9587
9828
|
// src/components/common/link-button/link-button.tsx
|
|
9588
|
-
var
|
|
9829
|
+
var import_ui71, import_react_router_dom44, import_jsx_runtime99, LinkButton;
|
|
9589
9830
|
var init_link_button = __esm({
|
|
9590
9831
|
"src/components/common/link-button/link-button.tsx"() {
|
|
9591
9832
|
"use strict";
|
|
9592
|
-
|
|
9833
|
+
import_ui71 = require("@acmekit/ui");
|
|
9593
9834
|
import_react_router_dom44 = require("react-router-dom");
|
|
9594
|
-
|
|
9835
|
+
import_jsx_runtime99 = require("react/jsx-runtime");
|
|
9595
9836
|
LinkButton = ({
|
|
9596
9837
|
className,
|
|
9597
9838
|
variant = "interactive",
|
|
9598
9839
|
...props
|
|
9599
9840
|
}) => {
|
|
9600
|
-
return /* @__PURE__ */ (0,
|
|
9841
|
+
return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
|
|
9601
9842
|
import_react_router_dom44.Link,
|
|
9602
9843
|
{
|
|
9603
|
-
className: (0,
|
|
9844
|
+
className: (0, import_ui71.clx)(
|
|
9604
9845
|
"transition-fg txt-compact-small-plus rounded-[4px] outline-none",
|
|
9605
9846
|
"focus-visible:shadow-borders-focus",
|
|
9606
9847
|
{
|
|
@@ -9625,21 +9866,21 @@ var init_link_button2 = __esm({
|
|
|
9625
9866
|
});
|
|
9626
9867
|
|
|
9627
9868
|
// src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx
|
|
9628
|
-
var import_icons34,
|
|
9869
|
+
var import_icons34, import_ui72, import_react72, import_react_i18next53, import_jsx_runtime100, ActiveLocalesSection;
|
|
9629
9870
|
var init_active_locales_section = __esm({
|
|
9630
9871
|
"src/routes/translations/translation-list/components/active-locales-section/active-locales-section.tsx"() {
|
|
9631
9872
|
"use strict";
|
|
9632
9873
|
import_icons34 = require("@acmekit/icons");
|
|
9633
|
-
|
|
9874
|
+
import_ui72 = require("@acmekit/ui");
|
|
9634
9875
|
import_react72 = require("react");
|
|
9635
|
-
|
|
9876
|
+
import_react_i18next53 = require("react-i18next");
|
|
9636
9877
|
init_icon_avatar2();
|
|
9637
9878
|
init_link_button2();
|
|
9638
|
-
|
|
9879
|
+
import_jsx_runtime100 = require("react/jsx-runtime");
|
|
9639
9880
|
ActiveLocalesSection = ({
|
|
9640
9881
|
locales
|
|
9641
9882
|
}) => {
|
|
9642
|
-
const { t: t3 } = (0,
|
|
9883
|
+
const { t: t3 } = (0, import_react_i18next53.useTranslation)();
|
|
9643
9884
|
const [isHovered, setIsHovered] = (0, import_react72.useState)(false);
|
|
9644
9885
|
const renderLocales = (0, import_react72.useCallback)(() => {
|
|
9645
9886
|
const maxLocalesToDetail = 2;
|
|
@@ -9649,10 +9890,10 @@ var init_active_locales_section = __esm({
|
|
|
9649
9890
|
return `${locales.slice(0, maxLocalesToDetail).map((locale) => locale.name).join(", ")} + ${locales.length - maxLocalesToDetail}`;
|
|
9650
9891
|
}, [locales]);
|
|
9651
9892
|
const hasLocales = locales.length > 0;
|
|
9652
|
-
return /* @__PURE__ */ (0,
|
|
9653
|
-
/* @__PURE__ */ (0,
|
|
9654
|
-
/* @__PURE__ */ (0,
|
|
9655
|
-
/* @__PURE__ */ (0,
|
|
9893
|
+
return /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(import_ui72.Container, { className: "flex flex-col p-0", children: [
|
|
9894
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
9895
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_ui72.Heading, { level: "h2", children: t3("translations.activeLocales.heading") }),
|
|
9896
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
9656
9897
|
LinkButton,
|
|
9657
9898
|
{
|
|
9658
9899
|
variant: "interactive",
|
|
@@ -9662,12 +9903,12 @@ var init_active_locales_section = __esm({
|
|
|
9662
9903
|
}
|
|
9663
9904
|
)
|
|
9664
9905
|
] }),
|
|
9665
|
-
hasLocales && /* @__PURE__ */ (0,
|
|
9666
|
-
|
|
9906
|
+
hasLocales && /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "px-1 pb-1", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
9907
|
+
import_ui72.Tooltip,
|
|
9667
9908
|
{
|
|
9668
9909
|
open: isHovered,
|
|
9669
|
-
content: /* @__PURE__ */ (0,
|
|
9670
|
-
|
|
9910
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("div", { className: "flex flex-col gap-y-1 p-1", children: locales.map((locale) => /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(
|
|
9911
|
+
import_ui72.Text,
|
|
9671
9912
|
{
|
|
9672
9913
|
size: "base",
|
|
9673
9914
|
className: "text-ui-fg-subtle",
|
|
@@ -9675,17 +9916,17 @@ var init_active_locales_section = __esm({
|
|
|
9675
9916
|
},
|
|
9676
9917
|
locale.code
|
|
9677
9918
|
)) }),
|
|
9678
|
-
children: /* @__PURE__ */ (0,
|
|
9679
|
-
|
|
9919
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsxs)(
|
|
9920
|
+
import_ui72.Container,
|
|
9680
9921
|
{
|
|
9681
9922
|
className: "bg-ui-bg-component border-r-1 flex items-center gap-x-4 px-[19px] py-2",
|
|
9682
9923
|
onMouseEnter: () => setIsHovered(true),
|
|
9683
9924
|
onMouseLeave: () => setIsHovered(false),
|
|
9684
9925
|
children: [
|
|
9685
|
-
/* @__PURE__ */ (0,
|
|
9686
|
-
/* @__PURE__ */ (0,
|
|
9687
|
-
/* @__PURE__ */ (0,
|
|
9688
|
-
/* @__PURE__ */ (0,
|
|
9926
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(IconAvatar, { className: "border-ui-border-base border", children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_icons34.Language, {}) }),
|
|
9927
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsxs)("div", { className: "flex flex-col", children: [
|
|
9928
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_ui72.Text, { size: "small", weight: "plus", children: t3("translations.activeLocales.subtitle") }),
|
|
9929
|
+
/* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_ui72.Text, { className: "text-ui-fg-subtle", size: "small", children: renderLocales() })
|
|
9689
9930
|
] })
|
|
9690
9931
|
]
|
|
9691
9932
|
}
|
|
@@ -9698,35 +9939,35 @@ var init_active_locales_section = __esm({
|
|
|
9698
9939
|
});
|
|
9699
9940
|
|
|
9700
9941
|
// src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx
|
|
9701
|
-
var
|
|
9942
|
+
var import_ui73, import_react_router_dom45, import_react_i18next54, import_jsx_runtime101, TranslationListSection;
|
|
9702
9943
|
var init_translation_list_section = __esm({
|
|
9703
9944
|
"src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx"() {
|
|
9704
9945
|
"use strict";
|
|
9705
|
-
|
|
9946
|
+
import_ui73 = require("@acmekit/ui");
|
|
9706
9947
|
import_react_router_dom45 = require("react-router-dom");
|
|
9707
|
-
|
|
9708
|
-
|
|
9948
|
+
import_react_i18next54 = require("react-i18next");
|
|
9949
|
+
import_jsx_runtime101 = require("react/jsx-runtime");
|
|
9709
9950
|
TranslationListSection = ({
|
|
9710
9951
|
entities,
|
|
9711
9952
|
hasLocales = false
|
|
9712
9953
|
}) => {
|
|
9713
|
-
const { t: t3 } = (0,
|
|
9714
|
-
return /* @__PURE__ */ (0,
|
|
9954
|
+
const { t: t3 } = (0, import_react_i18next54.useTranslation)();
|
|
9955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_ui73.Container, { className: "divide-y p-0", children: entities.map((entity) => /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(
|
|
9715
9956
|
"div",
|
|
9716
9957
|
{
|
|
9717
9958
|
className: "grid grid-cols-[250px_1fr_auto] items-center gap-x-4 px-6 py-4",
|
|
9718
9959
|
children: [
|
|
9719
|
-
/* @__PURE__ */ (0,
|
|
9720
|
-
/* @__PURE__ */ (0,
|
|
9960
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_ui73.Text, { size: "small", weight: "plus", children: entity.label }),
|
|
9961
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_ui73.Text, { size: "small", className: "text-ui-fg-subtle", children: t3("translations.list.metrics", {
|
|
9721
9962
|
translated: (entity.translatedCount ?? 0).toLocaleString(),
|
|
9722
9963
|
total: (entity.totalCount ?? 0).toLocaleString()
|
|
9723
9964
|
}) }),
|
|
9724
|
-
/* @__PURE__ */ (0,
|
|
9965
|
+
/* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
9725
9966
|
import_react_router_dom45.Link,
|
|
9726
9967
|
{
|
|
9727
9968
|
to: `/settings/translations/edit?reference=${entity.reference}`,
|
|
9728
|
-
children: /* @__PURE__ */ (0,
|
|
9729
|
-
|
|
9969
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(
|
|
9970
|
+
import_ui73.Button,
|
|
9730
9971
|
{
|
|
9731
9972
|
variant: "secondary",
|
|
9732
9973
|
size: "small",
|
|
@@ -9745,19 +9986,19 @@ var init_translation_list_section = __esm({
|
|
|
9745
9986
|
});
|
|
9746
9987
|
|
|
9747
9988
|
// src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx
|
|
9748
|
-
var
|
|
9989
|
+
var import_ui74, import_react73, import_react_i18next55, import_jsx_runtime102, TranslationsCompletionSection;
|
|
9749
9990
|
var init_translations_completion_section = __esm({
|
|
9750
9991
|
"src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx"() {
|
|
9751
9992
|
"use strict";
|
|
9752
|
-
|
|
9993
|
+
import_ui74 = require("@acmekit/ui");
|
|
9753
9994
|
import_react73 = require("react");
|
|
9754
|
-
|
|
9755
|
-
|
|
9995
|
+
import_react_i18next55 = require("react-i18next");
|
|
9996
|
+
import_jsx_runtime102 = require("react/jsx-runtime");
|
|
9756
9997
|
TranslationsCompletionSection = ({
|
|
9757
9998
|
statistics,
|
|
9758
9999
|
locales
|
|
9759
10000
|
}) => {
|
|
9760
|
-
const { t: t3 } = (0,
|
|
10001
|
+
const { t: t3 } = (0, import_react_i18next55.useTranslation)();
|
|
9761
10002
|
const [hoveredLocale, setHoveredLocale] = (0, import_react73.useState)(null);
|
|
9762
10003
|
const { translatedCount, totalCount } = Object.values(statistics).reduce(
|
|
9763
10004
|
(acc, curr) => ({
|
|
@@ -9802,11 +10043,11 @@ var init_translations_completion_section = __esm({
|
|
|
9802
10043
|
[localeStats]
|
|
9803
10044
|
);
|
|
9804
10045
|
const localeStatsCount = (0, import_react73.useMemo)(() => localeStats.length, [localeStats]);
|
|
9805
|
-
return /* @__PURE__ */ (0,
|
|
9806
|
-
/* @__PURE__ */ (0,
|
|
9807
|
-
/* @__PURE__ */ (0,
|
|
9808
|
-
/* @__PURE__ */ (0,
|
|
9809
|
-
/* @__PURE__ */ (0,
|
|
10046
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_ui74.Container, { className: "p-0", children: [
|
|
10047
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex flex-col gap-y-4 px-6 py-4", children: [
|
|
10048
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
10049
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_ui74.Heading, { level: "h2", children: t3("translations.completion.heading") }),
|
|
10050
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_ui74.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
9810
10051
|
translatedCount.toLocaleString(),
|
|
9811
10052
|
" ",
|
|
9812
10053
|
t3("general.of"),
|
|
@@ -9814,8 +10055,8 @@ var init_translations_completion_section = __esm({
|
|
|
9814
10055
|
totalCount.toLocaleString()
|
|
9815
10056
|
] })
|
|
9816
10057
|
] }),
|
|
9817
|
-
/* @__PURE__ */ (0,
|
|
9818
|
-
/* @__PURE__ */ (0,
|
|
10058
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex h-3 w-full overflow-hidden", children: percentage > 0 ? /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
10059
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9819
10060
|
"div",
|
|
9820
10061
|
{
|
|
9821
10062
|
className: "mr-0.5 h-full rounded-sm transition-all",
|
|
@@ -9826,7 +10067,7 @@ var init_translations_completion_section = __esm({
|
|
|
9826
10067
|
}
|
|
9827
10068
|
}
|
|
9828
10069
|
),
|
|
9829
|
-
/* @__PURE__ */ (0,
|
|
10070
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9830
10071
|
"div",
|
|
9831
10072
|
{
|
|
9832
10073
|
className: "h-full flex-1 rounded-sm",
|
|
@@ -9836,7 +10077,7 @@ var init_translations_completion_section = __esm({
|
|
|
9836
10077
|
}
|
|
9837
10078
|
}
|
|
9838
10079
|
)
|
|
9839
|
-
] }) : /* @__PURE__ */ (0,
|
|
10080
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9840
10081
|
"div",
|
|
9841
10082
|
{
|
|
9842
10083
|
className: "h-full w-full rounded-sm",
|
|
@@ -9846,33 +10087,33 @@ var init_translations_completion_section = __esm({
|
|
|
9846
10087
|
}
|
|
9847
10088
|
}
|
|
9848
10089
|
) }),
|
|
9849
|
-
/* @__PURE__ */ (0,
|
|
9850
|
-
/* @__PURE__ */ (0,
|
|
10090
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
10091
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_ui74.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
9851
10092
|
percentage.toFixed(1),
|
|
9852
10093
|
"%"
|
|
9853
10094
|
] }),
|
|
9854
|
-
/* @__PURE__ */ (0,
|
|
10095
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_ui74.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
9855
10096
|
remaining.toLocaleString(),
|
|
9856
10097
|
" ",
|
|
9857
10098
|
t3("general.remaining").toLowerCase()
|
|
9858
10099
|
] })
|
|
9859
10100
|
] })
|
|
9860
10101
|
] }),
|
|
9861
|
-
localeStats.length > 0 && /* @__PURE__ */ (0,
|
|
9862
|
-
/* @__PURE__ */ (0,
|
|
9863
|
-
/* @__PURE__ */ (0,
|
|
9864
|
-
/* @__PURE__ */ (0,
|
|
10102
|
+
localeStats.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
10103
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_ui74.Divider, { variant: "dashed" }),
|
|
10104
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex flex-col gap-y-3 px-6 pb-6 pt-4", children: [
|
|
10105
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex h-32 w-full items-end gap-1", children: localeStats.map((locale) => {
|
|
9865
10106
|
const heightPercent = locale.total / maxTotal * 100;
|
|
9866
10107
|
const translatedPercent = locale.total > 0 ? locale.translated / locale.total * 100 : 0;
|
|
9867
|
-
return /* @__PURE__ */ (0,
|
|
9868
|
-
|
|
10108
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10109
|
+
import_ui74.Tooltip,
|
|
9869
10110
|
{
|
|
9870
10111
|
open: hoveredLocale === locale.code,
|
|
9871
|
-
content: /* @__PURE__ */ (0,
|
|
9872
|
-
/* @__PURE__ */ (0,
|
|
9873
|
-
/* @__PURE__ */ (0,
|
|
9874
|
-
/* @__PURE__ */ (0,
|
|
9875
|
-
/* @__PURE__ */ (0,
|
|
10112
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex min-w-[150px] flex-col gap-y-1 p-1", children: [
|
|
10113
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(import_ui74.Text, { size: "small", weight: "plus", children: locale.name }),
|
|
10114
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
10115
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
10116
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9876
10117
|
"div",
|
|
9877
10118
|
{
|
|
9878
10119
|
className: "h-2 w-2 rounded-full",
|
|
@@ -9882,8 +10123,8 @@ var init_translations_completion_section = __esm({
|
|
|
9882
10123
|
}
|
|
9883
10124
|
}
|
|
9884
10125
|
),
|
|
9885
|
-
/* @__PURE__ */ (0,
|
|
9886
|
-
|
|
10126
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10127
|
+
import_ui74.Text,
|
|
9887
10128
|
{
|
|
9888
10129
|
size: "small",
|
|
9889
10130
|
weight: "plus",
|
|
@@ -9892,8 +10133,8 @@ var init_translations_completion_section = __esm({
|
|
|
9892
10133
|
}
|
|
9893
10134
|
)
|
|
9894
10135
|
] }),
|
|
9895
|
-
/* @__PURE__ */ (0,
|
|
9896
|
-
|
|
10136
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10137
|
+
import_ui74.Text,
|
|
9897
10138
|
{
|
|
9898
10139
|
size: "small",
|
|
9899
10140
|
weight: "plus",
|
|
@@ -9902,9 +10143,9 @@ var init_translations_completion_section = __esm({
|
|
|
9902
10143
|
}
|
|
9903
10144
|
)
|
|
9904
10145
|
] }),
|
|
9905
|
-
/* @__PURE__ */ (0,
|
|
9906
|
-
/* @__PURE__ */ (0,
|
|
9907
|
-
/* @__PURE__ */ (0,
|
|
10146
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
10147
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
10148
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9908
10149
|
"div",
|
|
9909
10150
|
{
|
|
9910
10151
|
className: "h-2 w-2 rounded-full",
|
|
@@ -9914,8 +10155,8 @@ var init_translations_completion_section = __esm({
|
|
|
9914
10155
|
}
|
|
9915
10156
|
}
|
|
9916
10157
|
),
|
|
9917
|
-
/* @__PURE__ */ (0,
|
|
9918
|
-
|
|
10158
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10159
|
+
import_ui74.Text,
|
|
9919
10160
|
{
|
|
9920
10161
|
size: "small",
|
|
9921
10162
|
weight: "plus",
|
|
@@ -9924,8 +10165,8 @@ var init_translations_completion_section = __esm({
|
|
|
9924
10165
|
}
|
|
9925
10166
|
)
|
|
9926
10167
|
] }),
|
|
9927
|
-
/* @__PURE__ */ (0,
|
|
9928
|
-
|
|
10168
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10169
|
+
import_ui74.Text,
|
|
9929
10170
|
{
|
|
9930
10171
|
size: "small",
|
|
9931
10172
|
weight: "plus",
|
|
@@ -9935,14 +10176,14 @@ var init_translations_completion_section = __esm({
|
|
|
9935
10176
|
)
|
|
9936
10177
|
] })
|
|
9937
10178
|
] }),
|
|
9938
|
-
children: /* @__PURE__ */ (0,
|
|
10179
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex h-full flex-1 items-end justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9939
10180
|
"div",
|
|
9940
10181
|
{
|
|
9941
10182
|
className: "flex w-full min-w-2 max-w-[96px] flex-col justify-end overflow-hidden rounded-t-sm transition-opacity",
|
|
9942
10183
|
style: { height: `${heightPercent}%` },
|
|
9943
10184
|
onMouseEnter: () => setHoveredLocale(locale.code),
|
|
9944
10185
|
onMouseLeave: () => setHoveredLocale(null),
|
|
9945
|
-
children: translatedPercent === 0 ? /* @__PURE__ */ (0,
|
|
10186
|
+
children: translatedPercent === 0 ? /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9946
10187
|
"div",
|
|
9947
10188
|
{
|
|
9948
10189
|
className: "w-full rounded-sm",
|
|
@@ -9952,8 +10193,8 @@ var init_translations_completion_section = __esm({
|
|
|
9952
10193
|
boxShadow: "inset 0 0 0 0.5px var(--alpha-250)"
|
|
9953
10194
|
}
|
|
9954
10195
|
}
|
|
9955
|
-
) : /* @__PURE__ */ (0,
|
|
9956
|
-
/* @__PURE__ */ (0,
|
|
10196
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime102.jsxs)(import_jsx_runtime102.Fragment, { children: [
|
|
10197
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9957
10198
|
"div",
|
|
9958
10199
|
{
|
|
9959
10200
|
className: "w-full rounded-sm",
|
|
@@ -9965,7 +10206,7 @@ var init_translations_completion_section = __esm({
|
|
|
9965
10206
|
}
|
|
9966
10207
|
}
|
|
9967
10208
|
),
|
|
9968
|
-
translatedPercent > 0 && /* @__PURE__ */ (0,
|
|
10209
|
+
translatedPercent > 0 && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9969
10210
|
"div",
|
|
9970
10211
|
{
|
|
9971
10212
|
className: "mt-0.5 w-full rounded-sm",
|
|
@@ -9984,12 +10225,12 @@ var init_translations_completion_section = __esm({
|
|
|
9984
10225
|
locale.code
|
|
9985
10226
|
);
|
|
9986
10227
|
}) }),
|
|
9987
|
-
localeStatsCount < 9 && /* @__PURE__ */ (0,
|
|
10228
|
+
localeStatsCount < 9 && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)("div", { className: "flex w-full gap-1", children: localeStats.map((locale) => /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
9988
10229
|
"div",
|
|
9989
10230
|
{
|
|
9990
10231
|
className: "flex flex-1 items-center justify-center",
|
|
9991
|
-
children: /* @__PURE__ */ (0,
|
|
9992
|
-
|
|
10232
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10233
|
+
import_ui74.Text,
|
|
9993
10234
|
{
|
|
9994
10235
|
size: "xsmall",
|
|
9995
10236
|
weight: "plus",
|
|
@@ -10000,8 +10241,8 @@ var init_translations_completion_section = __esm({
|
|
|
10000
10241
|
},
|
|
10001
10242
|
locale.code
|
|
10002
10243
|
)) }),
|
|
10003
|
-
localeStatsCount > 9 && /* @__PURE__ */ (0,
|
|
10004
|
-
|
|
10244
|
+
localeStatsCount > 9 && /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
10245
|
+
import_ui74.Text,
|
|
10005
10246
|
{
|
|
10006
10247
|
weight: "plus",
|
|
10007
10248
|
size: "xsmall",
|
|
@@ -10017,13 +10258,13 @@ var init_translations_completion_section = __esm({
|
|
|
10017
10258
|
});
|
|
10018
10259
|
|
|
10019
10260
|
// src/routes/translations/translation-list/translation-list.tsx
|
|
10020
|
-
var
|
|
10261
|
+
var import_ui75, import_react74, import_react_i18next56, import_react_router_dom46, import_icons35, import_jsx_runtime103, TranslationList;
|
|
10021
10262
|
var init_translation_list = __esm({
|
|
10022
10263
|
"src/routes/translations/translation-list/translation-list.tsx"() {
|
|
10023
10264
|
"use strict";
|
|
10024
|
-
|
|
10265
|
+
import_ui75 = require("@acmekit/ui");
|
|
10025
10266
|
import_react74 = require("react");
|
|
10026
|
-
|
|
10267
|
+
import_react_i18next56 = require("react-i18next");
|
|
10027
10268
|
import_react_router_dom46 = require("react-router-dom");
|
|
10028
10269
|
init_skeleton2();
|
|
10029
10270
|
init_pages();
|
|
@@ -10032,9 +10273,9 @@ var init_translation_list = __esm({
|
|
|
10032
10273
|
init_translation_list_section();
|
|
10033
10274
|
init_translations_completion_section();
|
|
10034
10275
|
import_icons35 = require("@acmekit/icons");
|
|
10035
|
-
|
|
10276
|
+
import_jsx_runtime103 = require("react/jsx-runtime");
|
|
10036
10277
|
TranslationList = () => {
|
|
10037
|
-
const { t: t3 } = (0,
|
|
10278
|
+
const { t: t3 } = (0, import_react_i18next56.useTranslation)();
|
|
10038
10279
|
const navigate = (0, import_react_router_dom46.useNavigate)();
|
|
10039
10280
|
const { locales: localesList, isPending, isError, error } = useLocales();
|
|
10040
10281
|
const supportedLocales = localesList?.map((l) => ({ locale_code: l.code, locale: l.code })) ?? [];
|
|
@@ -10092,9 +10333,9 @@ var init_translation_list = __esm({
|
|
|
10092
10333
|
}, [navigate]);
|
|
10093
10334
|
const isReady = !!localesList && !isPending && !isTranslationSettingsPending && !!translation_settings && (!!statistics && !isTranslationStatisticsPending || !hasLocales);
|
|
10094
10335
|
if (!isReady) {
|
|
10095
|
-
return /* @__PURE__ */ (0,
|
|
10336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(TwoColumnPageSkeleton, { sidebarSections: 2 });
|
|
10096
10337
|
}
|
|
10097
|
-
return /* @__PURE__ */ (0,
|
|
10338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
10098
10339
|
TwoColumnPage,
|
|
10099
10340
|
{
|
|
10100
10341
|
widgets: {
|
|
@@ -10104,40 +10345,40 @@ var init_translation_list = __esm({
|
|
|
10104
10345
|
sideAfter: []
|
|
10105
10346
|
},
|
|
10106
10347
|
children: [
|
|
10107
|
-
/* @__PURE__ */ (0,
|
|
10108
|
-
/* @__PURE__ */ (0,
|
|
10109
|
-
/* @__PURE__ */ (0,
|
|
10110
|
-
/* @__PURE__ */ (0,
|
|
10348
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(TwoColumnPage.Main, { children: [
|
|
10349
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_ui75.Container, { className: "flex items-center justify-between px-6 py-4", children: [
|
|
10350
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex flex-col", children: [
|
|
10351
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(import_ui75.Heading, { children: [
|
|
10111
10352
|
"Manage ",
|
|
10112
10353
|
t3("translations.domain")
|
|
10113
10354
|
] }),
|
|
10114
|
-
/* @__PURE__ */ (0,
|
|
10355
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_ui75.Text, { className: "text-ui-fg-subtle", size: "small", children: t3("translations.subtitle") })
|
|
10115
10356
|
] }),
|
|
10116
|
-
/* @__PURE__ */ (0,
|
|
10117
|
-
|
|
10357
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
10358
|
+
import_ui75.Button,
|
|
10118
10359
|
{
|
|
10119
10360
|
size: "small",
|
|
10120
10361
|
variant: "secondary",
|
|
10121
10362
|
onClick: handleManageEntities,
|
|
10122
10363
|
children: [
|
|
10123
|
-
/* @__PURE__ */ (0,
|
|
10124
|
-
/* @__PURE__ */ (0,
|
|
10364
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_icons35.ListCheckbox, { className: "text-ui-fg-subtle" }),
|
|
10365
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_ui75.Text, { className: "txt-compact-small-plus text-ui-fg-base", children: t3("translations.actions.manageEntities") })
|
|
10125
10366
|
]
|
|
10126
10367
|
}
|
|
10127
10368
|
)
|
|
10128
10369
|
] }),
|
|
10129
|
-
!hasLocales && /* @__PURE__ */ (0,
|
|
10130
|
-
|
|
10370
|
+
!hasLocales && /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10371
|
+
import_ui75.Alert,
|
|
10131
10372
|
{
|
|
10132
10373
|
variant: "info",
|
|
10133
10374
|
className: "bg-ui-bg-base flex items-center px-6 py-4",
|
|
10134
|
-
children: /* @__PURE__ */ (0,
|
|
10135
|
-
/* @__PURE__ */ (0,
|
|
10375
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: "flex items-center justify-between gap-x-2", children: [
|
|
10376
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("p", { children: [
|
|
10136
10377
|
t3("translations.activeLocales.noLocalesTip"),
|
|
10137
10378
|
"."
|
|
10138
10379
|
] }),
|
|
10139
|
-
/* @__PURE__ */ (0,
|
|
10140
|
-
|
|
10380
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10381
|
+
import_ui75.Button,
|
|
10141
10382
|
{
|
|
10142
10383
|
onClick: handleManageLocales,
|
|
10143
10384
|
size: "small",
|
|
@@ -10148,7 +10389,7 @@ var init_translation_list = __esm({
|
|
|
10148
10389
|
] })
|
|
10149
10390
|
}
|
|
10150
10391
|
),
|
|
10151
|
-
/* @__PURE__ */ (0,
|
|
10392
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10152
10393
|
TranslationListSection,
|
|
10153
10394
|
{
|
|
10154
10395
|
entities: translatableEntities,
|
|
@@ -10156,14 +10397,14 @@ var init_translation_list = __esm({
|
|
|
10156
10397
|
}
|
|
10157
10398
|
)
|
|
10158
10399
|
] }),
|
|
10159
|
-
/* @__PURE__ */ (0,
|
|
10160
|
-
/* @__PURE__ */ (0,
|
|
10400
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(TwoColumnPage.Sidebar, { children: [
|
|
10401
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10161
10402
|
ActiveLocalesSection,
|
|
10162
10403
|
{
|
|
10163
10404
|
locales: supportedLocales.map((l) => l.locale)
|
|
10164
10405
|
}
|
|
10165
10406
|
),
|
|
10166
|
-
/* @__PURE__ */ (0,
|
|
10407
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(
|
|
10167
10408
|
TranslationsCompletionSection,
|
|
10168
10409
|
{
|
|
10169
10410
|
statistics: statistics ?? {},
|
|
@@ -10191,14 +10432,14 @@ var init_translation_list2 = __esm({
|
|
|
10191
10432
|
});
|
|
10192
10433
|
|
|
10193
10434
|
// src/routes/translations/settings/components/entity-selector-tree/entity-selector-tree.tsx
|
|
10194
|
-
var import_icons36,
|
|
10435
|
+
var import_icons36, import_ui76, import_react75, import_jsx_runtime104, SelectorRow, EntitySelectorTree;
|
|
10195
10436
|
var init_entity_selector_tree = __esm({
|
|
10196
10437
|
"src/routes/translations/settings/components/entity-selector-tree/entity-selector-tree.tsx"() {
|
|
10197
10438
|
"use strict";
|
|
10198
10439
|
import_icons36 = require("@acmekit/icons");
|
|
10199
|
-
|
|
10440
|
+
import_ui76 = require("@acmekit/ui");
|
|
10200
10441
|
import_react75 = __toESM(require("react"));
|
|
10201
|
-
|
|
10442
|
+
import_jsx_runtime104 = require("react/jsx-runtime");
|
|
10202
10443
|
SelectorRow = ({
|
|
10203
10444
|
leftElement,
|
|
10204
10445
|
expandButton,
|
|
@@ -10208,12 +10449,12 @@ var init_entity_selector_tree = __esm({
|
|
|
10208
10449
|
className
|
|
10209
10450
|
}) => {
|
|
10210
10451
|
const isSelected = checked !== false;
|
|
10211
|
-
return /* @__PURE__ */ (0,
|
|
10452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: (0, import_ui76.clx)("flex items-center gap-x-2 px-2 py-1.5", className), children: [
|
|
10212
10453
|
leftElement,
|
|
10213
|
-
/* @__PURE__ */ (0,
|
|
10454
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_ui76.Checkbox, { checked, onCheckedChange }),
|
|
10214
10455
|
expandButton,
|
|
10215
|
-
/* @__PURE__ */ (0,
|
|
10216
|
-
|
|
10456
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10457
|
+
import_ui76.Text,
|
|
10217
10458
|
{
|
|
10218
10459
|
size: "small",
|
|
10219
10460
|
weight: isSelected ? "plus" : "regular",
|
|
@@ -10342,28 +10583,28 @@ var init_entity_selector_tree = __esm({
|
|
|
10342
10583
|
});
|
|
10343
10584
|
return sorted;
|
|
10344
10585
|
}, [entities, searchQuery, viewMode, sortOrder, selectedIds]);
|
|
10345
|
-
return /* @__PURE__ */ (0,
|
|
10586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "flex h-full flex-col", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "flex-1 overflow-y-auto", children: filteredAndSortedEntities.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "text-ui-fg-subtle flex items-center justify-center py-12 text-sm", children: "No entities matching filters" }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { children: filteredAndSortedEntities.map((entity) => {
|
|
10346
10587
|
const isExpanded = expandedEntities.has(entity.id);
|
|
10347
10588
|
const hasFields = entity.fields && entity.fields.length > 0;
|
|
10348
10589
|
const selectionState = getEntitySelectionState(entity);
|
|
10349
|
-
return /* @__PURE__ */ (0,
|
|
10350
|
-
/* @__PURE__ */ (0,
|
|
10590
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { children: [
|
|
10591
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10351
10592
|
SelectorRow,
|
|
10352
10593
|
{
|
|
10353
10594
|
checked: selectionState,
|
|
10354
10595
|
onCheckedChange: () => toggleEntitySelection(entity),
|
|
10355
10596
|
label: entity.name,
|
|
10356
10597
|
className: "hover:bg-ui-bg-component-hover",
|
|
10357
|
-
expandButton: hasFields ? /* @__PURE__ */ (0,
|
|
10598
|
+
expandButton: hasFields ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10358
10599
|
"button",
|
|
10359
10600
|
{
|
|
10360
10601
|
type: "button",
|
|
10361
10602
|
onClick: () => toggleExpand(entity.id),
|
|
10362
10603
|
className: "flex h-5 w-5 items-center justify-center",
|
|
10363
|
-
children: /* @__PURE__ */ (0,
|
|
10604
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10364
10605
|
import_icons36.TriangleRightMini,
|
|
10365
10606
|
{
|
|
10366
|
-
className: (0,
|
|
10607
|
+
className: (0, import_ui76.clx)(
|
|
10367
10608
|
"text-ui-fg-muted transition-transform",
|
|
10368
10609
|
isExpanded && "rotate-90"
|
|
10369
10610
|
)
|
|
@@ -10373,9 +10614,9 @@ var init_entity_selector_tree = __esm({
|
|
|
10373
10614
|
) : null
|
|
10374
10615
|
}
|
|
10375
10616
|
),
|
|
10376
|
-
hasFields && isExpanded && /* @__PURE__ */ (0,
|
|
10377
|
-
/* @__PURE__ */ (0,
|
|
10378
|
-
|
|
10617
|
+
hasFields && isExpanded && /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "relative", children: [
|
|
10618
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10619
|
+
import_ui76.Divider,
|
|
10379
10620
|
{
|
|
10380
10621
|
orientation: "vertical",
|
|
10381
10622
|
className: "absolute bottom-0 left-[2.87rem] top-0 z-10"
|
|
@@ -10384,11 +10625,11 @@ var init_entity_selector_tree = __esm({
|
|
|
10384
10625
|
entity.fields.map((field) => {
|
|
10385
10626
|
const fieldKey = `${entity.id}.${field.id}`;
|
|
10386
10627
|
const isFieldSelected = selectedIds.has(fieldKey);
|
|
10387
|
-
return /* @__PURE__ */ (0,
|
|
10628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
10388
10629
|
SelectorRow,
|
|
10389
10630
|
{
|
|
10390
10631
|
className: "pl-3",
|
|
10391
|
-
leftElement: /* @__PURE__ */ (0,
|
|
10632
|
+
leftElement: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: "w-11" }),
|
|
10392
10633
|
checked: isFieldSelected,
|
|
10393
10634
|
onCheckedChange: () => {
|
|
10394
10635
|
toggleFieldSelection(entity.id, field.id);
|
|
@@ -10407,22 +10648,22 @@ var init_entity_selector_tree = __esm({
|
|
|
10407
10648
|
});
|
|
10408
10649
|
|
|
10409
10650
|
// src/components/common/segmented-control/segmented-control.tsx
|
|
10410
|
-
var
|
|
10651
|
+
var import_ui77, import_jsx_runtime105, SegmentedControl;
|
|
10411
10652
|
var init_segmented_control = __esm({
|
|
10412
10653
|
"src/components/common/segmented-control/segmented-control.tsx"() {
|
|
10413
10654
|
"use strict";
|
|
10414
|
-
|
|
10415
|
-
|
|
10655
|
+
import_ui77 = require("@acmekit/ui");
|
|
10656
|
+
import_jsx_runtime105 = require("react/jsx-runtime");
|
|
10416
10657
|
SegmentedControl = ({
|
|
10417
10658
|
value,
|
|
10418
10659
|
onValueChange,
|
|
10419
10660
|
options,
|
|
10420
10661
|
className
|
|
10421
10662
|
}) => {
|
|
10422
|
-
return /* @__PURE__ */ (0,
|
|
10663
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
10423
10664
|
"div",
|
|
10424
10665
|
{
|
|
10425
|
-
className: (0,
|
|
10666
|
+
className: (0, import_ui77.clx)(
|
|
10426
10667
|
"bg-ui-bg-disabled grid items-center gap-x-[1px] rounded-md p-[1px]",
|
|
10427
10668
|
className
|
|
10428
10669
|
),
|
|
@@ -10431,14 +10672,14 @@ var init_segmented_control = __esm({
|
|
|
10431
10672
|
},
|
|
10432
10673
|
children: options.map((option) => {
|
|
10433
10674
|
const isSelected = value === option.value;
|
|
10434
|
-
return /* @__PURE__ */ (0,
|
|
10435
|
-
|
|
10675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
10676
|
+
import_ui77.Button,
|
|
10436
10677
|
{
|
|
10437
10678
|
size: "small",
|
|
10438
10679
|
onClick: () => onValueChange(option.value),
|
|
10439
10680
|
variant: isSelected ? "secondary" : "transparent",
|
|
10440
10681
|
type: "button",
|
|
10441
|
-
className: (0,
|
|
10682
|
+
className: (0, import_ui77.clx)(
|
|
10442
10683
|
"w-auto",
|
|
10443
10684
|
!isSelected && "hover:text-ui-fg-base text-ui-fg-muted"
|
|
10444
10685
|
),
|
|
@@ -10462,16 +10703,16 @@ var init_segmented_control2 = __esm({
|
|
|
10462
10703
|
});
|
|
10463
10704
|
|
|
10464
10705
|
// src/routes/translations/settings/components/selector-tree-filter/selector-tree-filter.tsx
|
|
10465
|
-
var import_icons37,
|
|
10706
|
+
var import_icons37, import_ui78, import_react_i18next57, import_react76, import_jsx_runtime106, SelectorTreeFilter;
|
|
10466
10707
|
var init_selector_tree_filter = __esm({
|
|
10467
10708
|
"src/routes/translations/settings/components/selector-tree-filter/selector-tree-filter.tsx"() {
|
|
10468
10709
|
"use strict";
|
|
10469
10710
|
import_icons37 = require("@acmekit/icons");
|
|
10470
|
-
|
|
10711
|
+
import_ui78 = require("@acmekit/ui");
|
|
10471
10712
|
init_segmented_control2();
|
|
10472
|
-
|
|
10713
|
+
import_react_i18next57 = require("react-i18next");
|
|
10473
10714
|
import_react76 = require("react");
|
|
10474
|
-
|
|
10715
|
+
import_jsx_runtime106 = require("react/jsx-runtime");
|
|
10475
10716
|
SelectorTreeFilter = ({
|
|
10476
10717
|
searchQuery,
|
|
10477
10718
|
onSearchChange,
|
|
@@ -10484,15 +10725,15 @@ var init_selector_tree_filter = __esm({
|
|
|
10484
10725
|
onCollapseAll,
|
|
10485
10726
|
className
|
|
10486
10727
|
}) => {
|
|
10487
|
-
const { t: t3 } = (0,
|
|
10728
|
+
const { t: t3 } = (0, import_react_i18next57.useTranslation)();
|
|
10488
10729
|
const [allSelected, setAllSelected] = (0, import_react76.useState)(initialAllSelected);
|
|
10489
10730
|
const handleSelectAllToggle = () => {
|
|
10490
10731
|
setAllSelected((prev) => !prev);
|
|
10491
10732
|
onSelectAllToggle(!allSelected);
|
|
10492
10733
|
};
|
|
10493
|
-
return /* @__PURE__ */ (0,
|
|
10494
|
-
/* @__PURE__ */ (0,
|
|
10495
|
-
|
|
10734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)("div", { className: (0, import_ui78.clx)("flex items-center gap-x-2", className), children: [
|
|
10735
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)("div", { className: "flex-1", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10736
|
+
import_ui78.Input,
|
|
10496
10737
|
{
|
|
10497
10738
|
size: "small",
|
|
10498
10739
|
type: "search",
|
|
@@ -10502,7 +10743,7 @@ var init_selector_tree_filter = __esm({
|
|
|
10502
10743
|
className: "w-full"
|
|
10503
10744
|
}
|
|
10504
10745
|
) }),
|
|
10505
|
-
/* @__PURE__ */ (0,
|
|
10746
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10506
10747
|
SegmentedControl,
|
|
10507
10748
|
{
|
|
10508
10749
|
value: viewMode,
|
|
@@ -10513,8 +10754,8 @@ var init_selector_tree_filter = __esm({
|
|
|
10513
10754
|
]
|
|
10514
10755
|
}
|
|
10515
10756
|
),
|
|
10516
|
-
/* @__PURE__ */ (0,
|
|
10517
|
-
|
|
10757
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10758
|
+
import_ui78.Button,
|
|
10518
10759
|
{
|
|
10519
10760
|
onClick: handleSelectAllToggle,
|
|
10520
10761
|
size: "small",
|
|
@@ -10524,36 +10765,36 @@ var init_selector_tree_filter = __esm({
|
|
|
10524
10765
|
children: allSelected ? t3("general.unselectAll") : t3("general.selectAll")
|
|
10525
10766
|
}
|
|
10526
10767
|
),
|
|
10527
|
-
/* @__PURE__ */ (0,
|
|
10528
|
-
|
|
10768
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
|
|
10769
|
+
import_ui78.Tooltip,
|
|
10529
10770
|
{
|
|
10530
10771
|
content: sortOrder === "desc" ? t3("filters.sorting.alphabeticallyAsc") : t3("filters.sorting.alphabeticallyDesc"),
|
|
10531
|
-
children: /* @__PURE__ */ (0,
|
|
10772
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_ui78.IconButton, { size: "small", onClick: onSortToggle, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_icons37.DescendingSorting, {}) })
|
|
10532
10773
|
}
|
|
10533
10774
|
),
|
|
10534
|
-
/* @__PURE__ */ (0,
|
|
10775
|
+
/* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_ui78.Tooltip, { content: t3("filters.collapse.all"), children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_ui78.IconButton, { size: "small", onClick: onCollapseAll, type: "button", children: /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(import_icons37.Collapse, {}) }) })
|
|
10535
10776
|
] });
|
|
10536
10777
|
};
|
|
10537
10778
|
}
|
|
10538
10779
|
});
|
|
10539
10780
|
|
|
10540
10781
|
// src/routes/translations/settings/components/batch-translation-settings-form/batch-translation-settings-form.tsx
|
|
10541
|
-
var import_zod8,
|
|
10782
|
+
var import_zod8, import_ui79, import_react77, import_react_hook_form9, import_react_i18next58, zod6, import_jsx_runtime107, BatchTranslationSettingsSchema, format4, transformSettingsToEntities, transformSelectedFieldsToBatchRequest, BatchTranslationSettingsForm;
|
|
10542
10783
|
var init_batch_translation_settings_form = __esm({
|
|
10543
10784
|
"src/routes/translations/settings/components/batch-translation-settings-form/batch-translation-settings-form.tsx"() {
|
|
10544
10785
|
"use strict";
|
|
10545
10786
|
import_zod8 = require("@hookform/resolvers/zod");
|
|
10546
|
-
|
|
10787
|
+
import_ui79 = require("@acmekit/ui");
|
|
10547
10788
|
import_react77 = require("react");
|
|
10548
10789
|
import_react_hook_form9 = require("react-hook-form");
|
|
10549
|
-
|
|
10790
|
+
import_react_i18next58 = require("react-i18next");
|
|
10550
10791
|
zod6 = __toESM(require("zod"));
|
|
10551
10792
|
init_modals();
|
|
10552
10793
|
init_keybound_form2();
|
|
10553
10794
|
init_translations();
|
|
10554
10795
|
init_entity_selector_tree();
|
|
10555
10796
|
init_selector_tree_filter();
|
|
10556
|
-
|
|
10797
|
+
import_jsx_runtime107 = require("react/jsx-runtime");
|
|
10557
10798
|
BatchTranslationSettingsSchema = zod6.object({
|
|
10558
10799
|
selectedFields: zod6.array(zod6.string())
|
|
10559
10800
|
});
|
|
@@ -10617,7 +10858,7 @@ var init_batch_translation_settings_form = __esm({
|
|
|
10617
10858
|
BatchTranslationSettingsForm = ({
|
|
10618
10859
|
translation_settings
|
|
10619
10860
|
}) => {
|
|
10620
|
-
const { t: t3 } = (0,
|
|
10861
|
+
const { t: t3 } = (0, import_react_i18next58.useTranslation)();
|
|
10621
10862
|
const { handleSuccess } = useRouteModal();
|
|
10622
10863
|
const [searchQuery, setSearchQuery] = (0, import_react77.useState)("");
|
|
10623
10864
|
const [viewMode, setViewMode] = (0, import_react77.useState)("full");
|
|
@@ -10673,25 +10914,25 @@ var init_batch_translation_settings_form = __esm({
|
|
|
10673
10914
|
if (batchRequest.create || batchRequest.update) {
|
|
10674
10915
|
await mutateAsync(batchRequest, {
|
|
10675
10916
|
onSuccess: () => {
|
|
10676
|
-
|
|
10917
|
+
import_ui79.toast.success(t3("translations.settings.successToast"));
|
|
10677
10918
|
handleSuccess();
|
|
10678
10919
|
},
|
|
10679
10920
|
onError: (error) => {
|
|
10680
|
-
|
|
10921
|
+
import_ui79.toast.error(error.message);
|
|
10681
10922
|
}
|
|
10682
10923
|
});
|
|
10683
10924
|
} else {
|
|
10684
10925
|
handleSuccess();
|
|
10685
10926
|
}
|
|
10686
10927
|
});
|
|
10687
|
-
return /* @__PURE__ */ (0,
|
|
10928
|
+
return /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RouteDrawer.Form, { form, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(
|
|
10688
10929
|
KeyboundForm,
|
|
10689
10930
|
{
|
|
10690
10931
|
onSubmit: handleSubmit,
|
|
10691
10932
|
className: "flex flex-1 flex-col overflow-hidden",
|
|
10692
10933
|
children: [
|
|
10693
|
-
/* @__PURE__ */ (0,
|
|
10694
|
-
/* @__PURE__ */ (0,
|
|
10934
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsxs)(RouteDrawer.Body, { className: "p-0", children: [
|
|
10935
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "px-6 py-4", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10695
10936
|
SelectorTreeFilter,
|
|
10696
10937
|
{
|
|
10697
10938
|
sortOrder,
|
|
@@ -10705,8 +10946,8 @@ var init_batch_translation_settings_form = __esm({
|
|
|
10705
10946
|
onCollapseAll: handleCollapseAll
|
|
10706
10947
|
}
|
|
10707
10948
|
) }),
|
|
10708
|
-
/* @__PURE__ */ (0,
|
|
10709
|
-
/* @__PURE__ */ (0,
|
|
10949
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_ui79.Divider, {}),
|
|
10950
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)("div", { className: "bg-ui-bg-component h-full px-6 pb-6 pt-4", children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(
|
|
10710
10951
|
EntitySelectorTree,
|
|
10711
10952
|
{
|
|
10712
10953
|
ref: treeRef,
|
|
@@ -10718,9 +10959,9 @@ var init_batch_translation_settings_form = __esm({
|
|
|
10718
10959
|
}
|
|
10719
10960
|
) })
|
|
10720
10961
|
] }),
|
|
10721
|
-
/* @__PURE__ */ (0,
|
|
10722
|
-
/* @__PURE__ */ (0,
|
|
10723
|
-
/* @__PURE__ */ (0,
|
|
10962
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RouteDrawer.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime107.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
10963
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(RouteDrawer.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_ui79.Button, { variant: "secondary", size: "small", children: t3("actions.cancel") }) }),
|
|
10964
|
+
/* @__PURE__ */ (0, import_jsx_runtime107.jsx)(import_ui79.Button, { size: "small", type: "submit", isLoading: isMutating, children: t3("actions.save") })
|
|
10724
10965
|
] }) })
|
|
10725
10966
|
]
|
|
10726
10967
|
}
|
|
@@ -10730,24 +10971,24 @@ var init_batch_translation_settings_form = __esm({
|
|
|
10730
10971
|
});
|
|
10731
10972
|
|
|
10732
10973
|
// src/routes/translations/settings/settings.tsx
|
|
10733
|
-
var
|
|
10974
|
+
var import_ui80, import_icons38, import_jsx_runtime108, Settings;
|
|
10734
10975
|
var init_settings = __esm({
|
|
10735
10976
|
"src/routes/translations/settings/settings.tsx"() {
|
|
10736
10977
|
"use strict";
|
|
10737
|
-
|
|
10978
|
+
import_ui80 = require("@acmekit/ui");
|
|
10738
10979
|
import_icons38 = require("@acmekit/icons");
|
|
10739
10980
|
init_modals();
|
|
10740
10981
|
init_translations();
|
|
10741
10982
|
init_batch_translation_settings_form();
|
|
10742
|
-
|
|
10983
|
+
import_jsx_runtime108 = require("react/jsx-runtime");
|
|
10743
10984
|
Settings = () => {
|
|
10744
10985
|
const { translation_settings, isPending, isError, error } = useTranslationSettings();
|
|
10745
10986
|
if (isError) {
|
|
10746
10987
|
throw error;
|
|
10747
10988
|
}
|
|
10748
|
-
return /* @__PURE__ */ (0,
|
|
10749
|
-
/* @__PURE__ */ (0,
|
|
10750
|
-
isPending ? /* @__PURE__ */ (0,
|
|
10989
|
+
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)(RouteDrawer, { children: [
|
|
10990
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(RouteDrawer.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(RouteDrawer.Title, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_ui80.Heading, { children: "Manage translatable entities" }) }) }),
|
|
10991
|
+
isPending ? /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(RouteDrawer.Body, { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_icons38.Spinner, { className: "animate-spin" }) }) : translation_settings && /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
10751
10992
|
BatchTranslationSettingsForm,
|
|
10752
10993
|
{
|
|
10753
10994
|
translation_settings
|
|
@@ -12885,13 +13126,13 @@ var init_hooks2 = __esm({
|
|
|
12885
13126
|
});
|
|
12886
13127
|
|
|
12887
13128
|
// src/components/data-grid/components/data-grid-row-error-indicator.tsx
|
|
12888
|
-
var
|
|
13129
|
+
var import_ui81, import_react_i18next59, import_jsx_runtime109, DataGridRowErrorIndicator, DataGridRowErrorLine;
|
|
12889
13130
|
var init_data_grid_row_error_indicator = __esm({
|
|
12890
13131
|
"src/components/data-grid/components/data-grid-row-error-indicator.tsx"() {
|
|
12891
13132
|
"use strict";
|
|
12892
|
-
|
|
12893
|
-
|
|
12894
|
-
|
|
13133
|
+
import_ui81 = require("@acmekit/ui");
|
|
13134
|
+
import_react_i18next59 = require("react-i18next");
|
|
13135
|
+
import_jsx_runtime109 = require("react/jsx-runtime");
|
|
12895
13136
|
DataGridRowErrorIndicator = ({
|
|
12896
13137
|
rowErrors
|
|
12897
13138
|
}) => {
|
|
@@ -12899,22 +13140,22 @@ var init_data_grid_row_error_indicator = __esm({
|
|
|
12899
13140
|
if (!rowErrors || rowErrorCount <= 0) {
|
|
12900
13141
|
return null;
|
|
12901
13142
|
}
|
|
12902
|
-
return /* @__PURE__ */ (0,
|
|
12903
|
-
|
|
13143
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
13144
|
+
import_ui81.Tooltip,
|
|
12904
13145
|
{
|
|
12905
|
-
content: /* @__PURE__ */ (0,
|
|
13146
|
+
content: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)("ul", { className: "flex flex-col gap-y-3", children: rowErrors.map((error, index) => /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(DataGridRowErrorLine, { error }, index)) }),
|
|
12906
13147
|
delayDuration: 0,
|
|
12907
|
-
children: /* @__PURE__ */ (0,
|
|
13148
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_ui81.Badge, { color: "red", size: "2xsmall", className: "cursor-default", children: rowErrorCount })
|
|
12908
13149
|
}
|
|
12909
13150
|
);
|
|
12910
13151
|
};
|
|
12911
13152
|
DataGridRowErrorLine = ({
|
|
12912
13153
|
error
|
|
12913
13154
|
}) => {
|
|
12914
|
-
const { t: t3 } = (0,
|
|
12915
|
-
return /* @__PURE__ */ (0,
|
|
13155
|
+
const { t: t3 } = (0, import_react_i18next59.useTranslation)();
|
|
13156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("li", { className: "txt-compact-small flex flex-col items-start", children: [
|
|
12916
13157
|
error.message,
|
|
12917
|
-
/* @__PURE__ */ (0,
|
|
13158
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(
|
|
12918
13159
|
"button",
|
|
12919
13160
|
{
|
|
12920
13161
|
type: "button",
|
|
@@ -12929,16 +13170,16 @@ var init_data_grid_row_error_indicator = __esm({
|
|
|
12929
13170
|
});
|
|
12930
13171
|
|
|
12931
13172
|
// src/components/data-grid/components/data-grid-cell-container.tsx
|
|
12932
|
-
var import_error_message, import_icons39,
|
|
13173
|
+
var import_error_message, import_icons39, import_ui82, import_react_hook_form12, import_jsx_runtime110, DataGridCellContainer, RenderChildren;
|
|
12933
13174
|
var init_data_grid_cell_container = __esm({
|
|
12934
13175
|
"src/components/data-grid/components/data-grid-cell-container.tsx"() {
|
|
12935
13176
|
"use strict";
|
|
12936
13177
|
import_error_message = require("@hookform/error-message");
|
|
12937
13178
|
import_icons39 = require("@acmekit/icons");
|
|
12938
|
-
|
|
13179
|
+
import_ui82 = require("@acmekit/ui");
|
|
12939
13180
|
import_react_hook_form12 = require("react-hook-form");
|
|
12940
13181
|
init_data_grid_row_error_indicator();
|
|
12941
|
-
|
|
13182
|
+
import_jsx_runtime110 = require("react/jsx-runtime");
|
|
12942
13183
|
DataGridCellContainer = ({
|
|
12943
13184
|
isAnchor,
|
|
12944
13185
|
isSelected,
|
|
@@ -12956,11 +13197,11 @@ var init_data_grid_cell_container = __esm({
|
|
|
12956
13197
|
}) => {
|
|
12957
13198
|
const error = (0, import_react_hook_form12.get)(errors, field);
|
|
12958
13199
|
const hasError = !!error;
|
|
12959
|
-
return /* @__PURE__ */ (0,
|
|
12960
|
-
/* @__PURE__ */ (0,
|
|
13200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsxs)("div", { className: (0, import_ui82.clx)("group/container relative h-full w-full"), children: [
|
|
13201
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsxs)(
|
|
12961
13202
|
"div",
|
|
12962
13203
|
{
|
|
12963
|
-
className: (0,
|
|
13204
|
+
className: (0, import_ui82.clx)(
|
|
12964
13205
|
"bg-ui-bg-base group/cell relative flex h-full w-full gap-x-2 px-4 py-2.5 outline-none",
|
|
12965
13206
|
{
|
|
12966
13207
|
"items-center": !isMultiLine,
|
|
@@ -12974,28 +13215,28 @@ var init_data_grid_cell_container = __esm({
|
|
|
12974
13215
|
tabIndex: -1,
|
|
12975
13216
|
...innerProps,
|
|
12976
13217
|
children: [
|
|
12977
|
-
/* @__PURE__ */ (0,
|
|
13218
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
12978
13219
|
import_error_message.ErrorMessage,
|
|
12979
13220
|
{
|
|
12980
13221
|
name: field,
|
|
12981
13222
|
errors,
|
|
12982
13223
|
render: ({ message }) => {
|
|
12983
|
-
return /* @__PURE__ */ (0,
|
|
13224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime110.jsx)("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_ui82.Tooltip, { content: message, delayDuration: 0, children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(import_icons39.ExclamationCircle, { className: "text-ui-tag-red-icon z-[3]" }) }) });
|
|
12984
13225
|
}
|
|
12985
13226
|
}
|
|
12986
13227
|
),
|
|
12987
|
-
/* @__PURE__ */ (0,
|
|
13228
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
12988
13229
|
"div",
|
|
12989
13230
|
{
|
|
12990
|
-
className: (0,
|
|
13231
|
+
className: (0, import_ui82.clx)("relative z-[1] flex h-full w-full", {
|
|
12991
13232
|
"items-center justify-center": !isMultiLine,
|
|
12992
13233
|
"items-start": isMultiLine
|
|
12993
13234
|
}),
|
|
12994
|
-
children: /* @__PURE__ */ (0,
|
|
13235
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(RenderChildren, { isAnchor, placeholder, children })
|
|
12995
13236
|
}
|
|
12996
13237
|
),
|
|
12997
|
-
/* @__PURE__ */ (0,
|
|
12998
|
-
showOverlay && /* @__PURE__ */ (0,
|
|
13238
|
+
/* @__PURE__ */ (0, import_jsx_runtime110.jsx)(DataGridRowErrorIndicator, { rowErrors }),
|
|
13239
|
+
showOverlay && /* @__PURE__ */ (0, import_jsx_runtime110.jsx)(
|
|
12999
13240
|
"div",
|
|
13000
13241
|
{
|
|
13001
13242
|
...overlayProps,
|
|
@@ -13023,16 +13264,16 @@ var init_data_grid_cell_container = __esm({
|
|
|
13023
13264
|
});
|
|
13024
13265
|
|
|
13025
13266
|
// src/components/data-grid/components/data-grid-boolean-cell.tsx
|
|
13026
|
-
var
|
|
13267
|
+
var import_ui83, import_react_hook_form13, import_jsx_runtime111, DataGridBooleanCell, Inner;
|
|
13027
13268
|
var init_data_grid_boolean_cell = __esm({
|
|
13028
13269
|
"src/components/data-grid/components/data-grid-boolean-cell.tsx"() {
|
|
13029
13270
|
"use strict";
|
|
13030
|
-
|
|
13271
|
+
import_ui83 = require("@acmekit/ui");
|
|
13031
13272
|
import_react_hook_form13 = require("react-hook-form");
|
|
13032
13273
|
init_use_combined_refs();
|
|
13033
13274
|
init_hooks2();
|
|
13034
13275
|
init_data_grid_cell_container();
|
|
13035
|
-
|
|
13276
|
+
import_jsx_runtime111 = require("react/jsx-runtime");
|
|
13036
13277
|
DataGridBooleanCell = ({
|
|
13037
13278
|
context,
|
|
13038
13279
|
disabled
|
|
@@ -13042,13 +13283,13 @@ var init_data_grid_boolean_cell = __esm({
|
|
|
13042
13283
|
});
|
|
13043
13284
|
const errorProps = useDataGridCellError({ context });
|
|
13044
13285
|
const { container, input } = renderProps;
|
|
13045
|
-
return /* @__PURE__ */ (0,
|
|
13286
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
13046
13287
|
import_react_hook_form13.Controller,
|
|
13047
13288
|
{
|
|
13048
13289
|
control,
|
|
13049
13290
|
name: field,
|
|
13050
13291
|
render: ({ field: field2 }) => {
|
|
13051
|
-
return /* @__PURE__ */ (0,
|
|
13292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(Inner, { field: field2, inputProps: input, disabled }) });
|
|
13052
13293
|
}
|
|
13053
13294
|
}
|
|
13054
13295
|
);
|
|
@@ -13067,8 +13308,8 @@ var init_data_grid_boolean_cell = __esm({
|
|
|
13067
13308
|
...attributes
|
|
13068
13309
|
} = inputProps;
|
|
13069
13310
|
const combinedRefs = useCombinedRefs(ref, inputRef);
|
|
13070
|
-
return /* @__PURE__ */ (0,
|
|
13071
|
-
|
|
13311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime111.jsx)(
|
|
13312
|
+
import_ui83.Checkbox,
|
|
13072
13313
|
{
|
|
13073
13314
|
disabled: disabled || fieldDisabled,
|
|
13074
13315
|
name,
|
|
@@ -13837,7 +14078,7 @@ var init_currencies = __esm({
|
|
|
13837
14078
|
});
|
|
13838
14079
|
|
|
13839
14080
|
// src/components/data-grid/components/data-grid-currency-cell.tsx
|
|
13840
|
-
var import_react_currency_input_field, import_react_hook_form14, import_react93,
|
|
14081
|
+
var import_react_currency_input_field, import_react_hook_form14, import_react93, import_jsx_runtime112, DataGridCurrencyCell, Inner2;
|
|
13841
14082
|
var init_data_grid_currency_cell = __esm({
|
|
13842
14083
|
"src/components/data-grid/components/data-grid-currency-cell.tsx"() {
|
|
13843
14084
|
"use strict";
|
|
@@ -13848,7 +14089,7 @@ var init_data_grid_currency_cell = __esm({
|
|
|
13848
14089
|
init_currencies();
|
|
13849
14090
|
init_hooks2();
|
|
13850
14091
|
init_data_grid_cell_container();
|
|
13851
|
-
|
|
14092
|
+
import_jsx_runtime112 = require("react/jsx-runtime");
|
|
13852
14093
|
DataGridCurrencyCell = ({
|
|
13853
14094
|
context,
|
|
13854
14095
|
code
|
|
@@ -13859,13 +14100,13 @@ var init_data_grid_currency_cell = __esm({
|
|
|
13859
14100
|
const errorProps = useDataGridCellError({ context });
|
|
13860
14101
|
const { container, input } = renderProps;
|
|
13861
14102
|
const currency = currencies[code.toUpperCase()];
|
|
13862
|
-
return /* @__PURE__ */ (0,
|
|
14103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
13863
14104
|
import_react_hook_form14.Controller,
|
|
13864
14105
|
{
|
|
13865
14106
|
control,
|
|
13866
14107
|
name: field,
|
|
13867
14108
|
render: ({ field: field2 }) => {
|
|
13868
|
-
return /* @__PURE__ */ (0,
|
|
14109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ (0, import_jsx_runtime112.jsx)(Inner2, { field: field2, inputProps: input, currencyInfo: currency }) });
|
|
13869
14110
|
}
|
|
13870
14111
|
}
|
|
13871
14112
|
);
|
|
@@ -13911,8 +14152,8 @@ var init_data_grid_currency_cell = __esm({
|
|
|
13911
14152
|
setLocalValue(update);
|
|
13912
14153
|
}, [value, formatter]);
|
|
13913
14154
|
const combinedRed = useCombinedRefs(inputRef, ref);
|
|
13914
|
-
return /* @__PURE__ */ (0,
|
|
13915
|
-
/* @__PURE__ */ (0,
|
|
14155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime112.jsxs)("div", { className: "relative flex size-full items-center", children: [
|
|
14156
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
13916
14157
|
"span",
|
|
13917
14158
|
{
|
|
13918
14159
|
className: "txt-compact-small text-ui-fg-muted pointer-events-none absolute left-0 w-fit min-w-4",
|
|
@@ -13920,7 +14161,7 @@ var init_data_grid_currency_cell = __esm({
|
|
|
13920
14161
|
children: currencyInfo.symbol_native
|
|
13921
14162
|
}
|
|
13922
14163
|
),
|
|
13923
|
-
/* @__PURE__ */ (0,
|
|
14164
|
+
/* @__PURE__ */ (0, import_jsx_runtime112.jsx)(
|
|
13924
14165
|
import_react_currency_input_field.default,
|
|
13925
14166
|
{
|
|
13926
14167
|
...rest,
|
|
@@ -13948,17 +14189,17 @@ var init_data_grid_currency_cell = __esm({
|
|
|
13948
14189
|
});
|
|
13949
14190
|
|
|
13950
14191
|
// src/components/data-grid/components/data-grid-multiline-cell.tsx
|
|
13951
|
-
var
|
|
14192
|
+
var import_ui84, import_react94, import_react_hook_form15, import_jsx_runtime113, DataGridMultilineCell, Inner3;
|
|
13952
14193
|
var init_data_grid_multiline_cell = __esm({
|
|
13953
14194
|
"src/components/data-grid/components/data-grid-multiline-cell.tsx"() {
|
|
13954
14195
|
"use strict";
|
|
13955
|
-
|
|
14196
|
+
import_ui84 = require("@acmekit/ui");
|
|
13956
14197
|
import_react94 = require("react");
|
|
13957
14198
|
import_react_hook_form15 = require("react-hook-form");
|
|
13958
14199
|
init_use_combined_refs();
|
|
13959
14200
|
init_hooks2();
|
|
13960
14201
|
init_data_grid_cell_container();
|
|
13961
|
-
|
|
14202
|
+
import_jsx_runtime113 = require("react/jsx-runtime");
|
|
13962
14203
|
DataGridMultilineCell = ({
|
|
13963
14204
|
context
|
|
13964
14205
|
}) => {
|
|
@@ -13967,13 +14208,13 @@ var init_data_grid_multiline_cell = __esm({
|
|
|
13967
14208
|
});
|
|
13968
14209
|
const errorProps = useDataGridCellError({ context });
|
|
13969
14210
|
const { container, input } = renderProps;
|
|
13970
|
-
return /* @__PURE__ */ (0,
|
|
14211
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
13971
14212
|
import_react_hook_form15.Controller,
|
|
13972
14213
|
{
|
|
13973
14214
|
control,
|
|
13974
14215
|
name: field,
|
|
13975
14216
|
render: ({ field: field2 }) => {
|
|
13976
|
-
return /* @__PURE__ */ (0,
|
|
14217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(DataGridCellContainer, { ...container, ...errorProps, isMultiLine: true, children: /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(Inner3, { field: field2, inputProps: input }) });
|
|
13977
14218
|
}
|
|
13978
14219
|
}
|
|
13979
14220
|
);
|
|
@@ -14006,10 +14247,10 @@ var init_data_grid_multiline_cell = __esm({
|
|
|
14006
14247
|
const timeoutId = setTimeout(adjustTextareaHeight, 50);
|
|
14007
14248
|
return () => clearTimeout(timeoutId);
|
|
14008
14249
|
}, [adjustTextareaHeight]);
|
|
14009
|
-
return /* @__PURE__ */ (0,
|
|
14250
|
+
return /* @__PURE__ */ (0, import_jsx_runtime113.jsx)(
|
|
14010
14251
|
"textarea",
|
|
14011
14252
|
{
|
|
14012
|
-
className: (0,
|
|
14253
|
+
className: (0, import_ui84.clx)(
|
|
14013
14254
|
"txt-compact-small text-ui-fg-subtle flex w-full cursor-pointer bg-transparent outline-none",
|
|
14014
14255
|
"focus:cursor-text",
|
|
14015
14256
|
"resize-none overflow-hidden py-2"
|
|
@@ -14036,17 +14277,17 @@ var init_data_grid_multiline_cell = __esm({
|
|
|
14036
14277
|
});
|
|
14037
14278
|
|
|
14038
14279
|
// src/components/data-grid/components/data-grid-number-cell.tsx
|
|
14039
|
-
var
|
|
14280
|
+
var import_ui85, import_react95, import_react_hook_form16, import_jsx_runtime114, DataGridNumberCell, Inner4;
|
|
14040
14281
|
var init_data_grid_number_cell = __esm({
|
|
14041
14282
|
"src/components/data-grid/components/data-grid-number-cell.tsx"() {
|
|
14042
14283
|
"use strict";
|
|
14043
|
-
|
|
14284
|
+
import_ui85 = require("@acmekit/ui");
|
|
14044
14285
|
import_react95 = require("react");
|
|
14045
14286
|
import_react_hook_form16 = require("react-hook-form");
|
|
14046
14287
|
init_use_combined_refs();
|
|
14047
14288
|
init_hooks2();
|
|
14048
14289
|
init_data_grid_cell_container();
|
|
14049
|
-
|
|
14290
|
+
import_jsx_runtime114 = require("react/jsx-runtime");
|
|
14050
14291
|
DataGridNumberCell = ({
|
|
14051
14292
|
context,
|
|
14052
14293
|
...rest
|
|
@@ -14056,13 +14297,13 @@ var init_data_grid_number_cell = __esm({
|
|
|
14056
14297
|
});
|
|
14057
14298
|
const errorProps = useDataGridCellError({ context });
|
|
14058
14299
|
const { container, input } = renderProps;
|
|
14059
|
-
return /* @__PURE__ */ (0,
|
|
14300
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14060
14301
|
import_react_hook_form16.Controller,
|
|
14061
14302
|
{
|
|
14062
14303
|
control,
|
|
14063
14304
|
name: field,
|
|
14064
14305
|
render: ({ field: field2 }) => {
|
|
14065
|
-
return /* @__PURE__ */ (0,
|
|
14306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(Inner4, { field: field2, inputProps: input, ...rest }) });
|
|
14066
14307
|
}
|
|
14067
14308
|
}
|
|
14068
14309
|
);
|
|
@@ -14085,7 +14326,7 @@ var init_data_grid_number_cell = __esm({
|
|
|
14085
14326
|
setLocalValue(value);
|
|
14086
14327
|
}, [value]);
|
|
14087
14328
|
const combinedRefs = useCombinedRefs(inputRef, ref);
|
|
14088
|
-
return /* @__PURE__ */ (0,
|
|
14329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime114.jsx)("div", { className: "size-full", children: /* @__PURE__ */ (0, import_jsx_runtime114.jsx)(
|
|
14089
14330
|
"input",
|
|
14090
14331
|
{
|
|
14091
14332
|
ref: combinedRefs,
|
|
@@ -14099,7 +14340,7 @@ var init_data_grid_number_cell = __esm({
|
|
|
14099
14340
|
onFocus,
|
|
14100
14341
|
type: "number",
|
|
14101
14342
|
inputMode: "decimal",
|
|
14102
|
-
className: (0,
|
|
14343
|
+
className: (0, import_ui85.clx)(
|
|
14103
14344
|
"txt-compact-small size-full bg-transparent outline-none",
|
|
14104
14345
|
"placeholder:text-ui-fg-muted"
|
|
14105
14346
|
),
|
|
@@ -14114,14 +14355,14 @@ var init_data_grid_number_cell = __esm({
|
|
|
14114
14355
|
});
|
|
14115
14356
|
|
|
14116
14357
|
// src/components/data-grid/components/data-grid-readonly-cell.tsx
|
|
14117
|
-
var
|
|
14358
|
+
var import_ui86, import_jsx_runtime115, DataGridReadonlyCell;
|
|
14118
14359
|
var init_data_grid_readonly_cell = __esm({
|
|
14119
14360
|
"src/components/data-grid/components/data-grid-readonly-cell.tsx"() {
|
|
14120
14361
|
"use strict";
|
|
14121
|
-
|
|
14362
|
+
import_ui86 = require("@acmekit/ui");
|
|
14122
14363
|
init_hooks2();
|
|
14123
14364
|
init_data_grid_row_error_indicator();
|
|
14124
|
-
|
|
14365
|
+
import_jsx_runtime115 = require("react/jsx-runtime");
|
|
14125
14366
|
DataGridReadonlyCell = ({
|
|
14126
14367
|
context,
|
|
14127
14368
|
color = "muted",
|
|
@@ -14129,27 +14370,27 @@ var init_data_grid_readonly_cell = __esm({
|
|
|
14129
14370
|
isMultiLine = false
|
|
14130
14371
|
}) => {
|
|
14131
14372
|
const { rowErrors } = useDataGridCellError({ context });
|
|
14132
|
-
return /* @__PURE__ */ (0,
|
|
14373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime115.jsxs)(
|
|
14133
14374
|
"div",
|
|
14134
14375
|
{
|
|
14135
|
-
className: (0,
|
|
14376
|
+
className: (0, import_ui86.clx)(
|
|
14136
14377
|
"txt-compact-small text-ui-fg-subtle flex w-full cursor-not-allowed justify-between overflow-hidden px-4 py-2.5 outline-none",
|
|
14137
14378
|
color === "muted" && "bg-ui-bg-subtle",
|
|
14138
14379
|
color === "normal" && "bg-ui-bg-base",
|
|
14139
14380
|
"h-full items-center"
|
|
14140
14381
|
),
|
|
14141
14382
|
children: [
|
|
14142
|
-
/* @__PURE__ */ (0,
|
|
14383
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(
|
|
14143
14384
|
"div",
|
|
14144
14385
|
{
|
|
14145
|
-
className: (0,
|
|
14386
|
+
className: (0, import_ui86.clx)("flex-1", {
|
|
14146
14387
|
truncate: !isMultiLine,
|
|
14147
14388
|
"whitespace-pre-wrap break-words": isMultiLine
|
|
14148
14389
|
}),
|
|
14149
14390
|
children
|
|
14150
14391
|
}
|
|
14151
14392
|
),
|
|
14152
|
-
/* @__PURE__ */ (0,
|
|
14393
|
+
/* @__PURE__ */ (0, import_jsx_runtime115.jsx)(DataGridRowErrorIndicator, { rowErrors })
|
|
14153
14394
|
]
|
|
14154
14395
|
}
|
|
14155
14396
|
);
|
|
@@ -14208,18 +14449,18 @@ var init_use_command_history = __esm({
|
|
|
14208
14449
|
});
|
|
14209
14450
|
|
|
14210
14451
|
// src/components/data-grid/components/data-grid-keyboard-shortcut-modal.tsx
|
|
14211
|
-
var import_icons40,
|
|
14452
|
+
var import_icons40, import_ui87, import_radix_ui15, import_react97, import_react_i18next60, import_jsx_runtime116, useDataGridShortcuts, DataGridKeyboardShortcutModal;
|
|
14212
14453
|
var init_data_grid_keyboard_shortcut_modal = __esm({
|
|
14213
14454
|
"src/components/data-grid/components/data-grid-keyboard-shortcut-modal.tsx"() {
|
|
14214
14455
|
"use strict";
|
|
14215
14456
|
import_icons40 = require("@acmekit/icons");
|
|
14216
|
-
|
|
14457
|
+
import_ui87 = require("@acmekit/ui");
|
|
14217
14458
|
import_radix_ui15 = require("radix-ui");
|
|
14218
14459
|
import_react97 = require("react");
|
|
14219
|
-
|
|
14220
|
-
|
|
14460
|
+
import_react_i18next60 = require("react-i18next");
|
|
14461
|
+
import_jsx_runtime116 = require("react/jsx-runtime");
|
|
14221
14462
|
useDataGridShortcuts = () => {
|
|
14222
|
-
const { t: t3 } = (0,
|
|
14463
|
+
const { t: t3 } = (0, import_react_i18next60.useTranslation)();
|
|
14223
14464
|
const shortcuts = (0, import_react97.useMemo)(
|
|
14224
14465
|
() => [
|
|
14225
14466
|
{
|
|
@@ -14364,7 +14605,7 @@ var init_data_grid_keyboard_shortcut_modal = __esm({
|
|
|
14364
14605
|
open,
|
|
14365
14606
|
onOpenChange
|
|
14366
14607
|
}) => {
|
|
14367
|
-
const { t: t3 } = (0,
|
|
14608
|
+
const { t: t3 } = (0, import_react_i18next60.useTranslation)();
|
|
14368
14609
|
const [searchValue, onSearchValueChange] = (0, import_react97.useState)("");
|
|
14369
14610
|
const shortcuts = useDataGridShortcuts();
|
|
14370
14611
|
const searchResults = (0, import_react97.useMemo)(() => {
|
|
@@ -14372,32 +14613,32 @@ var init_data_grid_keyboard_shortcut_modal = __esm({
|
|
|
14372
14613
|
(shortcut) => shortcut.label.toLowerCase().includes(searchValue.toLowerCase())
|
|
14373
14614
|
);
|
|
14374
14615
|
}, [searchValue, shortcuts]);
|
|
14375
|
-
return /* @__PURE__ */ (0,
|
|
14376
|
-
/* @__PURE__ */ (0,
|
|
14377
|
-
/* @__PURE__ */ (0,
|
|
14378
|
-
/* @__PURE__ */ (0,
|
|
14616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_radix_ui15.Dialog.Root, { open, onOpenChange, children: [
|
|
14617
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_radix_ui15.Dialog.Trigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_ui87.Button, { size: "small", variant: "secondary", children: t3("dataGrid.shortcuts.label") }) }),
|
|
14618
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_radix_ui15.Dialog.Portal, { children: [
|
|
14619
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
14379
14620
|
import_radix_ui15.Dialog.Overlay,
|
|
14380
14621
|
{
|
|
14381
|
-
className: (0,
|
|
14622
|
+
className: (0, import_ui87.clx)(
|
|
14382
14623
|
"bg-ui-bg-overlay fixed inset-0",
|
|
14383
14624
|
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
|
|
14384
14625
|
)
|
|
14385
14626
|
}
|
|
14386
14627
|
),
|
|
14387
|
-
/* @__PURE__ */ (0,
|
|
14388
|
-
/* @__PURE__ */ (0,
|
|
14389
|
-
/* @__PURE__ */ (0,
|
|
14390
|
-
/* @__PURE__ */ (0,
|
|
14391
|
-
/* @__PURE__ */ (0,
|
|
14392
|
-
/* @__PURE__ */ (0,
|
|
14628
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(import_radix_ui15.Dialog.Content, { className: "bg-ui-bg-subtle shadow-elevation-modal fixed left-[50%] top-[50%] flex h-full max-h-[612px] w-full max-w-[560px] translate-x-[-50%] translate-y-[-50%] flex-col divide-y overflow-hidden rounded-lg outline-none", children: [
|
|
14629
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex flex-col gap-y-3 px-6 py-4", children: [
|
|
14630
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
14631
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { children: [
|
|
14632
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_radix_ui15.Dialog.Title, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_ui87.Heading, { children: t3("app.menus.user.shortcuts") }) }),
|
|
14633
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_radix_ui15.Dialog.Description, { className: "sr-only" })
|
|
14393
14634
|
] }),
|
|
14394
|
-
/* @__PURE__ */ (0,
|
|
14395
|
-
/* @__PURE__ */ (0,
|
|
14396
|
-
/* @__PURE__ */ (0,
|
|
14635
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
14636
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_ui87.Kbd, { children: "esc" }),
|
|
14637
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_radix_ui15.Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_ui87.IconButton, { variant: "transparent", size: "small", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_icons40.XMark, {}) }) })
|
|
14397
14638
|
] })
|
|
14398
14639
|
] }),
|
|
14399
|
-
/* @__PURE__ */ (0,
|
|
14400
|
-
|
|
14640
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(
|
|
14641
|
+
import_ui87.Input,
|
|
14401
14642
|
{
|
|
14402
14643
|
type: "search",
|
|
14403
14644
|
value: searchValue,
|
|
@@ -14406,15 +14647,15 @@ var init_data_grid_keyboard_shortcut_modal = __esm({
|
|
|
14406
14647
|
}
|
|
14407
14648
|
) })
|
|
14408
14649
|
] }),
|
|
14409
|
-
/* @__PURE__ */ (0,
|
|
14410
|
-
return /* @__PURE__ */ (0,
|
|
14650
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "flex flex-col divide-y overflow-y-auto", children: searchResults.map((shortcut, index) => {
|
|
14651
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsxs)(
|
|
14411
14652
|
"div",
|
|
14412
14653
|
{
|
|
14413
14654
|
className: "text-ui-fg-subtle flex items-center justify-between px-6 py-3",
|
|
14414
14655
|
children: [
|
|
14415
|
-
/* @__PURE__ */ (0,
|
|
14416
|
-
/* @__PURE__ */ (0,
|
|
14417
|
-
return /* @__PURE__ */ (0,
|
|
14656
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_ui87.Text, { size: "small", children: shortcut.label }),
|
|
14657
|
+
/* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "flex items-center gap-x-1", children: shortcut.keys.Mac?.map((key, index2) => {
|
|
14658
|
+
return /* @__PURE__ */ (0, import_jsx_runtime116.jsx)("div", { className: "flex items-center gap-x-1", children: /* @__PURE__ */ (0, import_jsx_runtime116.jsx)(import_ui87.Kbd, { children: key }) }, index2);
|
|
14418
14659
|
}) })
|
|
14419
14660
|
]
|
|
14420
14661
|
},
|
|
@@ -14429,16 +14670,16 @@ var init_data_grid_keyboard_shortcut_modal = __esm({
|
|
|
14429
14670
|
});
|
|
14430
14671
|
|
|
14431
14672
|
// src/components/data-grid/components/data-grid-root.tsx
|
|
14432
|
-
var import_icons41,
|
|
14673
|
+
var import_icons41, import_ui88, import_react_table6, import_react_virtual, import_react98, import_react_i18next61, import_jsx_runtime117, ROW_HEIGHT, getCommonPinningStyles, DataGridRoot, DataGridHeader, DataGridCell, DataGridRow, DataGridRowSkeleton;
|
|
14433
14674
|
var init_data_grid_root = __esm({
|
|
14434
14675
|
"src/components/data-grid/components/data-grid-root.tsx"() {
|
|
14435
14676
|
"use strict";
|
|
14436
14677
|
import_icons41 = require("@acmekit/icons");
|
|
14437
|
-
|
|
14678
|
+
import_ui88 = require("@acmekit/ui");
|
|
14438
14679
|
import_react_table6 = require("@tanstack/react-table");
|
|
14439
14680
|
import_react_virtual = require("@tanstack/react-virtual");
|
|
14440
14681
|
import_react98 = require("react");
|
|
14441
|
-
|
|
14682
|
+
import_react_i18next61 = require("react-i18next");
|
|
14442
14683
|
init_use_command_history();
|
|
14443
14684
|
init_use_document_direction();
|
|
14444
14685
|
init_conditional_tooltip2();
|
|
@@ -14447,7 +14688,7 @@ var init_data_grid_root = __esm({
|
|
|
14447
14688
|
init_models();
|
|
14448
14689
|
init_utils3();
|
|
14449
14690
|
init_data_grid_keyboard_shortcut_modal();
|
|
14450
|
-
|
|
14691
|
+
import_jsx_runtime117 = require("react/jsx-runtime");
|
|
14451
14692
|
ROW_HEIGHT = 40;
|
|
14452
14693
|
getCommonPinningStyles = (column) => {
|
|
14453
14694
|
const isPinned = column.getIsPinned();
|
|
@@ -14881,8 +15122,8 @@ var init_data_grid_root = __esm({
|
|
|
14881
15122
|
});
|
|
14882
15123
|
}
|
|
14883
15124
|
}, [anchor, trapActive, setSingleRange, scrollToCoordinates, queryTool]);
|
|
14884
|
-
return /* @__PURE__ */ (0,
|
|
14885
|
-
/* @__PURE__ */ (0,
|
|
15125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(DataGridContext.Provider, { value: values, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "bg-ui-bg-subtle flex size-full flex-col", children: [
|
|
15126
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14886
15127
|
DataGridHeader,
|
|
14887
15128
|
{
|
|
14888
15129
|
showColumnsDropdown,
|
|
@@ -14897,7 +15138,7 @@ var init_data_grid_root = __esm({
|
|
|
14897
15138
|
headerContent
|
|
14898
15139
|
}
|
|
14899
15140
|
),
|
|
14900
|
-
/* @__PURE__ */ (0,
|
|
15141
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "size-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14901
15142
|
"div",
|
|
14902
15143
|
{
|
|
14903
15144
|
ref: containerRef,
|
|
@@ -14908,19 +15149,19 @@ var init_data_grid_root = __esm({
|
|
|
14908
15149
|
onClick: handleRestoreGridFocus,
|
|
14909
15150
|
"data-container": true,
|
|
14910
15151
|
role: "application",
|
|
14911
|
-
children: /* @__PURE__ */ (0,
|
|
14912
|
-
/* @__PURE__ */ (0,
|
|
15152
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { role: "grid", className: "text-ui-fg-subtle grid", children: [
|
|
15153
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14913
15154
|
"div",
|
|
14914
15155
|
{
|
|
14915
15156
|
role: "rowgroup",
|
|
14916
15157
|
className: "txt-compact-small-plus bg-ui-bg-subtle sticky top-0 z-[1] grid",
|
|
14917
|
-
children: grid.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0,
|
|
15158
|
+
children: grid.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
14918
15159
|
"div",
|
|
14919
15160
|
{
|
|
14920
15161
|
role: "row",
|
|
14921
15162
|
className: "flex h-10 w-full",
|
|
14922
15163
|
children: [
|
|
14923
|
-
virtualPaddingLeft ? /* @__PURE__ */ (0,
|
|
15164
|
+
virtualPaddingLeft ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14924
15165
|
"div",
|
|
14925
15166
|
{
|
|
14926
15167
|
role: "presentation",
|
|
@@ -14932,7 +15173,7 @@ var init_data_grid_root = __esm({
|
|
|
14932
15173
|
const previousVC = array2[index - 1];
|
|
14933
15174
|
if (previousVC && vc.index !== previousVC.index + 1) {
|
|
14934
15175
|
acc.push(
|
|
14935
|
-
/* @__PURE__ */ (0,
|
|
15176
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14936
15177
|
"div",
|
|
14937
15178
|
{
|
|
14938
15179
|
role: "presentation",
|
|
@@ -14946,7 +15187,7 @@ var init_data_grid_root = __esm({
|
|
|
14946
15187
|
);
|
|
14947
15188
|
}
|
|
14948
15189
|
acc.push(
|
|
14949
|
-
/* @__PURE__ */ (0,
|
|
15190
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14950
15191
|
"div",
|
|
14951
15192
|
{
|
|
14952
15193
|
role: "columnheader",
|
|
@@ -14966,7 +15207,7 @@ var init_data_grid_root = __esm({
|
|
|
14966
15207
|
);
|
|
14967
15208
|
return acc;
|
|
14968
15209
|
}, []),
|
|
14969
|
-
virtualPaddingRight ? /* @__PURE__ */ (0,
|
|
15210
|
+
virtualPaddingRight ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14970
15211
|
"div",
|
|
14971
15212
|
{
|
|
14972
15213
|
role: "presentation",
|
|
@@ -14982,7 +15223,7 @@ var init_data_grid_root = __esm({
|
|
|
14982
15223
|
))
|
|
14983
15224
|
}
|
|
14984
15225
|
),
|
|
14985
|
-
/* @__PURE__ */ (0,
|
|
15226
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14986
15227
|
"div",
|
|
14987
15228
|
{
|
|
14988
15229
|
role: "rowgroup",
|
|
@@ -14993,7 +15234,7 @@ var init_data_grid_root = __esm({
|
|
|
14993
15234
|
children: virtualRows.map((virtualRow) => {
|
|
14994
15235
|
const row = visibleRows[virtualRow.index];
|
|
14995
15236
|
if (!row) {
|
|
14996
|
-
return /* @__PURE__ */ (0,
|
|
15237
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
14997
15238
|
DataGridRowSkeleton,
|
|
14998
15239
|
{
|
|
14999
15240
|
virtualRow,
|
|
@@ -15005,7 +15246,7 @@ var init_data_grid_root = __esm({
|
|
|
15005
15246
|
);
|
|
15006
15247
|
}
|
|
15007
15248
|
const rowIndex = flatRows.findIndex((r) => r.id === row.id);
|
|
15008
|
-
return /* @__PURE__ */ (0,
|
|
15249
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15009
15250
|
DataGridRow,
|
|
15010
15251
|
{
|
|
15011
15252
|
row,
|
|
@@ -15044,7 +15285,7 @@ var init_data_grid_root = __esm({
|
|
|
15044
15285
|
}) => {
|
|
15045
15286
|
const [shortcutsOpen, setShortcutsOpen] = (0, import_react98.useState)(false);
|
|
15046
15287
|
const [columnsOpen, setColumnsOpen] = (0, import_react98.useState)(false);
|
|
15047
|
-
const { t: t3 } = (0,
|
|
15288
|
+
const { t: t3 } = (0, import_react_i18next61.useTranslation)();
|
|
15048
15289
|
const direction = useDocumentDirection();
|
|
15049
15290
|
const hasChanged = columnOptions.some((column) => !column.checked);
|
|
15050
15291
|
const handleShortcutsOpenChange = (value) => {
|
|
@@ -15055,33 +15296,33 @@ var init_data_grid_root = __esm({
|
|
|
15055
15296
|
onHeaderInteractionChange(value);
|
|
15056
15297
|
setColumnsOpen(value);
|
|
15057
15298
|
};
|
|
15058
|
-
return /* @__PURE__ */ (0,
|
|
15059
|
-
showColumnsDropdown && /* @__PURE__ */ (0,
|
|
15060
|
-
/* @__PURE__ */ (0,
|
|
15061
|
-
|
|
15299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "bg-ui-bg-base flex items-center justify-between border-b p-4", children: [
|
|
15300
|
+
showColumnsDropdown && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "flex items-center gap-x-2", children: [
|
|
15301
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
15302
|
+
import_ui88.DropdownMenu,
|
|
15062
15303
|
{
|
|
15063
15304
|
dir: direction,
|
|
15064
15305
|
open: columnsOpen,
|
|
15065
15306
|
onOpenChange: handleColumnsOpenChange,
|
|
15066
15307
|
children: [
|
|
15067
|
-
/* @__PURE__ */ (0,
|
|
15308
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15068
15309
|
ConditionalTooltip,
|
|
15069
15310
|
{
|
|
15070
15311
|
showTooltip: isDisabled,
|
|
15071
15312
|
content: t3("dataGrid.columns.disabled"),
|
|
15072
|
-
children: /* @__PURE__ */ (0,
|
|
15073
|
-
hasChanged ? /* @__PURE__ */ (0,
|
|
15313
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_ui88.DropdownMenu.Trigger, { asChild: true, disabled: isDisabled, children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(import_ui88.Button, { size: "small", variant: "secondary", children: [
|
|
15314
|
+
hasChanged ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_icons41.AdjustmentsDone, {}) : /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_icons41.Adjustments, {}),
|
|
15074
15315
|
t3("dataGrid.columns.view")
|
|
15075
15316
|
] }) })
|
|
15076
15317
|
}
|
|
15077
15318
|
),
|
|
15078
|
-
/* @__PURE__ */ (0,
|
|
15319
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_ui88.DropdownMenu.Content, { children: columnOptions.map((column, index) => {
|
|
15079
15320
|
const { checked, disabled, id: id2, name } = column;
|
|
15080
15321
|
if (disabled) {
|
|
15081
15322
|
return null;
|
|
15082
15323
|
}
|
|
15083
|
-
return /* @__PURE__ */ (0,
|
|
15084
|
-
|
|
15324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15325
|
+
import_ui88.DropdownMenu.CheckboxItem,
|
|
15085
15326
|
{
|
|
15086
15327
|
checked,
|
|
15087
15328
|
onCheckedChange: onToggleColumn(index),
|
|
@@ -15094,8 +15335,8 @@ var init_data_grid_root = __esm({
|
|
|
15094
15335
|
]
|
|
15095
15336
|
}
|
|
15096
15337
|
),
|
|
15097
|
-
hasChanged && /* @__PURE__ */ (0,
|
|
15098
|
-
|
|
15338
|
+
hasChanged && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15339
|
+
import_ui88.Button,
|
|
15099
15340
|
{
|
|
15100
15341
|
size: "small",
|
|
15101
15342
|
variant: "transparent",
|
|
@@ -15108,26 +15349,26 @@ var init_data_grid_root = __esm({
|
|
|
15108
15349
|
)
|
|
15109
15350
|
] }),
|
|
15110
15351
|
headerContent,
|
|
15111
|
-
/* @__PURE__ */ (0,
|
|
15112
|
-
errorCount > 0 && /* @__PURE__ */ (0,
|
|
15113
|
-
|
|
15352
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "ml-auto flex items-center gap-x-2", children: [
|
|
15353
|
+
errorCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
15354
|
+
import_ui88.Button,
|
|
15114
15355
|
{
|
|
15115
15356
|
size: "small",
|
|
15116
15357
|
variant: "secondary",
|
|
15117
15358
|
type: "button",
|
|
15118
15359
|
onClick: onToggleErrorHighlighting,
|
|
15119
|
-
className: (0,
|
|
15360
|
+
className: (0, import_ui88.clx)({
|
|
15120
15361
|
"bg-ui-button-neutral-pressed": isHighlighted
|
|
15121
15362
|
}),
|
|
15122
15363
|
children: [
|
|
15123
|
-
/* @__PURE__ */ (0,
|
|
15124
|
-
/* @__PURE__ */ (0,
|
|
15364
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(import_icons41.ExclamationCircle, { className: "text-ui-fg-subtle" }),
|
|
15365
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)("span", { children: t3("dataGrid.errors.count", {
|
|
15125
15366
|
count: errorCount
|
|
15126
15367
|
}) })
|
|
15127
15368
|
]
|
|
15128
15369
|
}
|
|
15129
15370
|
),
|
|
15130
|
-
/* @__PURE__ */ (0,
|
|
15371
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15131
15372
|
DataGridKeyboardShortcutModal,
|
|
15132
15373
|
{
|
|
15133
15374
|
open: shortcutsOpen,
|
|
@@ -15150,7 +15391,7 @@ var init_data_grid_root = __esm({
|
|
|
15150
15391
|
col: columnIndex
|
|
15151
15392
|
};
|
|
15152
15393
|
const isAnchor = isCellMatch(coords, anchor);
|
|
15153
|
-
return /* @__PURE__ */ (0,
|
|
15394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15154
15395
|
"div",
|
|
15155
15396
|
{
|
|
15156
15397
|
role: "gridcell",
|
|
@@ -15162,21 +15403,21 @@ var init_data_grid_root = __esm({
|
|
|
15162
15403
|
},
|
|
15163
15404
|
"data-row-index": rowIndex,
|
|
15164
15405
|
"data-column-index": columnIndex,
|
|
15165
|
-
className: (0,
|
|
15406
|
+
className: (0, import_ui88.clx)(
|
|
15166
15407
|
"relative flex items-stretch border-b border-r p-0 outline-none"
|
|
15167
15408
|
),
|
|
15168
15409
|
tabIndex: -1,
|
|
15169
|
-
children: /* @__PURE__ */ (0,
|
|
15410
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)("div", { className: "relative w-full", children: [
|
|
15170
15411
|
(0, import_react_table6.flexRender)(cell.column.columnDef.cell, {
|
|
15171
15412
|
...cell.getContext(),
|
|
15172
15413
|
columnIndex,
|
|
15173
15414
|
rowIndex
|
|
15174
15415
|
}),
|
|
15175
|
-
isAnchor && /* @__PURE__ */ (0,
|
|
15416
|
+
isAnchor && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15176
15417
|
"div",
|
|
15177
15418
|
{
|
|
15178
15419
|
onMouseDown: onDragToFillStart,
|
|
15179
|
-
className: (0,
|
|
15420
|
+
className: (0, import_ui88.clx)(
|
|
15180
15421
|
"bg-ui-fg-interactive absolute bottom-0 right-0 z-[3] size-1.5 cursor-ns-resize",
|
|
15181
15422
|
{
|
|
15182
15423
|
"cursor-nwse-resize": multiColumnSelection
|
|
@@ -15202,7 +15443,7 @@ var init_data_grid_root = __esm({
|
|
|
15202
15443
|
multiColumnSelection
|
|
15203
15444
|
}) => {
|
|
15204
15445
|
const visibleCells = row.getVisibleCells();
|
|
15205
|
-
return /* @__PURE__ */ (0,
|
|
15446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
15206
15447
|
"div",
|
|
15207
15448
|
{
|
|
15208
15449
|
role: "row",
|
|
@@ -15214,7 +15455,7 @@ var init_data_grid_root = __esm({
|
|
|
15214
15455
|
},
|
|
15215
15456
|
className: "bg-ui-bg-subtle txt-compact-small absolute flex min-h-10 w-full",
|
|
15216
15457
|
children: [
|
|
15217
|
-
virtualPaddingLeft ? /* @__PURE__ */ (0,
|
|
15458
|
+
virtualPaddingLeft ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15218
15459
|
"div",
|
|
15219
15460
|
{
|
|
15220
15461
|
role: "presentation",
|
|
@@ -15228,7 +15469,7 @@ var init_data_grid_root = __esm({
|
|
|
15228
15469
|
const previousVC = array2[index - 1];
|
|
15229
15470
|
if (previousVC && vc.index !== previousVC.index + 1) {
|
|
15230
15471
|
acc.push(
|
|
15231
|
-
/* @__PURE__ */ (0,
|
|
15472
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15232
15473
|
"div",
|
|
15233
15474
|
{
|
|
15234
15475
|
role: "presentation",
|
|
@@ -15242,7 +15483,7 @@ var init_data_grid_root = __esm({
|
|
|
15242
15483
|
);
|
|
15243
15484
|
}
|
|
15244
15485
|
acc.push(
|
|
15245
|
-
/* @__PURE__ */ (0,
|
|
15486
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15246
15487
|
DataGridCell,
|
|
15247
15488
|
{
|
|
15248
15489
|
cell,
|
|
@@ -15257,7 +15498,7 @@ var init_data_grid_root = __esm({
|
|
|
15257
15498
|
);
|
|
15258
15499
|
return acc;
|
|
15259
15500
|
}, []),
|
|
15260
|
-
virtualPaddingRight ? /* @__PURE__ */ (0,
|
|
15501
|
+
virtualPaddingRight ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15261
15502
|
"div",
|
|
15262
15503
|
{
|
|
15263
15504
|
role: "presentation",
|
|
@@ -15274,7 +15515,7 @@ var init_data_grid_root = __esm({
|
|
|
15274
15515
|
virtualPaddingRight,
|
|
15275
15516
|
virtualColumns
|
|
15276
15517
|
}) => {
|
|
15277
|
-
return /* @__PURE__ */ (0,
|
|
15518
|
+
return /* @__PURE__ */ (0, import_jsx_runtime117.jsxs)(
|
|
15278
15519
|
"div",
|
|
15279
15520
|
{
|
|
15280
15521
|
role: "row",
|
|
@@ -15284,7 +15525,7 @@ var init_data_grid_root = __esm({
|
|
|
15284
15525
|
},
|
|
15285
15526
|
className: "bg-ui-bg-subtle txt-compact-small absolute flex h-10 w-full",
|
|
15286
15527
|
children: [
|
|
15287
|
-
virtualPaddingLeft ? /* @__PURE__ */ (0,
|
|
15528
|
+
virtualPaddingLeft ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15288
15529
|
"div",
|
|
15289
15530
|
{
|
|
15290
15531
|
role: "presentation",
|
|
@@ -15296,7 +15537,7 @@ var init_data_grid_root = __esm({
|
|
|
15296
15537
|
const elements = [];
|
|
15297
15538
|
if (previousVC && vc.index !== previousVC.index + 1) {
|
|
15298
15539
|
elements.push(
|
|
15299
|
-
/* @__PURE__ */ (0,
|
|
15540
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15300
15541
|
"div",
|
|
15301
15542
|
{
|
|
15302
15543
|
role: "presentation",
|
|
@@ -15310,20 +15551,20 @@ var init_data_grid_root = __esm({
|
|
|
15310
15551
|
);
|
|
15311
15552
|
}
|
|
15312
15553
|
elements.push(
|
|
15313
|
-
/* @__PURE__ */ (0,
|
|
15554
|
+
/* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15314
15555
|
"div",
|
|
15315
15556
|
{
|
|
15316
15557
|
role: "gridcell",
|
|
15317
15558
|
style: { width: vc.size },
|
|
15318
15559
|
className: "relative flex items-center border-b border-r p-0 outline-none",
|
|
15319
|
-
children: /* @__PURE__ */ (0,
|
|
15560
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "flex h-full w-full items-center px-4", children: /* @__PURE__ */ (0, import_jsx_runtime117.jsx)("div", { className: "bg-ui-bg-component h-4 w-3/4 animate-pulse rounded" }) })
|
|
15320
15561
|
},
|
|
15321
15562
|
`skeleton-cell-${vc.index}`
|
|
15322
15563
|
)
|
|
15323
15564
|
);
|
|
15324
15565
|
return elements;
|
|
15325
15566
|
}),
|
|
15326
|
-
virtualPaddingRight ? /* @__PURE__ */ (0,
|
|
15567
|
+
virtualPaddingRight ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(
|
|
15327
15568
|
"div",
|
|
15328
15569
|
{
|
|
15329
15570
|
role: "presentation",
|
|
@@ -15338,22 +15579,22 @@ var init_data_grid_root = __esm({
|
|
|
15338
15579
|
});
|
|
15339
15580
|
|
|
15340
15581
|
// src/components/data-grid/components/data-grid-skeleton.tsx
|
|
15341
|
-
var
|
|
15582
|
+
var import_jsx_runtime118, DataGridSkeleton;
|
|
15342
15583
|
var init_data_grid_skeleton = __esm({
|
|
15343
15584
|
"src/components/data-grid/components/data-grid-skeleton.tsx"() {
|
|
15344
15585
|
"use strict";
|
|
15345
15586
|
init_skeleton2();
|
|
15346
|
-
|
|
15587
|
+
import_jsx_runtime118 = require("react/jsx-runtime");
|
|
15347
15588
|
DataGridSkeleton = ({
|
|
15348
15589
|
columns,
|
|
15349
15590
|
rows: rowCount = 10
|
|
15350
15591
|
}) => {
|
|
15351
15592
|
const rows = Array.from({ length: rowCount }, (_, i) => i);
|
|
15352
15593
|
const colCount = columns.length;
|
|
15353
|
-
return /* @__PURE__ */ (0,
|
|
15354
|
-
/* @__PURE__ */ (0,
|
|
15355
|
-
/* @__PURE__ */ (0,
|
|
15356
|
-
/* @__PURE__ */ (0,
|
|
15594
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "bg-ui-bg-subtle size-full", children: [
|
|
15595
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "bg-ui-bg-base border-b p-4", children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { className: "bg-ui-button-neutral h-7 w-[116px] animate-pulse rounded-md" }) }),
|
|
15596
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsxs)("div", { className: "bg-ui-bg-subtle size-full overflow-auto", children: [
|
|
15597
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
15357
15598
|
"div",
|
|
15358
15599
|
{
|
|
15359
15600
|
className: "grid",
|
|
@@ -15361,28 +15602,28 @@ var init_data_grid_skeleton = __esm({
|
|
|
15361
15602
|
gridTemplateColumns: `repeat(${colCount}, 1fr)`
|
|
15362
15603
|
},
|
|
15363
15604
|
children: columns.map((_col, i) => {
|
|
15364
|
-
return /* @__PURE__ */ (0,
|
|
15605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
15365
15606
|
"div",
|
|
15366
15607
|
{
|
|
15367
15608
|
className: "bg-ui-bg-base flex h-10 w-[200px] items-center border-b border-r px-4 py-2.5 last:border-r-0",
|
|
15368
|
-
children: /* @__PURE__ */ (0,
|
|
15609
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Skeleton, { className: "h-[14px] w-[164px]" })
|
|
15369
15610
|
},
|
|
15370
15611
|
i
|
|
15371
15612
|
);
|
|
15372
15613
|
})
|
|
15373
15614
|
}
|
|
15374
15615
|
),
|
|
15375
|
-
/* @__PURE__ */ (0,
|
|
15616
|
+
/* @__PURE__ */ (0, import_jsx_runtime118.jsx)("div", { children: rows.map((_, j) => /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
15376
15617
|
"div",
|
|
15377
15618
|
{
|
|
15378
15619
|
className: "grid",
|
|
15379
15620
|
style: { gridTemplateColumns: `repeat(${colCount}, 1fr)` },
|
|
15380
15621
|
children: columns.map((_col, k) => {
|
|
15381
|
-
return /* @__PURE__ */ (0,
|
|
15622
|
+
return /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(
|
|
15382
15623
|
"div",
|
|
15383
15624
|
{
|
|
15384
15625
|
className: "bg-ui-bg-base flex h-10 w-[200px] items-center border-b border-r px-4 py-2.5 last:border-r-0",
|
|
15385
|
-
children: /* @__PURE__ */ (0,
|
|
15626
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime118.jsx)(Skeleton, { className: "h-[14px] w-[164px]" })
|
|
15386
15627
|
},
|
|
15387
15628
|
k
|
|
15388
15629
|
);
|
|
@@ -15397,17 +15638,17 @@ var init_data_grid_skeleton = __esm({
|
|
|
15397
15638
|
});
|
|
15398
15639
|
|
|
15399
15640
|
// src/components/data-grid/components/data-grid-text-cell.tsx
|
|
15400
|
-
var
|
|
15641
|
+
var import_ui89, import_react99, import_react_hook_form17, import_jsx_runtime119, DataGridTextCell, Inner5;
|
|
15401
15642
|
var init_data_grid_text_cell = __esm({
|
|
15402
15643
|
"src/components/data-grid/components/data-grid-text-cell.tsx"() {
|
|
15403
15644
|
"use strict";
|
|
15404
|
-
|
|
15645
|
+
import_ui89 = require("@acmekit/ui");
|
|
15405
15646
|
import_react99 = require("react");
|
|
15406
15647
|
import_react_hook_form17 = require("react-hook-form");
|
|
15407
15648
|
init_use_combined_refs();
|
|
15408
15649
|
init_hooks2();
|
|
15409
15650
|
init_data_grid_cell_container();
|
|
15410
|
-
|
|
15651
|
+
import_jsx_runtime119 = require("react/jsx-runtime");
|
|
15411
15652
|
DataGridTextCell = ({
|
|
15412
15653
|
context
|
|
15413
15654
|
}) => {
|
|
@@ -15416,13 +15657,13 @@ var init_data_grid_text_cell = __esm({
|
|
|
15416
15657
|
});
|
|
15417
15658
|
const errorProps = useDataGridCellError({ context });
|
|
15418
15659
|
const { container, input } = renderProps;
|
|
15419
|
-
return /* @__PURE__ */ (0,
|
|
15660
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
15420
15661
|
import_react_hook_form17.Controller,
|
|
15421
15662
|
{
|
|
15422
15663
|
control,
|
|
15423
15664
|
name: field,
|
|
15424
15665
|
render: ({ field: field2 }) => {
|
|
15425
|
-
return /* @__PURE__ */ (0,
|
|
15666
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(DataGridCellContainer, { ...container, ...errorProps, children: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Inner5, { field: field2, inputProps: input }) });
|
|
15426
15667
|
}
|
|
15427
15668
|
}
|
|
15428
15669
|
);
|
|
@@ -15439,10 +15680,10 @@ var init_data_grid_text_cell = __esm({
|
|
|
15439
15680
|
setLocalValue(value);
|
|
15440
15681
|
}, [value]);
|
|
15441
15682
|
const combinedRefs = useCombinedRefs(inputRef, ref, inputElRef);
|
|
15442
|
-
return /* @__PURE__ */ (0,
|
|
15683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(
|
|
15443
15684
|
"input",
|
|
15444
15685
|
{
|
|
15445
|
-
className: (0,
|
|
15686
|
+
className: (0, import_ui89.clx)(
|
|
15446
15687
|
"txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer bg-transparent outline-none",
|
|
15447
15688
|
"focus:cursor-text",
|
|
15448
15689
|
"items-center justify-center"
|
|
@@ -15466,11 +15707,11 @@ var init_data_grid_text_cell = __esm({
|
|
|
15466
15707
|
});
|
|
15467
15708
|
|
|
15468
15709
|
// src/components/data-grid/components/data-grid-textarea-modal-cell.tsx
|
|
15469
|
-
var
|
|
15710
|
+
var import_ui90, import_radix_ui16, import_react100, import_react_hook_form18, import_jsx_runtime120, DataGridExpandableTextCell, Inner6;
|
|
15470
15711
|
var init_data_grid_textarea_modal_cell = __esm({
|
|
15471
15712
|
"src/components/data-grid/components/data-grid-textarea-modal-cell.tsx"() {
|
|
15472
15713
|
"use strict";
|
|
15473
|
-
|
|
15714
|
+
import_ui90 = require("@acmekit/ui");
|
|
15474
15715
|
import_radix_ui16 = require("radix-ui");
|
|
15475
15716
|
import_react100 = require("react");
|
|
15476
15717
|
import_react_hook_form18 = require("react-hook-form");
|
|
@@ -15478,7 +15719,7 @@ var init_data_grid_textarea_modal_cell = __esm({
|
|
|
15478
15719
|
init_hooks2();
|
|
15479
15720
|
init_context2();
|
|
15480
15721
|
init_data_grid_cell_container();
|
|
15481
|
-
|
|
15722
|
+
import_jsx_runtime120 = require("react/jsx-runtime");
|
|
15482
15723
|
DataGridExpandableTextCell = ({
|
|
15483
15724
|
context,
|
|
15484
15725
|
fieldLabel
|
|
@@ -15488,13 +15729,13 @@ var init_data_grid_textarea_modal_cell = __esm({
|
|
|
15488
15729
|
});
|
|
15489
15730
|
const errorProps = useDataGridCellError({ context });
|
|
15490
15731
|
const { container, input } = renderProps;
|
|
15491
|
-
return /* @__PURE__ */ (0,
|
|
15732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15492
15733
|
import_react_hook_form18.Controller,
|
|
15493
15734
|
{
|
|
15494
15735
|
control,
|
|
15495
15736
|
name: field,
|
|
15496
15737
|
render: ({ field: field2 }) => {
|
|
15497
|
-
return /* @__PURE__ */ (0,
|
|
15738
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15498
15739
|
Inner6,
|
|
15499
15740
|
{
|
|
15500
15741
|
field: field2,
|
|
@@ -15596,7 +15837,7 @@ var init_data_grid_textarea_modal_cell = __esm({
|
|
|
15596
15837
|
}, []);
|
|
15597
15838
|
const displayValue = localValue || "";
|
|
15598
15839
|
const truncatedValue = displayValue.length > 50 ? `${displayValue.substring(0, 50)}...` : displayValue;
|
|
15599
|
-
return /* @__PURE__ */ (0,
|
|
15840
|
+
return /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
15600
15841
|
import_radix_ui16.Popover.Root,
|
|
15601
15842
|
{
|
|
15602
15843
|
open: isPopoverOpen,
|
|
@@ -15608,18 +15849,18 @@ var init_data_grid_textarea_modal_cell = __esm({
|
|
|
15608
15849
|
}
|
|
15609
15850
|
},
|
|
15610
15851
|
children: [
|
|
15611
|
-
/* @__PURE__ */ (0,
|
|
15612
|
-
/* @__PURE__ */ (0,
|
|
15852
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(DataGridCellContainer, { ...customContainer, ...errorProps, children: [
|
|
15853
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_radix_ui16.Popover.Anchor, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15613
15854
|
"div",
|
|
15614
15855
|
{
|
|
15615
|
-
className: (0,
|
|
15856
|
+
className: (0, import_ui90.clx)(
|
|
15616
15857
|
"txt-compact-small text-ui-fg-subtle flex size-full cursor-pointer items-center justify-center bg-transparent outline-none",
|
|
15617
15858
|
"focus:cursor-text"
|
|
15618
15859
|
),
|
|
15619
|
-
children: /* @__PURE__ */ (0,
|
|
15860
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("span", { className: "w-full truncate text-center", children: truncatedValue })
|
|
15620
15861
|
}
|
|
15621
15862
|
) }),
|
|
15622
|
-
/* @__PURE__ */ (0,
|
|
15863
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15623
15864
|
"input",
|
|
15624
15865
|
{
|
|
15625
15866
|
className: "sr-only",
|
|
@@ -15638,10 +15879,10 @@ var init_data_grid_textarea_modal_cell = __esm({
|
|
|
15638
15879
|
}
|
|
15639
15880
|
)
|
|
15640
15881
|
] }),
|
|
15641
|
-
/* @__PURE__ */ (0,
|
|
15882
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_radix_ui16.Popover.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15642
15883
|
import_radix_ui16.Popover.Content,
|
|
15643
15884
|
{
|
|
15644
|
-
className: (0,
|
|
15885
|
+
className: (0, import_ui90.clx)(
|
|
15645
15886
|
"bg-ui-bg-base shadow-elevation-flyout flex max-h-[80vh] w-[600px] overflow-hidden p-0 outline-none"
|
|
15646
15887
|
),
|
|
15647
15888
|
align: "start",
|
|
@@ -15651,8 +15892,8 @@ var init_data_grid_textarea_modal_cell = __esm({
|
|
|
15651
15892
|
collisionPadding: 24,
|
|
15652
15893
|
onEscapeKeyDown: handlePopoverSave,
|
|
15653
15894
|
onKeyDown: handlePopoverKeyDown,
|
|
15654
|
-
children: /* @__PURE__ */ (0,
|
|
15655
|
-
|
|
15895
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { ref: popoverContentRef, className: "h-full w-full", children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
15896
|
+
import_ui90.Textarea,
|
|
15656
15897
|
{
|
|
15657
15898
|
value: popoverValue,
|
|
15658
15899
|
onChange: (e) => setPopoverValue(e.target.value),
|
|
@@ -15688,12 +15929,12 @@ var init_components = __esm({
|
|
|
15688
15929
|
});
|
|
15689
15930
|
|
|
15690
15931
|
// src/components/data-grid/data-grid.tsx
|
|
15691
|
-
var
|
|
15932
|
+
var import_jsx_runtime121, _DataGrid, DataGrid;
|
|
15692
15933
|
var init_data_grid = __esm({
|
|
15693
15934
|
"src/components/data-grid/data-grid.tsx"() {
|
|
15694
15935
|
"use strict";
|
|
15695
15936
|
init_components();
|
|
15696
|
-
|
|
15937
|
+
import_jsx_runtime121 = require("react/jsx-runtime");
|
|
15697
15938
|
_DataGrid = ({
|
|
15698
15939
|
isLoading,
|
|
15699
15940
|
// Lazy loading props - passed through to DataGridRoot
|
|
@@ -15703,13 +15944,13 @@ var init_data_grid = __esm({
|
|
|
15703
15944
|
hasNextPage,
|
|
15704
15945
|
...props
|
|
15705
15946
|
}) => {
|
|
15706
|
-
return isLoading ? /* @__PURE__ */ (0,
|
|
15947
|
+
return isLoading ? /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
15707
15948
|
DataGridSkeleton,
|
|
15708
15949
|
{
|
|
15709
15950
|
columns: props.columns,
|
|
15710
15951
|
rows: props.data?.length && props.data.length > 0 ? props.data.length : 10
|
|
15711
15952
|
}
|
|
15712
|
-
) : /* @__PURE__ */ (0,
|
|
15953
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime121.jsx)(
|
|
15713
15954
|
DataGridRoot,
|
|
15714
15955
|
{
|
|
15715
15956
|
...props,
|
|
@@ -15772,19 +16013,19 @@ var init_create_data_grid_column_helper = __esm({
|
|
|
15772
16013
|
});
|
|
15773
16014
|
|
|
15774
16015
|
// src/components/common/tax-badge/tax-badge.tsx
|
|
15775
|
-
var import_icons42,
|
|
16016
|
+
var import_icons42, import_ui91, import_react_i18next62, import_jsx_runtime122;
|
|
15776
16017
|
var init_tax_badge = __esm({
|
|
15777
16018
|
"src/components/common/tax-badge/tax-badge.tsx"() {
|
|
15778
16019
|
"use strict";
|
|
15779
16020
|
import_icons42 = require("@acmekit/icons");
|
|
15780
|
-
|
|
15781
|
-
|
|
15782
|
-
|
|
16021
|
+
import_ui91 = require("@acmekit/ui");
|
|
16022
|
+
import_react_i18next62 = require("react-i18next");
|
|
16023
|
+
import_jsx_runtime122 = require("react/jsx-runtime");
|
|
15783
16024
|
}
|
|
15784
16025
|
});
|
|
15785
16026
|
|
|
15786
16027
|
// src/components/data-grid/helpers/create-data-grid-price-columns.tsx
|
|
15787
|
-
var
|
|
16028
|
+
var import_jsx_runtime123;
|
|
15788
16029
|
var init_create_data_grid_price_columns = __esm({
|
|
15789
16030
|
"src/components/data-grid/helpers/create-data-grid-price-columns.tsx"() {
|
|
15790
16031
|
"use strict";
|
|
@@ -15792,7 +16033,7 @@ var init_create_data_grid_price_columns = __esm({
|
|
|
15792
16033
|
init_data_grid_currency_cell();
|
|
15793
16034
|
init_data_grid_readonly_cell();
|
|
15794
16035
|
init_create_data_grid_column_helper();
|
|
15795
|
-
|
|
16036
|
+
import_jsx_runtime123 = require("react/jsx-runtime");
|
|
15796
16037
|
}
|
|
15797
16038
|
});
|
|
15798
16039
|
|
|
@@ -15919,7 +16160,7 @@ function useTranslationsGridColumns({
|
|
|
15919
16160
|
selectedLocale,
|
|
15920
16161
|
dynamicColumnWidth
|
|
15921
16162
|
}) {
|
|
15922
|
-
const { t: t3 } = (0,
|
|
16163
|
+
const { t: t3 } = (0, import_react_i18next63.useTranslation)();
|
|
15923
16164
|
return (0, import_react101.useMemo)(() => {
|
|
15924
16165
|
const selectedLocaleData = availableLocales.find(
|
|
15925
16166
|
(l) => l.locale_code === selectedLocale
|
|
@@ -15933,10 +16174,10 @@ function useTranslationsGridColumns({
|
|
|
15933
16174
|
cell: (context) => {
|
|
15934
16175
|
const row = context.row.original;
|
|
15935
16176
|
if (isEntityRow(row)) {
|
|
15936
|
-
return /* @__PURE__ */ (0,
|
|
16177
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DataGrid.ReadonlyCell, { context });
|
|
15937
16178
|
}
|
|
15938
|
-
return /* @__PURE__ */ (0,
|
|
15939
|
-
|
|
16179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DataGrid.ReadonlyCell, { context, color: "normal", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { className: "flex h-full w-full items-center gap-x-2 overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
16180
|
+
import_ui92.Text,
|
|
15940
16181
|
{
|
|
15941
16182
|
className: "text-ui-fg-subtle truncate",
|
|
15942
16183
|
weight: "plus",
|
|
@@ -15953,18 +16194,18 @@ function useTranslationsGridColumns({
|
|
|
15953
16194
|
id: "original",
|
|
15954
16195
|
name: "original",
|
|
15955
16196
|
size: dynamicColumnWidth,
|
|
15956
|
-
header: () => /* @__PURE__ */ (0,
|
|
16197
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Text, { className: "text-ui-fg-base", weight: "plus", size: "small", children: t3("general.original") }),
|
|
15957
16198
|
disableHiding: true,
|
|
15958
16199
|
cell: (context) => {
|
|
15959
16200
|
const row = context.row.original;
|
|
15960
16201
|
if (isEntityRow(row)) {
|
|
15961
|
-
return /* @__PURE__ */ (0,
|
|
16202
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DataGrid.ReadonlyCell, { context });
|
|
15962
16203
|
}
|
|
15963
16204
|
const entity = entities.find((e) => e.id === row.reference_id);
|
|
15964
16205
|
if (!entity) {
|
|
15965
16206
|
return null;
|
|
15966
16207
|
}
|
|
15967
|
-
return /* @__PURE__ */ (0,
|
|
16208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DataGrid.ReadonlyCell, { color: "normal", context, isMultiLine: true, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Text, { className: "text-ui-fg-subtle", weight: "plus", size: "small", children: entity[row.field_name] }) });
|
|
15968
16209
|
}
|
|
15969
16210
|
})
|
|
15970
16211
|
];
|
|
@@ -15974,13 +16215,13 @@ function useTranslationsGridColumns({
|
|
|
15974
16215
|
id: selectedLocaleData.locale_code,
|
|
15975
16216
|
name: selectedLocaleData.locale.name,
|
|
15976
16217
|
size: dynamicColumnWidth,
|
|
15977
|
-
header: () => /* @__PURE__ */ (0,
|
|
16218
|
+
header: () => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Text, { className: "text-ui-fg-base", weight: "plus", size: "small", children: selectedLocaleData.locale.name }),
|
|
15978
16219
|
cell: (context) => {
|
|
15979
16220
|
const row = context.row.original;
|
|
15980
16221
|
if (isEntityRow(row)) {
|
|
15981
|
-
return /* @__PURE__ */ (0,
|
|
16222
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DataGrid.ReadonlyCell, { context, isMultiLine: true });
|
|
15982
16223
|
}
|
|
15983
|
-
return /* @__PURE__ */ (0,
|
|
16224
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(DataGrid.MultilineCell, { context });
|
|
15984
16225
|
},
|
|
15985
16226
|
field: (context) => {
|
|
15986
16227
|
const row = context.row.original;
|
|
@@ -15996,21 +16237,21 @@ function useTranslationsGridColumns({
|
|
|
15996
16237
|
return columns;
|
|
15997
16238
|
}, [t3, availableLocales, selectedLocale, entities, dynamicColumnWidth]);
|
|
15998
16239
|
}
|
|
15999
|
-
var import_zod9,
|
|
16240
|
+
var import_zod9, import_ui92, import_react101, import_react_hook_form19, import_react_i18next63, import_zod10, import_jsx_runtime124, EntityTranslationsSchema, TranslationsFormSchema, columnHelper6, FIELD_COLUMN_WIDTH, TranslationsEditForm;
|
|
16000
16241
|
var init_translations_edit_form = __esm({
|
|
16001
16242
|
"src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx"() {
|
|
16002
16243
|
"use strict";
|
|
16003
16244
|
import_zod9 = require("@hookform/resolvers/zod");
|
|
16004
|
-
|
|
16245
|
+
import_ui92 = require("@acmekit/ui");
|
|
16005
16246
|
import_react101 = require("react");
|
|
16006
16247
|
import_react_hook_form19 = require("react-hook-form");
|
|
16007
|
-
|
|
16248
|
+
import_react_i18next63 = require("react-i18next");
|
|
16008
16249
|
import_zod10 = require("zod");
|
|
16009
16250
|
init_data_grid2();
|
|
16010
16251
|
init_modals();
|
|
16011
16252
|
init_keybound_form2();
|
|
16012
16253
|
init_translations();
|
|
16013
|
-
|
|
16254
|
+
import_jsx_runtime124 = require("react/jsx-runtime");
|
|
16014
16255
|
EntityTranslationsSchema = import_zod10.z.object({
|
|
16015
16256
|
id: import_zod10.z.string().nullish(),
|
|
16016
16257
|
fields: import_zod10.z.record(import_zod10.z.string().optional())
|
|
@@ -16031,7 +16272,7 @@ var init_translations_edit_form = __esm({
|
|
|
16031
16272
|
isFetchingNextPage,
|
|
16032
16273
|
referenceCount
|
|
16033
16274
|
}) => {
|
|
16034
|
-
const { t: t3 } = (0,
|
|
16275
|
+
const { t: t3 } = (0, import_react_i18next63.useTranslation)();
|
|
16035
16276
|
const { handleSuccess, setCloseOnEscape } = useRouteModal();
|
|
16036
16277
|
const containerRef = (0, import_react101.useRef)(null);
|
|
16037
16278
|
const [dynamicColumnWidth, setDynamicColumnWidth] = (0, import_react101.useState)(400);
|
|
@@ -16159,7 +16400,7 @@ var init_translations_edit_form = __esm({
|
|
|
16159
16400
|
}
|
|
16160
16401
|
const response = await mutateAsync(currentBatch, {
|
|
16161
16402
|
onError: (error) => {
|
|
16162
|
-
|
|
16403
|
+
import_ui92.toast.error(error.message);
|
|
16163
16404
|
}
|
|
16164
16405
|
});
|
|
16165
16406
|
if (response.created) {
|
|
@@ -16184,7 +16425,7 @@ var init_translations_edit_form = __esm({
|
|
|
16184
16425
|
form.reset(savedValues);
|
|
16185
16426
|
return true;
|
|
16186
16427
|
} catch (error) {
|
|
16187
|
-
|
|
16428
|
+
import_ui92.toast.error(
|
|
16188
16429
|
error instanceof Error ? error.message : "Failed to save translations"
|
|
16189
16430
|
);
|
|
16190
16431
|
return false;
|
|
@@ -16237,7 +16478,7 @@ var init_translations_edit_form = __esm({
|
|
|
16237
16478
|
const handleSaveAndSwitch = (0, import_react101.useCallback)(async () => {
|
|
16238
16479
|
const success = await saveCurrentLocale();
|
|
16239
16480
|
if (success && pendingLocale) {
|
|
16240
|
-
|
|
16481
|
+
import_ui92.toast.success(t3("translations.edit.successToast"));
|
|
16241
16482
|
await switchToLocale(pendingLocale);
|
|
16242
16483
|
}
|
|
16243
16484
|
setShowUnsavedPrompt(false);
|
|
@@ -16251,7 +16492,7 @@ var init_translations_edit_form = __esm({
|
|
|
16251
16492
|
async (closeOnSuccess = false) => {
|
|
16252
16493
|
const success = await saveCurrentLocale();
|
|
16253
16494
|
if (success) {
|
|
16254
|
-
|
|
16495
|
+
import_ui92.toast.success(t3("translations.edit.successToast"));
|
|
16255
16496
|
if (closeOnSuccess) {
|
|
16256
16497
|
handleSuccess();
|
|
16257
16498
|
}
|
|
@@ -16263,15 +16504,15 @@ var init_translations_edit_form = __esm({
|
|
|
16263
16504
|
invalidateQueries();
|
|
16264
16505
|
}, [invalidateQueries]);
|
|
16265
16506
|
const isLoading = isPending || isSwitchingLocale;
|
|
16266
|
-
return /* @__PURE__ */ (0,
|
|
16267
|
-
/* @__PURE__ */ (0,
|
|
16507
|
+
return /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(RouteFocusModal.Form, { form, onClose: handleClose, children: [
|
|
16508
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
16268
16509
|
KeyboundForm,
|
|
16269
16510
|
{
|
|
16270
16511
|
onSubmit: () => handleSave(true),
|
|
16271
16512
|
className: "flex h-full flex-col overflow-hidden",
|
|
16272
16513
|
children: [
|
|
16273
|
-
/* @__PURE__ */ (0,
|
|
16274
|
-
/* @__PURE__ */ (0,
|
|
16514
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RouteFocusModal.Header, {}),
|
|
16515
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RouteFocusModal.Body, { className: "size-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)("div", { ref: containerRef, className: "size-full", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
16275
16516
|
DataGrid,
|
|
16276
16517
|
{
|
|
16277
16518
|
showColumnsDropdown: false,
|
|
@@ -16288,17 +16529,17 @@ var init_translations_edit_form = __esm({
|
|
|
16288
16529
|
onFetchMore: fetchNextPage,
|
|
16289
16530
|
isFetchingMore: isFetchingNextPage,
|
|
16290
16531
|
hasNextPage,
|
|
16291
|
-
headerContent: /* @__PURE__ */ (0,
|
|
16292
|
-
|
|
16532
|
+
headerContent: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(
|
|
16533
|
+
import_ui92.Select,
|
|
16293
16534
|
{
|
|
16294
16535
|
disabled: isLoading,
|
|
16295
16536
|
value: selectedLocale,
|
|
16296
16537
|
onValueChange: handleLocaleChange,
|
|
16297
16538
|
size: "small",
|
|
16298
16539
|
children: [
|
|
16299
|
-
/* @__PURE__ */ (0,
|
|
16300
|
-
/* @__PURE__ */ (0,
|
|
16301
|
-
|
|
16540
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Select.Trigger, { className: "bg-ui-bg-base w-[200px]", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Select.Value, { children: selectedLocaleDisplay }) }),
|
|
16541
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Select.Content, { children: availableLocales.map((locale) => /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
16542
|
+
import_ui92.Select.Item,
|
|
16302
16543
|
{
|
|
16303
16544
|
value: locale.locale_code,
|
|
16304
16545
|
children: locale.locale.name
|
|
@@ -16310,9 +16551,9 @@ var init_translations_edit_form = __esm({
|
|
|
16310
16551
|
)
|
|
16311
16552
|
}
|
|
16312
16553
|
) }) }),
|
|
16313
|
-
/* @__PURE__ */ (0,
|
|
16314
|
-
/* @__PURE__ */ (0,
|
|
16315
|
-
|
|
16554
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RouteFocusModal.Footer, { children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)("div", { className: "flex items-center justify-end gap-x-2", children: [
|
|
16555
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(RouteFocusModal.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
16556
|
+
import_ui92.Button,
|
|
16316
16557
|
{
|
|
16317
16558
|
type: "button",
|
|
16318
16559
|
size: "small",
|
|
@@ -16321,8 +16562,8 @@ var init_translations_edit_form = __esm({
|
|
|
16321
16562
|
children: t3("actions.cancel")
|
|
16322
16563
|
}
|
|
16323
16564
|
) }),
|
|
16324
|
-
/* @__PURE__ */ (0,
|
|
16325
|
-
|
|
16565
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
16566
|
+
import_ui92.Button,
|
|
16326
16567
|
{
|
|
16327
16568
|
size: "small",
|
|
16328
16569
|
type: "button",
|
|
@@ -16332,19 +16573,19 @@ var init_translations_edit_form = __esm({
|
|
|
16332
16573
|
children: t3("actions.saveChanges")
|
|
16333
16574
|
}
|
|
16334
16575
|
),
|
|
16335
|
-
/* @__PURE__ */ (0,
|
|
16576
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Button, { size: "small", type: "submit", isLoading, children: t3("actions.saveAndClose") })
|
|
16336
16577
|
] }) })
|
|
16337
16578
|
]
|
|
16338
16579
|
}
|
|
16339
16580
|
),
|
|
16340
|
-
/* @__PURE__ */ (0,
|
|
16341
|
-
/* @__PURE__ */ (0,
|
|
16342
|
-
/* @__PURE__ */ (0,
|
|
16343
|
-
/* @__PURE__ */ (0,
|
|
16581
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Prompt, { open: showUnsavedPrompt, variant: "confirmation", children: /* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_ui92.Prompt.Content, { children: [
|
|
16582
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_ui92.Prompt.Header, { children: [
|
|
16583
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Prompt.Title, { children: t3("translations.edit.unsavedChanges.title") }),
|
|
16584
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(import_ui92.Prompt.Description, { children: t3("translations.edit.unsavedChanges.description") })
|
|
16344
16585
|
] }),
|
|
16345
|
-
/* @__PURE__ */ (0,
|
|
16346
|
-
/* @__PURE__ */ (0,
|
|
16347
|
-
|
|
16586
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsxs)(import_ui92.Prompt.Footer, { children: [
|
|
16587
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
16588
|
+
import_ui92.Button,
|
|
16348
16589
|
{
|
|
16349
16590
|
size: "small",
|
|
16350
16591
|
variant: "secondary",
|
|
@@ -16353,8 +16594,8 @@ var init_translations_edit_form = __esm({
|
|
|
16353
16594
|
children: t3("actions.close")
|
|
16354
16595
|
}
|
|
16355
16596
|
),
|
|
16356
|
-
/* @__PURE__ */ (0,
|
|
16357
|
-
|
|
16597
|
+
/* @__PURE__ */ (0, import_jsx_runtime124.jsx)(
|
|
16598
|
+
import_ui92.Button,
|
|
16358
16599
|
{
|
|
16359
16600
|
size: "small",
|
|
16360
16601
|
onClick: handleSaveAndSwitch,
|
|
@@ -16379,7 +16620,7 @@ var init_translations_edit_form2 = __esm({
|
|
|
16379
16620
|
});
|
|
16380
16621
|
|
|
16381
16622
|
// src/routes/translations/translations-edit/translations-edit.tsx
|
|
16382
|
-
var import_react_query19, import_react102, import_react_router_dom47,
|
|
16623
|
+
var import_react_query19, import_react102, import_react_router_dom47, import_jsx_runtime125, TranslationsEdit;
|
|
16383
16624
|
var init_translations_edit = __esm({
|
|
16384
16625
|
"src/routes/translations/translations-edit/translations-edit.tsx"() {
|
|
16385
16626
|
"use strict";
|
|
@@ -16390,7 +16631,7 @@ var init_translations_edit = __esm({
|
|
|
16390
16631
|
init_api();
|
|
16391
16632
|
init_feature_flag_provider();
|
|
16392
16633
|
init_translations_edit_form2();
|
|
16393
|
-
|
|
16634
|
+
import_jsx_runtime125 = require("react/jsx-runtime");
|
|
16394
16635
|
TranslationsEdit = () => {
|
|
16395
16636
|
const isTranslationsEnabled = useFeatureFlag("translation");
|
|
16396
16637
|
const navigate = (0, import_react_router_dom47.useNavigate)();
|
|
@@ -16434,7 +16675,7 @@ var init_translations_edit = __esm({
|
|
|
16434
16675
|
if (isError || isLocalesError || isTranslationSettingsError) {
|
|
16435
16676
|
throw error || localesError || translationSettingsError;
|
|
16436
16677
|
}
|
|
16437
|
-
return /* @__PURE__ */ (0,
|
|
16678
|
+
return /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(RouteFocusModal, { prev: referenceIdParam.length ? -1 : "..", children: ready && /* @__PURE__ */ (0, import_jsx_runtime125.jsx)(
|
|
16438
16679
|
TranslationsEditForm,
|
|
16439
16680
|
{
|
|
16440
16681
|
translations,
|
|
@@ -16465,18 +16706,18 @@ var init_translations_edit2 = __esm({
|
|
|
16465
16706
|
});
|
|
16466
16707
|
|
|
16467
16708
|
// src/routes/home/home.tsx
|
|
16468
|
-
var
|
|
16709
|
+
var import_ui93, import_react_i18next64, import_jsx_runtime126, Home;
|
|
16469
16710
|
var init_home = __esm({
|
|
16470
16711
|
"src/routes/home/home.tsx"() {
|
|
16471
16712
|
"use strict";
|
|
16472
|
-
|
|
16473
|
-
|
|
16474
|
-
|
|
16713
|
+
import_ui93 = require("@acmekit/ui");
|
|
16714
|
+
import_react_i18next64 = require("react-i18next");
|
|
16715
|
+
import_jsx_runtime126 = require("react/jsx-runtime");
|
|
16475
16716
|
Home = () => {
|
|
16476
|
-
const { t: t3 } = (0,
|
|
16477
|
-
return /* @__PURE__ */ (0,
|
|
16478
|
-
/* @__PURE__ */ (0,
|
|
16479
|
-
/* @__PURE__ */ (0,
|
|
16717
|
+
const { t: t3 } = (0, import_react_i18next64.useTranslation)();
|
|
16718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_ui93.Container, { className: "divide-y p-0", children: /* @__PURE__ */ (0, import_jsx_runtime126.jsxs)("div", { className: "flex flex-col items-center justify-center gap-y-4 px-6 py-16", children: [
|
|
16719
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_ui93.Heading, { level: "h1", children: t3("app.home.welcome", "Welcome") }),
|
|
16720
|
+
/* @__PURE__ */ (0, import_jsx_runtime126.jsx)(import_ui93.Text, { size: "small", className: "text-ui-fg-muted text-center", children: t3(
|
|
16480
16721
|
"app.home.empty",
|
|
16481
16722
|
"Add plugins to your admin to get started. Plugins can add routes, settings, and features."
|
|
16482
16723
|
) })
|
|
@@ -16498,28 +16739,28 @@ var init_home2 = __esm({
|
|
|
16498
16739
|
});
|
|
16499
16740
|
|
|
16500
16741
|
// src/routes/settings/settings.tsx
|
|
16501
|
-
var
|
|
16742
|
+
var import_ui94, import_react_router_dom48, import_react_i18next65, import_jsx_runtime127, Settings2;
|
|
16502
16743
|
var init_settings3 = __esm({
|
|
16503
16744
|
"src/routes/settings/settings.tsx"() {
|
|
16504
16745
|
"use strict";
|
|
16505
|
-
|
|
16746
|
+
import_ui94 = require("@acmekit/ui");
|
|
16506
16747
|
import_react_router_dom48 = require("react-router-dom");
|
|
16507
|
-
|
|
16508
|
-
|
|
16748
|
+
import_react_i18next65 = require("react-i18next");
|
|
16749
|
+
import_jsx_runtime127 = require("react/jsx-runtime");
|
|
16509
16750
|
Settings2 = () => {
|
|
16510
|
-
const { t: t3 } = (0,
|
|
16751
|
+
const { t: t3 } = (0, import_react_i18next65.useTranslation)();
|
|
16511
16752
|
const location = (0, import_react_router_dom48.useLocation)();
|
|
16512
16753
|
const isSettingsIndex = location.pathname === "/settings";
|
|
16513
16754
|
if (isSettingsIndex) {
|
|
16514
|
-
return /* @__PURE__ */ (0,
|
|
16515
|
-
/* @__PURE__ */ (0,
|
|
16516
|
-
/* @__PURE__ */ (0,
|
|
16755
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_ui94.Container, { className: "divide-y p-0", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)("div", { className: "flex flex-col items-center justify-center gap-y-4 px-6 py-16", children: [
|
|
16756
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_ui94.Heading, { level: "h1", children: t3("app.nav.settings.header") }),
|
|
16757
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_ui94.Text, { size: "small", className: "text-ui-fg-muted text-center", children: t3(
|
|
16517
16758
|
"app.settings.empty",
|
|
16518
16759
|
"Add plugins to see settings here. Plugins can register settings under this section."
|
|
16519
16760
|
) })
|
|
16520
16761
|
] }) });
|
|
16521
16762
|
}
|
|
16522
|
-
return /* @__PURE__ */ (0,
|
|
16763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_react_router_dom48.Outlet, {});
|
|
16523
16764
|
};
|
|
16524
16765
|
}
|
|
16525
16766
|
});
|
|
@@ -16538,13 +16779,13 @@ var init_settings4 = __esm({
|
|
|
16538
16779
|
|
|
16539
16780
|
// src/components/common/logo-box/avatar-box.tsx
|
|
16540
16781
|
function AvatarBox({ checked }) {
|
|
16541
|
-
return /* @__PURE__ */ (0,
|
|
16782
|
+
return /* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
16542
16783
|
IconAvatar,
|
|
16543
16784
|
{
|
|
16544
16785
|
size: "xlarge",
|
|
16545
16786
|
className: "bg-ui-button-neutral shadow-buttons-neutral after:button-neutral-gradient relative mb-4 flex h-[50px] w-[50px] items-center justify-center rounded-xl after:inset-0 after:content-['']",
|
|
16546
16787
|
children: [
|
|
16547
|
-
checked && /* @__PURE__ */ (0,
|
|
16788
|
+
checked && /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16548
16789
|
import_react103.motion.div,
|
|
16549
16790
|
{
|
|
16550
16791
|
className: "absolute -right-[5px] -top-1 flex size-5 items-center justify-center rounded-full border-[0.5px] border-[rgba(3,7,18,0.2)] bg-[#3B82F6] bg-gradient-to-b from-white/0 to-white/20 shadow-[0px_1px_2px_0px_rgba(3,7,18,0.12),0px_1px_2px_0px_rgba(255,255,255,0.10)_inset,0px_-1px_5px_0px_rgba(255,255,255,0.10)_inset,0px_0px_0px_0px_rgba(3,7,18,0.06)_inset]",
|
|
@@ -16555,7 +16796,7 @@ function AvatarBox({ checked }) {
|
|
|
16555
16796
|
delay: 0.8,
|
|
16556
16797
|
ease: [0, 0.71, 0.2, 1.01]
|
|
16557
16798
|
},
|
|
16558
|
-
children: /* @__PURE__ */ (0,
|
|
16799
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16559
16800
|
"svg",
|
|
16560
16801
|
{
|
|
16561
16802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16563,7 +16804,7 @@ function AvatarBox({ checked }) {
|
|
|
16563
16804
|
height: "20",
|
|
16564
16805
|
viewBox: "0 0 20 20",
|
|
16565
16806
|
fill: "none",
|
|
16566
|
-
children: /* @__PURE__ */ (0,
|
|
16807
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16567
16808
|
import_react103.motion.path,
|
|
16568
16809
|
{
|
|
16569
16810
|
d: "M5.8335 10.4167L9.16683 13.75L14.1668 6.25",
|
|
@@ -16585,7 +16826,7 @@ function AvatarBox({ checked }) {
|
|
|
16585
16826
|
)
|
|
16586
16827
|
}
|
|
16587
16828
|
),
|
|
16588
|
-
/* @__PURE__ */ (0,
|
|
16829
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
16589
16830
|
"svg",
|
|
16590
16831
|
{
|
|
16591
16832
|
className: "rounded-[10px]",
|
|
@@ -16593,8 +16834,8 @@ function AvatarBox({ checked }) {
|
|
|
16593
16834
|
fill: "none",
|
|
16594
16835
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16595
16836
|
children: [
|
|
16596
|
-
/* @__PURE__ */ (0,
|
|
16597
|
-
/* @__PURE__ */ (0,
|
|
16837
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("rect", { width: "400", height: "400", fill: "#18181B" }),
|
|
16838
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)(
|
|
16598
16839
|
"path",
|
|
16599
16840
|
{
|
|
16600
16841
|
d: "M238.088 51.1218L238.089 51.1223L310.605 92.8101C334.028 106.308 348.526 131.32 347.868 157.953L347.867 157.966V157.978V241.688C347.867 268.68 333.687 293.362 310.271 306.856L310.269 306.858L237.754 348.878C214.336 362.374 185.643 362.374 162.225 348.878L89.7127 306.859C66.6206 293.361 52.1113 268.674 52.1113 241.688V157.978C52.1113 131.326 66.6211 106.307 89.7088 92.8093C89.7101 92.8085 89.7114 92.8078 89.7127 92.807L162.556 51.1233L162.559 51.1218C185.977 37.6261 214.67 37.6261 238.088 51.1218ZM124.634 200C124.634 241.576 158.502 275.372 200.156 275.372C242.142 275.372 276.013 241.578 276.013 200C276.013 158.419 241.805 124.628 200.156 124.628C158.502 124.628 124.634 158.424 124.634 200Z",
|
|
@@ -16603,8 +16844,8 @@ function AvatarBox({ checked }) {
|
|
|
16603
16844
|
strokeWidth: "2"
|
|
16604
16845
|
}
|
|
16605
16846
|
),
|
|
16606
|
-
/* @__PURE__ */ (0,
|
|
16607
|
-
/* @__PURE__ */ (0,
|
|
16847
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)("defs", { children: [
|
|
16848
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
16608
16849
|
"linearGradient",
|
|
16609
16850
|
{
|
|
16610
16851
|
id: "paint0_linear_11869_12671",
|
|
@@ -16614,12 +16855,12 @@ function AvatarBox({ checked }) {
|
|
|
16614
16855
|
y2: "360",
|
|
16615
16856
|
gradientUnits: "userSpaceOnUse",
|
|
16616
16857
|
children: [
|
|
16617
|
-
/* @__PURE__ */ (0,
|
|
16618
|
-
/* @__PURE__ */ (0,
|
|
16858
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("stop", { stopColor: "white" }),
|
|
16859
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0.7" })
|
|
16619
16860
|
]
|
|
16620
16861
|
}
|
|
16621
16862
|
),
|
|
16622
|
-
/* @__PURE__ */ (0,
|
|
16863
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsxs)(
|
|
16623
16864
|
"linearGradient",
|
|
16624
16865
|
{
|
|
16625
16866
|
id: "paint1_linear_11869_12671",
|
|
@@ -16629,8 +16870,8 @@ function AvatarBox({ checked }) {
|
|
|
16629
16870
|
y2: "360",
|
|
16630
16871
|
gradientUnits: "userSpaceOnUse",
|
|
16631
16872
|
children: [
|
|
16632
|
-
/* @__PURE__ */ (0,
|
|
16633
|
-
/* @__PURE__ */ (0,
|
|
16873
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("stop", { stopColor: "white", stopOpacity: "0" }),
|
|
16874
|
+
/* @__PURE__ */ (0, import_jsx_runtime128.jsx)("stop", { offset: "1", stopColor: "white", stopOpacity: "0.7" })
|
|
16634
16875
|
]
|
|
16635
16876
|
}
|
|
16636
16877
|
)
|
|
@@ -16642,33 +16883,33 @@ function AvatarBox({ checked }) {
|
|
|
16642
16883
|
}
|
|
16643
16884
|
);
|
|
16644
16885
|
}
|
|
16645
|
-
var import_react103,
|
|
16886
|
+
var import_react103, import_jsx_runtime128;
|
|
16646
16887
|
var init_avatar_box = __esm({
|
|
16647
16888
|
"src/components/common/logo-box/avatar-box.tsx"() {
|
|
16648
16889
|
"use strict";
|
|
16649
16890
|
import_react103 = require("motion/react");
|
|
16650
16891
|
init_icon_avatar2();
|
|
16651
|
-
|
|
16892
|
+
import_jsx_runtime128 = require("react/jsx-runtime");
|
|
16652
16893
|
}
|
|
16653
16894
|
});
|
|
16654
16895
|
|
|
16655
16896
|
// src/routes/login/components/cloud-auth-login.tsx
|
|
16656
|
-
var import_icons43,
|
|
16897
|
+
var import_icons43, import_ui95, import_react104, import_react_i18next66, import_react_jwt, import_react_router_dom49, import_jsx_runtime129, CLOUD_AUTH_PROVIDER, CloudAuthLogin, useHandleLogin, useAuthCallback;
|
|
16657
16898
|
var init_cloud_auth_login = __esm({
|
|
16658
16899
|
"src/routes/login/components/cloud-auth-login.tsx"() {
|
|
16659
16900
|
"use strict";
|
|
16660
16901
|
import_icons43 = require("@acmekit/icons");
|
|
16661
|
-
|
|
16902
|
+
import_ui95 = require("@acmekit/ui");
|
|
16662
16903
|
import_react104 = require("react");
|
|
16663
|
-
|
|
16904
|
+
import_react_i18next66 = require("react-i18next");
|
|
16664
16905
|
import_react_jwt = require("react-jwt");
|
|
16665
16906
|
import_react_router_dom49 = require("react-router-dom");
|
|
16666
16907
|
init_cloud();
|
|
16667
16908
|
init_client2();
|
|
16668
|
-
|
|
16909
|
+
import_jsx_runtime129 = require("react/jsx-runtime");
|
|
16669
16910
|
CLOUD_AUTH_PROVIDER = "cloud";
|
|
16670
16911
|
CloudAuthLogin = () => {
|
|
16671
|
-
const { t: t3 } = (0,
|
|
16912
|
+
const { t: t3 } = (0, import_react_i18next66.useTranslation)();
|
|
16672
16913
|
const [searchParams] = (0, import_react_router_dom49.useSearchParams)();
|
|
16673
16914
|
const { data: cloudAuth } = useCloudAuthEnabled();
|
|
16674
16915
|
const isAutoLogin = searchParams.get("auth_provider") === CLOUD_AUTH_PROVIDER && searchParams.get("auto") === "true";
|
|
@@ -16689,15 +16930,15 @@ var init_cloud_auth_login = __esm({
|
|
|
16689
16930
|
}
|
|
16690
16931
|
}, [isAutoLogin, isCallback, handleLogin, handleCallback]);
|
|
16691
16932
|
if (isAutoLogin || isCallback) {
|
|
16692
|
-
return /* @__PURE__ */ (0,
|
|
16933
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsx)("div", { className: "bg-ui-bg-subtle fixed inset-0 z-50 flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons43.Spinner, { className: "text-ui-fg-subtle animate-spin" }) });
|
|
16693
16934
|
}
|
|
16694
16935
|
if (!cloudAuth?.enabled) {
|
|
16695
16936
|
return null;
|
|
16696
16937
|
}
|
|
16697
|
-
return /* @__PURE__ */ (0,
|
|
16698
|
-
/* @__PURE__ */ (0,
|
|
16699
|
-
/* @__PURE__ */ (0,
|
|
16700
|
-
|
|
16938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime129.jsxs)(import_jsx_runtime129.Fragment, { children: [
|
|
16939
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)("hr", { className: "bg-ui-border-base my-4" }),
|
|
16940
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
16941
|
+
import_ui95.Button,
|
|
16701
16942
|
{
|
|
16702
16943
|
variant: "secondary",
|
|
16703
16944
|
onClick: handleLogin,
|
|
@@ -16710,7 +16951,7 @@ var init_cloud_auth_login = __esm({
|
|
|
16710
16951
|
] });
|
|
16711
16952
|
};
|
|
16712
16953
|
useHandleLogin = (isAutoLogin) => {
|
|
16713
|
-
const { t: t3 } = (0,
|
|
16954
|
+
const { t: t3 } = (0, import_react_i18next66.useTranslation)();
|
|
16714
16955
|
const navigate = (0, import_react_router_dom49.useNavigate)();
|
|
16715
16956
|
const [isPending, setIsPending] = (0, import_react104.useState)(false);
|
|
16716
16957
|
const handleLogin = (0, import_react104.useCallback)(async () => {
|
|
@@ -16726,7 +16967,7 @@ var init_cloud_auth_login = __esm({
|
|
|
16726
16967
|
}
|
|
16727
16968
|
throw new Error("Unexpected login response");
|
|
16728
16969
|
} catch {
|
|
16729
|
-
|
|
16970
|
+
import_ui95.toast.error(t3("auth.login.authenticationFailed"));
|
|
16730
16971
|
if (isAutoLogin) {
|
|
16731
16972
|
navigate("/login");
|
|
16732
16973
|
}
|
|
@@ -16736,7 +16977,7 @@ var init_cloud_auth_login = __esm({
|
|
|
16736
16977
|
return { handleLogin, isLoginPending: isPending };
|
|
16737
16978
|
};
|
|
16738
16979
|
useAuthCallback = (searchParams) => {
|
|
16739
|
-
const { t: t3 } = (0,
|
|
16980
|
+
const { t: t3 } = (0, import_react_i18next66.useTranslation)();
|
|
16740
16981
|
const navigate = (0, import_react_router_dom49.useNavigate)();
|
|
16741
16982
|
const { mutateAsync: createCloudAuthUser } = useCreateCloudAuthUser();
|
|
16742
16983
|
const [isPending, setIsPending] = (0, import_react104.useState)(false);
|
|
@@ -16764,7 +17005,7 @@ var init_cloud_auth_login = __esm({
|
|
|
16764
17005
|
}
|
|
16765
17006
|
navigate("/");
|
|
16766
17007
|
} catch (error) {
|
|
16767
|
-
|
|
17008
|
+
import_ui95.toast.error(t3("auth.login.authenticationFailed"));
|
|
16768
17009
|
navigate("/login");
|
|
16769
17010
|
}
|
|
16770
17011
|
setIsPending(false);
|
|
@@ -16775,14 +17016,14 @@ var init_cloud_auth_login = __esm({
|
|
|
16775
17016
|
});
|
|
16776
17017
|
|
|
16777
17018
|
// src/routes/login/login.tsx
|
|
16778
|
-
var import_zod11,
|
|
17019
|
+
var import_zod11, import_ui96, import_react_hook_form20, import_react_i18next67, import_react_router_dom50, z3, import_jsx_runtime130, LoginSchema, Login;
|
|
16779
17020
|
var init_login = __esm({
|
|
16780
17021
|
"src/routes/login/login.tsx"() {
|
|
16781
17022
|
"use strict";
|
|
16782
17023
|
import_zod11 = require("@hookform/resolvers/zod");
|
|
16783
|
-
|
|
17024
|
+
import_ui96 = require("@acmekit/ui");
|
|
16784
17025
|
import_react_hook_form20 = require("react-hook-form");
|
|
16785
|
-
|
|
17026
|
+
import_react_i18next67 = require("react-i18next");
|
|
16786
17027
|
import_react_router_dom50 = require("react-router-dom");
|
|
16787
17028
|
z3 = __toESM(require("zod"));
|
|
16788
17029
|
init_form2();
|
|
@@ -16791,13 +17032,13 @@ var init_login = __esm({
|
|
|
16791
17032
|
init_is_fetch_error();
|
|
16792
17033
|
init_extension_provider2();
|
|
16793
17034
|
init_cloud_auth_login();
|
|
16794
|
-
|
|
17035
|
+
import_jsx_runtime130 = require("react/jsx-runtime");
|
|
16795
17036
|
LoginSchema = z3.object({
|
|
16796
17037
|
email: z3.string().email(),
|
|
16797
17038
|
password: z3.string()
|
|
16798
17039
|
});
|
|
16799
17040
|
Login = () => {
|
|
16800
|
-
const { t: t3 } = (0,
|
|
17041
|
+
const { t: t3 } = (0, import_react_i18next67.useTranslation)();
|
|
16801
17042
|
const location = (0, import_react_router_dom50.useLocation)();
|
|
16802
17043
|
const navigate = (0, import_react_router_dom50.useNavigate)();
|
|
16803
17044
|
const { getWidgets } = useExtension();
|
|
@@ -16840,31 +17081,31 @@ var init_login = __esm({
|
|
|
16840
17081
|
});
|
|
16841
17082
|
const serverError = form.formState.errors?.root?.serverError?.message;
|
|
16842
17083
|
const validationError = form.formState.errors.email?.message || form.formState.errors.password?.message;
|
|
16843
|
-
return /* @__PURE__ */ (0,
|
|
16844
|
-
/* @__PURE__ */ (0,
|
|
16845
|
-
/* @__PURE__ */ (0,
|
|
16846
|
-
/* @__PURE__ */ (0,
|
|
16847
|
-
/* @__PURE__ */ (0,
|
|
17084
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: [
|
|
17085
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(AvatarBox, {}),
|
|
17086
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
|
|
17087
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_ui96.Heading, { children: t3("login.title") }),
|
|
17088
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_ui96.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t3("login.hint") })
|
|
16848
17089
|
] }),
|
|
16849
|
-
/* @__PURE__ */ (0,
|
|
17090
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex w-full flex-col gap-y-3", children: [
|
|
16850
17091
|
getWidgets("login.before").map((Component, i) => {
|
|
16851
|
-
return /* @__PURE__ */ (0,
|
|
17092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Component, {}, i);
|
|
16852
17093
|
}),
|
|
16853
|
-
/* @__PURE__ */ (0,
|
|
17094
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(
|
|
16854
17095
|
"form",
|
|
16855
17096
|
{
|
|
16856
17097
|
onSubmit: handleSubmit,
|
|
16857
17098
|
className: "flex w-full flex-col gap-y-6",
|
|
16858
17099
|
children: [
|
|
16859
|
-
/* @__PURE__ */ (0,
|
|
16860
|
-
/* @__PURE__ */ (0,
|
|
17100
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsxs)("div", { className: "flex flex-col gap-y-1", children: [
|
|
17101
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16861
17102
|
Form.Field,
|
|
16862
17103
|
{
|
|
16863
17104
|
control: form.control,
|
|
16864
17105
|
name: "email",
|
|
16865
17106
|
render: ({ field }) => {
|
|
16866
|
-
return /* @__PURE__ */ (0,
|
|
16867
|
-
|
|
17107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
17108
|
+
import_ui96.Input,
|
|
16868
17109
|
{
|
|
16869
17110
|
autoComplete: "email",
|
|
16870
17111
|
...field,
|
|
@@ -16875,16 +17116,16 @@ var init_login = __esm({
|
|
|
16875
17116
|
}
|
|
16876
17117
|
}
|
|
16877
17118
|
),
|
|
16878
|
-
/* @__PURE__ */ (0,
|
|
17119
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16879
17120
|
Form.Field,
|
|
16880
17121
|
{
|
|
16881
17122
|
control: form.control,
|
|
16882
17123
|
name: "password",
|
|
16883
17124
|
render: ({ field }) => {
|
|
16884
|
-
return /* @__PURE__ */ (0,
|
|
16885
|
-
/* @__PURE__ */ (0,
|
|
16886
|
-
/* @__PURE__ */ (0,
|
|
16887
|
-
|
|
17125
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsxs)(Form.Item, { children: [
|
|
17126
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Form.Label, {}),
|
|
17127
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
17128
|
+
import_ui96.Input,
|
|
16888
17129
|
{
|
|
16889
17130
|
type: "password",
|
|
16890
17131
|
autoComplete: "current-password",
|
|
@@ -16898,9 +17139,9 @@ var init_login = __esm({
|
|
|
16898
17139
|
}
|
|
16899
17140
|
)
|
|
16900
17141
|
] }),
|
|
16901
|
-
validationError && /* @__PURE__ */ (0,
|
|
16902
|
-
serverError && /* @__PURE__ */ (0,
|
|
16903
|
-
|
|
17142
|
+
validationError && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)("div", { className: "text-center", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_ui96.Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
|
|
17143
|
+
serverError && /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
17144
|
+
import_ui96.Alert,
|
|
16904
17145
|
{
|
|
16905
17146
|
className: "bg-ui-bg-base items-center p-2",
|
|
16906
17147
|
dismissible: true,
|
|
@@ -16908,22 +17149,22 @@ var init_login = __esm({
|
|
|
16908
17149
|
children: serverError
|
|
16909
17150
|
}
|
|
16910
17151
|
),
|
|
16911
|
-
/* @__PURE__ */ (0,
|
|
17152
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(import_ui96.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t3("actions.continueWithEmail") })
|
|
16912
17153
|
]
|
|
16913
17154
|
}
|
|
16914
17155
|
) }),
|
|
16915
17156
|
[...getWidgets("login.after"), CloudAuthLogin].map(
|
|
16916
17157
|
(Component, i) => {
|
|
16917
|
-
return /* @__PURE__ */ (0,
|
|
17158
|
+
return /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(Component, {}, i);
|
|
16918
17159
|
}
|
|
16919
17160
|
)
|
|
16920
17161
|
] }),
|
|
16921
|
-
/* @__PURE__ */ (0,
|
|
16922
|
-
|
|
17162
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)("span", { className: "text-ui-fg-muted txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
17163
|
+
import_react_i18next67.Trans,
|
|
16923
17164
|
{
|
|
16924
17165
|
i18nKey: "login.forgotPassword",
|
|
16925
17166
|
components: [
|
|
16926
|
-
/* @__PURE__ */ (0,
|
|
17167
|
+
/* @__PURE__ */ (0, import_jsx_runtime130.jsx)(
|
|
16927
17168
|
import_react_router_dom50.Link,
|
|
16928
17169
|
{
|
|
16929
17170
|
to: "/reset-password",
|
|
@@ -16952,13 +17193,13 @@ var init_login2 = __esm({
|
|
|
16952
17193
|
});
|
|
16953
17194
|
|
|
16954
17195
|
// src/components/common/logo-box/logo-box.tsx
|
|
16955
|
-
var
|
|
17196
|
+
var import_ui97, import_react105, import_jsx_runtime131, LogoBox;
|
|
16956
17197
|
var init_logo_box = __esm({
|
|
16957
17198
|
"src/components/common/logo-box/logo-box.tsx"() {
|
|
16958
17199
|
"use strict";
|
|
16959
|
-
|
|
17200
|
+
import_ui97 = require("@acmekit/ui");
|
|
16960
17201
|
import_react105 = require("motion/react");
|
|
16961
|
-
|
|
17202
|
+
import_jsx_runtime131 = require("react/jsx-runtime");
|
|
16962
17203
|
LogoBox = ({
|
|
16963
17204
|
className,
|
|
16964
17205
|
checked,
|
|
@@ -16973,23 +17214,23 @@ var init_logo_box = __esm({
|
|
|
16973
17214
|
ease: [0.1, 0.8, 0.2, 1.01]
|
|
16974
17215
|
}
|
|
16975
17216
|
}) => {
|
|
16976
|
-
return /* @__PURE__ */ (0,
|
|
17217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime131.jsxs)(
|
|
16977
17218
|
"div",
|
|
16978
17219
|
{
|
|
16979
|
-
className: (0,
|
|
17220
|
+
className: (0, import_ui97.clx)(
|
|
16980
17221
|
"size-14 bg-ui-button-neutral shadow-buttons-neutral relative flex items-center justify-center rounded-xl",
|
|
16981
17222
|
"after:button-neutral-gradient after:inset-0 after:content-['']",
|
|
16982
17223
|
className
|
|
16983
17224
|
),
|
|
16984
17225
|
children: [
|
|
16985
|
-
checked && /* @__PURE__ */ (0,
|
|
17226
|
+
checked && /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
16986
17227
|
import_react105.motion.div,
|
|
16987
17228
|
{
|
|
16988
17229
|
className: "size-5 absolute -right-[5px] -top-1 flex items-center justify-center rounded-full border-[0.5px] border-[rgba(3,7,18,0.2)] bg-[#3B82F6] bg-gradient-to-b from-white/0 to-white/20 shadow-[0px_1px_2px_0px_rgba(3,7,18,0.12),0px_1px_2px_0px_rgba(255,255,255,0.10)_inset,0px_-1px_5px_0px_rgba(255,255,255,0.10)_inset,0px_0px_0px_0px_rgba(3,7,18,0.06)_inset]",
|
|
16989
17230
|
initial: { opacity: 0, scale: 0.5 },
|
|
16990
17231
|
animate: { opacity: 1, scale: 1 },
|
|
16991
17232
|
transition: containerTransition,
|
|
16992
|
-
children: /* @__PURE__ */ (0,
|
|
17233
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
16993
17234
|
"svg",
|
|
16994
17235
|
{
|
|
16995
17236
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -16997,7 +17238,7 @@ var init_logo_box = __esm({
|
|
|
16997
17238
|
height: "20",
|
|
16998
17239
|
viewBox: "0 0 20 20",
|
|
16999
17240
|
fill: "none",
|
|
17000
|
-
children: /* @__PURE__ */ (0,
|
|
17241
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17001
17242
|
import_react105.motion.path,
|
|
17002
17243
|
{
|
|
17003
17244
|
d: "M5.8335 10.4167L9.16683 13.75L14.1668 6.25",
|
|
@@ -17014,7 +17255,7 @@ var init_logo_box = __esm({
|
|
|
17014
17255
|
)
|
|
17015
17256
|
}
|
|
17016
17257
|
),
|
|
17017
|
-
/* @__PURE__ */ (0,
|
|
17258
|
+
/* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17018
17259
|
"svg",
|
|
17019
17260
|
{
|
|
17020
17261
|
width: "36",
|
|
@@ -17022,7 +17263,7 @@ var init_logo_box = __esm({
|
|
|
17022
17263
|
viewBox: "0 0 36 38",
|
|
17023
17264
|
fill: "none",
|
|
17024
17265
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17025
|
-
children: /* @__PURE__ */ (0,
|
|
17266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime131.jsx)(
|
|
17026
17267
|
"path",
|
|
17027
17268
|
{
|
|
17028
17269
|
d: "M30.85 6.16832L22.2453 1.21782C19.4299 -0.405941 15.9801 -0.405941 13.1648 1.21782L4.52043 6.16832C1.74473 7.79208 0 10.802 0 14.0099V23.9505C0 27.198 1.74473 30.1683 4.52043 31.7921L13.1251 36.7822C15.9405 38.4059 19.3903 38.4059 22.2056 36.7822L30.8103 31.7921C33.6257 30.1683 35.3307 27.198 35.3307 23.9505V14.0099C35.41 10.802 33.6653 7.79208 30.85 6.16832ZM17.6852 27.8317C12.8079 27.8317 8.8426 23.8713 8.8426 19C8.8426 14.1287 12.8079 10.1683 17.6852 10.1683C22.5625 10.1683 26.5674 14.1287 26.5674 19C26.5674 23.8713 22.6022 27.8317 17.6852 27.8317Z",
|
|
@@ -17048,14 +17289,14 @@ var init_logo_box2 = __esm({
|
|
|
17048
17289
|
});
|
|
17049
17290
|
|
|
17050
17291
|
// src/routes/reset-password/reset-password.tsx
|
|
17051
|
-
var import_zod12,
|
|
17292
|
+
var import_zod12, import_ui98, import_react_hook_form21, import_react_i18next68, import_react_router_dom51, z4, import_react106, import_react_jwt2, import_jsx_runtime132, ResetPasswordInstructionsSchema, ResetPasswordSchema, ResetPasswordTokenSchema, validateDecodedResetPasswordToken, InvalidResetToken, ChooseNewPassword, ResetPassword;
|
|
17052
17293
|
var init_reset_password = __esm({
|
|
17053
17294
|
"src/routes/reset-password/reset-password.tsx"() {
|
|
17054
17295
|
"use strict";
|
|
17055
17296
|
import_zod12 = require("@hookform/resolvers/zod");
|
|
17056
|
-
|
|
17297
|
+
import_ui98 = require("@acmekit/ui");
|
|
17057
17298
|
import_react_hook_form21 = require("react-hook-form");
|
|
17058
|
-
|
|
17299
|
+
import_react_i18next68 = require("react-i18next");
|
|
17059
17300
|
import_react_router_dom51 = require("react-router-dom");
|
|
17060
17301
|
z4 = __toESM(require("zod"));
|
|
17061
17302
|
import_react106 = require("react");
|
|
@@ -17064,7 +17305,7 @@ var init_reset_password = __esm({
|
|
|
17064
17305
|
init_logo_box2();
|
|
17065
17306
|
init_i18n2();
|
|
17066
17307
|
init_auth();
|
|
17067
|
-
|
|
17308
|
+
import_jsx_runtime132 = require("react/jsx-runtime");
|
|
17068
17309
|
ResetPasswordInstructionsSchema = z4.object({
|
|
17069
17310
|
email: z4.string().email()
|
|
17070
17311
|
});
|
|
@@ -17090,16 +17331,16 @@ var init_reset_password = __esm({
|
|
|
17090
17331
|
return ResetPasswordTokenSchema.safeParse(decoded).success;
|
|
17091
17332
|
};
|
|
17092
17333
|
InvalidResetToken = () => {
|
|
17093
|
-
const { t: t3 } = (0,
|
|
17334
|
+
const { t: t3 } = (0, import_react_i18next68.useTranslation)();
|
|
17094
17335
|
const navigate = (0, import_react_router_dom51.useNavigate)();
|
|
17095
|
-
return /* @__PURE__ */ (0,
|
|
17096
|
-
/* @__PURE__ */ (0,
|
|
17097
|
-
/* @__PURE__ */ (0,
|
|
17098
|
-
/* @__PURE__ */ (0,
|
|
17099
|
-
/* @__PURE__ */ (0,
|
|
17336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
|
|
17337
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(LogoBox, { className: "mb-4" }),
|
|
17338
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "mb-6 flex flex-col items-center", children: [
|
|
17339
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Heading, { children: t3("resetPassword.invalidLinkTitle") }),
|
|
17340
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t3("resetPassword.invalidLinkHint") })
|
|
17100
17341
|
] }),
|
|
17101
|
-
/* @__PURE__ */ (0,
|
|
17102
|
-
|
|
17342
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17343
|
+
import_ui98.Button,
|
|
17103
17344
|
{
|
|
17104
17345
|
onClick: () => navigate("/reset-password", { replace: true }),
|
|
17105
17346
|
className: "w-full",
|
|
@@ -17107,12 +17348,12 @@ var init_reset_password = __esm({
|
|
|
17107
17348
|
children: t3("resetPassword.goToResetPassword")
|
|
17108
17349
|
}
|
|
17109
17350
|
) }),
|
|
17110
|
-
/* @__PURE__ */ (0,
|
|
17111
|
-
|
|
17351
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17352
|
+
import_react_i18next68.Trans,
|
|
17112
17353
|
{
|
|
17113
17354
|
i18nKey: "resetPassword.backToLogin",
|
|
17114
17355
|
components: [
|
|
17115
|
-
/* @__PURE__ */ (0,
|
|
17356
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17116
17357
|
import_react_router_dom51.Link,
|
|
17117
17358
|
{
|
|
17118
17359
|
to: "/login",
|
|
@@ -17126,7 +17367,7 @@ var init_reset_password = __esm({
|
|
|
17126
17367
|
] }) });
|
|
17127
17368
|
};
|
|
17128
17369
|
ChooseNewPassword = ({ token }) => {
|
|
17129
|
-
const { t: t3 } = (0,
|
|
17370
|
+
const { t: t3 } = (0, import_react_i18next68.useTranslation)();
|
|
17130
17371
|
const [showAlert, setShowAlert] = (0, import_react106.useState)(false);
|
|
17131
17372
|
const invite = token ? (0, import_react_jwt2.decodeToken)(token) : null;
|
|
17132
17373
|
const isValidResetPasswordToken = invite && validateDecodedResetPasswordToken(invite);
|
|
@@ -17153,37 +17394,37 @@ var init_reset_password = __esm({
|
|
|
17153
17394
|
setShowAlert(true);
|
|
17154
17395
|
},
|
|
17155
17396
|
onError: (error) => {
|
|
17156
|
-
|
|
17397
|
+
import_ui98.toast.error(error.message);
|
|
17157
17398
|
}
|
|
17158
17399
|
}
|
|
17159
17400
|
);
|
|
17160
17401
|
});
|
|
17161
17402
|
if (!isValidResetPasswordToken) {
|
|
17162
|
-
return /* @__PURE__ */ (0,
|
|
17403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(InvalidResetToken, {});
|
|
17163
17404
|
}
|
|
17164
|
-
return /* @__PURE__ */ (0,
|
|
17165
|
-
/* @__PURE__ */ (0,
|
|
17166
|
-
/* @__PURE__ */ (0,
|
|
17167
|
-
/* @__PURE__ */ (0,
|
|
17168
|
-
/* @__PURE__ */ (0,
|
|
17405
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "bg-ui-bg-subtle flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "m-4 flex w-full max-w-[280px] flex-col items-center", children: [
|
|
17406
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(LogoBox, { className: "mb-4" }),
|
|
17407
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "mb-6 flex flex-col items-center", children: [
|
|
17408
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Heading, { children: t3("resetPassword.resetPassword") }),
|
|
17409
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t3("resetPassword.newPasswordHint") })
|
|
17169
17410
|
] }),
|
|
17170
|
-
/* @__PURE__ */ (0,
|
|
17411
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
17171
17412
|
"form",
|
|
17172
17413
|
{
|
|
17173
17414
|
onSubmit: handleSubmit,
|
|
17174
17415
|
className: "flex w-full flex-col gap-y-6",
|
|
17175
17416
|
children: [
|
|
17176
|
-
/* @__PURE__ */ (0,
|
|
17177
|
-
/* @__PURE__ */ (0,
|
|
17178
|
-
/* @__PURE__ */ (0,
|
|
17417
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col gap-y-4", children: [
|
|
17418
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Input, { type: "email", disabled: true, value: invite?.entity_id }),
|
|
17419
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17179
17420
|
Form.Field,
|
|
17180
17421
|
{
|
|
17181
17422
|
control: form.control,
|
|
17182
17423
|
name: "password",
|
|
17183
17424
|
render: ({ field }) => {
|
|
17184
|
-
return /* @__PURE__ */ (0,
|
|
17185
|
-
/* @__PURE__ */ (0,
|
|
17186
|
-
|
|
17425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Form.Item, { children: [
|
|
17426
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17427
|
+
import_ui98.Input,
|
|
17187
17428
|
{
|
|
17188
17429
|
autoComplete: "new-password",
|
|
17189
17430
|
type: "password",
|
|
@@ -17191,20 +17432,20 @@ var init_reset_password = __esm({
|
|
|
17191
17432
|
placeholder: t3("resetPassword.newPassword")
|
|
17192
17433
|
}
|
|
17193
17434
|
) }),
|
|
17194
|
-
/* @__PURE__ */ (0,
|
|
17435
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form.ErrorMessage, {})
|
|
17195
17436
|
] });
|
|
17196
17437
|
}
|
|
17197
17438
|
}
|
|
17198
17439
|
),
|
|
17199
|
-
/* @__PURE__ */ (0,
|
|
17440
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17200
17441
|
Form.Field,
|
|
17201
17442
|
{
|
|
17202
17443
|
control: form.control,
|
|
17203
17444
|
name: "repeat_password",
|
|
17204
17445
|
render: ({ field }) => {
|
|
17205
|
-
return /* @__PURE__ */ (0,
|
|
17206
|
-
/* @__PURE__ */ (0,
|
|
17207
|
-
|
|
17446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Form.Item, { children: [
|
|
17447
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17448
|
+
import_ui98.Input,
|
|
17208
17449
|
{
|
|
17209
17450
|
autoComplete: "off",
|
|
17210
17451
|
type: "password",
|
|
@@ -17212,26 +17453,26 @@ var init_reset_password = __esm({
|
|
|
17212
17453
|
placeholder: t3("resetPassword.repeatNewPassword")
|
|
17213
17454
|
}
|
|
17214
17455
|
) }),
|
|
17215
|
-
/* @__PURE__ */ (0,
|
|
17456
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form.ErrorMessage, {})
|
|
17216
17457
|
] });
|
|
17217
17458
|
}
|
|
17218
17459
|
}
|
|
17219
17460
|
)
|
|
17220
17461
|
] }),
|
|
17221
|
-
showAlert && /* @__PURE__ */ (0,
|
|
17222
|
-
/* @__PURE__ */ (0,
|
|
17223
|
-
/* @__PURE__ */ (0,
|
|
17462
|
+
showAlert && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Alert, { dismissible: true, variant: "success", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col", children: [
|
|
17463
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-ui-fg-base mb-1", children: t3("resetPassword.successfulResetTitle") }),
|
|
17464
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { children: t3("resetPassword.successfulReset") })
|
|
17224
17465
|
] }) }),
|
|
17225
|
-
!showAlert && /* @__PURE__ */ (0,
|
|
17466
|
+
!showAlert && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t3("resetPassword.resetPassword") })
|
|
17226
17467
|
]
|
|
17227
17468
|
}
|
|
17228
17469
|
) }) }),
|
|
17229
|
-
/* @__PURE__ */ (0,
|
|
17230
|
-
|
|
17470
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17471
|
+
import_react_i18next68.Trans,
|
|
17231
17472
|
{
|
|
17232
17473
|
i18nKey: "resetPassword.backToLogin",
|
|
17233
17474
|
components: [
|
|
17234
|
-
/* @__PURE__ */ (0,
|
|
17475
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17235
17476
|
import_react_router_dom51.Link,
|
|
17236
17477
|
{
|
|
17237
17478
|
to: "/login",
|
|
@@ -17245,7 +17486,7 @@ var init_reset_password = __esm({
|
|
|
17245
17486
|
] }) });
|
|
17246
17487
|
};
|
|
17247
17488
|
ResetPassword = () => {
|
|
17248
|
-
const { t: t3 } = (0,
|
|
17489
|
+
const { t: t3 } = (0, import_react_i18next68.useTranslation)();
|
|
17249
17490
|
const [searchParams] = (0, import_react_router_dom51.useSearchParams)();
|
|
17250
17491
|
const [showAlert, setShowAlert] = (0, import_react106.useState)(false);
|
|
17251
17492
|
const token = searchParams.get("token");
|
|
@@ -17267,60 +17508,60 @@ var init_reset_password = __esm({
|
|
|
17267
17508
|
setShowAlert(true);
|
|
17268
17509
|
},
|
|
17269
17510
|
onError: (error) => {
|
|
17270
|
-
|
|
17511
|
+
import_ui98.toast.error(error.message);
|
|
17271
17512
|
}
|
|
17272
17513
|
}
|
|
17273
17514
|
);
|
|
17274
17515
|
});
|
|
17275
17516
|
if (token) {
|
|
17276
|
-
return /* @__PURE__ */ (0,
|
|
17517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(ChooseNewPassword, { token });
|
|
17277
17518
|
}
|
|
17278
|
-
return /* @__PURE__ */ (0,
|
|
17279
|
-
/* @__PURE__ */ (0,
|
|
17280
|
-
/* @__PURE__ */ (0,
|
|
17281
|
-
/* @__PURE__ */ (0,
|
|
17282
|
-
/* @__PURE__ */ (0,
|
|
17519
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
|
|
17520
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(LogoBox, { className: "mb-4" }),
|
|
17521
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
|
|
17522
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Heading, { children: t3("resetPassword.resetPassword") }),
|
|
17523
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t3("resetPassword.hint") })
|
|
17283
17524
|
] }),
|
|
17284
|
-
/* @__PURE__ */ (0,
|
|
17525
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "flex w-full flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(
|
|
17285
17526
|
"form",
|
|
17286
17527
|
{
|
|
17287
17528
|
onSubmit: handleSubmit,
|
|
17288
17529
|
className: "flex w-full flex-col gap-y-6",
|
|
17289
17530
|
children: [
|
|
17290
|
-
/* @__PURE__ */ (0,
|
|
17531
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("div", { className: "mt-4 flex flex-col gap-y-3", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17291
17532
|
Form.Field,
|
|
17292
17533
|
{
|
|
17293
17534
|
control: form.control,
|
|
17294
17535
|
name: "email",
|
|
17295
17536
|
render: ({ field }) => {
|
|
17296
|
-
return /* @__PURE__ */ (0,
|
|
17297
|
-
/* @__PURE__ */ (0,
|
|
17298
|
-
|
|
17537
|
+
return /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)(Form.Item, { children: [
|
|
17538
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17539
|
+
import_ui98.Input,
|
|
17299
17540
|
{
|
|
17300
17541
|
autoComplete: "email",
|
|
17301
17542
|
...field,
|
|
17302
17543
|
placeholder: t3("fields.email")
|
|
17303
17544
|
}
|
|
17304
17545
|
) }),
|
|
17305
|
-
/* @__PURE__ */ (0,
|
|
17546
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(Form.ErrorMessage, {})
|
|
17306
17547
|
] });
|
|
17307
17548
|
}
|
|
17308
17549
|
}
|
|
17309
17550
|
) }),
|
|
17310
|
-
showAlert && /* @__PURE__ */ (0,
|
|
17311
|
-
/* @__PURE__ */ (0,
|
|
17312
|
-
/* @__PURE__ */ (0,
|
|
17551
|
+
showAlert && /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Alert, { dismissible: true, variant: "success", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsxs)("div", { className: "flex flex-col", children: [
|
|
17552
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "text-ui-fg-base mb-1", children: t3("resetPassword.successfulRequestTitle") }),
|
|
17553
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { children: t3("resetPassword.successfulRequest") })
|
|
17313
17554
|
] }) }),
|
|
17314
|
-
/* @__PURE__ */ (0,
|
|
17555
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(import_ui98.Button, { className: "w-full", type: "submit", isLoading: isPending, children: t3("resetPassword.sendResetInstructions") })
|
|
17315
17556
|
]
|
|
17316
17557
|
}
|
|
17317
17558
|
) }) }),
|
|
17318
|
-
/* @__PURE__ */ (0,
|
|
17319
|
-
|
|
17559
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17560
|
+
import_react_i18next68.Trans,
|
|
17320
17561
|
{
|
|
17321
17562
|
i18nKey: "resetPassword.backToLogin",
|
|
17322
17563
|
components: [
|
|
17323
|
-
/* @__PURE__ */ (0,
|
|
17564
|
+
/* @__PURE__ */ (0, import_jsx_runtime132.jsx)(
|
|
17324
17565
|
import_react_router_dom51.Link,
|
|
17325
17566
|
{
|
|
17326
17567
|
to: "/login",
|
|
@@ -17349,17 +17590,17 @@ var init_reset_password2 = __esm({
|
|
|
17349
17590
|
});
|
|
17350
17591
|
|
|
17351
17592
|
// src/routes/invite/invite.tsx
|
|
17352
|
-
var import_zod13,
|
|
17593
|
+
var import_zod13, import_ui99, import_i18next3, import_react107, import_react108, import_react_hook_form22, import_react_i18next69, import_react_jwt3, import_react_router_dom52, z5, import_jsx_runtime133, CreateAccountSchema, Invite, LoginLink, InvalidView, CreateView, SuccessView, InviteSchema, validateDecodedInvite;
|
|
17353
17594
|
var init_invite = __esm({
|
|
17354
17595
|
"src/routes/invite/invite.tsx"() {
|
|
17355
17596
|
"use strict";
|
|
17356
17597
|
import_zod13 = require("@hookform/resolvers/zod");
|
|
17357
|
-
|
|
17598
|
+
import_ui99 = require("@acmekit/ui");
|
|
17358
17599
|
import_i18next3 = __toESM(require("i18next"));
|
|
17359
17600
|
import_react107 = require("motion/react");
|
|
17360
17601
|
import_react108 = require("react");
|
|
17361
17602
|
import_react_hook_form22 = require("react-hook-form");
|
|
17362
|
-
|
|
17603
|
+
import_react_i18next69 = require("react-i18next");
|
|
17363
17604
|
import_react_jwt3 = require("react-jwt");
|
|
17364
17605
|
import_react_router_dom52 = require("react-router-dom");
|
|
17365
17606
|
z5 = __toESM(require("zod"));
|
|
@@ -17368,7 +17609,7 @@ var init_invite = __esm({
|
|
|
17368
17609
|
init_auth();
|
|
17369
17610
|
init_invites();
|
|
17370
17611
|
init_is_fetch_error();
|
|
17371
|
-
|
|
17612
|
+
import_jsx_runtime133 = require("react/jsx-runtime");
|
|
17372
17613
|
CreateAccountSchema = z5.object({
|
|
17373
17614
|
email: z5.string().email(),
|
|
17374
17615
|
first_name: z5.string().min(1),
|
|
@@ -17390,9 +17631,9 @@ var init_invite = __esm({
|
|
|
17390
17631
|
const token = searchParams.get("token");
|
|
17391
17632
|
const invite = token ? (0, import_react_jwt3.decodeToken)(token) : null;
|
|
17392
17633
|
const isValidInvite = invite && validateDecodedInvite(invite);
|
|
17393
|
-
return /* @__PURE__ */ (0,
|
|
17394
|
-
/* @__PURE__ */ (0,
|
|
17395
|
-
/* @__PURE__ */ (0,
|
|
17634
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "bg-ui-bg-subtle relative flex min-h-dvh w-dvw items-center justify-center p-4", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex w-full max-w-[360px] flex-col items-center", children: [
|
|
17635
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(AvatarBox, { checked: success }),
|
|
17636
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "max-h-[557px] w-full will-change-contents", children: isValidInvite ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react107.AnimatePresence, { children: !success ? /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17396
17637
|
import_react107.motion.div,
|
|
17397
17638
|
{
|
|
17398
17639
|
initial: false,
|
|
@@ -17410,7 +17651,7 @@ var init_invite = __esm({
|
|
|
17410
17651
|
ease: [0, 0.71, 0.2, 1.01]
|
|
17411
17652
|
},
|
|
17412
17653
|
className: "w-full will-change-transform",
|
|
17413
|
-
children: /* @__PURE__ */ (0,
|
|
17654
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17414
17655
|
import_react107.motion.div,
|
|
17415
17656
|
{
|
|
17416
17657
|
initial: false,
|
|
@@ -17427,7 +17668,7 @@ var init_invite = __esm({
|
|
|
17427
17668
|
delay: 0,
|
|
17428
17669
|
ease: [0, 0.71, 0.2, 1.01]
|
|
17429
17670
|
},
|
|
17430
|
-
children: /* @__PURE__ */ (0,
|
|
17671
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17431
17672
|
CreateView,
|
|
17432
17673
|
{
|
|
17433
17674
|
onSuccess: () => setSuccess(true),
|
|
@@ -17440,7 +17681,7 @@ var init_invite = __esm({
|
|
|
17440
17681
|
)
|
|
17441
17682
|
},
|
|
17442
17683
|
"create-account"
|
|
17443
|
-
) : /* @__PURE__ */ (0,
|
|
17684
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17444
17685
|
import_react107.motion.div,
|
|
17445
17686
|
{
|
|
17446
17687
|
initial: {
|
|
@@ -17457,17 +17698,17 @@ var init_invite = __esm({
|
|
|
17457
17698
|
ease: [0, 0.71, 0.2, 1.01]
|
|
17458
17699
|
},
|
|
17459
17700
|
className: "w-full",
|
|
17460
|
-
children: /* @__PURE__ */ (0,
|
|
17701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(SuccessView, {})
|
|
17461
17702
|
},
|
|
17462
17703
|
"success-view"
|
|
17463
|
-
) }) : /* @__PURE__ */ (0,
|
|
17704
|
+
) }) : /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(InvalidView, {}) })
|
|
17464
17705
|
] }) });
|
|
17465
17706
|
};
|
|
17466
17707
|
LoginLink = () => {
|
|
17467
|
-
const { t: t3 } = (0,
|
|
17468
|
-
return /* @__PURE__ */ (0,
|
|
17469
|
-
/* @__PURE__ */ (0,
|
|
17470
|
-
/* @__PURE__ */ (0,
|
|
17708
|
+
const { t: t3 } = (0, import_react_i18next69.useTranslation)();
|
|
17709
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
|
|
17710
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "my-6 h-px w-full border-b border-dotted" }),
|
|
17711
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17471
17712
|
import_react_router_dom52.Link,
|
|
17472
17713
|
{
|
|
17473
17714
|
to: "/login",
|
|
@@ -17479,13 +17720,13 @@ var init_invite = __esm({
|
|
|
17479
17720
|
] });
|
|
17480
17721
|
};
|
|
17481
17722
|
InvalidView = () => {
|
|
17482
|
-
const { t: t3 } = (0,
|
|
17483
|
-
return /* @__PURE__ */ (0,
|
|
17484
|
-
/* @__PURE__ */ (0,
|
|
17485
|
-
/* @__PURE__ */ (0,
|
|
17486
|
-
/* @__PURE__ */ (0,
|
|
17723
|
+
const { t: t3 } = (0, import_react_i18next69.useTranslation)();
|
|
17724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
17725
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
|
|
17726
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Heading, { children: t3("invite.invalidTokenTitle") }),
|
|
17727
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t3("invite.invalidTokenHint") })
|
|
17487
17728
|
] }),
|
|
17488
|
-
/* @__PURE__ */ (0,
|
|
17729
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(LoginLink, {})
|
|
17489
17730
|
] });
|
|
17490
17731
|
};
|
|
17491
17732
|
CreateView = ({
|
|
@@ -17493,7 +17734,7 @@ var init_invite = __esm({
|
|
|
17493
17734
|
token,
|
|
17494
17735
|
invite
|
|
17495
17736
|
}) => {
|
|
17496
|
-
const { t: t3 } = (0,
|
|
17737
|
+
const { t: t3 } = (0, import_react_i18next69.useTranslation)();
|
|
17497
17738
|
const [invalid, setInvalid] = (0, import_react108.useState)(false);
|
|
17498
17739
|
const [params] = (0, import_react_router_dom52.useSearchParams)();
|
|
17499
17740
|
const isFirstRun = params.get("first_run") === "true";
|
|
@@ -17524,7 +17765,7 @@ var init_invite = __esm({
|
|
|
17524
17765
|
...invitePayload,
|
|
17525
17766
|
auth_token: authToken
|
|
17526
17767
|
});
|
|
17527
|
-
|
|
17768
|
+
import_ui99.toast.success(t3("invite.toast.accepted"));
|
|
17528
17769
|
onSuccess();
|
|
17529
17770
|
} catch (error) {
|
|
17530
17771
|
if (isFetchError(error) && error.status === 400) {
|
|
@@ -17543,21 +17784,21 @@ var init_invite = __esm({
|
|
|
17543
17784
|
});
|
|
17544
17785
|
const serverError = form.formState.errors.root?.message;
|
|
17545
17786
|
const validationError = form.formState.errors.email?.message || form.formState.errors.password?.message || form.formState.errors.repeat_password?.message || form.formState.errors.first_name?.message || form.formState.errors.last_name?.message;
|
|
17546
|
-
return /* @__PURE__ */ (0,
|
|
17547
|
-
/* @__PURE__ */ (0,
|
|
17548
|
-
/* @__PURE__ */ (0,
|
|
17549
|
-
/* @__PURE__ */ (0,
|
|
17787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
|
|
17788
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "mb-4 flex flex-col items-center", children: [
|
|
17789
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Heading, { children: t3("invite.title") }),
|
|
17790
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t3("invite.hint") })
|
|
17550
17791
|
] }),
|
|
17551
|
-
/* @__PURE__ */ (0,
|
|
17552
|
-
/* @__PURE__ */ (0,
|
|
17553
|
-
/* @__PURE__ */ (0,
|
|
17792
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form, { ...form, children: /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("form", { onSubmit: handleSubmit, className: "flex w-full flex-col gap-y-6", children: [
|
|
17793
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex flex-col gap-y-2", children: [
|
|
17794
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17554
17795
|
Form.Field,
|
|
17555
17796
|
{
|
|
17556
17797
|
control: form.control,
|
|
17557
17798
|
name: "email",
|
|
17558
17799
|
render: ({ field }) => {
|
|
17559
|
-
return /* @__PURE__ */ (0,
|
|
17560
|
-
|
|
17800
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17801
|
+
import_ui99.Input,
|
|
17561
17802
|
{
|
|
17562
17803
|
autoComplete: "off",
|
|
17563
17804
|
...field,
|
|
@@ -17568,14 +17809,14 @@ var init_invite = __esm({
|
|
|
17568
17809
|
}
|
|
17569
17810
|
}
|
|
17570
17811
|
),
|
|
17571
|
-
/* @__PURE__ */ (0,
|
|
17812
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17572
17813
|
Form.Field,
|
|
17573
17814
|
{
|
|
17574
17815
|
control: form.control,
|
|
17575
17816
|
name: "first_name",
|
|
17576
17817
|
render: ({ field }) => {
|
|
17577
|
-
return /* @__PURE__ */ (0,
|
|
17578
|
-
|
|
17818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17819
|
+
import_ui99.Input,
|
|
17579
17820
|
{
|
|
17580
17821
|
autoComplete: "given-name",
|
|
17581
17822
|
...field,
|
|
@@ -17586,14 +17827,14 @@ var init_invite = __esm({
|
|
|
17586
17827
|
}
|
|
17587
17828
|
}
|
|
17588
17829
|
),
|
|
17589
|
-
/* @__PURE__ */ (0,
|
|
17830
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17590
17831
|
Form.Field,
|
|
17591
17832
|
{
|
|
17592
17833
|
control: form.control,
|
|
17593
17834
|
name: "last_name",
|
|
17594
17835
|
render: ({ field }) => {
|
|
17595
|
-
return /* @__PURE__ */ (0,
|
|
17596
|
-
|
|
17836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17837
|
+
import_ui99.Input,
|
|
17597
17838
|
{
|
|
17598
17839
|
autoComplete: "family-name",
|
|
17599
17840
|
...field,
|
|
@@ -17604,14 +17845,14 @@ var init_invite = __esm({
|
|
|
17604
17845
|
}
|
|
17605
17846
|
}
|
|
17606
17847
|
),
|
|
17607
|
-
/* @__PURE__ */ (0,
|
|
17848
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17608
17849
|
Form.Field,
|
|
17609
17850
|
{
|
|
17610
17851
|
control: form.control,
|
|
17611
17852
|
name: "password",
|
|
17612
17853
|
render: ({ field }) => {
|
|
17613
|
-
return /* @__PURE__ */ (0,
|
|
17614
|
-
|
|
17854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17855
|
+
import_ui99.Input,
|
|
17615
17856
|
{
|
|
17616
17857
|
autoComplete: "new-password",
|
|
17617
17858
|
type: "password",
|
|
@@ -17623,14 +17864,14 @@ var init_invite = __esm({
|
|
|
17623
17864
|
}
|
|
17624
17865
|
}
|
|
17625
17866
|
),
|
|
17626
|
-
/* @__PURE__ */ (0,
|
|
17867
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17627
17868
|
Form.Field,
|
|
17628
17869
|
{
|
|
17629
17870
|
control: form.control,
|
|
17630
17871
|
name: "repeat_password",
|
|
17631
17872
|
render: ({ field }) => {
|
|
17632
|
-
return /* @__PURE__ */ (0,
|
|
17633
|
-
|
|
17873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Item, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(Form.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17874
|
+
import_ui99.Input,
|
|
17634
17875
|
{
|
|
17635
17876
|
autoComplete: "off",
|
|
17636
17877
|
type: "password",
|
|
@@ -17642,9 +17883,9 @@ var init_invite = __esm({
|
|
|
17642
17883
|
}
|
|
17643
17884
|
}
|
|
17644
17885
|
),
|
|
17645
|
-
validationError && /* @__PURE__ */ (0,
|
|
17646
|
-
serverError && /* @__PURE__ */ (0,
|
|
17647
|
-
|
|
17886
|
+
validationError && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)("div", { className: "mt-6 text-center", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Hint, { className: "inline-flex", variant: "error", children: validationError }) }),
|
|
17887
|
+
serverError && /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17888
|
+
import_ui99.Alert,
|
|
17648
17889
|
{
|
|
17649
17890
|
className: "bg-ui-bg-base items-center p-2",
|
|
17650
17891
|
dismissible: true,
|
|
@@ -17653,8 +17894,8 @@ var init_invite = __esm({
|
|
|
17653
17894
|
}
|
|
17654
17895
|
)
|
|
17655
17896
|
] }),
|
|
17656
|
-
/* @__PURE__ */ (0,
|
|
17657
|
-
|
|
17897
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17898
|
+
import_ui99.Button,
|
|
17658
17899
|
{
|
|
17659
17900
|
className: "w-full",
|
|
17660
17901
|
type: "submit",
|
|
@@ -17664,18 +17905,18 @@ var init_invite = __esm({
|
|
|
17664
17905
|
}
|
|
17665
17906
|
)
|
|
17666
17907
|
] }) }),
|
|
17667
|
-
/* @__PURE__ */ (0,
|
|
17908
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(LoginLink, {})
|
|
17668
17909
|
] });
|
|
17669
17910
|
};
|
|
17670
17911
|
SuccessView = () => {
|
|
17671
|
-
const { t: t3 } = (0,
|
|
17672
|
-
return /* @__PURE__ */ (0,
|
|
17673
|
-
/* @__PURE__ */ (0,
|
|
17674
|
-
/* @__PURE__ */ (0,
|
|
17675
|
-
/* @__PURE__ */ (0,
|
|
17912
|
+
const { t: t3 } = (0, import_react_i18next69.useTranslation)();
|
|
17913
|
+
return /* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex w-full flex-col items-center gap-y-6", children: [
|
|
17914
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
|
|
17915
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Heading, { className: "text-center", children: t3("invite.successTitle") }),
|
|
17916
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Text, { size: "small", className: "text-ui-fg-subtle text-center", children: t3("invite.successHint") })
|
|
17676
17917
|
] }),
|
|
17677
|
-
/* @__PURE__ */ (0,
|
|
17678
|
-
/* @__PURE__ */ (0,
|
|
17918
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_ui99.Button, { variant: "secondary", asChild: true, className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime133.jsx)(import_react_router_dom52.Link, { to: "/login", replace: true, children: t3("invite.successAction") }) }),
|
|
17919
|
+
/* @__PURE__ */ (0, import_jsx_runtime133.jsx)(
|
|
17679
17920
|
import_react_router_dom52.Link,
|
|
17680
17921
|
{
|
|
17681
17922
|
to: "/login",
|
|
@@ -17711,26 +17952,26 @@ var init_invite2 = __esm({
|
|
|
17711
17952
|
});
|
|
17712
17953
|
|
|
17713
17954
|
// src/routes/no-match/no-match.tsx
|
|
17714
|
-
var import_icons44,
|
|
17955
|
+
var import_icons44, import_ui100, import_react_i18next70, import_react_router_dom53, import_jsx_runtime134, NoMatch;
|
|
17715
17956
|
var init_no_match = __esm({
|
|
17716
17957
|
"src/routes/no-match/no-match.tsx"() {
|
|
17717
17958
|
"use strict";
|
|
17718
17959
|
import_icons44 = require("@acmekit/icons");
|
|
17719
|
-
|
|
17720
|
-
|
|
17960
|
+
import_ui100 = require("@acmekit/ui");
|
|
17961
|
+
import_react_i18next70 = require("react-i18next");
|
|
17721
17962
|
import_react_router_dom53 = require("react-router-dom");
|
|
17722
|
-
|
|
17963
|
+
import_jsx_runtime134 = require("react/jsx-runtime");
|
|
17723
17964
|
NoMatch = () => {
|
|
17724
|
-
const { t: t3 } = (0,
|
|
17965
|
+
const { t: t3 } = (0, import_react_i18next70.useTranslation)();
|
|
17725
17966
|
const title = t3("errorBoundary.notFoundTitle");
|
|
17726
17967
|
const message = t3("errorBoundary.noMatchMessage");
|
|
17727
|
-
return /* @__PURE__ */ (0,
|
|
17728
|
-
/* @__PURE__ */ (0,
|
|
17729
|
-
/* @__PURE__ */ (0,
|
|
17730
|
-
/* @__PURE__ */ (0,
|
|
17731
|
-
/* @__PURE__ */ (0,
|
|
17732
|
-
/* @__PURE__ */ (0,
|
|
17733
|
-
|
|
17968
|
+
return /* @__PURE__ */ (0, import_jsx_runtime134.jsx)("div", { className: "flex size-full min-h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-col items-center gap-y-6", children: [
|
|
17969
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col items-center gap-y-3", children: [
|
|
17970
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_icons44.ExclamationCircle, {}),
|
|
17971
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsxs)("div", { className: "flex flex-col items-center justify-center gap-y-1", children: [
|
|
17972
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_ui100.Text, { size: "small", leading: "compact", weight: "plus", children: title }),
|
|
17973
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(
|
|
17974
|
+
import_ui100.Text,
|
|
17734
17975
|
{
|
|
17735
17976
|
size: "small",
|
|
17736
17977
|
className: "text-ui-fg-muted text-balance text-center",
|
|
@@ -17739,7 +17980,7 @@ var init_no_match = __esm({
|
|
|
17739
17980
|
)
|
|
17740
17981
|
] })
|
|
17741
17982
|
] }),
|
|
17742
|
-
/* @__PURE__ */ (0,
|
|
17983
|
+
/* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_ui100.Button, { asChild: true, size: "small", variant: "secondary", children: /* @__PURE__ */ (0, import_jsx_runtime134.jsx)(import_react_router_dom53.Link, { to: "/", children: t3("errorBoundary.backToDashboard") }) })
|
|
17743
17984
|
] }) });
|
|
17744
17985
|
};
|
|
17745
17986
|
}
|
|
@@ -29590,6 +29831,13 @@ var en_default = {
|
|
|
29590
29831
|
transactionIdLabel: "Transaction ID",
|
|
29591
29832
|
workflowIdLabel: "Workflow ID",
|
|
29592
29833
|
progressLabel: "Progress",
|
|
29834
|
+
metrics: {
|
|
29835
|
+
stepsSummary: "{{completed}} of {{total}} steps",
|
|
29836
|
+
failedSteps: "{{count}} failed",
|
|
29837
|
+
skippedSteps: "{{count}} skipped",
|
|
29838
|
+
compensatedYes: "Compensated",
|
|
29839
|
+
compensatedNo: "Not compensated"
|
|
29840
|
+
},
|
|
29593
29841
|
stepsCompletedLabel_one: "{{completed}} of {{count}} step",
|
|
29594
29842
|
stepsCompletedLabel_other: "{{completed}} of {{count}} steps",
|
|
29595
29843
|
list: {
|
|
@@ -29805,6 +30053,7 @@ var en_default = {
|
|
|
29805
30053
|
note: "Note",
|
|
29806
30054
|
automaticTaxes: "Automatic Taxes",
|
|
29807
30055
|
taxInclusivePricing: "Tax inclusive pricing",
|
|
30056
|
+
duration: "Duration",
|
|
29808
30057
|
currency: "Currency",
|
|
29809
30058
|
address: "Address",
|
|
29810
30059
|
address2: "Apartment, suite, etc.",
|
|
@@ -112948,14 +113197,14 @@ var ErrorBoundary = () => {
|
|
|
112948
113197
|
};
|
|
112949
113198
|
|
|
112950
113199
|
// src/dashboard-app/routes/get-route.map.tsx
|
|
112951
|
-
var
|
|
113200
|
+
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
112952
113201
|
function mergeSettingsRouteChildren(settingsRoutes) {
|
|
112953
113202
|
return settingsRoutes.filter((r) => r.path === "settings").flatMap((r) => r.children ?? []);
|
|
112954
113203
|
}
|
|
112955
113204
|
var defaultSettingsRouteChildren = [
|
|
112956
113205
|
{
|
|
112957
113206
|
path: "profile",
|
|
112958
|
-
errorElement: /* @__PURE__ */ (0,
|
|
113207
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
112959
113208
|
lazy: () => Promise.resolve().then(() => (init_profile_detail2(), profile_detail_exports)),
|
|
112960
113209
|
handle: { breadcrumb: () => (0, import_i18next4.t)("profile.domain") },
|
|
112961
113210
|
children: [
|
|
@@ -112967,8 +113216,8 @@ var defaultSettingsRouteChildren = [
|
|
|
112967
113216
|
},
|
|
112968
113217
|
{
|
|
112969
113218
|
path: "users",
|
|
112970
|
-
errorElement: /* @__PURE__ */ (0,
|
|
112971
|
-
element: /* @__PURE__ */ (0,
|
|
113219
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
113220
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react_router_dom54.Outlet, {}),
|
|
112972
113221
|
handle: { breadcrumb: () => (0, import_i18next4.t)("users.domain") },
|
|
112973
113222
|
children: [
|
|
112974
113223
|
{
|
|
@@ -112989,7 +113238,7 @@ var defaultSettingsRouteChildren = [
|
|
|
112989
113238
|
Component,
|
|
112990
113239
|
loader,
|
|
112991
113240
|
handle: {
|
|
112992
|
-
breadcrumb: (match) => /* @__PURE__ */ (0,
|
|
113241
|
+
breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Breadcrumb, { ...match })
|
|
112993
113242
|
}
|
|
112994
113243
|
};
|
|
112995
113244
|
},
|
|
@@ -113005,12 +113254,12 @@ var defaultSettingsRouteChildren = [
|
|
|
113005
113254
|
},
|
|
113006
113255
|
{
|
|
113007
113256
|
path: "client-api-keys",
|
|
113008
|
-
element: /* @__PURE__ */ (0,
|
|
113257
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react_router_dom54.Outlet, {}),
|
|
113009
113258
|
handle: { breadcrumb: () => (0, import_i18next4.t)("apiKeyManagement.domain.client") },
|
|
113010
113259
|
children: [
|
|
113011
113260
|
{
|
|
113012
113261
|
path: "",
|
|
113013
|
-
element: /* @__PURE__ */ (0,
|
|
113262
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react_router_dom54.Outlet, {}),
|
|
113014
113263
|
children: [
|
|
113015
113264
|
{
|
|
113016
113265
|
path: "",
|
|
@@ -113032,7 +113281,7 @@ var defaultSettingsRouteChildren = [
|
|
|
113032
113281
|
Component,
|
|
113033
113282
|
loader,
|
|
113034
113283
|
handle: {
|
|
113035
|
-
breadcrumb: (match) => /* @__PURE__ */ (0,
|
|
113284
|
+
breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Breadcrumb, { ...match })
|
|
113036
113285
|
}
|
|
113037
113286
|
};
|
|
113038
113287
|
},
|
|
@@ -113047,12 +113296,12 @@ var defaultSettingsRouteChildren = [
|
|
|
113047
113296
|
},
|
|
113048
113297
|
{
|
|
113049
113298
|
path: "secret-api-keys",
|
|
113050
|
-
element: /* @__PURE__ */ (0,
|
|
113299
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react_router_dom54.Outlet, {}),
|
|
113051
113300
|
handle: { breadcrumb: () => (0, import_i18next4.t)("apiKeyManagement.domain.secret") },
|
|
113052
113301
|
children: [
|
|
113053
113302
|
{
|
|
113054
113303
|
path: "",
|
|
113055
|
-
element: /* @__PURE__ */ (0,
|
|
113304
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react_router_dom54.Outlet, {}),
|
|
113056
113305
|
children: [
|
|
113057
113306
|
{
|
|
113058
113307
|
path: "",
|
|
@@ -113074,7 +113323,7 @@ var defaultSettingsRouteChildren = [
|
|
|
113074
113323
|
Component,
|
|
113075
113324
|
loader,
|
|
113076
113325
|
handle: {
|
|
113077
|
-
breadcrumb: (match) => /* @__PURE__ */ (0,
|
|
113326
|
+
breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Breadcrumb, { ...match })
|
|
113078
113327
|
}
|
|
113079
113328
|
};
|
|
113080
113329
|
},
|
|
@@ -113089,8 +113338,8 @@ var defaultSettingsRouteChildren = [
|
|
|
113089
113338
|
},
|
|
113090
113339
|
{
|
|
113091
113340
|
path: "workflows",
|
|
113092
|
-
errorElement: /* @__PURE__ */ (0,
|
|
113093
|
-
element: /* @__PURE__ */ (0,
|
|
113341
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
113342
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_react_router_dom54.Outlet, {}),
|
|
113094
113343
|
handle: { breadcrumb: () => (0, import_i18next4.t)("workflowExecutions.domain") },
|
|
113095
113344
|
children: [
|
|
113096
113345
|
{
|
|
@@ -113105,7 +113354,7 @@ var defaultSettingsRouteChildren = [
|
|
|
113105
113354
|
Component,
|
|
113106
113355
|
loader,
|
|
113107
113356
|
handle: {
|
|
113108
|
-
breadcrumb: (match) => /* @__PURE__ */ (0,
|
|
113357
|
+
breadcrumb: (match) => /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Breadcrumb, { ...match })
|
|
113109
113358
|
}
|
|
113110
113359
|
};
|
|
113111
113360
|
}
|
|
@@ -113114,7 +113363,7 @@ var defaultSettingsRouteChildren = [
|
|
|
113114
113363
|
},
|
|
113115
113364
|
{
|
|
113116
113365
|
path: "translations",
|
|
113117
|
-
errorElement: /* @__PURE__ */ (0,
|
|
113366
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
113118
113367
|
handle: { breadcrumb: () => (0, import_i18next4.t)("translations.domain") },
|
|
113119
113368
|
children: [
|
|
113120
113369
|
{
|
|
@@ -113141,15 +113390,15 @@ function getRouteMap({
|
|
|
113141
113390
|
const settingsPluginChildren = mergeSettingsRouteChildren(settingsRoutes);
|
|
113142
113391
|
return [
|
|
113143
113392
|
{
|
|
113144
|
-
element: /* @__PURE__ */ (0,
|
|
113145
|
-
errorElement: /* @__PURE__ */ (0,
|
|
113393
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ProtectedRoute, {}),
|
|
113394
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
113146
113395
|
children: [
|
|
113147
113396
|
{
|
|
113148
|
-
element: /* @__PURE__ */ (0,
|
|
113397
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(MainLayout, {}),
|
|
113149
113398
|
children: [
|
|
113150
113399
|
{
|
|
113151
113400
|
path: "/",
|
|
113152
|
-
errorElement: /* @__PURE__ */ (0,
|
|
113401
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
113153
113402
|
lazy: () => Promise.resolve().then(() => (init_home2(), home_exports))
|
|
113154
113403
|
},
|
|
113155
113404
|
...coreRoutes
|
|
@@ -113160,11 +113409,11 @@ function getRouteMap({
|
|
|
113160
113409
|
handle: {
|
|
113161
113410
|
breadcrumb: () => (0, import_i18next4.t)("app.nav.settings.header")
|
|
113162
113411
|
},
|
|
113163
|
-
element: /* @__PURE__ */ (0,
|
|
113412
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(SettingsLayout, {}),
|
|
113164
113413
|
children: [
|
|
113165
113414
|
{
|
|
113166
113415
|
index: true,
|
|
113167
|
-
errorElement: /* @__PURE__ */ (0,
|
|
113416
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
113168
113417
|
lazy: () => Promise.resolve().then(() => (init_settings4(), settings_exports2))
|
|
113169
113418
|
},
|
|
113170
113419
|
...defaultSettingsRouteChildren,
|
|
@@ -113174,10 +113423,10 @@ function getRouteMap({
|
|
|
113174
113423
|
]
|
|
113175
113424
|
},
|
|
113176
113425
|
{
|
|
113177
|
-
element: /* @__PURE__ */ (0,
|
|
113426
|
+
element: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(PublicLayout, {}),
|
|
113178
113427
|
children: [
|
|
113179
113428
|
{
|
|
113180
|
-
errorElement: /* @__PURE__ */ (0,
|
|
113429
|
+
errorElement: /* @__PURE__ */ (0, import_jsx_runtime135.jsx)(ErrorBoundary, {}),
|
|
113181
113430
|
children: [
|
|
113182
113431
|
{
|
|
113183
113432
|
path: "/login",
|
|
@@ -113350,7 +113599,7 @@ function sortMenuItemsByRank(items) {
|
|
|
113350
113599
|
}
|
|
113351
113600
|
|
|
113352
113601
|
// src/dashboard-app/dashboard-app.tsx
|
|
113353
|
-
var
|
|
113602
|
+
var import_jsx_runtime136 = require("react/jsx-runtime");
|
|
113354
113603
|
var OPTIONAL_LAST_SEGMENT_MATCH = /\/([^\/])+\?$/;
|
|
113355
113604
|
var DashboardApp = class {
|
|
113356
113605
|
constructor({ plugins }) {
|
|
@@ -113456,7 +113705,7 @@ var DashboardApp = class {
|
|
|
113456
113705
|
const navItem = {
|
|
113457
113706
|
label: item.label,
|
|
113458
113707
|
to: item.path,
|
|
113459
|
-
icon: item.icon ? /* @__PURE__ */ (0,
|
|
113708
|
+
icon: item.icon ? /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(item.icon, {}) : void 0,
|
|
113460
113709
|
items: [],
|
|
113461
113710
|
nested: item.nested,
|
|
113462
113711
|
rank: item.rank,
|
|
@@ -113666,20 +113915,20 @@ var DashboardApp = class {
|
|
|
113666
113915
|
const router = (0, import_react_router_dom55.createBrowserRouter)(routes, {
|
|
113667
113916
|
basename: __BASE__ || "/"
|
|
113668
113917
|
});
|
|
113669
|
-
return /* @__PURE__ */ (0,
|
|
113918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(Providers, { api: this.api, children: /* @__PURE__ */ (0, import_jsx_runtime136.jsx)(import_react_router_dom55.RouterProvider, { router }) });
|
|
113670
113919
|
}
|
|
113671
113920
|
};
|
|
113672
113921
|
|
|
113673
113922
|
// src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx
|
|
113674
|
-
var
|
|
113675
|
-
var
|
|
113923
|
+
var import_ui101 = require("@acmekit/ui");
|
|
113924
|
+
var import_react_i18next71 = require("react-i18next");
|
|
113676
113925
|
init_form2();
|
|
113677
113926
|
|
|
113678
113927
|
// src/dashboard-app/forms/form-extension-zone/utils.ts
|
|
113679
113928
|
var import_zod14 = require("zod");
|
|
113680
113929
|
|
|
113681
113930
|
// src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx
|
|
113682
|
-
var
|
|
113931
|
+
var import_jsx_runtime137 = require("react/jsx-runtime");
|
|
113683
113932
|
|
|
113684
113933
|
// src/dashboard-app/forms/hooks.tsx
|
|
113685
113934
|
var import_zod15 = require("@hookform/resolvers/zod");
|
|
@@ -113696,7 +113945,7 @@ var import_i18n3 = __toESM(require("virtual:acmekit/i18n"));
|
|
|
113696
113945
|
var import_menu_items = __toESM(require("virtual:acmekit/menu-items"));
|
|
113697
113946
|
var import_routes = __toESM(require("virtual:acmekit/routes"));
|
|
113698
113947
|
var import_widgets = __toESM(require("virtual:acmekit/widgets"));
|
|
113699
|
-
var
|
|
113948
|
+
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
113700
113949
|
var localPlugin = {
|
|
113701
113950
|
widgetModule: import_widgets.default,
|
|
113702
113951
|
routeModule: import_routes.default,
|
|
@@ -113709,6 +113958,6 @@ function App({ plugins = [] }) {
|
|
|
113709
113958
|
const app = new DashboardApp({
|
|
113710
113959
|
plugins: [localPlugin, ...plugins]
|
|
113711
113960
|
});
|
|
113712
|
-
return /* @__PURE__ */ (0,
|
|
113961
|
+
return /* @__PURE__ */ (0, import_jsx_runtime138.jsx)("div", { children: app.render() });
|
|
113713
113962
|
}
|
|
113714
113963
|
var app_default = App;
|