ordering-ui-external 12.0.0 → 12.0.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.
Files changed (15) hide show
  1. package/_bundles/{7.ordering-ui.6487547c80bb5fd2fdee.js → 7.ordering-ui.fe5a82ad23cc1b2ed119.js} +1 -1
  2. package/_bundles/{ordering-ui.6487547c80bb5fd2fdee.js → ordering-ui.fe5a82ad23cc1b2ed119.js} +2 -2
  3. package/_modules/themes/five/src/components/ProductOptionSubOption/index.js +2 -2
  4. package/package.json +2 -2
  5. package/src/themes/five/src/components/ProductOptionSubOption/index.js +2 -2
  6. /package/_bundles/{0.ordering-ui.6487547c80bb5fd2fdee.js → 0.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  7. /package/_bundles/{1.ordering-ui.6487547c80bb5fd2fdee.js → 1.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  8. /package/_bundles/{2.ordering-ui.6487547c80bb5fd2fdee.js → 2.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  9. /package/_bundles/{4.ordering-ui.6487547c80bb5fd2fdee.js → 4.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  10. /package/_bundles/{5.ordering-ui.6487547c80bb5fd2fdee.js → 5.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  11. /package/_bundles/{6.ordering-ui.6487547c80bb5fd2fdee.js → 6.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  12. /package/_bundles/{7.ordering-ui.6487547c80bb5fd2fdee.js.LICENSE.txt → 7.ordering-ui.fe5a82ad23cc1b2ed119.js.LICENSE.txt} +0 -0
  13. /package/_bundles/{8.ordering-ui.6487547c80bb5fd2fdee.js → 8.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  14. /package/_bundles/{9.ordering-ui.6487547c80bb5fd2fdee.js → 9.ordering-ui.fe5a82ad23cc1b2ed119.js} +0 -0
  15. /package/_bundles/{ordering-ui.6487547c80bb5fd2fdee.js.LICENSE.txt → ordering-ui.fe5a82ad23cc1b2ed119.js.LICENSE.txt} +0 -0
@@ -115,7 +115,7 @@ var ProductOptionSubOptionUI = /*#__PURE__*/_react.default.memo(function (props)
115
115
  disabled: true
116
116
  })), suboption.image && suboption.image !== '-' && /*#__PURE__*/_react.default.createElement(_styles.SubOptionThumbnail, {
117
117
  src: suboption.image
118
- }), /*#__PURE__*/_react.default.createElement(_styles.Text, null, /*#__PURE__*/_react.default.createElement("div", null, suboption === null || suboption === void 0 ? void 0 : suboption.name))), /*#__PURE__*/_react.default.createElement(_styles.RightOptionContainer, null, /*#__PURE__*/_react.default.createElement(_styles.QuantityControl, null, (option === null || option === void 0 ? void 0 : option.allow_suboption_quantity) && (state === null || state === void 0 ? void 0 : state.selected) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDashCircle.default, {
118
+ }), /*#__PURE__*/_react.default.createElement(_styles.Text, null, /*#__PURE__*/_react.default.createElement("div", null, suboption === null || suboption === void 0 ? void 0 : suboption.name))), /*#__PURE__*/_react.default.createElement(_styles.RightOptionContainer, null, /*#__PURE__*/_react.default.createElement(_styles.QuantityControl, null, !((option === null || option === void 0 ? void 0 : option.max) === 1 && (option === null || option === void 0 ? void 0 : option.min) === 1) && (option === null || option === void 0 ? void 0 : option.allow_suboption_quantity) && (state === null || state === void 0 ? void 0 : state.selected) && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_BsDashCircle.default, {
119
119
  disabled: state.quantity === 0 || isSoldOut,
120
120
  onClick: handleDecrement
121
121
  }), state.quantity, /*#__PURE__*/_react.default.createElement(_BsPlusCircle.default, {
@@ -129,7 +129,7 @@ var ProductOptionSubOptionUI = /*#__PURE__*/_react.default.memo(function (props)
129
129
  return handlePosition(e, 'left');
130
130
  }
131
131
  }), /*#__PURE__*/_react.default.createElement(_BsCircleFill.default, {
132
- className: [(pizzaState === null || pizzaState === void 0 || (_pizzaState3 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState3 === void 0 ? void 0 : _pizzaState3.value) === (option === null || option === void 0 ? void 0 : option.max) ? 'disabled' : '', state.selected && state.position === 'whole' ? 'selected' : null].filter(function (classname) {
132
+ className: [(pizzaState === null || pizzaState === void 0 || (_pizzaState3 = pizzaState["option:".concat(option === null || option === void 0 ? void 0 : option.id)]) === null || _pizzaState3 === void 0 ? void 0 : _pizzaState3.value) === (option === null || option === void 0 ? void 0 : option.max) && !((option === null || option === void 0 ? void 0 : option.max) === 1 && (option === null || option === void 0 ? void 0 : option.min) === 1) ? 'disabled' : '', state.selected && state.position === 'whole' ? 'selected' : null].filter(function (classname) {
133
133
  return classname;
134
134
  }).join(' '),
135
135
  onClick: function onClick(e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ordering-ui-external",
3
- "version": "12.0.0",
3
+ "version": "12.0.1",
4
4
  "description": "Ordering UI Components",
5
5
  "main": "./_modules/index.js",
6
6
  "exports": {
@@ -88,7 +88,7 @@
88
88
  "lodash": "^4.17.19",
89
89
  "moment": "^2.29.4",
90
90
  "nanoid": "^4.0.0",
91
- "ordering-components-external": "11.0.0",
91
+ "ordering-components-external": "11.0.1",
92
92
  "payment": "^2.4.6",
93
93
  "polished": "^3.6.6",
94
94
  "react-bootstrap-icons": "^1.7.2",
@@ -136,7 +136,7 @@ const ProductOptionSubOptionUI = React.memo((props) => {
136
136
  <RightOptionContainer>
137
137
 
138
138
  <QuantityControl>
139
- {option?.allow_suboption_quantity && state?.selected && (
139
+ {!(option?.max === 1 && option?.min === 1) && option?.allow_suboption_quantity && state?.selected && (
140
140
  <>
141
141
  <BsDashCircle
142
142
  disabled={state.quantity === 0 || isSoldOut}
@@ -162,7 +162,7 @@ const ProductOptionSubOptionUI = React.memo((props) => {
162
162
  />
163
163
  <BsCircleFill
164
164
  className={[
165
- pizzaState?.[`option:${option?.id}`]?.value === option?.max ? 'disabled' : '',
165
+ (pizzaState?.[`option:${option?.id}`]?.value === option?.max) && !(option?.max === 1 && option?.min === 1) ? 'disabled' : '',
166
166
  state.selected && state.position === 'whole' ? 'selected' : null].filter(classname => classname).join(' ')}
167
167
  onClick={(e) => handlePosition(e, 'whole')}
168
168
  />