@7shifts/sous-chef 3.35.0 → 3.36.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/dist/core/SousChefProvider/SousChefProvider.d.ts +3 -1
- package/dist/i18n/TranslationsContext.d.ts +7 -0
- package/dist/i18n/locales/en.json +37 -0
- package/dist/i18n/locales/es.json +37 -0
- package/dist/i18n/locales/fr.json +37 -0
- package/dist/i18n/types.d.ts +3 -0
- package/dist/i18n/useTranslation.d.ts +2 -0
- package/dist/index.js +115 -61
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +111 -57
- package/dist/index.modern.js.map +1 -1
- package/dist/utils/date.d.ts +9 -2
- package/package.json +1 -1
- package/dist/utils/i18n.d.ts +0 -1
package/dist/index.modern.js
CHANGED
|
@@ -4212,34 +4212,6 @@ IconWrench.displayName = 'IconWrench';
|
|
|
4212
4212
|
|
|
4213
4213
|
var styles$6 = {"pagination-controls":"_SMSPF"};
|
|
4214
4214
|
|
|
4215
|
-
var getLocalizedString = function getLocalizedString(key) {
|
|
4216
|
-
if (!window.Shifts) {
|
|
4217
|
-
return getLocalTranslation(key);
|
|
4218
|
-
}
|
|
4219
|
-
return getWebAppTranslation(key);
|
|
4220
|
-
};
|
|
4221
|
-
var getWebAppTranslation = function getWebAppTranslation(key) {
|
|
4222
|
-
var _Shifts, _Shifts$Lang;
|
|
4223
|
-
if (!Shifts || ((_Shifts = Shifts) === null || _Shifts === void 0 ? void 0 : (_Shifts$Lang = _Shifts.Lang) === null || _Shifts$Lang === void 0 ? void 0 : _Shifts$Lang.cache) === undefined) {
|
|
4224
|
-
return getLocalTranslation(key);
|
|
4225
|
-
}
|
|
4226
|
-
var _key$split = key.split('.'),
|
|
4227
|
-
moduleName = _key$split[0],
|
|
4228
|
-
id = _key$split[1];
|
|
4229
|
-
if (Shifts.Lang.cache === undefined || Shifts.Lang.cache[moduleName] === undefined || Shifts.Lang.cache[moduleName][id] === undefined) {
|
|
4230
|
-
return key;
|
|
4231
|
-
}
|
|
4232
|
-
return Shifts.Lang.cache[moduleName][id];
|
|
4233
|
-
};
|
|
4234
|
-
var getLocalTranslation = function getLocalTranslation(key) {
|
|
4235
|
-
var translationParts = key.split('.');
|
|
4236
|
-
if (translationParts.length > 1) {
|
|
4237
|
-
var literal = translationParts[1];
|
|
4238
|
-
return literal.charAt(0).toUpperCase() + literal.slice(1).toLowerCase().replace(/_/g, ' ');
|
|
4239
|
-
}
|
|
4240
|
-
return key;
|
|
4241
|
-
};
|
|
4242
|
-
|
|
4243
4215
|
var styles$7 = {"keyboard-key":"_14Od2","keyboard-key--light":"_3hU2t","keyboard-key__character":"_31UYJ"};
|
|
4244
4216
|
|
|
4245
4217
|
var KeyboardKey = function KeyboardKey(_ref) {
|
|
@@ -4285,8 +4257,75 @@ var isFocusingEditableElement = function isFocusingEditableElement() {
|
|
|
4285
4257
|
return false;
|
|
4286
4258
|
};
|
|
4287
4259
|
|
|
4260
|
+
var PaginationControls = {
|
|
4261
|
+
previousButton: "Previous",
|
|
4262
|
+
nextButton: "Next"
|
|
4263
|
+
};
|
|
4264
|
+
var AsyncSelectField = {
|
|
4265
|
+
moreOptionsPlaceholder: "Start typing to see more options"
|
|
4266
|
+
};
|
|
4267
|
+
var SelectField = {
|
|
4268
|
+
createOption: "Create option",
|
|
4269
|
+
createButton: "Create"
|
|
4270
|
+
};
|
|
4271
|
+
var HintModal = {
|
|
4272
|
+
dontShowAgainLabel: "Don’t show this again"
|
|
4273
|
+
};
|
|
4274
|
+
var Calendar = {
|
|
4275
|
+
sunday: "Sunday",
|
|
4276
|
+
monday: "Monday",
|
|
4277
|
+
tuesday: "Tuesday",
|
|
4278
|
+
wednesday: "Wednesday",
|
|
4279
|
+
thursday: "Thursday",
|
|
4280
|
+
friday: "Friday",
|
|
4281
|
+
saturday: "Saturday",
|
|
4282
|
+
january: "January",
|
|
4283
|
+
february: "February",
|
|
4284
|
+
march: "March",
|
|
4285
|
+
april: "April",
|
|
4286
|
+
may: "May",
|
|
4287
|
+
june: "June",
|
|
4288
|
+
july: "July",
|
|
4289
|
+
august: "August",
|
|
4290
|
+
september: "September",
|
|
4291
|
+
october: "October",
|
|
4292
|
+
november: "November",
|
|
4293
|
+
december: "December"
|
|
4294
|
+
};
|
|
4295
|
+
var en = {
|
|
4296
|
+
PaginationControls: PaginationControls,
|
|
4297
|
+
AsyncSelectField: AsyncSelectField,
|
|
4298
|
+
SelectField: SelectField,
|
|
4299
|
+
HintModal: HintModal,
|
|
4300
|
+
Calendar: Calendar
|
|
4301
|
+
};
|
|
4302
|
+
|
|
4303
|
+
var initialValue = {
|
|
4304
|
+
i18n: en
|
|
4305
|
+
};
|
|
4306
|
+
var TranslationsContext = createContext(initialValue);
|
|
4307
|
+
|
|
4308
|
+
var useTranslation = function useTranslation(context) {
|
|
4309
|
+
var _useContext = useContext(TranslationsContext),
|
|
4310
|
+
i18n = _useContext.i18n;
|
|
4311
|
+
var translate = function translate(key) {
|
|
4312
|
+
var keys = key.includes('.') ? key.split('.') : [key];
|
|
4313
|
+
if (context) {
|
|
4314
|
+
keys.unshift(context);
|
|
4315
|
+
}
|
|
4316
|
+
var translation = keys.reduce(function (acc, key) {
|
|
4317
|
+
if (typeof acc === 'string') {
|
|
4318
|
+
return acc;
|
|
4319
|
+
}
|
|
4320
|
+
return acc.hasOwnProperty(key) ? acc[key] : '';
|
|
4321
|
+
}, i18n);
|
|
4322
|
+
return typeof translation === 'string' && translation !== '' ? translation : keys.join('.');
|
|
4323
|
+
};
|
|
4324
|
+
return translate;
|
|
4325
|
+
};
|
|
4326
|
+
|
|
4288
4327
|
var _excluded$2n = ["hasPrevious", "hasNext", "onPreviousClick", "onNextClick", "testId", "scrollTarget"];
|
|
4289
|
-
var PaginationControls = function PaginationControls(_ref) {
|
|
4328
|
+
var PaginationControls$1 = function PaginationControls(_ref) {
|
|
4290
4329
|
var _ref$hasPrevious = _ref.hasPrevious,
|
|
4291
4330
|
hasPrevious = _ref$hasPrevious === void 0 ? true : _ref$hasPrevious,
|
|
4292
4331
|
_ref$hasNext = _ref.hasNext,
|
|
@@ -4296,6 +4335,7 @@ var PaginationControls = function PaginationControls(_ref) {
|
|
|
4296
4335
|
testId = _ref.testId,
|
|
4297
4336
|
scrollTarget = _ref.scrollTarget,
|
|
4298
4337
|
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$2n);
|
|
4338
|
+
var __ = useTranslation('PaginationControls');
|
|
4299
4339
|
var _getDataProps = getDataProps(otherProps),
|
|
4300
4340
|
dataProps = _getDataProps.dataProps;
|
|
4301
4341
|
var scrollToTop = function scrollToTop() {
|
|
@@ -4335,7 +4375,7 @@ var PaginationControls = function PaginationControls(_ref) {
|
|
|
4335
4375
|
}), React__default.createElement(Button$1, {
|
|
4336
4376
|
disabled: !hasPrevious,
|
|
4337
4377
|
onClick: handlePreviousClick,
|
|
4338
|
-
title: React__default.createElement(React__default.Fragment, null, capitalizeFirstLetter(
|
|
4378
|
+
title: React__default.createElement(React__default.Fragment, null, capitalizeFirstLetter(__('previousButton')), "\xA0\xA0", React__default.createElement(KeyboardKey, {
|
|
4339
4379
|
theme: "light"
|
|
4340
4380
|
}, SHORTCUTS.PREVIOUS.toLocaleUpperCase()))
|
|
4341
4381
|
}, React__default.createElement(IconArrowLeft, {
|
|
@@ -4343,7 +4383,7 @@ var PaginationControls = function PaginationControls(_ref) {
|
|
|
4343
4383
|
})), React__default.createElement(Button$1, {
|
|
4344
4384
|
disabled: !hasNext,
|
|
4345
4385
|
onClick: handleNextClick,
|
|
4346
|
-
title: React__default.createElement(React__default.Fragment, null, capitalizeFirstLetter(
|
|
4386
|
+
title: React__default.createElement(React__default.Fragment, null, capitalizeFirstLetter(__('nextButton')), "\xA0\xA0", React__default.createElement(KeyboardKey, {
|
|
4347
4387
|
theme: "light"
|
|
4348
4388
|
}, SHORTCUTS.NEXT.toLocaleUpperCase()))
|
|
4349
4389
|
}, React__default.createElement(IconArrowRight, {
|
|
@@ -4427,8 +4467,14 @@ var ToastContainer = function ToastContainer(_ref2) {
|
|
|
4427
4467
|
};
|
|
4428
4468
|
|
|
4429
4469
|
var SousChefProvider = function SousChefProvider(_ref) {
|
|
4430
|
-
var children = _ref.children
|
|
4431
|
-
|
|
4470
|
+
var children = _ref.children,
|
|
4471
|
+
_ref$i18n = _ref.i18n,
|
|
4472
|
+
i18n = _ref$i18n === void 0 ? en : _ref$i18n;
|
|
4473
|
+
return React__default.createElement(TranslationsContext.Provider, {
|
|
4474
|
+
value: {
|
|
4475
|
+
i18n: i18n
|
|
4476
|
+
}
|
|
4477
|
+
}, React__default.createElement(ToastContainer, null), children);
|
|
4432
4478
|
};
|
|
4433
4479
|
|
|
4434
4480
|
var styles$a = {"data-table-header":"_1vpCK","data-table-header__item":"_dJWps","data-table-header__item--sortable":"_14AEw","data-table-header__itemfocus":"_2JSFR","data-table-header__item--action":"_29TM7","data-table-header__item-content":"_2Zpt5","data-table-header__item-content--right-align":"_3WtwH","data-table-header__sort-icon":"_3codU"};
|
|
@@ -4587,12 +4633,12 @@ var DATA_TABLE_SCROLL_STATES = {
|
|
|
4587
4633
|
};
|
|
4588
4634
|
var AMOUNT_OF_SKELETON_ROWS = 10;
|
|
4589
4635
|
|
|
4590
|
-
var initialValue = {
|
|
4636
|
+
var initialValue$1 = {
|
|
4591
4637
|
columns: [],
|
|
4592
4638
|
numberOfRows: 0,
|
|
4593
4639
|
state: DATA_TABLE_STATES.SKELETON_LOADING
|
|
4594
4640
|
};
|
|
4595
|
-
var Context = createContext(initialValue);
|
|
4641
|
+
var Context = createContext(initialValue$1);
|
|
4596
4642
|
var useDataTableContext = function useDataTableContext() {
|
|
4597
4643
|
var context = useContext(Context);
|
|
4598
4644
|
if (!context) {
|
|
@@ -6422,12 +6468,12 @@ function createWeekRange(date, weekStart) {
|
|
|
6422
6468
|
end: getEndOfWeek(date, weekStart)
|
|
6423
6469
|
};
|
|
6424
6470
|
}
|
|
6425
|
-
var getDays = function getDays() {
|
|
6426
|
-
var DAYS = [
|
|
6471
|
+
var getDays = function getDays(translate) {
|
|
6472
|
+
var DAYS = [translate('Calendar.sunday'), translate('Calendar.monday'), translate('Calendar.tuesday'), translate('Calendar.wednesday'), translate('Calendar.thursday'), translate('Calendar.friday'), translate('Calendar.saturday')];
|
|
6427
6473
|
return DAYS;
|
|
6428
6474
|
};
|
|
6429
|
-
var getMonths = function getMonths() {
|
|
6430
|
-
var MONTH_NAMES = [
|
|
6475
|
+
var getMonths = function getMonths(translate) {
|
|
6476
|
+
var MONTH_NAMES = [translate('Calendar.january'), translate('Calendar.february'), translate('Calendar.march'), translate('Calendar.april'), translate('Calendar.may'), translate('Calendar.june'), translate('Calendar.july'), translate('Calendar.august'), translate('Calendar.september'), translate('Calendar.october'), translate('Calendar.november'), translate('Calendar.december')];
|
|
6431
6477
|
return MONTH_NAMES;
|
|
6432
6478
|
};
|
|
6433
6479
|
|
|
@@ -6487,7 +6533,7 @@ var getVerticalPosition = function getVerticalPosition(anchorPosition, placement
|
|
|
6487
6533
|
}
|
|
6488
6534
|
};
|
|
6489
6535
|
|
|
6490
|
-
var Calendar = function Calendar(_ref) {
|
|
6536
|
+
var Calendar$1 = function Calendar(_ref) {
|
|
6491
6537
|
var _ref$mode = _ref.mode,
|
|
6492
6538
|
mode = _ref$mode === void 0 ? CALENDAR_MODE.DAY : _ref$mode,
|
|
6493
6539
|
_ref$position = _ref.position,
|
|
@@ -6502,6 +6548,7 @@ var Calendar = function Calendar(_ref) {
|
|
|
6502
6548
|
anchorRef = _ref.anchorRef,
|
|
6503
6549
|
testId = _ref.testId,
|
|
6504
6550
|
onMonthChange = _ref.onMonthChange;
|
|
6551
|
+
var translate = useTranslation();
|
|
6505
6552
|
var _useState = useState(null),
|
|
6506
6553
|
calendarRef = _useState[0],
|
|
6507
6554
|
setCalendarRef = _useState[1];
|
|
@@ -6537,7 +6584,8 @@ var Calendar = function Calendar(_ref) {
|
|
|
6537
6584
|
var anchorPosition = anchorNode.getBoundingClientRect();
|
|
6538
6585
|
var calendarPosition = calculateCalendarPosition(position, anchorPosition, calendarRef === null || calendarRef === void 0 ? void 0 : calendarRef.getBoundingClientRect());
|
|
6539
6586
|
var styleOverrides = mode === CALENDAR_MODE.WEEK ? weekOverridesStyles : dayOverridesStyles;
|
|
6540
|
-
var MONTH_NAMES = getMonths();
|
|
6587
|
+
var MONTH_NAMES = getMonths(translate);
|
|
6588
|
+
var DAYS = getDays(translate);
|
|
6541
6589
|
var defaultProps = {
|
|
6542
6590
|
classNames: _extends({}, originalStylers, styleOverrides),
|
|
6543
6591
|
onDayClick: function onDayClick(day, activeModifiers) {
|
|
@@ -6556,6 +6604,9 @@ var Calendar = function Calendar(_ref) {
|
|
|
6556
6604
|
weekStartsOn: weekStart,
|
|
6557
6605
|
onMonthChange: onMonthChange,
|
|
6558
6606
|
formatters: {
|
|
6607
|
+
formatMonthCaption: function formatMonthCaption(date) {
|
|
6608
|
+
return MONTH_NAMES[date.getMonth()];
|
|
6609
|
+
},
|
|
6559
6610
|
formatCaption: function formatCaption(date) {
|
|
6560
6611
|
return MONTH_NAMES[date.getMonth()] + ' ' + date.getFullYear();
|
|
6561
6612
|
},
|
|
@@ -6564,7 +6615,6 @@ var Calendar = function Calendar(_ref) {
|
|
|
6564
6615
|
}
|
|
6565
6616
|
}
|
|
6566
6617
|
};
|
|
6567
|
-
var DAYS = getDays();
|
|
6568
6618
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
6569
6619
|
className: styles$G['calendar']
|
|
6570
6620
|
}, React__default.createElement("div", {
|
|
@@ -6713,7 +6763,7 @@ var useLocalStorage = function useLocalStorage(key, initialValue) {
|
|
|
6713
6763
|
var styles$I = {"hint-modal":"_1b47y","hint-modal--after-open":"_2MB4p","hint-modal--before-close":"_3VYQo","hint-modal__overlay":"_3Enme","hint-modal__image":"_2Nn7v","hint-modal__body":"_bzN9e","hint-modal__close-button":"_3xbis"};
|
|
6714
6764
|
|
|
6715
6765
|
var _excluded$2y = ["header", "children", "mediaUrl", "onClose", "modalId", "primaryButton", "testId"];
|
|
6716
|
-
var HintModal = function HintModal(_ref) {
|
|
6766
|
+
var HintModal$1 = function HintModal(_ref) {
|
|
6717
6767
|
var header = _ref.header,
|
|
6718
6768
|
children = _ref.children,
|
|
6719
6769
|
mediaUrl = _ref.mediaUrl,
|
|
@@ -6722,6 +6772,7 @@ var HintModal = function HintModal(_ref) {
|
|
|
6722
6772
|
primaryButton = _ref.primaryButton,
|
|
6723
6773
|
testId = _ref.testId,
|
|
6724
6774
|
positionProps = _objectWithoutPropertiesLoose(_ref, _excluded$2y);
|
|
6775
|
+
var __ = useTranslation('HintModal');
|
|
6725
6776
|
var _useState = useState(false),
|
|
6726
6777
|
doNotShowAgain = _useState[0],
|
|
6727
6778
|
setDoNotShowAgain = _useState[1];
|
|
@@ -6786,7 +6837,7 @@ var HintModal = function HintModal(_ref) {
|
|
|
6786
6837
|
}, React__default.createElement(CheckboxField, {
|
|
6787
6838
|
name: "hint-modal-do-not-show-checkbox",
|
|
6788
6839
|
checked: doNotShowAgain,
|
|
6789
|
-
label:
|
|
6840
|
+
label: __('dontShowAgainLabel'),
|
|
6790
6841
|
onChange: function onChange() {
|
|
6791
6842
|
return setDoNotShowAgain(!doNotShowAgain);
|
|
6792
6843
|
}
|
|
@@ -7231,7 +7282,7 @@ var DataTable = function DataTable(_ref) {
|
|
|
7231
7282
|
return React__default.createElement("div", {
|
|
7232
7283
|
className: styles$b['data-table__pagination-controls'],
|
|
7233
7284
|
"data-testid": testId && testId + "-pagination-controls"
|
|
7234
|
-
}, React__default.createElement(PaginationControls, {
|
|
7285
|
+
}, React__default.createElement(PaginationControls$1, {
|
|
7235
7286
|
hasPrevious: isLoading ? false : hasPrevious,
|
|
7236
7287
|
hasNext: isLoading ? false : hasNext,
|
|
7237
7288
|
onPreviousClick: onPreviousClick,
|
|
@@ -7566,6 +7617,7 @@ function CustomMenu(_ref) {
|
|
|
7566
7617
|
setInputDefaultValue = _useState2[1];
|
|
7567
7618
|
var textFieldRef = useRef(null);
|
|
7568
7619
|
var containerRef = useRef(null);
|
|
7620
|
+
var __ = useTranslation('SelectField');
|
|
7569
7621
|
var CreatableButton = function CreatableButton() {
|
|
7570
7622
|
var button = creatableButton;
|
|
7571
7623
|
if (!button || typeof button === 'string') {
|
|
@@ -7583,7 +7635,7 @@ function CustomMenu(_ref) {
|
|
|
7583
7635
|
justifyContent: "center"
|
|
7584
7636
|
}, React__default.createElement(IconPlus, {
|
|
7585
7637
|
size: "medium"
|
|
7586
|
-
}), button ||
|
|
7638
|
+
}), button || __('createOption')));
|
|
7587
7639
|
}
|
|
7588
7640
|
return React__default.cloneElement(button, {
|
|
7589
7641
|
onClick: function onClick() {
|
|
@@ -7649,7 +7701,7 @@ function CustomMenu(_ref) {
|
|
|
7649
7701
|
onKeyDown: function onKeyDown(e) {
|
|
7650
7702
|
e.stopPropagation();
|
|
7651
7703
|
}
|
|
7652
|
-
},
|
|
7704
|
+
}, __('createButton'))))));
|
|
7653
7705
|
}
|
|
7654
7706
|
|
|
7655
7707
|
var useShouldScrollMenuIntoView = function useShouldScrollMenuIntoView(menuShouldScrollIntoView) {
|
|
@@ -7767,7 +7819,7 @@ var useSelectField = function useSelectField(_ref) {
|
|
|
7767
7819
|
};
|
|
7768
7820
|
};
|
|
7769
7821
|
|
|
7770
|
-
var SelectField = function SelectField(props) {
|
|
7822
|
+
var SelectField$1 = function SelectField(props) {
|
|
7771
7823
|
var _useSelectField = useSelectField(props),
|
|
7772
7824
|
fieldProps = _useSelectField.fieldProps,
|
|
7773
7825
|
selectProps = _useSelectField.selectProps;
|
|
@@ -7788,7 +7840,7 @@ var ToolbarSelect = function ToolbarSelect(_ref) {
|
|
|
7788
7840
|
disabled = _ref.disabled,
|
|
7789
7841
|
prefix = _ref.prefix,
|
|
7790
7842
|
testId = _ref.testId;
|
|
7791
|
-
return React__default.createElement(SelectField, {
|
|
7843
|
+
return React__default.createElement(SelectField$1, {
|
|
7792
7844
|
name: name,
|
|
7793
7845
|
value: value,
|
|
7794
7846
|
options: options,
|
|
@@ -7962,7 +8014,7 @@ var DateFilter = function DateFilter(_ref) {
|
|
|
7962
8014
|
}, React__default.createElement(IconChevronRight, {
|
|
7963
8015
|
size: "small",
|
|
7964
8016
|
color: "grey-400"
|
|
7965
|
-
}))), calendarOpen && mode !== DATE_FILTER_MODE.MONTH && React__default.createElement(Calendar, {
|
|
8017
|
+
}))), calendarOpen && mode !== DATE_FILTER_MODE.MONTH && React__default.createElement(Calendar$1, {
|
|
7966
8018
|
onSelect: handleChange,
|
|
7967
8019
|
selected: value,
|
|
7968
8020
|
onClickOutside: function onClickOutside() {
|
|
@@ -8870,6 +8922,7 @@ var CustomList = function CustomList(_ref) {
|
|
|
8870
8922
|
hasMoreOptions = _ref.hasMoreOptions,
|
|
8871
8923
|
hasMoreOptionsFirstLoad = _ref.hasMoreOptionsFirstLoad,
|
|
8872
8924
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2F);
|
|
8925
|
+
var __ = useTranslation('AsyncSelectField');
|
|
8873
8926
|
var showFooter = hasMoreOptions;
|
|
8874
8927
|
if (props.selectProps.inputValue === '' && typeof hasMoreOptionsFirstLoad === 'boolean') {
|
|
8875
8928
|
showFooter = hasMoreOptionsFirstLoad;
|
|
@@ -8878,11 +8931,11 @@ var CustomList = function CustomList(_ref) {
|
|
|
8878
8931
|
justifyContent: "center"
|
|
8879
8932
|
}, React__default.createElement("div", {
|
|
8880
8933
|
className: styles$11['custom-list']
|
|
8881
|
-
},
|
|
8934
|
+
}, __('moreOptionsPlaceholder')))));
|
|
8882
8935
|
};
|
|
8883
8936
|
|
|
8884
8937
|
var _excluded$2G = ["loadOptions"];
|
|
8885
|
-
var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
8938
|
+
var AsyncSelectField$1 = function AsyncSelectField(_ref) {
|
|
8886
8939
|
var loadOptions = _ref.loadOptions,
|
|
8887
8940
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$2G);
|
|
8888
8941
|
var _useState = useState(false),
|
|
@@ -9102,7 +9155,7 @@ var DateField = function DateField(_ref) {
|
|
|
9102
9155
|
onBlur: controllers.onBlur,
|
|
9103
9156
|
maxLength: format.length,
|
|
9104
9157
|
value: inputValue
|
|
9105
|
-
})), showCalendar && React__default.createElement(Calendar, {
|
|
9158
|
+
})), showCalendar && React__default.createElement(Calendar$1, {
|
|
9106
9159
|
onSelect: function onSelect(date) {
|
|
9107
9160
|
var _inputRef$current;
|
|
9108
9161
|
setInputValue(formatDate(date, format));
|
|
@@ -9199,6 +9252,7 @@ var DateRangeCalendar = function DateRangeCalendar(_ref) {
|
|
|
9199
9252
|
testId = _ref.testId,
|
|
9200
9253
|
onMonthChange = _ref.onMonthChange,
|
|
9201
9254
|
mode = _ref.mode;
|
|
9255
|
+
var translate = useTranslation();
|
|
9202
9256
|
var position = CALENDAR_PLACEMENT.BOTTOM;
|
|
9203
9257
|
var _useState = useState(null),
|
|
9204
9258
|
calendarRef = _useState[0],
|
|
@@ -9232,8 +9286,8 @@ var DateRangeCalendar = function DateRangeCalendar(_ref) {
|
|
|
9232
9286
|
fromMonth: start
|
|
9233
9287
|
};
|
|
9234
9288
|
var datePickerProps = mode === 'start-date' ? startDateProps : endDateProps;
|
|
9235
|
-
var DAYS = getDays();
|
|
9236
|
-
var MONTH_NAMES = getMonths();
|
|
9289
|
+
var DAYS = getDays(translate);
|
|
9290
|
+
var MONTH_NAMES = getMonths(translate);
|
|
9237
9291
|
return React__default.createElement(Portal, null, React__default.createElement("div", {
|
|
9238
9292
|
className: styles$G['calendar']
|
|
9239
9293
|
}, React__default.createElement("div", {
|
|
@@ -9572,7 +9626,7 @@ var WeekField = function WeekField(_ref) {
|
|
|
9572
9626
|
onBlur: controllers.onBlur,
|
|
9573
9627
|
maxLength: format.length,
|
|
9574
9628
|
value: inputValue
|
|
9575
|
-
})), showCalendar && React__default.createElement(Calendar, {
|
|
9629
|
+
})), showCalendar && React__default.createElement(Calendar$1, {
|
|
9576
9630
|
onSelect: function onSelect(date) {
|
|
9577
9631
|
var _inputRef$current;
|
|
9578
9632
|
setInputValue(formatDate(date, format));
|
|
@@ -11399,5 +11453,5 @@ var EmptyState = function EmptyState(_ref) {
|
|
|
11399
11453
|
}, children);
|
|
11400
11454
|
};
|
|
11401
11455
|
|
|
11402
|
-
export { AsyncSelectField, Avatar, Badge$1 as Badge, Bold, BreadcrumbItem, Breadcrumbs, Button$1 as Button, COLORS, Calendar, CalloutCard, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Dropdown, DropdownList, DropdownListDivider, DropdownListItem, EmptyState, Form, FormFeedback, FormFooter, FormRow, FormSection, HintModal, IconAnalytics, IconArrowDown, IconArrowDownWideShort, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconCheckCircleIncomplete, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconEnvelopeOpenDollar, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconRocket, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTable, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUnlock, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSearch, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, Page, PaginationControls, PasswordField, Paywall, PercentageField, PersistentBanner, PhoneField, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField, Skeleton, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, TimeRangeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, Underline, WeekField, ZINDEX, toast, useDataTableContext };
|
|
11456
|
+
export { AsyncSelectField$1 as AsyncSelectField, Avatar, Badge$1 as Badge, Bold, BreadcrumbItem, Breadcrumbs, Button$1 as Button, COLORS, Calendar$1 as Calendar, CalloutCard, Card, CheckboxField, Chip, CircularProgress, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateFilter, DateRangeField, Dropdown, DropdownList, DropdownListDivider, DropdownListItem, EmptyState, Form, FormFeedback, FormFooter, FormRow, FormSection, HintModal$1 as HintModal, IconAnalytics, IconArrowDown, IconArrowDownWideShort, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowTurnDownRight, IconArrowUp, IconAward, IconAwful, IconAwfulMonochromatic, IconBad, IconBadMonochromatic, IconBalanceScale, IconBalanceScaleLeft, IconBan, IconBarsH, IconBarsV, IconBell, IconBirthdayCake, IconBold, IconBolt, IconBook, IconBriefcase, IconBullseyeArrow, IconCalculator, IconCalendar, IconCalendarAlt, IconCalendarCheck, IconCalendarDay, IconCalendarExclamation, IconCalendarStar, IconCalendarTomorrow, IconCamera, IconCameraSlash, IconCashRegister, IconChartBar, IconCheck, IconCheckCircleIncomplete, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDecent, IconDecentMonochromatic, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconEnvelopeOpenDollar, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGood, IconGoodMonochromatic, IconGreat, IconGreatMonochromatic, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMessages, IconMinus, IconMinusCircle, IconMoneyBill, IconMugSaucerSolid, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconRocket, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTable, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUnlock, IconUserComputer, IconUserFriends, IconUserLight, IconUserPlus, IconUserSearch, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Italic, Link, Modal, ModalBody, ModalFooter, MultiSelectField, Page, PaginationControls$1 as PaginationControls, PasswordField, Paywall, PercentageField, PersistentBanner, PhoneField, Pill, PillSelectField, ProgressBar, RadioGroupBoxOption, RadioGroupField, RadioGroupOption, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SegmentedControl, SelectField$1 as SelectField, Skeleton, SousChefProvider, Spinner, Stack, Text, TextAreaField, TextField, TimeField, TimeRangeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, Underline, WeekField, ZINDEX, toast, useDataTableContext };
|
|
11403
11457
|
//# sourceMappingURL=index.modern.js.map
|