@depict-ai/react-ui 0.0.1 → 0.0.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.
- package/dist/main.js +1 -0
- package/dist/module.js +1 -1
- package/dist-server/main.js +1 -0
- package/dist-server/module.js +1 -1
- package/package.json +2 -2
package/dist/main.js
CHANGED
|
@@ -110,6 +110,7 @@ let $6abe21f0d440de7c$var$controls;
|
|
|
110
110
|
let $6abe21f0d440de7c$var$active_render_card;
|
|
111
111
|
const $6abe21f0d440de7c$var$wrapped_render_card = (d)=>$6abe21f0d440de7c$var$active_render_card(d);
|
|
112
112
|
function $6abe21f0d440de7c$export$9fac37a9c21c2f3b(opts) {
|
|
113
|
+
console.log("DEPICTPROVIDER CLIENT");
|
|
113
114
|
if (!$6abe21f0d440de7c$var$search) {
|
|
114
115
|
const init = (0, $ed09819de7bb86d1$export$99ae278b8f3607a0)({
|
|
115
116
|
merchant: opts.merchant,
|
package/dist/module.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createPortal as e}from"react-dom";import{ReactToSolidBridge as a,ReactToSolidBridgeProvider as r}from"@depict-ai/react-solid-bridge";import{UniversalInstantCard as t,SolidCardContainer as o,DepictAPI as s,Search as n,DefaultInstantCardPlaceholder as i,swedish_search_translation as c}from"@depict-ai/ui";import{useState as _,useEffect as d,createElement as p}from"react";import{jsx as l}from"react/jsx-runtime";import{createSignal as m,createMemo as h}from"solid-js";import{GenericSliderArrowButton as u}from"@depict-ai/utilishared";const f=e=>{const a="/search",r=e=>e.pathname==a,t=new s,o=new n({depict_api_:t,page_replacer_ref_:()=>{},url_transformer_:e=>{e.pathname=a},alternative_query_submitter_for_spas_:(e,t,o)=>{const s=new URL(location.href),n=r(s);s.searchParams.set(e,t),o?.(s),window.next.router.push({pathname:a,query:{[e]:t}},s.pathname+s.search+s.hash,{shallow:n,scroll:!0})},modal_options_:{render_instant_card_:e.instantCardFactory,render_instant_card_placeholder_:i,disable_scrolling_:!1},search_page_:{get_product_id_:()=>"",search_query_param_name_:"q",is_search_page_:r,include_input_field_:!0,make_category_suggestion_card_:!1,slider_arrow_button_:u({height_:12,width_:6.46}),page_title_:"Search page",layout_options_:{cols_at_size:[[4,"1024px"],[3,"901px","1023px"],[2,"","900px"]],grid_spacing:"10px"},rr_options_:{template:e.productCardFactory}}});return o.tenant_=e.merchant,o.market_=e.market,o.locale_={...c,price_formatting_:{pre_:"€ ",post_:"",decimal_places_delimiter_:",",thousands_delimiter_:" ",places_after_comma_:2}},{search:o,controls:o.boot_()}};let g,y,
|
|
1
|
+
import{createPortal as e}from"react-dom";import{ReactToSolidBridge as a,ReactToSolidBridgeProvider as r}from"@depict-ai/react-solid-bridge";import{UniversalInstantCard as t,SolidCardContainer as o,DepictAPI as s,Search as n,DefaultInstantCardPlaceholder as i,swedish_search_translation as c}from"@depict-ai/ui";import{useState as _,useEffect as d,createElement as p}from"react";import{jsx as l}from"react/jsx-runtime";import{createSignal as m,createMemo as h}from"solid-js";import{GenericSliderArrowButton as u}from"@depict-ai/utilishared";const f=e=>{const a="/search",r=e=>e.pathname==a,t=new s,o=new n({depict_api_:t,page_replacer_ref_:()=>{},url_transformer_:e=>{e.pathname=a},alternative_query_submitter_for_spas_:(e,t,o)=>{const s=new URL(location.href),n=r(s);s.searchParams.set(e,t),o?.(s),window.next.router.push({pathname:a,query:{[e]:t}},s.pathname+s.search+s.hash,{shallow:n,scroll:!0})},modal_options_:{render_instant_card_:e.instantCardFactory,render_instant_card_placeholder_:i,disable_scrolling_:!1},search_page_:{get_product_id_:()=>"",search_query_param_name_:"q",is_search_page_:r,include_input_field_:!0,make_category_suggestion_card_:!1,slider_arrow_button_:u({height_:12,width_:6.46}),page_title_:"Search page",layout_options_:{cols_at_size:[[4,"1024px"],[3,"901px","1023px"],[2,"","900px"]],grid_spacing:"10px"},rr_options_:{template:e.productCardFactory}}});return o.tenant_=e.merchant,o.market_=e.market,o.locale_={...c,price_formatting_:{pre_:"€ ",post_:"",decimal_places_delimiter_:",",thousands_delimiter_:" ",places_after_comma_:2}},{search:o,controls:o.boot_()}};let g,y,C;const w=e=>C(e);function x(e){if(console.log("DEPICTPROVIDER CLIENT"),!g){const a=f({merchant:e.merchant,market:e.market,productCardFactory:w,instantCardFactory:t});g=a.search,y=a.controls}}function P(r){const[t,s]=_(null),[n,i]=_([]);return d((()=>{const t=[];C=a=>{const s=o(),n=r.productCardFactory(a),c=e(n,s.ref);return t.push(c),i([...t]),[s.el]};const n=g.render_,c=l(a,{solidComponent:()=>n,key:Math.random()});s(c)}),[]),t?p("div",{},[t,...n]):""}function S(e){return l(r,{children:l(P,e)})}function k(){y?y.then((e=>{const a=m({position:"fixed",top:0}),r=h((()=>({in_header:!0})));e.open_modal_({style_props_:a,class_list_:r})})):console.error("No active search header component on the page!")}export{x as DepictProvider,S as DepictSearchPage,k as openModal};
|
package/dist-server/main.js
CHANGED
|
@@ -11,6 +11,7 @@ $parcel$export(module.exports, "openModal", () => $5767ac9f6fd2be28$export$a7f6c
|
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
function $5767ac9f6fd2be28$export$9fac37a9c21c2f3b(props) {
|
|
14
|
+
console.log("DEPICTPROVIDER SERVER");
|
|
14
15
|
return (0, $4yCyN$reactjsxruntime.jsx)((0, $4yCyN$depictaireactsolidbridge.ReactToSolidBridgeProvider), {
|
|
15
16
|
children: props.children
|
|
16
17
|
});
|
package/dist-server/module.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ReactToSolidBridgeProvider as r}from"@depict-ai/react-solid-bridge";import{jsx as e}from"react/jsx-runtime";function i(i){return e(r,{children:i.children})}function o(){return e(i,{children:""})}function t(){}export{i as DepictProvider,o as DepictSearchPage,t as openModal};
|
|
1
|
+
import{ReactToSolidBridgeProvider as r}from"@depict-ai/react-solid-bridge";import{jsx as e}from"react/jsx-runtime";function i(i){return console.log("DEPICTPROVIDER SERVER"),e(r,{children:i.children})}function o(){return e(i,{children:""})}function t(){}export{i as DepictProvider,o as DepictSearchPage,t as openModal};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depict-ai/react-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"packageManager": "yarn@3.2.2",
|
|
5
5
|
"source": "src/main.ts",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"/dist-server"
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@depict-ai/react-solid-bridge": "^1.0.
|
|
50
|
+
"@depict-ai/react-solid-bridge": "^1.0.26",
|
|
51
51
|
"@depict-ai/ui": "^0.0.0",
|
|
52
52
|
"@depict-ai/utilishared": "^0.0.0",
|
|
53
53
|
"react": "^18.2.0",
|