@licklist/design 0.44.482 → 0.44.483

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":"NotesTableRow.d.ts","sourceRoot":"","sources":["../../../src/sales/notes/NotesTableRow.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAQ3E,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,QAAQ,oCAAqC,aAAa,gBA0EtE,CAAC"}
1
+ {"version":3,"file":"NotesTableRow.d.ts","sourceRoot":"","sources":["../../../src/sales/notes/NotesTableRow.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAY3E,oBAAY,aAAa,GAAG;IAC1B,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,YAAY,EAAE,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;CAC5C,CAAC;AAEF,eAAO,MAAM,QAAQ,oCAAqC,aAAa,gBA2EtE,CAAC"}
@@ -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"),r=require("react"),a=e(r),n=require("@licklist/core/dist/Config"),o=require("react-i18next"),l=require("react-bootstrap"),i=require("../../static/Icon.js"),s=require("@react-aria/utils"),c=e(require("clsx")),u=require("luxon");require("../../static/index.js");var m=require("lodash"),d=require("../../modals/confirmation/ConfirmModal.js");require("../../modals/dialog/Dialog.js"),require("../../modals/dialog/DialogContext.js");var p=require("../../table/MenuButton.js");require("../../table/FilterHelperComponent.js"),require("../../table/PaginationHelperComponent.js"),require("../../table/PerPageHelperComponent.js"),require("../../table/StaticTable.js"),require("../../table/TableHelperComponent.js");exports.TableRow=function(e){var f=e.note,q=e.onClick,b=e.onDeleteNote,E=o.useTranslation("Design").t,g=s.useId(),v=t.__read(r.useState(!1),2),C=v[0],j=v[1],N=u.DateTime.fromFormat(f.updatedAt,n.DATE_TIME_FULL_FORMAT).toFormat(n.DATE_FORMAT);return a.createElement("tr",{onClick:q},a.createElement("td",{className:"note-content"},f.note),a.createElement("td",{className:"note-author"},m.capitalize(f.user.firstName)," ",m.capitalize(f.user.lastName)),a.createElement("td",{className:"note-date"},N),a.createElement("td",null,a.createElement("div",{className:"controls"},a.createElement("span",{className:"btn btn-sm eye"},a.createElement(i.default,{type:"eye",width:"20"})),a.createElement(l.OverlayTrigger,{trigger:"click",placement:"bottom",rootClose:!0,overlay:a.createElement(l.Popover,{id:g,className:c("product-set-card-popover",!C&&"d-none")},a.createElement(l.Popover.Content,{as:l.ListGroup,className:"product-set-card-menu",variant:"flush"},a.createElement(l.ListGroup.Item,{action:!0,className:"text-danger",as:"div"},a.createElement(d.ConfirmModal,null,(function(e){return a.createElement(p.MenuButton,{onClick:function(){j(!1),e((function(){return b(f.id)}))},name:E("remove"),icon:"trash-alt",className:"product-set-card-menu-item-text d-flex w-100 align-items-center",rightIcon:!0})})))))},a.createElement("button",{type:"button",className:"product-set-card-menu-button",onClick:function(e){e.stopPropagation(),j(!0)}},a.createElement(i.default,{type:"ellipsis-h"}))))))};
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"),r=require("react"),a=e(r),n=require("@licklist/core/dist/Config"),o=require("react-i18next"),i=require("react-bootstrap"),l=require("../../static/Icon.js"),s=require("@react-aria/utils"),c=e(require("clsx")),u=require("luxon");require("../../static/index.js");var m=require("lodash"),d=require("../../modals/confirmation/ConfirmModal.js");require("../../modals/dialog/Dialog.js"),require("../../modals/dialog/DialogContext.js");var p=require("../../table/MenuButton.js"),q=require("@licklist/core/dist/Services");require("../../table/FilterHelperComponent.js"),require("../../table/PaginationHelperComponent.js"),require("../../table/PerPageHelperComponent.js"),require("../../table/StaticTable.js"),require("../../table/TableHelperComponent.js");exports.TableRow=function(e){var f=e.note,E=e.onClick,b=e.onDeleteNote,g=o.useTranslation("Design").t,v=s.useId(),C=t.__read(r.useState(!1),2),j=C[0],N=C[1],T=u.DateTime.fromFormat(f.updatedAt,n.DATE_TIME_FULL_FORMAT,{zone:"utc"}).setZone(q.getClientTimeZone()).toFormat(n.DATE_TIME_FORMAT);return a.createElement("tr",{onClick:E},a.createElement("td",{className:"note-content"},f.note),a.createElement("td",{className:"note-author"},m.capitalize(f.user.firstName)," ",m.capitalize(f.user.lastName)),a.createElement("td",{className:"note-date"},T),a.createElement("td",null,a.createElement("div",{className:"controls"},a.createElement("span",{className:"btn btn-sm eye"},a.createElement(l.default,{type:"eye",width:"20"})),a.createElement(i.OverlayTrigger,{trigger:"click",placement:"bottom",rootClose:!0,overlay:a.createElement(i.Popover,{id:v,className:c("product-set-card-popover",!j&&"d-none")},a.createElement(i.Popover.Content,{as:i.ListGroup,className:"product-set-card-menu",variant:"flush"},a.createElement(i.ListGroup.Item,{action:!0,className:"text-danger",as:"div"},a.createElement(d.ConfirmModal,null,(function(e){return a.createElement(p.MenuButton,{onClick:function(){N(!1),e((function(){return b(f.id)}))},name:g("remove"),icon:"trash-alt",className:"product-set-card-menu-item-text d-flex w-100 align-items-center",rightIcon:!0})})))))},a.createElement("button",{type:"button",className:"product-set-card-menu-button",onClick:function(e){e.stopPropagation(),N(!0)}},a.createElement(l.default,{type:"ellipsis-h"}))))))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.44.482",
3
+ "version": "0.44.483",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -6,7 +6,11 @@ import { useTranslation } from "react-i18next";
6
6
  import { Note } from "@licklist/core/dist/DataMapper/Order/NoteDataMapper";
7
7
  import { capitalize } from "lodash";
8
8
  import { DateTime } from "luxon";
9
- import { DATE_FORMAT, DATE_TIME_FULL_FORMAT } from "@licklist/core/dist/Config";
9
+ import {
10
+ DATE_TIME_FULL_FORMAT,
11
+ DATE_TIME_FORMAT,
12
+ } from "@licklist/core/dist/Config";
13
+ import { getClientTimeZone } from "@licklist/core/dist/Services";
10
14
  import { ConfirmModal } from "../../modals";
11
15
  import { MenuButton } from "../../table";
12
16
  import { Icon } from "../../static";
@@ -22,10 +26,11 @@ export const TableRow = ({ note, onClick, onDeleteNote }: TableRowProps) => {
22
26
  const popoverId = useId();
23
27
  const [isOverlayVisibile, setIsOverlayVisible] = useState(false);
24
28
 
25
- const date = DateTime.fromFormat(
26
- note.updatedAt,
27
- DATE_TIME_FULL_FORMAT
28
- ).toFormat(DATE_FORMAT);
29
+ const date = DateTime.fromFormat(note.updatedAt, DATE_TIME_FULL_FORMAT, {
30
+ zone: "utc",
31
+ })
32
+ .setZone(getClientTimeZone())
33
+ .toFormat(DATE_TIME_FORMAT);
29
34
 
30
35
  return (
31
36
  <tr onClick={onClick}>