@licklist/design 0.44.486-dev.54 → 0.44.486-dev.55

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 +1 @@
1
- {"version":3,"file":"TicketDescription.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/ticket-description/TicketDescription.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAiB,SAAS,EAAY,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,KAAK,EAAE,MAAM,sDAAsD,CAAC;AAK7E,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAID,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,SAAc,EACd,MAAM,EACN,KAAK,EACL,UAAkB,EAClB,SAAgB,GACjB,EAAE,sBAAsB,eA4DxB"}
1
+ {"version":3,"file":"TicketDescription.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/ticket-description/TicketDescription.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAiB,SAAS,EAAY,MAAM,OAAO,CAAC;AAElE,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAK9D,UAAU,sBAAsB;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAID,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,WAAW,EACX,SAAc,EACd,MAAM,EACN,KAAK,EACL,UAAkB,EAClB,SAAgB,GACjB,EAAE,sBAAsB,eA8DxB"}
@@ -1 +1 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),i=require("react"),r=e(i),a=e(require("clsx")),c=require("../../../static/text-expand/TextExpand.js"),n=require("../../../tiptap-editor/TipTapEditor.js"),s=e(require("@licklist/plugins/dist/services/Media/MediaService"));exports.TicketDescription=function(e){var l=e.title,d=e.description,p=e.className,o=void 0===p?"":p,m=e.images,u=e.price,E=e.isRequired,v=void 0!==E&&E,x=e.canExpand,N=void 0===x||x,_=t.__read(i.useState(!1),2),f=_[0],g=_[1],k=!!d,q=a("ticket-description",o),T=m?s.getImageSrc(m):null,b=function(){return r.createElement("div",{className:"description-content"},r.createElement("div",{className:"d-flex flex-column"},r.createElement("div",{className:"product-title"},l," ",v&&r.createElement("span",null,"*")),k&&r.createElement(n.TipTapEditor,{viewMode:!0,disabled:!0,content:d,editorStyle:{backgroundColor:"transparent"}})))};return r.createElement("div",{className:q},r.createElement("div",{className:"ticket-description__wrapper",style:{"--description-wrapper-height":"inherit"}},r.createElement("div",{className:"ticket-description__wrapper-children"},T&&r.createElement("div",{className:"image-wrapper"},r.createElement("img",{src:T,alt:l})),N&&d.length>120?r.createElement(c.TextExpand,{className:"ticket-description__container",isExpanded:f,setIsExpanded:g},b()):b())),u&&r.createElement("div",{className:a(k&&"mt-5")},u))};
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),i=require("react"),r=e(i),a=e(require("clsx")),c=require("../../../static/text-expand/TextExpand.js"),s=require("@licklist/core/dist/DataMapper/Media/ImageDataMapper"),n=require("../../../tiptap-editor/TipTapEditor.js"),l=e(require("@licklist/plugins/dist/services/Media/MediaService"));exports.TicketDescription=function(e){var d=e.title,p=e.description,o=e.className,m=void 0===o?"":o,u=e.images,E=e.price,v=e.isRequired,x=void 0!==v&&v,_=e.canExpand,N=void 0===_||_,g=t.__read(i.useState(!1),2),f=g[0],M=g[1],k=!!p,q=a("ticket-description",m),T=u?l.getImageSrc(u,s.THUMBNAIL_IMAGE_SIZE):null,I=function(){return r.createElement("div",{className:"description-content"},r.createElement("div",{className:"d-flex flex-column"},r.createElement("div",{className:"product-title"},d," ",x&&r.createElement("span",null,"*")),k&&r.createElement(n.TipTapEditor,{viewMode:!0,disabled:!0,content:p,editorStyle:{backgroundColor:"transparent"}})))};return r.createElement("div",{className:q},r.createElement("div",{className:"ticket-description__wrapper",style:{"--description-wrapper-height":"inherit"}},r.createElement("div",{className:"ticket-description__wrapper-children"},T&&r.createElement("div",{className:"image-wrapper"},r.createElement("img",{src:T,alt:d})),N&&p.length>120?r.createElement(c.TextExpand,{className:"ticket-description__container",isExpanded:f,setIsExpanded:M},I()):I())),E&&r.createElement("div",{className:a(k&&"mt-5")},E))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.44.486-dev.54",
3
+ "version": "0.44.486-dev.55",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -19,7 +19,10 @@ export const Default: Story = () => {
19
19
  If you are a student at Bucks University you do not need to buy a ticket,
20
20
  your general admission is included as part of the Big Deal packages."
21
21
  images={[
22
- { id: 1, path: "https://source.unsplash.com/random" } as Image,
22
+ {
23
+ id: 1,
24
+ url: "https://cdn.lickli.st/ZH4SRqrufMqcC8S1TWR3ELz9FU45he1t/images/original/000/000/000/000/481-b7e137ca90c91e24.jpeg",
25
+ } as Image,
23
26
  ]}
24
27
  />
25
28
  </div>
@@ -38,7 +41,10 @@ export const Highlighted: Story = () => {
38
41
  If you are a student at Bucks University you do not need to buy a ticket,
39
42
  your general admission is included as part of the Big Deal packages."
40
43
  images={[
41
- { id: 1, path: "https://source.unsplash.com/random" } as Image,
44
+ {
45
+ id: 1,
46
+ url: "https://cdn.lickli.st/ZH4SRqrufMqcC8S1TWR3ELz9FU45he1t/images/original/000/000/000/000/481-b7e137ca90c91e24.jpeg",
47
+ } as Image,
42
48
  ]}
43
49
  />
44
50
  </div>
@@ -1,6 +1,9 @@
1
1
  import React, { CSSProperties, ReactNode, useState } from "react";
2
2
  import clsx from "clsx";
3
- import { Image } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
3
+ import {
4
+ Image,
5
+ THUMBNAIL_IMAGE_SIZE,
6
+ } from "@licklist/core/dist/DataMapper/Media/ImageDataMapper";
4
7
  import MediaService from "@licklist/plugins/dist/services/Media/MediaService";
5
8
  import { TextExpand } from "../../../static/text-expand";
6
9
  import { TipTapEditor } from "../../../tiptap-editor/TipTapEditor";
@@ -31,7 +34,9 @@ export function TicketDescription({
31
34
 
32
35
  const wrapperClasses = clsx("ticket-description", className);
33
36
 
34
- const imageSrc = images ? MediaService.getImageSrc(images) : null;
37
+ const imageSrc = images
38
+ ? MediaService.getImageSrc(images, THUMBNAIL_IMAGE_SIZE)
39
+ : null;
35
40
 
36
41
  const descriptionWrapperStyle = {
37
42
  "--description-wrapper-height": "inherit",