@fast-simon/dashboard-utilities 1.0.22 → 1.0.24
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/{lib/main.d.ts → dist/index.d.ts} +1 -2
- package/{lib/main.js → dist/index.js} +1 -1
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -0
- package/dist/main.js.map +1 -0
- package/{lib → dist}/services/landingPage.d.ts +1 -1
- package/{lib → dist}/services/landingPage.js +3 -69
- package/dist/services/landingPage.js.map +1 -0
- package/package.json +12 -17
- package/lib/icons/index.d.ts +0 -9
- package/lib/icons/index.js +0 -10
- package/lib/icons/index.js.map +0 -1
- package/lib/main.js.map +0 -1
- package/lib/services/landingPage.js.map +0 -1
- package/lib/utils/products.d.ts +0 -30
- package/lib/utils/products.js +0 -39
- package/lib/utils/products.js.map +0 -1
- package/lib/utils/shopifyMarkets.d.ts +0 -3
- package/lib/utils/shopifyMarkets.js +0 -7
- package/lib/utils/shopifyMarkets.js.map +0 -1
- /package/{lib → dist}/@types/banner.d.ts +0 -0
- /package/{lib → dist}/@types/banner.js +0 -0
- /package/{lib → dist}/@types/banner.js.map +0 -0
- /package/{lib → dist}/@types/categories.d.ts +0 -0
- /package/{lib → dist}/@types/categories.js +0 -0
- /package/{lib → dist}/@types/categories.js.map +0 -0
- /package/{lib → dist}/@types/currency.d.ts +0 -0
- /package/{lib → dist}/@types/currency.js +0 -0
- /package/{lib → dist}/@types/currency.js.map +0 -0
- /package/{lib → dist}/@types/editorProduct.d.ts +0 -0
- /package/{lib → dist}/@types/editorProduct.js +0 -0
- /package/{lib → dist}/@types/editorProduct.js.map +0 -0
- /package/{lib → dist}/@types/iconProps.d.ts +0 -0
- /package/{lib → dist}/@types/iconProps.js +0 -0
- /package/{lib → dist}/@types/iconProps.js.map +0 -0
- /package/{lib → dist}/@types/product.d.ts +0 -0
- /package/{lib → dist}/@types/product.js +0 -0
- /package/{lib → dist}/@types/product.js.map +0 -0
- /package/{lib → dist}/@types/productLabel.d.ts +0 -0
- /package/{lib → dist}/@types/productLabel.js +0 -0
- /package/{lib → dist}/@types/productLabel.js.map +0 -0
- /package/{lib → dist}/@types/promoTile.d.ts +0 -0
- /package/{lib → dist}/@types/promoTile.js +0 -0
- /package/{lib → dist}/@types/promoTile.js.map +0 -0
- /package/{lib → dist}/@types/results.d.ts +0 -0
- /package/{lib → dist}/@types/results.js +0 -0
- /package/{lib → dist}/@types/results.js.map +0 -0
- /package/{lib → dist}/@types/sideMenu.d.ts +0 -0
- /package/{lib → dist}/@types/sideMenu.js +0 -0
- /package/{lib → dist}/@types/sideMenu.js.map +0 -0
- /package/{lib → dist}/@types/sortBy.d.ts +0 -0
- /package/{lib → dist}/@types/sortBy.js +0 -0
- /package/{lib → dist}/@types/sortBy.js.map +0 -0
- /package/{lib → dist}/App.d.ts +0 -0
- /package/{lib → dist}/App.js +0 -0
- /package/{lib → dist}/App.js.map +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/BackOfficeFiltersMenu.d.ts +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/BackOfficeFiltersMenu.js +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/BackOfficeFiltersMenu.js.map +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/index.d.ts +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/index.js +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/index.js.map +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/styles.module.css +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/utils.d.ts +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/utils.js +0 -0
- /package/{lib → dist}/components/BackOfficeFiltersMenu/utils.js.map +0 -0
- /package/{lib → dist}/components/CheckboxFilter/Checkbox/Checkbox.d.ts +0 -0
- /package/{lib → dist}/components/CheckboxFilter/Checkbox/Checkbox.js +0 -0
- /package/{lib → dist}/components/CheckboxFilter/Checkbox/Checkbox.js.map +0 -0
- /package/{lib → dist}/components/CheckboxFilter/Checkbox/styles.module.css +0 -0
- /package/{lib → dist}/components/CheckboxFilter/CheckboxFilter.d.ts +0 -0
- /package/{lib → dist}/components/CheckboxFilter/CheckboxFilter.js +0 -0
- /package/{lib → dist}/components/CheckboxFilter/CheckboxFilter.js.map +0 -0
- /package/{lib → dist}/components/CheckboxFilter/styles.module.css +0 -0
- /package/{lib → dist}/components/DragAndDrop/DndContextWrapper.d.ts +0 -0
- /package/{lib → dist}/components/DragAndDrop/DndContextWrapper.js +0 -0
- /package/{lib → dist}/components/DragAndDrop/DndContextWrapper.js.map +0 -0
- /package/{lib → dist}/components/DragAndDrop/Droppable.d.ts +0 -0
- /package/{lib → dist}/components/DragAndDrop/Droppable.js +0 -0
- /package/{lib → dist}/components/DragAndDrop/Droppable.js.map +0 -0
- /package/{lib → dist}/components/DragAndDrop/SortableItem.d.ts +0 -0
- /package/{lib → dist}/components/DragAndDrop/SortableItem.js +0 -0
- /package/{lib → dist}/components/DragAndDrop/SortableItem.js.map +0 -0
- /package/{lib → dist}/components/DragAndDrop/styles.module.css +0 -0
- /package/{lib → dist}/components/FacetItem/FacetItem.d.ts +0 -0
- /package/{lib → dist}/components/FacetItem/FacetItem.js +0 -0
- /package/{lib → dist}/components/FacetItem/FacetItem.js.map +0 -0
- /package/{lib → dist}/components/FacetItem/styles.module.css +0 -0
- /package/{lib → dist}/components/FastSimonApi/FastSimonApi.d.ts +0 -0
- /package/{lib → dist}/components/FastSimonApi/FastSimonApi.js +0 -0
- /package/{lib → dist}/components/FastSimonApi/FastSimonApi.js.map +0 -0
- /package/{lib → dist}/components/FastSimonApi/context.d.ts +0 -0
- /package/{lib → dist}/components/FastSimonApi/context.js +0 -0
- /package/{lib → dist}/components/FastSimonApi/context.js.map +0 -0
- /package/{lib → dist}/components/FastSimonApi/index.d.ts +0 -0
- /package/{lib → dist}/components/FastSimonApi/index.js +0 -0
- /package/{lib → dist}/components/FastSimonApi/index.js.map +0 -0
- /package/{lib → dist}/components/FastSimonApi/reducer.d.ts +0 -0
- /package/{lib → dist}/components/FastSimonApi/reducer.js +0 -0
- /package/{lib → dist}/components/FastSimonApi/reducer.js.map +0 -0
- /package/{lib → dist}/components/FromToFilter/From/From.d.ts +0 -0
- /package/{lib → dist}/components/FromToFilter/From/From.js +0 -0
- /package/{lib → dist}/components/FromToFilter/From/From.js.map +0 -0
- /package/{lib → dist}/components/FromToFilter/From/styles.module.css +0 -0
- /package/{lib → dist}/components/FromToFilter/FromToFilter.d.ts +0 -0
- /package/{lib → dist}/components/FromToFilter/FromToFilter.js +0 -0
- /package/{lib → dist}/components/FromToFilter/FromToFilter.js.map +0 -0
- /package/{lib → dist}/components/FromToFilter/To/To.d.ts +0 -0
- /package/{lib → dist}/components/FromToFilter/To/To.js +0 -0
- /package/{lib → dist}/components/FromToFilter/To/To.js.map +0 -0
- /package/{lib → dist}/components/FromToFilter/To/styles.module.css +0 -0
- /package/{lib → dist}/components/FromToFilter/styles.module.css +0 -0
- /package/{lib → dist}/components/FromToFilter/utils.d.ts +0 -0
- /package/{lib → dist}/components/FromToFilter/utils.js +0 -0
- /package/{lib → dist}/components/FromToFilter/utils.js.map +0 -0
- /package/{lib → dist}/components/InStoreFiltersMenu/InStoreFiltersMenu.d.ts +0 -0
- /package/{lib → dist}/components/InStoreFiltersMenu/InStoreFiltersMenu.js +0 -0
- /package/{lib → dist}/components/InStoreFiltersMenu/InStoreFiltersMenu.js.map +0 -0
- /package/{lib → dist}/components/InStoreFiltersMenu/index.d.ts +0 -0
- /package/{lib → dist}/components/InStoreFiltersMenu/index.js +0 -0
- /package/{lib → dist}/components/InStoreFiltersMenu/index.js.map +0 -0
- /package/{lib → dist}/components/InStoreFiltersMenu/styles.module.css +0 -0
- /package/{lib → dist}/components/Input/Input.d.ts +0 -0
- /package/{lib → dist}/components/Input/Input.js +0 -0
- /package/{lib → dist}/components/Input/Input.js.map +0 -0
- /package/{lib → dist}/components/Input/index.d.ts +0 -0
- /package/{lib → dist}/components/Input/index.js +0 -0
- /package/{lib → dist}/components/Input/index.js.map +0 -0
- /package/{lib → dist}/components/Input/styles.module.css +0 -0
- /package/{lib → dist}/components/LastReceivedDateFilter/LastReceivedDate.d.ts +0 -0
- /package/{lib → dist}/components/LastReceivedDateFilter/LastReceivedDate.js +0 -0
- /package/{lib → dist}/components/LastReceivedDateFilter/LastReceivedDate.js.map +0 -0
- /package/{lib → dist}/components/LastReceivedDateFilter/styles.module.css +0 -0
- /package/{lib → dist}/components/LastReceivedDateFilter/utils.d.ts +0 -0
- /package/{lib → dist}/components/LastReceivedDateFilter/utils.js +0 -0
- /package/{lib → dist}/components/LastReceivedDateFilter/utils.js.map +0 -0
- /package/{lib → dist}/components/RadioFilter/Radio/Radio.d.ts +0 -0
- /package/{lib → dist}/components/RadioFilter/Radio/Radio.js +0 -0
- /package/{lib → dist}/components/RadioFilter/Radio/Radio.js.map +0 -0
- /package/{lib → dist}/components/RadioFilter/Radio/styles.module.css +0 -0
- /package/{lib → dist}/components/RadioFilter/RadioFilter.d.ts +0 -0
- /package/{lib → dist}/components/RadioFilter/RadioFilter.js +0 -0
- /package/{lib → dist}/components/RadioFilter/RadioFilter.js.map +0 -0
- /package/{lib → dist}/components/RadioFilter/styles.module.css +0 -0
- /package/{lib → dist}/components/RadioFilter/utils.d.ts +0 -0
- /package/{lib → dist}/components/RadioFilter/utils.js +0 -0
- /package/{lib → dist}/components/RadioFilter/utils.js.map +0 -0
- /package/{lib → dist}/components/ReactDatePicker/ReactDatePicker.d.ts +0 -0
- /package/{lib → dist}/components/ReactDatePicker/ReactDatePicker.js +0 -0
- /package/{lib → dist}/components/ReactDatePicker/ReactDatePicker.js.map +0 -0
- /package/{lib → dist}/components/ReactDatePicker/index.d.ts +0 -0
- /package/{lib → dist}/components/ReactDatePicker/index.js +0 -0
- /package/{lib → dist}/components/ReactDatePicker/index.js.map +0 -0
- /package/{lib → dist}/components/ReactDatePicker/styles.module.css +0 -0
- /package/{lib → dist}/components/RenderIfVisible/RenderIfVisible.d.ts +0 -0
- /package/{lib → dist}/components/RenderIfVisible/RenderIfVisible.js +0 -0
- /package/{lib → dist}/components/RenderIfVisible/RenderIfVisible.js.map +0 -0
- /package/{lib → dist}/components/RenderIfVisible/index.d.ts +0 -0
- /package/{lib → dist}/components/RenderIfVisible/index.js +0 -0
- /package/{lib → dist}/components/RenderIfVisible/index.js.map +0 -0
- /package/{lib → dist}/components/SingleFilter/SingleFilter.d.ts +0 -0
- /package/{lib → dist}/components/SingleFilter/SingleFilter.js +0 -0
- /package/{lib → dist}/components/SingleFilter/SingleFilter.js.map +0 -0
- /package/{lib → dist}/components/SingleFilter/styles.module.css +0 -0
- /package/{lib → dist}/components/SingleFilter/utils.d.ts +0 -0
- /package/{lib → dist}/components/SingleFilter/utils.js +0 -0
- /package/{lib → dist}/components/SingleFilter/utils.js.map +0 -0
- /package/{lib → dist}/components/SliderFilter/SliderFilter.d.ts +0 -0
- /package/{lib → dist}/components/SliderFilter/SliderFilter.js +0 -0
- /package/{lib → dist}/components/SliderFilter/SliderFilter.js.map +0 -0
- /package/{lib → dist}/components/SliderFilter/index.d.ts +0 -0
- /package/{lib → dist}/components/SliderFilter/index.js +0 -0
- /package/{lib → dist}/components/SliderFilter/index.js.map +0 -0
- /package/{lib → dist}/components/SliderFilter/styles.module.css +0 -0
- /package/{lib → dist}/components/Tooltip/Tooltip.d.ts +0 -0
- /package/{lib → dist}/components/Tooltip/Tooltip.js +0 -0
- /package/{lib → dist}/components/Tooltip/Tooltip.js.map +0 -0
- /package/{lib → dist}/components/Tooltip/styles.module.css +0 -0
- /package/{lib → dist}/components/common.d.ts +0 -0
- /package/{lib → dist}/components/common.js +0 -0
- /package/{lib → dist}/components/common.js.map +0 -0
- /package/{lib → dist}/components/productGrid/ProductGrid.d.ts +0 -0
- /package/{lib → dist}/components/productGrid/ProductGrid.js +0 -0
- /package/{lib → dist}/components/productGrid/ProductGrid.js.map +0 -0
- /package/{lib → dist}/components/productGrid/index.d.ts +0 -0
- /package/{lib → dist}/components/productGrid/index.js +0 -0
- /package/{lib → dist}/components/productGrid/index.js.map +0 -0
- /package/{lib → dist}/components/productGrid/styles.module.css +0 -0
- /package/{lib → dist}/icons/BackOfficeFiltersIcon.d.ts +0 -0
- /package/{lib → dist}/icons/BackOfficeFiltersIcon.js +0 -0
- /package/{lib → dist}/icons/BackOfficeFiltersIcon.js.map +0 -0
- /package/{lib → dist}/icons/BannersIcon.d.ts +0 -0
- /package/{lib → dist}/icons/BannersIcon.js +0 -0
- /package/{lib → dist}/icons/BannersIcon.js.map +0 -0
- /package/{lib → dist}/icons/GeneralIcon.d.ts +0 -0
- /package/{lib → dist}/icons/GeneralIcon.js +0 -0
- /package/{lib → dist}/icons/GeneralIcon.js.map +0 -0
- /package/{lib → dist}/icons/HelpIcon.d.ts +0 -0
- /package/{lib → dist}/icons/HelpIcon.js +0 -0
- /package/{lib → dist}/icons/HelpIcon.js.map +0 -0
- /package/{lib → dist}/icons/InStoreFiltersIcon.d.ts +0 -0
- /package/{lib → dist}/icons/InStoreFiltersIcon.js +0 -0
- /package/{lib → dist}/icons/InStoreFiltersIcon.js.map +0 -0
- /package/{lib → dist}/icons/PromoteIcon.d.ts +0 -0
- /package/{lib → dist}/icons/PromoteIcon.js +0 -0
- /package/{lib → dist}/icons/PromoteIcon.js.map +0 -0
- /package/{lib → dist}/icons/RemoveIcon.d.ts +0 -0
- /package/{lib → dist}/icons/RemoveIcon.js +0 -0
- /package/{lib → dist}/icons/RemoveIcon.js.map +0 -0
- /package/{lib → dist}/icons/RestoreIcon.d.ts +0 -0
- /package/{lib → dist}/icons/RestoreIcon.js +0 -0
- /package/{lib → dist}/icons/RestoreIcon.js.map +0 -0
- /package/{lib → dist}/icons/styles.module.css +0 -0
- /package/{lib → dist}/services/API.d.ts +0 -0
- /package/{lib → dist}/services/API.js +0 -0
- /package/{lib → dist}/services/API.js.map +0 -0
- /package/{lib → dist}/utils/customTagsFilters.d.ts +0 -0
- /package/{lib → dist}/utils/customTagsFilters.js +0 -0
- /package/{lib → dist}/utils/customTagsFilters.js.map +0 -0
- /package/{lib → dist}/utils/useDragToSelect.d.ts +0 -0
- /package/{lib → dist}/utils/useDragToSelect.js +0 -0
- /package/{lib → dist}/utils/useDragToSelect.js.map +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { MenuItemName } from "./@types/sideMenu";
|
|
2
|
-
import { CustomClasses, SideMenuType, SideMenuItem } from "./@types/sideMenu";
|
|
1
|
+
import { CustomClasses, SideMenuType, SideMenuItem, MenuItemName } from "./@types/sideMenu";
|
|
3
2
|
import { ProductLabelType } from "./@types/productLabel";
|
|
4
3
|
import { videoFormats, Banner } from "./@types/banner";
|
|
5
4
|
import { EditorProduct, isEditorProduct } from "./@types/editorProduct";
|
|
@@ -18,4 +18,4 @@ import RenderIfVisible from "./components/RenderIfVisible";
|
|
|
18
18
|
import { useDragToSelect } from "./utils/useDragToSelect";
|
|
19
19
|
import { LandingPage } from "./services/landingPage";
|
|
20
20
|
export { BackOfficeFiltersMenu, InStoreFiltersMenu, Droppable, DndContextWrapper, SortableItem, ProductGrid, RenderIfVisible, useDragToSelect, LandingPage, BackOfficeFiltersIcon, BannersIcon, HelpIcon, InStoreFiltersIcon, PromoteIcon, RestoreIcon, RemoveIcon, GeneralIcon, videoFormats, isEditorProduct };
|
|
21
|
-
//# sourceMappingURL=
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,YAAY,EAAS,MAAM,iBAAiB,CAAA;AACpD,OAAO,EAAgB,eAAe,EAAC,MAAM,wBAAwB,CAAA;AAGrE,OAAO,EAAC,qBAAqB,EAAC,MAAM,+BAA+B,CAAA;AACnE,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,4BAA4B,CAAA;AAC7D,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAC,WAAW,EAAC,MAAM,qBAAqB,CAAA;AAC/C,OAAO,qBAAqB,MAAM,oCAAoC,CAAA;AACtE,OAAO,kBAAkB,MAAM,iCAAiC,CAAA;AAChE,OAAO,iBAAiB,MAAM,4CAA4C,CAAA;AAC1E,OAAO,SAAS,MAAM,oCAAoC,CAAA;AAC1D,OAAO,EAAC,YAAY,EAAC,MAAM,uCAAuC,CAAA;AAClE,OAAO,WAAW,MAAM,sCAAsC,CAAC;AAC/D,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAerD,OAAO,EACH,qBAAqB,EAAE,kBAAkB,EAAE,SAAS,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EACnH,eAAe,EAAE,WAAW,EAAE,qBAAqB,EAAE,WAAW,EAAE,QAAQ,EAAE,kBAAkB,EAAE,WAAW,EAC3G,WAAW,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EACtE,CAAC","sourcesContent":["import {CustomClasses, SideMenuType, SideMenuItem, MenuItemName} from \"./@types/sideMenu\"\nimport {ProductLabelType} from \"./@types/productLabel\"\nimport {videoFormats, Banner} from \"./@types/banner\"\nimport {EditorProduct, isEditorProduct} from \"./@types/editorProduct\"\nimport {IconProps} from \"./@types/iconProps\"\n\nimport {BackOfficeFiltersIcon} from \"./icons/BackOfficeFiltersIcon\"\nimport {BannersIcon} from \"./icons/BannersIcon\"\nimport {HelpIcon} from \"./icons/HelpIcon\"\nimport {InStoreFiltersIcon} from \"./icons/InStoreFiltersIcon\"\nimport {PromoteIcon} from \"./icons/PromoteIcon\"\nimport {RemoveIcon} from \"./icons/RemoveIcon\"\nimport {RestoreIcon} from \"./icons/RestoreIcon\"\nimport {GeneralIcon} from \"./icons/GeneralIcon\"\nimport BackOfficeFiltersMenu from './components/BackOfficeFiltersMenu'\nimport InStoreFiltersMenu from './components/InStoreFiltersMenu'\nimport DndContextWrapper from './components/DragAndDrop/DndContextWrapper'\nimport Droppable from './components/DragAndDrop/Droppable'\nimport {SortableItem} from './components/DragAndDrop/SortableItem'\nimport ProductGrid from \"./components/productGrid/ProductGrid\";\nimport RenderIfVisible from \"./components/RenderIfVisible\";\nimport {useDragToSelect} from \"./utils/useDragToSelect\";\nimport { LandingPage } from \"./services/landingPage\";\n\n// export * from './components';\n\nexport type {\n MenuItemName,\n CustomClasses,\n SideMenuType,\n SideMenuItem,\n ProductLabelType,\n Banner,\n EditorProduct,\n IconProps\n};\n\nexport {\n BackOfficeFiltersMenu, InStoreFiltersMenu, Droppable, DndContextWrapper, SortableItem, ProductGrid, RenderIfVisible,\n useDragToSelect, LandingPage, BackOfficeFiltersIcon, BannersIcon, HelpIcon, InStoreFiltersIcon, PromoteIcon,\n RestoreIcon, RemoveIcon, GeneralIcon, videoFormats, isEditorProduct\n};"]}
|
package/dist/main.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import ReactDOM from "react-dom";
|
|
4
|
+
import App from "./App";
|
|
5
|
+
ReactDOM.render(_jsx(React.StrictMode, { children: _jsx(App, {}) }), document.getElementById('root'));
|
|
6
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,WAAW,CAAC;AACjC,OAAO,GAAG,MAAM,OAAO,CAAC;AAExB,QAAQ,CAAC,MAAM,CACb,KAAC,KAAK,CAAC,UAAU,cACb,KAAC,GAAG,KAAG,GACQ,EACnB,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC,CAChC,CAAA","sourcesContent":["import React from \"react\";\r\nimport ReactDOM from \"react-dom\";\r\nimport App from \"./App\";\r\n\r\nReactDOM.render(\r\n <React.StrictMode>\r\n <App />\r\n </React.StrictMode>,\r\n document.getElementById('root')\r\n)\r\n"]}
|
|
@@ -22,7 +22,7 @@ export declare const LandingPage: {
|
|
|
22
22
|
data: LandingPageResponse;
|
|
23
23
|
getFacets: () => Promise<import("@fast-simon/utilities").Facet[]>;
|
|
24
24
|
}>;
|
|
25
|
-
landingPageFacetsOnly: ({ uuid, storeID, landingPage, page, narrow, type, productsPerPage, searchWithinResultsQuery, withProductAttributes, visualMerchandising, merchandisingRules
|
|
25
|
+
landingPageFacetsOnly: ({ uuid, storeID, landingPage, page, narrow, type, productsPerPage, searchWithinResultsQuery, withProductAttributes, visualMerchandising, merchandisingRules }: any) => Promise<import("@fast-simon/utilities").Facet[]>;
|
|
26
26
|
};
|
|
27
27
|
export declare const transformFacetsOnlyData: (r: ServerFacet[], avoidTagPrefixes?: string) => import("@fast-simon/utilities").Facet[];
|
|
28
28
|
export {};
|
|
@@ -12,29 +12,7 @@ import { FacetsParser } from "@fast-simon/utilities";
|
|
|
12
12
|
// const BASE_URL = import.meta.env.VITE_SERVING_BASE_URL ?? "https://internal-v3joil6oqa-uc.a.run.app/search";
|
|
13
13
|
const BASE_URL = "https://yslp---internal-v3joil6oqa-uc.a.run.app/search";
|
|
14
14
|
export const LandingPage = {
|
|
15
|
-
landingPage: ({ uuid, storeID, landingPage, page = 1, sortBy = "relevency", facets = true, narrow, productsPerPage, withProductAttributes = undefined, searchWithinResultsQuery, type,
|
|
16
|
-
// const narrowParm = narrow ? new NarrowParser().toServerNarrow(narrow) : undefined;
|
|
17
|
-
//
|
|
18
|
-
// const data = await fastSimonGet<LandingPageServerResponseAll>(BASE_URL, 'landing_page_editor', {
|
|
19
|
-
// UUID: uuid,
|
|
20
|
-
// store_id: storeID,
|
|
21
|
-
// facets_required: facets ? 1 : 0,
|
|
22
|
-
// products_per_page: productsPerPage,
|
|
23
|
-
// narrow: JSON.stringify(narrow),
|
|
24
|
-
// lp: landingPage,
|
|
25
|
-
// page_num: page,
|
|
26
|
-
// type: type,
|
|
27
|
-
// // sort_by: sortBy,
|
|
28
|
-
// // with_product_attributes: withProductAttributes || get(ispOptions)?.with_product_attributes,
|
|
29
|
-
// with_product_attributes: withProductAttributes,
|
|
30
|
-
// search_within_search: searchWithinResultsQuery ? searchWithinResultsQuery : undefined,
|
|
31
|
-
// visual_merchandising: !searchWithinResultsQuery && !narrow.length ? JSON.stringify(visualMerchandising).replaceAll('"[', '[').replaceAll(']"', ']') : undefined,
|
|
32
|
-
// // merchandising_editor: 1,
|
|
33
|
-
// // disable_merchandising: 1,
|
|
34
|
-
// // related_search: 1
|
|
35
|
-
// m: 1
|
|
36
|
-
// });
|
|
37
|
-
visualMerchandising, merchandisingRules, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
15
|
+
landingPage: ({ uuid, storeID, landingPage, page = 1, sortBy = "relevency", facets = true, narrow, productsPerPage, withProductAttributes = undefined, searchWithinResultsQuery, type, visualMerchandising, merchandisingRules, }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
16
|
const params = {
|
|
39
17
|
UUID: uuid,
|
|
40
18
|
store_id: storeID,
|
|
@@ -44,8 +22,6 @@ export const LandingPage = {
|
|
|
44
22
|
lp: landingPage,
|
|
45
23
|
page_num: page,
|
|
46
24
|
type: type,
|
|
47
|
-
// sort_by: sortBy,
|
|
48
|
-
// with_product_attributes: withProductAttributes || get(ispOptions)?.with_product_attributes,
|
|
49
25
|
with_product_attributes: withProductAttributes,
|
|
50
26
|
search_within_search: searchWithinResultsQuery
|
|
51
27
|
? searchWithinResultsQuery
|
|
@@ -55,18 +31,10 @@ export const LandingPage = {
|
|
|
55
31
|
.replaceAll('"[', "[")
|
|
56
32
|
.replaceAll(']"', "]")
|
|
57
33
|
: undefined,
|
|
58
|
-
// merchandising_editor: 1,
|
|
59
|
-
// disable_merchandising: 1,
|
|
60
|
-
// related_search: 1
|
|
61
34
|
m: 1,
|
|
62
|
-
// merchandising_rules: merchandising_rules ? JSON.stringify(merchandising_rules).replaceAll('"[', '[').replaceAll(']"', ']') : undefined
|
|
63
35
|
merchandising_rules: type == 1 ? JSON.stringify(merchandisingRules) : undefined,
|
|
64
36
|
};
|
|
65
|
-
|
|
66
|
-
// params['last_product'] = lastProduct
|
|
67
|
-
// }
|
|
68
|
-
const res = yield yield fastSimonGet(BASE_URL, "landing_page_editor", params);
|
|
69
|
-
// const res = await API.post<LandingPageResponse>({url: BASE_URL+'/landing_page_editor', data: params, config: {headers: {'content-type': 'text/plain'}}});
|
|
37
|
+
const res = yield fastSimonGet(BASE_URL, "landing_page_editor", params);
|
|
70
38
|
return {
|
|
71
39
|
data: res,
|
|
72
40
|
getFacets: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -87,21 +55,8 @@ export const LandingPage = {
|
|
|
87
55
|
});
|
|
88
56
|
}),
|
|
89
57
|
};
|
|
90
|
-
// return {
|
|
91
|
-
// data: data,
|
|
92
|
-
// getFacets: async () => (data?.facets_completed ? transformFacetsOnlyData(data.facets, data.avoid_tag_prefixes) : await LandingPage.landingPageFacetsOnly({uuid,
|
|
93
|
-
// storeID,
|
|
94
|
-
// landingPage,
|
|
95
|
-
// narrow,
|
|
96
|
-
// type,
|
|
97
|
-
// page,
|
|
98
|
-
// productsPerPage,
|
|
99
|
-
// searchWithinResultsQuery})
|
|
100
|
-
// )
|
|
101
|
-
// }
|
|
102
58
|
}),
|
|
103
|
-
landingPageFacetsOnly: ({ uuid, storeID, landingPage, page = 1, narrow, type, productsPerPage, searchWithinResultsQuery, withProductAttributes = false, visualMerchandising, merchandisingRules
|
|
104
|
-
// }: LandingPageFacetsOnly): Promise<Facet[]> => {
|
|
59
|
+
landingPageFacetsOnly: ({ uuid, storeID, landingPage, page = 1, narrow, type, productsPerPage, searchWithinResultsQuery, withProductAttributes = false, visualMerchandising, merchandisingRules }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
105
60
|
const data = yield fastSimonGet(BASE_URL, "landing_page_editor", {
|
|
106
61
|
UUID: uuid,
|
|
107
62
|
store_id: storeID,
|
|
@@ -111,8 +66,6 @@ export const LandingPage = {
|
|
|
111
66
|
type: type,
|
|
112
67
|
lp: landingPage,
|
|
113
68
|
page_num: page !== null && page !== void 0 ? page : 1,
|
|
114
|
-
// sort_by: sortBy,
|
|
115
|
-
// with_product_attributes: withProductAttributes || get(ispOptions)?.with_product_attributes,
|
|
116
69
|
with_product_attributes: withProductAttributes,
|
|
117
70
|
search_within_search: searchWithinResultsQuery
|
|
118
71
|
? searchWithinResultsQuery
|
|
@@ -130,24 +83,5 @@ export const LandingPage = {
|
|
|
130
83
|
return transformFacetsOnlyData(data.facets, data.avoid_tag_prefixes);
|
|
131
84
|
}),
|
|
132
85
|
};
|
|
133
|
-
// const transformData = (r: LandingPageServerResponseAll): LandingPageResults => ({
|
|
134
|
-
// narrow: r.narrow ? new NarrowParser().toNarrow(r.narrow) : {},
|
|
135
|
-
// sortBy: r.sort_by,
|
|
136
|
-
// totalResults: r.total_results,
|
|
137
|
-
// page: r.p,
|
|
138
|
-
// totalPages: r.total_p,
|
|
139
|
-
// lpSlug: r.lp_slug,
|
|
140
|
-
// // products: ProductParser.parseProducts(r.items),
|
|
141
|
-
// products: r.items,
|
|
142
|
-
// productIDS: r.items.map(product => String(product.id)),
|
|
143
|
-
// facets: new FacetsParser().parseFacets(r.facets, r.avoid_tag_prefixes ? r.avoid_tag_prefixes.split(",") : []),
|
|
144
|
-
// avoidTagPrefixes: r.avoid_tag_prefixes ? r.avoid_tag_prefixes.split(",") : [],
|
|
145
|
-
// bannerHTML: r?.banner_html ?? "",
|
|
146
|
-
// bannerHTMLMobile: r?.banner_html_mobile ?? "",
|
|
147
|
-
// indexPage: r.index_page,
|
|
148
|
-
// title: r.title,
|
|
149
|
-
// sort: r.sort_by,
|
|
150
|
-
// ancestors: new FacetsParser().parseAncestors(r?.ancestor_categories)
|
|
151
|
-
// });
|
|
152
86
|
export const transformFacetsOnlyData = (r, avoidTagPrefixes) => new FacetsParser().parseFacets(r, avoidTagPrefixes ? avoidTagPrefixes.split(",") : []);
|
|
153
87
|
//# sourceMappingURL=landingPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"landingPage.js","sourceRoot":"","sources":["../../src/services/landingPage.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAM,YAAY,EAAC,MAAM,OAAO,CAAC;AACxC,OAAO,EAAC,YAAY,EAAc,MAAM,uBAAuB,CAAA;AAmD/D,+GAA+G;AAC/G,MAAM,QAAQ,GAAG,wDAAwD,CAAA;AAkBzE,MAAM,CAAC,MAAM,WAAW,GAAG;IACvB,WAAW,EAAE,CAAO,EAChB,IAAI,EACJ,OAAO,EACP,WAAW,EACX,IAAI,GAAG,CAAC,EACR,MAAM,GAAG,WAAW,EACpB,MAAM,GAAG,IAAI,EACb,MAAM,EACN,eAAe,EACf,qBAAqB,GAAG,SAAS,EACjC,wBAAwB,EACxB,IAAI,EACJ,mBAAmB,EACnB,kBAAkB,GAChB,EAAE,EAAE;QACN,MAAM,MAAM,GAAwB;YAChC,IAAI,EAAE,IAAI;YACV,QAAQ,EAAE,OAAO;YACjB,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/B,iBAAiB,EAAE,eAAe;YAClC,MAAM,EAAE,IAAI,C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EAAE,CAAC,CAAC","sourcesContent":["import type {SortBy} from \"../@types/sortBy\";\r\nimport type {Narrow, ServerNarrow} from \"@fast-simon/utilities\";\r\nimport {API, fastSimonGet} from \"./API\";\r\nimport {FacetsParser, ServerFacet} from \"@fast-simon/utilities\"\r\nimport {AncestorCategory} from \"../@types/categories\";\r\nimport {EditorProduct} from \"../@types/editorProduct\";\r\ninterface LandingPageRequest {\r\n uuid: string;\r\n storeID: string;\r\n landingPage: string\r\n type: number\r\n page?: number\r\n sortBy?: SortBy\r\n facets?: boolean\r\n narrow?: Narrow\r\n productsPerPage?: number\r\n withProductAttributes?: boolean\r\n searchWithinResultsQuery?: string\r\n}\r\n\r\ninterface LandingPageFacetsOnly extends Omit<LandingPageRequest, \"facets\"> {\r\n avoid_tag_prefixes?: string\r\n}\r\n\r\ninterface LandingPageServerResponseFacetsOnly {\r\n total_results: number\r\n term: string\r\n narrow?: ServerNarrow\r\n facets_completed: true\r\n facets: ServerFacet[],\r\n}\r\n\r\ninterface LandingPageServerResponseAll {\r\n items: EditorProduct[]\r\n alternatives?: string[]\r\n facets_completed: boolean\r\n narrow?: ServerNarrow[]\r\n p: number\r\n total_p: number\r\n total_results: number\r\n term: string\r\n lp_slug: string\r\n title: string\r\n index_page: number\r\n banner_html: string\r\n banner_html_mobile: string\r\n facets: ServerFacet[]\r\n sort_by: SortBy\r\n avoid_tag_prefixes?: string\r\n cms_number_found?: number\r\n within_search_results_for?: string,\r\n ancestor_categories?: AncestorCategory[]\r\n}\r\n\r\n// const BASE_URL = import.meta.env.VITE_SERVING_BASE_URL ?? \"https://internal-v3joil6oqa-uc.a.run.app/search\";\r\nconst BASE_URL = \"https://yslp---internal-v3joil6oqa-uc.a.run.app/search\"\r\n\r\ninterface LandingPageResponse {\r\n items: EditorProduct[]\r\n facets_completed: boolean\r\n narrow?: Narrow[]\r\n p: number\r\n total_p: number\r\n isp_quick_view_mode: number\r\n related_results: boolean\r\n total_results: number\r\n lp_slug: string\r\n title: string\r\n facets: ServerFacet[]\r\n sort_by: SortBy\r\n avoid_tag_prefixes?: string\r\n}\r\n\r\nexport const LandingPage = {\r\n landingPage: async ({\r\n uuid,\r\n storeID,\r\n landingPage,\r\n page = 1,\r\n sortBy = \"relevency\",\r\n facets = true,\r\n narrow,\r\n productsPerPage,\r\n withProductAttributes = undefined,\r\n searchWithinResultsQuery,\r\n type,\r\n visualMerchandising,\r\n merchandisingRules,\r\n }: any) => {\r\n const params: Record<string, any> = {\r\n UUID: uuid,\r\n store_id: storeID,\r\n facets_required: facets ? 1 : 0,\r\n products_per_page: productsPerPage,\r\n narrow: JSON.stringify(narrow),\r\n lp: landingPage,\r\n page_num: page,\r\n type: type,\r\n with_product_attributes: withProductAttributes,\r\n search_within_search: searchWithinResultsQuery\r\n ? searchWithinResultsQuery\r\n : undefined,\r\n visual_merchandising:\r\n type == 0\r\n ? JSON.stringify(visualMerchandising)\r\n .replaceAll('\"[', \"[\")\r\n .replaceAll(']\"', \"]\")\r\n : undefined,\r\n m: 1,\r\n merchandising_rules:\r\n type == 1 ? JSON.stringify(merchandisingRules) : undefined,\r\n };\r\n const res = await fastSimonGet<LandingPageResponse>(\r\n BASE_URL,\r\n \"landing_page_editor\",\r\n params\r\n );\r\n return {\r\n data: res,\r\n getFacets: async () =>\r\n res?.facets_completed\r\n ? transformFacetsOnlyData(\r\n res.facets,\r\n res.avoid_tag_prefixes\r\n )\r\n : await LandingPage.landingPageFacetsOnly({\r\n uuid,\r\n storeID,\r\n landingPage,\r\n page,\r\n narrow,\r\n type,\r\n productsPerPage,\r\n searchWithinResultsQuery,\r\n withProductAttributes,\r\n visualMerchandising,\r\n merchandisingRules,\r\n }),\r\n };\r\n },\r\n\r\n landingPageFacetsOnly: async ({\r\n uuid,\r\n storeID,\r\n landingPage,\r\n page = 1,\r\n narrow,\r\n type,\r\n productsPerPage,\r\n searchWithinResultsQuery,\r\n withProductAttributes = false,\r\n visualMerchandising,\r\n merchandisingRules\r\n }: any) => {\r\n const data = await fastSimonGet<LandingPageServerResponseAll>(\r\n BASE_URL,\r\n \"landing_page_editor\",\r\n {\r\n UUID: uuid,\r\n store_id: storeID,\r\n facets_required: 2,\r\n products_per_page: productsPerPage,\r\n narrow: JSON.stringify(narrow),\r\n type: type,\r\n lp: landingPage,\r\n page_num: page ?? 1,\r\n with_product_attributes: withProductAttributes,\r\n search_within_search: searchWithinResultsQuery\r\n ? searchWithinResultsQuery\r\n : undefined,\r\n visual_merchandising:\r\n type == 0\r\n ? JSON.stringify(visualMerchandising)\r\n .replaceAll('\"[', \"[\")\r\n .replaceAll(']\"', \"]\")\r\n : undefined,\r\n merchandising_rules: merchandisingRules\r\n ? JSON.stringify(merchandisingRules)\r\n : undefined,\r\n m: 1,\r\n }\r\n );\r\n return transformFacetsOnlyData(data.facets, data.avoid_tag_prefixes);\r\n },\r\n};\r\n\r\nexport const transformFacetsOnlyData = (r: ServerFacet[], avoidTagPrefixes?: string) => new FacetsParser().parseFacets(r, avoidTagPrefixes ? avoidTagPrefixes.split(\",\") : []);"]}
|
package/package.json
CHANGED
|
@@ -1,23 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fast-simon/dashboard-utilities",
|
|
3
|
-
"
|
|
4
|
-
"lib/**/*"
|
|
5
|
-
],
|
|
6
|
-
"version": "1.0.22",
|
|
3
|
+
"version": "1.0.24",
|
|
7
4
|
"scripts": {
|
|
8
5
|
"dev": "vite",
|
|
9
6
|
"preview": "vite preview",
|
|
10
7
|
"build": "tsc -p tsconfig-build.json",
|
|
11
8
|
"prepublishOnly": "npm version patch && npm run build",
|
|
12
|
-
"postbuild": "copyfiles -u 2 src/components/**/*.css
|
|
13
|
-
"tsc": "tsc"
|
|
14
|
-
},
|
|
15
|
-
"main": "lib/main.js",
|
|
16
|
-
"type": "module",
|
|
17
|
-
"types": "lib/main.d.ts",
|
|
18
|
-
"directories": {
|
|
19
|
-
"lib": "lib"
|
|
9
|
+
"postbuild": "copyfiles -u 2 src/components/**/*.css dist/components && copyfiles -u 2 src/icons/**/*.css dist/icons && copyfiles -u 2 src/assets/**/*.gif dist/assets"
|
|
20
10
|
},
|
|
11
|
+
"main": "dist/index.js",
|
|
12
|
+
"module": "dist/index.js",
|
|
13
|
+
"types": "dist/index.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist"
|
|
16
|
+
],
|
|
21
17
|
"dependencies": {
|
|
22
18
|
"@babel/core": "^7.20.12",
|
|
23
19
|
"@dnd-kit/core": "^6.0.8",
|
|
@@ -28,6 +24,8 @@
|
|
|
28
24
|
"@fast-simon/logger": "^1.0.0",
|
|
29
25
|
"@fast-simon/utilities": "^1.0.19",
|
|
30
26
|
"@radix-ui/react-accordion": "^1.1.1",
|
|
27
|
+
"@stripe/react-stripe-js": "^1.7.0",
|
|
28
|
+
"@stripe/stripe-js": "^1.22.0",
|
|
31
29
|
"@tippyjs/react": "^4.2.6",
|
|
32
30
|
"classnames": "^2.3.1",
|
|
33
31
|
"clsx": "^1.1.1",
|
|
@@ -37,13 +35,10 @@
|
|
|
37
35
|
"moment": "^2.29.1",
|
|
38
36
|
"rc-slider": "^10.1.1",
|
|
39
37
|
"react-datepicker": "^4.10.0",
|
|
38
|
+
"react-jss": "^10.10.0",
|
|
40
39
|
"react-select": "^5.2.1",
|
|
41
40
|
"tss-react": "^3.6.0",
|
|
42
|
-
"usehooks-ts": "^2.9.1"
|
|
43
|
-
"react-jss": "^10.6.0",
|
|
44
|
-
"react-loading-skeleton": "^2.2.0",
|
|
45
|
-
"react-multi-carousel": "^2.6.3",
|
|
46
|
-
"react-switch": "^6.0.0"
|
|
41
|
+
"usehooks-ts": "^2.9.1"
|
|
47
42
|
},
|
|
48
43
|
"devDependencies": {
|
|
49
44
|
"@types/node": "^18.13.0",
|
package/lib/icons/index.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export * from './BackOfficeFiltersIcon';
|
|
2
|
-
export * from './BannersIcon';
|
|
3
|
-
export * from './HelpIcon';
|
|
4
|
-
export * from './InStoreFiltersIcon';
|
|
5
|
-
export * from './PromoteIcon';
|
|
6
|
-
export * from './RemoveIcon';
|
|
7
|
-
export * from './RestoreIcon';
|
|
8
|
-
import { styles as iconsClasses } from './styles.module.css';
|
|
9
|
-
export { iconsClasses };
|
package/lib/icons/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './BackOfficeFiltersIcon';
|
|
2
|
-
export * from './BannersIcon';
|
|
3
|
-
export * from './HelpIcon';
|
|
4
|
-
export * from './InStoreFiltersIcon';
|
|
5
|
-
export * from './PromoteIcon';
|
|
6
|
-
export * from './RemoveIcon';
|
|
7
|
-
export * from './RestoreIcon';
|
|
8
|
-
import { styles as iconsClasses } from './styles.module.css';
|
|
9
|
-
export { iconsClasses };
|
|
10
|
-
//# sourceMappingURL=index.js.map
|
package/lib/icons/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAA;AACvC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,eAAe,CAAA;AAC7B,OAAO,EAAC,MAAM,IAAI,YAAY,EAAC,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["export * from './BackOfficeFiltersIcon'\r\nexport * from './BannersIcon'\r\nexport * from './HelpIcon'\r\nexport * from './InStoreFiltersIcon'\r\nexport * from './PromoteIcon'\r\nexport * from './RemoveIcon'\r\nexport * from './RestoreIcon'\r\nimport {styles as iconsClasses} from './styles.module.css';\r\nexport { iconsClasses };\r\n"]}
|
package/lib/main.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"m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ustomClasses, SideMenuType, SideMenuItem} from \"./@types/sideMenu\"\nimport {ProductLabelType} from \"./@types/productLabel\"\nimport {videoFormats, Banner} from \"./@types/banner\"\nimport {EditorProduct, isEditorProduct} from \"./@types/editorProduct\"\nimport {IconProps} from \"./@types/iconProps\"\n\nimport {BackOfficeFiltersIcon} from \"./icons/BackOfficeFiltersIcon\"\nimport {BannersIcon} from \"./icons/BannersIcon\"\nimport {HelpIcon} from \"./icons/HelpIcon\"\nimport {InStoreFiltersIcon} from \"./icons/InStoreFiltersIcon\"\nimport {PromoteIcon} from \"./icons/PromoteIcon\"\nimport {RemoveIcon} from \"./icons/RemoveIcon\"\nimport {RestoreIcon} from \"./icons/RestoreIcon\"\nimport {GeneralIcon} from \"./icons/GeneralIcon\"\nimport BackOfficeFiltersMenu from './components/BackOfficeFiltersMenu'\nimport InStoreFiltersMenu from './components/InStoreFiltersMenu'\nimport DndContextWrapper from './components/DragAndDrop/DndContextWrapper'\nimport Droppable from './components/DragAndDrop/Droppable'\nimport {SortableItem} from './components/DragAndDrop/SortableItem'\nimport ProductGrid from \"./components/productGrid/ProductGrid\";\nimport RenderIfVisible from \"./components/RenderIfVisible\";\nimport {useDragToSelect} from \"./utils/useDragToSelect\";\nimport { LandingPage } from \"./services/landingPage\";\n\nexport type {\n MenuItemName, CustomClasses, SideMenuType, SideMenuItem, ProductLabelType, Banner, EditorProduct, IconProps\n};\n\nexport {\n BackOfficeFiltersMenu, InStoreFiltersMenu, Droppable, DndContextWrapper, SortableItem, ProductGrid, RenderIfVisible,\n useDragToSelect, LandingPage, BackOfficeFiltersIcon, BannersIcon, HelpIcon, InStoreFiltersIcon, PromoteIcon,\n RestoreIcon, RemoveIcon, GeneralIcon, videoFormats, isEditorProduct\n};"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"landingPage.js","sourceRoot":"","sources":["../../src/services/landingPage.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,YAAY,EAAE,MAA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FAAiF;AACjF,oCAAoC;AACpC,iDAAiD;AACjD,2BAA2B;AAC3B,kBAAkB;AAClB,mBAAmB;AACnB,uEAAuE;AAC3E,MAAM;AAEN,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAgB,EAAE,gBAAyB,EAAE,EAAE,CAAC,IAAI,YAAY,EAAE,CAAC,WAAW,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC","sourcesContent":["import type {SortBy} from \"../@types/sortBy\";\r\nimport type {Narrow, ServerNarrow} from \"@fast-simon/utilities\";\r\nimport { fastSimonGet } from \"./API\";\r\nimport {FacetsParser, ServerFacet} from \"@fast-simon/utilities\"\r\nimport {AncestorCategory} from \"../@types/categories\";\r\nimport {EditorProduct} from \"../@types/editorProduct\";\r\ninterface LandingPageRequest {\r\n uuid: string;\r\n storeID: string;\r\n landingPage: string\r\n type: number\r\n page?: number\r\n sortBy?: SortBy\r\n facets?: boolean\r\n narrow?: Narrow\r\n productsPerPage?: number\r\n withProductAttributes?: boolean\r\n searchWithinResultsQuery?: string\r\n}\r\n\r\ninterface LandingPageFacetsOnly extends Omit<LandingPageRequest, \"facets\"> {\r\n avoid_tag_prefixes?: string\r\n}\r\n\r\ninterface LandingPageServerResponseFacetsOnly {\r\n total_results: number\r\n term: string\r\n narrow?: ServerNarrow\r\n facets_completed: true\r\n facets: ServerFacet[],\r\n}\r\n\r\ninterface LandingPageServerResponseAll {\r\n items: EditorProduct[]\r\n alternatives?: string[]\r\n facets_completed: boolean\r\n narrow?: ServerNarrow[]\r\n p: number\r\n total_p: number\r\n total_results: number\r\n term: string\r\n lp_slug: string\r\n title: string\r\n index_page: number\r\n banner_html: string\r\n banner_html_mobile: string\r\n facets: ServerFacet[]\r\n sort_by: SortBy\r\n avoid_tag_prefixes?: string\r\n cms_number_found?: number\r\n within_search_results_for?: string,\r\n ancestor_categories?: AncestorCategory[]\r\n}\r\n\r\n// const BASE_URL = import.meta.env.VITE_SERVING_BASE_URL ?? \"https://internal-v3joil6oqa-uc.a.run.app/search\";\r\nconst BASE_URL = \"https://yslp---internal-v3joil6oqa-uc.a.run.app/search\"\r\n\r\ninterface LandingPageResponse {\r\n items: EditorProduct[]\r\n facets_completed: boolean\r\n narrow?: Narrow[]\r\n p: number\r\n total_p: number\r\n isp_quick_view_mode: number\r\n related_results: boolean\r\n total_results: number\r\n lp_slug: string\r\n title: string\r\n facets: ServerFacet[]\r\n sort_by: SortBy\r\n avoid_tag_prefixes?: string\r\n // data: LandingPageResults,\r\n // getFacetsOnly?: () => Promise<Facet[]>\r\n}\r\n\r\nexport const LandingPage = {\r\n landingPage: async ({\r\n uuid,\r\n storeID,\r\n landingPage,\r\n page = 1,\r\n sortBy = \"relevency\",\r\n facets = true,\r\n narrow,\r\n productsPerPage,\r\n withProductAttributes = undefined,\r\n searchWithinResultsQuery,\r\n type, // }: LandingPageRequest): Promise<LandingPageResponse> => {\r\n // const narrowParm = narrow ? new NarrowParser().toServerNarrow(narrow) : undefined;\r\n //\r\n // const data = await fastSimonGet<LandingPageServerResponseAll>(BASE_URL, 'landing_page_editor', {\r\n // UUID: uuid,\r\n // store_id: storeID,\r\n // facets_required: facets ? 1 : 0,\r\n // products_per_page: productsPerPage,\r\n // narrow: JSON.stringify(narrow),\r\n // lp: landingPage,\r\n // page_num: page,\r\n // type: type,\r\n // // sort_by: sortBy,\r\n // // with_product_attributes: withProductAttributes || get(ispOptions)?.with_product_attributes,\r\n // with_product_attributes: withProductAttributes,\r\n // search_within_search: searchWithinResultsQuery ? searchWithinResultsQuery : undefined,\r\n // visual_merchandising: !searchWithinResultsQuery && !narrow.length ? JSON.stringify(visualMerchandising).replaceAll('\"[', '[').replaceAll(']\"', ']') : undefined,\r\n // // merchandising_editor: 1,\r\n // // disable_merchandising: 1,\r\n // // related_search: 1\r\n // m: 1\r\n // });\r\n visualMerchandising,\r\n merchandisingRules,\r\n }: any) => {\r\n const params: Record<string, any> = {\r\n UUID: uuid,\r\n store_id: storeID,\r\n facets_required: facets ? 1 : 0,\r\n products_per_page: productsPerPage,\r\n narrow: JSON.stringify(narrow),\r\n lp: landingPage,\r\n page_num: page,\r\n type: type,\r\n // sort_by: sortBy,\r\n // with_product_attributes: withProductAttributes || get(ispOptions)?.with_product_attributes,\r\n with_product_attributes: withProductAttributes,\r\n search_within_search: searchWithinResultsQuery\r\n ? searchWithinResultsQuery\r\n : undefined,\r\n visual_merchandising:\r\n type == 0\r\n ? JSON.stringify(visualMerchandising)\r\n .replaceAll('\"[', \"[\")\r\n .replaceAll(']\"', \"]\")\r\n : undefined,\r\n // merchandising_editor: 1,\r\n // disable_merchandising: 1,\r\n // related_search: 1\r\n m: 1,\r\n // merchandising_rules: merchandising_rules ? JSON.stringify(merchandising_rules).replaceAll('\"[', '[').replaceAll(']\"', ']') : undefined\r\n merchandising_rules:\r\n type == 1 ? JSON.stringify(merchandisingRules) : undefined,\r\n };\r\n // if(lastProduct) {\r\n // params['last_product'] = lastProduct\r\n // }\r\n const res = await await fastSimonGet<LandingPageResponse>(\r\n BASE_URL,\r\n \"landing_page_editor\",\r\n params\r\n );\r\n // const res = await API.post<LandingPageResponse>({url: BASE_URL+'/landing_page_editor', data: params, config: {headers: {'content-type': 'text/plain'}}});\r\n return {\r\n data: res,\r\n getFacets: async () =>\r\n res?.facets_completed\r\n ? transformFacetsOnlyData(\r\n res.facets,\r\n res.avoid_tag_prefixes\r\n )\r\n : await LandingPage.landingPageFacetsOnly({\r\n uuid,\r\n storeID,\r\n landingPage,\r\n page,\r\n narrow,\r\n type,\r\n productsPerPage,\r\n searchWithinResultsQuery,\r\n withProductAttributes,\r\n visualMerchandising,\r\n merchandisingRules,\r\n }),\r\n };\r\n // return {\r\n // data: data,\r\n // getFacets: async () => (data?.facets_completed ? transformFacetsOnlyData(data.facets, data.avoid_tag_prefixes) : await LandingPage.landingPageFacetsOnly({uuid,\r\n // storeID,\r\n // landingPage,\r\n // narrow,\r\n // type,\r\n // page,\r\n // productsPerPage,\r\n // searchWithinResultsQuery})\r\n // )\r\n // }\r\n },\r\n\r\n landingPageFacetsOnly: async ({\r\n uuid,\r\n storeID,\r\n landingPage,\r\n page = 1,\r\n narrow,\r\n type,\r\n productsPerPage,\r\n searchWithinResultsQuery,\r\n withProductAttributes = false,\r\n visualMerchandising,\r\n merchandisingRules,\r\n }: any) => {\r\n // }: LandingPageFacetsOnly): Promise<Facet[]> => {\r\n\r\n const data = await fastSimonGet<LandingPageServerResponseAll>(\r\n BASE_URL,\r\n \"landing_page_editor\",\r\n {\r\n UUID: uuid,\r\n store_id: storeID,\r\n facets_required: 2,\r\n products_per_page: productsPerPage,\r\n narrow: JSON.stringify(narrow),\r\n type: type,\r\n lp: landingPage,\r\n page_num: page ?? 1,\r\n // sort_by: sortBy,\r\n // with_product_attributes: withProductAttributes || get(ispOptions)?.with_product_attributes,\r\n with_product_attributes: withProductAttributes,\r\n search_within_search: searchWithinResultsQuery\r\n ? searchWithinResultsQuery\r\n : undefined,\r\n visual_merchandising:\r\n type == 0\r\n ? JSON.stringify(visualMerchandising)\r\n .replaceAll('\"[', \"[\")\r\n .replaceAll(']\"', \"]\")\r\n : undefined,\r\n merchandising_rules: merchandisingRules\r\n ? JSON.stringify(merchandisingRules)\r\n : undefined,\r\n m: 1,\r\n }\r\n );\r\n\r\n return transformFacetsOnlyData(data.facets, data.avoid_tag_prefixes);\r\n },\r\n};\r\n\r\n// const transformData = (r: LandingPageServerResponseAll): LandingPageResults => ({\r\n // narrow: r.narrow ? new NarrowParser().toNarrow(r.narrow) : {},\r\n // sortBy: r.sort_by,\r\n // totalResults: r.total_results,\r\n // page: r.p,\r\n // totalPages: r.total_p,\r\n // lpSlug: r.lp_slug,\r\n // // products: ProductParser.parseProducts(r.items),\r\n // products: r.items,\r\n // productIDS: r.items.map(product => String(product.id)),\r\n // facets: new FacetsParser().parseFacets(r.facets, r.avoid_tag_prefixes ? r.avoid_tag_prefixes.split(\",\") : []),\r\n // avoidTagPrefixes: r.avoid_tag_prefixes ? r.avoid_tag_prefixes.split(\",\") : [],\r\n // bannerHTML: r?.banner_html ?? \"\",\r\n // bannerHTMLMobile: r?.banner_html_mobile ?? \"\",\r\n // indexPage: r.index_page,\r\n // title: r.title,\r\n // sort: r.sort_by,\r\n // ancestors: new FacetsParser().parseAncestors(r?.ancestor_categories)\r\n// });\r\n\r\nexport const transformFacetsOnlyData = (r: ServerFacet[], avoidTagPrefixes?: string) => new FacetsParser().parseFacets(r, avoidTagPrefixes ? avoidTagPrefixes.split(\",\") : []);"]}
|
package/lib/utils/products.d.ts
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { EditorProduct } from "../@types/editorProduct";
|
|
2
|
-
export declare const ProductsUtils: {
|
|
3
|
-
/**
|
|
4
|
-
* Change the position of multiple products, starting from index a and moving n products to index b, in use for multiple product actions
|
|
5
|
-
* Use the splice method to extract and remove the products from their original positions, then use the splice method again to insert them into the new positions
|
|
6
|
-
* Time complexity O(n), where n is the number of elements in the array that being modified
|
|
7
|
-
* @param products - is the current products state
|
|
8
|
-
* @param startIndex - is the starting index
|
|
9
|
-
* @param numberOfProducts - is the number of products to move
|
|
10
|
-
* @param destIndex - is the destination index you want to insert the product into
|
|
11
|
-
**/
|
|
12
|
-
changeProductsPosition: (products: EditorProduct[], startIndex: number, numberOfProducts: number, destIndex: number) => EditorProduct[];
|
|
13
|
-
/**
|
|
14
|
-
* Change position of a single product
|
|
15
|
-
* Use the splice method to remove the product from its original position and insert it into the new position.
|
|
16
|
-
* time complexity O(n)
|
|
17
|
-
* @param gridItems - is the current products state
|
|
18
|
-
* @param oldIndex - is the index of the product to move
|
|
19
|
-
* @param newIndex - is the destination index
|
|
20
|
-
**/
|
|
21
|
-
changeProductPosition: (gridItems: EditorProduct[], oldIndex: number, newIndex: number) => EditorProduct[];
|
|
22
|
-
/**
|
|
23
|
-
* Add product (hidden/unpublished/promotile) to specific position in the products array
|
|
24
|
-
* Use the splice method to remove the product from its original position and insert it into the new position.
|
|
25
|
-
* @param products - is the current products state
|
|
26
|
-
* @param productToAdd - is the new product to add
|
|
27
|
-
* @param destIndex - is the destination index
|
|
28
|
-
**/
|
|
29
|
-
addProductToIndex: (products: EditorProduct[], productToAdd: EditorProduct, destIndex: number) => EditorProduct[];
|
|
30
|
-
};
|
package/lib/utils/products.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export const ProductsUtils = {
|
|
2
|
-
/**
|
|
3
|
-
* Change the position of multiple products, starting from index a and moving n products to index b, in use for multiple product actions
|
|
4
|
-
* Use the splice method to extract and remove the products from their original positions, then use the splice method again to insert them into the new positions
|
|
5
|
-
* Time complexity O(n), where n is the number of elements in the array that being modified
|
|
6
|
-
* @param products - is the current products state
|
|
7
|
-
* @param startIndex - is the starting index
|
|
8
|
-
* @param numberOfProducts - is the number of products to move
|
|
9
|
-
* @param destIndex - is the destination index you want to insert the product into
|
|
10
|
-
**/
|
|
11
|
-
changeProductsPosition: (products, startIndex, numberOfProducts, destIndex) => {
|
|
12
|
-
products.splice(destIndex - numberOfProducts + 1, 0, ...products.splice(startIndex, numberOfProducts));
|
|
13
|
-
return products;
|
|
14
|
-
},
|
|
15
|
-
/**
|
|
16
|
-
* Change position of a single product
|
|
17
|
-
* Use the splice method to remove the product from its original position and insert it into the new position.
|
|
18
|
-
* time complexity O(n)
|
|
19
|
-
* @param gridItems - is the current products state
|
|
20
|
-
* @param oldIndex - is the index of the product to move
|
|
21
|
-
* @param newIndex - is the destination index
|
|
22
|
-
**/
|
|
23
|
-
changeProductPosition: (gridItems, oldIndex, newIndex) => {
|
|
24
|
-
gridItems.splice(newIndex, 0, gridItems.splice(oldIndex, 1)[0]);
|
|
25
|
-
return gridItems;
|
|
26
|
-
},
|
|
27
|
-
/**
|
|
28
|
-
* Add product (hidden/unpublished/promotile) to specific position in the products array
|
|
29
|
-
* Use the splice method to remove the product from its original position and insert it into the new position.
|
|
30
|
-
* @param products - is the current products state
|
|
31
|
-
* @param productToAdd - is the new product to add
|
|
32
|
-
* @param destIndex - is the destination index
|
|
33
|
-
**/
|
|
34
|
-
addProductToIndex: (products, productToAdd, destIndex) => {
|
|
35
|
-
products.splice(destIndex, 0, productToAdd);
|
|
36
|
-
return products;
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
//# sourceMappingURL=products.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"products.js","sourceRoot":"","sources":["../../src/utils/products.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAG;IAEzB;;;;;;;;QAQI;IACJ,sBAAsB,EAAE,CAAC,QAAyB,EAAE,UAAkB,EAAE,gBAAwB,EAAE,SAAiB,EAAE,EAAE;QACnH,QAAQ,CAAC,MAAM,CAAC,SAAS,GAAC,gBAAgB,GAAC,CAAC,EAAE,CAAC,EAAE,GAAG,QAAQ,CAAC,MAAM,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC,CAAC;QACnG,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;;;;;;QAOI;IACJ,qBAAqB,EAAE,CAAC,SAA0B,EAAE,QAAgB,EAAE,QAAgB,EAAE,EAAE;QACtF,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAChE,OAAO,SAAS,CAAC;IACrB,CAAC;IAED;;;;;;QAMI;IACJ,iBAAiB,EAAE,CAAC,QAAyB,EAAE,YAA2B,EAAE,SAAiB,EAAE,EAAE;QAC7F,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,EAAE,YAAY,CAAC,CAAC;QAC5C,OAAO,QAAQ,CAAC;IACpB,CAAC;CAGJ,CAAA","sourcesContent":["import {EditorProduct} from \"../@types/editorProduct\";\r\n\r\nexport const ProductsUtils = {\r\n\r\n /**\r\n * Change the position of multiple products, starting from index a and moving n products to index b, in use for multiple product actions\r\n * Use the splice method to extract and remove the products from their original positions, then use the splice method again to insert them into the new positions\r\n * Time complexity O(n), where n is the number of elements in the array that being modified\r\n * @param products - is the current products state\r\n * @param startIndex - is the starting index\r\n * @param numberOfProducts - is the number of products to move\r\n * @param destIndex - is the destination index you want to insert the product into\r\n **/\r\n changeProductsPosition: (products: EditorProduct[], startIndex: number, numberOfProducts: number, destIndex: number) => {\r\n products.splice(destIndex-numberOfProducts+1, 0, ...products.splice(startIndex, numberOfProducts));\r\n return products;\r\n },\r\n\r\n /**\r\n * Change position of a single product\r\n * Use the splice method to remove the product from its original position and insert it into the new position.\r\n * time complexity O(n)\r\n * @param gridItems - is the current products state\r\n * @param oldIndex - is the index of the product to move\r\n * @param newIndex - is the destination index\r\n **/\r\n changeProductPosition: (gridItems: EditorProduct[], oldIndex: number, newIndex: number) => {\r\n gridItems.splice(newIndex, 0, gridItems.splice(oldIndex, 1)[0]);\r\n return gridItems;\r\n },\r\n\r\n /**\r\n * Add product (hidden/unpublished/promotile) to specific position in the products array\r\n * Use the splice method to remove the product from its original position and insert it into the new position.\r\n * @param products - is the current products state\r\n * @param productToAdd - is the new product to add\r\n * @param destIndex - is the destination index\r\n **/\r\n addProductToIndex: (products: EditorProduct[], productToAdd: EditorProduct, destIndex: number) => {\r\n products.splice(destIndex, 0, productToAdd);\r\n return products;\r\n }\r\n\r\n\r\n}"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"shopifyMarkets.js","sourceRoot":"","sources":["../../src/utils/shopifyMarkets.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,cAAc;IAChC,MAAM,CAAC,UAAU;;QACZ,OAAO,MAAC,MAAc,aAAd,MAAM,uBAAN,MAAM,CAAU,OAAO,0CAAE,OAAO,CAAC;IAC7C,CAAC;CACJ","sourcesContent":["export default class ShopifyMarkets {\r\n static getCountry() {\r\n return (window as any)?.Shopify?.country;\r\n }\r\n}"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/{lib → dist}/App.d.ts
RENAMED
|
File without changes
|
/package/{lib → dist}/App.js
RENAMED
|
File without changes
|
/package/{lib → dist}/App.js.map
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|