@burdenoff/microfe-technospam 2026.705.2 → 2026.709.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/wspace-operations.js +67 -0
- package/dist/generated/wspace-operations.js.map +1 -0
- package/dist/index.js +3 -1
- package/dist/technospam/hooks/useTechnoSpamAnalytics.js +13 -0
- package/dist/technospam/hooks/useTechnoSpamAnalytics.js.map +1 -0
- package/dist/technospam/index.js +2 -0
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js +129 -105
- package/dist/technospam/pages/ApplicationsProblemDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js +87 -72
- package/dist/technospam/pages/ApplicationsProblemsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js +174 -143
- package/dist/technospam/pages/CoursesCourseDetailsPagePage.js.map +1 -1
- package/dist/technospam/pages/CoursesCoursesPagePage.js +95 -80
- package/dist/technospam/pages/CoursesCoursesPagePage.js.map +1 -1
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js +93 -78
- package/dist/technospam/pages/HackathonsHackathonsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js +135 -121
- package/dist/technospam/pages/MentorshipMentorProfilePagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipMentorsPagePage.js +156 -142
- package/dist/technospam/pages/MentorshipMentorsPagePage.js.map +1 -1
- package/dist/technospam/pages/MentorshipSessionsPagePage.js +129 -112
- package/dist/technospam/pages/MentorshipSessionsPagePage.js.map +1 -1
- package/dist/technospam/services/assistantApi.js +222 -0
- package/dist/technospam/services/assistantApi.js.map +1 -0
- package/dist/technospam/services/createSandboxAssistantTransport.js +120 -0
- package/dist/technospam/services/createSandboxAssistantTransport.js.map +1 -0
- package/dist/technospam/utils/pageContext.js +46 -0
- package/dist/technospam/utils/pageContext.js.map +1 -0
- package/package.json +5 -1
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { gql as e } from "@apollo/client";
|
|
2
|
+
import "@apollo/client/react";
|
|
3
|
+
e`
|
|
4
|
+
mutation CheckAiCredits {
|
|
5
|
+
checkAiCredits
|
|
6
|
+
}
|
|
7
|
+
`, e`
|
|
8
|
+
mutation ReportAiTokenUsage($input: ReportAiTokenUsageInput!) {
|
|
9
|
+
reportAiTokenUsage(input: $input)
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
var t = e`
|
|
13
|
+
mutation CreateSandbox($input: CreateSandboxInput!) {
|
|
14
|
+
createSandbox(input: $input) {
|
|
15
|
+
id
|
|
16
|
+
name
|
|
17
|
+
status
|
|
18
|
+
network {
|
|
19
|
+
internalUrl
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
`, n = e`
|
|
24
|
+
mutation ProxySandboxRequest($input: ProxySandboxRequestInput!) {
|
|
25
|
+
proxySandboxRequest(input: $input) {
|
|
26
|
+
status
|
|
27
|
+
body
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`, r = e`
|
|
31
|
+
mutation ExtendSandboxTtl($id: ID!, $additionalSeconds: Int!, $context: ContextInput!) {
|
|
32
|
+
extendSandboxTTL(
|
|
33
|
+
id: $id
|
|
34
|
+
additionalSeconds: $additionalSeconds
|
|
35
|
+
context: $context
|
|
36
|
+
) {
|
|
37
|
+
id
|
|
38
|
+
expiresAt
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
`, i = e`
|
|
42
|
+
query GetSandbox($id: ID!, $context: ContextInput!) {
|
|
43
|
+
getSandbox(id: $id, context: $context) {
|
|
44
|
+
id
|
|
45
|
+
status
|
|
46
|
+
errorMessage
|
|
47
|
+
network {
|
|
48
|
+
internalUrl
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
`, a = e`
|
|
53
|
+
query GetActiveSandboxes($context: ContextInput!) {
|
|
54
|
+
getActiveSandboxes(context: $context) {
|
|
55
|
+
id
|
|
56
|
+
name
|
|
57
|
+
status
|
|
58
|
+
metadata
|
|
59
|
+
template
|
|
60
|
+
createdBy
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
`;
|
|
64
|
+
//#endregion
|
|
65
|
+
export { t as CreateSandboxDocument, r as ExtendSandboxTtlDocument, a as GetActiveSandboxesDocument, i as GetSandboxDocument, n as ProxySandboxRequestDocument };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=wspace-operations.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wspace-operations.js","names":[],"sources":["../../src/generated/wspace-operations.ts"],"sourcesContent":["// @ts-nocheck\nimport * as Types from './wspace-types';\n\nimport { gql } from '@apollo/client';\nimport * as Apollo from '@apollo/client';\nimport * as ApolloReactHooks from '@apollo/client/react';\nconst defaultOptions = {} as const;\nexport type CheckAiCreditsMutationVariables = Types.Exact<{ [key: string]: never; }>;\n\n\nexport type CheckAiCreditsMutation = { __typename?: 'Mutation', checkAiCredits: boolean };\n\nexport type ReportAiTokenUsageMutationVariables = Types.Exact<{\n input: Types.ReportAiTokenUsageInput;\n}>;\n\n\nexport type ReportAiTokenUsageMutation = { __typename?: 'Mutation', reportAiTokenUsage: boolean };\n\nexport type CreateSandboxMutationVariables = Types.Exact<{\n input: Types.CreateSandboxInput;\n}>;\n\n\nexport type CreateSandboxMutation = { __typename?: 'Mutation', createSandbox: { __typename?: 'Sandbox', id: string, name: string, status: Types.SandboxStatus, network: { __typename?: 'SandboxNetwork', internalUrl?: string | null } } };\n\nexport type ProxySandboxRequestMutationVariables = Types.Exact<{\n input: Types.ProxySandboxRequestInput;\n}>;\n\n\nexport type ProxySandboxRequestMutation = { __typename?: 'Mutation', proxySandboxRequest: { __typename?: 'ProxySandboxResponse', status: number, body?: Record<string, unknown> | null } };\n\nexport type ExtendSandboxTtlMutationVariables = Types.Exact<{\n id: Types.Scalars['ID']['input'];\n additionalSeconds: Types.Scalars['Int']['input'];\n context: Types.ContextInput;\n}>;\n\n\nexport type ExtendSandboxTtlMutation = { __typename?: 'Mutation', extendSandboxTTL: { __typename?: 'Sandbox', id: string, expiresAt: string } };\n\nexport type GetSandboxQueryVariables = Types.Exact<{\n id: Types.Scalars['ID']['input'];\n context: Types.ContextInput;\n}>;\n\n\nexport type GetSandboxQuery = { __typename?: 'Query', getSandbox?: { __typename?: 'Sandbox', id: string, status: Types.SandboxStatus, errorMessage?: string | null, network: { __typename?: 'SandboxNetwork', internalUrl?: string | null } } | null };\n\nexport type GetActiveSandboxesQueryVariables = Types.Exact<{\n context: Types.ContextInput;\n}>;\n\n\nexport type GetActiveSandboxesQuery = { __typename?: 'Query', getActiveSandboxes: Array<{ __typename?: 'Sandbox', id: string, name: string, status: Types.SandboxStatus, metadata?: Record<string, unknown> | null, template: Types.SandboxTemplate, createdBy: string }> };\n\n\nexport const CheckAiCreditsDocument = gql`\n mutation CheckAiCredits {\n checkAiCredits\n}\n `;\nexport type CheckAiCreditsMutationFn = Apollo.MutationFunction<Types.CheckAiCreditsMutation, Types.CheckAiCreditsMutationVariables>;\n\n/**\n * __useCheckAiCreditsMutation__\n *\n * To run a mutation, you first call `useCheckAiCreditsMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useCheckAiCreditsMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [checkAiCreditsMutation, { data, loading, error }] = useCheckAiCreditsMutation({\n * variables: {\n * },\n * });\n */\nexport function useCheckAiCreditsMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<Types.CheckAiCreditsMutation, Types.CheckAiCreditsMutationVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useMutation<Types.CheckAiCreditsMutation, Types.CheckAiCreditsMutationVariables>(CheckAiCreditsDocument, options);\n }\nexport type CheckAiCreditsMutationHookResult = ReturnType<typeof useCheckAiCreditsMutation>;\nexport type CheckAiCreditsMutationResult = Apollo.MutationResult<Types.CheckAiCreditsMutation>;\nexport type CheckAiCreditsMutationOptions = Apollo.BaseMutationOptions<Types.CheckAiCreditsMutation, Types.CheckAiCreditsMutationVariables>;\nexport const ReportAiTokenUsageDocument = gql`\n mutation ReportAiTokenUsage($input: ReportAiTokenUsageInput!) {\n reportAiTokenUsage(input: $input)\n}\n `;\nexport type ReportAiTokenUsageMutationFn = Apollo.MutationFunction<Types.ReportAiTokenUsageMutation, Types.ReportAiTokenUsageMutationVariables>;\n\n/**\n * __useReportAiTokenUsageMutation__\n *\n * To run a mutation, you first call `useReportAiTokenUsageMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useReportAiTokenUsageMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [reportAiTokenUsageMutation, { data, loading, error }] = useReportAiTokenUsageMutation({\n * variables: {\n * input: // value for 'input'\n * },\n * });\n */\nexport function useReportAiTokenUsageMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<Types.ReportAiTokenUsageMutation, Types.ReportAiTokenUsageMutationVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useMutation<Types.ReportAiTokenUsageMutation, Types.ReportAiTokenUsageMutationVariables>(ReportAiTokenUsageDocument, options);\n }\nexport type ReportAiTokenUsageMutationHookResult = ReturnType<typeof useReportAiTokenUsageMutation>;\nexport type ReportAiTokenUsageMutationResult = Apollo.MutationResult<Types.ReportAiTokenUsageMutation>;\nexport type ReportAiTokenUsageMutationOptions = Apollo.BaseMutationOptions<Types.ReportAiTokenUsageMutation, Types.ReportAiTokenUsageMutationVariables>;\nexport const CreateSandboxDocument = gql`\n mutation CreateSandbox($input: CreateSandboxInput!) {\n createSandbox(input: $input) {\n id\n name\n status\n network {\n internalUrl\n }\n }\n}\n `;\nexport type CreateSandboxMutationFn = Apollo.MutationFunction<Types.CreateSandboxMutation, Types.CreateSandboxMutationVariables>;\n\n/**\n * __useCreateSandboxMutation__\n *\n * To run a mutation, you first call `useCreateSandboxMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useCreateSandboxMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [createSandboxMutation, { data, loading, error }] = useCreateSandboxMutation({\n * variables: {\n * input: // value for 'input'\n * },\n * });\n */\nexport function useCreateSandboxMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<Types.CreateSandboxMutation, Types.CreateSandboxMutationVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useMutation<Types.CreateSandboxMutation, Types.CreateSandboxMutationVariables>(CreateSandboxDocument, options);\n }\nexport type CreateSandboxMutationHookResult = ReturnType<typeof useCreateSandboxMutation>;\nexport type CreateSandboxMutationResult = Apollo.MutationResult<Types.CreateSandboxMutation>;\nexport type CreateSandboxMutationOptions = Apollo.BaseMutationOptions<Types.CreateSandboxMutation, Types.CreateSandboxMutationVariables>;\nexport const ProxySandboxRequestDocument = gql`\n mutation ProxySandboxRequest($input: ProxySandboxRequestInput!) {\n proxySandboxRequest(input: $input) {\n status\n body\n }\n}\n `;\nexport type ProxySandboxRequestMutationFn = Apollo.MutationFunction<Types.ProxySandboxRequestMutation, Types.ProxySandboxRequestMutationVariables>;\n\n/**\n * __useProxySandboxRequestMutation__\n *\n * To run a mutation, you first call `useProxySandboxRequestMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useProxySandboxRequestMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [proxySandboxRequestMutation, { data, loading, error }] = useProxySandboxRequestMutation({\n * variables: {\n * input: // value for 'input'\n * },\n * });\n */\nexport function useProxySandboxRequestMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<Types.ProxySandboxRequestMutation, Types.ProxySandboxRequestMutationVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useMutation<Types.ProxySandboxRequestMutation, Types.ProxySandboxRequestMutationVariables>(ProxySandboxRequestDocument, options);\n }\nexport type ProxySandboxRequestMutationHookResult = ReturnType<typeof useProxySandboxRequestMutation>;\nexport type ProxySandboxRequestMutationResult = Apollo.MutationResult<Types.ProxySandboxRequestMutation>;\nexport type ProxySandboxRequestMutationOptions = Apollo.BaseMutationOptions<Types.ProxySandboxRequestMutation, Types.ProxySandboxRequestMutationVariables>;\nexport const ExtendSandboxTtlDocument = gql`\n mutation ExtendSandboxTtl($id: ID!, $additionalSeconds: Int!, $context: ContextInput!) {\n extendSandboxTTL(\n id: $id\n additionalSeconds: $additionalSeconds\n context: $context\n ) {\n id\n expiresAt\n }\n}\n `;\nexport type ExtendSandboxTtlMutationFn = Apollo.MutationFunction<Types.ExtendSandboxTtlMutation, Types.ExtendSandboxTtlMutationVariables>;\n\n/**\n * __useExtendSandboxTtlMutation__\n *\n * To run a mutation, you first call `useExtendSandboxTtlMutation` within a React component and pass it any options that fit your needs.\n * When your component renders, `useExtendSandboxTtlMutation` returns a tuple that includes:\n * - A mutate function that you can call at any time to execute the mutation\n * - An object with fields that represent the current status of the mutation's execution\n *\n * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;\n *\n * @example\n * const [extendSandboxTtlMutation, { data, loading, error }] = useExtendSandboxTtlMutation({\n * variables: {\n * id: // value for 'id'\n * additionalSeconds: // value for 'additionalSeconds'\n * context: // value for 'context'\n * },\n * });\n */\nexport function useExtendSandboxTtlMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<Types.ExtendSandboxTtlMutation, Types.ExtendSandboxTtlMutationVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useMutation<Types.ExtendSandboxTtlMutation, Types.ExtendSandboxTtlMutationVariables>(ExtendSandboxTtlDocument, options);\n }\nexport type ExtendSandboxTtlMutationHookResult = ReturnType<typeof useExtendSandboxTtlMutation>;\nexport type ExtendSandboxTtlMutationResult = Apollo.MutationResult<Types.ExtendSandboxTtlMutation>;\nexport type ExtendSandboxTtlMutationOptions = Apollo.BaseMutationOptions<Types.ExtendSandboxTtlMutation, Types.ExtendSandboxTtlMutationVariables>;\nexport const GetSandboxDocument = gql`\n query GetSandbox($id: ID!, $context: ContextInput!) {\n getSandbox(id: $id, context: $context) {\n id\n status\n errorMessage\n network {\n internalUrl\n }\n }\n}\n `;\n\n/**\n * __useGetSandboxQuery__\n *\n * To run a query within a React component, call `useGetSandboxQuery` and pass it any options that fit your needs.\n * When your component renders, `useGetSandboxQuery` returns an object from Apollo Client that contains loading, error, and data properties\n * you can use to render your UI.\n *\n * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;\n *\n * @example\n * const { data, loading, error } = useGetSandboxQuery({\n * variables: {\n * id: // value for 'id'\n * context: // value for 'context'\n * },\n * });\n */\nexport function useGetSandboxQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetSandboxQuery, Types.GetSandboxQueryVariables> & ({ variables: Types.GetSandboxQueryVariables; skip?: boolean; } | { skip: boolean; }) ) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useQuery<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>(GetSandboxDocument, options);\n }\nexport function useGetSandboxLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useLazyQuery<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>(GetSandboxDocument, options);\n }\n// @ts-ignore\nexport function useGetSandboxSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>;\nexport function useGetSandboxSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetSandboxQuery | undefined, Types.GetSandboxQueryVariables>;\nexport function useGetSandboxSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>) {\n const options = baseOptions === ApolloReactHooks.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useSuspenseQuery<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>(GetSandboxDocument, options);\n }\nexport type GetSandboxQueryHookResult = ReturnType<typeof useGetSandboxQuery>;\nexport type GetSandboxLazyQueryHookResult = ReturnType<typeof useGetSandboxLazyQuery>;\nexport type GetSandboxSuspenseQueryHookResult = ReturnType<typeof useGetSandboxSuspenseQuery>;\nexport type GetSandboxQueryResult = Apollo.QueryResult<Types.GetSandboxQuery, Types.GetSandboxQueryVariables>;\nexport const GetActiveSandboxesDocument = gql`\n query GetActiveSandboxes($context: ContextInput!) {\n getActiveSandboxes(context: $context) {\n id\n name\n status\n metadata\n template\n createdBy\n }\n}\n `;\n\n/**\n * __useGetActiveSandboxesQuery__\n *\n * To run a query within a React component, call `useGetActiveSandboxesQuery` and pass it any options that fit your needs.\n * When your component renders, `useGetActiveSandboxesQuery` returns an object from Apollo Client that contains loading, error, and data properties\n * you can use to render your UI.\n *\n * @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;\n *\n * @example\n * const { data, loading, error } = useGetActiveSandboxesQuery({\n * variables: {\n * context: // value for 'context'\n * },\n * });\n */\nexport function useGetActiveSandboxesQuery(baseOptions: ApolloReactHooks.QueryHookOptions<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables> & ({ variables: Types.GetActiveSandboxesQueryVariables; skip?: boolean; } | { skip: boolean; }) ) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useQuery<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>(GetActiveSandboxesDocument, options);\n }\nexport function useGetActiveSandboxesLazyQuery(baseOptions?: ApolloReactHooks.LazyQueryHookOptions<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>) {\n const options = {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useLazyQuery<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>(GetActiveSandboxesDocument, options);\n }\n// @ts-ignore\nexport function useGetActiveSandboxesSuspenseQuery(baseOptions?: ApolloReactHooks.SuspenseQueryHookOptions<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>;\nexport function useGetActiveSandboxesSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>): ApolloReactHooks.UseSuspenseQueryResult<Types.GetActiveSandboxesQuery | undefined, Types.GetActiveSandboxesQueryVariables>;\nexport function useGetActiveSandboxesSuspenseQuery(baseOptions?: ApolloReactHooks.SkipToken | ApolloReactHooks.SuspenseQueryHookOptions<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>) {\n const options = baseOptions === ApolloReactHooks.skipToken ? baseOptions : {...defaultOptions, ...baseOptions}\n return ApolloReactHooks.useSuspenseQuery<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>(GetActiveSandboxesDocument, options);\n }\nexport type GetActiveSandboxesQueryHookResult = ReturnType<typeof useGetActiveSandboxesQuery>;\nexport type GetActiveSandboxesLazyQueryHookResult = ReturnType<typeof useGetActiveSandboxesLazyQuery>;\nexport type GetActiveSandboxesSuspenseQueryHookResult = ReturnType<typeof useGetActiveSandboxesSuspenseQuery>;\nexport type GetActiveSandboxesQueryResult = Apollo.QueryResult<Types.GetActiveSandboxesQuery, Types.GetActiveSandboxesQueryVariables>;"],"mappings":";;AA0DsC,CAAG;;;;OA8BC,CAAG;;;;;AA+B7C,IAAa,IAAwB,CAAG;;;;;;;;;;;OAsC3B,IAA8B,CAAG;;;;;;;OAkCjC,IAA2B,CAAG;;;;;;;;;;;OAwC9B,IAAqB,CAAG;;;;;;;;;;;OAiDxB,IAA6B,CAAG"}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { useTechnoSpam as e, useTechnoSpamNavigate as t } from "./technospam/providers/TechnoSpamProvider.js";
|
|
2
2
|
import { TechnoSpamRoot as n } from "./technospam/TechnoSpamRoot.js";
|
|
3
|
+
import { useSandboxAssistantTransport as r } from "./technospam/services/createSandboxAssistantTransport.js";
|
|
4
|
+
import { useTechnoSpamAnalytics as i } from "./technospam/hooks/useTechnoSpamAnalytics.js";
|
|
3
5
|
import "./technospam/index.js";
|
|
4
|
-
export { n as TechnoSpamRoot, e as useTechnoSpam, t as useTechnoSpamNavigate };
|
|
6
|
+
export { n as TechnoSpamRoot, r as useSandboxAssistantTransport, e as useTechnoSpam, i as useTechnoSpamAnalytics, t as useTechnoSpamNavigate };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useCallback as e } from "react";
|
|
2
|
+
import { useEventBus as t } from "@burdenoff/fe-libs/shared/events";
|
|
3
|
+
//#region src/technospam/hooks/useTechnoSpamAnalytics.ts
|
|
4
|
+
function n() {
|
|
5
|
+
let n = t();
|
|
6
|
+
return { emit: e((e, t = {}) => {
|
|
7
|
+
n.emitCustom(e, t, { component: "microfe-technospam" });
|
|
8
|
+
}, [n]) };
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as useTechnoSpamAnalytics };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=useTechnoSpamAnalytics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTechnoSpamAnalytics.js","names":[],"sources":["../../../src/technospam/hooks/useTechnoSpamAnalytics.ts"],"sourcesContent":["/**\n * TechnoSpam product analytics helper.\n *\n * Emits events on the shared event bus. The shell's RybbitSink forwards\n * allow-listed fact events to Rybbit Cloud; until TechnoSpam has a site ID,\n * events still flow to the bus and to backend audit / telemetry sinks.\n *\n * Pattern: emit an intent event before a mutation, then a fact event when the\n * server confirms the change.\n */\n\nimport { useCallback } from 'react';\nimport { useEventBus } from '@burdenoff/fe-libs/shared/events';\n\nexport interface EntityEventPayload {\n workspaceId?: string;\n entityId?: string;\n entityType?: string;\n}\n\nexport type TechnoSpamEventName =\n | 'technospam.course.viewed'\n | 'technospam.course.enroll_clicked'\n | 'technospam.course.enrolled'\n | 'technospam.course.progress_updated'\n | 'technospam.course.certificate_claimed'\n | 'technospam.problem.viewed'\n | 'technospam.problem.submit_clicked'\n | 'technospam.problem.submitted'\n | 'technospam.mentor.viewed'\n | 'technospam.mentor.book_clicked'\n | 'technospam.mentor.booked'\n | 'technospam.mentor.become_mentor_clicked'\n | 'technospam.mentor.became_mentor'\n | 'technospam.session.cancel_clicked'\n | 'technospam.session.cancelled'\n | 'technospam.session.complete_clicked'\n | 'technospam.session.completed'\n | 'technospam.hackathon.viewed'\n | 'technospam.hackathon.register_team_clicked'\n | 'technospam.hackathon.team_registered'\n | 'technospam.hackathon.submit_project_clicked'\n | 'technospam.hackathon.project_submitted'\n | 'technospam.search.performed';\n\nexport function useTechnoSpamAnalytics() {\n const bus = useEventBus();\n\n const emit = useCallback(\n (name: TechnoSpamEventName, payload: EntityEventPayload & Record<string, unknown> = {}) => {\n bus.emitCustom(name, payload, { component: 'microfe-technospam' });\n },\n [bus]\n );\n\n return { emit };\n}\n"],"mappings":";;;AA6CA,SAAgB,IAAyB;CACvC,IAAM,IAAM,GAAa;AASzB,QAAO,EAAE,MAPI,GACV,GAA2B,IAAwD,EAAE,KAAK;AACzF,IAAI,WAAW,GAAM,GAAS,EAAE,WAAW,sBAAsB,CAAC;IAEpE,CAAC,EAAI,CACN,EAEc"}
|
package/dist/technospam/index.js
CHANGED
|
@@ -4,162 +4,175 @@ import { PageLayout as n } from "../components/PageLayout.js";
|
|
|
4
4
|
import { StatCard as r } from "../components/StatCard.js";
|
|
5
5
|
import { formatDateTime as i, humanizeEnum as a } from "../utils/format.js";
|
|
6
6
|
import { StatusBadge as o } from "../components/StatusBadge.js";
|
|
7
|
-
import { EmptyView as s, ErrorView as c, LoadingRows as
|
|
7
|
+
import { EmptyView as s, ErrorView as c, LoadingRows as ee } from "../components/StateViews.js";
|
|
8
8
|
import "../components/index.js";
|
|
9
|
-
import { notify as
|
|
10
|
-
import { useProblemQuery as
|
|
9
|
+
import { notify as l } from "../lib/toast.js";
|
|
10
|
+
import { useProblemQuery as te, useSubmissionsQuery as u, useSubmitSolution as d } from "../api/technospamApi.js";
|
|
11
|
+
import { useTechnoSpamAnalytics as f } from "../hooks/useTechnoSpamAnalytics.js";
|
|
11
12
|
import { useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
12
|
-
import { Clock as _, Code2 as v, FileText as y, Layers as b, Send as
|
|
13
|
-
import { useSearchParams as
|
|
14
|
-
import { jsx as
|
|
15
|
-
import { Badge as
|
|
13
|
+
import { Clock as _, Code2 as v, FileText as y, Layers as b, Send as ne, Tag as x, Trophy as S } from "lucide-react";
|
|
14
|
+
import { useSearchParams as C } from "react-router-dom";
|
|
15
|
+
import { jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
16
|
+
import { Badge as E, Button as D, GlassCard as O, Select as re, SelectContent as ie, SelectItem as ae, SelectTrigger as oe, SelectValue as se, Skeleton as k, Textarea as ce } from "@burdenoff/fe-libs/ui";
|
|
16
17
|
//#region src/technospam/pages/ApplicationsProblemDetailsPagePage.tsx
|
|
17
|
-
var
|
|
18
|
+
var A = [
|
|
18
19
|
"javascript",
|
|
19
20
|
"python",
|
|
20
21
|
"typescript"
|
|
21
22
|
];
|
|
22
|
-
function
|
|
23
|
-
return /* @__PURE__ */
|
|
23
|
+
function j({ label: e, children: n, bodyClassName: r }) {
|
|
24
|
+
return /* @__PURE__ */ T("div", {
|
|
24
25
|
className: "overflow-hidden rounded-xl border border-border-strong bg-bg-sunken shadow-sm",
|
|
25
|
-
children: [/* @__PURE__ */
|
|
26
|
+
children: [/* @__PURE__ */ T("div", {
|
|
26
27
|
className: "flex items-center justify-between gap-2 border-b border-border-seam bg-bg-canvas/40 px-4 py-2",
|
|
27
|
-
children: [/* @__PURE__ */
|
|
28
|
+
children: [/* @__PURE__ */ T("div", {
|
|
28
29
|
className: "flex items-center gap-1.5",
|
|
29
30
|
children: [
|
|
30
|
-
/* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
31
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
|
|
32
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
|
|
33
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
|
|
33
34
|
]
|
|
34
|
-
}), /* @__PURE__ */
|
|
35
|
+
}), /* @__PURE__ */ T("span", {
|
|
35
36
|
className: "inline-flex items-center gap-1.5 font-mono text-xs text-text-muted",
|
|
36
37
|
children: [
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ w(v, { size: 13 }),
|
|
38
39
|
" ",
|
|
39
40
|
e
|
|
40
41
|
]
|
|
41
42
|
})]
|
|
42
|
-
}), /* @__PURE__ */
|
|
43
|
+
}), /* @__PURE__ */ w("pre", {
|
|
43
44
|
className: t("overflow-auto p-4 font-mono text-xs leading-relaxed text-text-primary", r),
|
|
44
45
|
children: n
|
|
45
46
|
})]
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
return /* @__PURE__ */
|
|
49
|
+
function M({ s: e }) {
|
|
50
|
+
return /* @__PURE__ */ T("div", {
|
|
50
51
|
className: "flex flex-wrap items-center gap-x-4 gap-y-1 rounded-lg border border-transparent px-2 py-3 transition-colors hover:border-border-seam hover:bg-bg-sunken",
|
|
51
52
|
children: [
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ w(o, { status: e.verdict }),
|
|
54
|
+
/* @__PURE__ */ T("span", {
|
|
54
55
|
className: "inline-flex items-center gap-1 text-sm font-medium text-text-primary",
|
|
55
56
|
children: [
|
|
56
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ w(v, { size: 13 }),
|
|
57
58
|
" ",
|
|
58
59
|
a(e.language)
|
|
59
60
|
]
|
|
60
61
|
}),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ T("span", {
|
|
62
63
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
63
64
|
children: [
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
+
/* @__PURE__ */ w(_, { size: 12 }),
|
|
65
66
|
" ",
|
|
66
67
|
e.runtimeMs,
|
|
67
68
|
" ms"
|
|
68
69
|
]
|
|
69
70
|
}),
|
|
70
|
-
/* @__PURE__ */
|
|
71
|
+
/* @__PURE__ */ T("span", {
|
|
71
72
|
className: "inline-flex items-center gap-1 text-xs text-text-muted",
|
|
72
73
|
children: [
|
|
73
|
-
/* @__PURE__ */
|
|
74
|
+
/* @__PURE__ */ w(S, { size: 12 }),
|
|
74
75
|
" ",
|
|
75
76
|
e.pointsAwarded,
|
|
76
77
|
" pts"
|
|
77
78
|
]
|
|
78
79
|
}),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ w("span", {
|
|
80
81
|
className: "ml-auto text-xs text-text-muted",
|
|
81
82
|
children: i(e.createdAt)
|
|
82
83
|
})
|
|
83
84
|
]
|
|
84
85
|
});
|
|
85
86
|
}
|
|
86
|
-
function
|
|
87
|
-
let [t] =
|
|
88
|
-
|
|
87
|
+
function N() {
|
|
88
|
+
let [t] = C(), i = t.get("id") ?? "", { currentUser: _, workspaceId: N } = e(), P = _?.id, { emit: F } = f(), { data: I, loading: L, error: R, refetch: z } = te(i);
|
|
89
|
+
p(() => {
|
|
90
|
+
i && F("technospam.problem.viewed", {
|
|
91
|
+
workspaceId: N,
|
|
92
|
+
entityId: i,
|
|
93
|
+
entityType: "TEC_PROBLEM"
|
|
94
|
+
});
|
|
95
|
+
}, [
|
|
96
|
+
i,
|
|
97
|
+
N,
|
|
98
|
+
F
|
|
99
|
+
]);
|
|
100
|
+
let { data: B, loading: V, error: H, refetch: U } = u({
|
|
101
|
+
...P ? { learnerId: P } : {},
|
|
89
102
|
problemId: i
|
|
90
|
-
}), [W, { loading: G }] =
|
|
103
|
+
}), [W, { loading: G }] = d(), K = I?.tecProblem ?? null, q = m(() => K?.languages?.length ? K.languages : A, [K]), [J, Y] = g(""), [X, Z] = g(""), Q = h(!1);
|
|
91
104
|
p(() => {
|
|
92
|
-
K && !Q.current && (Y(K.languages[0] ??
|
|
105
|
+
K && !Q.current && (Y(K.languages[0] ?? A[0]), Z(K.starterCode ?? ""), Q.current = !0);
|
|
93
106
|
}, [K]);
|
|
94
107
|
let $ = m(() => [...B?.tecListSubmissions.items ?? []].sort((e, t) => new Date(t.createdAt).getTime() - new Date(e.createdAt).getTime()), [B]);
|
|
95
|
-
return L && !K ? /* @__PURE__ */
|
|
108
|
+
return L && !K ? /* @__PURE__ */ T(n, {
|
|
96
109
|
title: "Problem",
|
|
97
110
|
backPath: "/applications/problems-page",
|
|
98
|
-
children: [/* @__PURE__ */
|
|
99
|
-
}) : R || !K ? /* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ w(k, { className: "mb-4 h-28 w-full rounded-xl" }), /* @__PURE__ */ w(k, { className: "h-72 w-full rounded-xl" })]
|
|
112
|
+
}) : R || !K ? /* @__PURE__ */ w(n, {
|
|
100
113
|
title: "Problem",
|
|
101
114
|
backPath: "/applications/problems-page",
|
|
102
|
-
children: R ? /* @__PURE__ */
|
|
115
|
+
children: R ? /* @__PURE__ */ w(c, {
|
|
103
116
|
title: "Couldn't load problem",
|
|
104
117
|
error: R
|
|
105
|
-
}) : /* @__PURE__ */
|
|
118
|
+
}) : /* @__PURE__ */ w(s, {
|
|
106
119
|
title: "Problem not found",
|
|
107
120
|
description: "This problem may have been unpublished."
|
|
108
121
|
})
|
|
109
|
-
}) : /* @__PURE__ */
|
|
122
|
+
}) : /* @__PURE__ */ T(n, {
|
|
110
123
|
hero: !0,
|
|
111
124
|
backPath: "/applications/problems-page",
|
|
112
125
|
title: K.title,
|
|
113
126
|
description: K.topic ?? void 0,
|
|
114
127
|
children: [
|
|
115
|
-
/* @__PURE__ */
|
|
128
|
+
/* @__PURE__ */ T("div", {
|
|
116
129
|
className: "mb-5 flex flex-wrap items-center gap-2",
|
|
117
130
|
children: [
|
|
118
|
-
/* @__PURE__ */
|
|
131
|
+
/* @__PURE__ */ w(o, {
|
|
119
132
|
status: K.difficulty,
|
|
120
133
|
kind: "level"
|
|
121
134
|
}),
|
|
122
|
-
/* @__PURE__ */
|
|
123
|
-
K.topic ? /* @__PURE__ */ E
|
|
135
|
+
/* @__PURE__ */ w(o, { status: K.status }),
|
|
136
|
+
K.topic ? /* @__PURE__ */ T(E, {
|
|
124
137
|
variant: "outline",
|
|
125
138
|
className: "gap-1",
|
|
126
139
|
children: [
|
|
127
|
-
/* @__PURE__ */
|
|
140
|
+
/* @__PURE__ */ w(b, { size: 12 }),
|
|
128
141
|
" ",
|
|
129
142
|
K.topic
|
|
130
143
|
]
|
|
131
144
|
}) : null,
|
|
132
|
-
K.tags.map((e) => /* @__PURE__ */ E
|
|
145
|
+
K.tags.map((e) => /* @__PURE__ */ T(E, {
|
|
133
146
|
variant: "secondary",
|
|
134
|
-
children: [/* @__PURE__ */
|
|
147
|
+
children: [/* @__PURE__ */ w(x, {
|
|
135
148
|
size: 10,
|
|
136
149
|
className: "mr-1"
|
|
137
150
|
}), e]
|
|
138
151
|
}, e))
|
|
139
152
|
]
|
|
140
153
|
}),
|
|
141
|
-
/* @__PURE__ */
|
|
154
|
+
/* @__PURE__ */ T("div", {
|
|
142
155
|
className: "mb-6 grid grid-cols-2 gap-3 sm:grid-cols-4",
|
|
143
156
|
children: [
|
|
144
|
-
/* @__PURE__ */
|
|
157
|
+
/* @__PURE__ */ w(r, {
|
|
145
158
|
label: "Points",
|
|
146
159
|
value: K.points,
|
|
147
|
-
icon:
|
|
160
|
+
icon: S,
|
|
148
161
|
tone: "amber"
|
|
149
162
|
}),
|
|
150
|
-
/* @__PURE__ */
|
|
163
|
+
/* @__PURE__ */ w(r, {
|
|
151
164
|
label: "Languages",
|
|
152
165
|
value: q.length,
|
|
153
166
|
icon: v,
|
|
154
167
|
tone: "blue"
|
|
155
168
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
169
|
+
/* @__PURE__ */ w(r, {
|
|
157
170
|
label: "Difficulty",
|
|
158
171
|
value: a(K.difficulty),
|
|
159
172
|
icon: b,
|
|
160
173
|
tone: "purple"
|
|
161
174
|
}),
|
|
162
|
-
/* @__PURE__ */
|
|
175
|
+
/* @__PURE__ */ w(r, {
|
|
163
176
|
label: "My submissions",
|
|
164
177
|
value: $.length,
|
|
165
178
|
icon: y,
|
|
@@ -167,81 +180,81 @@ function F() {
|
|
|
167
180
|
})
|
|
168
181
|
]
|
|
169
182
|
}),
|
|
170
|
-
/* @__PURE__ */
|
|
183
|
+
/* @__PURE__ */ T("div", {
|
|
171
184
|
className: "grid grid-cols-1 gap-5 lg:grid-cols-3",
|
|
172
|
-
children: [/* @__PURE__ */
|
|
185
|
+
children: [/* @__PURE__ */ T("div", {
|
|
173
186
|
className: "space-y-5 lg:col-span-2",
|
|
174
187
|
children: [
|
|
175
|
-
/* @__PURE__ */
|
|
188
|
+
/* @__PURE__ */ T(O, {
|
|
176
189
|
className: "p-5",
|
|
177
|
-
children: [/* @__PURE__ */
|
|
190
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
178
191
|
className: "mb-2 text-base font-semibold text-text-primary",
|
|
179
192
|
children: "Problem statement"
|
|
180
|
-
}), K.statement ? /* @__PURE__ */
|
|
193
|
+
}), K.statement ? /* @__PURE__ */ w("p", {
|
|
181
194
|
className: "whitespace-pre-wrap text-sm leading-relaxed text-text-secondary",
|
|
182
195
|
children: K.statement
|
|
183
|
-
}) : /* @__PURE__ */
|
|
196
|
+
}) : /* @__PURE__ */ w("p", {
|
|
184
197
|
className: "py-4 text-center text-sm text-text-muted",
|
|
185
198
|
children: "The statement for this problem is being prepared."
|
|
186
199
|
})]
|
|
187
200
|
}),
|
|
188
|
-
K.starterCode ? /* @__PURE__ */
|
|
201
|
+
K.starterCode ? /* @__PURE__ */ T(O, {
|
|
189
202
|
className: "p-5",
|
|
190
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
191
204
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
192
205
|
children: "Starter code"
|
|
193
|
-
}), /* @__PURE__ */
|
|
206
|
+
}), /* @__PURE__ */ w(j, {
|
|
194
207
|
label: a(q[0] ?? "code"),
|
|
195
208
|
bodyClassName: "max-h-72",
|
|
196
209
|
children: K.starterCode
|
|
197
210
|
})]
|
|
198
211
|
}) : null,
|
|
199
|
-
/* @__PURE__ */
|
|
212
|
+
/* @__PURE__ */ T(O, {
|
|
200
213
|
className: "p-5",
|
|
201
214
|
children: [
|
|
202
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ T("div", {
|
|
203
216
|
className: "mb-3 flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
217
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
205
218
|
className: "text-base font-semibold text-text-primary",
|
|
206
219
|
children: "Submit a solution"
|
|
207
|
-
}), /* @__PURE__ */
|
|
220
|
+
}), /* @__PURE__ */ T("div", {
|
|
208
221
|
className: "flex items-center gap-2",
|
|
209
|
-
children: [/* @__PURE__ */
|
|
222
|
+
children: [/* @__PURE__ */ w("span", {
|
|
210
223
|
className: "text-sm text-text-secondary",
|
|
211
224
|
children: "Language"
|
|
212
|
-
}), /* @__PURE__ */
|
|
225
|
+
}), /* @__PURE__ */ T(re, {
|
|
213
226
|
value: J,
|
|
214
227
|
onValueChange: Y,
|
|
215
|
-
children: [/* @__PURE__ */
|
|
228
|
+
children: [/* @__PURE__ */ w(oe, {
|
|
216
229
|
className: "w-full sm:w-48",
|
|
217
|
-
children: /* @__PURE__ */
|
|
218
|
-
}), /* @__PURE__ */
|
|
230
|
+
children: /* @__PURE__ */ w(se, { placeholder: "Choose a language" })
|
|
231
|
+
}), /* @__PURE__ */ w(ie, { children: q.map((e) => /* @__PURE__ */ w(ae, {
|
|
219
232
|
value: e,
|
|
220
233
|
children: a(e)
|
|
221
234
|
}, e)) })]
|
|
222
235
|
})]
|
|
223
236
|
})]
|
|
224
237
|
}),
|
|
225
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ T("div", {
|
|
226
239
|
className: "overflow-hidden rounded-xl border border-border-strong bg-bg-sunken shadow-sm",
|
|
227
|
-
children: [/* @__PURE__ */
|
|
240
|
+
children: [/* @__PURE__ */ T("div", {
|
|
228
241
|
className: "flex items-center justify-between gap-2 border-b border-border-seam bg-bg-canvas/40 px-4 py-2",
|
|
229
|
-
children: [/* @__PURE__ */
|
|
242
|
+
children: [/* @__PURE__ */ T("div", {
|
|
230
243
|
className: "flex items-center gap-1.5",
|
|
231
244
|
children: [
|
|
232
|
-
/* @__PURE__ */
|
|
233
|
-
/* @__PURE__ */
|
|
234
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-error-border" }),
|
|
246
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-warning-border" }),
|
|
247
|
+
/* @__PURE__ */ w("span", { className: "h-2.5 w-2.5 rounded-full bg-status-success-border" })
|
|
235
248
|
]
|
|
236
|
-
}), /* @__PURE__ */
|
|
249
|
+
}), /* @__PURE__ */ T("span", {
|
|
237
250
|
className: "inline-flex items-center gap-1.5 font-mono text-xs text-text-muted",
|
|
238
251
|
children: [
|
|
239
|
-
/* @__PURE__ */
|
|
252
|
+
/* @__PURE__ */ w(v, { size: 13 }),
|
|
240
253
|
" ",
|
|
241
254
|
J ? a(J) : "solution"
|
|
242
255
|
]
|
|
243
256
|
})]
|
|
244
|
-
}), /* @__PURE__ */
|
|
257
|
+
}), /* @__PURE__ */ w(ce, {
|
|
245
258
|
value: X,
|
|
246
259
|
onChange: (e) => Z(e.target.value),
|
|
247
260
|
placeholder: "Write your solution…",
|
|
@@ -249,28 +262,39 @@ function F() {
|
|
|
249
262
|
spellCheck: !1
|
|
250
263
|
})]
|
|
251
264
|
}),
|
|
252
|
-
/* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ T(D, {
|
|
253
266
|
className: "mt-4 w-full",
|
|
254
267
|
onClick: async () => {
|
|
255
|
-
if (i)
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
(await W({ variables: { input: {
|
|
265
|
-
problemId: i,
|
|
266
|
-
language: J,
|
|
267
|
-
code: X
|
|
268
|
-
} } })).data?.tecSubmitSolution && (u.success("Solution submitted", "Your submission was recorded."), await Promise.all([z(), U()]));
|
|
268
|
+
if (!i) return;
|
|
269
|
+
if (!J) {
|
|
270
|
+
l.error("Pick a language", "Choose a language before submitting.");
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (!X.trim()) {
|
|
274
|
+
l.error("Add your solution", "Write some code before submitting.");
|
|
275
|
+
return;
|
|
269
276
|
}
|
|
277
|
+
F("technospam.problem.submit_clicked", {
|
|
278
|
+
workspaceId: N,
|
|
279
|
+
entityId: i,
|
|
280
|
+
entityType: "TEC_PROBLEM",
|
|
281
|
+
language: J
|
|
282
|
+
});
|
|
283
|
+
let e = await W({ variables: { input: {
|
|
284
|
+
problemId: i,
|
|
285
|
+
language: J,
|
|
286
|
+
code: X
|
|
287
|
+
} } });
|
|
288
|
+
e.data?.tecSubmitSolution && (F("technospam.problem.submitted", {
|
|
289
|
+
workspaceId: N,
|
|
290
|
+
entityId: i,
|
|
291
|
+
entityType: "TEC_PROBLEM",
|
|
292
|
+
submissionId: e.data.tecSubmitSolution.id
|
|
293
|
+
}), l.success("Solution submitted", "Your submission was recorded."), await Promise.all([z(), U()]));
|
|
270
294
|
},
|
|
271
295
|
disabled: G || !X.trim(),
|
|
272
296
|
children: [
|
|
273
|
-
/* @__PURE__ */
|
|
297
|
+
/* @__PURE__ */ w(ne, { size: 16 }),
|
|
274
298
|
" ",
|
|
275
299
|
G ? "Submitting…" : "Submit solution"
|
|
276
300
|
]
|
|
@@ -278,26 +302,26 @@ function F() {
|
|
|
278
302
|
]
|
|
279
303
|
})
|
|
280
304
|
]
|
|
281
|
-
}), /* @__PURE__ */
|
|
305
|
+
}), /* @__PURE__ */ w("div", {
|
|
282
306
|
className: "lg:col-span-1",
|
|
283
|
-
children: /* @__PURE__ */
|
|
307
|
+
children: /* @__PURE__ */ T(O, {
|
|
284
308
|
className: "p-5",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
309
|
+
children: [/* @__PURE__ */ w("h2", {
|
|
286
310
|
className: "mb-3 text-base font-semibold text-text-primary",
|
|
287
311
|
children: "My submissions"
|
|
288
|
-
}), V && !$.length ? /* @__PURE__ */
|
|
312
|
+
}), V && !$.length ? /* @__PURE__ */ w(ee, {
|
|
289
313
|
count: 3,
|
|
290
314
|
height: "h-12"
|
|
291
|
-
}) : H ? /* @__PURE__ */
|
|
315
|
+
}) : H ? /* @__PURE__ */ w(c, {
|
|
292
316
|
title: "Couldn't load submissions",
|
|
293
317
|
error: H
|
|
294
|
-
}) : $.length === 0 ? /* @__PURE__ */
|
|
295
|
-
icon: /* @__PURE__ */
|
|
318
|
+
}) : $.length === 0 ? /* @__PURE__ */ w(s, {
|
|
319
|
+
icon: /* @__PURE__ */ w(y, { size: 24 }),
|
|
296
320
|
title: "No submissions yet",
|
|
297
321
|
description: "Submit a solution above to see your verdicts and points here."
|
|
298
|
-
}) : /* @__PURE__ */
|
|
322
|
+
}) : /* @__PURE__ */ w("div", {
|
|
299
323
|
className: "space-y-1",
|
|
300
|
-
children: $.map((e) => /* @__PURE__ */
|
|
324
|
+
children: $.map((e) => /* @__PURE__ */ w(M, { s: e }, e.id))
|
|
301
325
|
})]
|
|
302
326
|
})
|
|
303
327
|
})]
|
|
@@ -306,6 +330,6 @@ function F() {
|
|
|
306
330
|
});
|
|
307
331
|
}
|
|
308
332
|
//#endregion
|
|
309
|
-
export {
|
|
333
|
+
export { N as ApplicationsProblemDetailsPagePage };
|
|
310
334
|
|
|
311
335
|
//# sourceMappingURL=ApplicationsProblemDetailsPagePage.js.map
|