@qualtrics/plugin-ui-react 1.3.2-alpha.0 → 1.3.3-alpha.1

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.
package/CHANGELOG.md CHANGED
@@ -13,6 +13,9 @@
13
13
  * ~~Allow for field-row dropdowns to accept 'searchable' prop allowing for the dropdown to be input searched.~~
14
14
  * Fixed Chinese language codes to work with the latest version of `@qualtrics/ui-i18n`.
15
15
 
16
+ ## 1.3.2
17
+ * Added capability for the TaskFields/FieldRow component to handle submenus in the fields.
18
+ * Added capability to disable the popover functionality of the `Add a field` button, replaced the popover functionality with functionality to automatically add a field from the list of available fields.
16
19
  ## 1.3.0
17
20
  * fix traditional and simplified chinese codes to work with the latest version of ui-i18n
18
21
  * Typescript@4.x
package/dist/main.es.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @license @qualtrics/plugin-ui-react 1.3.2-alpha.0
1
+ /*! @license @qualtrics/plugin-ui-react 1.3.3-alpha.1
2
2
  Qualtrics Software License Agreement
3
3
 
4
4
  1. General.
@@ -116,14 +116,9 @@ function ownKeys(object, enumerableOnly) {
116
116
 
117
117
  if (Object.getOwnPropertySymbols) {
118
118
  var symbols = Object.getOwnPropertySymbols(object);
119
-
120
- if (enumerableOnly) {
121
- symbols = symbols.filter(function (sym) {
122
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
123
- });
124
- }
125
-
126
- keys.push.apply(keys, symbols);
119
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
120
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
121
+ })), keys.push.apply(keys, symbols);
127
122
  }
128
123
 
129
124
  return keys;
@@ -131,19 +126,12 @@ function ownKeys(object, enumerableOnly) {
131
126
 
132
127
  function _objectSpread2(target) {
133
128
  for (var i = 1; i < arguments.length; i++) {
134
- var source = arguments[i] != null ? arguments[i] : {};
135
-
136
- if (i % 2) {
137
- ownKeys(Object(source), true).forEach(function (key) {
138
- _defineProperty(target, key, source[key]);
139
- });
140
- } else if (Object.getOwnPropertyDescriptors) {
141
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
142
- } else {
143
- ownKeys(Object(source)).forEach(function (key) {
144
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
145
- });
146
- }
129
+ var source = null != arguments[i] ? arguments[i] : {};
130
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
131
+ _defineProperty(target, key, source[key]);
132
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
133
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
134
+ });
147
135
  }
148
136
 
149
137
  return target;
@@ -152,17 +140,11 @@ function _objectSpread2(target) {
152
140
  function _typeof(obj) {
153
141
  "@babel/helpers - typeof";
154
142
 
155
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
156
- _typeof = function (obj) {
157
- return typeof obj;
158
- };
159
- } else {
160
- _typeof = function (obj) {
161
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
162
- };
163
- }
164
-
165
- return _typeof(obj);
143
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
144
+ return typeof obj;
145
+ } : function (obj) {
146
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
147
+ }, _typeof(obj);
166
148
  }
167
149
 
168
150
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -220,6 +202,9 @@ function _defineProperties(target, props) {
220
202
  function _createClass(Constructor, protoProps, staticProps) {
221
203
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
222
204
  if (staticProps) _defineProperties(Constructor, staticProps);
205
+ Object.defineProperty(Constructor, "prototype", {
206
+ writable: false
207
+ });
223
208
  return Constructor;
224
209
  }
225
210
 
@@ -250,6 +235,9 @@ function _inherits(subClass, superClass) {
250
235
  configurable: true
251
236
  }
252
237
  });
238
+ Object.defineProperty(subClass, "prototype", {
239
+ writable: false
240
+ });
253
241
  if (superClass) _setPrototypeOf(subClass, superClass);
254
242
  }
255
243
 
@@ -1431,7 +1419,7 @@ function PipedTextInput(props) {
1431
1419
  React.createElement(Input, __assign({ value: inputRefValue.value, onChange: function (evt) {
1432
1420
  onInputChange(evt);
1433
1421
  }, onBlur: onInputBlur, placeholder: placeholder, multiline: multiline }, restProps)),
1434
- React.createElement(IconButton, { "aria-label": "PipedText", "aria-haspopup": "menu", "aria-expanded": showMenu ? true : undefined, role: "button", size: "medium", onClick: toggleMenu, ref: pipedTextButtonRef },
1422
+ React.createElement(IconButton, { "aria-label": "PipedText", "aria-haspopup": "menu", "aria-expanded": showMenu ? true : undefined, role: "button", onClick: toggleMenu, ref: pipedTextButtonRef },
1435
1423
  React.createElement(PipedTextIcon, null)),
1436
1424
  React.createElement("div", { className: "piped-text-select-container" },
1437
1425
  React.createElement(PipedTextSelect, { items: items, onSelect: pipedTextSelected, show: showMenu, onClose: handleClose, ignoreClickSelector: "piped-text-input-toggle", anchorRef: pipedTextButtonRef }))),
@@ -1466,7 +1454,7 @@ function PipedTextInput(props) {
1466
1454
  if (_get(selected, 'value.locator')) {
1467
1455
  prependString = inputRefValue.value.substring(0, cursorPosition);
1468
1456
  appendString = inputRefValue.value.substring(cursorPosition);
1469
- nextInputValue = "" + prependString + selected.value.locator + appendString;
1457
+ nextInputValue = "".concat(prependString).concat(selected.value.locator).concat(appendString);
1470
1458
  setInputRefValue({
1471
1459
  value: nextInputValue,
1472
1460
  });
package/dist/main.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! @license @qualtrics/plugin-ui-react 1.3.2-alpha.0
1
+ /*! @license @qualtrics/plugin-ui-react 1.3.3-alpha.1
2
2
  Qualtrics Software License Agreement
3
3
 
4
4
  1. General.
@@ -129,14 +129,9 @@ function ownKeys(object, enumerableOnly) {
129
129
 
130
130
  if (Object.getOwnPropertySymbols) {
131
131
  var symbols = Object.getOwnPropertySymbols(object);
132
-
133
- if (enumerableOnly) {
134
- symbols = symbols.filter(function (sym) {
135
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
136
- });
137
- }
138
-
139
- keys.push.apply(keys, symbols);
132
+ enumerableOnly && (symbols = symbols.filter(function (sym) {
133
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
134
+ })), keys.push.apply(keys, symbols);
140
135
  }
141
136
 
142
137
  return keys;
@@ -144,19 +139,12 @@ function ownKeys(object, enumerableOnly) {
144
139
 
145
140
  function _objectSpread2(target) {
146
141
  for (var i = 1; i < arguments.length; i++) {
147
- var source = arguments[i] != null ? arguments[i] : {};
148
-
149
- if (i % 2) {
150
- ownKeys(Object(source), true).forEach(function (key) {
151
- _defineProperty(target, key, source[key]);
152
- });
153
- } else if (Object.getOwnPropertyDescriptors) {
154
- Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
155
- } else {
156
- ownKeys(Object(source)).forEach(function (key) {
157
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
158
- });
159
- }
142
+ var source = null != arguments[i] ? arguments[i] : {};
143
+ i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
144
+ _defineProperty(target, key, source[key]);
145
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
146
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
147
+ });
160
148
  }
161
149
 
162
150
  return target;
@@ -165,17 +153,11 @@ function _objectSpread2(target) {
165
153
  function _typeof(obj) {
166
154
  "@babel/helpers - typeof";
167
155
 
168
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
169
- _typeof = function (obj) {
170
- return typeof obj;
171
- };
172
- } else {
173
- _typeof = function (obj) {
174
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
175
- };
176
- }
177
-
178
- return _typeof(obj);
156
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
157
+ return typeof obj;
158
+ } : function (obj) {
159
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
160
+ }, _typeof(obj);
179
161
  }
180
162
 
181
163
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
@@ -233,6 +215,9 @@ function _defineProperties(target, props) {
233
215
  function _createClass(Constructor, protoProps, staticProps) {
234
216
  if (protoProps) _defineProperties(Constructor.prototype, protoProps);
235
217
  if (staticProps) _defineProperties(Constructor, staticProps);
218
+ Object.defineProperty(Constructor, "prototype", {
219
+ writable: false
220
+ });
236
221
  return Constructor;
237
222
  }
238
223
 
@@ -263,6 +248,9 @@ function _inherits(subClass, superClass) {
263
248
  configurable: true
264
249
  }
265
250
  });
251
+ Object.defineProperty(subClass, "prototype", {
252
+ writable: false
253
+ });
266
254
  if (superClass) _setPrototypeOf(subClass, superClass);
267
255
  }
268
256
 
@@ -1444,7 +1432,7 @@ function PipedTextInput(props) {
1444
1432
  React__default["default"].createElement(uiReact.Input, __assign({ value: inputRefValue.value, onChange: function (evt) {
1445
1433
  onInputChange(evt);
1446
1434
  }, onBlur: onInputBlur, placeholder: placeholder, multiline: multiline }, restProps)),
1447
- React__default["default"].createElement(uiReact.IconButton, { "aria-label": "PipedText", "aria-haspopup": "menu", "aria-expanded": showMenu ? true : undefined, role: "button", size: "medium", onClick: toggleMenu, ref: pipedTextButtonRef },
1435
+ React__default["default"].createElement(uiReact.IconButton, { "aria-label": "PipedText", "aria-haspopup": "menu", "aria-expanded": showMenu ? true : undefined, role: "button", onClick: toggleMenu, ref: pipedTextButtonRef },
1448
1436
  React__default["default"].createElement(icons.PipedTextIcon, null)),
1449
1437
  React__default["default"].createElement("div", { className: "piped-text-select-container" },
1450
1438
  React__default["default"].createElement(PipedTextSelect, { items: items, onSelect: pipedTextSelected, show: showMenu, onClose: handleClose, ignoreClickSelector: "piped-text-input-toggle", anchorRef: pipedTextButtonRef }))),
@@ -1479,7 +1467,7 @@ function PipedTextInput(props) {
1479
1467
  if (_get__default["default"](selected, 'value.locator')) {
1480
1468
  prependString = inputRefValue.value.substring(0, cursorPosition);
1481
1469
  appendString = inputRefValue.value.substring(cursorPosition);
1482
- nextInputValue = "" + prependString + selected.value.locator + appendString;
1470
+ nextInputValue = "".concat(prependString).concat(selected.value.locator).concat(appendString);
1483
1471
  setInputRefValue({
1484
1472
  value: nextInputValue,
1485
1473
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qualtrics/plugin-ui-react",
3
- "version": "1.3.2-alpha.0",
3
+ "version": "1.3.3-alpha.1",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "module": "dist/main.es.js",
@@ -1,101 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuites name="jest tests" tests="41" failures="0" errors="0" time="17.093">
3
- <testsuite name="FieldItem" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="2.989" tests="2">
4
- <testcase classname="FieldItem renders properly" name="FieldItem renders properly" time="0.019">
5
- </testcase>
6
- <testcase classname="FieldItem invokes onClick handler with expected arguments when clicked" name="FieldItem invokes onClick handler with expected arguments when clicked" time="0.048">
7
- </testcase>
8
- </testsuite>
9
- <testsuite name="SelectItem" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="3.927" tests="1">
10
- <testcase classname="SelectItem fires the onChange handler with expected args" name="SelectItem fires the onChange handler with expected args" time="0.051">
11
- </testcase>
12
- </testsuite>
13
- <testsuite name="DynamicSearchInput" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="4.657" tests="1">
14
- <testcase classname="DynamicSearchInput renders correctly" name="DynamicSearchInput renders correctly" time="0.001">
15
- </testcase>
16
- </testsuite>
17
- <testsuite name="MultiselectDropdown" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="5.095" tests="3">
18
- <testcase classname="MultiselectDropdown toggles dropdown when button is clicked" name="MultiselectDropdown toggles dropdown when button is clicked" time="0.228">
19
- </testcase>
20
- <testcase classname="MultiselectDropdown calls onChange handler when item is clicked" name="MultiselectDropdown calls onChange handler when item is clicked" time="0.186">
21
- </testcase>
22
- <testcase classname="MultiselectDropdown closes menu on click away" name="MultiselectDropdown closes menu on click away" time="0.051">
23
- </testcase>
24
- </testsuite>
25
- <testsuite name="FieldRow" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="5.164" tests="6">
26
- <testcase classname="FieldRow fires the onFieldNameChange handler when field name is changed" name="FieldRow fires the onFieldNameChange handler when field name is changed" time="0.062">
27
- </testcase>
28
- <testcase classname="FieldRow fires the onFieldValueChange handler when field&apos;s value is changed" name="FieldRow fires the onFieldValueChange handler when field&apos;s value is changed" time="0.031">
29
- </testcase>
30
- <testcase classname="FieldRow fires the onFieldSwitch handler when field is switched to different field type" name="FieldRow fires the onFieldSwitch handler when field is switched to different field type" time="0.054">
31
- </testcase>
32
- <testcase classname="FieldRow fires the onRemove handler when the delete button is clicked" name="FieldRow fires the onRemove handler when the delete button is clicked" time="0.026">
33
- </testcase>
34
- <testcase classname="FieldRow should allow for searching in field row input dropdown when searchable field provided" name="FieldRow should allow for searching in field row input dropdown when searchable field provided" time="0.205">
35
- </testcase>
36
- <testcase classname="FieldRow should not allow searching in field row input dropdown when searchable is false" name="FieldRow should not allow searching in field row input dropdown when searchable is false" time="0.022">
37
- </testcase>
38
- </testsuite>
39
- <testsuite name="TaskFields" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="5.336" tests="4">
40
- <testcase classname="TaskFields only renders custom fields if custom field configuration options provided" name="TaskFields only renders custom fields if custom field configuration options provided" time="0.441">
41
- </testcase>
42
- <testcase classname="TaskFields fires onFieldNameChange handler when a custom field&apos;s name is changed" name="TaskFields fires onFieldNameChange handler when a custom field&apos;s name is changed" time="0.034">
43
- </testcase>
44
- <testcase classname="TaskFields fires onFieldAdd handler when a field is added" name="TaskFields fires onFieldAdd handler when a field is added" time="0.056">
45
- </testcase>
46
- <testcase classname="TaskFields fires onCustomFieldAdd handler when a custom field is added" name="TaskFields fires onCustomFieldAdd handler when a custom field is added" time="0.047">
47
- </testcase>
48
- </testsuite>
49
- <testsuite name="PipedTextInput" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="5.506" tests="6">
50
- <testcase classname="PipedTextInput toggles menu open/closed on click" name="PipedTextInput toggles menu open/closed on click" time="0.352">
51
- </testcase>
52
- <testcase classname="PipedTextInput fires onChange handler when input value changes from selecting piped text" name="PipedTextInput fires onChange handler when input value changes from selecting piped text" time="0.117">
53
- </testcase>
54
- <testcase classname="PipedTextInput fires onChange handler when input value changes from user typing in input box" name="PipedTextInput fires onChange handler when input value changes from user typing in input box" time="0.01">
55
- </testcase>
56
- <testcase classname="PipedTextInput fires onSelect handler when piped text is selected" name="PipedTextInput fires onSelect handler when piped text is selected" time="0.097">
57
- </testcase>
58
- <testcase classname="PipedTextInput fires onClose handler when menu is closed" name="PipedTextInput fires onClose handler when menu is closed" time="0.086">
59
- </testcase>
60
- <testcase classname="PipedTextInput inserts piped text at the position of the cursor in the input box when piped text is selected" name="PipedTextInput inserts piped text at the position of the cursor in the input box when piped text is selected" time="0.086">
61
- </testcase>
62
- </testsuite>
63
- <testsuite name="PipedTextSelect" errors="0" failures="0" skipped="0" timestamp="2021-11-15T23:34:01" time="13.594" tests="18">
64
- <testcase classname="PipedTextSelect filters menu items to items containing the search value as text" name="PipedTextSelect filters menu items to items containing the search value as text" time="0.383">
65
- </testcase>
66
- <testcase classname="PipedTextSelect filters menu items to items containing the search value as a substring" name="PipedTextSelect filters menu items to items containing the search value as a substring" time="0.17">
67
- </testcase>
68
- <testcase classname="PipedTextSelect filters menu items with special characters to items containing the search value" name="PipedTextSelect filters menu items with special characters to items containing the search value" time="0.169">
69
- </testcase>
70
- <testcase classname="PipedTextSelect renders submenu correctly when hovering over a submenu item" name="PipedTextSelect renders submenu correctly when hovering over a submenu item" time="0.627">
71
- </testcase>
72
- <testcase classname="PipedTextSelect hides other submenus when hovering over another submenu" name="PipedTextSelect hides other submenus when hovering over another submenu" time="0.714">
73
- </testcase>
74
- <testcase classname="PipedTextSelect hides other submenus when hovering over another item" name="PipedTextSelect hides other submenus when hovering over another item" time="0.283">
75
- </testcase>
76
- <testcase classname="PipedTextSelect fires onSelect handler when a menu item is selected" name="PipedTextSelect fires onSelect handler when a menu item is selected" time="0.219">
77
- </testcase>
78
- <testcase classname="PipedTextSelect doesn&apos;t fire onSelect handler when a disabled menu item is selected" name="PipedTextSelect doesn&apos;t fire onSelect handler when a disabled menu item is selected" time="0.174">
79
- </testcase>
80
- <testcase classname="PipedTextSelect fires onClose handler when menu item selected" name="PipedTextSelect fires onClose handler when menu item selected" time="0.151">
81
- </testcase>
82
- <testcase classname="PipedTextSelect fires onClose handler when nested item selected" name="PipedTextSelect fires onClose handler when nested item selected" time="1.345">
83
- </testcase>
84
- <testcase classname="PipedTextSelect fires onClose handler when clicking outside of the menu" name="PipedTextSelect fires onClose handler when clicking outside of the menu" time="0.044">
85
- </testcase>
86
- <testcase classname="PipedTextSelect displays the custom input message if none of the menu items match the search query and custom input is enabled" name="PipedTextSelect displays the custom input message if none of the menu items match the search query and custom input is enabled" time="0.578">
87
- </testcase>
88
- <testcase classname="PipedTextSelect correctly creates a custom locator based on the provided scheme when the user hits the &quot;enter&quot; in the search query" name="PipedTextSelect correctly creates a custom locator based on the provided scheme when the user hits the &quot;enter&quot; in the search query" time="0.558">
89
- </testcase>
90
- <testcase classname="PipedTextSelect calls the onClose handler when custom input is enabled and the user hits &quot;enter&quot; in the search query" name="PipedTextSelect calls the onClose handler when custom input is enabled and the user hits &quot;enter&quot; in the search query" time="0.527">
91
- </testcase>
92
- <testcase classname="PipedTextSelect does not call the onClose handler when custom input is disabled and the user hits &quot;enter&quot; in the search query" name="PipedTextSelect does not call the onClose handler when custom input is disabled and the user hits &quot;enter&quot; in the search query" time="0.704">
93
- </testcase>
94
- <testcase classname="PipedTextSelect displays piped text items provided by an async &quot;items&quot; function" name="PipedTextSelect displays piped text items provided by an async &quot;items&quot; function" time="0.635">
95
- </testcase>
96
- <testcase classname="PipedTextSelect displays piped text items provided by a non-async &quot;items&quot; function" name="PipedTextSelect displays piped text items provided by a non-async &quot;items&quot; function" time="0.588">
97
- </testcase>
98
- <testcase classname="PipedTextSelect displays loading error message if async piped text items function fails to resolve" name="PipedTextSelect displays loading error message if async piped text items function fails to resolve" time="0.615">
99
- </testcase>
100
- </testsuite>
101
- </testsuites>