@searchcraft/javascript-sdk 0.12.1 → 0.13.0
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/README.md +1 -1
- package/dist/components/index.d.ts +27 -0
- package/dist/components/index.js +5 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-02ad136b.js → p-16181756.js} +3 -3
- package/dist/components/{p-02ad136b.js.map → p-16181756.js.map} +1 -1
- package/dist/components/{p-fc8ccffa.js → p-38b2dad0.js} +2 -2
- package/dist/components/{p-fc8ccffa.js.map → p-38b2dad0.js.map} +1 -1
- package/dist/components/{p-1d5c5536.js → p-3d2107af.js} +3 -3
- package/dist/components/{p-1d5c5536.js.map → p-3d2107af.js.map} +1 -1
- package/dist/components/p-46ddde99.js +31 -0
- package/dist/components/{p-919734fe.js.map → p-46ddde99.js.map} +1 -1
- package/dist/components/{p-870f81fd.js → p-76d95772.js} +4 -4
- package/dist/components/{p-870f81fd.js.map → p-76d95772.js.map} +1 -1
- package/dist/components/{p-b13c7fbb.js → p-90bc1590.js} +2 -2
- package/dist/components/{p-b13c7fbb.js.map → p-90bc1590.js.map} +1 -1
- package/dist/components/{p-c9b65e8f.js → p-afe7ce60.js} +3 -3
- package/dist/components/{p-c9b65e8f.js.map → p-afe7ce60.js.map} +1 -1
- package/dist/components/{p-c8566920.js → p-e8d97093.js} +37 -5
- package/dist/components/p-e8d97093.js.map +1 -0
- package/dist/components/{p-1adf78b9.js → p-fa799946.js} +2 -2
- package/dist/components/{p-1adf78b9.js.map → p-fa799946.js.map} +1 -1
- package/dist/components/searchcraft-facet-list.js +1 -1
- package/dist/components/searchcraft-filter-panel.js +162 -7
- package/dist/components/searchcraft-filter-panel.js.map +1 -1
- package/dist/components/searchcraft-input-form.js +1 -1
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/searchcraft-loading.js +1 -1
- package/dist/components/searchcraft-popover-button.js +1 -1
- package/dist/components/searchcraft-popover-footer.js +1 -1
- package/dist/components/searchcraft-popover-form.js +5 -5
- package/dist/components/searchcraft-popover-list-item.js +1 -1
- package/dist/components/searchcraft-popover-list-view.js +1 -1
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/searchcraft-summary-box.js +2 -2
- package/dist/components/searchcraft-theme.js +2 -2
- package/dist/components/searchcraft-theme.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -1
- package/dist/hydrate/index.js +210 -23
- package/dist/hydrate/index.mjs +210 -23
- package/dist/themes/hologram.css +1 -1
- package/dist/themes/hologram.css.map +1 -1
- package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +4 -0
- package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +40 -0
- package/dist/types/components.d.ts +24 -0
- package/dist/types/store/SearchcraftStore.types.d.ts +2 -0
- package/dist/types/types/sdk-types/searchcraft-filter-panel.types.d.ts +1 -0
- package/dist/types/utils/facets.d.ts +5 -1
- package/package.json +2 -2
- package/dist/components/p-919734fe.js +0 -31
- package/dist/components/p-c8566920.js.map +0 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ Add the web components to your html. They should be placed with the rest of your
|
|
|
27
27
|
...
|
|
28
28
|
<searchcraft-filter-panel></searchcraft-filter-panel>
|
|
29
29
|
...
|
|
30
|
-
<searchcraft-results-info
|
|
30
|
+
<searchcraft-results-info></searchcraft-results-info>
|
|
31
31
|
...
|
|
32
32
|
<searchcraft-search-results></searchcraft-search-results>
|
|
33
33
|
...
|
|
@@ -183,6 +183,7 @@ export interface FacetsFilterItem extends FilterItem {
|
|
|
183
183
|
type: "facets";
|
|
184
184
|
options: {
|
|
185
185
|
showSublevel: boolean;
|
|
186
|
+
exclude?: string[];
|
|
186
187
|
};
|
|
187
188
|
}
|
|
188
189
|
export interface NumericFilterItem extends FilterItem {
|
|
@@ -653,6 +654,7 @@ export interface SearchcraftStateFunctions {
|
|
|
653
654
|
search: (options?: {
|
|
654
655
|
skipSummary?: boolean;
|
|
655
656
|
}) => Promise<void>;
|
|
657
|
+
setFilterPanelVisibility: (isVisible: boolean) => void;
|
|
656
658
|
setPopoverVisibility: (isVisible: boolean) => void;
|
|
657
659
|
setSearchResultsCount: (count: number) => void;
|
|
658
660
|
setSearchResultsPage: (page: number) => void;
|
|
@@ -675,6 +677,7 @@ export interface SearchcraftStateValues {
|
|
|
675
677
|
hotkey: string;
|
|
676
678
|
hotkeyModifier: "ctrl" | "meta" | "alt" | "option";
|
|
677
679
|
facetPathsForIndexFields: Record<string, FacetPathsForIndexField>;
|
|
680
|
+
isFilterPanelVisible: boolean;
|
|
678
681
|
isPopoverVisible: boolean;
|
|
679
682
|
isSearchInProgress: boolean;
|
|
680
683
|
rangeValueForIndexFields: Record<string, RangeValueForIndexField>;
|
|
@@ -833,6 +836,10 @@ export namespace Components {
|
|
|
833
836
|
* ```
|
|
834
837
|
*/
|
|
835
838
|
interface SearchcraftFacetList {
|
|
839
|
+
/**
|
|
840
|
+
* Array of facet values to exclude from rendering.
|
|
841
|
+
*/
|
|
842
|
+
"exclude"?: string[];
|
|
836
843
|
/**
|
|
837
844
|
* The name of the field where facets are applied.
|
|
838
845
|
*/
|
|
@@ -873,6 +880,14 @@ export namespace Components {
|
|
|
873
880
|
* The items to filter.
|
|
874
881
|
*/
|
|
875
882
|
"items": FilterItem[];
|
|
883
|
+
/**
|
|
884
|
+
* Controls whether the filter panel automatically hides/shows based on window size. - 'auto': Automatically hide/show based on window width - 'manual': User controls visibility manually
|
|
885
|
+
*/
|
|
886
|
+
"responsiveBehavior"?: "auto" | "manual";
|
|
887
|
+
/**
|
|
888
|
+
* The breakpoint (in pixels) below which the filter panel will be hidden. Defaults to 768px (--sc-breakpoint-md).
|
|
889
|
+
*/
|
|
890
|
+
"responsiveBreakpoint"?: number;
|
|
876
891
|
/**
|
|
877
892
|
* The id of the Searchcraft instance that this component should use.
|
|
878
893
|
*/
|
|
@@ -2082,6 +2097,10 @@ declare namespace LocalJSX {
|
|
|
2082
2097
|
* ```
|
|
2083
2098
|
*/
|
|
2084
2099
|
interface SearchcraftFacetList {
|
|
2100
|
+
/**
|
|
2101
|
+
* Array of facet values to exclude from rendering.
|
|
2102
|
+
*/
|
|
2103
|
+
"exclude"?: string[];
|
|
2085
2104
|
/**
|
|
2086
2105
|
* The name of the field where facets are applied.
|
|
2087
2106
|
*/
|
|
@@ -2128,6 +2147,14 @@ declare namespace LocalJSX {
|
|
|
2128
2147
|
* The items to filter.
|
|
2129
2148
|
*/
|
|
2130
2149
|
"items"?: FilterItem[];
|
|
2150
|
+
/**
|
|
2151
|
+
* Controls whether the filter panel automatically hides/shows based on window size. - 'auto': Automatically hide/show based on window width - 'manual': User controls visibility manually
|
|
2152
|
+
*/
|
|
2153
|
+
"responsiveBehavior"?: "auto" | "manual";
|
|
2154
|
+
/**
|
|
2155
|
+
* The breakpoint (in pixels) below which the filter panel will be hidden. Defaults to 768px (--sc-breakpoint-md).
|
|
2156
|
+
*/
|
|
2157
|
+
"responsiveBreakpoint"?: number;
|
|
2131
2158
|
/**
|
|
2132
2159
|
* The id of the Searchcraft instance that this component should use.
|
|
2133
2160
|
*/
|
package/dist/components/index.js
CHANGED
|
@@ -1294,6 +1294,7 @@ const initialSearchcraftStateValues = {
|
|
|
1294
1294
|
hotkey: 'k',
|
|
1295
1295
|
hotkeyModifier: 'meta',
|
|
1296
1296
|
facetPathsForIndexFields: {},
|
|
1297
|
+
isFilterPanelVisible: true,
|
|
1297
1298
|
isPopoverVisible: false,
|
|
1298
1299
|
isSearchInProgress: false,
|
|
1299
1300
|
rangeValueForIndexFields: {},
|
|
@@ -1499,6 +1500,9 @@ const createSearchcraftStore = (searchcraftId, initialState = {}) => {
|
|
|
1499
1500
|
shouldCacheResultsForEmptyState: false,
|
|
1500
1501
|
});
|
|
1501
1502
|
},
|
|
1503
|
+
setFilterPanelVisibility: (isVisible) => set({
|
|
1504
|
+
isFilterPanelVisible: isVisible,
|
|
1505
|
+
}),
|
|
1502
1506
|
setPopoverVisibility: (isVisible) => set({
|
|
1503
1507
|
isPopoverVisible: isVisible,
|
|
1504
1508
|
}),
|
|
@@ -1810,7 +1814,7 @@ class SearchcraftCore {
|
|
|
1810
1814
|
}
|
|
1811
1815
|
|
|
1812
1816
|
const name = "@searchcraft/javascript-sdk";
|
|
1813
|
-
const version = "0.
|
|
1817
|
+
const version = "0.13.0";
|
|
1814
1818
|
|
|
1815
1819
|
/**
|
|
1816
1820
|
* @fileoverview entry point for your component library
|