Reading from NEAR testnet…
Reading from NEAR testnet…
Ec2Lo6HsHSFxP87VN1vwRGYiTToic1h433DdnRs6v9bu
testhub2.akaia.testnet to v1.social08.testnet
set() with 1 yoctoNEAR
{
"data": {
"testhub2.akaia.testnet": {
"widget": {
"gigs-board.feature.project.configurator": {
"": "/* INCLUDE: \"common.jsx\" */\nconst nearDevGovGigsContractAccountId =\n props.nearDevGovGigsContractAccountId ||\n (context.widgetSrc ?? \"devgovgigs.near\").split(\"/\", 1)[0];\n\nconst nearDevGovGigsWidgetsAccountId =\n props.nearDevGovGigsWidgetsAccountId ||\n (context.widgetSrc ?? \"devgovgigs.near\").split(\"/\", 1)[0];\n\nfunction widget(widgetName, widgetProps, key) {\n widgetProps = {\n ...widgetProps,\n nearDevGovGigsContractAccountId: props.nearDevGovGigsContractAccountId,\n nearDevGovGigsWidgetsAccountId: props.nearDevGovGigsWidgetsAccountId,\n referral: props.referral,\n };\n\n return (\n <Widget\n src={`${nearDevGovGigsWidgetsAccountId}/widget/gigs-board.${widgetName}`}\n props={widgetProps}\n key={key}\n />\n );\n}\n\nfunction href(widgetName, linkProps) {\n linkProps = { ...linkProps };\n\n if (props.nearDevGovGigsContractAccountId) {\n linkProps.nearDevGovGigsContractAccountId =\n props.nearDevGovGigsContractAccountId;\n }\n\n if (props.nearDevGovGigsWidgetsAccountId) {\n linkProps.nearDevGovGigsWidgetsAccountId =\n props.nearDevGovGigsWidgetsAccountId;\n }\n\n if (props.referral) {\n linkProps.referral = props.referral;\n }\n\n const linkPropsQuery = Object.entries(linkProps)\n .filter(([_key, nullable]) => (nullable ?? null) !== null)\n .map(([key, value]) => `${key}=${value}`)\n .join(\"&\");\n\n return `/#/${nearDevGovGigsWidgetsAccountId}/widget/gigs-board.pages.${widgetName}${\n linkPropsQuery ? \"?\" : \"\"\n }${linkPropsQuery}`;\n}\n/* END_INCLUDE: \"common.jsx\" */\n/* INCLUDE: \"core/lib/struct\" */\nconst Struct = {\n deepFieldUpdate: (\n node,\n { input, params, path: [nextNodeKey, ...remainingPath], via: toFieldValue }\n ) => ({\n ...node,\n\n [nextNodeKey]:\n remainingPath.length > 0\n ? Struct.deepFieldUpdate(\n Struct.typeMatch(node[nextNodeKey]) ||\n Array.isArray(node[nextNodeKey])\n ? node[nextNodeKey]\n : {\n ...((node[nextNodeKey] ?? null) !== null\n ? { __archivedLeaf__: node[nextNodeKey] }\n : {}),\n },\n\n { input, path: remainingPath, via: toFieldValue }\n )\n : toFieldValue({\n input,\n lastKnownValue: node[nextNodeKey],\n params,\n }),\n }),\n\n isEqual: (input1, input2) =>\n Struct.typeMatch(input1) && Struct.typeMatch(input2)\n ? JSON.stringify(Struct.toOrdered(input1)) ===\n JSON.stringify(Struct.toOrdered(input2))\n : false,\n\n toOrdered: (input) =>\n Object.keys(input)\n .sort()\n .reduce((output, key) => ({ ...output, [key]: input[key] }), {}),\n\n pick: (object, subsetKeys) =>\n Object.fromEntries(\n Object.entries(object ?? {}).filter(([key, _]) =>\n subsetKeys.includes(key)\n )\n ),\n\n typeMatch: (input) =>\n input !== null && typeof input === \"object\" && !Array.isArray(input),\n};\n/* END_INCLUDE: \"core/lib/struct\" */\n/* INCLUDE: \"core/lib/gui/form\" */\nconst defaultFieldUpdate = ({\n input,\n lastKnownValue,\n params: { arrayDelimiter },\n}) => {\n switch (typeof input) {\n case \"boolean\":\n return input;\n\n case \"object\":\n return Array.isArray(input) && typeof lastKnownValue === \"string\"\n ? input.join(arrayDelimiter ?? \",\")\n : input;\n\n case \"string\":\n return Array.isArray(lastKnownValue)\n ? input.split(arrayDelimiter ?? \",\").map((string) => string.trim())\n : input;\n\n default: {\n if ((input ?? null) === null) {\n switch (typeof lastKnownValue) {\n case \"boolean\":\n return !lastKnownValue;\n\n default:\n return lastKnownValue;\n }\n } else return input;\n }\n }\n};\n\nconst useForm = ({ initialValues, stateKey: formStateKey, uninitialized }) => {\n const initialFormState = {\n hasUnsubmittedChanges: false,\n values: initialValues ?? {},\n };\n\n const formState = state[formStateKey] ?? null,\n isSynced = Struct.isEqual(formState?.values ?? {}, initialFormState.values);\n\n const formReset = () =>\n State.update((lastKnownComponentState) => ({\n ...lastKnownComponentState,\n [formStateKey]: initialFormState,\n hasUnsubmittedChanges: false,\n }));\n\n const formUpdate =\n ({ path, via: customFieldUpdate, ...params }) =>\n (fieldInput) => {\n const updatedValues = Struct.deepFieldUpdate(\n formState?.values ?? {},\n\n {\n input: fieldInput?.target?.value ?? fieldInput,\n params,\n path,\n\n via:\n typeof customFieldUpdate === \"function\"\n ? customFieldUpdate\n : defaultFieldUpdate,\n }\n );\n\n State.update((lastKnownComponentState) => ({\n ...lastKnownComponentState,\n\n [formStateKey]: {\n hasUnsubmittedChanges: !Struct.isEqual(\n updatedValues,\n initialFormState.values\n ),\n\n values: updatedValues,\n },\n }));\n };\n\n if (\n !uninitialized &&\n (formState === null ||\n (Object.keys(formState?.values ?? {}).length > 0 &&\n !formState.hasUnsubmittedChanges &&\n !isSynced))\n ) {\n formReset();\n }\n\n return {\n ...(formState ?? initialFormState),\n isSynced,\n reset: formReset,\n update: formUpdate,\n };\n};\n/* END_INCLUDE: \"core/lib/gui/form\" */\n/* INCLUDE: \"core/adapter/dev-hub\" */\nconst devHubAccountId =\n props.nearDevGovGigsContractAccountId ||\n (context.widgetSrc ?? \"devgovgigs.near\").split(\"/\", 1)[0];\n\nconst DevHub = {\n edit_community_github: ({ handle, github }) =>\n Near.call(devHubAccountId, \"edit_community_github\", { handle, github }) ??\n null,\n\n create_project: ({ author_community_handle, metadata }) =>\n Near.call(devHubAccountId, \"create_project\", {\n author_community_handle,\n metadata,\n }) ?? null,\n\n update_project_metadata: ({ metadata }) =>\n Near.call(devHubAccountId, \"update_project_metadata\", { metadata }) ?? null,\n\n get_project_views_metadata: ({ project_id }) =>\n Near.view(devHubAccountId, \"get_project_views_metadata\", { project_id }) ??\n null,\n\n create_project_view: ({ project_id, view }) =>\n Near.call(devHubAccountId, \"create_project_view\", { project_id, view }) ??\n null,\n\n update_project_view: ({ project_id, view }) =>\n Near.call(devHubAccountId, \"create_project_view\", { project_id, view }) ??\n null,\n\n delete_project_view: ({ project_id, view_id }) =>\n Near.call(devHubAccountId, \"get_project_view\", { project_id, view_id }) ??\n null,\n\n get_access_control_info: () =>\n Near.view(devHubAccountId, \"get_access_control_info\") ?? null,\n\n get_all_authors: () => Near.view(devHubAccountId, \"get_all_authors\") ?? null,\n\n get_all_communities: () =>\n Near.view(devHubAccountId, \"get_all_communities\") ?? null,\n\n get_all_labels: () => Near.view(devHubAccountId, \"get_all_labels\") ?? null,\n\n get_community: ({ handle }) =>\n Near.view(devHubAccountId, \"get_community\", { handle }) ?? null,\n\n get_post: ({ post_id }) =>\n Near.view(devHubAccountId, \"get_post\", { post_id }) ?? null,\n\n get_posts_by_author: ({ author }) =>\n Near.view(devHubAccountId, \"get_posts_by_author\", { author }) ?? null,\n\n get_posts_by_label: ({ label }) =>\n Near.view(nearDevGovGigsContractAccountId, \"get_posts_by_label\", {\n label,\n }) ?? null,\n\n get_root_members: () =>\n Near.view(devHubAccountId, \"get_root_members\") ?? null,\n\n useQuery: ({ name, params }) => {\n const initialState = { data: null, error: null, isLoading: true };\n\n const cacheState = useCache(\n () =>\n Near.asyncView(devHubAccountId, [\"get\", name].join(\"_\"), params ?? {})\n .then((response) => ({\n ...initialState,\n data: response ?? null,\n isLoading: false,\n }))\n .catch((error) => ({\n ...initialState,\n error: props?.error ?? error,\n isLoading: false,\n })),\n\n JSON.stringify({ name, params }),\n { subscribe: true }\n );\n\n return cacheState === null ? initialState : cacheState;\n },\n};\n/* END_INCLUDE: \"core/adapter/dev-hub\" */\n\nconst ProjectConfigurator = ({ metadata, permissions }) => {\n State.init({\n isConfiguratorActive: false,\n });\n\n const configuratorToggle = (forcedState) =>\n State.update((lastKnownState) => ({\n ...lastKnownState,\n isConfiguratorActive: forcedState ?? !lastKnownState.isConfiguratorActive,\n }));\n\n const form = useForm({ initialValues: { metadata }, stateKey: \"project\" });\n\n const onCancel = () => {\n form.reset();\n configuratorToggle(false);\n };\n\n const onSubmit = () => DevHub.update_project_metadata(form.values);\n\n return (\n <div className=\"d-flex justify-content-between gap-3 w-100\">\n <div className=\"d-flex flex-column gap-2 justify-content-end\">\n {state.isConfiguratorActive ? (\n widget(\"components.molecule.text-input\", {\n className: \"w-100 p-0 gap-0\",\n\n inputProps: {\n className: \"h-75 border-0 bg-dark text-white fs-1\",\n min: 3,\n max: 30,\n },\n\n key: `project-${form.values.metadata.id}-name`,\n multiline: false,\n onChange: form.update({ path: [\"metadata\", \"name\"] }),\n placeholder: \"Project name\",\n value: form.values.metadata.name,\n skipPaddingGap: true,\n })\n ) : (\n <h1 className=\"m-0 px-2 py-2\">{metadata.name}</h1>\n )}\n\n {state.isConfiguratorActive ? (\n widget(\"components.molecule.text-input\", {\n className: \"w-100 border-none\",\n\n inputProps: {\n className: \"h-75 border-0 bg-dark text-white\",\n min: 6,\n max: 60,\n },\n\n key: `project-${form.values.metadata.id}-description`,\n multiline: false,\n onChange: form.update({ path: [\"metadata\", \"description\"] }),\n placeholder: \"Project description\",\n value: form.values.metadata.description,\n skipPaddingGap: true,\n })\n ) : (\n <p className=\"m-0 px-2 py-2\">{metadata.description}</p>\n )}\n </div>\n\n <div className=\"d-flex flex-column gap-3 justify-content-between align-items-end h-100\">\n {state.isConfiguratorActive ? (\n widget(\"components.molecule.text-input\", {\n className: \"w-100\",\n\n inputProps: {\n className: \"h-75 text-end border-0 bg-dark text-white\",\n min: 2,\n max: 30,\n },\n\n key: `project-${form.values.metadata.id}-tag`,\n multiline: false,\n onChange: form.update({ path: [\"metadata\", \"tag\"] }),\n placeholder: \"project-tag\",\n value: form.values.metadata.tag,\n skipPaddingGap: true,\n })\n ) : (\n <span\n class=\"badge bg-primary rounded-4 text-decoration-none\"\n style={{ cursor: \"default\" }}\n title=\"DevHub tag\"\n >\n {metadata.tag}\n </span>\n )}\n\n {permissions.can_configure ? (\n <div className=\"d-flex gap-3\">\n {widget(\"components.atom.button\", {\n classNames: {\n root: [\n \"btn-danger\",\n !state.isConfiguratorActive ? \"d-none\" : \"\",\n ].join(\" \"),\n },\n label: \"Cancel\",\n onClick: onCancel,\n })}\n\n {widget(\"components.atom.button\", {\n classNames: {\n root: [\n \"btn-success\",\n !state.isConfiguratorActive ? \"d-none\" : \"\",\n ].join(\" \"),\n adornment: \"bi-check-circle-fill\",\n },\n disabled: !form.hasUnsubmittedChanges,\n label: \"Save\",\n onClick: onSubmit,\n })}\n\n {widget(\"components.atom.button\", {\n classNames: {\n root: [\n \"btn-primary\",\n state.isConfiguratorActive ? \"d-none\" : \"\",\n ].join(\" \"),\n adornment: \"bi bi-gear-fill\",\n },\n label: \"Configure project\",\n onClick: () => configuratorToggle(true),\n })}\n </div>\n ) : null}\n </div>\n </div>\n );\n};\n\nreturn ProjectConfigurator(props);\n"
},
"gigs-board.feature.project.view-configurator": {
"": "/* INCLUDE: \"common.jsx\" */\nconst nearDevGovGigsContractAccountId =\n props.nearDevGovGigsContractAccountId ||\n (context.widgetSrc ?? \"devgovgigs.near\").split(\"/\", 1)[0];\n\nconst nearDevGovGigsWidgetsAccountId =\n props.nearDevGovGigsWidgetsAccountId ||\n (context.widgetSrc ?? \"devgovgigs.near\").split(\"/\", 1)[0];\n\nfunction widget(widgetName, widgetProps, key) {\n widgetProps = {\n ...widgetProps,\n nearDevGovGigsContractAccountId: props.nearDevGovGigsContractAccountId,\n nearDevGovGigsWidgetsAccountId: props.nearDevGovGigsWidgetsAccountId,\n referral: props.referral,\n };\n\n return (\n <Widget\n src={`${nearDevGovGigsWidgetsAccountId}/widget/gigs-board.${widgetName}`}\n props={widgetProps}\n key={key}\n />\n );\n}\n\nfunction href(widgetName, linkProps) {\n linkProps = { ...linkProps };\n\n if (props.nearDevGovGigsContractAccountId) {\n linkProps.nearDevGovGigsContractAccountId =\n props.nearDevGovGigsContractAccountId;\n }\n\n if (props.nearDevGovGigsWidgetsAccountId) {\n linkProps.nearDevGovGigsWidgetsAccountId =\n props.nearDevGovGigsWidgetsAccountId;\n }\n\n if (props.referral) {\n linkProps.referral = props.referral;\n }\n\n const linkPropsQuery = Object.entries(linkProps)\n .filter(([_key, nullable]) => (nullable ?? null) !== null)\n .map(([key, value]) => `${key}=${value}`)\n .join(\"&\");\n\n return `/#/${nearDevGovGigsWidgetsAccountId}/widget/gigs-board.pages.${widgetName}${\n linkPropsQuery ? \"?\" : \"\"\n }${linkPropsQuery}`;\n}\n/* END_INCLUDE: \"common.jsx\" */\n/* INCLUDE: \"core/lib/struct\" */\nconst Struct = {\n deepFieldUpdate: (\n node,\n { input, params, path: [nextNodeKey, ...remainingPath], via: toFieldValue }\n ) => ({\n ...node,\n\n [nextNodeKey]:\n remainingPath.length > 0\n ? Struct.deepFieldUpdate(\n Struct.typeMatch(node[nextNodeKey]) ||\n Array.isArray(node[nextNodeKey])\n ? node[nextNodeKey]\n : {\n ...((node[nextNodeKey] ?? null) !== null\n ? { __archivedLeaf__: node[nextNodeKey] }\n : {}),\n },\n\n { input, path: remainingPath, via: toFieldValue }\n )\n : toFieldValue({\n input,\n lastKnownValue: node[nextNodeKey],\n params,\n }),\n }),\n\n isEqual: (input1, input2) =>\n Struct.typeMatch(input1) && Struct.typeMatch(input2)\n ? JSON.stringify(Struct.toOrdered(input1)) ===\n JSON.stringify(Struct.toOrdered(input2))\n : false,\n\n toOrdered: (input) =>\n Object.keys(input)\n .sort()\n .reduce((output, key) => ({ ...output, [key]: input[key] }), {}),\n\n pick: (object, subsetKeys) =>\n Object.fromEntries(\n Object.entries(object ?? {}).filter(([key, _]) =>\n subsetKeys.includes(key)\n )\n ),\n\n typeMatch: (input) =>\n input !== null && typeof input === \"object\" && !Array.isArray(input),\n};\n/* END_INCLUDE: \"core/lib/struct\" */\n/* INCLUDE: \"core/lib/gui/form\" */\nconst defaultFieldUpdate = ({\n input,\n lastKnownValue,\n params: { arrayDelimiter },\n}) => {\n switch (typeof input) {\n case \"boolean\":\n return input;\n\n case \"object\":\n return Array.isArray(input) && typeof lastKnownValue === \"string\"\n ? input.join(arrayDelimiter ?? \",\")\n : input;\n\n case \"string\":\n return Array.isArray(lastKnownValue)\n ? input.split(arrayDelimiter ?? \",\").map((string) => string.trim())\n : input;\n\n default: {\n if ((input ?? null) === null) {\n switch (typeof lastKnownValue) {\n case \"boolean\":\n return !lastKnownValue;\n\n default:\n return lastKnownValue;\n }\n } else return input;\n }\n }\n};\n\nconst useForm = ({ initialValues, stateKey: formStateKey, uninitialized }) => {\n const initialFormState = {\n hasUnsubmittedChanges: false,\n values: initialValues ?? {},\n };\n\n const formState = state[formStateKey] ?? null,\n isSynced = Struct.isEqual(formState?.values ?? {}, initialFormState.values);\n\n const formReset = () =>\n State.update((lastKnownComponentState) => ({\n ...lastKnownComponentState,\n [formStateKey]: initialFormState,\n hasUnsubmittedChanges: false,\n }));\n\n const formUpdate =\n ({ path, via: customFieldUpdate, ...params }) =>\n (fieldInput) => {\n const updatedValues = Struct.deepFieldUpdate(\n formState?.values ?? {},\n\n {\n input: fieldInput?.target?.value ?? fieldInput,\n params,\n path,\n\n via:\n typeof customFieldUpdate === \"function\"\n ? customFieldUpdate\n : defaultFieldUpdate,\n }\n );\n\n State.update((lastKnownComponentState) => ({\n ...lastKnownComponentState,\n\n [formStateKey]: {\n hasUnsubmittedChanges: !Struct.isEqual(\n updatedValues,\n initialFormState.values\n ),\n\n values: updatedValues,\n },\n }));\n };\n\n if (\n !uninitialized &&\n (formState === null ||\n (Object.keys(formState?.values ?? {}).length > 0 &&\n !formState.hasUnsubmittedChanges &&\n !isSynced))\n ) {\n formReset();\n }\n\n return {\n ...(formState ?? initialFormState),\n isSynced,\n reset: formReset,\n update: formUpdate,\n };\n};\n/* END_INCLUDE: \"core/lib/gui/form\" */\n/* INCLUDE: \"core/lib/gui/attractable\" */\nconst AttractableDiv = styled.div`\n box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;\n transition: box-shadow 0.6s;\n\n &:hover {\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;\n }\n`;\n\nconst AttractableLink = styled.a`\n box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;\n transition: box-shadow 0.6s;\n\n &:hover {\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;\n }\n`;\n\nconst AttractableImage = styled.img`\n box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;\n transition: box-shadow 0.6s;\n\n &:hover {\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;\n }\n`;\n/* END_INCLUDE: \"core/lib/gui/attractable\" */\n/* INCLUDE: \"core/lib/uuid\" */\nconst uuid = () =>\n [Date.now().toString(16)]\n .concat(\n Array.from(\n { length: 4 },\n () => Math.floor(Math.random() * 0xffffffff) & 0xffffffff\n ).map((value) => value.toString(16))\n )\n .join(\"-\");\n\nconst withUUIDIndex = (data) => {\n const id = uuid();\n\n return Object.fromEntries([[id, { ...data, id }]]);\n};\n/* END_INCLUDE: \"core/lib/uuid\" */\n/* INCLUDE: \"core/adapter/dev-hub\" */\nconst devHubAccountId =\n props.nearDevGovGigsContractAccountId ||\n (context.widgetSrc ?? \"devgovgigs.near\").split(\"/\", 1)[0];\n\nconst DevHub = {\n edit_community_github: ({ handle, github }) =>\n Near.call(devHubAccountId, \"edit_community_github\", { handle, github }) ??\n null,\n\n create_project: ({ author_community_handle, metadata }) =>\n Near.call(devHubAccountId, \"create_project\", {\n author_community_handle,\n metadata,\n }) ?? null,\n\n update_project_metadata: ({ metadata }) =>\n Near.call(devHubAccountId, \"update_project_metadata\", { metadata }) ?? null,\n\n get_project_views_metadata: ({ project_id }) =>\n Near.view(devHubAccountId, \"get_project_views_metadata\", { project_id }) ??\n null,\n\n create_project_view: ({ project_id, view }) =>\n Near.call(devHubAccountId, \"create_project_view\", { project_id, view }) ??\n null,\n\n update_project_view: ({ project_id, view }) =>\n Near.call(devHubAccountId, \"create_project_view\", { project_id, view }) ??\n null,\n\n delete_project_view: ({ project_id, view_id }) =>\n Near.call(devHubAccountId, \"get_project_view\", { project_id, view_id }) ??\n null,\n\n get_access_control_info: () =>\n Near.view(devHubAccountId, \"get_access_control_info\") ?? null,\n\n get_all_authors: () => Near.view(devHubAccountId, \"get_all_authors\") ?? null,\n\n get_all_communities: () =>\n Near.view(devHubAccountId, \"get_all_communities\") ?? null,\n\n get_all_labels: () => Near.view(devHubAccountId, \"get_all_labels\") ?? null,\n\n get_community: ({ handle }) =>\n Near.view(devHubAccountId, \"get_community\", { handle }) ?? null,\n\n get_post: ({ post_id }) =>\n Near.view(devHubAccountId, \"get_post\", { post_id }) ?? null,\n\n get_posts_by_author: ({ author }) =>\n Near.view(devHubAccountId, \"get_posts_by_author\", { author }) ?? null,\n\n get_posts_by_label: ({ label }) =>\n Near.view(nearDevGovGigsContractAccountId, \"get_posts_by_label\", {\n label,\n }) ?? null,\n\n get_root_members: () =>\n Near.view(devHubAccountId, \"get_root_members\") ?? null,\n\n useQuery: ({ name, params }) => {\n const initialState = { data: null, error: null, isLoading: true };\n\n const cacheState = useCache(\n () =>\n Near.asyncView(devHubAccountId, [\"get\", name].join(\"_\"), params ?? {})\n .then((response) => ({\n ...initialState,\n data: response ?? null,\n isLoading: false,\n }))\n .catch((error) => ({\n ...initialState,\n error: props?.error ?? error,\n isLoading: false,\n })),\n\n JSON.stringify({ name, params }),\n { subscribe: true }\n );\n\n return cacheState === null ? initialState : cacheState;\n },\n};\n/* END_INCLUDE: \"core/adapter/dev-hub\" */\n/* INCLUDE: \"entity/viewer\" */\nconst access_control_info = DevHub.useQuery({\n name: \"access_control_info\",\n});\n\nconst Viewer = {\n can: {\n editCommunity: (communityData) =>\n Struct.typeMatch(communityData) &&\n (communityData.admins.includes(context.accountId) ||\n Viewer.role.isDevHubModerator),\n },\n\n projectPermissions: (projectId) =>\n Near.view(devHubAccountId, \"get_account_project_permissions\", {\n account_id: context.accountId,\n project_id: parseInt(projectId, 10),\n }) ?? { can_configure: false },\n\n role: {\n isDevHubModerator:\n access_control_info.data === null || access_control_info.isLoading\n ? false\n : access_control_info.data.members_list[\n \"team:moderators\"\n ]?.children?.includes?.(context.accountId) ?? false,\n },\n};\n/* END_INCLUDE: \"entity/viewer\" */\n\nconst ProjectViewConfiguratorSettings = {\n maxColumnsNumber: 20,\n};\n\nconst CompactContainer = styled.div`\n width: fit-content !important;\n max-width: 100%;\n`;\n\nconst ProjectViewMetadataDefaults = {\n kind: \"kanban-view\",\n title: \"\",\n description: \"\",\n};\n\nconst ProjectViewConfigDefaults = {\n ticket_kind: \"post-ticket\",\n tags: { excluded: [], required: [] },\n columns: [],\n};\n\nconst ProjectViewConfigurator = ({\n link,\n metadata,\n permissions,\n projectId,\n}) => {\n const isNewView = (metadata ?? null) === null;\n\n State.init({\n editingMode: \"form\",\n isEditorActive: isNewView,\n });\n\n const config = DevHub.useQuery({\n name: \"project_view_config\",\n params: { id: metadata.id },\n });\n\n const form = useForm({\n initialValues: {\n metadata: metadata ?? ProjectViewMetadataDefaults,\n config: isNewView ? ProjectViewConfigDefaults : JSON.parse(config.data),\n },\n\n stateKey: \"view\",\n });\n\n const editorToggle = (forcedState) =>\n State.update((lastKnownState) => ({\n ...lastKnownState,\n isEditorActive: forcedState ?? !lastKnownState.isEditorActive,\n }));\n\n const editingModeSwitch = ({ target: { value } }) =>\n State.update((lastKnownState) => ({\n ...lastKnownState,\n editingMode: value,\n }));\n\n const columnsCreateNew = ({ lastKnownValue }) =>\n lastKnownValue.length < ProjectViewConfiguratorSettings.maxColumnsNumber\n ? [\n ...lastKnownValue,\n { id: uuid(), tag: \"\", title: \"New column\", description: \"\" },\n ]\n : lastKnownValue;\n\n const columnsDeleteById =\n (targetId) =>\n ({ lastKnownValue }) =>\n lastKnownValue.filter(({ id }) => targetId !== id);\n\n const onCancel = () => {\n form.reset();\n editorToggle(false);\n };\n\n const onSubmit = () =>\n DevHub[isNewView ? \"create_project_view\" : \"update_project_view\"]({\n project_id: projectId,\n\n view: {\n metadata: form.values.metadata,\n config: JSON.stringify(form.values.config),\n },\n });\n\n const formElement =\n Object.keys(form.values).length > 0 ? (\n <>\n <div className=\"d-flex gap-3 flex-column flex-lg-row\">\n {widget(\"components.molecule.text-input\", {\n className: \"flex-shrink-0\",\n key: `${form.values.metadata.id ?? \"new-view\"}-title`,\n label: \"Name\",\n onChange: form.update({ path: [\"metadata\", \"title\"] }),\n placeholder: \"NEAR Protocol NEPs\",\n value: form.values.metadata.title,\n })}\n </div>\n\n <CompactContainer>\n <div className=\"d-flex gap-3 flex-column flex-lg-row\">\n {widget(\"components.molecule.text-input\", {\n className: \"flex-shrink-0\",\n format: \"comma-separated\",\n key: `${form.values.metadata.id ?? \"new-view\"}-tags-required`,\n label: \"Search terms for all the tags MUST be presented in posts\",\n onChange: form.update({ path: [\"config\", \"tags\", \"required\"] }),\n placeholder: \"near-protocol-neps, \",\n value: form.values.config.tags.required.join(\", \"),\n })}\n </div>\n\n <div className=\"d-flex gap-3 flex-column flex-lg-row\">\n {widget(\"components.molecule.text-input\", {\n className: \"flex-shrink-0\",\n format: \"comma-separated\",\n key: `${form.values.metadata.id ?? \"new-view\"}-tags-excluded`,\n\n label:\n \"Search terms for all the tags MUST NOT be presented in posts\",\n\n onChange: form.update({ path: [\"config\", \"tags\", \"excluded\"] }),\n placeholder: \"near-protocol-neps, \",\n value: form.values.config.tags.excluded.join(\", \"),\n })}\n </div>\n </CompactContainer>\n\n {widget(\"components.molecule.text-input\", {\n className: \"w-100\",\n inputProps: { className: \"h-75\" },\n key: `${form.values.metadata.id ?? \"new-view\"}-description`,\n label: \"Description\",\n multiline: true,\n onChange: form.update({ path: [\"metadata\", \"description\"] }),\n placeholder: \"Latest NEAR Enhancement Proposals by status.\",\n value: form.values.metadata.description,\n })}\n\n <div className=\"d-flex align-items-center justify-content-between\">\n <span className=\"d-inline-flex gap-2 m-0\">\n <i className=\"bi bi-list-task\" />\n\n <span>\n {`Columns ( max. ${ProjectViewConfiguratorSettings.maxColumnsNumber} )`}\n </span>\n </span>\n </div>\n\n <div className=\"d-flex flex-column align-items-center gap-3\">\n {form.values.config.columns.map(\n ({ id, description, tag, title }, columnIdx) => (\n <div\n className=\"d-flex gap-3 border border-secondary rounded-4 p-3 w-100\"\n key={id}\n >\n <div className=\"d-flex flex-column gap-1 w-100\">\n {widget(\"components.molecule.text-input\", {\n className: \"flex-grow-1\",\n key: `column-${id}-title`,\n label: \"Title\",\n\n onChange: form.update({\n path: [\"config\", \"columns\", columnIdx, \"title\"],\n }),\n\n placeholder: \"👀 Review\",\n value: title,\n })}\n\n {widget(\"components.molecule.text-input\", {\n className: \"flex-grow-1\",\n key: `column-${id}-description`,\n label: \"Description\",\n\n onChange: form.update({\n path: [\"config\", \"columns\", columnIdx, \"description\"],\n }),\n\n placeholder:\n \"NEPs that need a review by Subject Matter Experts.\",\n\n value: description,\n })}\n\n {widget(\"components.molecule.text-input\", {\n key: `${\n form.values.metadata.id ?? \"new-view\"\n }-column-${id}-tag`,\n\n label: \"Tag\",\n\n onChange: form.update({\n path: [\"config\", \"columns\", columnIdx, \"tag\"],\n }),\n\n placeholder: \"\",\n value: tag,\n })}\n </div>\n\n <div\n className=\"d-flex flex-column gap-3 border-start p-3 pe-0\"\n style={{ marginTop: -16, marginBottom: -16 }}\n >\n <button\n className=\"btn btn-outline-danger shadow\"\n onClick={form.update({\n path: [\"config\", \"columns\"],\n via: columnsDeleteById(id),\n })}\n title=\"Delete column\"\n >\n <i className=\"bi bi-trash-fill\" />\n </button>\n </div>\n </div>\n )\n )}\n </div>\n </>\n ) : null;\n\n return !isNewView && config.data === null ? (\n <div>Loading...</div>\n ) : (\n <div className=\"d-flex flex-column gap-4 py-4\">\n {state.isEditorActive && Object.keys(form.values).length > 0 ? (\n <AttractableDiv className=\"d-flex flex-column gap-3 p-3 w-100 rounded-4\">\n <div className=\"d-flex align-items-center justify-content-between gap-3\">\n <h5 className=\"h5 d-inline-flex gap-2 m-0\">\n <i className=\"bi bi-wrench-adjustable-circle-fill\" />\n <span>View configuration</span>\n </h5>\n\n {widget(\"components.molecule.button-switch\", {\n currentValue: state.editingMode,\n key: \"editingMode\",\n onChange: editingModeSwitch,\n\n options: [\n { label: \"Form\", value: \"form\" },\n { label: \"JSON\", value: \"JSON\" },\n ],\n\n title: \"Editing mode selection\",\n })}\n </div>\n\n {state.editingMode === \"form\" ? (\n formElement\n ) : (\n <div className=\"d-flex flex-column flex-grow-1 border-0 bg-transparent w-100\">\n <textarea\n className=\"form-control\"\n disabled\n rows=\"12\"\n type=\"text\"\n value={JSON.stringify(form.values ?? {}, null, \"\\t\")}\n />\n </div>\n )}\n\n <div className=\"d-flex align-items-center justify-content-end gap-3\">\n <button\n className=\"btn shadow btn-outline-secondary d-inline-flex gap-2 me-auto\"\n disabled={\n form.values.columns.length >=\n ProjectViewConfiguratorSettings.maxColumnsNumber\n }\n onClick={form.update({\n path: [\"config\", \"columns\"],\n via: columnsCreateNew,\n })}\n >\n <i className=\"bi bi-plus-lg\" />\n <span>New column</span>\n </button>\n\n <button\n className=\"btn btn-outline-danger border-0 d-inline-flex gap-2 align-items-center\"\n onClick={onCancel}\n style={{ width: \"fit-content\" }}\n >\n <span>Cancel</span>\n </button>\n\n <button\n disabled={!form.hasUnsubmittedChanges}\n className=\"btn shadow btn-success d-inline-flex gap-2 align-items-center\"\n onClick={onSubmit}\n style={{ width: \"fit-content\" }}\n >\n <i className=\"bi bi-cloud-arrow-up-fill\" />\n <span>Save</span>\n </button>\n </div>\n </AttractableDiv>\n ) : null}\n\n {widget([\"entity.project\", form.values.metadata.kind].join(\".\"), {\n ...form.values,\n editorTrigger: () => editorToggle(true),\n link,\n permissions,\n })}\n </div>\n );\n};\n\nreturn ProjectViewConfigurator(props);\n"
}
}
}
}
}1 automatic refund step from the network not shown.
This page reads FastNEAR's public transaction index and stores nothing. This command asks a NEAR archival node for the same transaction and needs no keys.
curl -s https://archival-rpc.testnet.fastnear.com -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"tx","params":{"tx_hash":"Ec2Lo6HsHSFxP87VN1vwRGYiTToic1h433DdnRs6v9bu","sender_account_id":"testhub2.akaia.testnet","wait_until":"FINAL"}}'Vouch has its own page because testnet.nearblocks.io stopped indexing on 27 Sep 2026, so it can't show newer transactions.