@usereactify/search 5.0.0-beta.1 → 5.0.0-beta.2

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.
Files changed (143) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/package.json +66 -0
  3. package/dist/src/components/Example/ExampleFilterList.d.ts +4 -0
  4. package/dist/src/components/Example/ExampleFilterList.js +19 -0
  5. package/dist/src/components/Example/ExampleFilterRange.d.ts +4 -0
  6. package/dist/src/components/Example/ExampleFilterRange.js +21 -0
  7. package/dist/src/components/Example/ExampleFilterSlider.d.ts +4 -0
  8. package/dist/src/components/Example/ExampleFilterSlider.js +20 -0
  9. package/dist/src/components/Example/ExampleFilterStack.d.ts +4 -0
  10. package/dist/src/components/Example/ExampleFilterStack.js +12 -0
  11. package/dist/src/components/Example/ExampleResultCardCallout.d.ts +4 -0
  12. package/dist/src/components/Example/ExampleResultCardCallout.js +21 -0
  13. package/dist/src/components/Example/ExampleResultCardProduct.d.ts +4 -0
  14. package/dist/src/components/Example/ExampleResultCardProduct.js +18 -0
  15. package/dist/src/components/Example/ExampleResultPaginationLoadMore.d.ts +4 -0
  16. package/dist/src/components/Example/ExampleResultPaginationLoadMore.js +11 -0
  17. package/dist/src/components/Example/ExampleResultPaginationNextPrev.d.ts +4 -0
  18. package/dist/src/components/Example/ExampleResultPaginationNextPrev.js +13 -0
  19. package/dist/src/components/Example/ExampleResultPaginationNumbered.d.ts +4 -0
  20. package/dist/src/components/Example/ExampleResultPaginationNumbered.js +26 -0
  21. package/dist/src/components/Example/ExampleSortby.d.ts +4 -0
  22. package/dist/src/components/Example/ExampleSortby.js +12 -0
  23. package/dist/src/components/Example/index.d.ts +10 -0
  24. package/dist/src/components/Example/index.js +22 -0
  25. package/dist/src/components/Filter/Filter.d.ts +20 -0
  26. package/dist/src/components/Filter/Filter.js +89 -0
  27. package/dist/src/components/Filter/FilterStack.d.ts +7 -0
  28. package/dist/src/components/Filter/FilterStack.js +16 -0
  29. package/dist/src/components/Filter/index.d.ts +2 -0
  30. package/dist/src/components/Filter/index.js +14 -0
  31. package/dist/src/components/ReactifySearchBase/ReactifySearchBase.d.ts +42 -0
  32. package/dist/src/components/ReactifySearchBase/ReactifySearchBase.js +140 -0
  33. package/dist/src/components/ReactifySearchBase/index.d.ts +1 -0
  34. package/dist/src/components/ReactifySearchBase/index.js +13 -0
  35. package/dist/src/components/Result/ResultCardCallout.d.ts +12 -0
  36. package/dist/src/components/Result/ResultCardCallout.js +46 -0
  37. package/dist/src/components/Result/ResultCardProduct.d.ts +13 -0
  38. package/dist/src/components/Result/ResultCardProduct.js +63 -0
  39. package/dist/src/components/Result/ResultPaginationLoadMore.d.ts +7 -0
  40. package/dist/src/components/Result/ResultPaginationLoadMore.js +16 -0
  41. package/dist/src/components/Result/ResultPaginationNextPrev.d.ts +7 -0
  42. package/dist/src/components/Result/ResultPaginationNextPrev.js +16 -0
  43. package/dist/src/components/Result/ResultPaginationNumbered.d.ts +7 -0
  44. package/dist/src/components/Result/ResultPaginationNumbered.js +19 -0
  45. package/dist/src/components/Result/ResultStack.d.ts +40 -0
  46. package/dist/src/components/Result/ResultStack.js +107 -0
  47. package/dist/src/components/Result/ResultStateProvider.d.ts +6 -0
  48. package/dist/src/components/Result/ResultStateProvider.js +10 -0
  49. package/dist/src/components/Result/index.d.ts +7 -0
  50. package/dist/src/components/Result/index.js +19 -0
  51. package/dist/src/components/Search/SearchInput.d.ts +8 -0
  52. package/dist/src/components/Search/SearchInput.js +17 -0
  53. package/dist/src/components/Search/index.d.ts +1 -0
  54. package/dist/src/components/Search/index.js +13 -0
  55. package/dist/src/components/Sensor/SensorCollection.d.ts +2 -0
  56. package/dist/src/components/Sensor/SensorCollection.js +44 -0
  57. package/dist/src/components/Sensor/SensorInventoryAvailable.d.ts +2 -0
  58. package/dist/src/components/Sensor/SensorInventoryAvailable.js +52 -0
  59. package/dist/src/components/Sensor/SensorPublished.d.ts +2 -0
  60. package/dist/src/components/Sensor/SensorPublished.js +16 -0
  61. package/dist/src/components/Sensor/SensorSearch.d.ts +2 -0
  62. package/dist/src/components/Sensor/SensorSearch.js +82 -0
  63. package/dist/src/components/Sensor/SensorSort.d.ts +2 -0
  64. package/dist/src/components/Sensor/SensorSort.js +204 -0
  65. package/dist/src/components/Sensor/SensorSortScore.d.ts +2 -0
  66. package/dist/src/components/Sensor/SensorSortScore.js +12 -0
  67. package/dist/src/components/Sensor/SensorStack.d.ts +3 -0
  68. package/dist/src/components/Sensor/SensorStack.js +31 -0
  69. package/dist/src/components/Sensor/index.d.ts +8 -0
  70. package/dist/src/components/Sensor/index.js +29 -0
  71. package/dist/src/components/Sortby/Sortby.d.ts +7 -0
  72. package/dist/src/components/Sortby/Sortby.js +16 -0
  73. package/dist/src/components/Sortby/index.d.ts +1 -0
  74. package/dist/src/components/Sortby/index.js +13 -0
  75. package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.d.ts +2 -0
  76. package/dist/src/components/Utility/UtilityAuthenticatedReactiveBase.js +14 -0
  77. package/dist/src/components/Utility/index.d.ts +1 -0
  78. package/dist/src/components/Utility/index.js +13 -0
  79. package/dist/src/components/index.d.ts +8 -0
  80. package/dist/src/components/index.js +20 -0
  81. package/dist/src/hooks/index.d.ts +14 -0
  82. package/dist/src/hooks/index.js +26 -0
  83. package/dist/src/hooks/reactivesearch/index.d.ts +8 -0
  84. package/dist/src/hooks/reactivesearch/index.js +20 -0
  85. package/dist/src/hooks/reactivesearch/useReactiveBaseProps.d.ts +7 -0
  86. package/dist/src/hooks/reactivesearch/useReactiveBaseProps.js +43 -0
  87. package/dist/src/hooks/reactivesearch/useReactiveDataSearchProps.d.ts +26 -0
  88. package/dist/src/hooks/reactivesearch/useReactiveDataSearchProps.js +70 -0
  89. package/dist/src/hooks/reactivesearch/useReactiveFilterListProps.d.ts +73 -0
  90. package/dist/src/hooks/reactivesearch/useReactiveFilterListProps.js +21 -0
  91. package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.d.ts +70 -0
  92. package/dist/src/hooks/reactivesearch/useReactiveFilterRangeProps.js +21 -0
  93. package/dist/src/hooks/reactivesearch/useReactiveFilterSharedProps.d.ts +67 -0
  94. package/dist/src/hooks/reactivesearch/useReactiveFilterSharedProps.js +105 -0
  95. package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.d.ts +68 -0
  96. package/dist/src/hooks/reactivesearch/useReactiveFilterSliderProps.js +21 -0
  97. package/dist/src/hooks/reactivesearch/useReactiveReactProp.d.ts +3 -0
  98. package/dist/src/hooks/reactivesearch/useReactiveReactProp.js +25 -0
  99. package/dist/src/hooks/reactivesearch/useReactiveResultStackProps.d.ts +17 -0
  100. package/dist/src/hooks/reactivesearch/useReactiveResultStackProps.js +31 -0
  101. package/dist/src/hooks/useAnalytics.d.ts +95 -0
  102. package/dist/src/hooks/useAnalytics.js +110 -0
  103. package/dist/src/hooks/useConfig.d.ts +4 -0
  104. package/dist/src/hooks/useConfig.js +81 -0
  105. package/dist/src/hooks/useCuration.d.ts +2 -0
  106. package/dist/src/hooks/useCuration.js +52 -0
  107. package/dist/src/hooks/useFilterCollapsedState.d.ts +8 -0
  108. package/dist/src/hooks/useFilterCollapsedState.js +27 -0
  109. package/dist/src/hooks/useFilterListProps.d.ts +12 -0
  110. package/dist/src/hooks/useFilterListProps.js +35 -0
  111. package/dist/src/hooks/useFilterStack.d.ts +2 -0
  112. package/dist/src/hooks/useFilterStack.js +46 -0
  113. package/dist/src/hooks/useFilters.d.ts +4 -0
  114. package/dist/src/hooks/useFilters.js +22 -0
  115. package/dist/src/hooks/usePagination.d.ts +14 -0
  116. package/dist/src/hooks/usePagination.js +97 -0
  117. package/dist/src/hooks/usePaginationLoadMore.d.ts +15 -0
  118. package/dist/src/hooks/usePaginationLoadMore.js +37 -0
  119. package/dist/src/hooks/useProductPrice.d.ts +10 -0
  120. package/dist/src/hooks/useProductPrice.js +63 -0
  121. package/dist/src/hooks/useReactifySearchContext.d.ts +78 -0
  122. package/dist/src/hooks/useReactifySearchContext.js +10 -0
  123. package/dist/src/hooks/useSearch.d.ts +8 -0
  124. package/dist/src/hooks/useSearch.js +36 -0
  125. package/dist/src/hooks/useSortby.d.ts +6 -0
  126. package/dist/src/hooks/useSortby.js +41 -0
  127. package/dist/src/index.d.ts +3 -0
  128. package/dist/src/index.js +18 -0
  129. package/dist/src/types/config.d.ts +26 -0
  130. package/dist/src/types/config.js +2 -0
  131. package/dist/src/types/elastic.d.ts +209 -0
  132. package/dist/src/types/elastic.js +18 -0
  133. package/dist/src/types/firestore.d.ts +280 -0
  134. package/dist/src/types/firestore.js +18 -0
  135. package/dist/src/types/graphql.d.ts +26545 -0
  136. package/dist/src/types/graphql.js +4687 -0
  137. package/dist/src/types/index.d.ts +3 -0
  138. package/dist/src/types/index.js +15 -0
  139. package/dist/src/types/reactivesearch.d.ts +73 -0
  140. package/dist/src/types/reactivesearch.js +2 -0
  141. package/dist/src/types/shopify.d.ts +21 -0
  142. package/dist/src/types/shopify.js +27 -0
  143. package/package.json +3 -2
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ElasticDataType = exports.ElasticDocumentType = void 0;
4
+ var ElasticDocumentType;
5
+ (function (ElasticDocumentType) {
6
+ ElasticDocumentType["Callout"] = "callout";
7
+ ElasticDocumentType["Product"] = "product";
8
+ })(ElasticDocumentType = exports.ElasticDocumentType || (exports.ElasticDocumentType = {}));
9
+ var ElasticDataType;
10
+ (function (ElasticDataType) {
11
+ ElasticDataType["Text"] = "text";
12
+ ElasticDataType["Long"] = "long";
13
+ ElasticDataType["Date"] = "date";
14
+ ElasticDataType["Float"] = "float";
15
+ ElasticDataType["Nested"] = "nested";
16
+ ElasticDataType["Keyword"] = "keyword";
17
+ ElasticDataType["Boolean"] = "boolean";
18
+ })(ElasticDataType = exports.ElasticDataType || (exports.ElasticDataType = {}));
@@ -0,0 +1,280 @@
1
+ declare type Timestamp = string;
2
+ import { ShopifyProduct } from "./shopify";
3
+ import { ElasticDataType } from "./elastic";
4
+ export interface Log {
5
+ id: string;
6
+ keywords: string[];
7
+ message: string;
8
+ platform: "reactify" | "shopify" | "elastic";
9
+ percentCompleted: number;
10
+ action?: {
11
+ type: "retry";
12
+ label: string;
13
+ task: Task["taskId"];
14
+ };
15
+ step: "download" | "transform" | "merge" | "upload" | "cleanup" | "complete" | "sync";
16
+ title: string;
17
+ type: "bulk";
18
+ data?: string;
19
+ progress: "new" | "error" | "complete" | "partiallyComplete";
20
+ status: "success" | "info" | "warning" | "critical";
21
+ createdAt: Timestamp;
22
+ updatedAt?: Timestamp;
23
+ finishedAt?: Timestamp;
24
+ }
25
+ export interface Task {
26
+ logId: string;
27
+ taskId: "download" | "transform" | "merge" | "upload" | "cleanup" | "refreshDefinedFields" | "install";
28
+ firstRun: boolean;
29
+ createdAt: Timestamp;
30
+ updatedAt?: Timestamp;
31
+ }
32
+ export interface TaskDownload extends Task {
33
+ taskId: "download";
34
+ type: "collection" | "product";
35
+ productUrl?: string;
36
+ collectionUrl?: string;
37
+ }
38
+ export interface TaskTransform extends Task {
39
+ taskId: "transform";
40
+ productUrl: string;
41
+ collectionUrl: string;
42
+ }
43
+ export interface TaskMerge extends Task {
44
+ taskId: "merge";
45
+ productCount: number;
46
+ collectionCount: number;
47
+ startAfterId?: string;
48
+ }
49
+ export interface TaskUpload extends Task {
50
+ taskId: "upload";
51
+ productCount: number;
52
+ collectionCount: number;
53
+ startAfterId?: string;
54
+ }
55
+ export interface TaskCleanup extends Task {
56
+ taskId: "cleanup";
57
+ }
58
+ export interface TaskRefreshDefinedFields extends Task {
59
+ taskId: "refreshDefinedFields";
60
+ }
61
+ export interface TaskInstall extends Task {
62
+ taskId: "install";
63
+ }
64
+ export interface Lock {
65
+ logId: string;
66
+ taskType: "sync";
67
+ createdAt: Timestamp;
68
+ }
69
+ export interface SettingsInstance {
70
+ index: string;
71
+ cloudId: string;
72
+ endpoint: string;
73
+ password: string;
74
+ username: string;
75
+ syncFrequency: string;
76
+ syncThreshold: number;
77
+ provider: "elastic" | "aws";
78
+ storefrontAccessToken: string;
79
+ customMappings: string;
80
+ }
81
+ export interface SettingsProduct {
82
+ tagChild?: string;
83
+ tagKeys?: string[];
84
+ tagParent?: string;
85
+ syncObjects: string[];
86
+ tagExclude?: string[];
87
+ tagSeparator?: string;
88
+ metafieldWhitelist?: string[];
89
+ }
90
+ export interface SettingsCurations {
91
+ moreInfo?: boolean;
92
+ pageSize?: number;
93
+ gridColumns?: number;
94
+ }
95
+ export interface Field {
96
+ id: string;
97
+ field: string;
98
+ enabled: boolean;
99
+ importance: number;
100
+ searchType: "always_search" | "search_page" | "instant_search";
101
+ }
102
+ export interface DefinedField {
103
+ label: string;
104
+ value: string;
105
+ type: ElasticDataType;
106
+ }
107
+ export interface Sort {
108
+ id: string;
109
+ name: string;
110
+ handle: string;
111
+ field: string;
112
+ position: number;
113
+ enabled: boolean;
114
+ direction: "desc" | "asc";
115
+ visibility: "all" | "search" | "collection";
116
+ }
117
+ export interface Filter {
118
+ id: string;
119
+ name: string;
120
+ handle: string;
121
+ enabled: boolean;
122
+ pageSize: number;
123
+ keywords: string[];
124
+ defaultSort: string;
125
+ collections: string[];
126
+ type: "search" | "collection";
127
+ paginationType: "pagination" | "load_more" | "next_prev" | "infinite_scroll";
128
+ inventoryVisibility: "show_all" | "hide_products" | "hide_variants" | "hide_all";
129
+ }
130
+ export interface FilterOption {
131
+ displaySize: string;
132
+ displaySliderInterval: string;
133
+ displaySliderStep: string;
134
+ displayType: "multi" | "single" | "range" | "slider";
135
+ displayView: "list" | "check" | "swatch" | "box";
136
+ enabled: boolean;
137
+ field: string;
138
+ id: string;
139
+ name: string;
140
+ handle: string;
141
+ position: number;
142
+ settingsCollapsedDesktop: boolean;
143
+ settingsCollapsedMobile: boolean;
144
+ settingsShowFilter: boolean;
145
+ settingsShowMore: boolean;
146
+ settingsShowSearch: boolean;
147
+ settingsUppercase: boolean;
148
+ settingsHideUnavailable: boolean;
149
+ valuesExclude: Array<string>;
150
+ valuesManual: Array<string>;
151
+ valuesShow: "all" | "manual";
152
+ }
153
+ export interface Redirect {
154
+ id: string;
155
+ url: string;
156
+ query: string;
157
+ enabled: boolean;
158
+ keywords: string[];
159
+ }
160
+ export interface Curation {
161
+ id: string;
162
+ title: string;
163
+ status: CurationStatus;
164
+ published: boolean;
165
+ keywords: string[];
166
+ searchTerm?: string;
167
+ longRunningTask?: boolean;
168
+ collectionHandle?: string;
169
+ type: "collection" | "search";
170
+ boosting?: {
171
+ groupings?: BoostGrouping[];
172
+ sortings?: BoostSorting[];
173
+ };
174
+ sort?: CurationSort;
175
+ }
176
+ export interface CurationSort {
177
+ sortTag?: string;
178
+ sortOption: string;
179
+ sortDirection: "asc" | "desc";
180
+ sortVariantOption?: "option1" | "option2" | "option3";
181
+ }
182
+ export declare enum CurationStatus {
183
+ Draft = "draft",
184
+ Publishing = "publishing",
185
+ Published = "published",
186
+ Unpublishing = "unpublishing",
187
+ Resetting = "resetting",
188
+ Pinning = "pinning",
189
+ Sorting = "sorting"
190
+ }
191
+ export interface CurationHiding {
192
+ productId: number;
193
+ productHandle: string;
194
+ }
195
+ export interface BoostGrouping {
196
+ key: string;
197
+ value: string;
198
+ field: string;
199
+ position: number;
200
+ operation: string;
201
+ }
202
+ export interface BoostSorting {
203
+ key: string;
204
+ field: string;
205
+ query?: string;
206
+ position: number;
207
+ direction: "asc" | "desc";
208
+ }
209
+ export declare type Pin = PinProduct | PinCallout;
210
+ export declare enum PinType {
211
+ Product = "product",
212
+ Callout = "callout"
213
+ }
214
+ export interface PinProduct {
215
+ key: string;
216
+ type: PinType.Product;
217
+ position: number;
218
+ productId: number;
219
+ productHandle: string;
220
+ }
221
+ export interface PinCallout {
222
+ key: string;
223
+ type: PinType.Callout;
224
+ position: number;
225
+ calloutId: string;
226
+ }
227
+ export interface Callout {
228
+ id: string;
229
+ link: string;
230
+ title: string;
231
+ content: string;
232
+ enabled: boolean;
233
+ textColor: string;
234
+ keywords: string[];
235
+ mobileImage: string;
236
+ mobileVideo: string;
237
+ desktopVideo: string;
238
+ desktopImage: string;
239
+ backgroundColor: string;
240
+ visibility: "desktop" | "mobile" | "all";
241
+ displayColumns: string;
242
+ displayRows: string;
243
+ selectedDates?: {
244
+ end: Timestamp;
245
+ start: Timestamp;
246
+ };
247
+ }
248
+ export interface Synonym {
249
+ id: string;
250
+ name: string;
251
+ enabled: boolean;
252
+ keywords: string[];
253
+ synonyms: string[];
254
+ type: "group" | "oneway";
255
+ }
256
+ export interface MergedValue {
257
+ id: string;
258
+ name: string;
259
+ field: string;
260
+ keywords: string[];
261
+ values: string[];
262
+ }
263
+ export interface Collection {
264
+ title: string;
265
+ handle: string;
266
+ shopifyId: string;
267
+ productIds: string[];
268
+ storefrontId: string;
269
+ legacyResourceId: number;
270
+ }
271
+ export declare type Product = Omit<ShopifyProduct, "variants" | "images" | "media" | "metafields"> & {
272
+ variants: (Omit<ShopifyProduct["variants"]["edges"][0]["node"], "presentmentPrices"> & {
273
+ images?: ShopifyProduct["images"]["edges"][0]["node"][];
274
+ presentmentPrices: ShopifyProduct["variants"]["edges"][0]["node"]["presentmentPrices"]["edges"][0]["node"][];
275
+ })[];
276
+ images: ShopifyProduct["images"]["edges"][0]["node"][];
277
+ media: ShopifyProduct["media"]["edges"][0]["node"][];
278
+ metafields: ShopifyProduct["metafields"]["edges"][0]["node"][];
279
+ };
280
+ export {};
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PinType = exports.CurationStatus = void 0;
4
+ var CurationStatus;
5
+ (function (CurationStatus) {
6
+ CurationStatus["Draft"] = "draft";
7
+ CurationStatus["Publishing"] = "publishing";
8
+ CurationStatus["Published"] = "published";
9
+ CurationStatus["Unpublishing"] = "unpublishing";
10
+ CurationStatus["Resetting"] = "resetting";
11
+ CurationStatus["Pinning"] = "pinning";
12
+ CurationStatus["Sorting"] = "sorting";
13
+ })(CurationStatus = exports.CurationStatus || (exports.CurationStatus = {}));
14
+ var PinType;
15
+ (function (PinType) {
16
+ PinType["Product"] = "product";
17
+ PinType["Callout"] = "callout";
18
+ })(PinType = exports.PinType || (exports.PinType = {}));