td-stylekit 28.44.1 → 29.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.
- package/CHANGELOG.md +48 -0
- package/dist/es/DataGrid/renderers.d.ts +0 -4
- package/dist/es/DataGrid/renderers.js +55 -120
- package/dist/es/DateControl/elements.d.ts +21 -21
- package/dist/es/FormField/index.d.ts +0 -2
- package/dist/es/FormField/index.js +0 -8
- package/dist/es/Icon/types.js +6 -2
- package/dist/es/TimeControl/elements.d.ts +21 -21
- package/dist/es/index.d.ts +1 -11
- package/dist/es/index.js +0 -70
- package/package.json +13 -13
- package/dist/es/CheckboxField/CheckboxField.d.ts +0 -13
- package/dist/es/CheckboxField/CheckboxField.js +0 -73
- package/dist/es/CheckboxField/index.d.ts +0 -3
- package/dist/es/CheckboxField/index.js +0 -15
- package/dist/es/DateField/DateField.d.ts +0 -74
- package/dist/es/DateField/DateField.js +0 -297
- package/dist/es/DateField/elements.d.ts +0 -11
- package/dist/es/DateField/elements.js +0 -39
- package/dist/es/DateField/index.d.ts +0 -3
- package/dist/es/DateField/index.js +0 -15
- package/dist/es/DetailPanel/DetailPanel.d.ts +0 -16
- package/dist/es/DetailPanel/DetailPanel.js +0 -62
- package/dist/es/DetailPanel/elements.d.ts +0 -35
- package/dist/es/DetailPanel/elements.js +0 -225
- package/dist/es/DetailPanel/index.d.ts +0 -3
- package/dist/es/DetailPanel/index.js +0 -15
- package/dist/es/FormField/FormField.d.ts +0 -38
- package/dist/es/FormField/FormField.js +0 -204
- package/dist/es/FormField/elements.d.ts +0 -17
- package/dist/es/FormField/elements.js +0 -75
- package/dist/es/InfiniteList/InfiniteList.d.ts +0 -29
- package/dist/es/InfiniteList/InfiniteList.js +0 -114
- package/dist/es/InfiniteList/index.d.ts +0 -2
- package/dist/es/InfiniteList/index.js +0 -15
- package/dist/es/NavigationBar/LogoItem.d.ts +0 -6
- package/dist/es/NavigationBar/LogoItem.js +0 -42
- package/dist/es/NavigationBar/NavigationBar.d.ts +0 -33
- package/dist/es/NavigationBar/NavigationBar.js +0 -99
- package/dist/es/NavigationBar/NavigationItem.d.ts +0 -33
- package/dist/es/NavigationBar/NavigationItem.js +0 -183
- package/dist/es/NavigationBar/index.d.ts +0 -2
- package/dist/es/NavigationBar/index.js +0 -15
- package/dist/es/NavigationPopover/NavigationPopover.d.ts +0 -24
- package/dist/es/NavigationPopover/NavigationPopover.js +0 -116
- package/dist/es/NavigationPopover/index.d.ts +0 -2
- package/dist/es/NavigationPopover/index.js +0 -15
- package/dist/es/Overlay/Overlay.d.ts +0 -15
- package/dist/es/Overlay/Overlay.js +0 -66
- package/dist/es/Overlay/OverlayBody.d.ts +0 -9
- package/dist/es/Overlay/OverlayBody.js +0 -32
- package/dist/es/Overlay/OverlayHeader.d.ts +0 -37
- package/dist/es/Overlay/OverlayHeader.js +0 -135
- package/dist/es/Overlay/index.d.ts +0 -4
- package/dist/es/Overlay/index.js +0 -29
- package/dist/es/StatCard/StatCard.d.ts +0 -26
- package/dist/es/StatCard/StatCard.js +0 -118
- package/dist/es/StatCard/elements.d.ts +0 -48
- package/dist/es/StatCard/elements.js +0 -156
- package/dist/es/StatCard/index.d.ts +0 -3
- package/dist/es/StatCard/index.js +0 -15
- package/dist/es/TimeField/TimeField.d.ts +0 -15
- package/dist/es/TimeField/TimeField.js +0 -42
- package/dist/es/TimeField/index.d.ts +0 -3
- package/dist/es/TimeField/index.js +0 -15
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.UnstyledDateField = exports.FORMAT_ERROR_MESSAGE = exports.FORMAT_DATE_ERROR_MESSAGE = exports.DISABLED_DAY_ERROR_MESSAGE = exports.DATE_FORMAT = exports.CLOSE_KEYS = void 0;
|
|
7
|
-
exports["default"] = DateField;
|
|
8
|
-
var _react = require("@emotion/react");
|
|
9
|
-
var _react2 = require("react");
|
|
10
|
-
var _DatePicker = _interopRequireWildcard(require("../DatePicker"));
|
|
11
|
-
var _FormField = _interopRequireDefault(require("../FormField"));
|
|
12
|
-
var _Modal = _interopRequireDefault(require("../Modal"));
|
|
13
|
-
var _TooltipPopover = _interopRequireDefault(require("../TooltipPopover"));
|
|
14
|
-
var _utils = require("../utils");
|
|
15
|
-
var _elements = require("./elements");
|
|
16
|
-
var _jsxRuntime = require("@emotion/react/jsx-runtime");
|
|
17
|
-
var _excluded = ["className", "disabledDays", "data-instrumentation", "enableFutureDates", "enablePastDates", "value", "hideErrors", "minDatetime", "popoverPlacement", "time", "popoverRenderer", "onMenuClose", "onMenuOpen", "locale"];
|
|
18
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
19
|
-
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); }
|
|
20
|
-
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 && {}.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; }
|
|
21
|
-
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); }
|
|
22
|
-
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; }
|
|
23
|
-
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; }
|
|
24
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
-
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); } }
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
-
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
28
|
-
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); }
|
|
29
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
30
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
32
|
-
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); }
|
|
33
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
34
|
-
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; }
|
|
35
|
-
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; }
|
|
36
|
-
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; }
|
|
37
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
38
|
-
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); }
|
|
39
|
-
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
40
|
-
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
41
|
-
var dateToString = _DatePicker.DatePickerUtils.dateToString,
|
|
42
|
-
stringToDate = _DatePicker.DatePickerUtils.stringToDate,
|
|
43
|
-
isStringCorrectFormat = _DatePicker.DatePickerUtils.isStringCorrectFormat,
|
|
44
|
-
DEFAULT_FORMAT = _DatePicker.DatePickerUtils.DEFAULT_FORMAT;
|
|
45
|
-
var CLOSE_KEYS = exports.CLOSE_KEYS = [String.fromCharCode(25),
|
|
46
|
-
// Gets sent when you press shift+tab with Chrome...
|
|
47
|
-
'Enter', 'Escape', 'Tab'];
|
|
48
|
-
// @TODO: Change to YYYY-MM-DD?
|
|
49
|
-
var FORMAT_DATE_ERROR_MESSAGE = exports.FORMAT_DATE_ERROR_MESSAGE = 'Format M/d/yyyy';
|
|
50
|
-
var DATE_FORMAT = exports.DATE_FORMAT = 'yyyy-M-d HH:mm:ss';
|
|
51
|
-
var FORMAT_ERROR_MESSAGE = exports.FORMAT_ERROR_MESSAGE = "Format ".concat(DATE_FORMAT);
|
|
52
|
-
var DISABLED_DAY_ERROR_MESSAGE = exports.DISABLED_DAY_ERROR_MESSAGE = 'That date is disabled';
|
|
53
|
-
var ModalAwarePopover = function ModalAwarePopover(props) {
|
|
54
|
-
var _useContext = (0, _react2.useContext)(_Modal["default"].context),
|
|
55
|
-
inModal = _useContext.inModal;
|
|
56
|
-
return (0, _jsxRuntime.jsx)(_elements.PopoverDiv, _objectSpread(_objectSpread({
|
|
57
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "popover-div")
|
|
58
|
-
}, props), {}, {
|
|
59
|
-
zIndex: inModal ? 'Modal' : undefined
|
|
60
|
-
}));
|
|
61
|
-
};
|
|
62
|
-
/**
|
|
63
|
-
* Displays a text Input component with a popover DatePicker for selecting a date.
|
|
64
|
-
*/
|
|
65
|
-
var UnstyledDateField = exports.UnstyledDateField = /*#__PURE__*/function (_Component) {
|
|
66
|
-
function UnstyledDateField(props, context) {
|
|
67
|
-
var _this;
|
|
68
|
-
_classCallCheck(this, UnstyledDateField);
|
|
69
|
-
_this = _callSuper(this, UnstyledDateField, [props, context]);
|
|
70
|
-
_defineProperty(_this, "inputRef", /*#__PURE__*/(0, _react2.createRef)());
|
|
71
|
-
_defineProperty(_this, "datePickerRef", /*#__PURE__*/(0, _react2.createRef)());
|
|
72
|
-
_defineProperty(_this, "show", function () {
|
|
73
|
-
_this.setState({
|
|
74
|
-
show: true
|
|
75
|
-
});
|
|
76
|
-
_this.props.onMenuOpen && _this.props.onMenuOpen();
|
|
77
|
-
});
|
|
78
|
-
_defineProperty(_this, "hide", function () {
|
|
79
|
-
_this.setState({
|
|
80
|
-
show: false
|
|
81
|
-
});
|
|
82
|
-
_this.props.onMenuClose && _this.props.onMenuClose();
|
|
83
|
-
});
|
|
84
|
-
_defineProperty(_this, "onRootClose", function (e) {
|
|
85
|
-
var _this$datePickerRef, _this$datePickerRef$c, _this$inputRef, _this$inputRef$curren;
|
|
86
|
-
if (e && !((_this$datePickerRef = _this.datePickerRef) !== null && _this$datePickerRef !== void 0 && (_this$datePickerRef$c = _this$datePickerRef.current) !== null && _this$datePickerRef$c !== void 0 && _this$datePickerRef$c.contains(e.target)) && !((_this$inputRef = _this.inputRef) !== null && _this$inputRef !== void 0 && (_this$inputRef$curren = _this$inputRef.current) !== null && _this$inputRef$curren !== void 0 && _this$inputRef$curren.contains(e.target))) {
|
|
87
|
-
_this.hide();
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
_defineProperty(_this, "_overlayTarget", function () {
|
|
91
|
-
return _this.inputRef.current;
|
|
92
|
-
});
|
|
93
|
-
_defineProperty(_this, "_onKeyDown", function (event) {
|
|
94
|
-
if (CLOSE_KEYS.includes(event.key)) {
|
|
95
|
-
_this.hide();
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
_defineProperty(_this, "_onDatePickerChange", function (value) {
|
|
99
|
-
var _this$props = _this.props,
|
|
100
|
-
name = _this$props.name,
|
|
101
|
-
onChange = _this$props.onChange;
|
|
102
|
-
onChange({
|
|
103
|
-
name: name,
|
|
104
|
-
value: value
|
|
105
|
-
});
|
|
106
|
-
_this.hide();
|
|
107
|
-
});
|
|
108
|
-
_defineProperty(_this, "_onInputChange", function (_ref) {
|
|
109
|
-
var name = _ref.name,
|
|
110
|
-
value = _ref.value;
|
|
111
|
-
var date = typeof value === 'string' && isStringCorrectFormat(value, DEFAULT_FORMAT, _this.props.locale) ? stringToDate(value) : null;
|
|
112
|
-
var _this$props2 = _this.props,
|
|
113
|
-
onChange = _this$props2.onChange,
|
|
114
|
-
disabledDays = _this$props2.disabledDays,
|
|
115
|
-
enableFutureDates = _this$props2.enableFutureDates,
|
|
116
|
-
clearable = _this$props2.clearable,
|
|
117
|
-
minDatetime = _this$props2.minDatetime;
|
|
118
|
-
|
|
119
|
-
// If we have a validation function and it's test doesn't pass then
|
|
120
|
-
// we don't want to call onChange, but we want to keep local state
|
|
121
|
-
// up to date so that the input respects the users inputs
|
|
122
|
-
if (disabledDays && date && disabledDays(date)) {
|
|
123
|
-
_this.setState({
|
|
124
|
-
inputValue: String(value)
|
|
125
|
-
});
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// Not all input values reflect real dates
|
|
130
|
-
// but we still need to update state to keep the inner <input> synced
|
|
131
|
-
if (date) {
|
|
132
|
-
if (minDatetime && date < minDatetime || !enableFutureDates && date > new Date()) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
onChange({
|
|
136
|
-
name: name,
|
|
137
|
-
value: date
|
|
138
|
-
});
|
|
139
|
-
} else {
|
|
140
|
-
if (!value && clearable) {
|
|
141
|
-
// notify when input has been cleared
|
|
142
|
-
onChange({
|
|
143
|
-
name: name,
|
|
144
|
-
value: null
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
_this.setState({
|
|
148
|
-
inputValue: String(value)
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
// Make sure the overlay is showing any time the input is changed
|
|
153
|
-
// This handles an edge case where a user types a value after typing Escape
|
|
154
|
-
_this.show();
|
|
155
|
-
});
|
|
156
|
-
_defineProperty(_this, "getErrors", function () {
|
|
157
|
-
var _this$props3 = _this.props,
|
|
158
|
-
error = _this$props3.error,
|
|
159
|
-
disabledDays = _this$props3.disabledDays,
|
|
160
|
-
hideErrors = _this$props3.hideErrors,
|
|
161
|
-
time = _this$props3.time;
|
|
162
|
-
if (hideErrors) {
|
|
163
|
-
return;
|
|
164
|
-
}
|
|
165
|
-
var inputValue = _this.state.inputValue;
|
|
166
|
-
var errorList = error ? (0, _utils.getErrorList)(error) : [];
|
|
167
|
-
var date = stringToDate(inputValue);
|
|
168
|
-
if (!time && inputValue && !date) {
|
|
169
|
-
errorList.unshift(FORMAT_DATE_ERROR_MESSAGE);
|
|
170
|
-
}
|
|
171
|
-
if (inputValue && date && disabledDays && disabledDays(date)) {
|
|
172
|
-
errorList.unshift(DISABLED_DAY_ERROR_MESSAGE);
|
|
173
|
-
}
|
|
174
|
-
if (time && !_DatePicker.DatePickerUtils.stringToDate(inputValue, DATE_FORMAT)) {
|
|
175
|
-
errorList.unshift(FORMAT_ERROR_MESSAGE);
|
|
176
|
-
}
|
|
177
|
-
return errorList;
|
|
178
|
-
});
|
|
179
|
-
_this.state = {
|
|
180
|
-
inputValue: props.value ? dateToString(props.value, undefined, props.locale) : '',
|
|
181
|
-
show: false
|
|
182
|
-
};
|
|
183
|
-
return _this;
|
|
184
|
-
}
|
|
185
|
-
_inherits(UnstyledDateField, _Component);
|
|
186
|
-
return _createClass(UnstyledDateField, [{
|
|
187
|
-
key: "componentDidUpdate",
|
|
188
|
-
value: function componentDidUpdate(prevProps) {
|
|
189
|
-
if (prevProps.value !== this.props.value) {
|
|
190
|
-
// Keep our inner <input> synced with changes to Date
|
|
191
|
-
// either external or from clicks on DayPicker
|
|
192
|
-
var format = this.props.time ? DATE_FORMAT : undefined;
|
|
193
|
-
this.setState({
|
|
194
|
-
inputValue: this.props.value ? this.props.value instanceof Date ? _DatePicker.DatePickerUtils.dateToString(this.props.value, format, this.props.locale) : this.props.value : ''
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}, {
|
|
199
|
-
key: "render",
|
|
200
|
-
value: function render() {
|
|
201
|
-
var _this2 = this;
|
|
202
|
-
var _this$props4 = this.props,
|
|
203
|
-
className = _this$props4.className,
|
|
204
|
-
disabledDays = _this$props4.disabledDays,
|
|
205
|
-
dataInstrumentation = _this$props4['data-instrumentation'],
|
|
206
|
-
enableFutureDates = _this$props4.enableFutureDates,
|
|
207
|
-
enablePastDates = _this$props4.enablePastDates,
|
|
208
|
-
value = _this$props4.value,
|
|
209
|
-
hideErrors = _this$props4.hideErrors,
|
|
210
|
-
minDatetime = _this$props4.minDatetime,
|
|
211
|
-
popoverPlacement = _this$props4.popoverPlacement,
|
|
212
|
-
time = _this$props4.time,
|
|
213
|
-
popoverRenderer = _this$props4.popoverRenderer,
|
|
214
|
-
onMenuClose = _this$props4.onMenuClose,
|
|
215
|
-
onMenuOpen = _this$props4.onMenuOpen,
|
|
216
|
-
locale = _this$props4.locale,
|
|
217
|
-
props = _objectWithoutProperties(_this$props4, _excluded);
|
|
218
|
-
var _this$state = this.state,
|
|
219
|
-
inputValue = _this$state.inputValue,
|
|
220
|
-
show = _this$state.show;
|
|
221
|
-
return (0, _jsxRuntime.jsx)(_utils.CloseWrapper, {
|
|
222
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper"),
|
|
223
|
-
className: className,
|
|
224
|
-
onClose: function onClose(e) {
|
|
225
|
-
return e && _this2.onRootClose(e);
|
|
226
|
-
},
|
|
227
|
-
disabled: !show,
|
|
228
|
-
children: (0, _jsxRuntime.jsxs)(_elements.Container, {
|
|
229
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper", "container"),
|
|
230
|
-
onKeyDown: this._onKeyDown,
|
|
231
|
-
"data-instrumentation": dataInstrumentation,
|
|
232
|
-
children: [(0, _jsxRuntime.jsx)(_FormField["default"], _objectSpread(_objectSpread({
|
|
233
|
-
"data-gs-c": gsC(inputValue),
|
|
234
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper", "container", "form-field")
|
|
235
|
-
}, props), {}, {
|
|
236
|
-
error: !hideErrors ? this.getErrors() : null,
|
|
237
|
-
onChange: this._onInputChange,
|
|
238
|
-
onFocus: this.show,
|
|
239
|
-
inputRef: this.inputRef,
|
|
240
|
-
value: inputValue,
|
|
241
|
-
type: "text",
|
|
242
|
-
"data-instrumentation": "".concat(dataInstrumentation, "-formfield"),
|
|
243
|
-
locale: locale
|
|
244
|
-
})), (0, _jsxRuntime.jsx)(_TooltipPopover["default"], {
|
|
245
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper", "container", "tooltip-popover"),
|
|
246
|
-
onHide: this.hide,
|
|
247
|
-
placement: popoverPlacement,
|
|
248
|
-
show: show,
|
|
249
|
-
target: this._overlayTarget,
|
|
250
|
-
children: (0, _jsxRuntime.jsx)(ModalAwarePopover, {
|
|
251
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper", "container", "tooltip-popover", "modal-aware-popover"),
|
|
252
|
-
children: (0, _jsxRuntime.jsx)("div", {
|
|
253
|
-
"data-gs-c": gsC(popoverRenderer ? popoverRenderer() : (0, _jsxRuntime.jsx)(_DatePicker["default"], {
|
|
254
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper", "container", "tooltip-popover", "modal-aware-popover", "div", "date-picker"),
|
|
255
|
-
date: value,
|
|
256
|
-
disabledDays: disabledDays,
|
|
257
|
-
disablePastDates: !enablePastDates,
|
|
258
|
-
disableFutureDates: !enableFutureDates,
|
|
259
|
-
onChange: this._onDatePickerChange,
|
|
260
|
-
"data-instrumentation": "".concat(dataInstrumentation, "-datepicker"),
|
|
261
|
-
locale: locale
|
|
262
|
-
})),
|
|
263
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper", "container", "tooltip-popover", "modal-aware-popover", "div"),
|
|
264
|
-
ref: this.datePickerRef,
|
|
265
|
-
children: popoverRenderer ? popoverRenderer() : (0, _jsxRuntime.jsx)(_DatePicker["default"], {
|
|
266
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "close-wrapper", "container", "tooltip-popover", "modal-aware-popover", "div", "date-picker"),
|
|
267
|
-
date: value,
|
|
268
|
-
disabledDays: disabledDays,
|
|
269
|
-
disablePastDates: !enablePastDates,
|
|
270
|
-
disableFutureDates: !enableFutureDates,
|
|
271
|
-
onChange: this._onDatePickerChange,
|
|
272
|
-
"data-instrumentation": "".concat(dataInstrumentation, "-datepicker"),
|
|
273
|
-
locale: locale
|
|
274
|
-
})
|
|
275
|
-
})
|
|
276
|
-
})
|
|
277
|
-
})]
|
|
278
|
-
})
|
|
279
|
-
});
|
|
280
|
-
}
|
|
281
|
-
}]);
|
|
282
|
-
}(_react2.Component); // Re-exported so that react-docgen correctly parses component documentation.
|
|
283
|
-
_defineProperty(UnstyledDateField, "defaultProps", {
|
|
284
|
-
enablePastDates: false,
|
|
285
|
-
enableFutureDates: true,
|
|
286
|
-
clearable: true,
|
|
287
|
-
popoverPlacement: 'bottom',
|
|
288
|
-
'data-instrumentation': 'datefield'
|
|
289
|
-
});
|
|
290
|
-
function DateField(props) {
|
|
291
|
-
var theme = (0, _react.useTheme)();
|
|
292
|
-
return (0, _jsxRuntime.jsx)(UnstyledDateField, _objectSpread(_objectSpread({
|
|
293
|
-
"data-gs": gs("src", "datefield", "datefield.tsx", "date-field", "unstyled-date-field")
|
|
294
|
-
}, props), {}, {
|
|
295
|
-
theme: theme
|
|
296
|
-
}));
|
|
297
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const Container: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
6
|
-
export declare const PopoverDiv: import("@emotion/styled").StyledComponent<import("../Popover").PopoverProps & {
|
|
7
|
-
children?: import("react").ReactNode;
|
|
8
|
-
} & {
|
|
9
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
10
|
-
}, {}, {}>;
|
|
11
|
-
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.PopoverDiv = exports.Container = void 0;
|
|
7
|
-
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
|
-
var _Popover = _interopRequireDefault(require("../Popover"));
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
10
|
-
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)."; }
|
|
11
|
-
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
12
|
-
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
13
|
-
var Container = exports.Container = /*#__PURE__*/(0, _base["default"])('div', process.env.NODE_ENV === "production" ? {
|
|
14
|
-
target: "elmf6gl1"
|
|
15
|
-
} : {
|
|
16
|
-
target: "elmf6gl1",
|
|
17
|
-
label: "Container"
|
|
18
|
-
})(process.env.NODE_ENV === "production" ? {
|
|
19
|
-
name: "bjn8wh",
|
|
20
|
-
styles: "position:relative"
|
|
21
|
-
} : {
|
|
22
|
-
name: "bjn8wh",
|
|
23
|
-
styles: "position:relative",
|
|
24
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9EYXRlRmllbGQvZWxlbWVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR3lCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9EYXRlRmllbGQvZWxlbWVudHMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUG9wb3ZlciBmcm9tICcuLi9Qb3BvdmVyJ1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoJ2RpdicpKHtcbiAgcG9zaXRpb246ICdyZWxhdGl2ZSdcbn0pXG5cbmV4cG9ydCBjb25zdCBQb3BvdmVyRGl2ID0gc3R5bGVkKFBvcG92ZXIpKCh7IHRoZW1lIH0pID0+ICh7XG4gIG1heFdpZHRoOiAnbm9uZScsXG4gIHBhZGRpbmc6IDAsXG4gIHpJbmRleDogdGhlbWUuekluZGV4LlRldGhlclxufSkpXG4iXX0= */",
|
|
25
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
26
|
-
});
|
|
27
|
-
var PopoverDiv = exports.PopoverDiv = /*#__PURE__*/(0, _base["default"])(_Popover["default"], process.env.NODE_ENV === "production" ? {
|
|
28
|
-
target: "elmf6gl0"
|
|
29
|
-
} : {
|
|
30
|
-
target: "elmf6gl0",
|
|
31
|
-
label: "PopoverDiv"
|
|
32
|
-
})(function (_ref) {
|
|
33
|
-
var theme = _ref.theme;
|
|
34
|
-
return {
|
|
35
|
-
maxWidth: 'none',
|
|
36
|
-
padding: 0,
|
|
37
|
-
zIndex: theme.zIndex.Tether
|
|
38
|
-
};
|
|
39
|
-
}, process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9EYXRlRmllbGQvZWxlbWVudHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBTzBCIiwiZmlsZSI6Ii4uLy4uLy4uL3NyYy9EYXRlRmllbGQvZWxlbWVudHMudHMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgUG9wb3ZlciBmcm9tICcuLi9Qb3BvdmVyJ1xuaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnXG5cbmV4cG9ydCBjb25zdCBDb250YWluZXIgPSBzdHlsZWQoJ2RpdicpKHtcbiAgcG9zaXRpb246ICdyZWxhdGl2ZSdcbn0pXG5cbmV4cG9ydCBjb25zdCBQb3BvdmVyRGl2ID0gc3R5bGVkKFBvcG92ZXIpKCh7IHRoZW1lIH0pID0+ICh7XG4gIG1heFdpZHRoOiAnbm9uZScsXG4gIHBhZGRpbmc6IDAsXG4gIHpJbmRleDogdGhlbWUuekluZGV4LlRldGhlclxufSkpXG4iXX0= */");
|
|
@@ -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 _DateField["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
var _DateField = _interopRequireDefault(require("./DateField"));
|
|
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,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { DetailPanelBody, DetailPanelHeader } from './elements';
|
|
3
|
-
import type { CollapsibleToggleProps } from '../CollapsibleToggle';
|
|
4
|
-
export type DetailPanelProps = {
|
|
5
|
-
children?: React.ReactNode;
|
|
6
|
-
hiddenToggleLabel?: CollapsibleToggleProps['hiddenLabel'];
|
|
7
|
-
isClosed?: boolean;
|
|
8
|
-
toggleOnClick?: CollapsibleToggleProps['onClick'];
|
|
9
|
-
};
|
|
10
|
-
export type DetailPanelSubComponents = {
|
|
11
|
-
Header: typeof DetailPanelHeader;
|
|
12
|
-
Body: typeof DetailPanelBody;
|
|
13
|
-
};
|
|
14
|
-
export declare const DetailPanel: React.FunctionComponent<React.PropsWithChildren<DetailPanelProps>> & DetailPanelSubComponents;
|
|
15
|
-
export default DetailPanel;
|
|
16
|
-
//# sourceMappingURL=DetailPanel.d.ts.map
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = exports.DetailPanel = void 0;
|
|
7
|
-
var _elements = require("./elements");
|
|
8
|
-
var _CollapsibleToggle = _interopRequireDefault(require("../CollapsibleToggle"));
|
|
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 DetailPanel = exports.DetailPanel = function DetailPanel(_ref) {
|
|
16
|
-
var children = _ref.children,
|
|
17
|
-
isClosed = _ref.isClosed,
|
|
18
|
-
hiddenToggleLabel = _ref.hiddenToggleLabel,
|
|
19
|
-
toggleOnClick = _ref.toggleOnClick;
|
|
20
|
-
function onClick(e) {
|
|
21
|
-
e.stopPropagation();
|
|
22
|
-
if (toggleOnClick) toggleOnClick(e);
|
|
23
|
-
}
|
|
24
|
-
var defaultHiddenLabel = isClosed ? 'Open Panel' : 'Close Panel';
|
|
25
|
-
var toggleLabel = hiddenToggleLabel || defaultHiddenLabel;
|
|
26
|
-
return (0, _jsxRuntime.jsxs)(_elements.Wrapper, {
|
|
27
|
-
"data-gs": gs("src", "detailpanel", "detailpanel.tsx", "wrapper"),
|
|
28
|
-
isClosed: isClosed,
|
|
29
|
-
children: [toggleOnClick && (0, _jsxRuntime.jsx)(_CollapsibleToggle["default"], {
|
|
30
|
-
"data-gs": gs("src", "detailpanel", "detailpanel.tsx", "wrapper", "toggle"),
|
|
31
|
-
id: "DETAIL_PANEL_TOGGLE",
|
|
32
|
-
isClosed: isClosed,
|
|
33
|
-
hiddenLabel: toggleLabel,
|
|
34
|
-
onClick: onClick,
|
|
35
|
-
openLeft: true
|
|
36
|
-
}), (0, _jsxRuntime.jsx)(_elements.DetailPanelContainer, {
|
|
37
|
-
"data-gs-c": gsC(isClosed ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
38
|
-
children: [(0, _jsxRuntime.jsx)(_elements.HeaderWrapper, {
|
|
39
|
-
"data-gs": gs("src", "detailpanel", "detailpanel.tsx", "wrapper", "detail-panel-container", "header-wrapper"),
|
|
40
|
-
isClosed: true
|
|
41
|
-
}), (0, _jsxRuntime.jsx)(_elements.DetailPanelBody, {
|
|
42
|
-
"data-gs": gs("src", "detailpanel", "detailpanel.tsx", "wrapper", "detail-panel-container", "detail-panel-body"),
|
|
43
|
-
isClosed: true
|
|
44
|
-
})]
|
|
45
|
-
}) : children),
|
|
46
|
-
"data-gs": gs("src", "detailpanel", "detailpanel.tsx", "wrapper", "detail-panel-container"),
|
|
47
|
-
isClosed: isClosed,
|
|
48
|
-
children: isClosed ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
49
|
-
children: [(0, _jsxRuntime.jsx)(_elements.HeaderWrapper, {
|
|
50
|
-
"data-gs": gs("src", "detailpanel", "detailpanel.tsx", "wrapper", "detail-panel-container", "header-wrapper"),
|
|
51
|
-
isClosed: true
|
|
52
|
-
}), (0, _jsxRuntime.jsx)(_elements.DetailPanelBody, {
|
|
53
|
-
"data-gs": gs("src", "detailpanel", "detailpanel.tsx", "wrapper", "detail-panel-container", "detail-panel-body"),
|
|
54
|
-
isClosed: true
|
|
55
|
-
})]
|
|
56
|
-
}) : children
|
|
57
|
-
})]
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
DetailPanel.Header = _elements.DetailPanelHeader;
|
|
61
|
-
DetailPanel.Body = _elements.DetailPanelBody;
|
|
62
|
-
var _default = exports["default"] = DetailPanel;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
export declare const HeaderWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
-
as?: import("react").ElementType<any> | undefined;
|
|
5
|
-
} & {
|
|
6
|
-
isClosed?: boolean | undefined;
|
|
7
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
8
|
-
type DetailPanelHeaderProps = {
|
|
9
|
-
title: string;
|
|
10
|
-
subtitle?: string;
|
|
11
|
-
icon?: React.ReactNode;
|
|
12
|
-
actionButton?: React.ReactNode;
|
|
13
|
-
isClosed?: boolean;
|
|
14
|
-
};
|
|
15
|
-
export declare const DetailPanelHeader: React.FunctionComponent<React.PropsWithChildren<DetailPanelHeaderProps>>;
|
|
16
|
-
export declare const DetailPanelBody: import("@emotion/styled").StyledComponent<{
|
|
17
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
18
|
-
as?: import("react").ElementType<any> | undefined;
|
|
19
|
-
} & {
|
|
20
|
-
isClosed?: boolean | undefined;
|
|
21
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
22
|
-
export declare const DetailPanelContainer: import("@emotion/styled").StyledComponent<{
|
|
23
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
24
|
-
as?: import("react").ElementType<any> | undefined;
|
|
25
|
-
} & {
|
|
26
|
-
isClosed?: boolean | undefined;
|
|
27
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
28
|
-
export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
29
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
30
|
-
as?: import("react").ElementType<any> | undefined;
|
|
31
|
-
} & {
|
|
32
|
-
isClosed?: boolean | undefined;
|
|
33
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
34
|
-
export default DetailPanelHeader;
|
|
35
|
-
//# sourceMappingURL=elements.d.ts.map
|