@7shifts/sous-chef 2.12.0 → 2.13.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/forms/AsyncSelectField/AsyncSelectField.d.ts +3 -1
- package/dist/icons/components/IconReply.d.ts +11 -0
- package/dist/icons/components/index.d.ts +1 -0
- package/dist/index.js +62 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +62 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -2504,6 +2504,21 @@ var IconRepeat = function IconRepeat(props) {
|
|
|
2504
2504
|
|
|
2505
2505
|
IconRepeat.displayName = 'IconRepeat';
|
|
2506
2506
|
|
|
2507
|
+
var IconReply = function IconReply(props) {
|
|
2508
|
+
return React__default.createElement("svg", Object.assign({
|
|
2509
|
+
viewBox: "0 0 20 20",
|
|
2510
|
+
fill: "none",
|
|
2511
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
2512
|
+
"data-testid": "icon-reply",
|
|
2513
|
+
style: getIconStyles(props)
|
|
2514
|
+
}, props), React__default.createElement("path", {
|
|
2515
|
+
d: "m.788 9.854 5.893 6.161c.828.866 2.307.288 2.307-.926v-2.94c5.17.06 7.335.56 6.067 5.058-.28.988.852 1.749 1.663 1.156 1.115-.815 2.985-2.665 2.985-5.845 0-5.729-5.175-6.731-10.715-6.798V2.77c0-1.215-1.48-1.79-2.307-.926L.788 8.003a1.34 1.34 0 0 0 0 1.851Zm.775-1.11 5.893-6.161a.268.268 0 0 1 .461.185v4.018c5.26 0 10.714.374 10.714 5.732 0 2.49-1.339 4.09-2.545 4.972 1.719-6.093-2.43-6.418-8.169-6.418v4.017a.268.268 0 0 1-.461.186L1.563 9.114a.267.267 0 0 1 0-.37Z",
|
|
2516
|
+
fill: "currentColor"
|
|
2517
|
+
}));
|
|
2518
|
+
};
|
|
2519
|
+
|
|
2520
|
+
IconReply.displayName = 'IconReply';
|
|
2521
|
+
|
|
2507
2522
|
var IconSearch = function IconSearch(props) {
|
|
2508
2523
|
return React__default.createElement("svg", Object.assign({
|
|
2509
2524
|
viewBox: "0 0 20 20",
|
|
@@ -3214,7 +3229,7 @@ var getLocalTranslation = function getLocalTranslation(key) {
|
|
|
3214
3229
|
|
|
3215
3230
|
if (translationParts.length > 1) {
|
|
3216
3231
|
var literal = translationParts[1];
|
|
3217
|
-
return literal.charAt(0).toUpperCase() + literal.slice(1).toLowerCase().
|
|
3232
|
+
return literal.charAt(0).toUpperCase() + literal.slice(1).toLowerCase().replace(/_/g, ' ');
|
|
3218
3233
|
}
|
|
3219
3234
|
|
|
3220
3235
|
return key;
|
|
@@ -5288,14 +5303,55 @@ var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
|
5288
5303
|
hasMoreOptionsFirstLoad = _useState2[0],
|
|
5289
5304
|
setHasMoreOptionsFirstLoad = _useState2[1];
|
|
5290
5305
|
|
|
5306
|
+
var _useState3 = useState(false),
|
|
5307
|
+
hasFirstLoadPerformed = _useState3[0],
|
|
5308
|
+
setHasFirstLoadPerformed = _useState3[1];
|
|
5309
|
+
|
|
5310
|
+
var _useState4 = useState(null),
|
|
5311
|
+
localOptions = _useState4[0],
|
|
5312
|
+
setLocalOptions = _useState4[1];
|
|
5313
|
+
|
|
5314
|
+
var ref = useRef(null);
|
|
5315
|
+
|
|
5316
|
+
var handleInternalSearch = function handleInternalSearch(inputValue, callback) {
|
|
5317
|
+
if (!localOptions) {
|
|
5318
|
+
return;
|
|
5319
|
+
}
|
|
5320
|
+
|
|
5321
|
+
var filteredOptions = localOptions.filter(function (option) {
|
|
5322
|
+
return option.label.toLowerCase().includes(inputValue.toLocaleLowerCase());
|
|
5323
|
+
});
|
|
5324
|
+
callback(filteredOptions);
|
|
5325
|
+
};
|
|
5326
|
+
|
|
5291
5327
|
var handleLoadOptions = function handleLoadOptions(inputValue, callback) {
|
|
5292
5328
|
if (hasMoreOptions) {
|
|
5293
5329
|
setHasMoreOptions(false);
|
|
5294
5330
|
}
|
|
5295
5331
|
|
|
5296
|
-
|
|
5332
|
+
if (localOptions) {
|
|
5333
|
+
handleInternalSearch(inputValue, callback);
|
|
5334
|
+
return;
|
|
5335
|
+
}
|
|
5336
|
+
|
|
5337
|
+
loadOptions(inputValue).then(function (_ref2) {
|
|
5338
|
+
var _ref$current;
|
|
5339
|
+
|
|
5297
5340
|
var hasMore = _ref2.hasMore,
|
|
5298
5341
|
options = _ref2.options;
|
|
5342
|
+
|
|
5343
|
+
if (ref.current && inputValue !== (ref === null || ref === void 0 ? void 0 : (_ref$current = ref.current) === null || _ref$current === void 0 ? void 0 : _ref$current['state']['inputValue'])) {
|
|
5344
|
+
return;
|
|
5345
|
+
}
|
|
5346
|
+
|
|
5347
|
+
if (!hasFirstLoadPerformed) {
|
|
5348
|
+
setHasFirstLoadPerformed(true);
|
|
5349
|
+
|
|
5350
|
+
if (!hasMore) {
|
|
5351
|
+
setLocalOptions(options);
|
|
5352
|
+
}
|
|
5353
|
+
}
|
|
5354
|
+
|
|
5299
5355
|
setHasMoreOptions(hasMore);
|
|
5300
5356
|
|
|
5301
5357
|
if (hasMoreOptionsFirstLoad === undefined) {
|
|
@@ -5303,7 +5359,6 @@ var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
|
5303
5359
|
}
|
|
5304
5360
|
|
|
5305
5361
|
callback(options);
|
|
5306
|
-
return options;
|
|
5307
5362
|
});
|
|
5308
5363
|
};
|
|
5309
5364
|
|
|
@@ -5327,9 +5382,9 @@ var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
|
5327
5382
|
cacheOptions: false,
|
|
5328
5383
|
defaultOptions: true,
|
|
5329
5384
|
loadOptions: debounce(handleLoadOptions, 500, {
|
|
5330
|
-
leading: true
|
|
5331
|
-
|
|
5332
|
-
|
|
5385
|
+
leading: true
|
|
5386
|
+
}),
|
|
5387
|
+
ref: ref
|
|
5333
5388
|
}))));
|
|
5334
5389
|
};
|
|
5335
5390
|
|
|
@@ -6791,5 +6846,5 @@ var Avatar = function Avatar(_ref) {
|
|
|
6791
6846
|
}, badge));
|
|
6792
6847
|
};
|
|
6793
6848
|
|
|
6794
|
-
export { AsyncSelectField, Avatar, Badge$1 as Badge, Button$1 as Button, Calendar, CheckboxField, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateRangeField, Form, FormRow, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowUp, IconAward, 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, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMinus, IconMinusCircle, IconMoneyBill, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUserComputer, IconUserLight, IconUserPlus, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Modal, ModalBody, ModalFooter, MultiSelectField, PaginationControls, PasswordField, PercentageField, PillSelectField, RadioGroupField, RadioGroupOption, ResourceTable, ResourceTableRow, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SelectField, Spinner, Stack, TextAreaField, TextField, TimeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, WeekField };
|
|
6849
|
+
export { AsyncSelectField, Avatar, Badge$1 as Badge, Button$1 as Button, Calendar, CheckboxField, CurrencyField, DataTable, DataTableCell, DataTableEditableCell, DataTableRow, DateField, DateRangeField, Form, FormRow, IconAnalytics, IconArrowDown, IconArrowLeft, IconArrowRight, IconArrowToTop, IconArrowUp, IconAward, 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, IconChevronDown, IconChevronLeft, IconChevronRight, IconChevronUp, IconClipboardList, IconClock, IconCog, IconComment, IconCommentLines, IconCopy, IconCreditCard, IconCreditCardPlus, IconDownload, IconEdit, IconEllipsisV, IconEnvelope, IconExclaimation, IconExclaimationTriangle, IconExpand, IconExternalLink, IconEye, IconEyeSlash, IconFile, IconFilePdf, IconFlag, IconFourDotsCircle, IconFourSquares, IconGavel, IconGif, IconGift, IconGrinBeam, IconGripVertical, IconHandshake, IconImage, IconInfoCircle, IconIslandTropical, IconItalic, IconLaptopSearch, IconLink, IconList, IconListOI as IconListOi, IconLock, IconMagicSolid, IconMapMarker, IconMegaphone, IconMinus, IconMinusCircle, IconMoneyBill, IconNotesMedical, IconOvertime, IconPaperPlane, IconPaperPlaneClock, IconPaperclip, IconPencil, IconPercentage, IconPhone, IconPlug, IconPlus, IconPrint, IconQuestionCircle, IconRepeat, IconReply, IconSearch, IconSignOut, IconSitemap, IconSlidersH, IconSort, IconStar, IconStarSolid, IconStickyNoteLines, IconStopwatch, IconStrikethrough, IconSync, IconSyncExclaimation, IconTachometer, IconTimes, IconTimesOctagon, IconTrash, IconUnderline, IconUndo, IconUniversity, IconUserComputer, IconUserLight, IconUserPlus, IconUserSlash, IconUserSolid, IconUserTag, IconUserTie, IconUsers, IconVideo, IconVolume, IconVolumeMute, IconWrench, Inline, InlineBanner, Modal, ModalBody, ModalFooter, MultiSelectField, PaginationControls, PasswordField, PercentageField, PillSelectField, RadioGroupField, RadioGroupOption, ResourceTable, ResourceTableRow, SIZE_25_PERCENT, SIZE_33_PERCENT, SIZE_50_PERCENT, SIZE_66_PERCENT, SIZE_75_PERCENT, SelectField, Spinner, Stack, TextAreaField, TextField, TimeField, Toggle, ToolbarSelect, Tooltip$1 as Tooltip, WeekField };
|
|
6795
6850
|
//# sourceMappingURL=index.modern.js.map
|