oa-componentbook 0.18.13 → 0.18.14

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.
@@ -61,7 +61,7 @@ function ApprovalWidget(_ref) {
61
61
  className: isQuestionStyleWidget ? 'col-sm-12 col-md-12 col-lg-12' : 'col-sm-12 col-md-8 col-lg-8 gutter'
62
62
  }, title && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("h4", {
63
63
  className: "type-b2-400"
64
- }, title, isMandatory && /*#__PURE__*/_react.default.createElement(_styles.RedText, null, "*"))), description && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
64
+ }, title, isMandatory && /*#__PURE__*/_react.default.createElement(_styles.RedText, null, "*"))), description && /*#__PURE__*/_react.default.createElement(_styles.Styledescription, null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
65
65
  typography: "type-b2-400",
66
66
  color: "secondary-content"
67
67
  }, description)), viewOnClick && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
@@ -3,10 +3,11 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledContainer = exports.RedText = void 0;
6
+ exports.Styledescription = exports.StyledContainer = exports.RedText = void 0;
7
7
  var _styledComponents = _interopRequireDefault(require("styled-components"));
8
- var _templateObject, _templateObject2;
8
+ var _templateObject, _templateObject2, _templateObject3;
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
10
  function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
11
- const StyledContainer = exports.StyledContainer = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\nlabel.ant-radio-wrapper:first-child{\n margin-inline-end: 32px;\n}\n .container {\n margin-bottom: 16px;\n }\n\n h4{\n padding: 0 0 4px;\n }\n.view-button {\n justify-content: start;\n}\n .ant-form-item.custom-radio-group {\n margin-bottom: 12px;\n }\n\n .ant-divider-horizontal {\n margin: 0px 0px 16px;\n }\n\n .ant-form-item .ant-form-item-control-input {\n min-height: auto;\n }\n\n .ant-radio-group-outline {\n display: flex;\n justify-content: start;\n }\n\n textarea {\n padding: 16px; \n min-height: 88px;\n resize: none;\n border-radius: 4px;\n border: 1px solid var(--color-placeholder-text);\n }\n\n h5 {\n margin: 0 0 4px;\n color: var(--color-primary-content);\n }\n\n radiofield label {\n white-space: nowrap;\n }\n\n docdetailstag a {\n white-space: nowrap;\n }\n\n .view-button {\n margin: 8px 0 12px;\n }\n \n"])));
12
- const RedText = exports.RedText = _styledComponents.default.span(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: inline-block;\n color: red;\n margin-left: 4px;\n"])));
11
+ const Styledescription = exports.Styledescription = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n padding: 0 0 8px;\n"])));
12
+ const StyledContainer = exports.StyledContainer = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n padding: 0 0 16px;\nlabel.ant-radio-wrapper:first-child{\n margin-inline-end: 32px;\n}\n .container {\n margin-bottom: 16px;\n }\n\n h4{\n padding: 0 0 4px;\n }\n.view-button {\n justify-content: start;\n}\n .ant-form-item.custom-radio-group {\n margin-bottom: 12px;\n }\n\n .ant-divider-horizontal {\n margin: 16px 0px 0px;\n }\n\n .ant-form-item .ant-form-item-control-input {\n min-height: auto;\n }\n\n .ant-radio-group-outline {\n display: flex;\n justify-content: start;\n }\n\n textarea {\n padding: 16px; \n min-height: 88px;\n resize: none;\n border-radius: 4px;\n border: 1px solid var(--color-placeholder-text);\n }\n\n h5 {\n margin: 0 0 4px;\n color: var(--color-primary-content);\n }\n\n radiofield label {\n white-space: nowrap;\n }\n\n docdetailstag a {\n white-space: nowrap;\n }\n \n"])));
13
+ const RedText = exports.RedText = _styledComponents.default.span(_templateObject3 || (_templateObject3 = _taggedTemplateLiteral(["\n display: inline-block;\n color: red;\n margin-left: 4px;\n"])));
@@ -14,12 +14,12 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
14
14
  var _relativeTime = _interopRequireDefault(require("dayjs/plugin/relativeTime"));
15
15
  var _lodash = require("lodash");
16
16
  var _react = _interopRequireWildcard(require("react"));
17
- var _TextArea = _interopRequireDefault(require("../../components/oa-component-textarea/TextArea"));
18
17
  var _icons = require("@material-ui/icons");
18
+ var _system = require("@material-ui/system");
19
+ var _TextArea = _interopRequireDefault(require("../../components/oa-component-textarea/TextArea"));
19
20
  var _CustomButton = _interopRequireDefault(require("../../components/oa-component-button/CustomButton"));
20
21
  var _CustomDrawer = _interopRequireDefault(require("../../components/oa-component-drawer/CustomDrawer"));
21
22
  var _Typography = _interopRequireDefault(require("../../components/oa-component-typography/Typography"));
22
- var _system = require("@material-ui/system");
23
23
  var _templateObject;
24
24
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
25
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -80,108 +80,104 @@ function ChatWidget(_ref) {
80
80
  title: headerTitle,
81
81
  footer: /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
82
82
  className: "type-b2-400",
83
- color: 'primary-content'
83
+ color: "primary-content"
84
84
  }, "Reply to Query"), /*#__PURE__*/_react.default.createElement(_TextArea.default, {
85
85
  name: "message",
86
86
  value: message,
87
- placeholder: 'Type here...',
87
+ placeholder: "Type here...",
88
88
  onChange: e => setMessage(e.target.value)
89
89
  }), /*#__PURE__*/_react.default.createElement("aside", null, /*#__PURE__*/_react.default.createElement(_CustomButton.default, {
90
90
  onClick: onMsgSend,
91
- size: 'medium',
92
- label: 'Send Reply'
91
+ size: "medium",
92
+ label: "Send Reply"
93
93
  })))
94
94
  }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, {
95
95
  color: "primary-content",
96
96
  className: "type-t1-500"
97
- }, bodyTitle), /*#__PURE__*/_react.default.createElement("div", null, isContentLoading ? [...Array((0, _lodash.random)(2, 5))].map((_, ind) => {
98
- return ind % 2 ?
99
- /*#__PURE__*/
100
- // Info : This container is to show the loading of the chats (our chats) in the right side of chat body while chats are fetching.
101
- _react.default.createElement(_antd.Skeleton, {
102
- loading: isContentLoading,
103
- avatar: true,
104
- active: true,
105
- title: false,
106
- style: {
107
- backgroundColor: "red"
108
- }
109
- }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, null, (0, _dayjs.default)().fromNow())))) :
110
- /*#__PURE__*/
111
- // Info : This container is to show the loading of the chats (other user) in the left side of chat body while chats are fetching.
112
- _react.default.createElement(_antd.Skeleton, {
113
- loading: isContentLoading,
114
- avatar: true,
115
- active: true,
116
- title: false,
117
- style: {
118
- transform: "scale(-1, 1)"
119
- }
120
- }, /*#__PURE__*/_react.default.createElement("div", {
121
- flexDirection: "column",
122
- style: _objectSpread({}, stylesObj.chatUi),
123
- gap: "2px"
124
- }, /*#__PURE__*/_react.default.createElement("div", {
125
- style: _objectSpread({
126
- display: "flex",
127
- flexDirection: "column",
128
- gap: '2px'
129
- }, stylesObj.chatUi)
130
- }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
131
- type: "secondary",
132
- style: {
133
- fontSize: "10px",
134
- alignSelf: "flex-end",
135
- width: "fit-content"
136
- }
137
- }, (0, _dayjs.default)().fromNow()))));
138
- }) : queryMessages !== null && queryMessages !== void 0 && queryMessages.length ? queryMessages.map(message => {
139
- return message.isUser ?
140
- /*#__PURE__*/
141
- // Info : This is the chat box of right side which will show messages from user.
142
- _react.default.createElement("div", {
143
- style: {
144
- display: 'flex',
145
- alignItems: 'flex-start',
146
- justifyContent: 'flex-end'
147
- }
148
- }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
149
- style: _objectSpread(_objectSpread({
150
- display: "flex",
151
- flexDirection: "column",
152
- gap: '2px'
153
- }, stylesObj.chatUi), {}, {
154
- backgroundColor: '#f6f6f6'
155
- })
156
- }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
157
- className: "type-b1-400",
158
- color: 'primary-content'
159
- }, message.message)), /*#__PURE__*/_react.default.createElement(_Typography.default, {
160
- className: "type-sl1-700",
161
- color: 'secondary-content'
162
- }, message.createdAt))) :
163
- /*#__PURE__*/
164
- // Info : This is the chat box of left side which will show messages from other user.
165
- _react.default.createElement("div", {
166
- style: {
167
- display: 'flex',
168
- alignItems: 'flex-start',
169
- flexDirection: 'column'
170
- }
171
- }, /*#__PURE__*/_react.default.createElement("div", {
172
- style: _objectSpread({
173
- display: 'flex',
174
- flexDirection: 'column',
175
- gap: '2px'
176
- }, stylesObj.chatUi)
177
- }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
178
- className: "type-b1-400",
179
- color: 'primary-content'
180
- }, message.message)), /*#__PURE__*/_react.default.createElement(_Typography.default, {
181
- className: "type-sl1-700",
182
- color: 'secondary-content'
183
- }, message.createdAt));
184
- }) : /*#__PURE__*/_react.default.createElement(_antd.Alert, {
97
+ }, bodyTitle), /*#__PURE__*/_react.default.createElement("div", null, isContentLoading ? [...Array((0, _lodash.random)(2, 5))].map((_, ind) => ind % 2 ?
98
+ /*#__PURE__*/
99
+ // Info : This container is to show the loading of the chats (our chats) in the right side of chat body while chats are fetching.
100
+ _react.default.createElement(_antd.Skeleton, {
101
+ loading: isContentLoading,
102
+ avatar: true,
103
+ active: true,
104
+ title: false,
105
+ style: {
106
+ backgroundColor: 'red'
107
+ }
108
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Typography.default, null, (0, _dayjs.default)().fromNow())))) :
109
+ /*#__PURE__*/
110
+ // Info : This container is to show the loading of the chats (other user) in the left side of chat body while chats are fetching.
111
+ _react.default.createElement(_antd.Skeleton, {
112
+ loading: isContentLoading,
113
+ avatar: true,
114
+ active: true,
115
+ title: false,
116
+ style: {
117
+ transform: 'scale(-1, 1)'
118
+ }
119
+ }, /*#__PURE__*/_react.default.createElement("div", {
120
+ flexDirection: "column",
121
+ style: _objectSpread({}, stylesObj.chatUi),
122
+ gap: "2px"
123
+ }, /*#__PURE__*/_react.default.createElement("div", {
124
+ style: _objectSpread({
125
+ display: 'flex',
126
+ flexDirection: 'column',
127
+ gap: '2px'
128
+ }, stylesObj.chatUi)
129
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
130
+ type: "secondary",
131
+ style: {
132
+ fontSize: '10px',
133
+ alignSelf: 'flex-end',
134
+ width: 'fit-content'
135
+ }
136
+ }, (0, _dayjs.default)().fromNow()))))) : queryMessages !== null && queryMessages !== void 0 && queryMessages.length ? queryMessages.map(message => message.isUser ?
137
+ /*#__PURE__*/
138
+ // Info : This is the chat box of right side which will show messages from user.
139
+ _react.default.createElement("div", {
140
+ style: {
141
+ display: 'flex',
142
+ alignItems: 'flex-start',
143
+ justifyContent: 'flex-end'
144
+ }
145
+ }, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
146
+ style: _objectSpread(_objectSpread({
147
+ display: 'flex',
148
+ flexDirection: 'column',
149
+ gap: '2px'
150
+ }, stylesObj.chatUi), {}, {
151
+ backgroundColor: '#f6f6f6'
152
+ })
153
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
154
+ className: "type-b1-400",
155
+ color: "primary-content"
156
+ }, message.message)), /*#__PURE__*/_react.default.createElement(_Typography.default, {
157
+ className: "type-sl1-700",
158
+ color: "secondary-content"
159
+ }, message.createdAt))) :
160
+ /*#__PURE__*/
161
+ // Info : This is the chat box of left side which will show messages from other user.
162
+ _react.default.createElement("div", {
163
+ style: {
164
+ display: 'flex',
165
+ alignItems: 'flex-start',
166
+ flexDirection: 'column'
167
+ }
168
+ }, /*#__PURE__*/_react.default.createElement("div", {
169
+ style: _objectSpread({
170
+ display: 'flex',
171
+ flexDirection: 'column',
172
+ gap: '2px'
173
+ }, stylesObj.chatUi)
174
+ }, /*#__PURE__*/_react.default.createElement(_Typography.default, {
175
+ className: "type-b1-400",
176
+ color: "primary-content"
177
+ }, message.message)), /*#__PURE__*/_react.default.createElement(_Typography.default, {
178
+ className: "type-sl1-700",
179
+ color: "secondary-content"
180
+ }, message.createdAt))) : /*#__PURE__*/_react.default.createElement(_antd.Alert, {
185
181
  type: "info",
186
182
  message: "Send a chat to start your chat history for this ticket."
187
183
  }))));
@@ -203,7 +199,7 @@ ChatWidget.defaultProps = {
203
199
  isContentLoading: true,
204
200
  headerTitle: 'VIEW OR REPLY TO QUERY',
205
201
  bodyTitle: 'Purchase Invoice',
206
- onMessageInput: msg => alert('This is your msg :' + msg),
202
+ onMessageInput: msg => alert("This is your msg :".concat(msg)),
207
203
  initialMsg: '',
208
204
  clearInput: true,
209
205
  queryMessages: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oa-componentbook",
3
- "version": "0.18.13",
3
+ "version": "0.18.14",
4
4
  "private": false,
5
5
  "description": "Reusable components",
6
6
  "main": "build/index.js",