tenjin-ui-kit 0.3.72 → 0.3.73

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.
Files changed (85) hide show
  1. package/common/hooks/apiHooks.js +14 -54
  2. package/common/hooks/newApiHook.js +32 -81
  3. package/components/Canvas.js +27 -32
  4. package/components/DragBox/index.js +16 -21
  5. package/components/InputWithChip/index.js +31 -43
  6. package/components/RightContext/index.js +6 -21
  7. package/components/WorkFlow.js +16 -21
  8. package/components/WorkFlowBuilder.js +22 -31
  9. package/components/alert/index.js +3 -7
  10. package/components/attachment/index.js +6 -4
  11. package/components/authenticationProvider/index.js +11 -27
  12. package/components/avatar/index.js +12 -10
  13. package/components/avatar/styles.js +4 -2
  14. package/components/breadCrumbs/index.js +39 -53
  15. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewContent/index.js +3 -1
  16. package/components/browsingTestCaseLayout/DetailsViewLayout/DetailsViewHeader/index.js +4 -2
  17. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewContent/Index.js +5 -3
  18. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/Index.js +4 -2
  19. package/components/browsingTestCaseLayout/TreeViewLayout/TreeViewHeader/style.js +1 -1
  20. package/components/browsingTestCaseLayout/index.js +14 -25
  21. package/components/button/index.js +26 -30
  22. package/components/chatBotModal/index.js +16 -28
  23. package/components/checkBox/index.js +4 -5
  24. package/components/combobox/index.js +37 -50
  25. package/components/divider/index.js +3 -8
  26. package/components/editableField/index.js +8 -26
  27. package/components/errorBoundary/index.js +7 -11
  28. package/components/fileUploader/index.js +28 -35
  29. package/components/fileUploader/style.js +1 -1
  30. package/components/filter/ValueSelector.js +47 -70
  31. package/components/filter/index.js +27 -43
  32. package/components/input/index.js +45 -52
  33. package/components/layout/index.js +22 -31
  34. package/components/layout/main/index.js +4 -2
  35. package/components/layout/pageContent/index.js +3 -1
  36. package/components/layout/sidebar/FlatMenu.js +10 -6
  37. package/components/layout/sidebar/GroupedIconMenu.js +145 -157
  38. package/components/layout/sidebar/GroupedMenu.js +9 -4
  39. package/components/layout/sidebar/ProjectMenu.js +134 -147
  40. package/components/layout/sidebar/index.js +14 -10
  41. package/components/layout/sidebar/style.js +6 -6
  42. package/components/layout/topBar/ProjectTopbar.js +15 -31
  43. package/components/layout/topBar/UserAvatar.js +12 -19
  44. package/components/layout/topBar/index.js +8 -15
  45. package/components/menu/index.js +7 -17
  46. package/components/modal/index.js +10 -11
  47. package/components/modal/style.js +1 -1
  48. package/components/optionMenu/index.js +8 -16
  49. package/components/pagination/index.js +7 -12
  50. package/components/paginationUpdated/index.js +15 -19
  51. package/components/paper/index.js +9 -10
  52. package/components/paper/style.js +2 -2
  53. package/components/reactSelect/index.js +36 -52
  54. package/components/reactSelect/style.js +37 -24
  55. package/components/richTextEditor/index.js +9 -14
  56. package/components/select/GroupedSelect.js +78 -65
  57. package/components/select/SimpleSelect.js +28 -40
  58. package/components/select/index.js +25 -22
  59. package/components/simpleSelect/index.js +10 -11
  60. package/components/sort/index.js +13 -23
  61. package/components/switch/index.js +9 -9
  62. package/components/switch/style.js +6 -6
  63. package/components/switch/switch.js +22 -33
  64. package/components/table/ReactTable.js +16 -23
  65. package/components/table/SimpleTable.js +17 -22
  66. package/components/table/index.js +100 -131
  67. package/components/text/index.js +16 -22
  68. package/components/topBar/index.js +12 -21
  69. package/components/tree/index.js +9 -19
  70. package/components/tree/style.js +1 -1
  71. package/components/valuePicker/ValueSelector.js +31 -45
  72. package/components/valuePicker/index.js +20 -33
  73. package/components/wrapperLayout/layout/index.js +5 -3
  74. package/components/wrapperLayout/main/index.js +5 -3
  75. package/components/wrapperLayout/main/pageContainer/index.js +3 -1
  76. package/components/wrapperLayout/main/sideBar/index.js +101 -115
  77. package/components/wrapperLayout/main/sideBar/style.js +1 -1
  78. package/components/wrapperLayout/topBar/UserAvatar.js +3 -1
  79. package/components/wrapperLayout/topBar/avatar.js +7 -8
  80. package/components/wrapperLayout/topBar/index.js +17 -23
  81. package/components/wrapperLayout/topBar/menuIcon.js +3 -1
  82. package/components/wrapperLayout/topBar/style.js +4 -2
  83. package/http/index.js +13 -16
  84. package/package.json +2 -1
  85. package/templates/listPage/index.js +148 -155
@@ -11,17 +11,6 @@ var _button = _interopRequireDefault(require("../../components/button"));
11
11
  var _input = _interopRequireDefault(require("../../components/input"));
12
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
13
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
18
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
- function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
20
- function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21
- function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
22
- function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
23
- function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
24
- function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
25
14
  const columns = [{
26
15
  name: "id",
27
16
  displayName: "User ID"
@@ -51,166 +40,169 @@ const columns = [{
51
40
  render: d => d.company.name
52
41
  }];
53
42
  const ListPage = _ref => {
54
- let pageTitle = _ref.pageTitle;
55
- const _useState = (0, _react.useState)({
56
- filtered: [],
57
- filter: null,
58
- unfiltered: [{
59
- id: 1,
60
- name: "Leanne Graham",
61
- username: "Bret",
62
- email: "Sincere@april.biz",
63
- address: {
64
- street: "Kulas Light",
65
- suite: "Apt. 556",
66
- city: "Gwenborough",
67
- zipcode: "92998-3874",
68
- geo: {
69
- lat: "-37.3159",
70
- lng: "81.1496"
71
- }
72
- },
73
- phone: "1-770-736-8031 x56442",
74
- website: "hildegard.org",
75
- company: {
76
- name: "Romaguera-Crona",
77
- catchPhrase: "Multi-layered client-server neural-net",
78
- bs: "harness real-time e-markets"
43
+ let {
44
+ pageTitle
45
+ } = _ref;
46
+ const [data, setData] = (0, _react.useState)({
47
+ filtered: [],
48
+ filter: null,
49
+ unfiltered: [{
50
+ id: 1,
51
+ name: "Leanne Graham",
52
+ username: "Bret",
53
+ email: "Sincere@april.biz",
54
+ address: {
55
+ street: "Kulas Light",
56
+ suite: "Apt. 556",
57
+ city: "Gwenborough",
58
+ zipcode: "92998-3874",
59
+ geo: {
60
+ lat: "-37.3159",
61
+ lng: "81.1496"
79
62
  }
80
- }, {
81
- id: 2,
82
- name: "Ervin Howell",
83
- username: "Antonette",
84
- email: "Shanna@melissa.tv",
85
- address: {
86
- street: "Victor Plains",
87
- suite: "Suite 879",
88
- city: "Wisokyburgh",
89
- zipcode: "90566-7771",
90
- geo: {
91
- lat: "-43.9509",
92
- lng: "-34.4618"
93
- }
94
- },
95
- phone: "010-692-6593 x09125",
96
- website: "anastasia.net",
97
- company: {
98
- name: "Deckow-Crist",
99
- catchPhrase: "Proactive didactic contingency",
100
- bs: "synergize scalable supply-chains"
63
+ },
64
+ phone: "1-770-736-8031 x56442",
65
+ website: "hildegard.org",
66
+ company: {
67
+ name: "Romaguera-Crona",
68
+ catchPhrase: "Multi-layered client-server neural-net",
69
+ bs: "harness real-time e-markets"
70
+ }
71
+ }, {
72
+ id: 2,
73
+ name: "Ervin Howell",
74
+ username: "Antonette",
75
+ email: "Shanna@melissa.tv",
76
+ address: {
77
+ street: "Victor Plains",
78
+ suite: "Suite 879",
79
+ city: "Wisokyburgh",
80
+ zipcode: "90566-7771",
81
+ geo: {
82
+ lat: "-43.9509",
83
+ lng: "-34.4618"
101
84
  }
102
- }, {
103
- id: 3,
104
- name: "Clementine Bauch",
105
- username: "Samantha",
106
- email: "Nathan@yesenia.net",
107
- address: {
108
- street: "Douglas Extension",
109
- suite: "Suite 847",
110
- city: "McKenziehaven",
111
- zipcode: "59590-4157",
112
- geo: {
113
- lat: "-68.6102",
114
- lng: "-47.0653"
115
- }
116
- },
117
- phone: "1-463-123-4447",
118
- website: "ramiro.info",
119
- company: {
120
- name: "Romaguera-Jacobson",
121
- catchPhrase: "Face to face bifurcated interface",
122
- bs: "e-enable strategic applications"
85
+ },
86
+ phone: "010-692-6593 x09125",
87
+ website: "anastasia.net",
88
+ company: {
89
+ name: "Deckow-Crist",
90
+ catchPhrase: "Proactive didactic contingency",
91
+ bs: "synergize scalable supply-chains"
92
+ }
93
+ }, {
94
+ id: 3,
95
+ name: "Clementine Bauch",
96
+ username: "Samantha",
97
+ email: "Nathan@yesenia.net",
98
+ address: {
99
+ street: "Douglas Extension",
100
+ suite: "Suite 847",
101
+ city: "McKenziehaven",
102
+ zipcode: "59590-4157",
103
+ geo: {
104
+ lat: "-68.6102",
105
+ lng: "-47.0653"
123
106
  }
124
- }, {
125
- id: 4,
126
- name: "Patricia Lebsack",
127
- username: "Karianne",
128
- email: "Julianne.OConner@kory.org",
129
- address: {
130
- street: "Hoeger Mall",
131
- suite: "Apt. 692",
132
- city: "South Elvis",
133
- zipcode: "53919-4257",
134
- geo: {
135
- lat: "29.4572",
136
- lng: "-164.2990"
137
- }
138
- },
139
- phone: "493-170-9623 x156",
140
- website: "kale.biz",
141
- company: {
142
- name: "Robel-Corkery",
143
- catchPhrase: "Multi-tiered zero tolerance productivity",
144
- bs: "transition cutting-edge web services"
107
+ },
108
+ phone: "1-463-123-4447",
109
+ website: "ramiro.info",
110
+ company: {
111
+ name: "Romaguera-Jacobson",
112
+ catchPhrase: "Face to face bifurcated interface",
113
+ bs: "e-enable strategic applications"
114
+ }
115
+ }, {
116
+ id: 4,
117
+ name: "Patricia Lebsack",
118
+ username: "Karianne",
119
+ email: "Julianne.OConner@kory.org",
120
+ address: {
121
+ street: "Hoeger Mall",
122
+ suite: "Apt. 692",
123
+ city: "South Elvis",
124
+ zipcode: "53919-4257",
125
+ geo: {
126
+ lat: "29.4572",
127
+ lng: "-164.2990"
145
128
  }
146
- }, {
147
- id: 5,
148
- name: "Chelsey Dietrich",
149
- username: "Kamren",
150
- email: "Lucio_Hettinger@annie.ca",
151
- address: {
152
- street: "Skiles Walks",
153
- suite: "Suite 351",
154
- city: "Roscoeview",
155
- zipcode: "33263",
156
- geo: {
157
- lat: "-31.8129",
158
- lng: "62.5342"
159
- }
160
- },
161
- phone: "(254)954-1289",
162
- website: "demarco.info",
163
- company: {
164
- name: "Keebler LLC",
165
- catchPhrase: "User-centric fault-tolerant solution",
166
- bs: "revolutionize end-to-end systems"
129
+ },
130
+ phone: "493-170-9623 x156",
131
+ website: "kale.biz",
132
+ company: {
133
+ name: "Robel-Corkery",
134
+ catchPhrase: "Multi-tiered zero tolerance productivity",
135
+ bs: "transition cutting-edge web services"
136
+ }
137
+ }, {
138
+ id: 5,
139
+ name: "Chelsey Dietrich",
140
+ username: "Kamren",
141
+ email: "Lucio_Hettinger@annie.ca",
142
+ address: {
143
+ street: "Skiles Walks",
144
+ suite: "Suite 351",
145
+ city: "Roscoeview",
146
+ zipcode: "33263",
147
+ geo: {
148
+ lat: "-31.8129",
149
+ lng: "62.5342"
167
150
  }
168
- }, {
169
- id: 6,
170
- name: "Mrs. Dennis Schulist",
171
- username: "Leopoldo_Corkery",
172
- email: "Karley_Dach@jasper.info",
173
- address: {
174
- street: "Norberto Crossing",
175
- suite: "Apt. 950",
176
- city: "South Christy",
177
- zipcode: "23505-1337",
178
- geo: {
179
- lat: "-71.4197",
180
- lng: "71.7478"
181
- }
182
- },
183
- phone: "1-477-935-8478 x6430",
184
- website: "ola.org",
185
- company: {
186
- name: "Considine-Lockman",
187
- catchPhrase: "Synchronised bottom-line interface",
188
- bs: "e-enable innovative applications"
151
+ },
152
+ phone: "(254)954-1289",
153
+ website: "demarco.info",
154
+ company: {
155
+ name: "Keebler LLC",
156
+ catchPhrase: "User-centric fault-tolerant solution",
157
+ bs: "revolutionize end-to-end systems"
158
+ }
159
+ }, {
160
+ id: 6,
161
+ name: "Mrs. Dennis Schulist",
162
+ username: "Leopoldo_Corkery",
163
+ email: "Karley_Dach@jasper.info",
164
+ address: {
165
+ street: "Norberto Crossing",
166
+ suite: "Apt. 950",
167
+ city: "South Christy",
168
+ zipcode: "23505-1337",
169
+ geo: {
170
+ lat: "-71.4197",
171
+ lng: "71.7478"
189
172
  }
190
- }]
191
- }),
192
- _useState2 = _slicedToArray(_useState, 2),
193
- data = _useState2[0],
194
- setData = _useState2[1];
173
+ },
174
+ phone: "1-477-935-8478 x6430",
175
+ website: "ola.org",
176
+ company: {
177
+ name: "Considine-Lockman",
178
+ catchPhrase: "Synchronised bottom-line interface",
179
+ bs: "e-enable innovative applications"
180
+ }
181
+ }]
182
+ });
195
183
  (0, _react.useEffect)(() => {
196
184
  search();
197
185
  // eslint-disable-next-line react-hooks/exhaustive-deps
198
186
  }, [data.unfiltered, data.filter]);
199
187
  const search = () => {
200
188
  if (data.filter) {
201
- const filter = data.filter,
202
- unfiltered = data.unfiltered;
189
+ const {
190
+ filter,
191
+ unfiltered
192
+ } = data;
203
193
  let newFiltered = unfiltered.filter(u => {
204
- let mergedData = "".concat(u.id).concat(u.username.toLowerCase()).concat(u.email.toLowerCase());
194
+ let mergedData = `${u.id}${u.username.toLowerCase()}${u.email.toLowerCase()}`;
205
195
  return mergedData.includes(filter.toLowerCase());
206
196
  });
207
- setData(_objectSpread(_objectSpread({}, data), {}, {
197
+ setData({
198
+ ...data,
208
199
  filtered: newFiltered
209
- }));
200
+ });
210
201
  } else {
211
- setData(_objectSpread(_objectSpread({}, data), {}, {
202
+ setData({
203
+ ...data,
212
204
  filtered: [...data.unfiltered]
213
- }));
205
+ });
214
206
  }
215
207
  };
216
208
  return /*#__PURE__*/_react.default.createElement(_material.Grid, {
@@ -256,9 +248,10 @@ const ListPage = _ref => {
256
248
  }, /*#__PURE__*/_react.default.createElement(_input.default, {
257
249
  fullWidth: true,
258
250
  placeholder: "Search by ID, name or Email",
259
- onChange: e => setData(_objectSpread(_objectSpread({}, data), {}, {
251
+ onChange: e => setData({
252
+ ...data,
260
253
  filter: e.target.value
261
- })),
254
+ }),
262
255
  value: data.filter,
263
256
  disableAutocomplete: true,
264
257
  startIcon: /*#__PURE__*/_react.default.createElement(_fi.FiSearch, null)