@theseam/ui-common 1.0.2-beta.74 → 1.0.2-beta.83
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/ai/index.d.ts +83 -16
- package/fesm2022/theseam-ui-common-ai.mjs +95 -49
- package/fesm2022/theseam-ui-common-ai.mjs.map +1 -1
- package/fesm2022/theseam-ui-common-graphql.mjs +93 -43
- package/fesm2022/theseam-ui-common-graphql.mjs.map +1 -1
- package/graphql/index.d.ts +27 -2
- package/package.json +1 -1
package/graphql/index.d.ts
CHANGED
|
@@ -75,6 +75,30 @@ declare const queryProcessingLink: ApolloLink;
|
|
|
75
75
|
*/
|
|
76
76
|
declare function containsVariable(node: DocumentNode | ValueNode, variableName: string): boolean;
|
|
77
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Creates an enum value marker for use in filter objects that will be passed
|
|
80
|
+
* to `toGQL` and inlined into a query.
|
|
81
|
+
*
|
|
82
|
+
* When `toGQL` encounters an object with a `gqlEnum` property, it emits the
|
|
83
|
+
* value as a bare token (e.g. `ACTIVE`), producing a GraphQL enum value in
|
|
84
|
+
* the output rather than a string literal.
|
|
85
|
+
*
|
|
86
|
+
* By default the input is normalized to `SCREAMING_SNAKE_CASE`: an underscore
|
|
87
|
+
* is inserted before each capital letter (other than a leading one), spaces
|
|
88
|
+
* are replaced with underscores, and the result is uppercased. Pass
|
|
89
|
+
* `formatAsEnum: false` to emit the input verbatim — useful when the value is
|
|
90
|
+
* already in the schema's enum form.
|
|
91
|
+
*
|
|
92
|
+
* @example
|
|
93
|
+
* ```typescript
|
|
94
|
+
* const filter = { status: { eq: gqlEnum('active') } }
|
|
95
|
+
* // toGQL(filter) → '{status: {eq: ACTIVE}}'
|
|
96
|
+
* ```
|
|
97
|
+
*/
|
|
98
|
+
declare function gqlEnum(enumName: string, formatAsEnum?: boolean): {
|
|
99
|
+
gqlEnum: string;
|
|
100
|
+
};
|
|
101
|
+
|
|
78
102
|
/**
|
|
79
103
|
* Creates a variable reference marker for use in filter objects that will be
|
|
80
104
|
* passed to `toGQL` and inlined into a query.
|
|
@@ -250,7 +274,7 @@ declare function removeVariableDefinitionsNotDefined(query: DocumentNode$1, node
|
|
|
250
274
|
*/
|
|
251
275
|
declare function removeVariable(query: DocumentNode$1, variableName: string): DocumentNode$1;
|
|
252
276
|
|
|
253
|
-
declare function toGQL(
|
|
277
|
+
declare function toGQL(value: any): string;
|
|
254
278
|
|
|
255
279
|
declare function hintsTokensContainingHint(hintsTokens: HintsToken[], hint: string): HintsToken[];
|
|
256
280
|
|
|
@@ -767,6 +791,7 @@ declare function mockGraphQLLink(options: MockGraphQLLinkOptions): ApolloLink;
|
|
|
767
791
|
interface MockApolloTestingProviderOptions {
|
|
768
792
|
resolve: (operation: Operation) => any;
|
|
769
793
|
delay?: number;
|
|
794
|
+
logQueryLink?: boolean;
|
|
770
795
|
}
|
|
771
796
|
/**
|
|
772
797
|
* Creates Apollo providers configured like our apps, except with the Apollo
|
|
@@ -801,5 +826,5 @@ interface SimpleGqlTestVariables extends SimpleGqlTestExtraVariables {
|
|
|
801
826
|
search?: string;
|
|
802
827
|
}
|
|
803
828
|
|
|
804
|
-
export { DATATABLE_GRAPHQL_SERVICE_CONFIG, DEFAULT_PAGE_SIZE, DEFAULT_TO_REMOVE_ON_UNDEFINED, DatatableExportTransport, DatatableGqlDataExporter, DatatableGraphQLQueryRef, DatatableGraphqlService, GQLDirection, GQLVariable, HINT_NAMES_CAPTURE_REGEX, HINT_PREFIX_REGEX, HintsKind, MAX_ERROR_RECOVERY_ATTEMPTS, MockDatatable, SIMPLE_GQL_TEST_QUERY, SIMPLE_GQL_TEST_SEARCH_QUERY, baseSchemaFragment, checkRecordsHaveValue, containsVariable, createHintsToken, createMockApolloTestingProvider, createSimpleGqlTestRecord, createSimpleGqlTestRoot, createSortsMapper, filterWhere, filteredResults, getHintsToken, getPageInfo, getTokenAppliesTo, gqlVar, hintNamesFromHintToken, hintsTokensContainingHint, inlineVariable, inlineVariableHintDef, inlineVariableTransformer, isCommentToken, isHintToken, isInlineComment, logQueryLink, mapFilterStates, mapSearchDateColumnsDataFilterStateToGql, mapSearchNumericColumnsDataFilterStateToGql, mapSearchTextColumnsDataFilterStateToGql, mockGraphQLLink, observeRowsWithGqlInputsHandling, parseAst, parseComments, parseHints, processGql, provideDatatableExportTransport, queryProcessingLink, removeNotDefinedHintDef, removeNotDefinedTransformer, removeVariable, removeVariableDefinition, removeVariableDefinitionsNotDefined, skipAndTake, sortItems, toGQL };
|
|
829
|
+
export { DATATABLE_GRAPHQL_SERVICE_CONFIG, DEFAULT_PAGE_SIZE, DEFAULT_TO_REMOVE_ON_UNDEFINED, DatatableExportTransport, DatatableGqlDataExporter, DatatableGraphQLQueryRef, DatatableGraphqlService, GQLDirection, GQLVariable, HINT_NAMES_CAPTURE_REGEX, HINT_PREFIX_REGEX, HintsKind, MAX_ERROR_RECOVERY_ATTEMPTS, MockDatatable, SIMPLE_GQL_TEST_QUERY, SIMPLE_GQL_TEST_SEARCH_QUERY, baseSchemaFragment, checkRecordsHaveValue, containsVariable, createHintsToken, createMockApolloTestingProvider, createSimpleGqlTestRecord, createSimpleGqlTestRoot, createSortsMapper, filterWhere, filteredResults, getHintsToken, getPageInfo, getTokenAppliesTo, gqlEnum, gqlVar, hintNamesFromHintToken, hintsTokensContainingHint, inlineVariable, inlineVariableHintDef, inlineVariableTransformer, isCommentToken, isHintToken, isInlineComment, logQueryLink, mapFilterStates, mapSearchDateColumnsDataFilterStateToGql, mapSearchNumericColumnsDataFilterStateToGql, mapSearchTextColumnsDataFilterStateToGql, mockGraphQLLink, observeRowsWithGqlInputsHandling, parseAst, parseComments, parseHints, processGql, provideDatatableExportTransport, queryProcessingLink, removeNotDefinedHintDef, removeNotDefinedTransformer, removeVariable, removeVariableDefinition, removeVariableDefinitionsNotDefined, skipAndTake, sortItems, toGQL };
|
|
805
830
|
export type { CreateSortsMapperOptions, DatatableExportPayload, DatatableGraphQLDataMapper, DatatableGraphQLDataMapperResult, DatatableGraphQLErrorHandler, DatatableGraphQLVariables, DatatableGraphqlServiceConfig, DatatableQueryOptions, EmptyObject, FilterStateMapper, FilterStateMapperFilter, FilterStateMapperResult, FilterStateMapperVariables, FilterStateMappers, FilteredResults, FilteredResultsPageInfo, GqlDatatableAccessor, HintDefinition, HintTransformOperation, HintTransformer, HintsToken, LogQueryLinkOptions, MapperContext, MockApolloTestingProviderOptions, MockGraphQLLinkOptions, QueryProcessingConfig, QueryProcessingVariablesConfig, SimpleGqlTestExtraVariables, SimpleGqlTestRecord, SimpleGqlTestVariables, SortClause, SortsMapper, SortsMapperFieldEntry, SortsMapperFieldMap, SortsMapperResult, TypedFilterInput, TypedFilterStateMapperResult, WhereArg };
|