@metron-labs/quote-react 0.1.65 → 0.1.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/app/EstimatingTools.js +12 -8
  2. package/dist/app/QuickQuote.js +10 -10
  3. package/dist/app/stages/BasketStage.d.ts +0 -2
  4. package/dist/app/stages/BasketStage.js +22 -26
  5. package/dist/app/stages/EntryStage.d.ts +0 -2
  6. package/dist/app/stages/EntryStage.js +20 -13
  7. package/dist/app/stages/ProcessingStage.js +1 -1
  8. package/dist/app/stages/ScheduleResultsStage.js +14 -14
  9. package/dist/components/ChevronIcon.d.ts +1 -0
  10. package/dist/components/ChevronIcon.js +4 -0
  11. package/dist/components/InsulationPlaceholder.d.ts +2 -0
  12. package/dist/components/InsulationPlaceholder.js +6 -0
  13. package/dist/components/ProductPlaceholder.d.ts +2 -0
  14. package/dist/components/ProductPlaceholder.js +6 -0
  15. package/dist/components/TrashIcon.d.ts +1 -0
  16. package/dist/components/TrashIcon.js +4 -0
  17. package/dist/components/estimators/ArchitraveEstimator.js +1 -1
  18. package/dist/components/estimators/DeckingEstimator.js +2 -2
  19. package/dist/components/estimators/EstimatorResults.d.ts +1 -1
  20. package/dist/components/estimators/EstimatorResults.js +8 -8
  21. package/dist/components/estimators/EstimatorReviewStage.d.ts +1 -1
  22. package/dist/components/estimators/EstimatorReviewStage.js +1 -1
  23. package/dist/components/estimators/FencingEstimator.js +2 -2
  24. package/dist/components/estimators/PaintEstimator.js +1 -1
  25. package/dist/components/estimators/RoofTrussEstimator.js +1 -1
  26. package/dist/components/estimators/registry.d.ts +1 -1
  27. package/dist/components/estimators/useFixedBasket.js +3 -3
  28. package/dist/embed/quote.js +10 -29
  29. package/dist/index.d.ts +5 -5
  30. package/dist/index.js +3 -3
  31. package/dist/util/ProductImage.d.ts +9 -0
  32. package/dist/util/ProductImage.js +25 -0
  33. package/dist/{lib → util}/api/fetchSchedule.d.ts +1 -1
  34. package/dist/{lib → util}/cart/CartContext.d.ts +1 -2
  35. package/dist/{lib/boq → util/cart}/toCartItem.d.ts +1 -1
  36. package/dist/{lib → util}/estimators/requestUnit.d.ts +1 -1
  37. package/dist/{lib → util}/estimators/resolveProducts.d.ts +1 -1
  38. package/dist/util/exportScheduleExcel.js +17 -3
  39. package/package.json +1 -1
  40. package/dist/lib/productImage.d.ts +0 -1
  41. package/dist/lib/productImage.js +0 -75
  42. /package/dist/{app/components → components/unit}/UnitDisplay.d.ts +0 -0
  43. /package/dist/{app/components → components/unit}/UnitDisplay.js +0 -0
  44. /package/dist/{app/components → components/unit}/UnitLabel.d.ts +0 -0
  45. /package/dist/{app/components → components/unit}/UnitLabel.js +0 -0
  46. /package/dist/{lib → util}/QuoteProvider.d.ts +0 -0
  47. /package/dist/{lib → util}/QuoteProvider.js +0 -0
  48. /package/dist/{lib → util}/analytics.d.ts +0 -0
  49. /package/dist/{lib → util}/analytics.js +0 -0
  50. /package/dist/{lib → util}/api/boqClient.d.ts +0 -0
  51. /package/dist/{lib → util}/api/boqClient.js +0 -0
  52. /package/dist/{lib → util}/api/boqSession.d.ts +0 -0
  53. /package/dist/{lib → util}/api/boqSession.js +0 -0
  54. /package/dist/{lib → util}/api/fetchSchedule.js +0 -0
  55. /package/dist/{lib → util}/api/pollJob.d.ts +0 -0
  56. /package/dist/{lib → util}/api/pollJob.js +0 -0
  57. /package/dist/{lib → util}/assets.d.ts +0 -0
  58. /package/dist/{lib → util}/assets.js +0 -0
  59. /package/dist/{lib → util}/cart/CartContext.js +0 -0
  60. /package/dist/{lib/boq → util/cart}/toCartItem.js +0 -0
  61. /package/dist/{lib → util}/config.d.ts +0 -0
  62. /package/dist/{lib → util}/config.js +0 -0
  63. /package/dist/{lib → util}/estimators/fixedProducts.d.ts +0 -0
  64. /package/dist/{lib → util}/estimators/fixedProducts.js +0 -0
  65. /package/dist/{lib → util}/estimators/requestUnit.js +0 -0
  66. /package/dist/{lib → util}/estimators/resolveProducts.js +0 -0
  67. /package/dist/{lib → util}/estimators/types.d.ts +0 -0
  68. /package/dist/{lib → util}/estimators/types.js +0 -0
  69. /package/dist/{lib → util}/formatters.d.ts +0 -0
  70. /package/dist/{lib → util}/formatters.js +0 -0
  71. /package/dist/{lib/boq → util}/inputLimits.d.ts +0 -0
  72. /package/dist/{lib/boq → util}/inputLimits.js +0 -0
  73. /package/dist/{lib → util}/quoteHistory.d.ts +0 -0
  74. /package/dist/{lib → util}/quoteHistory.js +0 -0
  75. /package/dist/{lib → util}/useEscapeKey.d.ts +0 -0
  76. /package/dist/{lib → util}/useEscapeKey.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import type { EstimatorToolId } from "./registry";
2
- import type { EstimatorRequirement } from "../../lib/estimators/types";
2
+ import type { EstimatorRequirement } from "../../util/estimators/types";
3
3
  interface EstimatorReviewStageProps {
4
4
  toolId: EstimatorToolId;
5
5
  toolTitle: string;
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useCallback, useState } from "react";
4
4
  import EstimatorResults from "./EstimatorResults";
5
- import { fmtCurrency } from "../../lib/formatters";
5
+ import { fmtCurrency } from "../../util/formatters";
6
6
  /**
7
7
  * The product-matching step. Its own screen between the calculator and the basket,
8
8
  * mirroring the Quick Quote results stage.
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useRef, useState } from "react";
4
- import { assetUrl } from "../../lib/assets";
5
- import { offersOption } from "../../lib/estimators/fixedProducts";
4
+ import { assetUrl } from "../../util/assets";
5
+ import { offersOption } from "../../util/estimators/fixedProducts";
6
6
  import ForwardArrow from "../ForwardArrow";
7
7
  const GRID_SIZE = 12;
8
8
  const CELL_PX = 30;
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
- import { fixedProductSearch } from "../../lib/estimators/fixedProducts";
4
+ import { fixedProductSearch } from "../../util/estimators/fixedProducts";
5
5
  const PAINT_COVERAGE_M2_PER_LITRE = 10;
6
6
  const DOOR_AREA_M2 = 1.9 * 0.762;
7
7
  const DOUBLE_DOOR_AREA_M2 = 1.9 * 1.524;
@@ -2,7 +2,7 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import ForwardArrow from "../ForwardArrow";
5
- import { fmtCurrency } from "../../lib/formatters";
5
+ import { fmtCurrency } from "../../util/formatters";
6
6
  const CONFIG = {
7
7
  ranges: {
8
8
  standard: {
@@ -1,5 +1,5 @@
1
1
  import type { ComponentType } from "react";
2
- import type { EstimatorRequirement } from "../../lib/estimators/types";
2
+ import type { EstimatorRequirement } from "../../util/estimators/types";
3
3
  export type EstimatorToolId = "truss" | "fencing" | "decking" | "brick-block" | "paint" | "skirting" | "architrave" | "concrete-aggregate" | "plasterboard" | "insulation" | "timber" | "paving";
4
4
  /** How a merchant thinks about the jobs, not how the components are filed. */
5
5
  export type EstimatorGroup = "Structure & Envelope" | "Outdoor" | "Interiors" | "Groundwork";
@@ -2,9 +2,9 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
4
  import BrickWall from "../BrickWall";
5
- import { useCart } from "../../lib/cart/CartContext";
6
- import { candidateToCartItem } from "../../lib/boq/toCartItem";
7
- import { estimateRequestUnit, searchCatalogue } from "../../lib/estimators/resolveProducts";
5
+ import { useCart } from "../../util/cart/CartContext";
6
+ import { candidateToCartItem } from "../../util/cart/toCartItem";
7
+ import { estimateRequestUnit, searchCatalogue } from "../../util/estimators/resolveProducts";
8
8
  const MIN_BASKET_LOADING_MS = 1500;
9
9
  export function useFixedBasket(toolTitle) {
10
10
  const { addManyToCart, clearCart, openBasket } = useCart();