@7shifts/sous-chef 2.17.0 → 2.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/forms/SelectField/CustomContainer/CustomContainer.d.ts +2 -6
- package/dist/forms/SelectField/CustomOption/CustomOption.d.ts +2 -5
- package/dist/index.css +1 -2
- package/dist/index.js +31 -47
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +31 -47
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -6447,14 +6447,14 @@ var getSelectStyles$1 = function getSelectStyles(_ref) {
|
|
|
6447
6447
|
};
|
|
6448
6448
|
};
|
|
6449
6449
|
|
|
6450
|
-
var _excluded$22 = ["children"
|
|
6450
|
+
var _excluded$22 = ["children"];
|
|
6451
6451
|
|
|
6452
6452
|
function CustomOption(_ref) {
|
|
6453
6453
|
var children = _ref.children,
|
|
6454
|
-
CustomComponent = _ref.CustomComponent,
|
|
6455
6454
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$22);
|
|
6456
6455
|
|
|
6457
|
-
|
|
6456
|
+
var UserCustomOption = props.selectProps.componentsProps.UserCustomOption;
|
|
6457
|
+
return React__default.createElement(components.Option, Object.assign({}, props), React__default.createElement(UserCustomOption, Object.assign({}, props), children));
|
|
6458
6458
|
}
|
|
6459
6459
|
|
|
6460
6460
|
var isScrollingTheSelectMenu = function isScrollingTheSelectMenu(element) {
|
|
@@ -6479,6 +6479,15 @@ var isReactSelectElement = function isReactSelectElement(element) {
|
|
|
6479
6479
|
return typeof firstOption.id === 'string' && firstOption.id.includes('react-select');
|
|
6480
6480
|
};
|
|
6481
6481
|
|
|
6482
|
+
var CustomContainer = function CustomContainer(props) {
|
|
6483
|
+
var componentsProps = props.selectProps.componentsProps;
|
|
6484
|
+
return React__default.createElement(components.SelectContainer, Object.assign({}, props, {
|
|
6485
|
+
innerProps: Object.assign({}, props.innerProps, {
|
|
6486
|
+
'data-testid': componentsProps.testId
|
|
6487
|
+
})
|
|
6488
|
+
}));
|
|
6489
|
+
};
|
|
6490
|
+
|
|
6482
6491
|
var MultiSelectField = function MultiSelectField(_ref) {
|
|
6483
6492
|
var name = _ref.name,
|
|
6484
6493
|
inputId = _ref.id,
|
|
@@ -6533,19 +6542,13 @@ var MultiSelectField = function MultiSelectField(_ref) {
|
|
|
6533
6542
|
onBlur: controllers.onBlur,
|
|
6534
6543
|
isMulti: true,
|
|
6535
6544
|
closeMenuOnSelect: closeOnSelect,
|
|
6545
|
+
componentsProps: {
|
|
6546
|
+
testId: testId,
|
|
6547
|
+
UserCustomOption: UserCustomOption
|
|
6548
|
+
},
|
|
6536
6549
|
components: {
|
|
6537
|
-
SelectContainer:
|
|
6538
|
-
|
|
6539
|
-
innerProps: Object.assign({}, props.innerProps, {
|
|
6540
|
-
'data-testid': testId
|
|
6541
|
-
})
|
|
6542
|
-
}));
|
|
6543
|
-
},
|
|
6544
|
-
Option: UserCustomOption ? function (props) {
|
|
6545
|
-
return React__default.createElement(CustomOption, Object.assign({
|
|
6546
|
-
CustomComponent: UserCustomOption
|
|
6547
|
-
}, props));
|
|
6548
|
-
} : components.Option
|
|
6550
|
+
SelectContainer: CustomContainer,
|
|
6551
|
+
Option: UserCustomOption ? CustomOption : components.Option
|
|
6549
6552
|
},
|
|
6550
6553
|
menuShouldScrollIntoView: menuShouldScrollIntoView,
|
|
6551
6554
|
menuPlacement: menuShouldScrollIntoView ? 'bottom' : 'auto',
|
|
@@ -6586,25 +6589,6 @@ function CustomControl(_ref) {
|
|
|
6586
6589
|
}, props)), children)) : children);
|
|
6587
6590
|
}
|
|
6588
6591
|
|
|
6589
|
-
var _excluded$24 = ["children"];
|
|
6590
|
-
|
|
6591
|
-
function CustomOption$1(_ref) {
|
|
6592
|
-
var children = _ref.children,
|
|
6593
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$24);
|
|
6594
|
-
|
|
6595
|
-
var UserCustomOption = props.selectProps.componentsProps.UserCustomOption;
|
|
6596
|
-
return React__default.createElement(components.Option, Object.assign({}, props), React__default.createElement(UserCustomOption, Object.assign({}, props), children));
|
|
6597
|
-
}
|
|
6598
|
-
|
|
6599
|
-
var CustomContainer = function CustomContainer(props) {
|
|
6600
|
-
var componentsProps = props.selectProps.componentsProps;
|
|
6601
|
-
return React__default.createElement(components.SelectContainer, Object.assign({}, props, {
|
|
6602
|
-
innerProps: Object.assign({}, props.innerProps, {
|
|
6603
|
-
'data-testid': componentsProps.testId
|
|
6604
|
-
})
|
|
6605
|
-
}));
|
|
6606
|
-
};
|
|
6607
|
-
|
|
6608
6592
|
var useSelectField = function useSelectField(_ref) {
|
|
6609
6593
|
var _ref$asToolbarFilter = _ref.asToolbarFilter,
|
|
6610
6594
|
asToolbarFilter = _ref$asToolbarFilter === void 0 ? false : _ref$asToolbarFilter,
|
|
@@ -6655,7 +6639,7 @@ var useSelectField = function useSelectField(_ref) {
|
|
|
6655
6639
|
},
|
|
6656
6640
|
components: {
|
|
6657
6641
|
SelectContainer: CustomContainer,
|
|
6658
|
-
Option: UserCustomOption ? CustomOption
|
|
6642
|
+
Option: UserCustomOption ? CustomOption : components.Option,
|
|
6659
6643
|
Control: SelectedOptionPrefix ? CustomControl : components.Control
|
|
6660
6644
|
},
|
|
6661
6645
|
inputId: controllers.id,
|
|
@@ -6702,13 +6686,13 @@ var SelectField = function SelectField(props) {
|
|
|
6702
6686
|
|
|
6703
6687
|
var styles$A = {"custom-list":"_uC4zU"};
|
|
6704
6688
|
|
|
6705
|
-
var _excluded$
|
|
6689
|
+
var _excluded$24 = ["children", "hasMoreOptions", "hasMoreOptionsFirstLoad"];
|
|
6706
6690
|
|
|
6707
6691
|
var CustomList = function CustomList(_ref) {
|
|
6708
6692
|
var children = _ref.children,
|
|
6709
6693
|
hasMoreOptions = _ref.hasMoreOptions,
|
|
6710
6694
|
hasMoreOptionsFirstLoad = _ref.hasMoreOptionsFirstLoad,
|
|
6711
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6695
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$24);
|
|
6712
6696
|
|
|
6713
6697
|
var showFooter = hasMoreOptions;
|
|
6714
6698
|
|
|
@@ -6723,11 +6707,11 @@ var CustomList = function CustomList(_ref) {
|
|
|
6723
6707
|
}, getLocalizedString('main.START_TYPING_TO_SEE_MORE_OPTIONS')))));
|
|
6724
6708
|
};
|
|
6725
6709
|
|
|
6726
|
-
var _excluded$
|
|
6710
|
+
var _excluded$25 = ["loadOptions"];
|
|
6727
6711
|
|
|
6728
6712
|
var AsyncSelectField = function AsyncSelectField(_ref) {
|
|
6729
6713
|
var loadOptions = _ref.loadOptions,
|
|
6730
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
6714
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$25);
|
|
6731
6715
|
|
|
6732
6716
|
var _useState = useState(false),
|
|
6733
6717
|
hasMoreOptions = _useState[0],
|
|
@@ -7511,14 +7495,14 @@ var WeekField = function WeekField(_ref) {
|
|
|
7511
7495
|
})));
|
|
7512
7496
|
};
|
|
7513
7497
|
|
|
7514
|
-
var _excluded$
|
|
7498
|
+
var _excluded$26 = ["placeholder", "autoComplete"];
|
|
7515
7499
|
|
|
7516
7500
|
var TimeFieldElement = function TimeFieldElement(_ref, ref) {
|
|
7517
7501
|
var _ref$placeholder = _ref.placeholder,
|
|
7518
7502
|
placeholder = _ref$placeholder === void 0 ? '9am' : _ref$placeholder,
|
|
7519
7503
|
_ref$autoComplete = _ref.autoComplete,
|
|
7520
7504
|
autoComplete = _ref$autoComplete === void 0 ? 'off' : _ref$autoComplete,
|
|
7521
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7505
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$26);
|
|
7522
7506
|
|
|
7523
7507
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
7524
7508
|
placeholder: placeholder,
|
|
@@ -7539,12 +7523,12 @@ var TimeFieldElement = function TimeFieldElement(_ref, ref) {
|
|
|
7539
7523
|
|
|
7540
7524
|
var TimeField = forwardRef(TimeFieldElement);
|
|
7541
7525
|
|
|
7542
|
-
var _excluded$
|
|
7526
|
+
var _excluded$27 = ["currencySymbol"];
|
|
7543
7527
|
|
|
7544
7528
|
var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
7545
7529
|
var _ref$currencySymbol = _ref.currencySymbol,
|
|
7546
7530
|
currencySymbol = _ref$currencySymbol === void 0 ? "$" : _ref$currencySymbol,
|
|
7547
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7531
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$27);
|
|
7548
7532
|
|
|
7549
7533
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
7550
7534
|
ref: ref
|
|
@@ -7577,7 +7561,7 @@ var CurrencyFieldElement = function CurrencyFieldElement(_ref, ref) {
|
|
|
7577
7561
|
|
|
7578
7562
|
var CurrencyField = forwardRef(CurrencyFieldElement);
|
|
7579
7563
|
|
|
7580
|
-
var _excluded$
|
|
7564
|
+
var _excluded$28 = ["max", "min", "precision", "stepSize"];
|
|
7581
7565
|
|
|
7582
7566
|
var PercentageElement = function PercentageElement(_ref, ref) {
|
|
7583
7567
|
var _ref$max = _ref.max,
|
|
@@ -7588,7 +7572,7 @@ var PercentageElement = function PercentageElement(_ref, ref) {
|
|
|
7588
7572
|
precision = _ref$precision === void 0 ? 0 : _ref$precision,
|
|
7589
7573
|
_ref$stepSize = _ref.stepSize,
|
|
7590
7574
|
stepSize = _ref$stepSize === void 0 ? 1 : _ref$stepSize,
|
|
7591
|
-
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7575
|
+
allOtherProps = _objectWithoutPropertiesLoose(_ref, _excluded$28);
|
|
7592
7576
|
|
|
7593
7577
|
var _useTextField = useTextField(_extends({}, allOtherProps, {
|
|
7594
7578
|
ref: ref
|
|
@@ -7815,7 +7799,7 @@ var InlineBanner = function InlineBanner(_ref) {
|
|
|
7815
7799
|
|
|
7816
7800
|
var styles$E = {"badge":"_2f81N","badge--warning":"_2g1GI","badge--danger":"_2zLnM","badge--success":"_27QOo","badge--info":"_2gmsM"};
|
|
7817
7801
|
|
|
7818
|
-
var _excluded$
|
|
7802
|
+
var _excluded$29 = ["children", "theme", "title", "testId"];
|
|
7819
7803
|
|
|
7820
7804
|
var Badge = function Badge(_ref, forwardedRef) {
|
|
7821
7805
|
var _classnames;
|
|
@@ -7824,7 +7808,7 @@ var Badge = function Badge(_ref, forwardedRef) {
|
|
|
7824
7808
|
theme = _ref.theme,
|
|
7825
7809
|
title = _ref.title,
|
|
7826
7810
|
testId = _ref.testId,
|
|
7827
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
7811
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$29);
|
|
7828
7812
|
|
|
7829
7813
|
var internalRef = useRef(null);
|
|
7830
7814
|
var ref = forwardedRef || internalRef;
|