td-stylekit 28.44.1 → 30.0.0

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 (168) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/dist/es/BarChart/BarChart.d.ts +2 -2
  3. package/dist/es/BarChart/BarChart.js +5 -15
  4. package/dist/es/ChartPrimitives/utils.d.ts +0 -10
  5. package/dist/es/ChartPrimitives/utils.js +7 -145
  6. package/dist/es/ComparisonChart/ComparisonChart.d.ts +2 -2
  7. package/dist/es/ComparisonChart/ComparisonChart.js +5 -16
  8. package/dist/es/DataGrid/elements.d.ts +2 -78
  9. package/dist/es/DataGrid/elements.js +29 -29
  10. package/dist/es/DataGrid/renderers.d.ts +0 -4
  11. package/dist/es/DataGrid/renderers.js +55 -120
  12. package/dist/es/DateControl/elements.d.ts +34 -34
  13. package/dist/es/DropdownButton/DropdownButtonElements.d.ts +1 -1
  14. package/dist/es/DropdownButton/DropdownButtonElements.js +8 -8
  15. package/dist/es/FormField/index.d.ts +0 -2
  16. package/dist/es/FormField/index.js +0 -8
  17. package/dist/es/GrowthRateChart/GrowthRateChart.d.ts +0 -76
  18. package/dist/es/GrowthRateChart/GrowthRateChart.js +2 -9
  19. package/dist/es/Heading/Heading.js +2 -2
  20. package/dist/es/Highlighter/Highlighter.js +2 -2
  21. package/dist/es/Icon/Icon.js +2 -2
  22. package/dist/es/Icon/staticTypes.d.ts +88 -418
  23. package/dist/es/Icon/types.js +7 -557
  24. package/dist/es/Logo/Logo.js +0 -12
  25. package/dist/es/Menu/MenuElements.js +3 -3
  26. package/dist/es/MultiSelect/elements.d.ts +1 -1
  27. package/dist/es/MultiSelect/elements.js +17 -17
  28. package/dist/es/SecondaryNavigation/elements/Item.js +7 -7
  29. package/dist/es/SecondaryNavigation/elements/Section.js +3 -3
  30. package/dist/es/SecondaryNavigation/elements/Title.js +3 -3
  31. package/dist/es/SecondaryNavigation/elements/Wrapper.js +3 -3
  32. package/dist/es/Section/elements.d.ts +1 -1
  33. package/dist/es/Select/utils.js +2 -2
  34. package/dist/es/Tagger/TaggerElements.js +11 -11
  35. package/dist/es/Tagger/components/PopupSelector.js +4 -4
  36. package/dist/es/Tagger/components/PopupSelectorElements.js +16 -16
  37. package/dist/es/ThemeProvider/ThemeProvider.d.ts +0 -205
  38. package/dist/es/ThemeProvider/ThemeProvider.js +1 -7
  39. package/dist/es/ThemeProvider/icons.d.ts +1 -1
  40. package/dist/es/ThemeProvider/icons.js +4 -46
  41. package/dist/es/ThemeProvider/index.d.ts +1 -1
  42. package/dist/es/ThemeProvider/index.js +0 -6
  43. package/dist/es/ThemeProvider/theme.d.ts +0 -76
  44. package/dist/es/ThemeProvider/theme.js +0 -82
  45. package/dist/es/ThemeProvider/types.d.ts +1 -1
  46. package/dist/es/TimeControl/elements.d.ts +34 -34
  47. package/dist/es/Toggle/Toggle.js +6 -7
  48. package/dist/es/UserAvatar/UserAvatar.js +7 -7
  49. package/dist/es/VolumeChart/VolumeChart.d.ts +2 -2
  50. package/dist/es/VolumeChart/VolumeChart.js +2 -13
  51. package/dist/es/index.d.ts +1 -11
  52. package/dist/es/index.js +0 -70
  53. package/dist/es/mixins/border.d.ts +1 -1
  54. package/dist/es/mixins/border.js +3 -3
  55. package/dist/es/utils/globalcss.js +1 -1
  56. package/dist/es/utils/testingLibrary.d.ts +1 -3
  57. package/dist/es/utils/testingLibrary.js +13 -24
  58. package/package.json +13 -13
  59. package/dist/es/CheckboxField/CheckboxField.d.ts +0 -13
  60. package/dist/es/CheckboxField/CheckboxField.js +0 -73
  61. package/dist/es/CheckboxField/index.d.ts +0 -3
  62. package/dist/es/CheckboxField/index.js +0 -15
  63. package/dist/es/DateField/DateField.d.ts +0 -74
  64. package/dist/es/DateField/DateField.js +0 -297
  65. package/dist/es/DateField/elements.d.ts +0 -11
  66. package/dist/es/DateField/elements.js +0 -39
  67. package/dist/es/DateField/index.d.ts +0 -3
  68. package/dist/es/DateField/index.js +0 -15
  69. package/dist/es/DetailPanel/DetailPanel.d.ts +0 -16
  70. package/dist/es/DetailPanel/DetailPanel.js +0 -62
  71. package/dist/es/DetailPanel/elements.d.ts +0 -35
  72. package/dist/es/DetailPanel/elements.js +0 -225
  73. package/dist/es/DetailPanel/index.d.ts +0 -3
  74. package/dist/es/DetailPanel/index.js +0 -15
  75. package/dist/es/FormField/FormField.d.ts +0 -38
  76. package/dist/es/FormField/FormField.js +0 -204
  77. package/dist/es/FormField/elements.d.ts +0 -17
  78. package/dist/es/FormField/elements.js +0 -75
  79. package/dist/es/InfiniteList/InfiniteList.d.ts +0 -29
  80. package/dist/es/InfiniteList/InfiniteList.js +0 -114
  81. package/dist/es/InfiniteList/index.d.ts +0 -2
  82. package/dist/es/InfiniteList/index.js +0 -15
  83. package/dist/es/NavigationBar/LogoItem.d.ts +0 -6
  84. package/dist/es/NavigationBar/LogoItem.js +0 -42
  85. package/dist/es/NavigationBar/NavigationBar.d.ts +0 -33
  86. package/dist/es/NavigationBar/NavigationBar.js +0 -99
  87. package/dist/es/NavigationBar/NavigationItem.d.ts +0 -33
  88. package/dist/es/NavigationBar/NavigationItem.js +0 -183
  89. package/dist/es/NavigationBar/index.d.ts +0 -2
  90. package/dist/es/NavigationBar/index.js +0 -15
  91. package/dist/es/NavigationPopover/NavigationPopover.d.ts +0 -24
  92. package/dist/es/NavigationPopover/NavigationPopover.js +0 -116
  93. package/dist/es/NavigationPopover/index.d.ts +0 -2
  94. package/dist/es/NavigationPopover/index.js +0 -15
  95. package/dist/es/Overlay/Overlay.d.ts +0 -15
  96. package/dist/es/Overlay/Overlay.js +0 -66
  97. package/dist/es/Overlay/OverlayBody.d.ts +0 -9
  98. package/dist/es/Overlay/OverlayBody.js +0 -32
  99. package/dist/es/Overlay/OverlayHeader.d.ts +0 -37
  100. package/dist/es/Overlay/OverlayHeader.js +0 -135
  101. package/dist/es/Overlay/index.d.ts +0 -4
  102. package/dist/es/Overlay/index.js +0 -29
  103. package/dist/es/StatCard/StatCard.d.ts +0 -26
  104. package/dist/es/StatCard/StatCard.js +0 -118
  105. package/dist/es/StatCard/elements.d.ts +0 -48
  106. package/dist/es/StatCard/elements.js +0 -156
  107. package/dist/es/StatCard/index.d.ts +0 -3
  108. package/dist/es/StatCard/index.js +0 -15
  109. package/dist/es/ThemeProvider/v4/Badge.d.ts +0 -10
  110. package/dist/es/ThemeProvider/v4/Badge.js +0 -57
  111. package/dist/es/ThemeProvider/v4/Button.d.ts +0 -161
  112. package/dist/es/ThemeProvider/v4/Button.js +0 -200
  113. package/dist/es/ThemeProvider/v4/Card.d.ts +0 -12
  114. package/dist/es/ThemeProvider/v4/Card.js +0 -24
  115. package/dist/es/ThemeProvider/v4/Checkbox.d.ts +0 -70
  116. package/dist/es/ThemeProvider/v4/Checkbox.js +0 -94
  117. package/dist/es/ThemeProvider/v4/CollapsibleToggle.d.ts +0 -31
  118. package/dist/es/ThemeProvider/v4/CollapsibleToggle.js +0 -46
  119. package/dist/es/ThemeProvider/v4/Color.d.ts +0 -12
  120. package/dist/es/ThemeProvider/v4/Color.js +0 -47
  121. package/dist/es/ThemeProvider/v4/DataGrid.d.ts +0 -72
  122. package/dist/es/ThemeProvider/v4/DataGrid.js +0 -182
  123. package/dist/es/ThemeProvider/v4/DatePicker.d.ts +0 -41
  124. package/dist/es/ThemeProvider/v4/DatePicker.js +0 -111
  125. package/dist/es/ThemeProvider/v4/DropdownButton.d.ts +0 -67
  126. package/dist/es/ThemeProvider/v4/DropdownButton.js +0 -99
  127. package/dist/es/ThemeProvider/v4/FormFieldAddon.d.ts +0 -16
  128. package/dist/es/ThemeProvider/v4/FormFieldAddon.js +0 -38
  129. package/dist/es/ThemeProvider/v4/FormLabel.d.ts +0 -11
  130. package/dist/es/ThemeProvider/v4/FormLabel.js +0 -28
  131. package/dist/es/ThemeProvider/v4/Icon.d.ts +0 -7
  132. package/dist/es/ThemeProvider/v4/Icon.js +0 -20
  133. package/dist/es/ThemeProvider/v4/Input.d.ts +0 -10
  134. package/dist/es/ThemeProvider/v4/Input.js +0 -50
  135. package/dist/es/ThemeProvider/v4/Link.d.ts +0 -20
  136. package/dist/es/ThemeProvider/v4/Link.js +0 -30
  137. package/dist/es/ThemeProvider/v4/Menu.d.ts +0 -36
  138. package/dist/es/ThemeProvider/v4/Menu.js +0 -60
  139. package/dist/es/ThemeProvider/v4/Modal.d.ts +0 -63
  140. package/dist/es/ThemeProvider/v4/Modal.js +0 -216
  141. package/dist/es/ThemeProvider/v4/MultiSelect.d.ts +0 -35
  142. package/dist/es/ThemeProvider/v4/MultiSelect.js +0 -126
  143. package/dist/es/ThemeProvider/v4/Popover.d.ts +0 -4
  144. package/dist/es/ThemeProvider/v4/Popover.js +0 -107
  145. package/dist/es/ThemeProvider/v4/Radio.d.ts +0 -17
  146. package/dist/es/ThemeProvider/v4/Radio.js +0 -69
  147. package/dist/es/ThemeProvider/v4/Section.d.ts +0 -33
  148. package/dist/es/ThemeProvider/v4/Section.js +0 -93
  149. package/dist/es/ThemeProvider/v4/Select.d.ts +0 -69
  150. package/dist/es/ThemeProvider/v4/Select.js +0 -198
  151. package/dist/es/ThemeProvider/v4/Shuttle.d.ts +0 -12
  152. package/dist/es/ThemeProvider/v4/Shuttle.js +0 -28
  153. package/dist/es/ThemeProvider/v4/Tagger.d.ts +0 -30
  154. package/dist/es/ThemeProvider/v4/Tagger.js +0 -64
  155. package/dist/es/ThemeProvider/v4/Toast.d.ts +0 -35
  156. package/dist/es/ThemeProvider/v4/Toast.js +0 -119
  157. package/dist/es/ThemeProvider/v4/Toggle.d.ts +0 -18
  158. package/dist/es/ThemeProvider/v4/Toggle.js +0 -93
  159. package/dist/es/ThemeProvider/v4/UserAvatar.d.ts +0 -15
  160. package/dist/es/ThemeProvider/v4/UserAvatar.js +0 -31
  161. package/dist/es/ThemeProvider/v4/View.d.ts +0 -9
  162. package/dist/es/ThemeProvider/v4/View.js +0 -21
  163. package/dist/es/ThemeProvider/v4/index.d.ts +0 -6
  164. package/dist/es/ThemeProvider/v4/index.js +0 -46
  165. package/dist/es/TimeField/TimeField.d.ts +0 -15
  166. package/dist/es/TimeField/TimeField.js +0 -42
  167. package/dist/es/TimeField/index.d.ts +0 -3
  168. package/dist/es/TimeField/index.js +0 -15
@@ -1,204 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _react = require("react");
8
- var _Box = _interopRequireDefault(require("../Box"));
9
- var _elements = require("./elements");
10
- var _Icon = _interopRequireDefault(require("../Icon"));
11
- var _Input = _interopRequireDefault(require("../Input"));
12
- var _FormFieldAddon = _interopRequireDefault(require("../FormFieldAddon"));
13
- var _TooltipPopover = _interopRequireDefault(require("../TooltipPopover"));
14
- var _FormLabel = _interopRequireDefault(require("../FormLabel"));
15
- var _Select = _interopRequireDefault(require("../Select"));
16
- var _utils = require("./utils");
17
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
18
- var _excluded = ["addOnClassName", "className", "isClearable", "data-gs-c", "data-instrumentation", "showFullError", "showFullHint", "error", "getRef", "hideAddOn", "hint", "hintNode", "id", "invalid", "label", "name", "onChange", "showAddOnInTooltip", "tooltip", "tooltipClassName", "truncateErrors", "type", "value", "disabled", "placeholder"];
19
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
20
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
21
- 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; }
22
- 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; }
23
- function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
24
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
25
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
26
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
27
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
28
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
29
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
30
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
32
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
33
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
34
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
36
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
37
- 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); }
38
- if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
39
- if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {}; // @TODO: Implement an inline-text type?
40
- // Add extra input types as needed to FORM_FIELD_TYPES and type FormFieldTypes below
41
- // @TODO: Pass aria-describedby to hint?
42
- // @TODO: How to handle node label?
43
- var FormField = /*#__PURE__*/function (_PureComponent) {
44
- function FormField() {
45
- var _this;
46
- _classCallCheck(this, FormField);
47
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
48
- args[_key] = arguments[_key];
49
- }
50
- _this = _callSuper(this, FormField, [].concat(args));
51
- _defineProperty(_this, "getTypeComponent", function (type) {
52
- switch (type) {
53
- case 'select':
54
- return _Select["default"];
55
- case 'textarea':
56
- return _elements.Textarea;
57
- default:
58
- return _Input["default"];
59
- }
60
- });
61
- _defineProperty(_this, "inputRef", /*#__PURE__*/(0, _react.createRef)());
62
- return _this;
63
- }
64
- _inherits(FormField, _PureComponent);
65
- return _createClass(FormField, [{
66
- key: "render",
67
- value: function render() {
68
- var _this$props = this.props,
69
- addOnClassName = _this$props.addOnClassName,
70
- className = _this$props.className,
71
- isClearable = _this$props.isClearable,
72
- dataGsC = _this$props['data-gs-c'],
73
- _this$props$dataInst = _this$props['data-instrumentation'],
74
- dataInstrumentation = _this$props$dataInst === void 0 ? 'formfield' : _this$props$dataInst,
75
- showFullError = _this$props.showFullError,
76
- showFullHint = _this$props.showFullHint,
77
- _this$props$error = _this$props.error,
78
- error = _this$props$error === void 0 ? [] : _this$props$error,
79
- getRef = _this$props.getRef,
80
- hideAddOn = _this$props.hideAddOn,
81
- _this$props$hint = _this$props.hint,
82
- hint = _this$props$hint === void 0 ? '' : _this$props$hint,
83
- hintNode = _this$props.hintNode,
84
- id = _this$props.id,
85
- _this$props$invalid = _this$props.invalid,
86
- invalid = _this$props$invalid === void 0 ? false : _this$props$invalid,
87
- label = _this$props.label,
88
- name = _this$props.name,
89
- onChange = _this$props.onChange,
90
- showAddOnInTooltip = _this$props.showAddOnInTooltip,
91
- tooltip = _this$props.tooltip,
92
- tooltipClassName = _this$props.tooltipClassName,
93
- _this$props$truncateE = _this$props.truncateErrors,
94
- truncateErrors = _this$props$truncateE === void 0 ? true : _this$props$truncateE,
95
- _this$props$type = _this$props.type,
96
- type = _this$props$type === void 0 ? 'text' : _this$props$type,
97
- value = _this$props.value,
98
- _this$props$disabled = _this$props.disabled,
99
- disabled = _this$props$disabled === void 0 ? false : _this$props$disabled,
100
- _this$props$placehold = _this$props.placeholder,
101
- placeholder = _this$props$placehold === void 0 ? '' : _this$props$placehold,
102
- props = _objectWithoutProperties(_this$props, _excluded);
103
- var InputComponent = this.getTypeComponent(type);
104
- var errorList = (0, _utils.getErrorList)(error);
105
- var isInvalid = !!errorList.length || invalid;
106
- var hasTooltipAddon = showAddOnInTooltip && !!(hintNode || hint || errorList.length);
107
- var shouldRenderTooltip = !!tooltip || hasTooltipAddon;
108
- var input = (0, _jsxRuntime.jsx)(InputComponent, _objectSpread({
109
- "data-gs-c": gsC(name, value),
110
- "data-gs": gs("src", "formfield", "formfield.tsx", "input-component"),
111
- id: id || name,
112
- invalid: isInvalid,
113
- name: name,
114
- "data-instrumentation": "".concat(dataInstrumentation, "-input"),
115
- onChange: onChange,
116
- type: type,
117
- value: value,
118
- disabled: disabled,
119
- placeholder: placeholder
120
- }, props));
121
- var addon = (0, _jsxRuntime.jsx)(_FormFieldAddon["default"], {
122
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-addon"),
123
- className: addOnClassName,
124
- showFullError: showFullError,
125
- showFullHint: showFullHint,
126
- errorList: errorList,
127
- hint: hint,
128
- hintNode: hintNode,
129
- showAddOnInTooltip: showAddOnInTooltip,
130
- spacer: Boolean(tooltip && hasTooltipAddon),
131
- truncateErrors: truncateErrors
132
- });
133
- return (0, _jsxRuntime.jsxs)(_elements.FormFieldWrapper, {
134
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper"),
135
- "data-gs-c": dataGsC || label || name,
136
- "data-instrumentation": dataInstrumentation,
137
- ref: getRef,
138
- className: className,
139
- children: [label && (0, _jsxRuntime.jsx)(_FormLabel["default"], {
140
- "data-gs-c": gsC(label),
141
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "form-label"),
142
- htmlFor: id || name,
143
- children: label
144
- }),
145
- /**
146
- * Intentionally not checking `shouldRenderTooltip` because OverlayTrigger needs
147
- * to be rendered regardless to maintain input focus. Checking it in overlay prop
148
- * below instead.
149
- */
150
- /* need to wrap input in a FormFieldWrapper/div so tooltip is positioned correctly */
151
- !!tooltip || showAddOnInTooltip ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
152
- children: [(0, _jsxRuntime.jsx)(_TooltipPopover["default"], {
153
- "data-gs-c": gsC(shouldRenderTooltip ? (0, _jsxRuntime.jsxs)(_elements.PopoverComponent, {
154
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "tooltip-popover", "popover-component"),
155
- backgroundColor: isInvalid ? '#ffeef0' : undefined,
156
- isInvalid: isInvalid,
157
- children: [tooltip, showAddOnInTooltip && addon]
158
- }) :
159
- // TODO: can't pass empty overlay. This generates warnings.
160
- (0, _jsxRuntime.jsx)(_Box["default"], {
161
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "tooltip-popover", "box"),
162
- "data-testid": "empty-box"
163
- })),
164
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "tooltip-popover"),
165
- placement: "top",
166
- target: this.inputRef,
167
- role: "tooltip",
168
- children: shouldRenderTooltip ? (0, _jsxRuntime.jsxs)(_elements.PopoverComponent, {
169
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "tooltip-popover", "popover-component"),
170
- backgroundColor: isInvalid ? '#ffeef0' : undefined,
171
- isInvalid: isInvalid,
172
- children: [tooltip, showAddOnInTooltip && addon]
173
- }) : (0, _jsxRuntime.jsx)(_Box["default"], {
174
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "tooltip-popover", "box"),
175
- "data-testid": "empty-box"
176
- })
177
- }), (0, _jsxRuntime.jsx)(_elements.FormFieldWrapper, {
178
- "data-gs-c": gsC(input),
179
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "form-field-wrapper"),
180
- "data-testid": "input-ref",
181
- ref: this.inputRef,
182
- children: input
183
- })]
184
- }) : input, isClearable && (0, _jsxRuntime.jsx)(_elements.ClearButton, {
185
- "data-gs-c": gsC("icon-small-close"),
186
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "clear-button"),
187
- plain: true,
188
- "data-instrumentation": "".concat(dataInstrumentation, "-clear"),
189
- onClick: function onClick(event) {
190
- onChange({
191
- name: name,
192
- value: undefined
193
- });
194
- event.stopPropagation();
195
- },
196
- children: (0, _jsxRuntime.jsx)(_Icon["default"].Small.Close, {
197
- "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "clear-button", "icon-small-close")
198
- })
199
- }), !hideAddOn && !showAddOnInTooltip && addon]
200
- });
201
- }
202
- }]);
203
- }(_react.PureComponent);
204
- var _default = exports["default"] = FormField;
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- export declare const ClearButton: import("@emotion/styled").StyledComponent<Partial<import("../Button").UnstyledButtonProps> & import("react").RefAttributes<import("../Button").UnstyledButton> & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- }, {}, {}>;
5
- export declare const FormFieldWrapper: import("@emotion/styled").StyledComponent<{
6
- theme?: import("@emotion/react").Theme | undefined;
7
- as?: import("react").ElementType<any> | undefined;
8
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
9
- export declare const PopoverComponent: import("@emotion/styled").StyledComponent<import("../Popover").PopoverProps & {
10
- children?: import("react").ReactNode;
11
- } & {
12
- theme?: import("@emotion/react").Theme | undefined;
13
- } & {
14
- isInvalid?: boolean | undefined;
15
- }, {}, {}>;
16
- export declare const Textarea: (props: any) => import("@emotion/react/jsx-runtime").JSX.Element;
17
- //# sourceMappingURL=elements.d.ts.map
@@ -1,75 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.Textarea = exports.PopoverComponent = exports.FormFieldWrapper = exports.ClearButton = void 0;
8
- var _base = _interopRequireDefault(require("@emotion/styled/base"));
9
- var _Button = _interopRequireDefault(require("../Button"));
10
- var _Input = _interopRequireDefault(require("../Input"));
11
- var _Popover = _interopRequireDefault(require("../Popover"));
12
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
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(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
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 _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)."; }
20
- if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
21
- if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
22
- var ClearButton = exports.ClearButton = /*#__PURE__*/(0, _base["default"])(_Button["default"], process.env.NODE_ENV === "production" ? {
23
- target: "egxpx0f2"
24
- } : {
25
- target: "egxpx0f2",
26
- label: "ClearButton"
27
- })(function (_ref) {
28
- var theme = _ref.theme;
29
- return {
30
- position: 'absolute',
31
- top: 0,
32
- bottom: 0,
33
- right: theme.space[2],
34
- height: '2.25rem' // this is hardcoded to match input.css height
35
- };
36
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtRmllbGQvZWxlbWVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUsyQiIsImZpbGUiOiIuLi8uLi8uLi9zcmMvRm9ybUZpZWxkL2VsZW1lbnRzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9CdXR0b24nXG5pbXBvcnQgSW5wdXQgZnJvbSAnLi4vSW5wdXQnXG5pbXBvcnQgUG9wb3ZlciBmcm9tICcuLi9Qb3BvdmVyJ1xuXG5leHBvcnQgY29uc3QgQ2xlYXJCdXR0b24gPSBzdHlsZWQoQnV0dG9uKSgoeyB0aGVtZSB9KSA9PiAoe1xuICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgdG9wOiAwLFxuICBib3R0b206IDAsXG4gIHJpZ2h0OiB0aGVtZS5zcGFjZVsyXSxcbiAgaGVpZ2h0OiAnMi4yNXJlbScgLy8gdGhpcyBpcyBoYXJkY29kZWQgdG8gbWF0Y2ggaW5wdXQuY3NzIGhlaWdodFxufSkpXG5cbmV4cG9ydCBjb25zdCBGb3JtRmllbGRXcmFwcGVyID0gc3R5bGVkKCdkaXYnKSh7XG4gIGFsaWduSXRlbXM6ICdzdHJldGNoJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICBmbGV4RmxvdzogJ2NvbHVtbiBub3dyYXAnLFxuICBtaW5XaWR0aDogMCxcbiAgcG9zaXRpb246ICdyZWxhdGl2ZSdcbn0pXG5cbmV4cG9ydCBjb25zdCBQb3BvdmVyQ29tcG9uZW50ID0gc3R5bGVkKFBvcG92ZXIpPHsgaXNJbnZhbGlkPzogYm9vbGVhbiB9PihcbiAgKHsgdGhlbWUgfSkgPT4gKHtcbiAgICBtYXhXaWR0aDogMTgwLFxuICAgIGZvbnRTaXplOiB0aGVtZS5mb250U2l6ZVswXVxuICB9KSxcbiAgKHsgdGhlbWUsIGlzSW52YWxpZCB9KSA9PlxuICAgIGlzSW52YWxpZCAmJiB7XG4gICAgICBjb2xvcjogdGhlbWUuY29sb3IuRXJyb3JcbiAgICB9XG4pXG5cbmV4cG9ydCBjb25zdCBUZXh0YXJlYSA9IHByb3BzID0+IDxJbnB1dCB7Li4ucHJvcHN9IHR5cGU9XCJ0ZXh0YXJlYVwiIC8+XG4iXX0= */");
37
- var FormFieldWrapper = exports.FormFieldWrapper = /*#__PURE__*/(0, _base["default"])('div', process.env.NODE_ENV === "production" ? {
38
- target: "egxpx0f1"
39
- } : {
40
- target: "egxpx0f1",
41
- label: "FormFieldWrapper"
42
- })(process.env.NODE_ENV === "production" ? {
43
- name: "1saxkct",
44
- styles: "align-items:stretch;display:flex;flex-flow:column nowrap;min-width:0;position:relative"
45
- } : {
46
- name: "1saxkct",
47
- styles: "align-items:stretch;display:flex;flex-flow:column nowrap;min-width:0;position:relative",
48
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtRmllbGQvZWxlbWVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFnQyIsImZpbGUiOiIuLi8uLi8uLi9zcmMvRm9ybUZpZWxkL2VsZW1lbnRzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJ1xuaW1wb3J0IEJ1dHRvbiBmcm9tICcuLi9CdXR0b24nXG5pbXBvcnQgSW5wdXQgZnJvbSAnLi4vSW5wdXQnXG5pbXBvcnQgUG9wb3ZlciBmcm9tICcuLi9Qb3BvdmVyJ1xuXG5leHBvcnQgY29uc3QgQ2xlYXJCdXR0b24gPSBzdHlsZWQoQnV0dG9uKSgoeyB0aGVtZSB9KSA9PiAoe1xuICBwb3NpdGlvbjogJ2Fic29sdXRlJyxcbiAgdG9wOiAwLFxuICBib3R0b206IDAsXG4gIHJpZ2h0OiB0aGVtZS5zcGFjZVsyXSxcbiAgaGVpZ2h0OiAnMi4yNXJlbScgLy8gdGhpcyBpcyBoYXJkY29kZWQgdG8gbWF0Y2ggaW5wdXQuY3NzIGhlaWdodFxufSkpXG5cbmV4cG9ydCBjb25zdCBGb3JtRmllbGRXcmFwcGVyID0gc3R5bGVkKCdkaXYnKSh7XG4gIGFsaWduSXRlbXM6ICdzdHJldGNoJyxcbiAgZGlzcGxheTogJ2ZsZXgnLFxuICBmbGV4RmxvdzogJ2NvbHVtbiBub3dyYXAnLFxuICBtaW5XaWR0aDogMCxcbiAgcG9zaXRpb246ICdyZWxhdGl2ZSdcbn0pXG5cbmV4cG9ydCBjb25zdCBQb3BvdmVyQ29tcG9uZW50ID0gc3R5bGVkKFBvcG92ZXIpPHsgaXNJbnZhbGlkPzogYm9vbGVhbiB9PihcbiAgKHsgdGhlbWUgfSkgPT4gKHtcbiAgICBtYXhXaWR0aDogMTgwLFxuICAgIGZvbnRTaXplOiB0aGVtZS5mb250U2l6ZVswXVxuICB9KSxcbiAgKHsgdGhlbWUsIGlzSW52YWxpZCB9KSA9PlxuICAgIGlzSW52YWxpZCAmJiB7XG4gICAgICBjb2xvcjogdGhlbWUuY29sb3IuRXJyb3JcbiAgICB9XG4pXG5cbmV4cG9ydCBjb25zdCBUZXh0YXJlYSA9IHByb3BzID0+IDxJbnB1dCB7Li4ucHJvcHN9IHR5cGU9XCJ0ZXh0YXJlYVwiIC8+XG4iXX0= */",
49
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
50
- });
51
- var PopoverComponent = exports.PopoverComponent = /*#__PURE__*/(0, _base["default"])(_Popover["default"], process.env.NODE_ENV === "production" ? {
52
- target: "egxpx0f0"
53
- } : {
54
- target: "egxpx0f0",
55
- label: "PopoverComponent"
56
- })(function (_ref2) {
57
- var theme = _ref2.theme;
58
- return {
59
- maxWidth: 180,
60
- fontSize: theme.fontSize[0]
61
- };
62
- }, function (_ref3) {
63
- var theme = _ref3.theme,
64
- isInvalid = _ref3.isInvalid;
65
- return isInvalid && {
66
- color: theme.color.Error
67
- };
68
- }, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9Gb3JtRmllbGQvZWxlbWVudHMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCZ0MiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL0Zvcm1GaWVsZC9lbGVtZW50cy50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCdcbmltcG9ydCBCdXR0b24gZnJvbSAnLi4vQnV0dG9uJ1xuaW1wb3J0IElucHV0IGZyb20gJy4uL0lucHV0J1xuaW1wb3J0IFBvcG92ZXIgZnJvbSAnLi4vUG9wb3ZlcidcblxuZXhwb3J0IGNvbnN0IENsZWFyQnV0dG9uID0gc3R5bGVkKEJ1dHRvbikoKHsgdGhlbWUgfSkgPT4gKHtcbiAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gIHRvcDogMCxcbiAgYm90dG9tOiAwLFxuICByaWdodDogdGhlbWUuc3BhY2VbMl0sXG4gIGhlaWdodDogJzIuMjVyZW0nIC8vIHRoaXMgaXMgaGFyZGNvZGVkIHRvIG1hdGNoIGlucHV0LmNzcyBoZWlnaHRcbn0pKVxuXG5leHBvcnQgY29uc3QgRm9ybUZpZWxkV3JhcHBlciA9IHN0eWxlZCgnZGl2Jykoe1xuICBhbGlnbkl0ZW1zOiAnc3RyZXRjaCcsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgZmxleEZsb3c6ICdjb2x1bW4gbm93cmFwJyxcbiAgbWluV2lkdGg6IDAsXG4gIHBvc2l0aW9uOiAncmVsYXRpdmUnXG59KVxuXG5leHBvcnQgY29uc3QgUG9wb3ZlckNvbXBvbmVudCA9IHN0eWxlZChQb3BvdmVyKTx7IGlzSW52YWxpZD86IGJvb2xlYW4gfT4oXG4gICh7IHRoZW1lIH0pID0+ICh7XG4gICAgbWF4V2lkdGg6IDE4MCxcbiAgICBmb250U2l6ZTogdGhlbWUuZm9udFNpemVbMF1cbiAgfSksXG4gICh7IHRoZW1lLCBpc0ludmFsaWQgfSkgPT5cbiAgICBpc0ludmFsaWQgJiYge1xuICAgICAgY29sb3I6IHRoZW1lLmNvbG9yLkVycm9yXG4gICAgfVxuKVxuXG5leHBvcnQgY29uc3QgVGV4dGFyZWEgPSBwcm9wcyA9PiA8SW5wdXQgey4uLnByb3BzfSB0eXBlPVwidGV4dGFyZWFcIiAvPlxuIl19 */");
69
- var Textarea = exports.Textarea = function Textarea(props) {
70
- return (0, _jsxRuntime.jsx)(_Input["default"], _objectSpread(_objectSpread({
71
- "data-gs": gs("src", "formfield", "elements.tsx", "input")
72
- }, props), {}, {
73
- type: "textarea"
74
- }));
75
- };
@@ -1,29 +0,0 @@
1
- import { Component } from 'react';
2
- import { InfiniteLoader } from 'react-virtualized';
3
- import type { ListProps, Index } from 'react-virtualized';
4
- export type InfiniteListProps = ListProps & {
5
- hasMoreRows: boolean;
6
- /** Count of rows that have already been loaded. */
7
- rowCount: number;
8
- };
9
- /**
10
- * Decorates a List component with infinite-loading behavior when the total row
11
- * count is not known.
12
- *
13
- * Extra props get passed to List component.
14
- * See [react-virtualized docs](https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md)
15
- * for required props.
16
- *
17
- * Note: You should pass anything that affects cell rendering as a prop to ensure
18
- * the component is re-rendered when those props change.
19
- * More info: https://github.com/bvaughn/react-virtualized#pure-components
20
- */
21
- declare class InfiniteList extends Component<InfiniteListProps> {
22
- props: InfiniteListProps;
23
- infiniteList: import("react").RefObject<InfiniteLoader>;
24
- resetCache(autoload: boolean): void | null;
25
- isRowLoaded: ({ index }: Index) => boolean;
26
- render(): import("@emotion/react/jsx-runtime").JSX.Element;
27
- }
28
- export default InfiniteList;
29
- //# sourceMappingURL=InfiniteList.d.ts.map
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _react = require("react");
8
- var _reactVirtualized = require("react-virtualized");
9
- var _lodash = _interopRequireDefault(require("lodash.noop"));
10
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
11
- var _excluded = ["hasMoreRows", "loadMoreRows", "rowCount"];
12
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
13
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
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 _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
17
- function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } } return target; }
18
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
19
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
20
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
21
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
22
- function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
23
- function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
24
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
25
- function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
26
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
27
- function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
28
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
29
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
30
- 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); }
31
- if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
32
- if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
33
- /**
34
- * Decorates a List component with infinite-loading behavior when the total row
35
- * count is not known.
36
- *
37
- * Extra props get passed to List component.
38
- * See [react-virtualized docs](https://github.com/bvaughn/react-virtualized/blob/master/docs/List.md)
39
- * for required props.
40
- *
41
- * Note: You should pass anything that affects cell rendering as a prop to ensure
42
- * the component is re-rendered when those props change.
43
- * More info: https://github.com/bvaughn/react-virtualized#pure-components
44
- */
45
- var InfiniteList = /*#__PURE__*/function (_Component) {
46
- function InfiniteList() {
47
- var _this;
48
- _classCallCheck(this, InfiniteList);
49
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
50
- args[_key] = arguments[_key];
51
- }
52
- _this = _callSuper(this, InfiniteList, [].concat(args));
53
- _defineProperty(_this, "props", void 0);
54
- _defineProperty(_this, "infiniteList", /*#__PURE__*/(0, _react.createRef)());
55
- // As far as InfiniteLoader is concerned, every row except our placeholder row is loaded.
56
- _defineProperty(_this, "isRowLoaded", function (_ref) {
57
- var index = _ref.index;
58
- var _this$props = _this.props,
59
- hasMoreRows = _this$props.hasMoreRows,
60
- rowCount = _this$props.rowCount;
61
- return !hasMoreRows || index < rowCount;
62
- });
63
- return _this;
64
- }
65
- _inherits(InfiniteList, _Component);
66
- return _createClass(InfiniteList, [{
67
- key: "resetCache",
68
- value: function resetCache(autoload) {
69
- return this.infiniteList && this.infiniteList.current && this.infiniteList.current.resetLoadMoreRowsCache(autoload);
70
- }
71
- }, {
72
- key: "render",
73
- value: function render() {
74
- var _this$props2 = this.props,
75
- hasMoreRows = _this$props2.hasMoreRows,
76
- loadMoreRows = _this$props2.loadMoreRows,
77
- rowCount = _this$props2.rowCount,
78
- listProps = _objectWithoutProperties(_this$props2, _excluded);
79
- // If there are more rows, pad the List with an extra row as a placeholder for a loading indicator.
80
- var paddedRowCount = hasMoreRows ? rowCount + 1 : rowCount;
81
- return (0, _jsxRuntime.jsx)(_reactVirtualized.InfiniteLoader, {
82
- "data-gs-c": gsC(function children(_ref2) {
83
- var onRowsRendered = _ref2.onRowsRendered,
84
- registerChild = _ref2.registerChild;
85
- return (0, _jsxRuntime.jsx)(_reactVirtualized.List, _objectSpread(_objectSpread({
86
- "data-gs": gs("src", "infinitelist", "infinitelist.tsx", "infinite-loader", "list")
87
- }, listProps), {}, {
88
- ref: registerChild,
89
- onRowsRendered: onRowsRendered,
90
- rowCount: paddedRowCount
91
- }));
92
- }),
93
- "data-gs": gs("src", "infinitelist", "infinitelist.tsx", "infinite-loader"),
94
- isRowLoaded: this.isRowLoaded,
95
- loadMoreRows: loadMoreRows || _lodash["default"],
96
- rowCount: paddedRowCount,
97
- threshold: 5,
98
- ref: this.infiniteList,
99
- children: function children(_ref2) {
100
- var onRowsRendered = _ref2.onRowsRendered,
101
- registerChild = _ref2.registerChild;
102
- return (0, _jsxRuntime.jsx)(_reactVirtualized.List, _objectSpread(_objectSpread({
103
- "data-gs": gs("src", "infinitelist", "infinitelist.tsx", "infinite-loader", "list")
104
- }, listProps), {}, {
105
- ref: registerChild,
106
- onRowsRendered: onRowsRendered,
107
- rowCount: paddedRowCount
108
- }));
109
- }
110
- });
111
- }
112
- }]);
113
- }(_react.Component);
114
- var _default = exports["default"] = InfiniteList;
@@ -1,2 +0,0 @@
1
- export { default } from './InfiniteList';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,15 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "default", {
7
- enumerable: true,
8
- get: function get() {
9
- return _InfiniteList["default"];
10
- }
11
- });
12
- var _InfiniteList = _interopRequireDefault(require("./InfiniteList"));
13
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
14
- if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
15
- if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
@@ -1,6 +0,0 @@
1
- type LogoItemProps = {
2
- onClick?: () => void;
3
- };
4
- declare const LogoItem: ({ onClick }: LogoItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
5
- export default LogoItem;
6
- //# sourceMappingURL=LogoItem.d.ts.map
@@ -1,42 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports["default"] = void 0;
7
- var _NavigationItem = _interopRequireDefault(require("./NavigationItem"));
8
- var _Logo = _interopRequireDefault(require("../Logo"));
9
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
- if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
12
- if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
13
- /* eslint-disable td/instrumentation */
14
- // this level of fine grained instrumentation is not needed
15
- var LogoItem = function LogoItem(_ref) {
16
- var onClick = _ref.onClick;
17
- return (0, _jsxRuntime.jsx)(_NavigationItem["default"], {
18
- "data-gs": gs("src", "navigationbar", "logoitem.tsx", "navigation-item"),
19
- css: function css(theme) {
20
- return {
21
- alignItems: 'flex-end',
22
- justifyContent: 'center',
23
- // Half the width of NavigationPill minus half the width of SVG
24
- // Aligns center of icon with NavigationPill
25
- paddingRight: 'calc((2.75rem / 2 ) - 12px)',
26
- cursor: 'pointer',
27
- height: '3.75rem',
28
- width: '100%',
29
- borderBottom: "1px solid ".concat(theme.color.LightDividerNew)
30
- };
31
- },
32
- alignSelf: "center",
33
- onClick: onClick,
34
- "data-testid": "logo-item",
35
- children: (0, _jsxRuntime.jsx)(_Logo["default"], {
36
- "data-gs": gs("src", "navigationbar", "logoitem.tsx", "navigation-item", "logo"),
37
- width: "24",
38
- height: "16"
39
- })
40
- });
41
- };
42
- var _default = exports["default"] = LogoItem;
@@ -1,33 +0,0 @@
1
- /// <reference types="react" />
2
- import type { BoxProps } from '../Box';
3
- import type { Border, Spacing } from '../mixins';
4
- import NavigationItem from './NavigationItem';
5
- declare const Separator: React.FunctionComponent<React.PropsWithChildren<{}>>;
6
- declare const NavigationPill: import("@emotion/styled").StyledComponent<BoxProps & {
7
- theme?: import("@emotion/react").Theme | undefined;
8
- }, {}, {}>;
9
- export type NavigationBarSubComponents = {
10
- Separator: typeof Separator;
11
- NavigationItem: typeof NavigationItem;
12
- NavigationPill: typeof NavigationPill;
13
- };
14
- export type NavigationBarProps = BoxProps & Partial<Border & Spacing> & {
15
- children: React.ReactNode;
16
- showLogo?: boolean;
17
- logoAction?: () => void;
18
- props?: {};
19
- };
20
- export declare const StyledNavigationBar: import("@emotion/styled").StyledComponent<{
21
- theme?: import("@emotion/react").Theme | undefined;
22
- as?: import("react").ElementType<any> | undefined;
23
- } & BoxProps & Partial<Border & Spacing> & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
24
- theme?: import("@emotion/react").Theme | undefined;
25
- } & {
26
- children: React.ReactNode;
27
- showLogo?: boolean | undefined;
28
- logoAction?: (() => void) | undefined;
29
- props?: {} | undefined;
30
- }, {}, {}>;
31
- declare const NavigationBar: React.FunctionComponent<React.PropsWithChildren<NavigationBarProps>> & NavigationBarSubComponents;
32
- export default NavigationBar;
33
- //# sourceMappingURL=NavigationBar.d.ts.map