@searchspring/snap-preact-components 0.55.0 → 0.56.1
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/cjs/components/Molecules/Grid/Grid.d.ts +20 -0
- package/dist/cjs/components/Molecules/Grid/Grid.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/Grid/Grid.js +210 -0
- package/dist/cjs/components/Molecules/Grid/index.d.ts +2 -0
- package/dist/cjs/components/Molecules/Grid/index.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/Grid/index.js +17 -0
- package/dist/cjs/components/Molecules/List/List.d.ts +18 -0
- package/dist/cjs/components/Molecules/List/List.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/List/List.js +158 -0
- package/dist/cjs/components/Molecules/List/index.d.ts +2 -0
- package/dist/cjs/components/Molecules/List/index.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/List/index.js +17 -0
- package/dist/cjs/components/Molecules/Swatches/Swatches.d.ts +19 -0
- package/dist/cjs/components/Molecules/Swatches/Swatches.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/Swatches/Swatches.js +168 -0
- package/dist/cjs/components/Molecules/Swatches/index.d.ts +2 -0
- package/dist/cjs/components/Molecules/Swatches/index.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/Swatches/index.js +17 -0
- package/dist/cjs/components/Molecules/VariantSelection/VariantSelection.d.ts +9 -0
- package/dist/cjs/components/Molecules/VariantSelection/VariantSelection.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/VariantSelection/VariantSelection.js +146 -0
- package/dist/cjs/components/Molecules/VariantSelection/index.d.ts +2 -0
- package/dist/cjs/components/Molecules/VariantSelection/index.d.ts.map +1 -0
- package/dist/cjs/components/Molecules/VariantSelection/index.js +17 -0
- package/dist/cjs/index.d.ts +5 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +5 -1
- package/dist/cjs/types.d.ts +15 -0
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/utilities/snapify.d.ts.map +1 -1
- package/dist/cjs/utilities/snapify.js +3 -0
- package/dist/esm/components/Molecules/Grid/Grid.d.ts +20 -0
- package/dist/esm/components/Molecules/Grid/Grid.d.ts.map +1 -0
- package/dist/esm/components/Molecules/Grid/Grid.js +189 -0
- package/dist/esm/components/Molecules/Grid/index.d.ts +2 -0
- package/dist/esm/components/Molecules/Grid/index.d.ts.map +1 -0
- package/dist/esm/components/Molecules/Grid/index.js +1 -0
- package/dist/esm/components/Molecules/List/List.d.ts +18 -0
- package/dist/esm/components/Molecules/List/List.d.ts.map +1 -0
- package/dist/esm/components/Molecules/List/List.js +140 -0
- package/dist/esm/components/Molecules/List/index.d.ts +2 -0
- package/dist/esm/components/Molecules/List/index.d.ts.map +1 -0
- package/dist/esm/components/Molecules/List/index.js +1 -0
- package/dist/esm/components/Molecules/Swatches/Swatches.d.ts +19 -0
- package/dist/esm/components/Molecules/Swatches/Swatches.d.ts.map +1 -0
- package/dist/esm/components/Molecules/Swatches/Swatches.js +179 -0
- package/dist/esm/components/Molecules/Swatches/index.d.ts +2 -0
- package/dist/esm/components/Molecules/Swatches/index.d.ts.map +1 -0
- package/dist/esm/components/Molecules/Swatches/index.js +1 -0
- package/dist/esm/components/Molecules/VariantSelection/VariantSelection.d.ts +9 -0
- package/dist/esm/components/Molecules/VariantSelection/VariantSelection.d.ts.map +1 -0
- package/dist/esm/components/Molecules/VariantSelection/VariantSelection.js +167 -0
- package/dist/esm/components/Molecules/VariantSelection/index.d.ts +2 -0
- package/dist/esm/components/Molecules/VariantSelection/index.d.ts.map +1 -0
- package/dist/esm/components/Molecules/VariantSelection/index.js +1 -0
- package/dist/esm/index.d.ts +5 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +5 -1
- package/dist/esm/types.d.ts +15 -0
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/utilities/snapify.d.ts.map +1 -1
- package/dist/esm/utilities/snapify.js +3 -0
- package/package.json +12 -11
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { Fragment } from 'preact';
|
|
3
|
+
import { observer } from 'mobx-react';
|
|
4
|
+
import { jsx, css } from '@emotion/react';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import { useTheme, CacheProvider } from '../../../providers';
|
|
7
|
+
import { defined } from '../../../utilities';
|
|
8
|
+
import { List } from '../List';
|
|
9
|
+
import { Swatches } from '../Swatches';
|
|
10
|
+
import { Dropdown } from '../../Atoms/Dropdown';
|
|
11
|
+
import { Icon } from '../../Atoms/Icon';
|
|
12
|
+
const CSS = {
|
|
13
|
+
variantSelection: () => css({
|
|
14
|
+
'.ss__variant-selection__dropdown': {
|
|
15
|
+
'.ss__dropdown__button': {
|
|
16
|
+
width: '100%',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'space-between',
|
|
20
|
+
'.ss__dropdown__button-wrapper': {
|
|
21
|
+
display: 'flex',
|
|
22
|
+
gap: '5px',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
'.ss__dropdown__content': {
|
|
26
|
+
minWidth: 'auto',
|
|
27
|
+
left: '0',
|
|
28
|
+
right: '0',
|
|
29
|
+
'.ss__variant-selection__option': {
|
|
30
|
+
cursor: 'pointer',
|
|
31
|
+
position: 'relative',
|
|
32
|
+
},
|
|
33
|
+
'.ss__variant-selection__option:hover': {
|
|
34
|
+
fontWeight: 'bold',
|
|
35
|
+
},
|
|
36
|
+
'.ss__variant-selection__option--selected': {
|
|
37
|
+
fontWeight: 'bold',
|
|
38
|
+
},
|
|
39
|
+
'.ss__variant-selection__option--disabled': {
|
|
40
|
+
pointerEvents: 'none',
|
|
41
|
+
cursor: 'initial',
|
|
42
|
+
},
|
|
43
|
+
'.ss__variant-selection__option--disabled, .ss__variant-selection__option--unavailable': {
|
|
44
|
+
textDecoration: 'line-through',
|
|
45
|
+
opacity: 0.5,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
}),
|
|
50
|
+
};
|
|
51
|
+
export const VariantSelection = observer((properties) => {
|
|
52
|
+
const globalTheme = useTheme();
|
|
53
|
+
const props = {
|
|
54
|
+
// default props
|
|
55
|
+
type: 'dropdown',
|
|
56
|
+
// global theme
|
|
57
|
+
...globalTheme?.components?.variantSelection,
|
|
58
|
+
// props
|
|
59
|
+
...properties,
|
|
60
|
+
...properties.theme?.components?.variantSelection,
|
|
61
|
+
};
|
|
62
|
+
const { type, selection, disableStyles, className, style } = props;
|
|
63
|
+
const subProps = {
|
|
64
|
+
dropdown: {
|
|
65
|
+
name: `ss__variant-selection__dropdown--${selection.field}`,
|
|
66
|
+
className: 'ss__variant-selection__dropdown',
|
|
67
|
+
label: selection.label || selection.field,
|
|
68
|
+
// global theme
|
|
69
|
+
...globalTheme?.components?.dropdown,
|
|
70
|
+
// inherited props
|
|
71
|
+
...defined({
|
|
72
|
+
disableStyles,
|
|
73
|
+
}),
|
|
74
|
+
// component theme overrides
|
|
75
|
+
theme: props?.theme,
|
|
76
|
+
},
|
|
77
|
+
icon: {
|
|
78
|
+
// default props
|
|
79
|
+
name: `ss__variant-selection__icon--${selection.field}`,
|
|
80
|
+
className: 'ss__variant-selection__icon',
|
|
81
|
+
size: '12px',
|
|
82
|
+
// global theme
|
|
83
|
+
...globalTheme?.components?.icon,
|
|
84
|
+
// inherited props
|
|
85
|
+
...defined({
|
|
86
|
+
disableStyles,
|
|
87
|
+
}),
|
|
88
|
+
// component theme overrides
|
|
89
|
+
theme: props?.theme,
|
|
90
|
+
},
|
|
91
|
+
list: {
|
|
92
|
+
name: `ss__variant-selection__list--${selection.field}`,
|
|
93
|
+
titleText: selection.field,
|
|
94
|
+
className: 'ss__variant-selection__list',
|
|
95
|
+
multiSelect: false,
|
|
96
|
+
hideOptionCheckboxes: true,
|
|
97
|
+
onSelect: (e, option) => selection.select(option.value),
|
|
98
|
+
selected: selection.selected,
|
|
99
|
+
// global theme
|
|
100
|
+
...globalTheme?.components?.list,
|
|
101
|
+
// inherited props
|
|
102
|
+
...defined({
|
|
103
|
+
disableStyles,
|
|
104
|
+
}),
|
|
105
|
+
// component theme overrides
|
|
106
|
+
theme: props?.theme,
|
|
107
|
+
},
|
|
108
|
+
swatches: {
|
|
109
|
+
name: `ss__variant-selection__swatches--${selection.field}`,
|
|
110
|
+
className: 'ss__variant-selection__swatches',
|
|
111
|
+
onSelect: (e, option) => selection.select(option.value),
|
|
112
|
+
selected: selection.selected,
|
|
113
|
+
// global theme
|
|
114
|
+
...globalTheme?.components?.swatches,
|
|
115
|
+
// inherited props
|
|
116
|
+
...defined({
|
|
117
|
+
disableStyles,
|
|
118
|
+
}),
|
|
119
|
+
// component theme overrides
|
|
120
|
+
theme: props?.theme,
|
|
121
|
+
},
|
|
122
|
+
};
|
|
123
|
+
const styling = {};
|
|
124
|
+
if (!disableStyles) {
|
|
125
|
+
styling.css = [CSS.variantSelection(), style];
|
|
126
|
+
}
|
|
127
|
+
else if (style) {
|
|
128
|
+
styling.css = [style];
|
|
129
|
+
}
|
|
130
|
+
return selection.values.length ? (jsx(CacheProvider, null,
|
|
131
|
+
jsx("div", { ...styling, className: classnames('ss__variant-selection', `ss__variant-selection--${type}`, `ss__variant-selection--${selection.field}`, className) }, (() => {
|
|
132
|
+
switch (type) {
|
|
133
|
+
case 'dropdown':
|
|
134
|
+
return (jsx(Fragment, null, (() => {
|
|
135
|
+
//todo prettify the button
|
|
136
|
+
const Button = (props) => {
|
|
137
|
+
const { open } = props;
|
|
138
|
+
return (jsx(Fragment, null,
|
|
139
|
+
jsx("div", { className: "ss__dropdown__button-wrapper" },
|
|
140
|
+
jsx("span", { className: "ss__dropdown__button-wrapper__label" }, selection.label),
|
|
141
|
+
selection.selected ? (jsx("span", { className: "ss__dropdown__button-wrapper__selection" },
|
|
142
|
+
"(",
|
|
143
|
+
selection.selected.value,
|
|
144
|
+
")")) : (jsx(Fragment, null))),
|
|
145
|
+
jsx(Icon, { icon: open ? 'angle-up' : 'angle-down', ...subProps.icon })));
|
|
146
|
+
};
|
|
147
|
+
return (jsx(Dropdown, { button: jsx(Button, null), ...subProps.dropdown },
|
|
148
|
+
jsx("div", { className: "ss__variant-selection__options" }, selection.values.map((val) => {
|
|
149
|
+
const selected = selection.selected?.value == val.value;
|
|
150
|
+
return (jsx("div", { className: classnames(`ss__variant-selection__option`, {
|
|
151
|
+
'ss__variant-selection__option--selected': selected,
|
|
152
|
+
'ss__variant-selection__option--disabled': val.disabled,
|
|
153
|
+
'ss__variant-selection__option--unavailable': val.available === false,
|
|
154
|
+
}), onClick: () => !val.disabled && selection.select(val.value) }, val.label));
|
|
155
|
+
}))));
|
|
156
|
+
})()));
|
|
157
|
+
case 'list':
|
|
158
|
+
return (jsx(Fragment, null, (() => {
|
|
159
|
+
return jsx(List, { ...subProps.list, options: selection.values });
|
|
160
|
+
})()));
|
|
161
|
+
case 'swatches':
|
|
162
|
+
return (jsx(Fragment, null, (() => {
|
|
163
|
+
return jsx(Swatches, { ...subProps.swatches, options: selection.values });
|
|
164
|
+
})()));
|
|
165
|
+
}
|
|
166
|
+
})()))) : (jsx(Fragment, null));
|
|
167
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/Molecules/VariantSelection/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './VariantSelection';
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -23,13 +23,17 @@ export * from './components/Molecules/FacetGridOptions';
|
|
|
23
23
|
export * from './components/Molecules/FacetHierarchyOptions';
|
|
24
24
|
export * from './components/Molecules/FacetListOptions';
|
|
25
25
|
export * from './components/Molecules/FacetPaletteOptions';
|
|
26
|
+
export * from './components/Molecules/FacetSlider';
|
|
26
27
|
export * from './components/Molecules/Filter';
|
|
28
|
+
export * from './components/Molecules/Grid';
|
|
29
|
+
export * from './components/Molecules/List';
|
|
27
30
|
export * from './components/Molecules/OverlayBadge';
|
|
28
31
|
export * from './components/Molecules/Pagination';
|
|
29
32
|
export * from './components/Molecules/Result';
|
|
30
33
|
export * from './components/Molecules/Select';
|
|
31
34
|
export * from './components/Molecules/Slideout';
|
|
32
|
-
export * from './components/Molecules/
|
|
35
|
+
export * from './components/Molecules/Swatches';
|
|
36
|
+
export * from './components/Molecules/VariantSelection';
|
|
33
37
|
export * from './components/Organisms/Autocomplete';
|
|
34
38
|
export * from './components/Organisms/BranchOverride';
|
|
35
39
|
export * from './components/Organisms/Facet';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mCAAmC,CAAC;AAClD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oCAAoC,CAAC;AACnD,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oDAAoD,CAAC;AACnE,cAAc,qDAAqD,CAAC;AAGpE,cAAc,qCAAqC,CAAC;AACpD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,8CAA8C,CAAC;AAC7D,cAAc,yCAAyC,CAAC;AACxD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,+BAA+B,CAAC;AAC9C,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uC,CAAC;AACtD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,sCAAsC,CAAC;AACrD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,gCAAgC,CAAC;AAG/C,cAAc,SAAS,CAAC;AAGxB,cAAc,aAAa,CAAC;AAG5B,cAAc,WAAW,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -25,13 +25,17 @@ export * from './components/Molecules/FacetGridOptions';
|
|
|
25
25
|
export * from './components/Molecules/FacetHierarchyOptions';
|
|
26
26
|
export * from './components/Molecules/FacetListOptions';
|
|
27
27
|
export * from './components/Molecules/FacetPaletteOptions';
|
|
28
|
+
export * from './components/Molecules/FacetSlider';
|
|
28
29
|
export * from './components/Molecules/Filter';
|
|
30
|
+
export * from './components/Molecules/Grid';
|
|
31
|
+
export * from './components/Molecules/List';
|
|
29
32
|
export * from './components/Molecules/OverlayBadge';
|
|
30
33
|
export * from './components/Molecules/Pagination';
|
|
31
34
|
export * from './components/Molecules/Result';
|
|
32
35
|
export * from './components/Molecules/Select';
|
|
33
36
|
export * from './components/Molecules/Slideout';
|
|
34
|
-
export * from './components/Molecules/
|
|
37
|
+
export * from './components/Molecules/Swatches';
|
|
38
|
+
export * from './components/Molecules/VariantSelection';
|
|
35
39
|
// ORGANISMS
|
|
36
40
|
export * from './components/Organisms/Autocomplete';
|
|
37
41
|
export * from './components/Organisms/BranchOverride';
|
package/dist/esm/types.d.ts
CHANGED
|
@@ -2,12 +2,27 @@
|
|
|
2
2
|
import { FunctionalComponent, RenderableProps } from 'preact';
|
|
3
3
|
import { SerializedStyles } from '@emotion/react';
|
|
4
4
|
import { Theme } from './providers/theme';
|
|
5
|
+
import { IconProps } from './components/Atoms/Icon';
|
|
6
|
+
import type { UrlManager } from '@searchspring/snap-url-manager';
|
|
5
7
|
export interface ComponentProps extends RenderableProps<any> {
|
|
6
8
|
className?: string;
|
|
7
9
|
disableStyles?: boolean;
|
|
8
10
|
style?: string | Record<string, any>;
|
|
9
11
|
theme?: Theme;
|
|
10
12
|
}
|
|
13
|
+
export type ListOption = {
|
|
14
|
+
value: string | number;
|
|
15
|
+
label?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
available?: boolean;
|
|
18
|
+
default?: boolean;
|
|
19
|
+
icon?: string | Partial<IconProps>;
|
|
20
|
+
url?: UrlManager;
|
|
21
|
+
};
|
|
22
|
+
export type SwatchOption = ListOption & {
|
|
23
|
+
backgroundImageUrl?: string;
|
|
24
|
+
background?: string;
|
|
25
|
+
};
|
|
11
26
|
export type ComponentMap = {
|
|
12
27
|
[key: string]: (args?: any) => FunctionalComponent<RenderableProps<any>> | Promise<(args?: any) => React.ReactElement>;
|
|
13
28
|
};
|
package/dist/esm/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAEjE,MAAM,WAAW,cAAe,SAAQ,eAAe,CAAC,GAAG,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa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AE,MAAM,GAAG,gBAAgB,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snapify.d.ts","sourceRoot":"","sources":["../../../src/utilities/snapify.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"snapify.d.ts","sourceRoot":"","sources":["../../../src/utilities/snapify.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAUnH,OAAO,KAAK,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,8BAA8B,EAAE,MAAM,+BAA+B,CAAC;AAqB1I,qBAAa,OAAO;IACnB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,8BAA8B,GAAG,wBAAwB;IAkBvF,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,4BAA4B,GAAG,sBAAsB;IAmBjF,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,sBAAsB,GAAG,gBAAgB;CAkB/D"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { configure as configureMobx } from 'mobx';
|
|
1
2
|
import { SearchController, AutocompleteController, RecommendationController } from '@searchspring/snap-controller';
|
|
2
3
|
import { Client } from '@searchspring/snap-client';
|
|
3
4
|
import { SearchStore, AutocompleteStore, RecommendationStore } from '@searchspring/snap-store-mobx';
|
|
@@ -6,6 +7,8 @@ import { EventManager } from '@searchspring/snap-event-manager';
|
|
|
6
7
|
import { Profiler } from '@searchspring/snap-profiler';
|
|
7
8
|
import { Logger } from '@searchspring/snap-logger';
|
|
8
9
|
import { Tracker } from '@searchspring/snap-tracker';
|
|
10
|
+
// configure MobX
|
|
11
|
+
configureMobx({ useProxies: 'never', isolateGlobalState: true, enforceActions: 'never' });
|
|
9
12
|
const controllers = {};
|
|
10
13
|
const client = {
|
|
11
14
|
globals: { siteId: '8uyt2m' },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@searchspring/snap-preact-components",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.56.1",
|
|
4
4
|
"description": "Snap Preact Component Library",
|
|
5
5
|
"author": "Searchspring",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@cypress/react": "^8.0.0",
|
|
31
31
|
"@emotion/react": "11.9.0",
|
|
32
|
-
"@searchspring/snap-toolbox": "^0.
|
|
32
|
+
"@searchspring/snap-toolbox": "^0.56.1",
|
|
33
33
|
"classnames": "^2.3.2",
|
|
34
34
|
"cypress": "^12.15.0",
|
|
35
35
|
"cypress-wait-until": "^1.7.2",
|
|
@@ -52,14 +52,14 @@
|
|
|
52
52
|
"@babel/preset-env": "^7.21.4",
|
|
53
53
|
"@babel/preset-react": "^7.18.6",
|
|
54
54
|
"@babel/runtime": "^7.21.0",
|
|
55
|
-
"@searchspring/snap-client": "^0.
|
|
56
|
-
"@searchspring/snap-controller": "^0.
|
|
57
|
-
"@searchspring/snap-event-manager": "^0.
|
|
58
|
-
"@searchspring/snap-logger": "^0.
|
|
59
|
-
"@searchspring/snap-profiler": "^0.
|
|
60
|
-
"@searchspring/snap-store-mobx": "^0.
|
|
61
|
-
"@searchspring/snap-tracker": "^0.
|
|
62
|
-
"@searchspring/snap-url-manager": "^0.
|
|
55
|
+
"@searchspring/snap-client": "^0.56.1",
|
|
56
|
+
"@searchspring/snap-controller": "^0.56.1",
|
|
57
|
+
"@searchspring/snap-event-manager": "^0.56.1",
|
|
58
|
+
"@searchspring/snap-logger": "^0.56.1",
|
|
59
|
+
"@searchspring/snap-profiler": "^0.56.1",
|
|
60
|
+
"@searchspring/snap-store-mobx": "^0.56.1",
|
|
61
|
+
"@searchspring/snap-tracker": "^0.56.1",
|
|
62
|
+
"@searchspring/snap-url-manager": "^0.56.1",
|
|
63
63
|
"@storybook/addon-actions": "6.4.22",
|
|
64
64
|
"@storybook/addon-controls": "6.4.22",
|
|
65
65
|
"@storybook/addon-docs": "6.4.22",
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"@testing-library/user-event": "13.5.0",
|
|
74
74
|
"@types/react": "16.14.28",
|
|
75
75
|
"@types/react-ranger": "2.0.1",
|
|
76
|
+
"@types/scheduler": "0.16.8",
|
|
76
77
|
"babel-jest": "^29.7.0",
|
|
77
78
|
"preact": "10.9.0",
|
|
78
79
|
"react": "16.14.0",
|
|
@@ -83,5 +84,5 @@
|
|
|
83
84
|
"webpack-merge": "^5.8.0"
|
|
84
85
|
},
|
|
85
86
|
"sideEffects": false,
|
|
86
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "119ff8b630ca483a18806dadb866e7251b9dac23"
|
|
87
88
|
}
|