@commercetools-frontend/experimental-components 7.2.2 → 7.2.3
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/commercetools-frontend-experimental-components.cjs.dev.js +39 -17
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +39 -17
- package/dist/commercetools-frontend-experimental-components.esm.js +36 -18
- package/dist/declarations/src/constants/index.d.ts +10 -3
- package/dist/declarations/src/custom-fields/custom-fields/constants.d.ts +2 -0
- package/dist/declarations/src/index.d.ts +3 -2
- package/dist/declarations/src/utils/get-currency-code-data/get-currency-code-data.d.ts +10 -0
- package/dist/declarations/src/utils/get-currency-code-data/index.d.ts +1 -0
- package/dist/declarations/src/utils/products/products.d.ts +3 -0
- package/dist/styles.css +109 -109
- package/package.json +8 -8
|
@@ -72,7 +72,6 @@ var sdk = require('@commercetools-frontend/sdk');
|
|
|
72
72
|
var keyBy = require('lodash/keyBy');
|
|
73
73
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
74
74
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
75
|
-
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
76
75
|
var _ = require('@commercetools-frontend/ui-kit/');
|
|
77
76
|
var PropTypes = require('prop-types');
|
|
78
77
|
var react$1 = require('@emotion/react');
|
|
@@ -110,6 +109,7 @@ var memoize = require('memoize-one');
|
|
|
110
109
|
var omitEmpty = require('omit-empty-es');
|
|
111
110
|
var shuffle = require('lodash/shuffle');
|
|
112
111
|
var reactSnapCarousel = require('react-snap-carousel');
|
|
112
|
+
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
113
113
|
var hoc = require('@apollo/client/react/hoc');
|
|
114
114
|
var flatten = require('lodash/flatten');
|
|
115
115
|
var uniqBy = require('lodash/uniqBy');
|
|
@@ -272,12 +272,19 @@ const INTERVALS_IN_SECONDS = {
|
|
|
272
272
|
[REMINDER_OPTION_10_DAY]: 864000
|
|
273
273
|
};
|
|
274
274
|
const EXCLUDING_PRODUCTS = 'excludingProducts';
|
|
275
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES = 'productTailoringForAttributes';
|
|
276
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT = 'productTailoringForAttributesTypesOtherThanText';
|
|
277
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAttributesFallbackValues';
|
|
278
275
|
|
|
279
276
|
// TODO: apply a more robust solution to overlaying issues
|
|
280
277
|
const Z_INDEX_DROPDOWN = 30000;
|
|
278
|
+
const ATTRIBUTE_CONSTRAINTS = {
|
|
279
|
+
SAME_FOR_ALL: 'SameForAll',
|
|
280
|
+
NONE: 'None',
|
|
281
|
+
UNIQUE: 'Unique',
|
|
282
|
+
COMBINATION_UNIQUE: 'CombinationUnique'
|
|
283
|
+
};
|
|
284
|
+
const ATTRIBUTE_LEVELS = {
|
|
285
|
+
PRODUCT: 'Product',
|
|
286
|
+
VARIANT: 'Variant'
|
|
287
|
+
};
|
|
281
288
|
|
|
282
289
|
var commonPickerMessages = reactIntl.defineMessages({
|
|
283
290
|
loadingErrorMessage: {
|
|
@@ -6428,6 +6435,8 @@ const REFERENCED_TYPES = {
|
|
|
6428
6435
|
'shipping-method': 'shipping-method',
|
|
6429
6436
|
zone: 'zone'
|
|
6430
6437
|
};
|
|
6438
|
+
const ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time'];
|
|
6439
|
+
const SET_ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
6431
6440
|
|
|
6432
6441
|
function ownKeys$V(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6433
6442
|
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$V(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -8231,9 +8240,6 @@ const useDnDContext = () => {
|
|
|
8231
8240
|
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
8232
8241
|
function ownKeys$J(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8233
8242
|
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$J(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8234
|
-
const existingAttributeTypes = ['text', 'ltext'];
|
|
8235
|
-
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
8236
|
-
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
8237
8243
|
const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time, CUSTOM_FIELD_TYPES.set];
|
|
8238
8244
|
const getFieldName = (parentName, fieldName) => {
|
|
8239
8245
|
if (!parentName) return fieldName;
|
|
@@ -8241,9 +8247,7 @@ const getFieldName = (parentName, fieldName) => {
|
|
|
8241
8247
|
};
|
|
8242
8248
|
const isAttributeType = function () {
|
|
8243
8249
|
let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8244
|
-
|
|
8245
|
-
const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
|
|
8246
|
-
return _includesInstanceProperty__default["default"](attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
|
|
8250
|
+
return _includesInstanceProperty__default["default"](ATTRIBUTE_TYPES).call(ATTRIBUTE_TYPES, fieldDefinitionType.name) || fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](SET_ATTRIBUTE_TYPES).call(SET_ATTRIBUTE_TYPES, fieldDefinitionType?.elementType?.name);
|
|
8247
8251
|
};
|
|
8248
8252
|
const isNested = fieldDefinition => {
|
|
8249
8253
|
const type = fieldDefinition.type;
|
|
@@ -8274,9 +8278,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
8274
8278
|
})),
|
|
8275
8279
|
timeZone = _useApplicationContex.timeZone,
|
|
8276
8280
|
userLocale = _useApplicationContex.userLocale;
|
|
8277
|
-
const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
|
|
8278
|
-
const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
|
|
8279
|
-
const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
|
|
8280
8281
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
8281
8282
|
const _useDnDContext = useDnDContext(),
|
|
8282
8283
|
DroppableWrapper = _useDnDContext.DroppableWrapper,
|
|
@@ -8290,9 +8291,9 @@ const CustomFieldsInternal = _ref => {
|
|
|
8290
8291
|
var _context;
|
|
8291
8292
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
8292
8293
|
const isTouched = Boolean(formik.getIn(touched, fieldName));
|
|
8293
|
-
const isFieldDisabled = props.isDisabled && !
|
|
8294
|
+
const isFieldDisabled = props.isDisabled && !isAttributeType(fieldDefinition.type);
|
|
8294
8295
|
const shouldUseAdditionalInfoProp = _includesInstanceProperty__default["default"](_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
|
|
8295
|
-
const shouldDisplayFallbackRow =
|
|
8296
|
+
const shouldDisplayFallbackRow = !shouldUseAdditionalInfoProp && _includesInstanceProperty__default["default"](ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
|
|
8296
8297
|
const fieldErrors = formik.getIn(errors, fieldName);
|
|
8297
8298
|
const value = props.inputValuesConverter(fieldName, formik.getIn(values, fieldName));
|
|
8298
8299
|
|
|
@@ -8318,7 +8319,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8318
8319
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
8319
8320
|
handleWarningChange: props.handleWarningChange,
|
|
8320
8321
|
renderWarnings: props.renderWarnings,
|
|
8321
|
-
additionalInfo:
|
|
8322
|
+
additionalInfo: shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
8322
8323
|
};
|
|
8323
8324
|
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
8324
8325
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
@@ -8346,7 +8347,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8346
8347
|
}) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
8347
8348
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
8348
8349
|
tone: "tertiary",
|
|
8349
|
-
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
|
|
8350
|
+
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) || ''
|
|
8350
8351
|
})
|
|
8351
8352
|
}), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
|
|
8352
8353
|
isTouched: isTouched,
|
|
@@ -14189,6 +14190,17 @@ function splitVariantAttributesByConstraint(product, constraint) {
|
|
|
14189
14190
|
}
|
|
14190
14191
|
return [productAttributeDefinitions, variantAttributeDefinitions];
|
|
14191
14192
|
}
|
|
14193
|
+
function splitProductAndVariantAttributes(product) {
|
|
14194
|
+
const productAttributeDefinitions = [];
|
|
14195
|
+
const variantAttributeDefinitions = [];
|
|
14196
|
+
if (product.productType?.obj?.attributes) {
|
|
14197
|
+
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14198
|
+
const definition = product.productType.obj.attributes[i];
|
|
14199
|
+
if (getProductAttributes(definition)) productAttributeDefinitions.push(definition);else variantAttributeDefinitions.push(definition);
|
|
14200
|
+
}
|
|
14201
|
+
}
|
|
14202
|
+
return [productAttributeDefinitions, variantAttributeDefinitions];
|
|
14203
|
+
}
|
|
14192
14204
|
function resolveStatusType(product) {
|
|
14193
14205
|
const published = product.published,
|
|
14194
14206
|
hasStagedChanges = product.hasStagedChanges;
|
|
@@ -14348,6 +14360,12 @@ const getAttributeValueByType = _ref10 => {
|
|
|
14348
14360
|
return constants.NO_VALUE_FALLBACK;
|
|
14349
14361
|
}
|
|
14350
14362
|
};
|
|
14363
|
+
const getProductLevelAttributes = attribueDefinition => {
|
|
14364
|
+
return attribueDefinition?.level === ATTRIBUTE_LEVELS.PRODUCT;
|
|
14365
|
+
};
|
|
14366
|
+
const getProductAttributes = attribueDefinition => {
|
|
14367
|
+
return attribueDefinition?.attributeConstraint === ATTRIBUTE_CONSTRAINTS.SAME_FOR_ALL || getProductLevelAttributes(attribueDefinition);
|
|
14368
|
+
};
|
|
14351
14369
|
|
|
14352
14370
|
let RequestCache = /*#__PURE__*/function () {
|
|
14353
14371
|
function RequestCache() {
|
|
@@ -14626,6 +14644,7 @@ exports.getCategoryLevel = getCategoryLevel;
|
|
|
14626
14644
|
exports.getCountsFromBulkSummary = getCountsFromBulkSummary;
|
|
14627
14645
|
exports.getDiscountValue = getDiscountValue;
|
|
14628
14646
|
exports.getDisplayName = getDisplayName$1;
|
|
14647
|
+
exports.getFractionDigit = getFractionDigit;
|
|
14629
14648
|
exports.getFractionedAmount = getFractionedAmount;
|
|
14630
14649
|
exports.getIndexesOfInvalidValues = getIndexesOfInvalidValues;
|
|
14631
14650
|
exports.getMinimumPricesByCurrencyCode = getMinimumPricesByCurrencyCode;
|
|
@@ -14633,6 +14652,8 @@ exports.getNetUnitPrice = getNetUnitPrice;
|
|
|
14633
14652
|
exports.getPathName = getPathName;
|
|
14634
14653
|
exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
|
|
14635
14654
|
exports.getPriceChannelName = getPriceChannelName;
|
|
14655
|
+
exports.getProductAttributes = getProductAttributes;
|
|
14656
|
+
exports.getProductLevelAttributes = getProductLevelAttributes;
|
|
14636
14657
|
exports.getReferenceTypeId = getReferenceTypeId;
|
|
14637
14658
|
exports.getSelectedPrice = getSelectedPrice;
|
|
14638
14659
|
exports.getStampToneByPublishState = getStampToneByPublishState;
|
|
@@ -14693,6 +14714,7 @@ exports.shouldUpdateAttributeInput = shouldUpdateAttributeInput;
|
|
|
14693
14714
|
exports.slugify = slugify;
|
|
14694
14715
|
exports.sortDataByIdsArray = sortDataByIdsArray;
|
|
14695
14716
|
exports.sortRequiresLanguage = sortRequiresLanguage;
|
|
14717
|
+
exports.splitProductAndVariantAttributes = splitProductAndVariantAttributes;
|
|
14696
14718
|
exports.splitVariantAttributesByConstraint = splitVariantAttributesByConstraint;
|
|
14697
14719
|
exports.stringToBase64 = stringToBase64;
|
|
14698
14720
|
exports.swapArrayItems = swapArrayItems;
|
|
@@ -72,7 +72,6 @@ var sdk = require('@commercetools-frontend/sdk');
|
|
|
72
72
|
var keyBy = require('lodash/keyBy');
|
|
73
73
|
var actionsGlobal = require('@commercetools-frontend/actions-global');
|
|
74
74
|
var applicationComponents = require('@commercetools-frontend/application-components');
|
|
75
|
-
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
76
75
|
var _ = require('@commercetools-frontend/ui-kit/');
|
|
77
76
|
var PropTypes = require('prop-types');
|
|
78
77
|
var react$1 = require('@emotion/react');
|
|
@@ -110,6 +109,7 @@ var memoize = require('memoize-one');
|
|
|
110
109
|
var omitEmpty = require('omit-empty-es');
|
|
111
110
|
var shuffle = require('lodash/shuffle');
|
|
112
111
|
var reactSnapCarousel = require('react-snap-carousel');
|
|
112
|
+
var applicationShell = require('@commercetools-frontend/application-shell');
|
|
113
113
|
var hoc = require('@apollo/client/react/hoc');
|
|
114
114
|
var flatten = require('lodash/flatten');
|
|
115
115
|
var uniqBy = require('lodash/uniqBy');
|
|
@@ -271,12 +271,19 @@ const INTERVALS_IN_SECONDS = {
|
|
|
271
271
|
[REMINDER_OPTION_10_DAY]: 864000
|
|
272
272
|
};
|
|
273
273
|
const EXCLUDING_PRODUCTS = 'excludingProducts';
|
|
274
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES = 'productTailoringForAttributes';
|
|
275
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT = 'productTailoringForAttributesTypesOtherThanText';
|
|
276
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAttributesFallbackValues';
|
|
277
274
|
|
|
278
275
|
// TODO: apply a more robust solution to overlaying issues
|
|
279
276
|
const Z_INDEX_DROPDOWN = 30000;
|
|
277
|
+
const ATTRIBUTE_CONSTRAINTS = {
|
|
278
|
+
SAME_FOR_ALL: 'SameForAll',
|
|
279
|
+
NONE: 'None',
|
|
280
|
+
UNIQUE: 'Unique',
|
|
281
|
+
COMBINATION_UNIQUE: 'CombinationUnique'
|
|
282
|
+
};
|
|
283
|
+
const ATTRIBUTE_LEVELS = {
|
|
284
|
+
PRODUCT: 'Product',
|
|
285
|
+
VARIANT: 'Variant'
|
|
286
|
+
};
|
|
280
287
|
|
|
281
288
|
var commonPickerMessages = reactIntl.defineMessages({
|
|
282
289
|
loadingErrorMessage: {
|
|
@@ -6416,6 +6423,8 @@ const REFERENCED_TYPES = {
|
|
|
6416
6423
|
'shipping-method': 'shipping-method',
|
|
6417
6424
|
zone: 'zone'
|
|
6418
6425
|
};
|
|
6426
|
+
const ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time'];
|
|
6427
|
+
const SET_ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
6419
6428
|
|
|
6420
6429
|
function ownKeys$V(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6421
6430
|
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$V(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$V(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -8209,9 +8218,6 @@ const useDnDContext = () => {
|
|
|
8209
8218
|
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
8210
8219
|
function ownKeys$J(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8211
8220
|
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$J(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8212
|
-
const existingAttributeTypes = ['text', 'ltext'];
|
|
8213
|
-
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
8214
|
-
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
8215
8221
|
const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time, CUSTOM_FIELD_TYPES.set];
|
|
8216
8222
|
const getFieldName = (parentName, fieldName) => {
|
|
8217
8223
|
if (!parentName) return fieldName;
|
|
@@ -8219,9 +8225,7 @@ const getFieldName = (parentName, fieldName) => {
|
|
|
8219
8225
|
};
|
|
8220
8226
|
const isAttributeType = function () {
|
|
8221
8227
|
let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8222
|
-
|
|
8223
|
-
const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
|
|
8224
|
-
return _includesInstanceProperty__default["default"](attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
|
|
8228
|
+
return _includesInstanceProperty__default["default"](ATTRIBUTE_TYPES).call(ATTRIBUTE_TYPES, fieldDefinitionType.name) || fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](SET_ATTRIBUTE_TYPES).call(SET_ATTRIBUTE_TYPES, fieldDefinitionType?.elementType?.name);
|
|
8225
8229
|
};
|
|
8226
8230
|
const isNested = fieldDefinition => {
|
|
8227
8231
|
const type = fieldDefinition.type;
|
|
@@ -8252,9 +8256,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
8252
8256
|
})),
|
|
8253
8257
|
timeZone = _useApplicationContex.timeZone,
|
|
8254
8258
|
userLocale = _useApplicationContex.userLocale;
|
|
8255
|
-
const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
|
|
8256
|
-
const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
|
|
8257
|
-
const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
|
|
8258
8259
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
8259
8260
|
const _useDnDContext = useDnDContext(),
|
|
8260
8261
|
DroppableWrapper = _useDnDContext.DroppableWrapper,
|
|
@@ -8268,9 +8269,9 @@ const CustomFieldsInternal = _ref => {
|
|
|
8268
8269
|
var _context;
|
|
8269
8270
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
8270
8271
|
const isTouched = Boolean(formik.getIn(touched, fieldName));
|
|
8271
|
-
const isFieldDisabled = props.isDisabled && !
|
|
8272
|
+
const isFieldDisabled = props.isDisabled && !isAttributeType(fieldDefinition.type);
|
|
8272
8273
|
const shouldUseAdditionalInfoProp = _includesInstanceProperty__default["default"](_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
|
|
8273
|
-
const shouldDisplayFallbackRow =
|
|
8274
|
+
const shouldDisplayFallbackRow = !shouldUseAdditionalInfoProp && _includesInstanceProperty__default["default"](ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
|
|
8274
8275
|
const fieldErrors = formik.getIn(errors, fieldName);
|
|
8275
8276
|
const value = props.inputValuesConverter(fieldName, formik.getIn(values, fieldName));
|
|
8276
8277
|
|
|
@@ -8296,7 +8297,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8296
8297
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
8297
8298
|
handleWarningChange: props.handleWarningChange,
|
|
8298
8299
|
renderWarnings: props.renderWarnings,
|
|
8299
|
-
additionalInfo:
|
|
8300
|
+
additionalInfo: shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
8300
8301
|
};
|
|
8301
8302
|
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
8302
8303
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
@@ -8324,7 +8325,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8324
8325
|
}) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
8325
8326
|
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
8326
8327
|
tone: "tertiary",
|
|
8327
|
-
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
|
|
8328
|
+
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) || ''
|
|
8328
8329
|
})
|
|
8329
8330
|
}), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
|
|
8330
8331
|
isTouched: isTouched,
|
|
@@ -14159,6 +14160,17 @@ function splitVariantAttributesByConstraint(product, constraint) {
|
|
|
14159
14160
|
}
|
|
14160
14161
|
return [productAttributeDefinitions, variantAttributeDefinitions];
|
|
14161
14162
|
}
|
|
14163
|
+
function splitProductAndVariantAttributes(product) {
|
|
14164
|
+
const productAttributeDefinitions = [];
|
|
14165
|
+
const variantAttributeDefinitions = [];
|
|
14166
|
+
if (product.productType?.obj?.attributes) {
|
|
14167
|
+
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14168
|
+
const definition = product.productType.obj.attributes[i];
|
|
14169
|
+
if (getProductAttributes(definition)) productAttributeDefinitions.push(definition);else variantAttributeDefinitions.push(definition);
|
|
14170
|
+
}
|
|
14171
|
+
}
|
|
14172
|
+
return [productAttributeDefinitions, variantAttributeDefinitions];
|
|
14173
|
+
}
|
|
14162
14174
|
function resolveStatusType(product) {
|
|
14163
14175
|
const published = product.published,
|
|
14164
14176
|
hasStagedChanges = product.hasStagedChanges;
|
|
@@ -14318,6 +14330,12 @@ const getAttributeValueByType = _ref10 => {
|
|
|
14318
14330
|
return constants.NO_VALUE_FALLBACK;
|
|
14319
14331
|
}
|
|
14320
14332
|
};
|
|
14333
|
+
const getProductLevelAttributes = attribueDefinition => {
|
|
14334
|
+
return attribueDefinition?.level === ATTRIBUTE_LEVELS.PRODUCT;
|
|
14335
|
+
};
|
|
14336
|
+
const getProductAttributes = attribueDefinition => {
|
|
14337
|
+
return attribueDefinition?.attributeConstraint === ATTRIBUTE_CONSTRAINTS.SAME_FOR_ALL || getProductLevelAttributes(attribueDefinition);
|
|
14338
|
+
};
|
|
14321
14339
|
|
|
14322
14340
|
let RequestCache = /*#__PURE__*/function () {
|
|
14323
14341
|
function RequestCache() {
|
|
@@ -14596,6 +14614,7 @@ exports.getCategoryLevel = getCategoryLevel;
|
|
|
14596
14614
|
exports.getCountsFromBulkSummary = getCountsFromBulkSummary;
|
|
14597
14615
|
exports.getDiscountValue = getDiscountValue;
|
|
14598
14616
|
exports.getDisplayName = getDisplayName$1;
|
|
14617
|
+
exports.getFractionDigit = getFractionDigit;
|
|
14599
14618
|
exports.getFractionedAmount = getFractionedAmount;
|
|
14600
14619
|
exports.getIndexesOfInvalidValues = getIndexesOfInvalidValues;
|
|
14601
14620
|
exports.getMinimumPricesByCurrencyCode = getMinimumPricesByCurrencyCode;
|
|
@@ -14603,6 +14622,8 @@ exports.getNetUnitPrice = getNetUnitPrice;
|
|
|
14603
14622
|
exports.getPathName = getPathName;
|
|
14604
14623
|
exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
|
|
14605
14624
|
exports.getPriceChannelName = getPriceChannelName;
|
|
14625
|
+
exports.getProductAttributes = getProductAttributes;
|
|
14626
|
+
exports.getProductLevelAttributes = getProductLevelAttributes;
|
|
14606
14627
|
exports.getReferenceTypeId = getReferenceTypeId;
|
|
14607
14628
|
exports.getSelectedPrice = getSelectedPrice;
|
|
14608
14629
|
exports.getStampToneByPublishState = getStampToneByPublishState;
|
|
@@ -14663,6 +14684,7 @@ exports.shouldUpdateAttributeInput = shouldUpdateAttributeInput;
|
|
|
14663
14684
|
exports.slugify = slugify;
|
|
14664
14685
|
exports.sortDataByIdsArray = sortDataByIdsArray;
|
|
14665
14686
|
exports.sortRequiresLanguage = sortRequiresLanguage;
|
|
14687
|
+
exports.splitProductAndVariantAttributes = splitProductAndVariantAttributes;
|
|
14666
14688
|
exports.splitVariantAttributesByConstraint = splitVariantAttributesByConstraint;
|
|
14667
14689
|
exports.stringToBase64 = stringToBase64;
|
|
14668
14690
|
exports.swapArrayItems = swapArrayItems;
|
|
@@ -69,7 +69,6 @@ import { useAsyncDispatch, actions } from '@commercetools-frontend/sdk';
|
|
|
69
69
|
import keyBy from 'lodash/keyBy';
|
|
70
70
|
import { useShowNotification, useShowApiErrorNotification, useOnActionError, useHideAllPageNotifications } from '@commercetools-frontend/actions-global';
|
|
71
71
|
import { useModalState, CustomFormModalPage, PageContentNarrow, ConfirmationDialog, InfoDialog } from '@commercetools-frontend/application-components';
|
|
72
|
-
import { useFeatureToggle, useAdapterStatus } from '@commercetools-frontend/application-shell';
|
|
73
72
|
import { ErrorMessage } from '@commercetools-frontend/ui-kit/';
|
|
74
73
|
import PropTypes from 'prop-types';
|
|
75
74
|
import { css } from '@emotion/react';
|
|
@@ -107,6 +106,7 @@ import memoize from 'memoize-one';
|
|
|
107
106
|
import omitEmpty from 'omit-empty-es';
|
|
108
107
|
import shuffle from 'lodash/shuffle';
|
|
109
108
|
import { useSnapCarousel } from 'react-snap-carousel';
|
|
109
|
+
import { useFeatureToggle, useAdapterStatus } from '@commercetools-frontend/application-shell';
|
|
110
110
|
import { graphql, withApollo } from '@apollo/client/react/hoc';
|
|
111
111
|
import flatten from 'lodash/flatten';
|
|
112
112
|
import uniqBy from 'lodash/uniqBy';
|
|
@@ -170,12 +170,19 @@ const INTERVALS_IN_SECONDS = {
|
|
|
170
170
|
[REMINDER_OPTION_10_DAY]: 864000
|
|
171
171
|
};
|
|
172
172
|
const EXCLUDING_PRODUCTS = 'excludingProducts';
|
|
173
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES = 'productTailoringForAttributes';
|
|
174
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT = 'productTailoringForAttributesTypesOtherThanText';
|
|
175
|
-
const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAttributesFallbackValues';
|
|
176
173
|
|
|
177
174
|
// TODO: apply a more robust solution to overlaying issues
|
|
178
175
|
const Z_INDEX_DROPDOWN = 30000;
|
|
176
|
+
const ATTRIBUTE_CONSTRAINTS = {
|
|
177
|
+
SAME_FOR_ALL: 'SameForAll',
|
|
178
|
+
NONE: 'None',
|
|
179
|
+
UNIQUE: 'Unique',
|
|
180
|
+
COMBINATION_UNIQUE: 'CombinationUnique'
|
|
181
|
+
};
|
|
182
|
+
const ATTRIBUTE_LEVELS = {
|
|
183
|
+
PRODUCT: 'Product',
|
|
184
|
+
VARIANT: 'Variant'
|
|
185
|
+
};
|
|
179
186
|
|
|
180
187
|
var commonPickerMessages = defineMessages({
|
|
181
188
|
loadingErrorMessage: {
|
|
@@ -6326,6 +6333,8 @@ const REFERENCED_TYPES = {
|
|
|
6326
6333
|
'shipping-method': 'shipping-method',
|
|
6327
6334
|
zone: 'zone'
|
|
6328
6335
|
};
|
|
6336
|
+
const ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time'];
|
|
6337
|
+
const SET_ATTRIBUTE_TYPES = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
6329
6338
|
|
|
6330
6339
|
function ownKeys$V(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6331
6340
|
function _objectSpread$V(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$V(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$V(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -8129,9 +8138,6 @@ const useDnDContext = () => {
|
|
|
8129
8138
|
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
8130
8139
|
function ownKeys$J(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8131
8140
|
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$J(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$J(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
8132
|
-
const existingAttributeTypes = ['text', 'ltext'];
|
|
8133
|
-
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
8134
|
-
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
8135
8141
|
const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time, CUSTOM_FIELD_TYPES.set];
|
|
8136
8142
|
const getFieldName = (parentName, fieldName) => {
|
|
8137
8143
|
if (!parentName) return fieldName;
|
|
@@ -8139,9 +8145,7 @@ const getFieldName = (parentName, fieldName) => {
|
|
|
8139
8145
|
};
|
|
8140
8146
|
const isAttributeType = function () {
|
|
8141
8147
|
let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
8142
|
-
|
|
8143
|
-
const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
|
|
8144
|
-
return _includesInstanceProperty(attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty(setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
|
|
8148
|
+
return _includesInstanceProperty(ATTRIBUTE_TYPES).call(ATTRIBUTE_TYPES, fieldDefinitionType.name) || fieldDefinitionType.name === 'set' && _includesInstanceProperty(SET_ATTRIBUTE_TYPES).call(SET_ATTRIBUTE_TYPES, fieldDefinitionType?.elementType?.name);
|
|
8145
8149
|
};
|
|
8146
8150
|
const isNested = fieldDefinition => {
|
|
8147
8151
|
const type = fieldDefinition.type;
|
|
@@ -8172,9 +8176,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
8172
8176
|
})),
|
|
8173
8177
|
timeZone = _useApplicationContex.timeZone,
|
|
8174
8178
|
userLocale = _useApplicationContex.userLocale;
|
|
8175
|
-
const isTailoringAttributesEnabled = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
|
|
8176
|
-
const isTailoringAttributeForOtherTypes = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
|
|
8177
|
-
const isTailoringFallbackEnabled = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
|
|
8178
8179
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
8179
8180
|
const _useDnDContext = useDnDContext(),
|
|
8180
8181
|
DroppableWrapper = _useDnDContext.DroppableWrapper,
|
|
@@ -8188,9 +8189,9 @@ const CustomFieldsInternal = _ref => {
|
|
|
8188
8189
|
var _context;
|
|
8189
8190
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
8190
8191
|
const isTouched = Boolean(getIn(touched, fieldName));
|
|
8191
|
-
const isFieldDisabled = props.isDisabled && !
|
|
8192
|
+
const isFieldDisabled = props.isDisabled && !isAttributeType(fieldDefinition.type);
|
|
8192
8193
|
const shouldUseAdditionalInfoProp = _includesInstanceProperty(_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
|
|
8193
|
-
const shouldDisplayFallbackRow =
|
|
8194
|
+
const shouldDisplayFallbackRow = !shouldUseAdditionalInfoProp && _includesInstanceProperty(ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
|
|
8194
8195
|
const fieldErrors = getIn(errors, fieldName);
|
|
8195
8196
|
const value = props.inputValuesConverter(fieldName, getIn(values, fieldName));
|
|
8196
8197
|
|
|
@@ -8216,7 +8217,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8216
8217
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
8217
8218
|
handleWarningChange: props.handleWarningChange,
|
|
8218
8219
|
renderWarnings: props.renderWarnings,
|
|
8219
|
-
additionalInfo:
|
|
8220
|
+
additionalInfo: shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
8220
8221
|
};
|
|
8221
8222
|
const Field = jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
8222
8223
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
@@ -8244,7 +8245,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8244
8245
|
}) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsx(Text.Wrap, {
|
|
8245
8246
|
children: jsx(Text.Detail, {
|
|
8246
8247
|
tone: "tertiary",
|
|
8247
|
-
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
|
|
8248
|
+
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) || ''
|
|
8248
8249
|
})
|
|
8249
8250
|
}), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors$1, {
|
|
8250
8251
|
isTouched: isTouched,
|
|
@@ -14087,6 +14088,17 @@ function splitVariantAttributesByConstraint(product, constraint) {
|
|
|
14087
14088
|
}
|
|
14088
14089
|
return [productAttributeDefinitions, variantAttributeDefinitions];
|
|
14089
14090
|
}
|
|
14091
|
+
function splitProductAndVariantAttributes(product) {
|
|
14092
|
+
const productAttributeDefinitions = [];
|
|
14093
|
+
const variantAttributeDefinitions = [];
|
|
14094
|
+
if (product.productType?.obj?.attributes) {
|
|
14095
|
+
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14096
|
+
const definition = product.productType.obj.attributes[i];
|
|
14097
|
+
if (getProductAttributes(definition)) productAttributeDefinitions.push(definition);else variantAttributeDefinitions.push(definition);
|
|
14098
|
+
}
|
|
14099
|
+
}
|
|
14100
|
+
return [productAttributeDefinitions, variantAttributeDefinitions];
|
|
14101
|
+
}
|
|
14090
14102
|
function resolveStatusType(product) {
|
|
14091
14103
|
const published = product.published,
|
|
14092
14104
|
hasStagedChanges = product.hasStagedChanges;
|
|
@@ -14246,6 +14258,12 @@ const getAttributeValueByType = _ref10 => {
|
|
|
14246
14258
|
return NO_VALUE_FALLBACK;
|
|
14247
14259
|
}
|
|
14248
14260
|
};
|
|
14261
|
+
const getProductLevelAttributes = attribueDefinition => {
|
|
14262
|
+
return attribueDefinition?.level === ATTRIBUTE_LEVELS.PRODUCT;
|
|
14263
|
+
};
|
|
14264
|
+
const getProductAttributes = attribueDefinition => {
|
|
14265
|
+
return attribueDefinition?.attributeConstraint === ATTRIBUTE_CONSTRAINTS.SAME_FOR_ALL || getProductLevelAttributes(attribueDefinition);
|
|
14266
|
+
};
|
|
14249
14267
|
|
|
14250
14268
|
let RequestCache = /*#__PURE__*/function () {
|
|
14251
14269
|
function RequestCache() {
|
|
@@ -14418,4 +14436,4 @@ function withPendingRequests() {
|
|
|
14418
14436
|
|
|
14419
14437
|
var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "CategorySearchPickerOptionFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CategorySearch" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "externalId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "slugAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "parent" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "ancestors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 685, source: { body: "query SearchCategoryReference($locale: Locale!, $text: String!) {\n categories: categoryAutocomplete(locale: $locale, text: $text) {\n results {\n ...CategorySearchPickerOptionFragment\n }\n }\n}\n\nquery FetchCategoriesByIds($where: String!) {\n categories(where: $where) {\n results {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nfragment CategorySearchPickerOptionFragment on CategorySearch {\n id\n externalId\n nameAllLocales {\n locale\n value\n }\n slugAllLocales {\n locale\n value\n }\n parent {\n nameAllLocales {\n locale\n value\n }\n }\n ancestors {\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
14420
14438
|
|
|
14421
|
-
export { booleanField as BooleanField, Button$1 as Button, CUSTOM_FIELD_TYPES, Carousel$1 as Carousel, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldInput$1 as CustomFieldInput, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LOWER_STORES_LIMIT, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, PlatformLimitsFetcherQuery, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, QUERY_MAX_LIMIT, RESOURCES_WITH_PLATFORM_LIMITS, RecurrentIntervalPicker$1 as RecurrentIntervalPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, UPPER_STORES_LIMIT, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributeToCustomField, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapShippingRateTierToGraphQL, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$O as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useBusinessUnitsLimits$1 as useBusinessUnitsPlatformLimits, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useStoresLimits$1 as useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
|
|
14439
|
+
export { booleanField as BooleanField, Button$1 as Button, CUSTOM_FIELD_TYPES, Carousel$1 as Carousel, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldInput$1 as CustomFieldInput, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LOWER_STORES_LIMIT, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, PlatformLimitsFetcherQuery, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, QUERY_MAX_LIMIT, RESOURCES_WITH_PLATFORM_LIMITS, RecurrentIntervalPicker$1 as RecurrentIntervalPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, UPPER_STORES_LIMIT, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributeToCustomField, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionDigit, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getProductAttributes, getProductLevelAttributes, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapShippingRateTierToGraphQL, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$O as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitProductAndVariantAttributes, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useBusinessUnitsLimits$1 as useBusinessUnitsPlatformLimits, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useStoresLimits$1 as useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
|
|
@@ -65,9 +65,16 @@ export const INTERVALS_IN_SECONDS: {
|
|
|
65
65
|
"10day": number;
|
|
66
66
|
};
|
|
67
67
|
export const EXCLUDING_PRODUCTS: "excludingProducts";
|
|
68
|
-
export const PRODUCT_TAILORING_FOR_ATTRIBUTES: "productTailoringForAttributes";
|
|
69
|
-
export const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT: "productTailoringForAttributesTypesOtherThanText";
|
|
70
|
-
export const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES: "productTailoringForAttributesFallbackValues";
|
|
71
68
|
export const UTC: "UTC";
|
|
72
69
|
export const Z_INDEX_DROPDOWN: 30000;
|
|
70
|
+
export namespace ATTRIBUTE_CONSTRAINTS {
|
|
71
|
+
let SAME_FOR_ALL: string;
|
|
72
|
+
let NONE: string;
|
|
73
|
+
let UNIQUE: string;
|
|
74
|
+
let COMBINATION_UNIQUE: string;
|
|
75
|
+
}
|
|
76
|
+
export namespace ATTRIBUTE_LEVELS {
|
|
77
|
+
let PRODUCT: string;
|
|
78
|
+
let VARIANT: string;
|
|
79
|
+
}
|
|
73
80
|
export { LOWER_STORES_LIMIT, UPPER_STORES_LIMIT } from "../components/store-select-input/constants.js";
|
|
@@ -89,6 +89,7 @@ import { formatDateTime, formatDateRangeValue, formatMoney, formatMoneyValue, fo
|
|
|
89
89
|
import formatDiscount from "./utils/formats/discount/discount.js";
|
|
90
90
|
import { getFractionedAmount } from "./utils/formats/money/money.js";
|
|
91
91
|
import { formatPercentage, convertRatioToPercentage } from "./utils/formats/percentage/percentage.js";
|
|
92
|
+
import { getFractionDigit } from "./utils/get-currency-code-data/index.js";
|
|
92
93
|
import getPrefixSearchBounds from "./utils/get-prefix-search-bounds/get-prefix-search-bounds.js";
|
|
93
94
|
import { extractErrorFromGraphQlResponse, createGraphQlUpdateActions, transformLocalizedFieldsForCategory, transformCustomFieldsRawToCustomFields, mapShippingRateTierToGraphQL } from "./utils/graphql/graphql.js";
|
|
94
95
|
import hasInvalidInputError from "./utils/has-error-code/has-invalid-input-error.js";
|
|
@@ -99,7 +100,7 @@ import omitDeep from "./utils/omit-deep/omit-deep.js";
|
|
|
99
100
|
import { or, exact, and, not, range, exists } from "./utils/pim-query-clauses.js";
|
|
100
101
|
import { getSelectedPrice, getDiscountValue, getNetUnitPrice, getPriceChannelName, getMinimumPricesByCurrencyCode } from "./utils/prices/prices.js";
|
|
101
102
|
import { convertProductSelectionFromGraphQl } from "./utils/product-selections/convert-product-selection-from-graphql.js";
|
|
102
|
-
import { sortRequiresLanguage, computedProperties, allowedProperties, resolveStatusType, normalizeProductSettings, getAttributeValueByType, getStampToneByPublishState, splitVariantAttributesByConstraint } from "./utils/products/products.jsx";
|
|
103
|
+
import { sortRequiresLanguage, computedProperties, allowedProperties, resolveStatusType, normalizeProductSettings, getAttributeValueByType, getStampToneByPublishState, splitVariantAttributesByConstraint, splitProductAndVariantAttributes, getProductAttributes, getProductLevelAttributes } from "./utils/products/products.jsx";
|
|
103
104
|
import { sanitize } from "./utils/query-string/query-string.js";
|
|
104
105
|
import RequestCache from "./utils/request-cache/request-cache.js";
|
|
105
106
|
import shallowEqual from "./utils/shallow-equal/shallow-equal.js";
|
|
@@ -116,4 +117,4 @@ import getIndexesOfInvalidValues from "./utils/validation/get-indexes-of-invalid
|
|
|
116
117
|
import withoutEmptyErrorsByField from "./utils/validation/without-empty-errors-by-field.js";
|
|
117
118
|
import withPendingRequests from "./utils/with-pending-requests/with-pending-requests.jsx";
|
|
118
119
|
export { QUERY_LIMIT, QUERY_MAX_LIMIT, LOWER_STORES_LIMIT, UPPER_STORES_LIMIT, } from "./constants/index.js";
|
|
119
|
-
export { allowedProperties, and, attributesMapToNameValuePairs, attributeToCustomField, base64ToString, BooleanField, booleanMessages, buildSearchQuery, Button, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, Carousel, type CarouselItem, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomFieldInput, customFieldsTransformer, CustomFieldTooltip, dateTransformer, DefaultPageSizes, Divider, EMAIL_REGEX, exact, exists, extractErrorFromGraphQlResponse, FileInput, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomerAddress, formatCustomerName, formatCustomField, formatDateTime, formatDateRangeValue, formatDiscount, formatMoneyRangeValue, formatMoney, formatMoneyValue, formatPercentage, formatProductAttribute, FormattedDateTime, FormattedLocalizedString, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, useBusinessUnitsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapShippingRateTierToGraphQL, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PlatformLimitsFetcherQuery, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, RecurrentIntervalPicker, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, RESOURCES_WITH_PLATFORM_LIMITS, safelyAddFallback, sanitize, ScrollToFieldError, searchCategories, SearchInput, searchInputMessages, SelectableFieldSearchInput, setToArray, setDisplayName, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, StoreSelectField, StoreSelectInput, stringToBase64, swapArrayItems, ThrottledField, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useCustomersPlatformLimits, useCustomerGroupsPlatformLimits, useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, CUSTOM_FIELD_TYPES, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, };
|
|
120
|
+
export { allowedProperties, and, attributesMapToNameValuePairs, attributeToCustomField, base64ToString, BooleanField, booleanMessages, buildSearchQuery, Button, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, Carousel, type CarouselItem, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomFieldInput, customFieldsTransformer, CustomFieldTooltip, dateTransformer, DefaultPageSizes, Divider, EMAIL_REGEX, exact, exists, extractErrorFromGraphQlResponse, FileInput, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomerAddress, formatCustomerName, formatCustomField, formatDateTime, formatDateRangeValue, formatDiscount, formatMoneyRangeValue, formatMoney, formatMoneyValue, formatPercentage, formatProductAttribute, FormattedDateTime, FormattedLocalizedString, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName, getFractionedAmount, getFractionDigit, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds, getProductAttributes, getProductLevelAttributes, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, useBusinessUnitsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapShippingRateTierToGraphQL, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PlatformLimitsFetcherQuery, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, RecurrentIntervalPicker, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, RESOURCES_WITH_PLATFORM_LIMITS, safelyAddFallback, sanitize, ScrollToFieldError, searchCategories, SearchInput, searchInputMessages, SelectableFieldSearchInput, setToArray, setDisplayName, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, splitProductAndVariantAttributes, StoreSelectField, StoreSelectInput, stringToBase64, swapArrayItems, ThrottledField, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useCustomersPlatformLimits, useCustomerGroupsPlatformLimits, useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, CUSTOM_FIELD_TYPES, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function getISOCode(code: any): any;
|
|
2
|
+
export function getFractionDigit(code: any): any;
|
|
3
|
+
export function getSymbol(code: any): any;
|
|
4
|
+
export function getUnicode(code: any): any;
|
|
5
|
+
export function getHtmlCode(code: any): any;
|
|
6
|
+
export function getHexCode(code: any): any;
|
|
7
|
+
export function getCurrencyName(code: any): any;
|
|
8
|
+
export function getCountriesUsingTheCurrency(code: any): any;
|
|
9
|
+
export function getFullInformation(code: any): any;
|
|
10
|
+
export function getAllCurrencies(code: any): string[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getISOCode, getFractionDigit, getSymbol, getUnicode, getHtmlCode, getHexCode, getCurrencyName, getCountriesUsingTheCurrency, getFullInformation, getAllCurrencies } from "./get-currency-code-data.js";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export function sanitizeListColumns(columns: any): any;
|
|
2
2
|
export function normalizeProductSettings(settings: any): {};
|
|
3
3
|
export function splitVariantAttributesByConstraint(product: any, constraint: any): any[][];
|
|
4
|
+
export function splitProductAndVariantAttributes(product: any): any[][];
|
|
4
5
|
export function resolveStatusType(product: any): string;
|
|
5
6
|
export function getStampToneByPublishState(statusCode: any): "secondary" | "positive" | "warning" | undefined;
|
|
6
7
|
export const COLUMN_WIDTH_FALLBACK: 200;
|
|
@@ -55,3 +56,5 @@ export function getAttributeValueByType({ type, value, projectDataLocale, intl,
|
|
|
55
56
|
intl: any;
|
|
56
57
|
projectLanguages: any;
|
|
57
58
|
}): any;
|
|
59
|
+
export function getProductLevelAttributes(attribueDefinition: any): boolean;
|
|
60
|
+
export function getProductAttributes(attribueDefinition: any): boolean;
|
package/dist/styles.css
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
|
-
/* imported from required-indicator.module.css */
|
|
2
|
-
|
|
3
|
-
.required-indicator-module__colored____YUFm {
|
|
4
|
-
color: var(--color-warning);
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.required-indicator-module__indicatorAsterisk___3lEdX {
|
|
8
|
-
font-style: normal;
|
|
9
|
-
margin-left: 2px;
|
|
10
|
-
}
|
|
11
1
|
/* imported from selectable-field-search-input.module.css */
|
|
12
2
|
|
|
13
3
|
.selectable-field-search-input-module__container___z2ltR {
|
|
@@ -24,6 +14,16 @@
|
|
|
24
14
|
margin-top: 2px;
|
|
25
15
|
position: absolute;
|
|
26
16
|
}
|
|
17
|
+
/* imported from required-indicator.module.css */
|
|
18
|
+
|
|
19
|
+
.required-indicator-module__colored____YUFm {
|
|
20
|
+
color: var(--color-warning);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.required-indicator-module__indicatorAsterisk___3lEdX {
|
|
24
|
+
font-style: normal;
|
|
25
|
+
margin-left: 2px;
|
|
26
|
+
}
|
|
27
27
|
/* imported from validated-input.module.css */
|
|
28
28
|
|
|
29
29
|
.validated-input-module__invalid___380EL {
|
|
@@ -46,18 +46,6 @@
|
|
|
46
46
|
font-size: 0.9rem;
|
|
47
47
|
font-weight: bold;
|
|
48
48
|
}
|
|
49
|
-
/* imported from numeric-format-input.module.css */
|
|
50
|
-
|
|
51
|
-
.numeric-format-input-module__invalid___3LcyE {
|
|
52
|
-
/* this needs !important because react-select has a :focus style that
|
|
53
|
-
stops the border colour being set unless the element is blurred */
|
|
54
|
-
border-color: var(--color-error) !important;
|
|
55
|
-
border: 1px solid;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.numeric-format-input-module__disabled___hb6h4 {
|
|
59
|
-
cursor: not-allowed;
|
|
60
|
-
}
|
|
61
49
|
/* imported from multi-value-search-input.module.css */
|
|
62
50
|
|
|
63
51
|
.multi-value-search-input-module__container___2u64d {
|
|
@@ -104,77 +92,17 @@
|
|
|
104
92
|
border-bottom-left-radius: var(--border-radius-for-input);
|
|
105
93
|
border-bottom-right-radius: var(--border-radius-for-input);
|
|
106
94
|
}
|
|
107
|
-
/* imported from
|
|
108
|
-
|
|
109
|
-
.throttled-field-module__size___324jx {
|
|
110
|
-
width: 100%;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
.throttled-field-module__size___324jx {
|
|
114
|
-
min-height: var(--height-for-input);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
.throttled-field-module__input-text___3zFFp {
|
|
118
|
-
transition: 0.2s ease;
|
|
119
|
-
border-radius: 6px;
|
|
120
|
-
border-style: solid;
|
|
121
|
-
border-width: 1px;
|
|
122
|
-
color: var(--color-solid);
|
|
123
|
-
font-weight: 500;
|
|
124
|
-
font-size: 1rem;
|
|
125
|
-
font-family: 'Open Sans', sans-serif !important;
|
|
126
|
-
padding: 7.5px 10px;
|
|
127
|
-
outline: none;
|
|
128
|
-
box-shadow: none;
|
|
129
|
-
appearance: none;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
.throttled-field-module__input-secondary___cFo9e {
|
|
133
|
-
background-color: var(--color-neutral-95);
|
|
134
|
-
border-color: var(--color-surface);
|
|
135
|
-
width: 100%;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.throttled-field-module__input-primary___26G3R {
|
|
139
|
-
border-color: var(--color-neutral);
|
|
140
|
-
background-color: var(--color-surface);
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
.throttled-field-module__textarea___3ZNEs {
|
|
144
|
-
width: 100%;
|
|
145
|
-
min-height: 36px;
|
|
146
|
-
resize: vertical;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
.throttled-field-module__textarea-primary___24Wwt {
|
|
150
|
-
border-color: var(--color-neutral);
|
|
151
|
-
background-color: var(--color-surface);
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
.throttled-field-module__textarea-secondary___2rmFG {
|
|
155
|
-
background-color: var(--color-neutral-95);
|
|
156
|
-
border-color: var(--color-surface);
|
|
157
|
-
width: 100%;
|
|
158
|
-
}
|
|
95
|
+
/* imported from numeric-format-input.module.css */
|
|
159
96
|
|
|
160
|
-
.
|
|
97
|
+
.numeric-format-input-module__invalid___3LcyE {
|
|
161
98
|
/* this needs !important because react-select has a :focus style that
|
|
162
99
|
stops the border colour being set unless the element is blurred */
|
|
163
100
|
border-color: var(--color-error) !important;
|
|
164
101
|
border: 1px solid;
|
|
165
102
|
}
|
|
166
103
|
|
|
167
|
-
.
|
|
104
|
+
.numeric-format-input-module__disabled___hb6h4 {
|
|
168
105
|
cursor: not-allowed;
|
|
169
|
-
background-color: var(--color-accent-98);
|
|
170
|
-
color: var(--color-solid);
|
|
171
|
-
opacity: 1; /* fix for mobile safari */
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
.throttled-field-module__granular___2LXJf {
|
|
175
|
-
border-top-left-radius: 0;
|
|
176
|
-
border-bottom-left-radius: 0;
|
|
177
|
-
margin-left: 0;
|
|
178
106
|
}
|
|
179
107
|
/* imported from search-input.module.css */
|
|
180
108
|
|
|
@@ -266,6 +194,78 @@
|
|
|
266
194
|
flex-shrink: 1;
|
|
267
195
|
margin-left: var(--spacing-s);
|
|
268
196
|
}
|
|
197
|
+
/* imported from throttled-field.module.css */
|
|
198
|
+
|
|
199
|
+
.throttled-field-module__size___324jx {
|
|
200
|
+
width: 100%;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.throttled-field-module__size___324jx {
|
|
204
|
+
min-height: var(--height-for-input);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.throttled-field-module__input-text___3zFFp {
|
|
208
|
+
transition: 0.2s ease;
|
|
209
|
+
border-radius: 6px;
|
|
210
|
+
border-style: solid;
|
|
211
|
+
border-width: 1px;
|
|
212
|
+
color: var(--color-solid);
|
|
213
|
+
font-weight: 500;
|
|
214
|
+
font-size: 1rem;
|
|
215
|
+
font-family: 'Open Sans', sans-serif !important;
|
|
216
|
+
padding: 7.5px 10px;
|
|
217
|
+
outline: none;
|
|
218
|
+
box-shadow: none;
|
|
219
|
+
appearance: none;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.throttled-field-module__input-secondary___cFo9e {
|
|
223
|
+
background-color: var(--color-neutral-95);
|
|
224
|
+
border-color: var(--color-surface);
|
|
225
|
+
width: 100%;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.throttled-field-module__input-primary___26G3R {
|
|
229
|
+
border-color: var(--color-neutral);
|
|
230
|
+
background-color: var(--color-surface);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.throttled-field-module__textarea___3ZNEs {
|
|
234
|
+
width: 100%;
|
|
235
|
+
min-height: 36px;
|
|
236
|
+
resize: vertical;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.throttled-field-module__textarea-primary___24Wwt {
|
|
240
|
+
border-color: var(--color-neutral);
|
|
241
|
+
background-color: var(--color-surface);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.throttled-field-module__textarea-secondary___2rmFG {
|
|
245
|
+
background-color: var(--color-neutral-95);
|
|
246
|
+
border-color: var(--color-surface);
|
|
247
|
+
width: 100%;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.throttled-field-module__invalid___1yZLW {
|
|
251
|
+
/* this needs !important because react-select has a :focus style that
|
|
252
|
+
stops the border colour being set unless the element is blurred */
|
|
253
|
+
border-color: var(--color-error) !important;
|
|
254
|
+
border: 1px solid;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.throttled-field-module__disabled___qVj79 {
|
|
258
|
+
cursor: not-allowed;
|
|
259
|
+
background-color: var(--color-accent-98);
|
|
260
|
+
color: var(--color-solid);
|
|
261
|
+
opacity: 1; /* fix for mobile safari */
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.throttled-field-module__granular___2LXJf {
|
|
265
|
+
border-top-left-radius: 0;
|
|
266
|
+
border-bottom-left-radius: 0;
|
|
267
|
+
margin-left: 0;
|
|
268
|
+
}
|
|
269
269
|
/* imported from button.module.css */
|
|
270
270
|
|
|
271
271
|
/* Generic button */
|
|
@@ -510,20 +510,14 @@
|
|
|
510
510
|
.custom-money-input-module__container___1fdO2 {
|
|
511
511
|
width: 100%;
|
|
512
512
|
}
|
|
513
|
-
/* imported from
|
|
514
|
-
|
|
515
|
-
.reference-search-module__container___3-iK3 {
|
|
516
|
-
width: 100%;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
.reference-search-module__container___3-iK3 > div {
|
|
520
|
-
width: 100%;
|
|
521
|
-
}
|
|
513
|
+
/* imported from centered-loading-spinner.module.css */
|
|
522
514
|
|
|
523
|
-
.
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
515
|
+
.centered-loading-spinner-module__loading-container___3_9-h {
|
|
516
|
+
height: 100%;
|
|
517
|
+
display: flex;
|
|
518
|
+
flex-grow: 1;
|
|
519
|
+
align-items: center;
|
|
520
|
+
justify-content: center;
|
|
527
521
|
}
|
|
528
522
|
/* imported from divider.module.css */
|
|
529
523
|
|
|
@@ -552,14 +546,20 @@
|
|
|
552
546
|
.divider-module__divider-dashed___2Em8A {
|
|
553
547
|
border-style: dashed;
|
|
554
548
|
}
|
|
555
|
-
/* imported from
|
|
549
|
+
/* imported from reference-search.module.css */
|
|
556
550
|
|
|
557
|
-
.
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
551
|
+
.reference-search-module__container___3-iK3 {
|
|
552
|
+
width: 100%;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.reference-search-module__container___3-iK3 > div {
|
|
556
|
+
width: 100%;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.reference-search-module__missing-label___az9AO {
|
|
560
|
+
color: var(--color-warning);
|
|
561
|
+
font-size: 0.9rem;
|
|
562
|
+
margin-left: var(--spacing-xs);
|
|
563
563
|
}
|
|
564
564
|
/* imported from set-buttons.module.css */
|
|
565
565
|
|
|
@@ -595,9 +595,9 @@
|
|
|
595
595
|
.platform-limits-customers-status-module__status___3rXYM {
|
|
596
596
|
min-width: max-content;
|
|
597
597
|
}
|
|
598
|
-
/* imported from platform-limits-
|
|
598
|
+
/* imported from platform-limits-customers-combined.module.css */
|
|
599
599
|
|
|
600
|
-
.platform-limits-
|
|
600
|
+
.platform-limits-customers-combined-module__combined___OszDd {
|
|
601
601
|
margin-bottom: var(--spacing-s);
|
|
602
602
|
}
|
|
603
603
|
/* imported from platform-limits-customer-groups-status.module.css */
|
|
@@ -605,8 +605,8 @@
|
|
|
605
605
|
.platform-limits-customer-groups-status-module__status___6099G {
|
|
606
606
|
min-width: max-content;
|
|
607
607
|
}
|
|
608
|
-
/* imported from platform-limits-
|
|
608
|
+
/* imported from platform-limits-customer-groups-combined.module.css */
|
|
609
609
|
|
|
610
|
-
.platform-limits-
|
|
610
|
+
.platform-limits-customer-groups-combined-module__combined___WjRoI {
|
|
611
611
|
margin-bottom: var(--spacing-s);
|
|
612
612
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/experimental-components",
|
|
3
|
-
"version": "7.2.
|
|
3
|
+
"version": "7.2.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"@commercetools-frontend/l10n": "24.2.1",
|
|
34
34
|
"@commercetools-frontend/sdk": "24.2.1",
|
|
35
35
|
"@commercetools-frontend/sentry": "24.2.1",
|
|
36
|
-
"@commercetools-frontend/ui-kit": "20.
|
|
37
|
-
"@commercetools-uikit/design-system": "20.
|
|
38
|
-
"@commercetools-uikit/select-utils": "20.
|
|
39
|
-
"@commercetools-uikit/utils": "20.
|
|
36
|
+
"@commercetools-frontend/ui-kit": "20.2.1",
|
|
37
|
+
"@commercetools-uikit/design-system": "20.2.1",
|
|
38
|
+
"@commercetools-uikit/select-utils": "20.2.1",
|
|
39
|
+
"@commercetools-uikit/utils": "20.2.1",
|
|
40
40
|
"@emotion/react": "11.14.0",
|
|
41
41
|
"@hello-pangea/dnd": "^18.0.1",
|
|
42
42
|
"classnames": "2.5.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@apollo/client": "3.12.4",
|
|
64
|
-
"@commercetools/composable-commerce-test-data": "
|
|
64
|
+
"@commercetools/composable-commerce-test-data": "13.0.0",
|
|
65
65
|
"@testing-library/react": "16.1.0",
|
|
66
66
|
"@types/debounce-promise": "3.1.9",
|
|
67
67
|
"@types/jest": "^29.5.2",
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"react-test-renderer": "17.0.2",
|
|
81
81
|
"redux": "4.2.1",
|
|
82
82
|
"typescript": "5.2.2",
|
|
83
|
-
"@commercetools-local/test-
|
|
84
|
-
"@commercetools-local/test-
|
|
83
|
+
"@commercetools-local/test-utils": "1.2.22",
|
|
84
|
+
"@commercetools-local/test-data": "1.2.22"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@apollo/client": "3.x",
|