@bbl-digital/snorre 4.3.21 → 4.3.23

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.
@@ -31,7 +31,8 @@ const NoticeCard = ({
31
31
  onAttachmentDownload,
32
32
  onEventDownload,
33
33
  onModalClose,
34
- variant = 'portal'
34
+ variant = 'portal',
35
+ createdByRole = 'board'
35
36
  }) => {
36
37
  const [open, setOpen] = (0, _react2.useState)(!!showAllContent);
37
38
  const theme = (0, _react.useTheme)();
@@ -53,7 +54,8 @@ const NoticeCard = ({
53
54
  created: notice.createdDate,
54
55
  updated: notice.updatedDate,
55
56
  createdBy: notice.createdBy,
56
- variant: variant
57
+ variant: variant,
58
+ createdByRole: createdByRole
57
59
  })
58
60
  }), notice.bodyHtml && notice.bodyHtml.length <= 2000 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Div, {
59
61
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Html.default, {
@@ -16,7 +16,8 @@ const NoticeMetaInfo = ({
16
16
  hasAttachment,
17
17
  hasEvent,
18
18
  createdBy,
19
- variant = 'portal'
19
+ variant = 'portal',
20
+ createdByRole
20
21
  }) => {
21
22
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.NoticeMetaWrapper, {
22
23
  children: [Boolean(createdBy && variant === 'myPage') && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Group, {
@@ -51,6 +52,14 @@ const NoticeMetaInfo = ({
51
52
  size: "18px"
52
53
  })
53
54
  })]
55
+ }), createdByRole && variant === 'myPage' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TagWrapper, {
56
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Tag, {
57
+ light: true,
58
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Text, {
59
+ size: "14px",
60
+ children: createdByRole === 'board' ? 'Styret' : 'Beboer'
61
+ })
62
+ })
54
63
  })]
55
64
  });
56
65
  };
@@ -3,27 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.NoticeMetaWrapper = exports.Group = exports.Div = void 0;
6
+ exports.TagWrapper = exports.NoticeMetaWrapper = exports.Group = exports.Div = void 0;
7
7
  var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
10
10
  const NoticeMetaWrapper = exports.NoticeMetaWrapper = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
11
- target: "evjeu6p2"
11
+ target: "evjeu6p3"
12
12
  } : {
13
- target: "evjeu6p2",
13
+ target: "evjeu6p3",
14
14
  label: "NoticeMetaWrapper"
15
15
  })(process.env.NODE_ENV === "production" ? {
16
- name: "zjik7",
17
- styles: "display:flex"
16
+ name: "1hi4meq",
17
+ styles: "display:flex;position:relative;width:100%"
18
18
  } : {
19
- name: "zjik7",
20
- styles: "display:flex",
19
+ name: "1hi4meq",
20
+ styles: "display:flex;position:relative;width:100%",
21
21
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
22
  });
23
23
  const Group = exports.Group = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
24
- target: "evjeu6p1"
24
+ target: "evjeu6p2"
25
25
  } : {
26
- target: "evjeu6p1",
26
+ target: "evjeu6p2",
27
27
  label: "Group"
28
28
  })(process.env.NODE_ENV === "production" ? {
29
29
  name: "7bcib0",
@@ -34,8 +34,21 @@ const Group = exports.Group = /*#__PURE__*/(0, _base.default)("div", process.env
34
34
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
35
35
  });
36
36
  const Div = exports.Div = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
37
+ target: "evjeu6p1"
38
+ } : {
39
+ target: "evjeu6p1",
40
+ label: "Div"
41
+ })();
42
+ const TagWrapper = exports.TagWrapper = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
37
43
  target: "evjeu6p0"
38
44
  } : {
39
45
  target: "evjeu6p0",
40
- label: "Div"
41
- })();
46
+ label: "TagWrapper"
47
+ })(process.env.NODE_ENV === "production" ? {
48
+ name: "62ofw5",
49
+ styles: "justify-self:flex-end;margin-left:auto"
50
+ } : {
51
+ name: "62ofw5",
52
+ styles: "justify-self:flex-end;margin-left:auto",
53
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
54
+ });
@@ -19,6 +19,8 @@ interface IProps {
19
19
  onAttachmentDownload?: (attachment: INoticeAttachment) => void;
20
20
  /** Variant of the notice */
21
21
  variant?: 'portal' | 'myPage';
22
+ /** Role of the createdBy */
23
+ createdByRole?: 'resident' | 'board';
22
24
  }
23
25
  declare const NoticeCard: FC<IProps>;
24
26
  export default NoticeCard;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/packages/core/NoticeCard/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,EAAY,MAAM,OAAO,CAAA;AAQ3C,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAA;AAOrD,UAAU,MAAM;IACd,iBAAiB;IACjB,MAAM,EAAE,OAAO,CAAA;IACf,8BAA8B;IAC9B,cAAc,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAA;IAC7C,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kCAAkC;IAClC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,2BAA2B;IAC3B,eAAe,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@ const NoticeCard = ({
31
31
  onAttachmentDownload,
32
32
  onEventDownload,
33
33
  onModalClose,
34
- variant = 'portal'
34
+ variant = 'portal',
35
+ createdByRole = 'board'
35
36
  }) => {
36
37
  const [open, setOpen] = (0, _react2.useState)(!!showAllContent);
37
38
  const theme = (0, _react.useTheme)();
@@ -53,7 +54,8 @@ const NoticeCard = ({
53
54
  created: notice.createdDate,
54
55
  updated: notice.updatedDate,
55
56
  createdBy: notice.createdBy,
56
- variant: variant
57
+ variant: variant,
58
+ createdByRole: createdByRole
57
59
  })
58
60
  }), notice.bodyHtml && notice.bodyHtml.length <= 2000 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.Div, {
59
61
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Html.default, {
@@ -6,6 +6,7 @@ interface IProps {
6
6
  hasEvent?: boolean;
7
7
  createdBy?: string;
8
8
  variant: 'portal' | 'myPage';
9
+ createdByRole?: 'resident' | 'board';
9
10
  }
10
11
  declare const NoticeMetaInfo: React.FC<IProps>;
11
12
  export default NoticeMetaInfo;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/core/NoticeCard/privateComponents/NoticeMetaInfo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,UAAU,MAAM;IACd,OAAO,EAAE,IAAI,CAAA;IACb,OAAO,EAAE,IAAI,CAAA;IACb,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAA;CAC7B;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CA2CpC,CAAA;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/packages/core/NoticeCard/privateComponents/NoticeMetaInfo/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,UAAU,MAAM;IACd,OAAO,EAAE,IAAI,CAAA;IACb,OAAO,EAAE,IAAI,CAAA;IACb,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,QAAQ,GAAG,QAAQ,CAAA;IAC5B,aAAa,CAAC,EAAE,UAAU,GAAG,OAAO,CAAA;CACrC;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,MAAM,CAqDpC,CAAA;AAED,eAAe,cAAc,CAAA"}
@@ -16,7 +16,8 @@ const NoticeMetaInfo = ({
16
16
  hasAttachment,
17
17
  hasEvent,
18
18
  createdBy,
19
- variant = 'portal'
19
+ variant = 'portal',
20
+ createdByRole
20
21
  }) => {
21
22
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.NoticeMetaWrapper, {
22
23
  children: [Boolean(createdBy && variant === 'myPage') && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styles.Group, {
@@ -51,6 +52,14 @@ const NoticeMetaInfo = ({
51
52
  size: "18px"
52
53
  })
53
54
  })]
55
+ }), createdByRole && variant === 'myPage' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_styles.TagWrapper, {
56
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Tag, {
57
+ light: true,
58
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_.Text, {
59
+ size: "14px",
60
+ children: createdByRole === 'board' ? 'Styret' : 'Beboer'
61
+ })
62
+ })
54
63
  })]
55
64
  });
56
65
  };
@@ -10,4 +10,8 @@ export declare const Div: import("@emotion/styled").StyledComponent<{
10
10
  theme?: import("@emotion/react").Theme;
11
11
  as?: React.ElementType;
12
12
  }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
+ export declare const TagWrapper: import("@emotion/styled").StyledComponent<{
14
+ theme?: import("@emotion/react").Theme;
15
+ as?: React.ElementType;
16
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
13
17
  //# sourceMappingURL=styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/packages/core/NoticeCard/privateComponents/NoticeMetaInfo/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;SAakP,MAAO,WAAW;yGAXjS,CAAA;AAED,eAAO,MAAM,KAAK;;SAS8P,MAAO,WAAW;yGAHjS,CAAA;AAED,eAAO,MAAM,GAAG;;SACgQ,MAAO,WAAW;yGADnQ,CAAA"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../../src/packages/core/NoticeCard/privateComponents/NoticeMetaInfo/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;SAoBqH,MAAO,WAAW;yGAhBpK,CAAA;AAED,eAAO,MAAM,KAAK;;SAciI,MAAO,WAAW;yGARpK,CAAA;AAED,eAAO,MAAM,GAAG;;SAMmI,MAAO,WAAW;yGANtI,CAAA;AAE/B,eAAO,MAAM,UAAU;;SAI4H,MAAO,WAAW;yGADpK,CAAA"}
@@ -3,27 +3,27 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.NoticeMetaWrapper = exports.Group = exports.Div = void 0;
6
+ exports.TagWrapper = exports.NoticeMetaWrapper = exports.Group = exports.Div = void 0;
7
7
  var _base = _interopRequireDefault(require("@emotion/styled/base"));
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
9
  function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
10
10
  const NoticeMetaWrapper = exports.NoticeMetaWrapper = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
11
- target: "evjeu6p2"
11
+ target: "evjeu6p3"
12
12
  } : {
13
- target: "evjeu6p2",
13
+ target: "evjeu6p3",
14
14
  label: "NoticeMetaWrapper"
15
15
  })(process.env.NODE_ENV === "production" ? {
16
- name: "zjik7",
17
- styles: "display:flex"
16
+ name: "1hi4meq",
17
+ styles: "display:flex;position:relative;width:100%"
18
18
  } : {
19
- name: "zjik7",
20
- styles: "display:flex",
19
+ name: "1hi4meq",
20
+ styles: "display:flex;position:relative;width:100%",
21
21
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
22
22
  });
23
23
  const Group = exports.Group = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
24
- target: "evjeu6p1"
24
+ target: "evjeu6p2"
25
25
  } : {
26
- target: "evjeu6p1",
26
+ target: "evjeu6p2",
27
27
  label: "Group"
28
28
  })(process.env.NODE_ENV === "production" ? {
29
29
  name: "7bcib0",
@@ -34,8 +34,21 @@ const Group = exports.Group = /*#__PURE__*/(0, _base.default)("div", process.env
34
34
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
35
35
  });
36
36
  const Div = exports.Div = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
37
+ target: "evjeu6p1"
38
+ } : {
39
+ target: "evjeu6p1",
40
+ label: "Div"
41
+ })();
42
+ const TagWrapper = exports.TagWrapper = /*#__PURE__*/(0, _base.default)("div", process.env.NODE_ENV === "production" ? {
37
43
  target: "evjeu6p0"
38
44
  } : {
39
45
  target: "evjeu6p0",
40
- label: "Div"
41
- })();
46
+ label: "TagWrapper"
47
+ })(process.env.NODE_ENV === "production" ? {
48
+ name: "62ofw5",
49
+ styles: "justify-self:flex-end;margin-left:auto"
50
+ } : {
51
+ name: "62ofw5",
52
+ styles: "justify-self:flex-end;margin-left:auto",
53
+ toString: _EMOTION_STRINGIFIED_CSS_ERROR__
54
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bbl-digital/snorre",
3
- "version": "4.3.21",
3
+ "version": "4.3.23",
4
4
  "description": "Design library for BBL Digital",
5
5
  "license": "MIT",
6
6
  "main": "./lib/index.js",