@ixo/editor 2.27.1 → 2.28.0
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.
|
@@ -326,6 +326,41 @@ function registerBuiltInActionTypes() {
|
|
|
326
326
|
registerHookedActionType(addLinkedEntityAction);
|
|
327
327
|
}
|
|
328
328
|
|
|
329
|
+
// src/mantine/blocks/hooks/hookedActions/extractSurveyFields.ts
|
|
330
|
+
function extractSurveyFields(schema) {
|
|
331
|
+
const fields = [];
|
|
332
|
+
if (!schema) return fields;
|
|
333
|
+
const extractFromElements = (elements) => {
|
|
334
|
+
if (!Array.isArray(elements)) return;
|
|
335
|
+
for (const el of elements) {
|
|
336
|
+
if (el.name) {
|
|
337
|
+
fields.push({
|
|
338
|
+
name: el.name,
|
|
339
|
+
title: el.title || el.name
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
if (el.elements) extractFromElements(el.elements);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
if (Array.isArray(schema.pages)) {
|
|
346
|
+
for (const page of schema.pages) {
|
|
347
|
+
extractFromElements(page.elements || []);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
if (Array.isArray(schema.elements)) {
|
|
351
|
+
extractFromElements(schema.elements);
|
|
352
|
+
}
|
|
353
|
+
return fields;
|
|
354
|
+
}
|
|
355
|
+
function surveyFieldsToPayloadFields(schema, parentKey = "surveyAnswers") {
|
|
356
|
+
return extractSurveyFields(schema).map((field) => ({
|
|
357
|
+
key: `${parentKey}.${field.name}`,
|
|
358
|
+
label: `Survey: ${field.title}`,
|
|
359
|
+
type: "string",
|
|
360
|
+
description: `Survey field: ${field.title}`
|
|
361
|
+
}));
|
|
362
|
+
}
|
|
363
|
+
|
|
329
364
|
// src/mantine/blocks/governanceGroup/actions.ts
|
|
330
365
|
var governanceGroupActions = [
|
|
331
366
|
{
|
|
@@ -11001,7 +11036,7 @@ var SimpleUCANManager = class {
|
|
|
11001
11036
|
};
|
|
11002
11037
|
|
|
11003
11038
|
// src/mantine/components/HookedActionsTab/HookedActionsTab.tsx
|
|
11004
|
-
import React115, { useCallback as useCallback23, useMemo as useMemo21, useEffect as useEffect24 } from "react";
|
|
11039
|
+
import React115, { useCallback as useCallback23, useMemo as useMemo21, useEffect as useEffect24, useState as useState37 } from "react";
|
|
11005
11040
|
import { Stack as Stack86, Text as Text60, Alert as Alert13, Accordion as Accordion3, Group as Group34, Badge as Badge15, Menu as Menu2, Button as Button21 } from "@mantine/core";
|
|
11006
11041
|
import { IconPlus as IconPlus5, IconMail as IconMail3, IconLink as IconLink2 } from "@tabler/icons-react";
|
|
11007
11042
|
|
|
@@ -11267,9 +11302,33 @@ function ensureActionTypesRegistered() {
|
|
|
11267
11302
|
}
|
|
11268
11303
|
}
|
|
11269
11304
|
var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedActionsChange }) => {
|
|
11305
|
+
const handlers = useBlocknoteHandlers();
|
|
11270
11306
|
useEffect24(() => {
|
|
11271
11307
|
ensureActionTypesRegistered();
|
|
11272
11308
|
}, []);
|
|
11309
|
+
const [dynamicFields, setDynamicFields] = useState37({});
|
|
11310
|
+
useEffect24(() => {
|
|
11311
|
+
const blockProps = block?.props || {};
|
|
11312
|
+
let cancelled = false;
|
|
11313
|
+
const resolveAll = async () => {
|
|
11314
|
+
const results = {};
|
|
11315
|
+
for (const action of blockActions) {
|
|
11316
|
+
if (action.resolveDynamicFields) {
|
|
11317
|
+
try {
|
|
11318
|
+
const fields = await action.resolveDynamicFields({ handlers, blockProps });
|
|
11319
|
+
results[action.actionId] = fields;
|
|
11320
|
+
} catch {
|
|
11321
|
+
results[action.actionId] = [];
|
|
11322
|
+
}
|
|
11323
|
+
}
|
|
11324
|
+
}
|
|
11325
|
+
if (!cancelled) setDynamicFields(results);
|
|
11326
|
+
};
|
|
11327
|
+
resolveAll();
|
|
11328
|
+
return () => {
|
|
11329
|
+
cancelled = true;
|
|
11330
|
+
};
|
|
11331
|
+
}, [blockActions, handlers, block?.props]);
|
|
11273
11332
|
const config = useMemo21(() => parseHookedActionsConfig(hookedActions), [hookedActions]);
|
|
11274
11333
|
const availableActionTypes = useMemo21(() => {
|
|
11275
11334
|
ensureActionTypesRegistered();
|
|
@@ -11370,6 +11429,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
|
|
|
11370
11429
|
blockActions.map((blockAction) => {
|
|
11371
11430
|
const actionsForThisEvent = config[blockAction.actionId] || [];
|
|
11372
11431
|
const enabledCount = actionsForThisEvent.filter((a) => a.enabled).length;
|
|
11432
|
+
const allPayloadFields = [...blockAction.payloadSchema.filter((f) => f.type !== "object"), ...dynamicFields[blockAction.actionId] || []];
|
|
11373
11433
|
return /* @__PURE__ */ React115.createElement(Accordion3.Item, { key: blockAction.actionId, value: blockAction.actionId }, /* @__PURE__ */ React115.createElement(Accordion3.Control, null, /* @__PURE__ */ React115.createElement(Group34, { justify: "space-between", pr: "md" }, /* @__PURE__ */ React115.createElement(Stack86, { gap: 2 }, /* @__PURE__ */ React115.createElement(Text60, { size: "sm", fw: 500, c: "#f1f3f5" }, blockAction.label), /* @__PURE__ */ React115.createElement(Text60, { size: "xs", c: "#666" }, blockAction.description)), actionsForThisEvent.length > 0 && /* @__PURE__ */ React115.createElement(
|
|
11374
11434
|
Badge15,
|
|
11375
11435
|
{
|
|
@@ -11382,7 +11442,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
|
|
|
11382
11442
|
},
|
|
11383
11443
|
enabledCount,
|
|
11384
11444
|
" active"
|
|
11385
|
-
))), /* @__PURE__ */ React115.createElement(Accordion3.Panel, null, /* @__PURE__ */ React115.createElement(Stack86, { gap: "sm" },
|
|
11445
|
+
))), /* @__PURE__ */ React115.createElement(Accordion3.Panel, null, /* @__PURE__ */ React115.createElement(Stack86, { gap: "sm" }, allPayloadFields.length > 0 && /* @__PURE__ */ React115.createElement(
|
|
11386
11446
|
Stack86,
|
|
11387
11447
|
{
|
|
11388
11448
|
gap: "xs",
|
|
@@ -11394,7 +11454,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
|
|
|
11394
11454
|
}
|
|
11395
11455
|
},
|
|
11396
11456
|
/* @__PURE__ */ React115.createElement(Text60, { size: "xs", fw: 500, c: "#adb5bd" }, "Available payload data:"),
|
|
11397
|
-
/* @__PURE__ */ React115.createElement(Group34, { gap: "xs" },
|
|
11457
|
+
/* @__PURE__ */ React115.createElement(Group34, { gap: "xs" }, allPayloadFields.map((field) => /* @__PURE__ */ React115.createElement(
|
|
11398
11458
|
Badge15,
|
|
11399
11459
|
{
|
|
11400
11460
|
key: field.key,
|
|
@@ -11416,7 +11476,7 @@ var HookedActionsTab = ({ editor, block, blockActions, hookedActions, onHookedAc
|
|
|
11416
11476
|
key: instance.id,
|
|
11417
11477
|
instance,
|
|
11418
11478
|
actionType,
|
|
11419
|
-
payloadFields:
|
|
11479
|
+
payloadFields: allPayloadFields,
|
|
11420
11480
|
availableBlocks,
|
|
11421
11481
|
onUpdate: (updates) => handleUpdateAction(blockAction.actionId, instance.id, updates),
|
|
11422
11482
|
onRemove: () => handleRemoveAction(blockAction.actionId, instance.id)
|
|
@@ -11471,7 +11531,7 @@ import React118 from "react";
|
|
|
11471
11531
|
import { createReactBlockSpec as createReactBlockSpec6 } from "@blocknote/react";
|
|
11472
11532
|
|
|
11473
11533
|
// src/mantine/blocks/dynamicList/DynamicListBlock.tsx
|
|
11474
|
-
import React117, { useMemo as useMemo23, useState as
|
|
11534
|
+
import React117, { useMemo as useMemo23, useState as useState39, useCallback as useCallback24, useEffect as useEffect25, useRef as useRef4 } from "react";
|
|
11475
11535
|
import { Box as Box27, Stack as Stack88, Text as Text62, Paper as Paper11, Group as Group36, Button as Button22, ActionIcon as ActionIcon15, Tooltip as Tooltip10, Code as Code4, Flex as Flex24, Collapse as Collapse6, Title as Title4, Badge as Badge16, TextInput as TextInput6, CloseButton as CloseButton4, Select as Select3, Menu as Menu3 } from "@mantine/core";
|
|
11476
11536
|
import { useDisclosure as useDisclosure4 } from "@mantine/hooks";
|
|
11477
11537
|
import {
|
|
@@ -11492,7 +11552,7 @@ import {
|
|
|
11492
11552
|
} from "@tabler/icons-react";
|
|
11493
11553
|
|
|
11494
11554
|
// src/mantine/blocks/dynamicList/DynamicListSelectionPanel.tsx
|
|
11495
|
-
import React116, { useMemo as useMemo22, useState as
|
|
11555
|
+
import React116, { useMemo as useMemo22, useState as useState38 } from "react";
|
|
11496
11556
|
import { Paper as Paper10, CloseButton as CloseButton3, Stack as Stack87, Text as Text61, Box as Box26, Group as Group35, Divider as Divider10, Code as Code3, ScrollArea as ScrollArea5, Collapse as Collapse5 } from "@mantine/core";
|
|
11497
11557
|
import { IconSparkles, IconChevronDown as IconChevronDown5, IconChevronRight as IconChevronRight4 } from "@tabler/icons-react";
|
|
11498
11558
|
function formatKeyAsLabel(key) {
|
|
@@ -11522,7 +11582,7 @@ function DefaultKeyValueView({
|
|
|
11522
11582
|
panelDescription
|
|
11523
11583
|
// actions,
|
|
11524
11584
|
}) {
|
|
11525
|
-
const [valuesExpanded, setValuesExpanded] =
|
|
11585
|
+
const [valuesExpanded, setValuesExpanded] = useState38(false);
|
|
11526
11586
|
const columnMap = useMemo22(() => {
|
|
11527
11587
|
const map = {};
|
|
11528
11588
|
columns.forEach((col) => {
|
|
@@ -11640,19 +11700,19 @@ function DynamicListBlock({ block, editor }) {
|
|
|
11640
11700
|
panelDescription
|
|
11641
11701
|
/* actions */
|
|
11642
11702
|
} = block.props;
|
|
11643
|
-
const [useLiveMode, setUseLiveMode] =
|
|
11703
|
+
const [useLiveMode, setUseLiveMode] = useState39(false);
|
|
11644
11704
|
const [opened, { toggle }] = useDisclosure4(true);
|
|
11645
|
-
const [selectedIds, setSelectedIds] =
|
|
11646
|
-
const [selectedItem, setSelectedItem] =
|
|
11647
|
-
const [isMultiSelect, setIsMultiSelect] =
|
|
11648
|
-
const [page, setPage] =
|
|
11649
|
-
const [sortConfig, setSortConfig] =
|
|
11650
|
-
const [showSearch, setShowSearch] =
|
|
11651
|
-
const [searchQuery, setSearchQuery] =
|
|
11705
|
+
const [selectedIds, setSelectedIds] = useState39(/* @__PURE__ */ new Set());
|
|
11706
|
+
const [selectedItem, setSelectedItem] = useState39(null);
|
|
11707
|
+
const [isMultiSelect, setIsMultiSelect] = useState39(false);
|
|
11708
|
+
const [page, setPage] = useState39(1);
|
|
11709
|
+
const [sortConfig, setSortConfig] = useState39(null);
|
|
11710
|
+
const [showSearch, setShowSearch] = useState39(false);
|
|
11711
|
+
const [searchQuery, setSearchQuery] = useState39("");
|
|
11652
11712
|
const searchInputRef = useRef4(null);
|
|
11653
|
-
const [orderByCollapsed, setOrderByCollapsed] =
|
|
11654
|
-
const [columnsCollapsed, setColumnsCollapsed] =
|
|
11655
|
-
const [showInfo, setShowInfo] =
|
|
11713
|
+
const [orderByCollapsed, setOrderByCollapsed] = useState39(true);
|
|
11714
|
+
const [columnsCollapsed, setColumnsCollapsed] = useState39(true);
|
|
11715
|
+
const [showInfo, setShowInfo] = useState39(false);
|
|
11656
11716
|
const parsedColumns = useMemo23(() => {
|
|
11657
11717
|
try {
|
|
11658
11718
|
return typeof columns === "string" ? JSON.parse(columns) : columns;
|
|
@@ -12139,7 +12199,7 @@ var DynamicListBlockSpec = createReactBlockSpec6(
|
|
|
12139
12199
|
);
|
|
12140
12200
|
|
|
12141
12201
|
// src/mantine/blocks/enumChecklist/EnumChecklistBlock.tsx
|
|
12142
|
-
import React125, { useState as
|
|
12202
|
+
import React125, { useState as useState41, useEffect as useEffect26, useMemo as useMemo24, useCallback as useCallback25 } from "react";
|
|
12143
12203
|
import { createReactBlockSpec as createReactBlockSpec7 } from "@blocknote/react";
|
|
12144
12204
|
import { Stack as Stack94, Text as Text68, Button as Button27, ActionIcon as ActionIcon16, Center as Center5, Flex as Flex26 } from "@mantine/core";
|
|
12145
12205
|
|
|
@@ -12155,7 +12215,7 @@ function OraclePersonalitiesEnumList({ selectionMode, isItemChecked, onItemCheck
|
|
|
12155
12215
|
}
|
|
12156
12216
|
|
|
12157
12217
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
12158
|
-
import React124, { useState as
|
|
12218
|
+
import React124, { useState as useState40 } from "react";
|
|
12159
12219
|
import { Modal, Group as Group40, Box as Box30 } from "@mantine/core";
|
|
12160
12220
|
|
|
12161
12221
|
// src/mantine/blocks/list/modal/ModalNavigation.tsx
|
|
@@ -12425,9 +12485,9 @@ var EnumChecklistConfigurationStep = ({ enumChecklistType: listType, config, onC
|
|
|
12425
12485
|
|
|
12426
12486
|
// src/mantine/blocks/enumChecklist/EnumChecklistConfigModal.tsx
|
|
12427
12487
|
var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
12428
|
-
const [activeStep, setActiveStep] =
|
|
12429
|
-
const [selectedType, setSelectedType] =
|
|
12430
|
-
const [config, setConfig] =
|
|
12488
|
+
const [activeStep, setActiveStep] = useState40("type");
|
|
12489
|
+
const [selectedType, setSelectedType] = useState40(initialConfig?.listType || null);
|
|
12490
|
+
const [config, setConfig] = useState40(initialConfig?.listConfig || {});
|
|
12431
12491
|
const handleTypeSelect = (type) => {
|
|
12432
12492
|
setSelectedType(type);
|
|
12433
12493
|
const configFieldsByType = getEnumListTypesConfigFields(type);
|
|
@@ -12508,7 +12568,7 @@ var EnumChecklistConfigModal = ({ opened, onClose, onSave, initialConfig }) => {
|
|
|
12508
12568
|
var IconSettings2 = () => /* @__PURE__ */ React125.createElement("span", null, "\u2699\uFE0F");
|
|
12509
12569
|
var EnumChecklistBlockType = "enumChecklist";
|
|
12510
12570
|
var EnumChecklistBlockContent = ({ block, editor }) => {
|
|
12511
|
-
const [modalOpened, setModalOpened] =
|
|
12571
|
+
const [modalOpened, setModalOpened] = useState41(false);
|
|
12512
12572
|
const { editable } = useBlocknoteContext();
|
|
12513
12573
|
const listType = block.props.listType && block.props.listType !== "" ? block.props.listType : null;
|
|
12514
12574
|
const listConfig = useMemo24(() => {
|
|
@@ -12652,7 +12712,7 @@ import React128, { useMemo as useMemo25 } from "react";
|
|
|
12652
12712
|
import React127, { useCallback as useCallback26 } from "react";
|
|
12653
12713
|
|
|
12654
12714
|
// src/mantine/blocks/notify/template/GeneralTab.tsx
|
|
12655
|
-
import React126, { useEffect as useEffect27, useState as
|
|
12715
|
+
import React126, { useEffect as useEffect27, useState as useState42 } from "react";
|
|
12656
12716
|
import { Divider as Divider11, Stack as Stack95, Text as Text69, Group as Group41, ActionIcon as ActionIcon17, Paper as Paper12 } from "@mantine/core";
|
|
12657
12717
|
import { IconTrash as IconTrash5 } from "@tabler/icons-react";
|
|
12658
12718
|
var GeneralTab5 = ({
|
|
@@ -12681,17 +12741,17 @@ var GeneralTab5 = ({
|
|
|
12681
12741
|
editor,
|
|
12682
12742
|
blockId
|
|
12683
12743
|
}) => {
|
|
12684
|
-
const [localTitle, setLocalTitle] =
|
|
12685
|
-
const [localDescription, setLocalDescription] =
|
|
12686
|
-
const [localChannel, setLocalChannel] =
|
|
12687
|
-
const [localTo, setLocalTo] =
|
|
12688
|
-
const [localCc, setLocalCc] =
|
|
12689
|
-
const [localBcc, setLocalBcc] =
|
|
12690
|
-
const [localSubject, setLocalSubject] =
|
|
12691
|
-
const [localBody, setLocalBody] =
|
|
12692
|
-
const [localBodyType, setLocalBodyType] =
|
|
12693
|
-
const [localFrom, setLocalFrom] =
|
|
12694
|
-
const [localReplyTo, setLocalReplyTo] =
|
|
12744
|
+
const [localTitle, setLocalTitle] = useState42(title || "");
|
|
12745
|
+
const [localDescription, setLocalDescription] = useState42(description || "");
|
|
12746
|
+
const [localChannel, setLocalChannel] = useState42(channel || "email");
|
|
12747
|
+
const [localTo, setLocalTo] = useState42(to || []);
|
|
12748
|
+
const [localCc, setLocalCc] = useState42(cc || []);
|
|
12749
|
+
const [localBcc, setLocalBcc] = useState42(bcc || []);
|
|
12750
|
+
const [localSubject, setLocalSubject] = useState42(subject || "");
|
|
12751
|
+
const [localBody, setLocalBody] = useState42(body || "");
|
|
12752
|
+
const [localBodyType, setLocalBodyType] = useState42(bodyType || "text");
|
|
12753
|
+
const [localFrom, setLocalFrom] = useState42(from || "");
|
|
12754
|
+
const [localReplyTo, setLocalReplyTo] = useState42(replyTo || "");
|
|
12695
12755
|
useEffect27(() => setLocalTitle(title || ""), [title]);
|
|
12696
12756
|
useEffect27(() => setLocalDescription(description || ""), [description]);
|
|
12697
12757
|
useEffect27(() => setLocalChannel(channel || "email"), [channel]);
|
|
@@ -12994,13 +13054,13 @@ var NotifyTemplateView = ({ editor, block }) => {
|
|
|
12994
13054
|
};
|
|
12995
13055
|
|
|
12996
13056
|
// src/mantine/blocks/notify/flow/FlowView.tsx
|
|
12997
|
-
import React129, { useState as
|
|
13057
|
+
import React129, { useState as useState43 } from "react";
|
|
12998
13058
|
import { Group as Group43, Stack as Stack97, Text as Text71, ActionIcon as ActionIcon18, Tooltip as Tooltip11, Button as Button28, Badge as Badge18, Collapse as Collapse7, Alert as Alert14, Loader as Loader9, Code as Code5 } from "@mantine/core";
|
|
12999
13059
|
import { IconSend as IconSend3, IconChevronDown as IconChevronDown7, IconChevronUp as IconChevronUp4, IconCheck as IconCheck2, IconX as IconX7 } from "@tabler/icons-react";
|
|
13000
13060
|
var NotifyFlowView = ({ editor, block, isDisabled }) => {
|
|
13001
13061
|
const disabled = isDisabled?.isDisabled === "disable";
|
|
13002
|
-
const [isLoading, setIsLoading] =
|
|
13003
|
-
const [showDetails, setShowDetails] =
|
|
13062
|
+
const [isLoading, setIsLoading] = useState43(false);
|
|
13063
|
+
const [showDetails, setShowDetails] = useState43(false);
|
|
13004
13064
|
let handlers = null;
|
|
13005
13065
|
try {
|
|
13006
13066
|
handlers = useBlocknoteHandlers();
|
|
@@ -13221,10 +13281,10 @@ import { Group as Group44, Stack as Stack99, Text as Text73 } from "@mantine/cor
|
|
|
13221
13281
|
import React134, { useCallback as useCallback28 } from "react";
|
|
13222
13282
|
|
|
13223
13283
|
// src/mantine/blocks/claim/template/GeneralTab.tsx
|
|
13224
|
-
import React133, { useEffect as useEffect29, useState as
|
|
13284
|
+
import React133, { useEffect as useEffect29, useState as useState45, useCallback as useCallback27, useMemo as useMemo26 } from "react";
|
|
13225
13285
|
|
|
13226
13286
|
// src/mantine/components/CollectionSelector.tsx
|
|
13227
|
-
import React132, { useState as
|
|
13287
|
+
import React132, { useState as useState44, useEffect as useEffect28 } from "react";
|
|
13228
13288
|
import { Stack as Stack98, Text as Text72, Checkbox as Checkbox11, Loader as Loader10, Alert as Alert15 } from "@mantine/core";
|
|
13229
13289
|
var CollectionSelector = ({
|
|
13230
13290
|
did,
|
|
@@ -13235,10 +13295,10 @@ var CollectionSelector = ({
|
|
|
13235
13295
|
currentAdminAddress
|
|
13236
13296
|
}) => {
|
|
13237
13297
|
const handlers = useBlocknoteHandlers();
|
|
13238
|
-
const [localDid, setLocalDid] =
|
|
13239
|
-
const [collections, setCollections] =
|
|
13240
|
-
const [loading, setLoading] =
|
|
13241
|
-
const [error, setError] =
|
|
13298
|
+
const [localDid, setLocalDid] = useState44(did || "");
|
|
13299
|
+
const [collections, setCollections] = useState44([]);
|
|
13300
|
+
const [loading, setLoading] = useState44(false);
|
|
13301
|
+
const [error, setError] = useState44(null);
|
|
13242
13302
|
useEffect28(() => {
|
|
13243
13303
|
setLocalDid(did || "");
|
|
13244
13304
|
}, [did]);
|
|
@@ -13318,8 +13378,8 @@ var GeneralTab6 = ({
|
|
|
13318
13378
|
onSelectedCollectionsChange,
|
|
13319
13379
|
onAdminAddressChange
|
|
13320
13380
|
}) => {
|
|
13321
|
-
const [localTitle, setLocalTitle] =
|
|
13322
|
-
const [localDescription, setLocalDescription] =
|
|
13381
|
+
const [localTitle, setLocalTitle] = useState45(title || "");
|
|
13382
|
+
const [localDescription, setLocalDescription] = useState45(description || "");
|
|
13323
13383
|
useEffect29(() => {
|
|
13324
13384
|
setLocalTitle(title || "");
|
|
13325
13385
|
}, [title]);
|
|
@@ -13466,14 +13526,14 @@ import React149, { useMemo as useMemo42, useRef as useRef9, useEffect as useEffe
|
|
|
13466
13526
|
import { Stack as Stack111, Text as Text85, Loader as Loader18, Center as Center9, Alert as Alert20, Title as Title6, Flex as Flex27, ActionIcon as ActionIcon25 } from "@mantine/core";
|
|
13467
13527
|
|
|
13468
13528
|
// src/mantine/hooks/useCurrentUser.ts
|
|
13469
|
-
import { useState as
|
|
13529
|
+
import { useState as useState46, useEffect as useEffect30, useRef as useRef5 } from "react";
|
|
13470
13530
|
function useCurrentUser() {
|
|
13471
13531
|
const { getCurrentUser } = useBlocknoteHandlers();
|
|
13472
13532
|
const getCurrentUserRef = useRef5(getCurrentUser);
|
|
13473
13533
|
useEffect30(() => {
|
|
13474
13534
|
getCurrentUserRef.current = getCurrentUser;
|
|
13475
13535
|
}, [getCurrentUser]);
|
|
13476
|
-
const [userAddress, setUserAddress] =
|
|
13536
|
+
const [userAddress, setUserAddress] = useState46("");
|
|
13477
13537
|
useEffect30(() => {
|
|
13478
13538
|
const fetchUserAddress = () => {
|
|
13479
13539
|
try {
|
|
@@ -13489,16 +13549,16 @@ function useCurrentUser() {
|
|
|
13489
13549
|
}
|
|
13490
13550
|
|
|
13491
13551
|
// src/mantine/hooks/useCollections.ts
|
|
13492
|
-
import { useState as
|
|
13552
|
+
import { useState as useState47, useEffect as useEffect31, useCallback as useCallback29, useRef as useRef6, useMemo as useMemo28 } from "react";
|
|
13493
13553
|
function useCollections(did, selectedCollectionIds, block, editor) {
|
|
13494
13554
|
const { getClaimCollections } = useBlocknoteHandlers();
|
|
13495
13555
|
const getClaimCollectionsRef = useRef6(getClaimCollections);
|
|
13496
13556
|
useEffect31(() => {
|
|
13497
13557
|
getClaimCollectionsRef.current = getClaimCollections;
|
|
13498
13558
|
}, [getClaimCollections]);
|
|
13499
|
-
const [collections, setCollections] =
|
|
13500
|
-
const [loading, setLoading] =
|
|
13501
|
-
const [error, setError] =
|
|
13559
|
+
const [collections, setCollections] = useState47([]);
|
|
13560
|
+
const [loading, setLoading] = useState47(false);
|
|
13561
|
+
const [error, setError] = useState47(null);
|
|
13502
13562
|
const adminAddressUpdatedRef = useRef6(false);
|
|
13503
13563
|
const selectedCollectionIdsStr = useMemo28(() => JSON.stringify(selectedCollectionIds.sort()), [selectedCollectionIds]);
|
|
13504
13564
|
const fetchCollections = useCallback29(async () => {
|
|
@@ -13547,7 +13607,7 @@ import React148 from "react";
|
|
|
13547
13607
|
import { Stack as Stack110, Text as Text84, Loader as Loader17, Center as Center8 } from "@mantine/core";
|
|
13548
13608
|
|
|
13549
13609
|
// src/mantine/hooks/useUserRoles.ts
|
|
13550
|
-
import { useState as
|
|
13610
|
+
import { useState as useState48, useEffect as useEffect32, useMemo as useMemo29, useRef as useRef7 } from "react";
|
|
13551
13611
|
|
|
13552
13612
|
// src/mantine/hooks/utils.ts
|
|
13553
13613
|
function isClientFulfillmentError(error) {
|
|
@@ -13562,8 +13622,8 @@ function useUserRoles(collections, userAddress, adminAddress, deedId) {
|
|
|
13562
13622
|
useEffect32(() => {
|
|
13563
13623
|
getUserRolesRef.current = getUserRoles;
|
|
13564
13624
|
}, [getUserRoles]);
|
|
13565
|
-
const [userRoles, setUserRoles] =
|
|
13566
|
-
const [loading, setLoading] =
|
|
13625
|
+
const [userRoles, setUserRoles] = useState48({});
|
|
13626
|
+
const [loading, setLoading] = useState48(true);
|
|
13567
13627
|
const failedRequestKeyRef = useRef7(null);
|
|
13568
13628
|
const collectionIdsKey = useMemo29(
|
|
13569
13629
|
() => collections.map((c) => c.id).sort().join("|"),
|
|
@@ -13637,7 +13697,7 @@ import React137, { useMemo as useMemo31 } from "react";
|
|
|
13637
13697
|
import { Stack as Stack101, Text as Text75, ActionIcon as ActionIcon20, Tooltip as Tooltip12 } from "@mantine/core";
|
|
13638
13698
|
|
|
13639
13699
|
// src/mantine/blocks/claim/flow/ClaimsListSheet.tsx
|
|
13640
|
-
import React136, { useState as
|
|
13700
|
+
import React136, { useState as useState49, useEffect as useEffect33, useCallback as useCallback30, useMemo as useMemo30 } from "react";
|
|
13641
13701
|
import { Loader as Loader11, Stack as Stack100, Text as Text74, ActionIcon as ActionIcon19, Alert as Alert16, Box as Box31, Group as Group45 } from "@mantine/core";
|
|
13642
13702
|
import { IconArrowLeft as IconArrowLeft3, IconAlertCircle } from "@tabler/icons-react";
|
|
13643
13703
|
import { Survey, SurveyModel } from "@ixo/surveys";
|
|
@@ -13756,13 +13816,13 @@ var surveyTheme = {
|
|
|
13756
13816
|
var ClaimsListSheet = ({ collectionId, collectionName, deedId, adminAddress, userAddress, onSubmitComplete, execution }) => {
|
|
13757
13817
|
const { closePanel } = usePanelStore();
|
|
13758
13818
|
const handlers = useBlocknoteHandlers();
|
|
13759
|
-
const [viewMode, setViewMode] =
|
|
13760
|
-
const [claims, setClaims] =
|
|
13761
|
-
const [loading, setLoading] =
|
|
13762
|
-
const [error, setError] =
|
|
13763
|
-
const [surveyJson, setSurveyJson] =
|
|
13764
|
-
const [surveyLoading, setSurveyLoading] =
|
|
13765
|
-
const [surveyError, setSurveyError] =
|
|
13819
|
+
const [viewMode, setViewMode] = useState49("list");
|
|
13820
|
+
const [claims, setClaims] = useState49([]);
|
|
13821
|
+
const [loading, setLoading] = useState49(true);
|
|
13822
|
+
const [error, setError] = useState49(null);
|
|
13823
|
+
const [surveyJson, setSurveyJson] = useState49(null);
|
|
13824
|
+
const [surveyLoading, setSurveyLoading] = useState49(false);
|
|
13825
|
+
const [surveyError, setSurveyError] = useState49(null);
|
|
13766
13826
|
console.log("[ClaimsListSheet] render", { collectionId, collectionName, deedId, adminAddress, userAddress, viewMode });
|
|
13767
13827
|
const fetchClaims = useCallback30(async () => {
|
|
13768
13828
|
console.log("[ClaimsListSheet] fetchClaims start", { collectionId, userAddress });
|
|
@@ -14076,7 +14136,7 @@ import { Stack as Stack106, Text as Text80, Button as Button30, Menu as Menu4, B
|
|
|
14076
14136
|
import { IconChevronDown as IconChevronDown8, IconArrowRight as IconArrowRight3, IconLock } from "@tabler/icons-react";
|
|
14077
14137
|
|
|
14078
14138
|
// src/mantine/hooks/useBlockAuthorization.ts
|
|
14079
|
-
import { useState as
|
|
14139
|
+
import { useState as useState50, useEffect as useEffect34, useMemo as useMemo32 } from "react";
|
|
14080
14140
|
function useBlockAuthorization({
|
|
14081
14141
|
editor,
|
|
14082
14142
|
flowNode,
|
|
@@ -14084,9 +14144,9 @@ function useBlockAuthorization({
|
|
|
14084
14144
|
flowUri
|
|
14085
14145
|
}) {
|
|
14086
14146
|
const handlers = useBlocknoteHandlers();
|
|
14087
|
-
const [result, setResult] =
|
|
14088
|
-
const [loading, setLoading] =
|
|
14089
|
-
const [checkTrigger, setCheckTrigger] =
|
|
14147
|
+
const [result, setResult] = useState50({ authorized: true });
|
|
14148
|
+
const [loading, setLoading] = useState50(true);
|
|
14149
|
+
const [checkTrigger, setCheckTrigger] = useState50(0);
|
|
14090
14150
|
const flowOwnerDid = useMemo32(() => editor.getFlowOwnerDid?.() || "", [editor]);
|
|
14091
14151
|
const entityDid = useMemo32(() => handlers.getEntityDid?.() || "", [handlers]);
|
|
14092
14152
|
const rootIssuer = flowOwnerDid || entityDid;
|
|
@@ -14156,14 +14216,14 @@ import { Loader as Loader12, Stack as Stack102, Text as Text76 } from "@mantine/
|
|
|
14156
14216
|
import { Survey as Survey2 } from "@ixo/surveys";
|
|
14157
14217
|
|
|
14158
14218
|
// src/mantine/blocks/bid/flow/hooks/useBidSurvey.ts
|
|
14159
|
-
import { useState as
|
|
14219
|
+
import { useState as useState51, useEffect as useEffect35, useMemo as useMemo33, useCallback as useCallback31 } from "react";
|
|
14160
14220
|
import { SurveyModel as SurveyModel2 } from "@ixo/surveys";
|
|
14161
14221
|
function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, executeHookedActions) {
|
|
14162
14222
|
const handlers = useBlocknoteHandlers();
|
|
14163
14223
|
const { closePanel } = usePanelStore();
|
|
14164
|
-
const [surveyJson, setSurveyJson] =
|
|
14165
|
-
const [loading, setLoading] =
|
|
14166
|
-
const [error, setError] =
|
|
14224
|
+
const [surveyJson, setSurveyJson] = useState51(null);
|
|
14225
|
+
const [loading, setLoading] = useState51(true);
|
|
14226
|
+
const [error, setError] = useState51(null);
|
|
14167
14227
|
useEffect35(() => {
|
|
14168
14228
|
const fetchSurveyTemplate = async () => {
|
|
14169
14229
|
try {
|
|
@@ -14232,7 +14292,8 @@ function useBidSurvey(deedId, collectionId, role, onSubmitComplete, execution, e
|
|
|
14232
14292
|
role,
|
|
14233
14293
|
submitterDid: execution.actorDid,
|
|
14234
14294
|
deedDid: deedId,
|
|
14235
|
-
status: "pending"
|
|
14295
|
+
status: "pending",
|
|
14296
|
+
surveyAnswers: surveyData
|
|
14236
14297
|
});
|
|
14237
14298
|
closePanel();
|
|
14238
14299
|
onSubmitComplete?.();
|
|
@@ -14307,13 +14368,13 @@ import { Stack as Stack104, Text as Text78, Badge as Badge19, Group as Group47,
|
|
|
14307
14368
|
import { IconArrowRight as IconArrowRight2 } from "@tabler/icons-react";
|
|
14308
14369
|
|
|
14309
14370
|
// src/mantine/blocks/bid/flow/components/BidViewPanel.tsx
|
|
14310
|
-
import React139, { useMemo as useMemo36, useState as
|
|
14371
|
+
import React139, { useMemo as useMemo36, useState as useState54 } from "react";
|
|
14311
14372
|
import { Loader as Loader13, Stack as Stack103, Text as Text77, Button as Button29, Group as Group46, Modal as Modal2, Alert as Alert17 } from "@mantine/core";
|
|
14312
14373
|
import { Survey as Survey3 } from "@ixo/surveys";
|
|
14313
14374
|
import { IconCheck as IconCheck3, IconX as IconX8, IconAlertCircle as IconAlertCircle2 } from "@tabler/icons-react";
|
|
14314
14375
|
|
|
14315
14376
|
// src/mantine/blocks/bid/flow/hooks/useBidView.ts
|
|
14316
|
-
import { useState as
|
|
14377
|
+
import { useState as useState52, useEffect as useEffect37, useMemo as useMemo35 } from "react";
|
|
14317
14378
|
import { SurveyModel as SurveyModel3 } from "@ixo/surveys";
|
|
14318
14379
|
|
|
14319
14380
|
// src/mantine/blocks/bid/flow/utils.ts
|
|
@@ -14343,9 +14404,9 @@ function parseBidData(data) {
|
|
|
14343
14404
|
// src/mantine/blocks/bid/flow/hooks/useBidView.ts
|
|
14344
14405
|
function useBidView(bid, deedId) {
|
|
14345
14406
|
const handlers = useBlocknoteHandlers();
|
|
14346
|
-
const [surveyJson, setSurveyJson] =
|
|
14347
|
-
const [loading, setLoading] =
|
|
14348
|
-
const [error, setError] =
|
|
14407
|
+
const [surveyJson, setSurveyJson] = useState52(null);
|
|
14408
|
+
const [loading, setLoading] = useState52(true);
|
|
14409
|
+
const [error, setError] = useState52(null);
|
|
14349
14410
|
useEffect37(() => {
|
|
14350
14411
|
const fetchSurveyTemplate = async () => {
|
|
14351
14412
|
try {
|
|
@@ -14388,12 +14449,12 @@ function useBidView(bid, deedId) {
|
|
|
14388
14449
|
}
|
|
14389
14450
|
|
|
14390
14451
|
// src/mantine/blocks/bid/flow/hooks/useBidActions.ts
|
|
14391
|
-
import { useState as
|
|
14452
|
+
import { useState as useState53, useCallback as useCallback32 } from "react";
|
|
14392
14453
|
function useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeHookedActions) {
|
|
14393
14454
|
const handlers = useBlocknoteHandlers();
|
|
14394
14455
|
const { closePanel } = usePanelStore();
|
|
14395
|
-
const [loading, setLoading] =
|
|
14396
|
-
const [error, setError] =
|
|
14456
|
+
const [loading, setLoading] = useState53(false);
|
|
14457
|
+
const [error, setError] = useState53(null);
|
|
14397
14458
|
const approveBid = useCallback32(async () => {
|
|
14398
14459
|
try {
|
|
14399
14460
|
setLoading(true);
|
|
@@ -14534,8 +14595,8 @@ var BidViewPanel = ({ bid, deedId, adminAddress, onRefresh, execution, executeHo
|
|
|
14534
14595
|
error: actionError,
|
|
14535
14596
|
setError: setActionError
|
|
14536
14597
|
} = useBidActions(bid, deedId, adminAddress, execution, onRefresh, executeHookedActions);
|
|
14537
|
-
const [rejectModalOpen, setRejectModalOpen] =
|
|
14538
|
-
const [rejectReason, setRejectReason] =
|
|
14598
|
+
const [rejectModalOpen, setRejectModalOpen] = useState54(false);
|
|
14599
|
+
const [rejectReason, setRejectReason] = useState54("");
|
|
14539
14600
|
const surveyContainerStyle = useMemo36(
|
|
14540
14601
|
() => ({
|
|
14541
14602
|
flex: 1,
|
|
@@ -14561,11 +14622,11 @@ var BidViewPanel = ({ bid, deedId, adminAddress, onRefresh, execution, executeHo
|
|
|
14561
14622
|
};
|
|
14562
14623
|
|
|
14563
14624
|
// src/mantine/hooks/useUserProfile.ts
|
|
14564
|
-
import { useState as
|
|
14625
|
+
import { useState as useState55, useEffect as useEffect38 } from "react";
|
|
14565
14626
|
function useUserProfile(did) {
|
|
14566
14627
|
const handlers = useBlocknoteHandlers();
|
|
14567
|
-
const [userProfile, setUserProfile] =
|
|
14568
|
-
const [loading, setLoading] =
|
|
14628
|
+
const [userProfile, setUserProfile] = useState55(null);
|
|
14629
|
+
const [loading, setLoading] = useState55(false);
|
|
14569
14630
|
useEffect38(() => {
|
|
14570
14631
|
const fetchUserProfile = async () => {
|
|
14571
14632
|
if (!did) return;
|
|
@@ -14601,12 +14662,12 @@ var BidItem = ({ bid, deedId, adminAddress, onRefresh, execution, executeHookedA
|
|
|
14601
14662
|
};
|
|
14602
14663
|
|
|
14603
14664
|
// src/mantine/blocks/bid/flow/hooks/useBids.ts
|
|
14604
|
-
import { useState as
|
|
14665
|
+
import { useState as useState56, useEffect as useEffect39, useCallback as useCallback33 } from "react";
|
|
14605
14666
|
function useBids(collectionId) {
|
|
14606
14667
|
const handlers = useBlocknoteHandlers();
|
|
14607
|
-
const [bids, setBids] =
|
|
14608
|
-
const [loading, setLoading] =
|
|
14609
|
-
const [error, setError] =
|
|
14668
|
+
const [bids, setBids] = useState56([]);
|
|
14669
|
+
const [loading, setLoading] = useState56(true);
|
|
14670
|
+
const [error, setError] = useState56(null);
|
|
14610
14671
|
const fetchBids = useCallback33(async () => {
|
|
14611
14672
|
if (!collectionId) {
|
|
14612
14673
|
setLoading(false);
|
|
@@ -14839,7 +14900,7 @@ import React147, { useMemo as useMemo41, useEffect as useEffect41, useRef as use
|
|
|
14839
14900
|
import { Stack as Stack109, Text as Text83, ActionIcon as ActionIcon24, Tooltip as Tooltip15 } from "@mantine/core";
|
|
14840
14901
|
|
|
14841
14902
|
// src/mantine/blocks/evaluator/flow/ClaimsList.tsx
|
|
14842
|
-
import React146, { useState as
|
|
14903
|
+
import React146, { useState as useState57, useEffect as useEffect40, useCallback as useCallback35, useMemo as useMemo40 } from "react";
|
|
14843
14904
|
import { Paper as Paper14, CloseButton as CloseButton5, Title as Title5, Loader as Loader16, Stack as Stack108, Text as Text82, ActionIcon as ActionIcon23, Alert as Alert19, Badge as Badge22, Group as Group49, Button as Button31, Divider as Divider13, Tabs as Tabs3, ScrollArea as ScrollArea6 } from "@mantine/core";
|
|
14844
14905
|
import { IconAlertCircle as IconAlertCircle4, IconArrowRight as IconArrowRight4, IconRefresh as IconRefresh3, IconArrowLeft as IconArrowLeft4, IconFileText as IconFileText3, IconRobot as IconRobot3, IconChecklist as IconChecklist3 } from "@tabler/icons-react";
|
|
14845
14906
|
import { Survey as Survey4, SurveyModel as SurveyModel4 } from "@ixo/surveys";
|
|
@@ -15285,20 +15346,20 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
15285
15346
|
const { closePanel } = usePanelStore();
|
|
15286
15347
|
const handlers = useBlocknoteHandlers();
|
|
15287
15348
|
const { editor } = useBlocknoteContext();
|
|
15288
|
-
const [viewMode, setViewMode] =
|
|
15289
|
-
const [claims, setClaims] =
|
|
15290
|
-
const [loading, setLoading] =
|
|
15291
|
-
const [error, setError] =
|
|
15292
|
-
const [selectedClaim, setSelectedClaim] =
|
|
15293
|
-
const [claimData, setClaimData] =
|
|
15294
|
-
const [surveyJson, setSurveyJson] =
|
|
15295
|
-
const [surveyLoading, setSurveyLoading] =
|
|
15296
|
-
const [surveyError, setSurveyError] =
|
|
15297
|
-
const [evaluating, setEvaluating] =
|
|
15298
|
-
const [rubricData, setRubricData] =
|
|
15299
|
-
const [evaluationResult, setEvaluationResult] =
|
|
15300
|
-
const [evaluationLoading, setEvaluationLoading] =
|
|
15301
|
-
const [activeTab, setActiveTab] =
|
|
15349
|
+
const [viewMode, setViewMode] = useState57("list");
|
|
15350
|
+
const [claims, setClaims] = useState57([]);
|
|
15351
|
+
const [loading, setLoading] = useState57(true);
|
|
15352
|
+
const [error, setError] = useState57(null);
|
|
15353
|
+
const [selectedClaim, setSelectedClaim] = useState57(null);
|
|
15354
|
+
const [claimData, setClaimData] = useState57(null);
|
|
15355
|
+
const [surveyJson, setSurveyJson] = useState57(null);
|
|
15356
|
+
const [surveyLoading, setSurveyLoading] = useState57(false);
|
|
15357
|
+
const [surveyError, setSurveyError] = useState57(null);
|
|
15358
|
+
const [evaluating, setEvaluating] = useState57(false);
|
|
15359
|
+
const [rubricData, setRubricData] = useState57(null);
|
|
15360
|
+
const [evaluationResult, setEvaluationResult] = useState57(null);
|
|
15361
|
+
const [evaluationLoading, setEvaluationLoading] = useState57(false);
|
|
15362
|
+
const [activeTab, setActiveTab] = useState57("submission");
|
|
15302
15363
|
const fetchClaims = useCallback35(async () => {
|
|
15303
15364
|
try {
|
|
15304
15365
|
setLoading(true);
|
|
@@ -15697,8 +15758,8 @@ var ClaimsList = ({ collectionId, collectionName, deedId, adminAddress, onEvalua
|
|
|
15697
15758
|
};
|
|
15698
15759
|
var ClaimListItem = ({ claim, onViewClaim }) => {
|
|
15699
15760
|
const handlers = useBlocknoteHandlers();
|
|
15700
|
-
const [userProfile, setUserProfile] =
|
|
15701
|
-
const [loadingProfile, setLoadingProfile] =
|
|
15761
|
+
const [userProfile, setUserProfile] = useState57(null);
|
|
15762
|
+
const [loadingProfile, setLoadingProfile] = useState57(false);
|
|
15702
15763
|
useEffect40(() => {
|
|
15703
15764
|
const fetchUserProfile = async () => {
|
|
15704
15765
|
if (!claim.agentDid) return;
|
|
@@ -16055,7 +16116,7 @@ import { Group as Group50, Stack as Stack112, Text as Text86 } from "@mantine/co
|
|
|
16055
16116
|
import React153, { useCallback as useCallback38 } from "react";
|
|
16056
16117
|
|
|
16057
16118
|
// src/mantine/blocks/bid/template/GeneralTab.tsx
|
|
16058
|
-
import React152, { useEffect as useEffect43, useState as
|
|
16119
|
+
import React152, { useEffect as useEffect43, useState as useState58, useCallback as useCallback37, useMemo as useMemo43 } from "react";
|
|
16059
16120
|
var GeneralTab7 = ({
|
|
16060
16121
|
title,
|
|
16061
16122
|
description,
|
|
@@ -16068,8 +16129,8 @@ var GeneralTab7 = ({
|
|
|
16068
16129
|
onSelectedCollectionsChange,
|
|
16069
16130
|
onAdminAddressChange
|
|
16070
16131
|
}) => {
|
|
16071
|
-
const [localTitle, setLocalTitle] =
|
|
16072
|
-
const [localDescription, setLocalDescription] =
|
|
16132
|
+
const [localTitle, setLocalTitle] = useState58(title || "");
|
|
16133
|
+
const [localDescription, setLocalDescription] = useState58(description || "");
|
|
16073
16134
|
useEffect43(() => {
|
|
16074
16135
|
setLocalTitle(title || "");
|
|
16075
16136
|
}, [title]);
|
|
@@ -16178,8 +16239,26 @@ var bidActions = [
|
|
|
16178
16239
|
label: "Status",
|
|
16179
16240
|
type: "string",
|
|
16180
16241
|
description: "The bid status (pending)"
|
|
16242
|
+
},
|
|
16243
|
+
{
|
|
16244
|
+
key: "surveyAnswers",
|
|
16245
|
+
label: "Survey Answers",
|
|
16246
|
+
type: "object",
|
|
16247
|
+
description: "All submitted survey form answers (use dot notation for individual fields)"
|
|
16181
16248
|
}
|
|
16182
|
-
]
|
|
16249
|
+
],
|
|
16250
|
+
resolveDynamicFields: async ({ handlers, blockProps }) => {
|
|
16251
|
+
const deedDid = blockProps.did;
|
|
16252
|
+
if (!deedDid || !handlers.getBidContributorSurveyTemplate) return [];
|
|
16253
|
+
try {
|
|
16254
|
+
const result = await handlers.getBidContributorSurveyTemplate(deedDid);
|
|
16255
|
+
if (!result?.surveyTemplate) return [];
|
|
16256
|
+
const schema = typeof result.surveyTemplate === "string" ? JSON.parse(result.surveyTemplate) : result.surveyTemplate;
|
|
16257
|
+
return surveyFieldsToPayloadFields(schema);
|
|
16258
|
+
} catch {
|
|
16259
|
+
return [];
|
|
16260
|
+
}
|
|
16261
|
+
}
|
|
16183
16262
|
},
|
|
16184
16263
|
{
|
|
16185
16264
|
actionId: "approve",
|
|
@@ -16573,7 +16652,7 @@ import { Group as Group51, Stack as Stack114, Text as Text88 } from "@mantine/co
|
|
|
16573
16652
|
import React159, { useCallback as useCallback41 } from "react";
|
|
16574
16653
|
|
|
16575
16654
|
// src/mantine/blocks/evaluator/template/GeneralTab.tsx
|
|
16576
|
-
import React158, { useEffect as useEffect45, useState as
|
|
16655
|
+
import React158, { useEffect as useEffect45, useState as useState59, useCallback as useCallback40, useMemo as useMemo46 } from "react";
|
|
16577
16656
|
var GeneralTab8 = ({
|
|
16578
16657
|
title,
|
|
16579
16658
|
description,
|
|
@@ -16586,8 +16665,8 @@ var GeneralTab8 = ({
|
|
|
16586
16665
|
onSelectedCollectionsChange,
|
|
16587
16666
|
onAdminAddressChange
|
|
16588
16667
|
}) => {
|
|
16589
|
-
const [localTitle, setLocalTitle] =
|
|
16590
|
-
const [localDescription, setLocalDescription] =
|
|
16668
|
+
const [localTitle, setLocalTitle] = useState59(title || "");
|
|
16669
|
+
const [localDescription, setLocalDescription] = useState59(description || "");
|
|
16591
16670
|
useEffect45(() => {
|
|
16592
16671
|
setLocalTitle(title || "");
|
|
16593
16672
|
}, [title]);
|
|
@@ -16799,13 +16878,13 @@ import React165 from "react";
|
|
|
16799
16878
|
import { createReactBlockSpec as createReactBlockSpec12 } from "@blocknote/react";
|
|
16800
16879
|
|
|
16801
16880
|
// src/mantine/blocks/visualization/VisualizationBlock.tsx
|
|
16802
|
-
import React164, { useMemo as useMemo49, useCallback as useCallback42, useRef as useRef11, useState as
|
|
16881
|
+
import React164, { useMemo as useMemo49, useCallback as useCallback42, useRef as useRef11, useState as useState60, useEffect as useEffect46 } from "react";
|
|
16803
16882
|
import { Box as Box34, Stack as Stack116, Text as Text90, Paper as Paper15, Group as Group52 } from "@mantine/core";
|
|
16804
16883
|
function VisualizationBlock({ block, editor }) {
|
|
16805
16884
|
const { visualizationRenderer } = useBlocknoteContext();
|
|
16806
16885
|
const { vizType, config, title, preferences } = block.props;
|
|
16807
16886
|
const containerRef = useRef11(null);
|
|
16808
|
-
const [hasValidDimensions, setHasValidDimensions] =
|
|
16887
|
+
const [hasValidDimensions, setHasValidDimensions] = useState60(false);
|
|
16809
16888
|
useEffect46(() => {
|
|
16810
16889
|
const container = containerRef.current;
|
|
16811
16890
|
if (!container) return;
|
|
@@ -16905,11 +16984,11 @@ import { Badge as Badge23, Group as Group53, Stack as Stack117, Text as Text91 }
|
|
|
16905
16984
|
import React167, { useCallback as useCallback43 } from "react";
|
|
16906
16985
|
|
|
16907
16986
|
// src/mantine/blocks/domainCreator/template/GeneralTab.tsx
|
|
16908
|
-
import React166, { useEffect as useEffect47, useState as
|
|
16987
|
+
import React166, { useEffect as useEffect47, useState as useState61 } from "react";
|
|
16909
16988
|
var GeneralTab9 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
|
|
16910
|
-
const [localTitle, setLocalTitle] =
|
|
16911
|
-
const [localDescription, setLocalDescription] =
|
|
16912
|
-
const [localIcon, setLocalIcon] =
|
|
16989
|
+
const [localTitle, setLocalTitle] = useState61(title || "");
|
|
16990
|
+
const [localDescription, setLocalDescription] = useState61(description || "");
|
|
16991
|
+
const [localIcon, setLocalIcon] = useState61(icon || "file-text");
|
|
16913
16992
|
useEffect47(() => setLocalTitle(title || ""), [title]);
|
|
16914
16993
|
useEffect47(() => setLocalDescription(description || ""), [description]);
|
|
16915
16994
|
useEffect47(() => setLocalIcon(icon || "file-text"), [icon]);
|
|
@@ -17008,12 +17087,12 @@ var DomainCreatorTemplateView = ({ editor, block }) => {
|
|
|
17008
17087
|
};
|
|
17009
17088
|
|
|
17010
17089
|
// src/mantine/blocks/domainCreator/flow/FlowView.tsx
|
|
17011
|
-
import React170, { useCallback as useCallback45, useMemo as useMemo52, useState as
|
|
17090
|
+
import React170, { useCallback as useCallback45, useMemo as useMemo52, useState as useState63 } from "react";
|
|
17012
17091
|
import { ActionIcon as ActionIcon28, Badge as Badge24, Group as Group55, Stack as Stack119, Text as Text93, Tooltip as Tooltip16 } from "@mantine/core";
|
|
17013
17092
|
import { IconChevronRight as IconChevronRight6, IconCheck as IconCheck6, IconAlertCircle as IconAlertCircle9 } from "@tabler/icons-react";
|
|
17014
17093
|
|
|
17015
17094
|
// src/mantine/blocks/domainCreator/flow/DomainCreatorSurveyPanel.tsx
|
|
17016
|
-
import React169, { useCallback as useCallback44, useEffect as useEffect48, useMemo as useMemo51, useRef as useRef12, useState as
|
|
17095
|
+
import React169, { useCallback as useCallback44, useEffect as useEffect48, useMemo as useMemo51, useRef as useRef12, useState as useState62 } from "react";
|
|
17017
17096
|
import { Alert as Alert23, Button as Button32, Group as Group54, Loader as Loader21, Stack as Stack118, Text as Text92 } from "@mantine/core";
|
|
17018
17097
|
import { useDebouncedCallback } from "@mantine/hooks";
|
|
17019
17098
|
import { IconAlertCircle as IconAlertCircle8, IconCheck as IconCheck5 } from "@tabler/icons-react";
|
|
@@ -18074,10 +18153,10 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
|
|
|
18074
18153
|
const { handlers } = useBlocknoteContext();
|
|
18075
18154
|
const existingBlockEntityDid = block.props.entityDid;
|
|
18076
18155
|
const existingBlockEntityType = block.props.entityType;
|
|
18077
|
-
const [flowStep, setFlowStep] =
|
|
18078
|
-
const [error, setError] =
|
|
18079
|
-
const [createdEntityDid, setCreatedEntityDid] =
|
|
18080
|
-
const [createdEntityType, setCreatedEntityType] =
|
|
18156
|
+
const [flowStep, setFlowStep] = useState62(existingBlockEntityDid ? "success" : "survey");
|
|
18157
|
+
const [error, setError] = useState62(null);
|
|
18158
|
+
const [createdEntityDid, setCreatedEntityDid] = useState62(existingBlockEntityDid || null);
|
|
18159
|
+
const [createdEntityType, setCreatedEntityType] = useState62(existingBlockEntityType || null);
|
|
18081
18160
|
const isUpdatingFromProp = useRef12(false);
|
|
18082
18161
|
const lastSyncedAnswers = useRef12("");
|
|
18083
18162
|
const surveyModel = useMemo51(() => {
|
|
@@ -18310,8 +18389,8 @@ var DomainCreatorSurveyPanel = ({ editor, block, onComplete, entityDid: existing
|
|
|
18310
18389
|
// src/mantine/blocks/domainCreator/flow/FlowView.tsx
|
|
18311
18390
|
var DOMAIN_CREATOR_FLOW_PANEL_ID = "domain-creator-flow-panel";
|
|
18312
18391
|
var DomainCreatorFlowView = ({ editor, block }) => {
|
|
18313
|
-
const [hasOpened, setHasOpened] =
|
|
18314
|
-
const [submissionStatus, setSubmissionStatus] =
|
|
18392
|
+
const [hasOpened, setHasOpened] = useState63(false);
|
|
18393
|
+
const [submissionStatus, setSubmissionStatus] = useState63("idle");
|
|
18315
18394
|
const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
|
|
18316
18395
|
const hasExistingSubmission = lastSubmission?.entityDid;
|
|
18317
18396
|
const handleComplete = useCallback45(
|
|
@@ -18402,20 +18481,20 @@ import { Badge as Badge26, Group as Group57, Stack as Stack122, Text as Text96 }
|
|
|
18402
18481
|
import React175, { useCallback as useCallback48, useMemo as useMemo54 } from "react";
|
|
18403
18482
|
|
|
18404
18483
|
// src/mantine/blocks/email/template/GeneralTab.tsx
|
|
18405
|
-
import React173, { useEffect as useEffect49, useState as
|
|
18484
|
+
import React173, { useEffect as useEffect49, useState as useState64, useCallback as useCallback46, useRef as useRef13 } from "react";
|
|
18406
18485
|
import { Divider as Divider14, Loader as Loader22, Select as Select4, Stack as Stack120, Text as Text94 } from "@mantine/core";
|
|
18407
18486
|
var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplateChange, onFromChange, onToChange }) => {
|
|
18408
18487
|
const handlers = useBlocknoteHandlers();
|
|
18409
18488
|
const block = getCurrentBlock();
|
|
18410
18489
|
const blockProps = block.props;
|
|
18411
|
-
const [localTitle, setLocalTitle] =
|
|
18412
|
-
const [localTemplateName, setLocalTemplateName] =
|
|
18413
|
-
const [localFrom, setLocalFrom] =
|
|
18414
|
-
const [localTo, setLocalTo] =
|
|
18415
|
-
const [templates, setTemplates] =
|
|
18416
|
-
const [loadingTemplates, setLoadingTemplates] =
|
|
18417
|
-
const [loadingContent, setLoadingContent] =
|
|
18418
|
-
const [error, setError] =
|
|
18490
|
+
const [localTitle, setLocalTitle] = useState64(blockProps.title || "");
|
|
18491
|
+
const [localTemplateName, setLocalTemplateName] = useState64(blockProps.templateName || "");
|
|
18492
|
+
const [localFrom, setLocalFrom] = useState64(blockProps.from || "");
|
|
18493
|
+
const [localTo, setLocalTo] = useState64(blockProps.to || "");
|
|
18494
|
+
const [templates, setTemplates] = useState64([]);
|
|
18495
|
+
const [loadingTemplates, setLoadingTemplates] = useState64(false);
|
|
18496
|
+
const [loadingContent, setLoadingContent] = useState64(false);
|
|
18497
|
+
const [error, setError] = useState64(null);
|
|
18419
18498
|
useEffect49(() => {
|
|
18420
18499
|
const currentBlock = getCurrentBlock();
|
|
18421
18500
|
setLocalTitle(currentBlock.props.title || "");
|
|
@@ -18550,7 +18629,7 @@ var GeneralTab10 = ({ editor, blockId, getCurrentBlock, onTitleChange, onTemplat
|
|
|
18550
18629
|
};
|
|
18551
18630
|
|
|
18552
18631
|
// src/mantine/blocks/email/template/VariablesTab.tsx
|
|
18553
|
-
import React174, { useMemo as useMemo53, useCallback as useCallback47, useState as
|
|
18632
|
+
import React174, { useMemo as useMemo53, useCallback as useCallback47, useState as useState65, useEffect as useEffect50 } from "react";
|
|
18554
18633
|
import { Alert as Alert24, Badge as Badge25, Divider as Divider15, Group as Group56, Stack as Stack121, Text as Text95 } from "@mantine/core";
|
|
18555
18634
|
import { IconInfoCircle as IconInfoCircle4, IconCheck as IconCheck7 } from "@tabler/icons-react";
|
|
18556
18635
|
var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) => {
|
|
@@ -18570,7 +18649,7 @@ var VariablesTab = ({ editor, blockId, getCurrentBlock, onVariablesChange }) =>
|
|
|
18570
18649
|
return {};
|
|
18571
18650
|
}
|
|
18572
18651
|
}, [blockProps.variables]);
|
|
18573
|
-
const [localMapping, setLocalMapping] =
|
|
18652
|
+
const [localMapping, setLocalMapping] = useState65(parsedVariableMapping);
|
|
18574
18653
|
useEffect50(() => {
|
|
18575
18654
|
const currentBlock = getCurrentBlock();
|
|
18576
18655
|
try {
|
|
@@ -18712,10 +18791,10 @@ import { Group as Group58, Stack as Stack123, Text as Text97, ActionIcon as Acti
|
|
|
18712
18791
|
import { IconSend as IconSend4, IconCheck as IconCheck8, IconX as IconX10 } from "@tabler/icons-react";
|
|
18713
18792
|
|
|
18714
18793
|
// src/mantine/blocks/email/flow/hooks/useEmailActions.ts
|
|
18715
|
-
import { useState as
|
|
18794
|
+
import { useState as useState66, useCallback as useCallback49 } from "react";
|
|
18716
18795
|
function useEmailActions({ block, editor }) {
|
|
18717
18796
|
const handlers = useBlocknoteHandlers();
|
|
18718
|
-
const [loading, setLoading] =
|
|
18797
|
+
const [loading, setLoading] = useState66(false);
|
|
18719
18798
|
const updateBlockStatus = useCallback49(
|
|
18720
18799
|
(updates) => {
|
|
18721
18800
|
editor.updateBlock(block, {
|
|
@@ -18961,12 +19040,12 @@ import React182, { useMemo as useMemo58 } from "react";
|
|
|
18961
19040
|
import React181, { useCallback as useCallback50 } from "react";
|
|
18962
19041
|
|
|
18963
19042
|
// src/mantine/blocks/protocolSelector/template/GeneralTab.tsx
|
|
18964
|
-
import React180, { useEffect as useEffect51, useMemo as useMemo57, useState as
|
|
19043
|
+
import React180, { useEffect as useEffect51, useMemo as useMemo57, useState as useState67 } from "react";
|
|
18965
19044
|
import { Divider as Divider17, Stack as Stack124, Text as Text98, PillsInput as PillsInput2, Pill as Pill2, Box as Box35 } from "@mantine/core";
|
|
18966
19045
|
var GeneralTab11 = ({ title, description, protocolDids, onTitleChange, onDescriptionChange, onProtocolDidsChange }) => {
|
|
18967
|
-
const [localTitle, setLocalTitle] =
|
|
18968
|
-
const [localDescription, setLocalDescription] =
|
|
18969
|
-
const [inputValue, setInputValue] =
|
|
19046
|
+
const [localTitle, setLocalTitle] = useState67(title || "");
|
|
19047
|
+
const [localDescription, setLocalDescription] = useState67(description || "");
|
|
19048
|
+
const [inputValue, setInputValue] = useState67("");
|
|
18970
19049
|
const localDids = useMemo57(() => {
|
|
18971
19050
|
try {
|
|
18972
19051
|
const parsed = JSON.parse(protocolDids || "[]");
|
|
@@ -19111,7 +19190,7 @@ import { Badge as Badge28, Box as Box38, Group as Group61, Stack as Stack127, Te
|
|
|
19111
19190
|
import { IconCircleDashed as IconCircleDashed3, IconChecks } from "@tabler/icons-react";
|
|
19112
19191
|
|
|
19113
19192
|
// src/mantine/blocks/protocolSelector/flow/ProtocolSelectionPanel.tsx
|
|
19114
|
-
import React184, { useState as
|
|
19193
|
+
import React184, { useState as useState68, useEffect as useEffect52, useMemo as useMemo59, useCallback as useCallback51 } from "react";
|
|
19115
19194
|
import { Stack as Stack126, Text as Text100, Box as Box37, Group as Group60, Loader as Loader24 } from "@mantine/core";
|
|
19116
19195
|
|
|
19117
19196
|
// src/icons/EntityAvatar.tsx
|
|
@@ -19149,7 +19228,7 @@ var ProtocolSelectionPanel = ({ editor, block }) => {
|
|
|
19149
19228
|
return [];
|
|
19150
19229
|
}
|
|
19151
19230
|
}, [block.props.protocolDids]);
|
|
19152
|
-
const [protocols, setProtocols] =
|
|
19231
|
+
const [protocols, setProtocols] = useState68([]);
|
|
19153
19232
|
useEffect52(() => {
|
|
19154
19233
|
if (protocolDids.length === 0) {
|
|
19155
19234
|
setProtocols([]);
|
|
@@ -19377,14 +19456,14 @@ import React189, { useCallback as useCallback52 } from "react";
|
|
|
19377
19456
|
import { Paper as Paper16, CloseButton as CloseButton6, Title as Title9 } from "@mantine/core";
|
|
19378
19457
|
|
|
19379
19458
|
// src/mantine/blocks/form/template/GeneralTab.tsx
|
|
19380
|
-
import React188, { useEffect as useEffect53, useState as
|
|
19459
|
+
import React188, { useEffect as useEffect53, useState as useState69 } from "react";
|
|
19381
19460
|
import { Text as Text102 } from "@mantine/core";
|
|
19382
19461
|
var GeneralTab12 = ({ title, description, icon, surveySchema, onTitleChange, onDescriptionChange, onIconChange, onSurveySchemaChange }) => {
|
|
19383
|
-
const [localTitle, setLocalTitle] =
|
|
19384
|
-
const [localDescription, setLocalDescription] =
|
|
19385
|
-
const [localIcon, setLocalIcon] =
|
|
19386
|
-
const [localSchema, setLocalSchema] =
|
|
19387
|
-
const [schemaError, setSchemaError] =
|
|
19462
|
+
const [localTitle, setLocalTitle] = useState69(title || "");
|
|
19463
|
+
const [localDescription, setLocalDescription] = useState69(description || "");
|
|
19464
|
+
const [localIcon, setLocalIcon] = useState69(icon || "checklist");
|
|
19465
|
+
const [localSchema, setLocalSchema] = useState69(surveySchema || "");
|
|
19466
|
+
const [schemaError, setSchemaError] = useState69(null);
|
|
19388
19467
|
useEffect53(() => setLocalTitle(title || ""), [title]);
|
|
19389
19468
|
useEffect53(() => setLocalDescription(description || ""), [description]);
|
|
19390
19469
|
useEffect53(() => setLocalIcon(icon || "checklist"), [icon]);
|
|
@@ -19532,7 +19611,7 @@ var FormTemplateView = ({ editor, block }) => {
|
|
|
19532
19611
|
};
|
|
19533
19612
|
|
|
19534
19613
|
// src/mantine/blocks/form/flow/FlowView.tsx
|
|
19535
|
-
import React192, { useMemo as useMemo63, useState as
|
|
19614
|
+
import React192, { useMemo as useMemo63, useState as useState70, useCallback as useCallback54 } from "react";
|
|
19536
19615
|
import { ActionIcon as ActionIcon30, Badge as Badge30, Group as Group63, Stack as Stack129, Text as Text105, Tooltip as Tooltip19 } from "@mantine/core";
|
|
19537
19616
|
import { IconChevronRight as IconChevronRight7 } from "@tabler/icons-react";
|
|
19538
19617
|
|
|
@@ -19674,7 +19753,7 @@ var FormPanel = ({ editor, block, onComplete }) => {
|
|
|
19674
19753
|
// src/mantine/blocks/form/flow/FlowView.tsx
|
|
19675
19754
|
var FORM_FLOW_PANEL_ID = "form-flow-panel";
|
|
19676
19755
|
var FormFlowView = ({ editor, block }) => {
|
|
19677
|
-
const [hasOpened, setHasOpened] =
|
|
19756
|
+
const [hasOpened, setHasOpened] = useState70(false);
|
|
19678
19757
|
const status = block.props.status || "pending";
|
|
19679
19758
|
const isCompleted = status === "completed";
|
|
19680
19759
|
const handleComplete = useCallback54(() => {
|
|
@@ -19774,11 +19853,11 @@ import { Badge as Badge31, Group as Group64, Stack as Stack130, Text as Text106
|
|
|
19774
19853
|
import React196, { useCallback as useCallback55 } from "react";
|
|
19775
19854
|
|
|
19776
19855
|
// src/mantine/blocks/domainCreatorSign/template/GeneralTab.tsx
|
|
19777
|
-
import React195, { useEffect as useEffect55, useState as
|
|
19856
|
+
import React195, { useEffect as useEffect55, useState as useState71 } from "react";
|
|
19778
19857
|
var GeneralTab13 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
|
|
19779
|
-
const [localTitle, setLocalTitle] =
|
|
19780
|
-
const [localDescription, setLocalDescription] =
|
|
19781
|
-
const [localIcon, setLocalIcon] =
|
|
19858
|
+
const [localTitle, setLocalTitle] = useState71(title || "");
|
|
19859
|
+
const [localDescription, setLocalDescription] = useState71(description || "");
|
|
19860
|
+
const [localIcon, setLocalIcon] = useState71(icon || "file-text");
|
|
19782
19861
|
useEffect55(() => setLocalTitle(title || ""), [title]);
|
|
19783
19862
|
useEffect55(() => setLocalDescription(description || ""), [description]);
|
|
19784
19863
|
useEffect55(() => setLocalIcon(icon || "file-text"), [icon]);
|
|
@@ -19887,7 +19966,7 @@ import { IconChevronRight as IconChevronRight8 } from "@tabler/icons-react";
|
|
|
19887
19966
|
// src/mantine/blocks/domainCreatorSign/flow/SignPanel.tsx
|
|
19888
19967
|
import { Alert as Alert27, Button as Button34, Group as Group66, Loader as Loader25, Stack as Stack132, Text as Text108 } from "@mantine/core";
|
|
19889
19968
|
import { IconAlertCircle as IconAlertCircle11, IconCheck as IconCheck9 } from "@tabler/icons-react";
|
|
19890
|
-
import React199, { useCallback as useCallback56, useState as
|
|
19969
|
+
import React199, { useCallback as useCallback56, useState as useState73 } from "react";
|
|
19891
19970
|
|
|
19892
19971
|
// src/mantine/blocks/domainCreatorSign/utils/buildLinkedEntityResource.ts
|
|
19893
19972
|
function parseLinkedEntities2(entitiesString) {
|
|
@@ -19910,11 +19989,11 @@ function buildGovernanceGroupLinkedEntities(linkedEntities) {
|
|
|
19910
19989
|
// src/mantine/components/Base/BaseSigning.tsx
|
|
19911
19990
|
import { Badge as Badge32, Box as Box39, Flex as Flex30, Group as Group65, Slider, Stack as Stack131, Tabs as Tabs4, Text as Text107, Tooltip as Tooltip20 } from "@mantine/core";
|
|
19912
19991
|
import { IconClock as IconClock2, IconFeather as IconFeather2, IconUsers as IconUsers3, IconArrowsExchange as IconArrowsExchange2, IconCalendar as IconCalendar2, IconLeaf as IconLeaf2, IconBolt } from "@tabler/icons-react";
|
|
19913
|
-
import React198, { useState as
|
|
19992
|
+
import React198, { useState as useState72 } from "react";
|
|
19914
19993
|
function BaseSigning({ handleSign }) {
|
|
19915
|
-
const [value, setValue] =
|
|
19916
|
-
const [isSigned, setIsSigned] =
|
|
19917
|
-
const [activeTab, setActiveTab] =
|
|
19994
|
+
const [value, setValue] = useState72(23);
|
|
19995
|
+
const [isSigned, setIsSigned] = useState72(false);
|
|
19996
|
+
const [activeTab, setActiveTab] = useState72("agents");
|
|
19918
19997
|
const handleSlideEnd = (sliderValue) => {
|
|
19919
19998
|
if (sliderValue >= 60) {
|
|
19920
19999
|
setValue(73);
|
|
@@ -20028,9 +20107,9 @@ function BaseSigning({ handleSign }) {
|
|
|
20028
20107
|
var SignPanel = ({ editor, block, onComplete, onError }) => {
|
|
20029
20108
|
const { closePanel } = usePanelStore();
|
|
20030
20109
|
const { handlers } = useBlocknoteContext();
|
|
20031
|
-
const [flowStep, setFlowStep] =
|
|
20032
|
-
const [error, setError] =
|
|
20033
|
-
const [createdEntityDid, setCreatedEntityDid] =
|
|
20110
|
+
const [flowStep, setFlowStep] = useState73(block.props.status === "completed" ? "success" : block.props.status === "error" ? "error" : "ready");
|
|
20111
|
+
const [error, setError] = useState73(block.props.errorMessage || null);
|
|
20112
|
+
const [createdEntityDid, setCreatedEntityDid] = useState73(block.props.entityDid || null);
|
|
20034
20113
|
const getDomainCardData = useCallback56(() => {
|
|
20035
20114
|
try {
|
|
20036
20115
|
return JSON.parse(block.props.domainCardData || "{}");
|
|
@@ -20355,11 +20434,11 @@ import React204, { useCallback as useCallback58 } from "react";
|
|
|
20355
20434
|
import { Paper as Paper17, CloseButton as CloseButton7, Title as Title10 } from "@mantine/core";
|
|
20356
20435
|
|
|
20357
20436
|
// src/mantine/blocks/domainCardViewer/template/GeneralTab.tsx
|
|
20358
|
-
import React203, { useEffect as useEffect57, useState as
|
|
20437
|
+
import React203, { useEffect as useEffect57, useState as useState74 } from "react";
|
|
20359
20438
|
var GeneralTab14 = ({ title, description, icon, onTitleChange, onDescriptionChange, onIconChange }) => {
|
|
20360
|
-
const [localTitle, setLocalTitle] =
|
|
20361
|
-
const [localDescription, setLocalDescription] =
|
|
20362
|
-
const [localIcon, setLocalIcon] =
|
|
20439
|
+
const [localTitle, setLocalTitle] = useState74(title || "");
|
|
20440
|
+
const [localDescription, setLocalDescription] = useState74(description || "");
|
|
20441
|
+
const [localIcon, setLocalIcon] = useState74(icon || "dots-circle");
|
|
20363
20442
|
useEffect57(() => setLocalTitle(title || ""), [title]);
|
|
20364
20443
|
useEffect57(() => setLocalDescription(description || ""), [description]);
|
|
20365
20444
|
useEffect57(() => setLocalIcon(icon || "dots-circle"), [icon]);
|
|
@@ -20948,7 +21027,7 @@ import { Badge as Badge36, Group as Group70, Stack as Stack138, Text as Text114
|
|
|
20948
21027
|
import React211, { useCallback as useCallback60 } from "react";
|
|
20949
21028
|
|
|
20950
21029
|
// src/mantine/blocks/governanceGroup/template/GeneralTab.tsx
|
|
20951
|
-
import React210, { useEffect as useEffect59, useState as
|
|
21030
|
+
import React210, { useEffect as useEffect59, useState as useState75 } from "react";
|
|
20952
21031
|
import { Card as Card18, SimpleGrid as SimpleGrid2, Stack as Stack137, Text as Text113, ThemeIcon as ThemeIcon3 } from "@mantine/core";
|
|
20953
21032
|
import { IconUsers as IconUsers4, IconSignature, IconPhoto as IconPhoto2, IconCoin } from "@tabler/icons-react";
|
|
20954
21033
|
|
|
@@ -20988,9 +21067,9 @@ var GROUP_TYPE_ICONS = {
|
|
|
20988
21067
|
tokenStaking: /* @__PURE__ */ React210.createElement(IconCoin, { size: 20 })
|
|
20989
21068
|
};
|
|
20990
21069
|
var GeneralTab15 = ({ title, description, icon, groupType, onTitleChange, onDescriptionChange, onIconChange, onGroupTypeChange }) => {
|
|
20991
|
-
const [localTitle, setLocalTitle] =
|
|
20992
|
-
const [localDescription, setLocalDescription] =
|
|
20993
|
-
const [localIcon, setLocalIcon] =
|
|
21070
|
+
const [localTitle, setLocalTitle] = useState75(title || "");
|
|
21071
|
+
const [localDescription, setLocalDescription] = useState75(description || "");
|
|
21072
|
+
const [localIcon, setLocalIcon] = useState75(icon || "users");
|
|
20994
21073
|
useEffect59(() => setLocalTitle(title || ""), [title]);
|
|
20995
21074
|
useEffect59(() => setLocalDescription(description || ""), [description]);
|
|
20996
21075
|
useEffect59(() => setLocalIcon(icon || "users"), [icon]);
|
|
@@ -21862,12 +21941,12 @@ var GovernanceGroupTemplateView = ({ editor, block }) => {
|
|
|
21862
21941
|
};
|
|
21863
21942
|
|
|
21864
21943
|
// src/mantine/blocks/governanceGroup/flow/FlowView.tsx
|
|
21865
|
-
import React214, { useCallback as useCallback62, useEffect as useEffect61, useMemo as useMemo71, useRef as useRef16, useState as
|
|
21944
|
+
import React214, { useCallback as useCallback62, useEffect as useEffect61, useMemo as useMemo71, useRef as useRef16, useState as useState77 } from "react";
|
|
21866
21945
|
import { ActionIcon as ActionIcon33, Badge as Badge37, Group as Group72, Stack as Stack140, Text as Text116, Tooltip as Tooltip23 } from "@mantine/core";
|
|
21867
21946
|
import { IconChevronRight as IconChevronRight10 } from "@tabler/icons-react";
|
|
21868
21947
|
|
|
21869
21948
|
// src/mantine/blocks/governanceGroup/flow/GovernanceGroupPanel.tsx
|
|
21870
|
-
import React213, { useCallback as useCallback61, useEffect as useEffect60, useMemo as useMemo70, useRef as useRef15, useState as
|
|
21949
|
+
import React213, { useCallback as useCallback61, useEffect as useEffect60, useMemo as useMemo70, useRef as useRef15, useState as useState76 } from "react";
|
|
21871
21950
|
import { Alert as Alert29, Button as Button37, Card as Card19, Group as Group71, Loader as Loader27, SimpleGrid as SimpleGrid3, Stack as Stack139, Text as Text115, ThemeIcon as ThemeIcon4 } from "@mantine/core";
|
|
21872
21951
|
import { useDebouncedCallback as useDebouncedCallback3 } from "@mantine/hooks";
|
|
21873
21952
|
import { IconAlertCircle as IconAlertCircle13, IconCheck as IconCheck11, IconUsers as IconUsers5, IconSignature as IconSignature2, IconPhoto as IconPhoto3, IconCoin as IconCoin2, IconArrowLeft as IconArrowLeft5 } from "@tabler/icons-react";
|
|
@@ -21907,11 +21986,11 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
|
|
|
21907
21986
|
if (existingGroupType) return "survey";
|
|
21908
21987
|
return "typeSelection";
|
|
21909
21988
|
};
|
|
21910
|
-
const [flowStep, setFlowStep] =
|
|
21911
|
-
const [selectedGroupType, setSelectedGroupType] =
|
|
21912
|
-
const [error, setError] =
|
|
21913
|
-
const [createdCoreAddress, setCreatedCoreAddress] =
|
|
21914
|
-
const [createdGroupAddress, setCreatedGroupAddress] =
|
|
21989
|
+
const [flowStep, setFlowStep] = useState76(getInitialFlowStep);
|
|
21990
|
+
const [selectedGroupType, setSelectedGroupType] = useState76(existingGroupType || null);
|
|
21991
|
+
const [error, setError] = useState76(null);
|
|
21992
|
+
const [createdCoreAddress, setCreatedCoreAddress] = useState76(existingCoreAddress || null);
|
|
21993
|
+
const [createdGroupAddress, setCreatedGroupAddress] = useState76(block.props.groupAddress || null);
|
|
21915
21994
|
const isUpdatingFromProp = useRef15(false);
|
|
21916
21995
|
const lastSyncedAnswers = useRef15("");
|
|
21917
21996
|
const surveyModel = useMemo70(() => {
|
|
@@ -22113,8 +22192,8 @@ var GovernanceGroupPanel = ({ editor, block, onComplete }) => {
|
|
|
22113
22192
|
// src/mantine/blocks/governanceGroup/flow/FlowView.tsx
|
|
22114
22193
|
var GOVERNANCE_GROUP_FLOW_PANEL_ID = "governance-group-flow-panel";
|
|
22115
22194
|
var GovernanceGroupFlowView = ({ editor, block }) => {
|
|
22116
|
-
const [hasOpened, setHasOpened] =
|
|
22117
|
-
const [submissionStatus, setSubmissionStatus] =
|
|
22195
|
+
const [hasOpened, setHasOpened] = useState77(false);
|
|
22196
|
+
const [submissionStatus, setSubmissionStatus] = useState77("idle");
|
|
22118
22197
|
const lastSubmission = block.props.lastSubmission ? JSON.parse(block.props.lastSubmission) : null;
|
|
22119
22198
|
const hasExistingSubmission = lastSubmission?.coreAddress;
|
|
22120
22199
|
const editorRef = useRef16(editor);
|
|
@@ -22440,14 +22519,14 @@ import React222, { useMemo as useMemo74 } from "react";
|
|
|
22440
22519
|
import { Badge as Badge39, Group as Group76, Stack as Stack145, Text as Text120, Tooltip as Tooltip25 } from "@mantine/core";
|
|
22441
22520
|
|
|
22442
22521
|
// src/mantine/blocks/flowLink/flow/FlowLinkPanel.tsx
|
|
22443
|
-
import React221, { useState as
|
|
22522
|
+
import React221, { useState as useState78, useEffect as useEffect62, useCallback as useCallback63 } from "react";
|
|
22444
22523
|
import { Stack as Stack144, Text as Text119, Card as Card21, Group as Group75, Badge as Badge38, ActionIcon as ActionIcon35, Loader as Loader28, Tooltip as Tooltip24 } from "@mantine/core";
|
|
22445
22524
|
import { IconRefresh as IconRefresh7, IconCheck as IconCheck12, IconClock as IconClock3, IconCircleDashed as IconCircleDashed4 } from "@tabler/icons-react";
|
|
22446
22525
|
var FlowLinkPanel = ({ block }) => {
|
|
22447
22526
|
const { closePanel } = usePanelStore();
|
|
22448
22527
|
const handlers = useBlocknoteHandlers();
|
|
22449
22528
|
const links = safeParseJSONArray(block.props.links).sort((a, b) => a.position - b.position);
|
|
22450
|
-
const [linksWithStatus, setLinksWithStatus] =
|
|
22529
|
+
const [linksWithStatus, setLinksWithStatus] = useState78(links.map((link) => ({ ...link })));
|
|
22451
22530
|
const fetchStatuses = useCallback63(async () => {
|
|
22452
22531
|
if (!handlers.getFlowStatus) {
|
|
22453
22532
|
return;
|
|
@@ -22765,7 +22844,7 @@ blockRegistry.register({
|
|
|
22765
22844
|
});
|
|
22766
22845
|
|
|
22767
22846
|
// src/mantine/blocks/hooks/useBlockDependencies.ts
|
|
22768
|
-
import { useMemo as useMemo75, useEffect as useEffect63, useState as
|
|
22847
|
+
import { useMemo as useMemo75, useEffect as useEffect63, useState as useState79, useCallback as useCallback64 } from "react";
|
|
22769
22848
|
|
|
22770
22849
|
// src/mantine/blocks/hooks/useDependsOn.ts
|
|
22771
22850
|
import { useMemo as useMemo76 } from "react";
|
|
@@ -23335,11 +23414,11 @@ import { useCreateBlockNote as useCreateBlockNote2 } from "@blocknote/react";
|
|
|
23335
23414
|
import { BlockNoteSchema as BlockNoteSchema2, defaultBlockSpecs as defaultBlockSpecs2, defaultInlineContentSpecs as defaultInlineContentSpecs2, defaultStyleSpecs as defaultStyleSpecs2 } from "@blocknote/core";
|
|
23336
23415
|
|
|
23337
23416
|
// src/core/hooks/useMatrixProvider.ts
|
|
23338
|
-
import { useEffect as useEffect64, useState as
|
|
23417
|
+
import { useEffect as useEffect64, useState as useState80, useRef as useRef17, useCallback as useCallback65, useMemo as useMemo77 } from "react";
|
|
23339
23418
|
import { MatrixProvider } from "@ixo/matrix-crdt";
|
|
23340
23419
|
function useMatrixProvider({ matrixClient, roomId, yDoc }) {
|
|
23341
|
-
const [matrixProvider, setProvider] =
|
|
23342
|
-
const [status, setStatus] =
|
|
23420
|
+
const [matrixProvider, setProvider] = useState80(null);
|
|
23421
|
+
const [status, setStatus] = useState80("disconnected");
|
|
23343
23422
|
const isMountedRef = useRef17(true);
|
|
23344
23423
|
const providerRef = useRef17(null);
|
|
23345
23424
|
const retryTimeoutRef = useRef17(null);
|
|
@@ -23440,7 +23519,7 @@ function useCollaborativeYDoc(_options) {
|
|
|
23440
23519
|
}
|
|
23441
23520
|
|
|
23442
23521
|
// src/mantine/hooks/useCollaborativeIxoEditor.ts
|
|
23443
|
-
import { useMemo as useMemo79, useEffect as useEffect65, useState as
|
|
23522
|
+
import { useMemo as useMemo79, useEffect as useEffect65, useState as useState81 } from "react";
|
|
23444
23523
|
|
|
23445
23524
|
// src/core/lib/matrixMetadata.ts
|
|
23446
23525
|
var COVER_IMAGE_EVENT_TYPE = "ixo.page.cover_image";
|
|
@@ -23904,7 +23983,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
23904
23983
|
titleText.insert(0, options.title);
|
|
23905
23984
|
}
|
|
23906
23985
|
}, [connectionStatus, root, titleText, permissions.write, options.docId, options.title, memoizedUser.id]);
|
|
23907
|
-
const [connectedUsers, setConnectedUsers] =
|
|
23986
|
+
const [connectedUsers, setConnectedUsers] = useState81([]);
|
|
23908
23987
|
const webrtcProvider = matrixProvider?.webrtcProvider;
|
|
23909
23988
|
useEffect65(() => {
|
|
23910
23989
|
if (!matrixProvider?.awarenessInstance || !webrtcProvider || connectionStatus !== "connected") {
|
|
@@ -23963,7 +24042,7 @@ function useCreateCollaborativeIxoEditor(options) {
|
|
|
23963
24042
|
}
|
|
23964
24043
|
|
|
23965
24044
|
// src/mantine/components/Base/BaseIconPicker.tsx
|
|
23966
|
-
import React226, { useState as
|
|
24045
|
+
import React226, { useState as useState82, useMemo as useMemo80, useEffect as useEffect66 } from "react";
|
|
23967
24046
|
import { TextInput as TextInput7, Tabs as Tabs5, Box as Box41, Stack as Stack146, UnstyledButton as UnstyledButton2, Text as Text121, Center as Center12, ScrollArea as ScrollArea8, Group as Group77, Popover as Popover4 } from "@mantine/core";
|
|
23968
24047
|
import * as TablerIcons from "@tabler/icons-react";
|
|
23969
24048
|
import { IconSearch as IconSearch6, IconX as IconX11, IconChevronLeft, IconChevronRight as IconChevronRight11 } from "@tabler/icons-react";
|
|
@@ -24021,9 +24100,9 @@ var localStorageService = {
|
|
|
24021
24100
|
var iconsKey = "editor_recent_icons";
|
|
24022
24101
|
var ICONS_PER_PAGE = 500;
|
|
24023
24102
|
function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children, currentIcon }) {
|
|
24024
|
-
const [searchQuery, setSearchQuery] =
|
|
24025
|
-
const [activeTab, setActiveTab] =
|
|
24026
|
-
const [currentPage, setCurrentPage] =
|
|
24103
|
+
const [searchQuery, setSearchQuery] = useState82("");
|
|
24104
|
+
const [activeTab, setActiveTab] = useState82("icons");
|
|
24105
|
+
const [currentPage, setCurrentPage] = useState82(1);
|
|
24027
24106
|
const allIcons = useMemo80(() => {
|
|
24028
24107
|
const iconEntries = Object.entries(TablerIcons).filter(([name]) => name.startsWith("Icon") && name !== "IconProps");
|
|
24029
24108
|
return iconEntries;
|
|
@@ -24144,7 +24223,7 @@ function BaseIconPicker({ opened, onClose, onSelectIcon, onUploadClick, children
|
|
|
24144
24223
|
}
|
|
24145
24224
|
|
|
24146
24225
|
// src/mantine/components/CoverImage.tsx
|
|
24147
|
-
import React228, { useState as
|
|
24226
|
+
import React228, { useState as useState83, useRef as useRef18, useEffect as useEffect67 } from "react";
|
|
24148
24227
|
import { Box as Box43, Group as Group78 } from "@mantine/core";
|
|
24149
24228
|
|
|
24150
24229
|
// src/core/lib/imageTransform.ts
|
|
@@ -24330,13 +24409,13 @@ function PageIcon({ src, iconSize = 64, useCenter = false, style }) {
|
|
|
24330
24409
|
import { useDisclosure as useDisclosure5 } from "@mantine/hooks";
|
|
24331
24410
|
function CoverImage({ coverImageUrl, logoUrl }) {
|
|
24332
24411
|
const { editor, handlers, editable } = useBlocknoteContext();
|
|
24333
|
-
const [isHovering, setIsHovering] =
|
|
24334
|
-
const [isRepositioning, setIsRepositioning] =
|
|
24335
|
-
const [coverPosition, setCoverPosition] =
|
|
24412
|
+
const [isHovering, setIsHovering] = useState83(false);
|
|
24413
|
+
const [isRepositioning, setIsRepositioning] = useState83(false);
|
|
24414
|
+
const [coverPosition, setCoverPosition] = useState83(50);
|
|
24336
24415
|
const coverFileInputRef = useRef18(null);
|
|
24337
24416
|
const logoFileInputRef = useRef18(null);
|
|
24338
24417
|
const [opened, { open, close }] = useDisclosure5(false);
|
|
24339
|
-
const [metadata, setMetadata] =
|
|
24418
|
+
const [metadata, setMetadata] = useState83(() => editor?.getPageMetadata?.() || null);
|
|
24340
24419
|
useEffect67(() => {
|
|
24341
24420
|
if (!editor?._metadataManager) {
|
|
24342
24421
|
return;
|
|
@@ -24612,7 +24691,7 @@ function CoverImage({ coverImageUrl, logoUrl }) {
|
|
|
24612
24691
|
}
|
|
24613
24692
|
|
|
24614
24693
|
// src/mantine/components/PageHeader.tsx
|
|
24615
|
-
import React229, { useState as
|
|
24694
|
+
import React229, { useState as useState84, useRef as useRef19, useEffect as useEffect68 } from "react";
|
|
24616
24695
|
function PageHeader({
|
|
24617
24696
|
title = "New page",
|
|
24618
24697
|
icon,
|
|
@@ -24623,7 +24702,7 @@ function PageHeader({
|
|
|
24623
24702
|
isFavorited = false,
|
|
24624
24703
|
menuItems = []
|
|
24625
24704
|
}) {
|
|
24626
|
-
const [isMenuOpen, setIsMenuOpen] =
|
|
24705
|
+
const [isMenuOpen, setIsMenuOpen] = useState84(false);
|
|
24627
24706
|
const menuRef = useRef19(null);
|
|
24628
24707
|
useEffect68(() => {
|
|
24629
24708
|
function handleClickOutside(event) {
|
|
@@ -24805,7 +24884,7 @@ var styles = {
|
|
|
24805
24884
|
};
|
|
24806
24885
|
|
|
24807
24886
|
// src/mantine/components/ExternalDropZone.tsx
|
|
24808
|
-
import React230, { useCallback as useCallback66, useEffect as useEffect69, useRef as useRef20, useState as
|
|
24887
|
+
import React230, { useCallback as useCallback66, useEffect as useEffect69, useRef as useRef20, useState as useState85 } from "react";
|
|
24809
24888
|
import { Box as Box44 } from "@mantine/core";
|
|
24810
24889
|
var SCROLL_ZONE_SIZE = 80;
|
|
24811
24890
|
var SCROLL_SPEED = 12;
|
|
@@ -24819,9 +24898,9 @@ var ExternalDropZone = ({
|
|
|
24819
24898
|
children
|
|
24820
24899
|
}) => {
|
|
24821
24900
|
const containerRef = useRef20(null);
|
|
24822
|
-
const [isValidDrag, setIsValidDrag] =
|
|
24823
|
-
const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] =
|
|
24824
|
-
const [indicatorStyle, setIndicatorStyle] =
|
|
24901
|
+
const [isValidDrag, setIsValidDrag] = useState85(false);
|
|
24902
|
+
const [isHoveringInPlacementMode, setIsHoveringInPlacementMode] = useState85(false);
|
|
24903
|
+
const [indicatorStyle, setIndicatorStyle] = useState85({});
|
|
24825
24904
|
const dropPositionRef = useRef20(null);
|
|
24826
24905
|
const scrollAnimationRef = useRef20(null);
|
|
24827
24906
|
const scrollDirectionRef = useRef20(null);
|
|
@@ -25343,7 +25422,7 @@ function IxoEditor({
|
|
|
25343
25422
|
}
|
|
25344
25423
|
|
|
25345
25424
|
// src/mantine/components/EntitySigningSetup.tsx
|
|
25346
|
-
import React233, { useState as
|
|
25425
|
+
import React233, { useState as useState86 } from "react";
|
|
25347
25426
|
import { Modal as Modal3, Stack as Stack147, Text as Text122, TextInput as TextInput8, Button as Button39, Alert as Alert30, Group as Group79 } from "@mantine/core";
|
|
25348
25427
|
import { IconAlertCircle as IconAlertCircle14, IconCheck as IconCheck13, IconKey as IconKey2 } from "@tabler/icons-react";
|
|
25349
25428
|
var EntitySigningSetup = ({
|
|
@@ -25353,11 +25432,11 @@ var EntitySigningSetup = ({
|
|
|
25353
25432
|
entityName,
|
|
25354
25433
|
onSetup
|
|
25355
25434
|
}) => {
|
|
25356
|
-
const [pin, setPin] =
|
|
25357
|
-
const [confirmPin, setConfirmPin] =
|
|
25358
|
-
const [loading, setLoading] =
|
|
25359
|
-
const [error, setError] =
|
|
25360
|
-
const [success, setSuccess] =
|
|
25435
|
+
const [pin, setPin] = useState86("");
|
|
25436
|
+
const [confirmPin, setConfirmPin] = useState86("");
|
|
25437
|
+
const [loading, setLoading] = useState86(false);
|
|
25438
|
+
const [error, setError] = useState86(null);
|
|
25439
|
+
const [success, setSuccess] = useState86(false);
|
|
25361
25440
|
const handleSetup = async () => {
|
|
25362
25441
|
if (pin.length < 4) {
|
|
25363
25442
|
setError("PIN must be at least 4 characters");
|
|
@@ -25439,7 +25518,7 @@ var EntitySigningSetup = ({
|
|
|
25439
25518
|
};
|
|
25440
25519
|
|
|
25441
25520
|
// src/mantine/components/FlowPermissionsPanel.tsx
|
|
25442
|
-
import React234, { useState as
|
|
25521
|
+
import React234, { useState as useState87, useEffect as useEffect70, useMemo as useMemo82 } from "react";
|
|
25443
25522
|
import { Stack as Stack148, Text as Text123, Paper as Paper19, Group as Group80, Badge as Badge40, Button as Button40, ActionIcon as ActionIcon36, Loader as Loader29, Alert as Alert31, Divider as Divider19 } from "@mantine/core";
|
|
25444
25523
|
import { IconPlus as IconPlus7, IconTrash as IconTrash8, IconShieldCheck as IconShieldCheck2, IconUser as IconUser5, IconRobot as IconRobot4, IconBuilding } from "@tabler/icons-react";
|
|
25445
25524
|
var FlowPermissionsPanel = ({
|
|
@@ -25450,9 +25529,9 @@ var FlowPermissionsPanel = ({
|
|
|
25450
25529
|
onRevokePermission,
|
|
25451
25530
|
getUserDisplayName
|
|
25452
25531
|
}) => {
|
|
25453
|
-
const [delegations, setDelegations] =
|
|
25454
|
-
const [loading, setLoading] =
|
|
25455
|
-
const [revoking, setRevoking] =
|
|
25532
|
+
const [delegations, setDelegations] = useState87([]);
|
|
25533
|
+
const [loading, setLoading] = useState87(true);
|
|
25534
|
+
const [revoking, setRevoking] = useState87(null);
|
|
25456
25535
|
const rootCapability = useMemo82(() => editor.getRootCapability?.(), [editor]);
|
|
25457
25536
|
useEffect70(() => {
|
|
25458
25537
|
const loadDelegations = async () => {
|
|
@@ -25538,7 +25617,7 @@ var FlowPermissionsPanel = ({
|
|
|
25538
25617
|
};
|
|
25539
25618
|
|
|
25540
25619
|
// src/mantine/components/GrantPermissionModal.tsx
|
|
25541
|
-
import React235, { useState as
|
|
25620
|
+
import React235, { useState as useState88, useCallback as useCallback67 } from "react";
|
|
25542
25621
|
import {
|
|
25543
25622
|
Modal as Modal4,
|
|
25544
25623
|
Stack as Stack149,
|
|
@@ -25570,20 +25649,20 @@ var GrantPermissionModal = ({
|
|
|
25570
25649
|
const singleBlockMode = !!targetBlockId || blocks.length === 1;
|
|
25571
25650
|
const fixedBlockId = targetBlockId || (blocks.length === 1 ? blocks[0].id : null);
|
|
25572
25651
|
const fixedBlock = fixedBlockId ? blocks.find((b) => b.id === fixedBlockId) || blocks[0] : null;
|
|
25573
|
-
const [recipientType, setRecipientType] =
|
|
25574
|
-
const [searchQuery, setSearchQuery] =
|
|
25575
|
-
const [searchResults, setSearchResults] =
|
|
25576
|
-
const [searching, setSearching] =
|
|
25577
|
-
const [selectedRecipient, setSelectedRecipient] =
|
|
25578
|
-
const [manualDid, setManualDid] =
|
|
25579
|
-
const [scopeType, setScopeType] =
|
|
25580
|
-
const [selectedBlocks, setSelectedBlocks] =
|
|
25581
|
-
const [expirationEnabled, setExpirationEnabled] =
|
|
25582
|
-
const [expirationDays, setExpirationDays] =
|
|
25583
|
-
const [canDelegate, setCanDelegate] =
|
|
25584
|
-
const [pin, setPin] =
|
|
25585
|
-
const [loading, setLoading] =
|
|
25586
|
-
const [error, setError] =
|
|
25652
|
+
const [recipientType, setRecipientType] = useState88("user");
|
|
25653
|
+
const [searchQuery, setSearchQuery] = useState88("");
|
|
25654
|
+
const [searchResults, setSearchResults] = useState88([]);
|
|
25655
|
+
const [searching, setSearching] = useState88(false);
|
|
25656
|
+
const [selectedRecipient, setSelectedRecipient] = useState88(null);
|
|
25657
|
+
const [manualDid, setManualDid] = useState88("");
|
|
25658
|
+
const [scopeType, setScopeType] = useState88("full");
|
|
25659
|
+
const [selectedBlocks, setSelectedBlocks] = useState88([]);
|
|
25660
|
+
const [expirationEnabled, setExpirationEnabled] = useState88(false);
|
|
25661
|
+
const [expirationDays, setExpirationDays] = useState88(30);
|
|
25662
|
+
const [canDelegate, setCanDelegate] = useState88(false);
|
|
25663
|
+
const [pin, setPin] = useState88("");
|
|
25664
|
+
const [loading, setLoading] = useState88(false);
|
|
25665
|
+
const [error, setError] = useState88(null);
|
|
25587
25666
|
const handleSearch = useCallback67(async () => {
|
|
25588
25667
|
if (searchQuery.length < 2) return;
|
|
25589
25668
|
setSearching(true);
|
|
@@ -25881,4 +25960,4 @@ export {
|
|
|
25881
25960
|
ixoGraphQLClient,
|
|
25882
25961
|
getEntity
|
|
25883
25962
|
};
|
|
25884
|
-
//# sourceMappingURL=chunk-
|
|
25963
|
+
//# sourceMappingURL=chunk-I6Q5SHHA.mjs.map
|