@uniformdev/context-ui 20.6.5-alpha.1 → 20.7.1-alpha.106
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/LICENSE.txt +1 -1
- package/dist/index.d.mts +36 -11
- package/dist/index.d.ts +36 -11
- package/dist/index.esm.js +367 -221
- package/dist/index.js +366 -228
- package/dist/index.mjs +367 -221
- package/package.json +15 -27
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
©
|
|
1
|
+
© 2025 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
2
2
|
import * as _emotion_react from '@emotion/react';
|
|
3
|
-
import { DimensionDefinition, Test, ManifestGetResponse } from '@uniformdev/context/api';
|
|
4
|
-
import { DimensionMatch, EnrichmentData, VariantMatchCriteria } from '@uniformdev/context';
|
|
3
|
+
import { DimensionDefinition, Test, ManifestGetResponse, Quirk, QuirkGetResponse } from '@uniformdev/context/api';
|
|
4
|
+
import { DimensionMatch, QuirkMatch, EnrichmentData, VariantMatchCriteria } from '@uniformdev/context';
|
|
5
5
|
import { InputComboBoxProps, InputComboBoxOption } from '@uniformdev/design-system';
|
|
6
6
|
export * from '@uniformdev/design-system';
|
|
7
7
|
import React, { ComponentType, ReactElement } from 'react';
|
|
@@ -36,15 +36,28 @@ interface AbTestSelectorProps {
|
|
|
36
36
|
declare const AbTestSelector: ({ value, setValue, contextConfig, loading }: AbTestSelectorProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
37
37
|
|
|
38
38
|
type CriteriaOperatorMenuProps = {
|
|
39
|
-
value: DimensionMatch['op'];
|
|
40
|
-
onChange: (newValue: DimensionMatch['op']) => void;
|
|
39
|
+
value: DimensionMatch['op'] | QuirkMatch['op'];
|
|
40
|
+
onChange: (newValue: DimensionMatch['op'] | QuirkMatch['op']) => void;
|
|
41
|
+
rhsType?: ResolvedDimensionDefinition['category'] | 'QUIRK';
|
|
42
|
+
/** sets the disabled state of the component */
|
|
43
|
+
disabled?: boolean;
|
|
41
44
|
} & Omit<InputComboBoxProps<InputComboBoxOption, false>, 'value' | 'options' | 'onChange'>;
|
|
42
45
|
declare const contextCriteriaMenuOperators: Array<{
|
|
43
46
|
name: string;
|
|
44
47
|
description?: string;
|
|
45
48
|
value: DimensionMatch['op'];
|
|
46
49
|
}>;
|
|
47
|
-
declare
|
|
50
|
+
declare const enrichmentCriteriaMenuOperators: Array<{
|
|
51
|
+
name: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
value: DimensionMatch['op'];
|
|
54
|
+
}>;
|
|
55
|
+
declare function getValidCriteriaOperatorsFor(rhsType: ResolvedDimensionDefinition['category'] | 'QUIRK' | undefined): {
|
|
56
|
+
name: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
value: DimensionMatch["op"];
|
|
59
|
+
}[];
|
|
60
|
+
declare function CriteriaOperatorMenu({ onChange, value, rhsType, ...props }: CriteriaOperatorMenuProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
48
61
|
|
|
49
62
|
interface UseContextDataResult {
|
|
50
63
|
result: ManifestGetResponse | null;
|
|
@@ -82,19 +95,28 @@ type CriteriaMatchMenuProps = {
|
|
|
82
95
|
dimensions: DimensionsData;
|
|
83
96
|
errorMessage?: string;
|
|
84
97
|
onChange: (newCriteria: DimensionMatch) => void;
|
|
98
|
+
/** sets the disabled state of the component */
|
|
99
|
+
disabled?: boolean;
|
|
85
100
|
} & Omit<InputComboBoxProps<InputComboBoxOption, false>, 'value' | 'options' | 'onChange' | 'inputValue' | 'value' | 'onInputChange'>;
|
|
86
101
|
declare function CriteriaMatchMenu({ onChange, criteriaMatch, dimensions, errorMessage, ...props }: CriteriaMatchMenuProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
87
102
|
|
|
103
|
+
type DimensionMenuOption = InputComboBoxOption & {
|
|
104
|
+
original?: ResolvedDimensionDefinition | Quirk;
|
|
105
|
+
};
|
|
106
|
+
|
|
88
107
|
type DimensionMenuProps = {
|
|
89
|
-
value?: ResolvedDimensionDefinition;
|
|
108
|
+
value?: ResolvedDimensionDefinition | Quirk;
|
|
90
109
|
dimensions: ResolvedDimensionDefinition[];
|
|
110
|
+
quirks?: QuirkGetResponse['quirks'];
|
|
91
111
|
errorMessage?: string;
|
|
92
|
-
onChange: (newValue: ResolvedDimensionDefinition) => void;
|
|
93
|
-
|
|
94
|
-
|
|
112
|
+
onChange: (newValue: ResolvedDimensionDefinition | Quirk | undefined) => void;
|
|
113
|
+
/** sets the disabled state of the component */
|
|
114
|
+
disabled?: boolean;
|
|
115
|
+
} & Omit<InputComboBoxProps<DimensionMenuOption, false>, 'value' | 'options' | 'onChange'>;
|
|
116
|
+
declare function DimensionMenu({ onChange, value, dimensions, errorMessage, quirks, ...props }: DimensionMenuProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
95
117
|
|
|
96
118
|
type DimensionValueProps = {
|
|
97
|
-
displayName: string;
|
|
119
|
+
displayName: string | undefined;
|
|
98
120
|
};
|
|
99
121
|
declare function DimensionValue({ displayName }: DimensionValueProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
100
122
|
|
|
@@ -118,6 +140,7 @@ interface PersonalizationCriteriaStaticProps {
|
|
|
118
140
|
value: VariantMatchCriteria | null | undefined;
|
|
119
141
|
setValue: (value: VariantMatchCriteria | null) => void;
|
|
120
142
|
dimensions: DimensionsData;
|
|
143
|
+
quirks?: QuirkGetResponse['quirks'];
|
|
121
144
|
displayTitle?: boolean;
|
|
122
145
|
onMenuOpen?: () => void;
|
|
123
146
|
onMenuClose?: () => void;
|
|
@@ -133,6 +156,8 @@ interface PersonalizationCriteriaStaticProps {
|
|
|
133
156
|
lhs?: Array<string | undefined>;
|
|
134
157
|
rhs?: Array<string | undefined>;
|
|
135
158
|
};
|
|
159
|
+
/** sets the disabled state of the component */
|
|
160
|
+
readOnly?: boolean;
|
|
136
161
|
}
|
|
137
162
|
declare const PersonalizationCriteriaStatic: React.FC<PersonalizationCriteriaStaticProps>;
|
|
138
163
|
|
|
@@ -169,4 +194,4 @@ declare const validateContextConfig: (contextConfig?: ContextConfig) => Promise<
|
|
|
169
194
|
result?: ManifestGetResponse;
|
|
170
195
|
}>;
|
|
171
196
|
|
|
172
|
-
export { type AbTestListProps, AbTestSelector, type AbTestSelectorProps, type ContextConfig, ContextData, type ContextDataProps, CriteriaMatchMenu, type CriteriaMatchMenuProps, CriteriaOperatorMenu, type CriteriaOperatorMenuProps, type DataContextErrorProps, DimensionMenu, type DimensionMenuProps, DimensionValue, type DimensionValueProps, type DimensionsData, EditLink, type EditLinkProps, EnrichmentTag, type EnrichmentTagProps, PersonalizationCriteria, type PersonalizationCriteriaProps, PersonalizationCriteriaStatic, type PersonalizationCriteriaStaticProps, ProjectUIVersion, type ResolvedDimensionDefinition, type UseContextDataResult, type UseDimensionsResult, type UseValidateContextConfigResult, addAbTestLink, addEnrichmentLink, contextCriteriaMenuOperators, convertErrorsToObj, isEnrichmentTagData, isPersonalizationCriteriaData, opHasRhs, useContextConfig, useContextData, useDimensions, useDimensionsDataContext, useManifest, useValidateContextConfig, validateContextConfig };
|
|
197
|
+
export { type AbTestListProps, AbTestSelector, type AbTestSelectorProps, type ContextConfig, ContextData, type ContextDataProps, CriteriaMatchMenu, type CriteriaMatchMenuProps, CriteriaOperatorMenu, type CriteriaOperatorMenuProps, type DataContextErrorProps, DimensionMenu, type DimensionMenuProps, DimensionValue, type DimensionValueProps, type DimensionsData, EditLink, type EditLinkProps, EnrichmentTag, type EnrichmentTagProps, PersonalizationCriteria, type PersonalizationCriteriaProps, PersonalizationCriteriaStatic, type PersonalizationCriteriaStaticProps, ProjectUIVersion, type ResolvedDimensionDefinition, type UseContextDataResult, type UseDimensionsResult, type UseValidateContextConfigResult, addAbTestLink, addEnrichmentLink, contextCriteriaMenuOperators, convertErrorsToObj, enrichmentCriteriaMenuOperators, getValidCriteriaOperatorsFor, isEnrichmentTagData, isPersonalizationCriteriaData, opHasRhs, useContextConfig, useContextData, useDimensions, useDimensionsDataContext, useManifest, useValidateContextConfig, validateContextConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _emotion_react_types_jsx_namespace from '@emotion/react/types/jsx-namespace';
|
|
2
2
|
import * as _emotion_react from '@emotion/react';
|
|
3
|
-
import { DimensionDefinition, Test, ManifestGetResponse } from '@uniformdev/context/api';
|
|
4
|
-
import { DimensionMatch, EnrichmentData, VariantMatchCriteria } from '@uniformdev/context';
|
|
3
|
+
import { DimensionDefinition, Test, ManifestGetResponse, Quirk, QuirkGetResponse } from '@uniformdev/context/api';
|
|
4
|
+
import { DimensionMatch, QuirkMatch, EnrichmentData, VariantMatchCriteria } from '@uniformdev/context';
|
|
5
5
|
import { InputComboBoxProps, InputComboBoxOption } from '@uniformdev/design-system';
|
|
6
6
|
export * from '@uniformdev/design-system';
|
|
7
7
|
import React, { ComponentType, ReactElement } from 'react';
|
|
@@ -36,15 +36,28 @@ interface AbTestSelectorProps {
|
|
|
36
36
|
declare const AbTestSelector: ({ value, setValue, contextConfig, loading }: AbTestSelectorProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
37
37
|
|
|
38
38
|
type CriteriaOperatorMenuProps = {
|
|
39
|
-
value: DimensionMatch['op'];
|
|
40
|
-
onChange: (newValue: DimensionMatch['op']) => void;
|
|
39
|
+
value: DimensionMatch['op'] | QuirkMatch['op'];
|
|
40
|
+
onChange: (newValue: DimensionMatch['op'] | QuirkMatch['op']) => void;
|
|
41
|
+
rhsType?: ResolvedDimensionDefinition['category'] | 'QUIRK';
|
|
42
|
+
/** sets the disabled state of the component */
|
|
43
|
+
disabled?: boolean;
|
|
41
44
|
} & Omit<InputComboBoxProps<InputComboBoxOption, false>, 'value' | 'options' | 'onChange'>;
|
|
42
45
|
declare const contextCriteriaMenuOperators: Array<{
|
|
43
46
|
name: string;
|
|
44
47
|
description?: string;
|
|
45
48
|
value: DimensionMatch['op'];
|
|
46
49
|
}>;
|
|
47
|
-
declare
|
|
50
|
+
declare const enrichmentCriteriaMenuOperators: Array<{
|
|
51
|
+
name: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
value: DimensionMatch['op'];
|
|
54
|
+
}>;
|
|
55
|
+
declare function getValidCriteriaOperatorsFor(rhsType: ResolvedDimensionDefinition['category'] | 'QUIRK' | undefined): {
|
|
56
|
+
name: string;
|
|
57
|
+
description?: string;
|
|
58
|
+
value: DimensionMatch["op"];
|
|
59
|
+
}[];
|
|
60
|
+
declare function CriteriaOperatorMenu({ onChange, value, rhsType, ...props }: CriteriaOperatorMenuProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
48
61
|
|
|
49
62
|
interface UseContextDataResult {
|
|
50
63
|
result: ManifestGetResponse | null;
|
|
@@ -82,19 +95,28 @@ type CriteriaMatchMenuProps = {
|
|
|
82
95
|
dimensions: DimensionsData;
|
|
83
96
|
errorMessage?: string;
|
|
84
97
|
onChange: (newCriteria: DimensionMatch) => void;
|
|
98
|
+
/** sets the disabled state of the component */
|
|
99
|
+
disabled?: boolean;
|
|
85
100
|
} & Omit<InputComboBoxProps<InputComboBoxOption, false>, 'value' | 'options' | 'onChange' | 'inputValue' | 'value' | 'onInputChange'>;
|
|
86
101
|
declare function CriteriaMatchMenu({ onChange, criteriaMatch, dimensions, errorMessage, ...props }: CriteriaMatchMenuProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
87
102
|
|
|
103
|
+
type DimensionMenuOption = InputComboBoxOption & {
|
|
104
|
+
original?: ResolvedDimensionDefinition | Quirk;
|
|
105
|
+
};
|
|
106
|
+
|
|
88
107
|
type DimensionMenuProps = {
|
|
89
|
-
value?: ResolvedDimensionDefinition;
|
|
108
|
+
value?: ResolvedDimensionDefinition | Quirk;
|
|
90
109
|
dimensions: ResolvedDimensionDefinition[];
|
|
110
|
+
quirks?: QuirkGetResponse['quirks'];
|
|
91
111
|
errorMessage?: string;
|
|
92
|
-
onChange: (newValue: ResolvedDimensionDefinition) => void;
|
|
93
|
-
|
|
94
|
-
|
|
112
|
+
onChange: (newValue: ResolvedDimensionDefinition | Quirk | undefined) => void;
|
|
113
|
+
/** sets the disabled state of the component */
|
|
114
|
+
disabled?: boolean;
|
|
115
|
+
} & Omit<InputComboBoxProps<DimensionMenuOption, false>, 'value' | 'options' | 'onChange'>;
|
|
116
|
+
declare function DimensionMenu({ onChange, value, dimensions, errorMessage, quirks, ...props }: DimensionMenuProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
95
117
|
|
|
96
118
|
type DimensionValueProps = {
|
|
97
|
-
displayName: string;
|
|
119
|
+
displayName: string | undefined;
|
|
98
120
|
};
|
|
99
121
|
declare function DimensionValue({ displayName }: DimensionValueProps): _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
100
122
|
|
|
@@ -118,6 +140,7 @@ interface PersonalizationCriteriaStaticProps {
|
|
|
118
140
|
value: VariantMatchCriteria | null | undefined;
|
|
119
141
|
setValue: (value: VariantMatchCriteria | null) => void;
|
|
120
142
|
dimensions: DimensionsData;
|
|
143
|
+
quirks?: QuirkGetResponse['quirks'];
|
|
121
144
|
displayTitle?: boolean;
|
|
122
145
|
onMenuOpen?: () => void;
|
|
123
146
|
onMenuClose?: () => void;
|
|
@@ -133,6 +156,8 @@ interface PersonalizationCriteriaStaticProps {
|
|
|
133
156
|
lhs?: Array<string | undefined>;
|
|
134
157
|
rhs?: Array<string | undefined>;
|
|
135
158
|
};
|
|
159
|
+
/** sets the disabled state of the component */
|
|
160
|
+
readOnly?: boolean;
|
|
136
161
|
}
|
|
137
162
|
declare const PersonalizationCriteriaStatic: React.FC<PersonalizationCriteriaStaticProps>;
|
|
138
163
|
|
|
@@ -169,4 +194,4 @@ declare const validateContextConfig: (contextConfig?: ContextConfig) => Promise<
|
|
|
169
194
|
result?: ManifestGetResponse;
|
|
170
195
|
}>;
|
|
171
196
|
|
|
172
|
-
export { type AbTestListProps, AbTestSelector, type AbTestSelectorProps, type ContextConfig, ContextData, type ContextDataProps, CriteriaMatchMenu, type CriteriaMatchMenuProps, CriteriaOperatorMenu, type CriteriaOperatorMenuProps, type DataContextErrorProps, DimensionMenu, type DimensionMenuProps, DimensionValue, type DimensionValueProps, type DimensionsData, EditLink, type EditLinkProps, EnrichmentTag, type EnrichmentTagProps, PersonalizationCriteria, type PersonalizationCriteriaProps, PersonalizationCriteriaStatic, type PersonalizationCriteriaStaticProps, ProjectUIVersion, type ResolvedDimensionDefinition, type UseContextDataResult, type UseDimensionsResult, type UseValidateContextConfigResult, addAbTestLink, addEnrichmentLink, contextCriteriaMenuOperators, convertErrorsToObj, isEnrichmentTagData, isPersonalizationCriteriaData, opHasRhs, useContextConfig, useContextData, useDimensions, useDimensionsDataContext, useManifest, useValidateContextConfig, validateContextConfig };
|
|
197
|
+
export { type AbTestListProps, AbTestSelector, type AbTestSelectorProps, type ContextConfig, ContextData, type ContextDataProps, CriteriaMatchMenu, type CriteriaMatchMenuProps, CriteriaOperatorMenu, type CriteriaOperatorMenuProps, type DataContextErrorProps, DimensionMenu, type DimensionMenuProps, DimensionValue, type DimensionValueProps, type DimensionsData, EditLink, type EditLinkProps, EnrichmentTag, type EnrichmentTagProps, PersonalizationCriteria, type PersonalizationCriteriaProps, PersonalizationCriteriaStatic, type PersonalizationCriteriaStaticProps, ProjectUIVersion, type ResolvedDimensionDefinition, type UseContextDataResult, type UseDimensionsResult, type UseValidateContextConfigResult, addAbTestLink, addEnrichmentLink, contextCriteriaMenuOperators, convertErrorsToObj, enrichmentCriteriaMenuOperators, getValidCriteriaOperatorsFor, isEnrichmentTagData, isPersonalizationCriteriaData, opHasRhs, useContextConfig, useContextData, useDimensions, useDimensionsDataContext, useManifest, useValidateContextConfig, validateContextConfig };
|