@envive-ai/react-toolkit 0.3.15-beta.1 → 0.3.15
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/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.d.cts +2 -2
- package/dist/components/Accordion/Accordion.d.ts +2 -2
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/AnimatedChevron/AnimatedChevron.d.cts +2 -2
- package/dist/components/AnimatedChevron/AnimatedChevron.d.ts +2 -2
- package/dist/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.d.cts +1 -1
- package/dist/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.d.ts +3 -3
- package/dist/components/ButtonBase/ButtonBase.d.cts +2 -2
- package/dist/components/ButtonBase/ButtonBase.d.ts +2 -2
- package/dist/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.d.cts +2 -2
- package/dist/components/DynamicFiltersScrollbar/DynamicFiltersScrollbar.d.ts +2 -2
- package/dist/components/FilterScrollbar/AppliedFiltersScrollbar.d.cts +3 -3
- package/dist/components/FilterScrollbar/AppliedFiltersScrollbar.d.ts +3 -3
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.d.cts +2 -2
- package/dist/components/FilterScrollbar/DynamicFiltersScrollbar.d.ts +2 -2
- package/dist/components/ImageWithFallback/ImageWithFallback.d.cts +2 -2
- package/dist/components/ImageWithFallback/ImageWithFallback.d.ts +2 -2
- package/dist/components/ModalSheet/ModalSheet.d.cts +2 -2
- package/dist/components/ModalSheet/ModalSheet.d.ts +2 -2
- package/dist/components/ModalSheet/desktop/index.cjs +1 -1
- package/dist/components/ModalSheet/desktop/index.js +1 -1
- package/dist/components/ModalSheet/mobile/index.cjs +1 -1
- package/dist/components/ModalSheet/mobile/index.js +1 -1
- package/dist/components/ProductCard/ProductCard.cjs +1 -1
- package/dist/components/ProductCard/ProductCard.d.cts +4 -4
- package/dist/components/ProductCard/ProductCard.d.ts +4 -4
- package/dist/components/ProductCard/ProductCard.js +1 -1
- package/dist/components/ProductGrid/ProductGrid.cjs +1 -1
- package/dist/components/ProductGrid/ProductGrid.d.cts +3 -3
- package/dist/components/ProductGrid/ProductGrid.d.ts +3 -4
- package/dist/components/ProductGrid/ProductGrid.js +1 -1
- package/dist/components/RadioButton/RadioButton.d.cts +3 -4
- package/dist/components/RadioButton/RadioButton.d.ts +3 -4
- package/dist/components/RadioButtonGroup/RadioButtonGroup.d.cts +3 -4
- package/dist/components/RadioButtonGroup/RadioButtonGroup.d.ts +3 -4
- package/dist/components/RecommendedProducts/RecommendedProducts.d.cts +2 -2
- package/dist/components/RecommendedProducts/RecommendedProducts.d.ts +2 -3
- package/dist/components/SearchAutocomplete/SearchAutocomplete.cjs +1 -1
- package/dist/components/SearchAutocomplete/SearchAutocomplete.d.cts +2 -2
- package/dist/components/SearchAutocomplete/SearchAutocomplete.d.ts +2 -2
- package/dist/components/SearchAutocomplete/SearchAutocomplete.js +1 -1
- package/dist/components/SearchFilter/SearchFilter.d.cts +2 -2
- package/dist/components/SearchFilter/SearchFilter.d.ts +2 -2
- package/dist/components/SearchFilter/SearchFilterFooter.d.cts +3 -4
- package/dist/components/SearchFilter/SearchFilterFooter.d.ts +3 -4
- package/dist/components/SearchFilter/SearchFilterHeader.d.cts +2 -2
- package/dist/components/SearchFilter/SearchFilterHeader.d.ts +2 -2
- package/dist/components/SearchFilter/SearchFilterItem.d.cts +2 -2
- package/dist/components/SearchFilter/SearchFilterItem.d.ts +2 -2
- package/dist/components/SearchFilter/types.d.cts +1 -2
- package/dist/components/SearchFilter/types.d.ts +1 -2
- package/dist/components/SearchFilter/utils.d.cts +3 -4
- package/dist/components/SearchFilter/utils.d.ts +3 -4
- package/dist/components/SearchInput/SearchInput.d.cts +1 -1
- package/dist/components/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/SearchInputForm/SearchInputForm.d.cts +2 -2
- package/dist/components/SearchInputForm/SearchInputForm.d.ts +2 -2
- package/dist/components/SearchResultsContent/SearchResultsContent.d.cts +4 -4
- package/dist/components/SearchResultsContent/SearchResultsContent.d.ts +4 -4
- package/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.d.cts +2 -2
- package/dist/components/SearchResultsFilterButton/SearchResultsFilterButton.d.ts +2 -2
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.d.cts +3 -4
- package/dist/components/SearchResultsFilterModal/SearchResultsFilterModal.d.ts +3 -4
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.d.cts +3 -4
- package/dist/components/SearchResultsFilterSidebar/SearchResultsFilter.d.ts +3 -4
- package/dist/components/SearchResultsStates/NoSearchResultsFound.d.cts +3 -3
- package/dist/components/SearchResultsStates/NoSearchResultsFound.d.ts +3 -4
- package/dist/components/SearchResultsStates/SearchResultsGrid.d.cts +3 -3
- package/dist/components/SearchResultsStates/SearchResultsGrid.d.ts +3 -3
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.cjs +1 -1
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.d.cts +2 -2
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.d.ts +2 -2
- package/dist/components/SearchResultsStates/SearchResultsLoadingGrid.js +1 -1
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.d.cts +3 -3
- package/dist/components/SearchResultsToolbar/SearchResultsToolbar.d.ts +3 -3
- package/dist/components/SparkleAnimation/SparkleAnimation.cjs +1 -1
- package/dist/components/SparkleAnimation/SparkleAnimation.d.cts +2 -2
- package/dist/components/SparkleAnimation/SparkleAnimation.d.ts +2 -2
- package/dist/components/SparkleAnimation/SparkleAnimation.js +1 -1
- package/dist/components/Spinner/Spinner.d.cts +2 -2
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/SuggestionButton/SuggestionButton.d.cts +2 -2
- package/dist/components/SuggestionButton/SuggestionButton.d.ts +2 -2
- package/dist/components/ToggleButton/ToggleButton.d.cts +2 -2
- package/dist/components/ToggleButton/ToggleButton.d.ts +2 -2
- package/dist/util/colorVar.d.cts +1 -1
- package/dist/util/colorVar.d.ts +1 -2
- package/package.json +1 -1
- package/dist/hooks/dist/application/models/api/response.d.cts +0 -11
- package/dist/hooks/dist/application/models/api/response.d.ts +0 -11
- package/dist/hooks/dist/application/models/api/widgetText.d.cts +0 -8
- package/dist/hooks/dist/application/models/api/widgetText.d.ts +0 -8
- package/dist/hooks/dist/application/models/chatElementDisplayLocation.d.cts +0 -27
- package/dist/hooks/dist/application/models/chatElementDisplayLocation.d.ts +0 -27
- package/dist/hooks/dist/application/models/colorsConfig.d.cts +0 -24
- package/dist/hooks/dist/application/models/colorsConfig.d.ts +0 -24
- package/dist/hooks/dist/application/models/featureGates.d.cts +0 -33
- package/dist/hooks/dist/application/models/featureGates.d.ts +0 -33
- package/dist/hooks/dist/application/models/frontendConfig.d.cts +0 -17
- package/dist/hooks/dist/application/models/frontendConfig.d.ts +0 -17
- package/dist/hooks/dist/application/models/guards/isVariantInfo.d.ts +0 -2
- package/dist/hooks/dist/application/models/index.d.ts +0 -18
- package/dist/hooks/dist/application/models/utilityTypes/camelCase.d.cts +0 -71
- package/dist/hooks/dist/application/models/utilityTypes/camelCase.d.ts +0 -71
- package/dist/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.cts +0 -58
- package/dist/hooks/dist/application/models/utilityTypes/camelCasedPropertiesDeep.d.ts +0 -58
- package/dist/hooks/dist/application/models/utilityTypes/internal.d.cts +0 -22
- package/dist/hooks/dist/application/models/utilityTypes/internal.d.ts +0 -22
- package/dist/hooks/dist/application/models/utilityTypes/splitWords.d.cts +0 -31
- package/dist/hooks/dist/application/models/utilityTypes/splitWords.d.ts +0 -31
- package/dist/hooks/dist/application/models/utilityTypes/trim.d.cts +0 -30
- package/dist/hooks/dist/application/models/utilityTypes/trim.d.ts +0 -30
- package/dist/hooks/dist/application/models/utilityTypes/unknownArray.d.cts +0 -30
- package/dist/hooks/dist/application/models/utilityTypes/unknownArray.d.ts +0 -30
- package/dist/hooks/dist/application/models/validators/validateGraphQLFrontendConfig.d.ts +0 -2
- package/dist/hooks/dist/application/models/variantInfo/pageVisitInfo.d.cts +0 -11
- package/dist/hooks/dist/application/models/variantInfo/pageVisitInfo.d.ts +0 -11
- package/dist/hooks/dist/application/models/variantInfo/plpInfo.d.cts +0 -8
- package/dist/hooks/dist/application/models/variantInfo/plpInfo.d.ts +0 -8
- package/dist/hooks/dist/application/models/variantInfo/productInfo.d.cts +0 -10
- package/dist/hooks/dist/application/models/variantInfo/productInfo.d.ts +0 -10
- package/dist/hooks/dist/application/models/variantInfo/variantInfo.d.cts +0 -36
- package/dist/hooks/dist/application/models/variantInfo/variantInfo.d.ts +0 -36
- package/dist/hooks/dist/application/utils/overrides.d.cts +0 -22
- package/dist/hooks/dist/application/utils/overrides.d.ts +0 -22
- package/dist/hooks/dist/atoms/search/searchAPI.d.cts +0 -11
- package/dist/hooks/dist/atoms/search/searchAPI.d.ts +0 -11
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.cts +0 -12
- package/dist/hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts +0 -13
- package/dist/hooks/dist/contexts/types.d.cts +0 -676
- package/dist/hooks/dist/contexts/types.d.ts +0 -677
- package/dist/hooks/dist/contexts/typesV3.d.cts +0 -21
- package/dist/hooks/dist/contexts/typesV3.d.ts +0 -23
- package/dist/hooks/dist/hooks/utils.d.cts +0 -9
- package/dist/hooks/dist/hooks/utils.d.ts +0 -11
- package/dist/hooks/dist/merchants/domInsertion.d.cts +0 -15
- package/dist/hooks/dist/merchants/domInsertion.d.ts +0 -15
- package/dist/hooks/dist/merchants/gridInsertion.d.cts +0 -22
- package/dist/hooks/dist/merchants/gridInsertion.d.ts +0 -22
- package/dist/hooks/dist/types/OrgInfo.d.ts +0 -2
- package/dist/hooks/dist/types/customerService.d.cts +0 -27
- package/dist/hooks/dist/types/customerService.d.ts +0 -27
- package/dist/hooks/dist/types/custservice-types.d.cts +0 -10
- package/dist/hooks/dist/types/custservice-types.d.ts +0 -10
- package/dist/hooks/dist/types/enviveConfig.d.cts +0 -33
- package/dist/hooks/dist/types/enviveConfig.d.ts +0 -33
- package/dist/hooks/dist/types/index.d.cts +0 -6
- package/dist/hooks/dist/types/index.d.ts +0 -7
- package/dist/hooks/dist/types/search-filter-types.d.cts +0 -36
- package/dist/hooks/dist/types/search-filter-types.d.ts +0 -36
- package/dist/hooks/dist/types/suggestionBarV2-types.d.cts +0 -9
- package/dist/hooks/dist/types/suggestionBarV2-types.d.ts +0 -9
- package/dist/hooks/dist/types/test-types.d.cts +0 -8
- package/dist/hooks/dist/types/test-types.d.ts +0 -8
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from "./internal.cjs";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/application/models/utilityTypes/splitWords.d.ts
|
|
4
|
-
//#region src/application/models/utilityTypes/splitWords.d.ts
|
|
5
|
-
type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
|
|
6
|
-
type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
|
|
7
|
-
/**
|
|
8
|
-
* Split a string (almost) like Lodash's `_.words()` function.
|
|
9
|
-
*
|
|
10
|
-
* - Split on each word that begins with a capital letter.
|
|
11
|
-
* - Split on each {@link WordSeparators}.
|
|
12
|
-
* - Split on numeric sequence.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```
|
|
16
|
-
* type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
|
|
17
|
-
* type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
|
|
18
|
-
* type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
|
|
19
|
-
* type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
|
|
20
|
-
* type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @internal
|
|
24
|
-
* @category Change case
|
|
25
|
-
* @category Template literal
|
|
26
|
-
*/
|
|
27
|
-
type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
|
|
28
|
-
//#endregion
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { SplitWords };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from "./internal.js";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/application/models/utilityTypes/splitWords.d.ts
|
|
4
|
-
//#region src/application/models/utilityTypes/splitWords.d.ts
|
|
5
|
-
type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
|
|
6
|
-
type RemoveLastCharacter<Sentence extends string, Character extends string> = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
|
|
7
|
-
/**
|
|
8
|
-
* Split a string (almost) like Lodash's `_.words()` function.
|
|
9
|
-
*
|
|
10
|
-
* - Split on each word that begins with a capital letter.
|
|
11
|
-
* - Split on each {@link WordSeparators}.
|
|
12
|
-
* - Split on numeric sequence.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```
|
|
16
|
-
* type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
|
|
17
|
-
* type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
|
|
18
|
-
* type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
|
|
19
|
-
* type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
|
|
20
|
-
* type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* @internal
|
|
24
|
-
* @category Change case
|
|
25
|
-
* @category Template literal
|
|
26
|
-
*/
|
|
27
|
-
type SplitWords<Sentence extends string, LastCharacter extends string = '', CurrentWord extends string = ''> = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}` ? FirstCharacter extends WordSeparators ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>] : LastCharacter extends '' ? SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter> : [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>] ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>] ? [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>] : [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>] ? [...RemoveLastCharacter<CurrentWord, LastCharacter>, ...SplitWords<RemainingCharacters, FirstCharacter, `${LastCharacter}${FirstCharacter}`>] : SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`> : [...SkipEmptyWord<CurrentWord>];
|
|
28
|
-
//#endregion
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { SplitWords };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Whitespace } from "./internal.cjs";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/application/models/utilityTypes/trim.d.ts
|
|
4
|
-
|
|
5
|
-
//#region src/application/models/utilityTypes/trim.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Remove spaces from the left side.
|
|
8
|
-
*/
|
|
9
|
-
type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
|
|
10
|
-
/**
|
|
11
|
-
* Remove spaces from the right side.
|
|
12
|
-
*/
|
|
13
|
-
type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
|
|
14
|
-
/**
|
|
15
|
-
* Remove leading and trailing spaces from a string.
|
|
16
|
-
* @example
|
|
17
|
-
* ```
|
|
18
|
-
* import type {Trim} from 'type-fest';
|
|
19
|
-
*
|
|
20
|
-
* Trim<' foo '>
|
|
21
|
-
* //=> 'foo'
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @category String
|
|
25
|
-
* @category Template literal
|
|
26
|
-
*/
|
|
27
|
-
type Trim<V extends string> = TrimLeft<TrimRight<V>>;
|
|
28
|
-
//#endregion
|
|
29
|
-
//#endregion
|
|
30
|
-
export { Trim };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { Whitespace } from "./internal.js";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/application/models/utilityTypes/trim.d.ts
|
|
4
|
-
|
|
5
|
-
//#region src/application/models/utilityTypes/trim.d.ts
|
|
6
|
-
/**
|
|
7
|
-
* Remove spaces from the left side.
|
|
8
|
-
*/
|
|
9
|
-
type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
|
|
10
|
-
/**
|
|
11
|
-
* Remove spaces from the right side.
|
|
12
|
-
*/
|
|
13
|
-
type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
|
|
14
|
-
/**
|
|
15
|
-
* Remove leading and trailing spaces from a string.
|
|
16
|
-
* @example
|
|
17
|
-
* ```
|
|
18
|
-
* import type {Trim} from 'type-fest';
|
|
19
|
-
*
|
|
20
|
-
* Trim<' foo '>
|
|
21
|
-
* //=> 'foo'
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @category String
|
|
25
|
-
* @category Template literal
|
|
26
|
-
*/
|
|
27
|
-
type Trim<V extends string> = TrimLeft<TrimRight<V>>;
|
|
28
|
-
//#endregion
|
|
29
|
-
//#endregion
|
|
30
|
-
export { Trim };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/application/models/utilityTypes/unknownArray.d.ts
|
|
2
|
-
//#region src/application/models/utilityTypes/unknownArray.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Represents an array with `unknown` value.
|
|
5
|
-
*
|
|
6
|
-
* Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```
|
|
10
|
-
* import type {UnknownArray} from 'type-fest';
|
|
11
|
-
*
|
|
12
|
-
* type IsArray<T> = T extends UnknownArray ? true : false;
|
|
13
|
-
*
|
|
14
|
-
* type A = IsArray<['foo']>;
|
|
15
|
-
* //=> true
|
|
16
|
-
*
|
|
17
|
-
* type B = IsArray<readonly number[]>;
|
|
18
|
-
* //=> true
|
|
19
|
-
*
|
|
20
|
-
* type C = IsArray<string>;
|
|
21
|
-
* //=> false
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @category Type
|
|
25
|
-
* @category Array
|
|
26
|
-
*/
|
|
27
|
-
type UnknownArray = readonly unknown[];
|
|
28
|
-
//#endregion
|
|
29
|
-
//#endregion
|
|
30
|
-
export { UnknownArray };
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/application/models/utilityTypes/unknownArray.d.ts
|
|
2
|
-
//#region src/application/models/utilityTypes/unknownArray.d.ts
|
|
3
|
-
/**
|
|
4
|
-
* Represents an array with `unknown` value.
|
|
5
|
-
*
|
|
6
|
-
* Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
|
|
7
|
-
*
|
|
8
|
-
* @example
|
|
9
|
-
* ```
|
|
10
|
-
* import type {UnknownArray} from 'type-fest';
|
|
11
|
-
*
|
|
12
|
-
* type IsArray<T> = T extends UnknownArray ? true : false;
|
|
13
|
-
*
|
|
14
|
-
* type A = IsArray<['foo']>;
|
|
15
|
-
* //=> true
|
|
16
|
-
*
|
|
17
|
-
* type B = IsArray<readonly number[]>;
|
|
18
|
-
* //=> true
|
|
19
|
-
*
|
|
20
|
-
* type C = IsArray<string>;
|
|
21
|
-
* //=> false
|
|
22
|
-
* ```
|
|
23
|
-
*
|
|
24
|
-
* @category Type
|
|
25
|
-
* @category Array
|
|
26
|
-
*/
|
|
27
|
-
type UnknownArray = readonly unknown[];
|
|
28
|
-
//#endregion
|
|
29
|
-
//#endregion
|
|
30
|
-
export { UnknownArray };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PageVisitCategory } from "@spiffy-ai/commerce-api-client";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/application/models/variantInfo/pageVisitInfo.d.ts
|
|
4
|
-
//#region src/application/models/variantInfo/pageVisitInfo.d.ts
|
|
5
|
-
interface PageVisitInfo {
|
|
6
|
-
url: string;
|
|
7
|
-
pageVisitCategory: PageVisitCategory;
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
//#endregion
|
|
11
|
-
export { PageVisitInfo };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { PageVisitCategory } from "@spiffy-ai/commerce-api-client";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/application/models/variantInfo/pageVisitInfo.d.ts
|
|
4
|
-
//#region src/application/models/variantInfo/pageVisitInfo.d.ts
|
|
5
|
-
interface PageVisitInfo {
|
|
6
|
-
url: string;
|
|
7
|
-
pageVisitCategory: PageVisitCategory;
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
//#endregion
|
|
11
|
-
export { PageVisitInfo };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/application/models/variantInfo/productInfo.d.ts
|
|
2
|
-
//#region src/application/models/variantInfo/productInfo.d.ts
|
|
3
|
-
interface ProductInfo {
|
|
4
|
-
productId: string;
|
|
5
|
-
parentProductId?: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
//#endregion
|
|
10
|
-
export { ProductInfo };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/application/models/variantInfo/productInfo.d.ts
|
|
2
|
-
//#region src/application/models/variantInfo/productInfo.d.ts
|
|
3
|
-
interface ProductInfo {
|
|
4
|
-
productId: string;
|
|
5
|
-
parentProductId?: string;
|
|
6
|
-
url?: string;
|
|
7
|
-
}
|
|
8
|
-
//#endregion
|
|
9
|
-
//#endregion
|
|
10
|
-
export { ProductInfo };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ShowFloatingButtonOptions } from "../../../contexts/types.cjs";
|
|
2
|
-
import { PLPInfo } from "./plpInfo.cjs";
|
|
3
|
-
import { PageVisitInfo } from "./pageVisitInfo.cjs";
|
|
4
|
-
import { ProductInfo } from "./productInfo.cjs";
|
|
5
|
-
|
|
6
|
-
//#region ../hooks/dist/application/models/variantInfo/variantInfo.d.ts
|
|
7
|
-
//#region src/application/models/variantInfo/variantInfo.d.ts
|
|
8
|
-
declare enum VariantTypeEnum {
|
|
9
|
-
Pdp = "pdp",
|
|
10
|
-
Plp = "plp",
|
|
11
|
-
PageVisit = "page_visit",
|
|
12
|
-
Home = "homepage",
|
|
13
|
-
Search = "search",
|
|
14
|
-
Other = "other",
|
|
15
|
-
FullPageSalesAgent = "full_page",
|
|
16
|
-
}
|
|
17
|
-
type VariantInfo = PDPVariantInfo | PLPVariantInfo | PageVisitVariantInfo;
|
|
18
|
-
type PDPVariantInfo = {
|
|
19
|
-
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
20
|
-
variantId: string;
|
|
21
|
-
variant: VariantTypeEnum.Pdp;
|
|
22
|
-
} & ProductInfo;
|
|
23
|
-
type PLPVariantInfo = {
|
|
24
|
-
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
25
|
-
variantId: string;
|
|
26
|
-
variant: VariantTypeEnum.Plp;
|
|
27
|
-
url?: string;
|
|
28
|
-
} & PLPInfo;
|
|
29
|
-
type PageVisitVariantInfo = {
|
|
30
|
-
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
31
|
-
variantId: string;
|
|
32
|
-
variant: VariantTypeEnum.PageVisit;
|
|
33
|
-
} & PageVisitInfo;
|
|
34
|
-
//#endregion
|
|
35
|
-
//#endregion
|
|
36
|
-
export { VariantInfo };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { ShowFloatingButtonOptions } from "../../../contexts/types.js";
|
|
2
|
-
import { PLPInfo } from "./plpInfo.js";
|
|
3
|
-
import { PageVisitInfo } from "./pageVisitInfo.js";
|
|
4
|
-
import { ProductInfo } from "./productInfo.js";
|
|
5
|
-
|
|
6
|
-
//#region ../hooks/dist/application/models/variantInfo/variantInfo.d.ts
|
|
7
|
-
//#region src/application/models/variantInfo/variantInfo.d.ts
|
|
8
|
-
declare enum VariantTypeEnum {
|
|
9
|
-
Pdp = "pdp",
|
|
10
|
-
Plp = "plp",
|
|
11
|
-
PageVisit = "page_visit",
|
|
12
|
-
Home = "homepage",
|
|
13
|
-
Search = "search",
|
|
14
|
-
Other = "other",
|
|
15
|
-
FullPageSalesAgent = "full_page",
|
|
16
|
-
}
|
|
17
|
-
type VariantInfo = PDPVariantInfo | PLPVariantInfo | PageVisitVariantInfo;
|
|
18
|
-
type PDPVariantInfo = {
|
|
19
|
-
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
20
|
-
variantId: string;
|
|
21
|
-
variant: VariantTypeEnum.Pdp;
|
|
22
|
-
} & ProductInfo;
|
|
23
|
-
type PLPVariantInfo = {
|
|
24
|
-
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
25
|
-
variantId: string;
|
|
26
|
-
variant: VariantTypeEnum.Plp;
|
|
27
|
-
url?: string;
|
|
28
|
-
} & PLPInfo;
|
|
29
|
-
type PageVisitVariantInfo = {
|
|
30
|
-
floatingButtonOverride?: ShowFloatingButtonOptions;
|
|
31
|
-
variantId: string;
|
|
32
|
-
variant: VariantTypeEnum.PageVisit;
|
|
33
|
-
} & PageVisitInfo;
|
|
34
|
-
//#endregion
|
|
35
|
-
//#endregion
|
|
36
|
-
export { PDPVariantInfo, PLPVariantInfo, PageVisitVariantInfo, VariantInfo, VariantTypeEnum };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/application/utils/overrides.d.ts
|
|
2
|
-
//#region src/application/utils/overrides.d.ts
|
|
3
|
-
type ReplaceOp<T> = {
|
|
4
|
-
$replace: T;
|
|
5
|
-
};
|
|
6
|
-
type DeleteOp = {
|
|
7
|
-
$delete: true;
|
|
8
|
-
};
|
|
9
|
-
type Builtin = Date | RegExp | ((...args: unknown[]) => unknown);
|
|
10
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Override<T> is a DeepPartial-like type with special operators:
|
|
13
|
-
* - { $replace: T } to replace an entire subtree/array
|
|
14
|
-
* - { $delete: true } to delete an object key
|
|
15
|
-
*
|
|
16
|
-
* Arrays behavior:
|
|
17
|
-
* - Arrays of objects: merge-by-index by default (unless `arrayStrategy: 'replace'` or `$replace` is used)
|
|
18
|
-
* - Arrays of primitives (string/number/boolean/...): replaced by default when a patch array is provided
|
|
19
|
-
*/
|
|
20
|
-
type Override<T> = T extends Primitive | Builtin ? T | ReplaceOp<T> | DeleteOp : T extends (infer U)[] ? Array<Override<U> | undefined> | ReplaceOp<T> : T extends Map<unknown, unknown> | Set<unknown> ? ReplaceOp<T> : T extends object ? { [K in keyof T]?: Override<T[K]> | DeleteOp | null } | ReplaceOp<T> : T;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { Override };
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/application/utils/overrides.d.ts
|
|
2
|
-
//#region src/application/utils/overrides.d.ts
|
|
3
|
-
type ReplaceOp<T> = {
|
|
4
|
-
$replace: T;
|
|
5
|
-
};
|
|
6
|
-
type DeleteOp = {
|
|
7
|
-
$delete: true;
|
|
8
|
-
};
|
|
9
|
-
type Builtin = Date | RegExp | ((...args: unknown[]) => unknown);
|
|
10
|
-
type Primitive = string | number | boolean | bigint | symbol | null | undefined;
|
|
11
|
-
/**
|
|
12
|
-
* Override<T> is a DeepPartial-like type with special operators:
|
|
13
|
-
* - { $replace: T } to replace an entire subtree/array
|
|
14
|
-
* - { $delete: true } to delete an object key
|
|
15
|
-
*
|
|
16
|
-
* Arrays behavior:
|
|
17
|
-
* - Arrays of objects: merge-by-index by default (unless `arrayStrategy: 'replace'` or `$replace` is used)
|
|
18
|
-
* - Arrays of primitives (string/number/boolean/...): replaced by default when a patch array is provided
|
|
19
|
-
*/
|
|
20
|
-
type Override<T> = T extends Primitive | Builtin ? T | ReplaceOp<T> | DeleteOp : T extends (infer U)[] ? Array<Override<U> | undefined> | ReplaceOp<T> : T extends Map<unknown, unknown> | Set<unknown> ? ReplaceOp<T> : T extends object ? { [K in keyof T]?: Override<T[K]> | DeleteOp | null } | ReplaceOp<T> : T;
|
|
21
|
-
//#endregion
|
|
22
|
-
export { Override };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/atoms/search/searchAPI.d.ts
|
|
2
|
-
|
|
3
|
-
//#region src/atoms/search/searchAPI.d.ts
|
|
4
|
-
type SelectedFilterOption = {
|
|
5
|
-
id: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
filterId: string;
|
|
8
|
-
filterItemId: string;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { SelectedFilterOption };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
//#region ../hooks/dist/atoms/search/searchAPI.d.ts
|
|
2
|
-
|
|
3
|
-
//#region src/atoms/search/searchAPI.d.ts
|
|
4
|
-
type SelectedFilterOption = {
|
|
5
|
-
id: string;
|
|
6
|
-
displayName: string;
|
|
7
|
-
filterId: string;
|
|
8
|
-
filterItemId: string;
|
|
9
|
-
};
|
|
10
|
-
//#endregion
|
|
11
|
-
export { SelectedFilterOption };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { WidgetString } from "../../application/models/api/widgetText.cjs";
|
|
2
|
-
|
|
3
|
-
//#region ../hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts
|
|
4
|
-
|
|
5
|
-
type HardcopyResponse = {
|
|
6
|
-
responseId: string;
|
|
7
|
-
language: string;
|
|
8
|
-
rawValues?: Record<string, WidgetString | WidgetString[]>;
|
|
9
|
-
values: Record<string, string | string[]>;
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { HardcopyResponse };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { WidgetString } from "../../application/models/api/widgetText.js";
|
|
2
|
-
import "react";
|
|
3
|
-
|
|
4
|
-
//#region ../hooks/dist/contexts/hardcopyContext/hardcopyContext.d.ts
|
|
5
|
-
|
|
6
|
-
type HardcopyResponse = {
|
|
7
|
-
responseId: string;
|
|
8
|
-
language: string;
|
|
9
|
-
rawValues?: Record<string, WidgetString | WidgetString[]>;
|
|
10
|
-
values: Record<string, string | string[]>;
|
|
11
|
-
};
|
|
12
|
-
//#endregion
|
|
13
|
-
export { HardcopyResponse };
|