@licklist/design 0.70.1 → 0.70.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.
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper';
3
+ import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper';
3
4
  export declare const LAYOUT_GRID = "grid";
4
5
  export declare const LAYOUT_LIST = "list";
5
6
  export type ActivityCardProps = {
@@ -12,6 +13,7 @@ export type ActivityCardProps = {
12
13
  layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST;
13
14
  availableTimes?: string | null;
14
15
  image?: Image | null;
16
+ resources?: ZoneResourcesAvailability;
15
17
  };
16
- export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const ActivityCard: ({ title, duration, price, description, availableTimes, image, onSelect, isSelected, layout, resources, }: ActivityCardProps) => import("react/jsx-runtime").JSX.Element;
17
19
  //# sourceMappingURL=ActivityCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAE5E,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,WAAW,CAAA;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;CACrB,CAAA;AAED,eAAO,MAAM,YAAY,kGAUtB,iBAAiB,4CAiDnB,CAAA"}
1
+ {"version":3,"file":"ActivityCard.d.ts","sourceRoot":"","sources":["../../../src/iframe/activity-card/ActivityCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAEjC,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAA;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA;AAGpH,eAAO,MAAM,WAAW,SAAS,CAAA;AACjC,eAAO,MAAM,WAAW,SAAS,CAAA;AAEjC,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,SAAS,CAAA;IAChB,QAAQ,EAAE,SAAS,CAAA;IACnB,KAAK,EAAE,SAAS,CAAA;IAChB,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,CAAC,EAAE,OAAO,WAAW,GAAG,OAAO,WAAW,CAAA;IAChD,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,yBAAyB,CAAA;CACtC,CAAA;AAED,eAAO,MAAM,YAAY,6GAWtB,iBAAiB,4CAmDnB,CAAA"}
@@ -1,10 +1,11 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import clsx from 'clsx';
3
+ import { AvailabilityIndicator } from '../../availability-indicator/AvailabilityIndicator.js';
3
4
 
4
5
  var LAYOUT_GRID = 'grid';
5
6
  var LAYOUT_LIST = 'list';
6
7
  var ActivityCard = function(param) {
7
- var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout;
8
+ var title = param.title, duration = param.duration, price = param.price, description = param.description, availableTimes = param.availableTimes, image = param.image, onSelect = param.onSelect, isSelected = param.isSelected, _param_layout = param.layout, layout = _param_layout === void 0 ? LAYOUT_GRID : _param_layout, resources = param.resources;
8
9
  if (layout === LAYOUT_GRID) {
9
10
  return /*#__PURE__*/ jsxs("button", {
10
11
  type: "button",
@@ -32,6 +33,9 @@ var ActivityCard = function(param) {
32
33
  description && /*#__PURE__*/ jsx("div", {
33
34
  className: "mt-2 activity-card-description",
34
35
  children: description
36
+ }),
37
+ resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
38
+ resources: resources
35
39
  })
36
40
  ]
37
41
  })
@@ -68,6 +72,9 @@ var ActivityCard = function(param) {
68
72
  description && /*#__PURE__*/ jsx("div", {
69
73
  className: "mt-2 activity-card-description",
70
74
  children: description
75
+ }),
76
+ resources && /*#__PURE__*/ jsx(AvailabilityIndicator, {
77
+ resources: resources
71
78
  })
72
79
  ]
73
80
  }),
@@ -1,5 +1,4 @@
1
1
  import { FieldValues, RefCallBack, UseFormClearErrors } from 'react-hook-form';
2
- import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper';
3
2
  import { Product, ProductCategory } from '@licklist/plugins/dist/types/context/sale/menuSteps';
4
3
  interface FormOrderItem {
5
4
  id: number;
@@ -7,7 +6,6 @@ interface FormOrderItem {
7
6
  price: number;
8
7
  productCategoryId: number;
9
8
  hasDeposit?: boolean;
10
- zoneId?: Zone['id'];
11
9
  deposit?: number | null;
12
10
  quantity: number;
13
11
  capacity?: number | null;
@@ -1 +1 @@
1
- {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAA;AAC7E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAG5D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAiE3B,CAAA"}
1
+ {"version":3,"file":"ProductQuantityInput.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAA;AAC9E,OAAO,EACL,OAAO,EACP,eAAe,EAChB,MAAM,qDAAqD,CAAA;AAG5D,UAAU,aAAa;IACrB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB;AAED,UAAU,yBAAyB;IACjC,OAAO,EAAE,OAAO,CAAA;IAChB,QAAQ,EAAE,eAAe,CAAA;IACzB,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAA;IAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAA;IACxC,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,WAAW,CAAA;IACxB,OAAO,EAAE,OAAO,CAAA;IAChB,WAAW,EAAE,aAAa,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,gGAQ9B,yBAAyB,4CAiE3B,CAAA"}
@@ -15,3 +15,12 @@
15
15
  }
16
16
  }
17
17
  }
18
+
19
+
20
+
21
+ .activity-card {
22
+ .availability-indicator {
23
+ margin-top: 0.5rem;
24
+ justify-content: flex-start;
25
+ }
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.70.1",
3
+ "version": "0.70.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -44,7 +44,7 @@
44
44
  "peerDependencies": {
45
45
  "@licklist/core": "0.30.3",
46
46
  "@licklist/eslint-config": "0.5.6",
47
- "@licklist/plugins": "0.33.4",
47
+ "@licklist/plugins": "0.33.5",
48
48
  "lodash": "4.17.21",
49
49
  "luxon": "3.5.0",
50
50
  "react": "17.0.2",
@@ -63,7 +63,7 @@
63
63
  "@fortawesome/free-solid-svg-icons": "5.15.2",
64
64
  "@licklist/core": "0.30.3",
65
65
  "@licklist/eslint-config": "0.5.6",
66
- "@licklist/plugins": "0.33.4",
66
+ "@licklist/plugins": "0.33.5",
67
67
  "@mantine/core": "6.0.22",
68
68
  "@mantine/hooks": "6.0.22",
69
69
  "@mdx-js/react": "1.6.22",
@@ -206,4 +206,4 @@
206
206
  "node": "20.9.0",
207
207
  "yarn": "4.4.0"
208
208
  }
209
- }
209
+ }
@@ -1,6 +1,8 @@
1
1
  import { ReactNode } from 'react'
2
2
  import clsx from 'clsx'
3
3
  import { Image } from '@licklist/core/dist/DataMapper/Media/ImageDataMapper'
4
+ import { ZoneResourcesAvailability } from '@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper'
5
+ import { AvailabilityIndicator } from '../../availability-indicator'
4
6
 
5
7
  export const LAYOUT_GRID = 'grid'
6
8
  export const LAYOUT_LIST = 'list'
@@ -15,6 +17,7 @@ export type ActivityCardProps = {
15
17
  layout?: typeof LAYOUT_GRID | typeof LAYOUT_LIST
16
18
  availableTimes?: string | null
17
19
  image?: Image | null
20
+ resources?: ZoneResourcesAvailability
18
21
  }
19
22
 
20
23
  export const ActivityCard = ({
@@ -27,6 +30,7 @@ export const ActivityCard = ({
27
30
  onSelect,
28
31
  isSelected,
29
32
  layout = LAYOUT_GRID,
33
+ resources,
30
34
  }: ActivityCardProps) => {
31
35
  if (layout === LAYOUT_GRID) {
32
36
  return (
@@ -46,6 +50,7 @@ export const ActivityCard = ({
46
50
  {description && (
47
51
  <div className='mt-2 activity-card-description'>{description}</div>
48
52
  )}
53
+ {resources && <AvailabilityIndicator resources={resources} />}
49
54
  </div>
50
55
  </button>
51
56
  )
@@ -71,6 +76,7 @@ export const ActivityCard = ({
71
76
  {description && (
72
77
  <div className='mt-2 activity-card-description'>{description}</div>
73
78
  )}
79
+ {resources && <AvailabilityIndicator resources={resources} />}
74
80
  </div>
75
81
 
76
82
  <hr className='list-activity-card-hr' />
@@ -2,7 +2,6 @@ import clsx from 'clsx'
2
2
  import { Button } from 'react-bootstrap'
3
3
  import { useTranslation } from 'react-i18next'
4
4
  import { FieldValues, RefCallBack, UseFormClearErrors } from 'react-hook-form'
5
- import { Zone } from '@licklist/core/dist/DataMapper/Provider/ZoneDataMapper'
6
5
  import {
7
6
  Product,
8
7
  ProductCategory,
@@ -15,7 +14,6 @@ interface FormOrderItem {
15
14
  price: number
16
15
  productCategoryId: number
17
16
  hasDeposit?: boolean
18
- zoneId?: Zone['id']
19
17
  deposit?: number | null
20
18
  quantity: number
21
19
  capacity?: number | null
@@ -15,3 +15,12 @@
15
15
  }
16
16
  }
17
17
  }
18
+
19
+
20
+
21
+ .activity-card {
22
+ .availability-indicator {
23
+ margin-top: 0.5rem;
24
+ justify-content: flex-start;
25
+ }
26
+ }