@commercetools-frontend/experimental-components 6.4.3 → 6.4.4
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 +23 -12
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +23 -12
- package/dist/commercetools-frontend-experimental-components.esm.js +23 -13
- package/dist/declarations/src/index.d.ts +2 -1
- package/dist/declarations/src/utils/prices/prices.d.ts +3 -2
- package/dist/declarations/src/utils/store-data-fence-product-selection/index.d.ts +1 -0
- package/dist/declarations/src/utils/store-data-fence-product-selection/store-data-fence-product-selection.d.ts +1 -0
- package/dist/styles.css +10 -10
- package/package.json +15 -14
|
@@ -4771,12 +4771,15 @@ function getDiscountValue(price) {
|
|
|
4771
4771
|
});
|
|
4772
4772
|
}
|
|
4773
4773
|
function getSelectedPrice(price) {
|
|
4774
|
-
|
|
4774
|
+
let isCartDiscountBestDealDiscountType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4775
|
+
return isCartDiscountBestDealDiscountType ? price : price.discounted ?? price;
|
|
4775
4776
|
}
|
|
4776
4777
|
function getNetUnitPrice(_ref) {
|
|
4777
4778
|
let lineItem = _ref.lineItem,
|
|
4778
|
-
shouldRoundAmount = _ref.shouldRoundAmount
|
|
4779
|
-
|
|
4779
|
+
shouldRoundAmount = _ref.shouldRoundAmount,
|
|
4780
|
+
_ref$isCartDiscountBe = _ref.isCartDiscountBestDealDiscountType,
|
|
4781
|
+
isCartDiscountBestDealDiscountType = _ref$isCartDiscountBe === void 0 ? false : _ref$isCartDiscountBe;
|
|
4782
|
+
const price = getSelectedPrice(lineItem.price, isCartDiscountBestDealDiscountType);
|
|
4780
4783
|
const filteredPerMethodTaxRate = lineItem?.perMethodTaxRate?.filter(perMethodTax => lineItem?.shippingDetails?.targets?.findIndex(target => target?.shippingMethodKey === perMethodTax?.shippingMethodKey) >= 0);
|
|
4781
4784
|
|
|
4782
4785
|
// when shipping mode is multi with the same tax rate
|
|
@@ -6061,7 +6064,8 @@ const CUSTOM_FIELD_TYPES = {
|
|
|
6061
6064
|
time: 'time',
|
|
6062
6065
|
datetime: 'datetime',
|
|
6063
6066
|
date: 'date',
|
|
6064
|
-
nested: 'nested'
|
|
6067
|
+
nested: 'nested',
|
|
6068
|
+
set: 'set'
|
|
6065
6069
|
};
|
|
6066
6070
|
|
|
6067
6071
|
// {@link https://docs.commercetools.com/api/projects/types#referencetype}
|
|
@@ -7882,7 +7886,7 @@ function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
7882
7886
|
const existingAttributeTypes = ['text', 'ltext'];
|
|
7883
7887
|
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
7884
7888
|
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
7885
|
-
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];
|
|
7889
|
+
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];
|
|
7886
7890
|
const getFieldName = (parentName, fieldName) => {
|
|
7887
7891
|
if (!parentName) return fieldName;
|
|
7888
7892
|
return `${parentName}.${fieldName}`;
|
|
@@ -7939,7 +7943,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
7939
7943
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
7940
7944
|
const isTouched = Boolean(formik.getIn(touched, fieldName));
|
|
7941
7945
|
const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
|
|
7942
|
-
const isSet = fieldDefinition.type.name === 'set';
|
|
7943
7946
|
const shouldUseAdditionalInfoProp = _includesInstanceProperty__default["default"](_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
|
|
7944
7947
|
const shouldDisplayFallbackRow = isTailoringFallbackEnabled && !shouldUseAdditionalInfoProp && _includesInstanceProperty__default["default"](ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
|
|
7945
7948
|
const fieldErrors = formik.getIn(errors, fieldName);
|
|
@@ -7967,7 +7970,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7967
7970
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
7968
7971
|
handleWarningChange: props.handleWarningChange,
|
|
7969
7972
|
renderWarnings: props.renderWarnings,
|
|
7970
|
-
additionalInfo:
|
|
7973
|
+
additionalInfo: isTailoringFallbackEnabled && shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
7971
7974
|
};
|
|
7972
7975
|
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
7973
7976
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
@@ -7992,9 +7995,11 @@ const CustomFieldsInternal = _ref => {
|
|
|
7992
7995
|
alignItems: "stretch",
|
|
7993
7996
|
children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
|
|
7994
7997
|
children: Field
|
|
7995
|
-
}) : Field, shouldDisplayFallbackRow && jsxRuntime.jsx(uiKit.Text.
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
+
}) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
7999
|
+
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
8000
|
+
tone: "tertiary",
|
|
8001
|
+
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
|
|
8002
|
+
})
|
|
7998
8003
|
}), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
|
|
7999
8004
|
isTouched: isTouched,
|
|
8000
8005
|
errors: fieldErrors
|
|
@@ -9712,7 +9717,7 @@ function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueO
|
|
|
9712
9717
|
var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9713
9718
|
const customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'transaction',
|
|
9714
9719
|
// transactions on payment entity
|
|
9715
|
-
'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review'];
|
|
9720
|
+
'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'recurring-order'];
|
|
9716
9721
|
let CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
9717
9722
|
function CustomFieldDefinitionsConnector() {
|
|
9718
9723
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
@@ -9857,7 +9862,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
9857
9862
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9858
9863
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
9859
9864
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, 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: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, 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: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9860
|
-
const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction'];
|
|
9865
|
+
const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction', 'recurring-order'];
|
|
9861
9866
|
const emptyTypeDefinitions = {
|
|
9862
9867
|
total: 0,
|
|
9863
9868
|
count: 0,
|
|
@@ -13821,6 +13826,11 @@ function slugify(text) {
|
|
|
13821
13826
|
.replace(/-+$/, ''); // Trim - from end of text
|
|
13822
13827
|
}
|
|
13823
13828
|
|
|
13829
|
+
const contextProjects = ['context-medium-data-playground', 'context-demo-data-project-1', 'context-demo-data-project-10', 'context-demo-data-project-11', 'context-demo-data-project-12', 'context-demo-data-project-8', 'context-demo-data-project-13', 'context-demo-data-project-9', 'context-demo-data-project-14', 'context-demo-data-project-15', 'context-big-data-playground', 'context-without-stores', 'context-playground', 'context-small-data-playground'];
|
|
13830
|
+
const isStoreDataFenceProductSelection = projectKey => {
|
|
13831
|
+
return _includesInstanceProperty__default["default"](contextProjects).call(contextProjects, projectKey);
|
|
13832
|
+
};
|
|
13833
|
+
|
|
13824
13834
|
function swapArrayItems(array, from, to) {
|
|
13825
13835
|
const result = [...array];
|
|
13826
13836
|
result[to] = array[from];
|
|
@@ -14027,6 +14037,7 @@ exports.injectToggleState = injectModalState$1;
|
|
|
14027
14037
|
exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
|
|
14028
14038
|
exports.isEmpty = isEmptyFilter;
|
|
14029
14039
|
exports.isEmptyValue = isEmptyValue;
|
|
14040
|
+
exports.isStoreDataFenceProductSelection = isStoreDataFenceProductSelection;
|
|
14030
14041
|
exports.isUUID = isUUID$1;
|
|
14031
14042
|
exports.isValidISODate = isValidISODate;
|
|
14032
14043
|
exports.isValidISODateTime = isValidISODateTime;
|
|
@@ -4770,12 +4770,15 @@ function getDiscountValue(price) {
|
|
|
4770
4770
|
});
|
|
4771
4771
|
}
|
|
4772
4772
|
function getSelectedPrice(price) {
|
|
4773
|
-
|
|
4773
|
+
let isCartDiscountBestDealDiscountType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4774
|
+
return isCartDiscountBestDealDiscountType ? price : price.discounted ?? price;
|
|
4774
4775
|
}
|
|
4775
4776
|
function getNetUnitPrice(_ref) {
|
|
4776
4777
|
let lineItem = _ref.lineItem,
|
|
4777
|
-
shouldRoundAmount = _ref.shouldRoundAmount
|
|
4778
|
-
|
|
4778
|
+
shouldRoundAmount = _ref.shouldRoundAmount,
|
|
4779
|
+
_ref$isCartDiscountBe = _ref.isCartDiscountBestDealDiscountType,
|
|
4780
|
+
isCartDiscountBestDealDiscountType = _ref$isCartDiscountBe === void 0 ? false : _ref$isCartDiscountBe;
|
|
4781
|
+
const price = getSelectedPrice(lineItem.price, isCartDiscountBestDealDiscountType);
|
|
4779
4782
|
const filteredPerMethodTaxRate = lineItem?.perMethodTaxRate?.filter(perMethodTax => lineItem?.shippingDetails?.targets?.findIndex(target => target?.shippingMethodKey === perMethodTax?.shippingMethodKey) >= 0);
|
|
4780
4783
|
|
|
4781
4784
|
// when shipping mode is multi with the same tax rate
|
|
@@ -6060,7 +6063,8 @@ const CUSTOM_FIELD_TYPES = {
|
|
|
6060
6063
|
time: 'time',
|
|
6061
6064
|
datetime: 'datetime',
|
|
6062
6065
|
date: 'date',
|
|
6063
|
-
nested: 'nested'
|
|
6066
|
+
nested: 'nested',
|
|
6067
|
+
set: 'set'
|
|
6064
6068
|
};
|
|
6065
6069
|
|
|
6066
6070
|
// {@link https://docs.commercetools.com/api/projects/types#referencetype}
|
|
@@ -7871,7 +7875,7 @@ function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
7871
7875
|
const existingAttributeTypes = ['text', 'ltext'];
|
|
7872
7876
|
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
7873
7877
|
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
7874
|
-
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];
|
|
7878
|
+
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];
|
|
7875
7879
|
const getFieldName = (parentName, fieldName) => {
|
|
7876
7880
|
if (!parentName) return fieldName;
|
|
7877
7881
|
return `${parentName}.${fieldName}`;
|
|
@@ -7928,7 +7932,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
7928
7932
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
7929
7933
|
const isTouched = Boolean(formik.getIn(touched, fieldName));
|
|
7930
7934
|
const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
|
|
7931
|
-
const isSet = fieldDefinition.type.name === 'set';
|
|
7932
7935
|
const shouldUseAdditionalInfoProp = _includesInstanceProperty__default["default"](_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
|
|
7933
7936
|
const shouldDisplayFallbackRow = isTailoringFallbackEnabled && !shouldUseAdditionalInfoProp && _includesInstanceProperty__default["default"](ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
|
|
7934
7937
|
const fieldErrors = formik.getIn(errors, fieldName);
|
|
@@ -7956,7 +7959,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7956
7959
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
7957
7960
|
handleWarningChange: props.handleWarningChange,
|
|
7958
7961
|
renderWarnings: props.renderWarnings,
|
|
7959
|
-
additionalInfo:
|
|
7962
|
+
additionalInfo: isTailoringFallbackEnabled && shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
7960
7963
|
};
|
|
7961
7964
|
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
7962
7965
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
@@ -7981,9 +7984,11 @@ const CustomFieldsInternal = _ref => {
|
|
|
7981
7984
|
alignItems: "stretch",
|
|
7982
7985
|
children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
|
|
7983
7986
|
children: Field
|
|
7984
|
-
}) : Field, shouldDisplayFallbackRow && jsxRuntime.jsx(uiKit.Text.
|
|
7985
|
-
|
|
7986
|
-
|
|
7987
|
+
}) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsxRuntime.jsx(uiKit.Text.Wrap, {
|
|
7988
|
+
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
7989
|
+
tone: "tertiary",
|
|
7990
|
+
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
|
|
7991
|
+
})
|
|
7987
7992
|
}), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
|
|
7988
7993
|
isTouched: isTouched,
|
|
7989
7994
|
errors: fieldErrors
|
|
@@ -9693,7 +9698,7 @@ function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueO
|
|
|
9693
9698
|
var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9694
9699
|
const customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'transaction',
|
|
9695
9700
|
// transactions on payment entity
|
|
9696
|
-
'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review'];
|
|
9701
|
+
'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'recurring-order'];
|
|
9697
9702
|
let CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
9698
9703
|
function CustomFieldDefinitionsConnector() {
|
|
9699
9704
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
@@ -9838,7 +9843,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
9838
9843
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9839
9844
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
9840
9845
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, 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: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, 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: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9841
|
-
const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction'];
|
|
9846
|
+
const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction', 'recurring-order'];
|
|
9842
9847
|
const emptyTypeDefinitions = {
|
|
9843
9848
|
total: 0,
|
|
9844
9849
|
count: 0,
|
|
@@ -13802,6 +13807,11 @@ function slugify(text) {
|
|
|
13802
13807
|
.replace(/-+$/, ''); // Trim - from end of text
|
|
13803
13808
|
}
|
|
13804
13809
|
|
|
13810
|
+
const contextProjects = ['context-medium-data-playground', 'context-demo-data-project-1', 'context-demo-data-project-10', 'context-demo-data-project-11', 'context-demo-data-project-12', 'context-demo-data-project-8', 'context-demo-data-project-13', 'context-demo-data-project-9', 'context-demo-data-project-14', 'context-demo-data-project-15', 'context-big-data-playground', 'context-without-stores', 'context-playground', 'context-small-data-playground'];
|
|
13811
|
+
const isStoreDataFenceProductSelection = projectKey => {
|
|
13812
|
+
return _includesInstanceProperty__default["default"](contextProjects).call(contextProjects, projectKey);
|
|
13813
|
+
};
|
|
13814
|
+
|
|
13805
13815
|
function swapArrayItems(array, from, to) {
|
|
13806
13816
|
const result = [...array];
|
|
13807
13817
|
result[to] = array[from];
|
|
@@ -14008,6 +14018,7 @@ exports.injectToggleState = injectModalState$1;
|
|
|
14008
14018
|
exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
|
|
14009
14019
|
exports.isEmpty = isEmptyFilter;
|
|
14010
14020
|
exports.isEmptyValue = isEmptyValue;
|
|
14021
|
+
exports.isStoreDataFenceProductSelection = isStoreDataFenceProductSelection;
|
|
14011
14022
|
exports.isUUID = isUUID$1;
|
|
14012
14023
|
exports.isValidISODate = isValidISODate;
|
|
14013
14024
|
exports.isValidISODateTime = isValidISODateTime;
|
|
@@ -4671,12 +4671,15 @@ function getDiscountValue(price) {
|
|
|
4671
4671
|
});
|
|
4672
4672
|
}
|
|
4673
4673
|
function getSelectedPrice(price) {
|
|
4674
|
-
|
|
4674
|
+
let isCartDiscountBestDealDiscountType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
4675
|
+
return isCartDiscountBestDealDiscountType ? price : price.discounted ?? price;
|
|
4675
4676
|
}
|
|
4676
4677
|
function getNetUnitPrice(_ref) {
|
|
4677
4678
|
let lineItem = _ref.lineItem,
|
|
4678
|
-
shouldRoundAmount = _ref.shouldRoundAmount
|
|
4679
|
-
|
|
4679
|
+
shouldRoundAmount = _ref.shouldRoundAmount,
|
|
4680
|
+
_ref$isCartDiscountBe = _ref.isCartDiscountBestDealDiscountType,
|
|
4681
|
+
isCartDiscountBestDealDiscountType = _ref$isCartDiscountBe === void 0 ? false : _ref$isCartDiscountBe;
|
|
4682
|
+
const price = getSelectedPrice(lineItem.price, isCartDiscountBestDealDiscountType);
|
|
4680
4683
|
const filteredPerMethodTaxRate = lineItem?.perMethodTaxRate?.filter(perMethodTax => lineItem?.shippingDetails?.targets?.findIndex(target => target?.shippingMethodKey === perMethodTax?.shippingMethodKey) >= 0);
|
|
4681
4684
|
|
|
4682
4685
|
// when shipping mode is multi with the same tax rate
|
|
@@ -5961,7 +5964,8 @@ const CUSTOM_FIELD_TYPES = {
|
|
|
5961
5964
|
time: 'time',
|
|
5962
5965
|
datetime: 'datetime',
|
|
5963
5966
|
date: 'date',
|
|
5964
|
-
nested: 'nested'
|
|
5967
|
+
nested: 'nested',
|
|
5968
|
+
set: 'set'
|
|
5965
5969
|
};
|
|
5966
5970
|
|
|
5967
5971
|
// {@link https://docs.commercetools.com/api/projects/types#referencetype}
|
|
@@ -7782,7 +7786,7 @@ function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
7782
7786
|
const existingAttributeTypes = ['text', 'ltext'];
|
|
7783
7787
|
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
7784
7788
|
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
7785
|
-
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];
|
|
7789
|
+
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];
|
|
7786
7790
|
const getFieldName = (parentName, fieldName) => {
|
|
7787
7791
|
if (!parentName) return fieldName;
|
|
7788
7792
|
return `${parentName}.${fieldName}`;
|
|
@@ -7839,7 +7843,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
7839
7843
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
7840
7844
|
const isTouched = Boolean(getIn(touched, fieldName));
|
|
7841
7845
|
const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
|
|
7842
|
-
const isSet = fieldDefinition.type.name === 'set';
|
|
7843
7846
|
const shouldUseAdditionalInfoProp = _includesInstanceProperty(_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
|
|
7844
7847
|
const shouldDisplayFallbackRow = isTailoringFallbackEnabled && !shouldUseAdditionalInfoProp && _includesInstanceProperty(ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
|
|
7845
7848
|
const fieldErrors = getIn(errors, fieldName);
|
|
@@ -7867,7 +7870,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7867
7870
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
7868
7871
|
handleWarningChange: props.handleWarningChange,
|
|
7869
7872
|
renderWarnings: props.renderWarnings,
|
|
7870
|
-
additionalInfo:
|
|
7873
|
+
additionalInfo: isTailoringFallbackEnabled && shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
|
|
7871
7874
|
};
|
|
7872
7875
|
const Field = jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
7873
7876
|
// the several values inside the key are needed to make sure the field is re-rendered when those values change
|
|
@@ -7892,9 +7895,11 @@ const CustomFieldsInternal = _ref => {
|
|
|
7892
7895
|
alignItems: "stretch",
|
|
7893
7896
|
children: [WrapperComponent ? jsx(WrapperComponent, {
|
|
7894
7897
|
children: Field
|
|
7895
|
-
}) : Field, shouldDisplayFallbackRow && jsx(Text.
|
|
7896
|
-
|
|
7897
|
-
|
|
7898
|
+
}) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsx(Text.Wrap, {
|
|
7899
|
+
children: jsx(Text.Detail, {
|
|
7900
|
+
tone: "tertiary",
|
|
7901
|
+
children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
|
|
7902
|
+
})
|
|
7898
7903
|
}), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors$1, {
|
|
7899
7904
|
isTouched: isTouched,
|
|
7900
7905
|
errors: fieldErrors
|
|
@@ -9612,7 +9617,7 @@ function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueO
|
|
|
9612
9617
|
var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9613
9618
|
const customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'transaction',
|
|
9614
9619
|
// transactions on payment entity
|
|
9615
|
-
'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review'];
|
|
9620
|
+
'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'recurring-order'];
|
|
9616
9621
|
let CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
|
|
9617
9622
|
function CustomFieldDefinitionsConnector() {
|
|
9618
9623
|
_classCallCheck(this, CustomFieldDefinitionsConnector);
|
|
@@ -9757,7 +9762,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
9757
9762
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9758
9763
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
9759
9764
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, 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: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, 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: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
9760
|
-
const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction'];
|
|
9765
|
+
const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction', 'recurring-order'];
|
|
9761
9766
|
const emptyTypeDefinitions = {
|
|
9762
9767
|
total: 0,
|
|
9763
9768
|
count: 0,
|
|
@@ -13721,6 +13726,11 @@ function slugify(text) {
|
|
|
13721
13726
|
.replace(/-+$/, ''); // Trim - from end of text
|
|
13722
13727
|
}
|
|
13723
13728
|
|
|
13729
|
+
const contextProjects = ['context-medium-data-playground', 'context-demo-data-project-1', 'context-demo-data-project-10', 'context-demo-data-project-11', 'context-demo-data-project-12', 'context-demo-data-project-8', 'context-demo-data-project-13', 'context-demo-data-project-9', 'context-demo-data-project-14', 'context-demo-data-project-15', 'context-big-data-playground', 'context-without-stores', 'context-playground', 'context-small-data-playground'];
|
|
13730
|
+
const isStoreDataFenceProductSelection = projectKey => {
|
|
13731
|
+
return _includesInstanceProperty(contextProjects).call(contextProjects, projectKey);
|
|
13732
|
+
};
|
|
13733
|
+
|
|
13724
13734
|
function swapArrayItems(array, from, to) {
|
|
13725
13735
|
const result = [...array];
|
|
13726
13736
|
result[to] = array[from];
|
|
@@ -13797,4 +13807,4 @@ function withPendingRequests() {
|
|
|
13797
13807
|
|
|
13798
13808
|
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 } } } };
|
|
13799
13809
|
|
|
13800
|
-
export { booleanField as BooleanField, Button$1 as Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, 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, 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, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, 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, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, 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, 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, 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, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$N as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, 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, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, 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 };
|
|
13810
|
+
export { booleanField as BooleanField, Button$1 as Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, 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, 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, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, 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, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, 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, 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, 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, isStoreDataFenceProductSelection, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$N as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, 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, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, 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 };
|
|
@@ -102,6 +102,7 @@ import RequestCache from "./utils/request-cache/request-cache.js";
|
|
|
102
102
|
import shallowEqual from "./utils/shallow-equal/shallow-equal.js";
|
|
103
103
|
import shouldUpdateAttributeInput from "./utils/should-update-attribute-input/should-update-attribute-input.js";
|
|
104
104
|
import slugify from "./utils/slugify/slugify.js";
|
|
105
|
+
import { isStoreDataFenceProductSelection } from "./utils/store-data-fence-product-selection/index.js";
|
|
105
106
|
import swapArrayItems, { reorderArrayItems } from "./utils/swap-array-items/swap-array-items.js";
|
|
106
107
|
import { safelyAddFallback } from "./utils/text-fallback/text-fallback.js";
|
|
107
108
|
import { getTimeZoneLabel, mapTimeZonesToOptions, getTimeZoneId } from "./utils/time-zones/time-zone-utils.js";
|
|
@@ -113,4 +114,4 @@ import getIndexesOfInvalidValues from "./utils/validation/get-indexes-of-invalid
|
|
|
113
114
|
import withoutEmptyErrorsByField from "./utils/validation/without-empty-errors-by-field.js";
|
|
114
115
|
import withPendingRequests from "./utils/with-pending-requests/with-pending-requests.jsx";
|
|
115
116
|
export { QUERY_LIMIT } from "./constants/index.js";
|
|
116
|
-
export { allowedProperties, and, attributesMapToNameValuePairs, base64ToString, BooleanField, booleanMessages, buildSearchQuery, Button, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, 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, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, 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, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRoleNotificationEffect, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, };
|
|
117
|
+
export { allowedProperties, and, attributesMapToNameValuePairs, base64ToString, BooleanField, booleanMessages, buildSearchQuery, Button, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, 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, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, 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, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRoleNotificationEffect, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, isStoreDataFenceProductSelection, };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export function getPriceChannelName(price: any): any;
|
|
2
2
|
export function getDiscountValue(price: any): any;
|
|
3
|
-
export function getSelectedPrice(price: any): any;
|
|
4
|
-
export function getNetUnitPrice({ lineItem, shouldRoundAmount }: {
|
|
3
|
+
export function getSelectedPrice(price: any, isCartDiscountBestDealDiscountType?: boolean): any;
|
|
4
|
+
export function getNetUnitPrice({ lineItem, shouldRoundAmount, isCartDiscountBestDealDiscountType, }: {
|
|
5
5
|
lineItem: any;
|
|
6
6
|
shouldRoundAmount: any;
|
|
7
|
+
isCartDiscountBestDealDiscountType?: boolean | undefined;
|
|
7
8
|
}): any;
|
|
8
9
|
export function getMinimumPricesByCurrencyCode(prices: any): any[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./store-data-fence-product-selection.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function isStoreDataFenceProductSelection(projectKey: any): boolean;
|
package/dist/styles.css
CHANGED
|
@@ -590,16 +590,6 @@
|
|
|
590
590
|
.set-buttons-module__gap___38Qr0 {
|
|
591
591
|
padding: 20px;
|
|
592
592
|
}
|
|
593
|
-
/* imported from platform-limits-customer-groups-status.module.css */
|
|
594
|
-
|
|
595
|
-
.platform-limits-customer-groups-status-module__status___6099G {
|
|
596
|
-
min-width: max-content;
|
|
597
|
-
}
|
|
598
|
-
/* imported from platform-limits-customer-groups-combined.module.css */
|
|
599
|
-
|
|
600
|
-
.platform-limits-customer-groups-combined-module__combined___WjRoI {
|
|
601
|
-
margin-bottom: var(--spacing-s);
|
|
602
|
-
}
|
|
603
593
|
/* imported from platform-limits-customers-combined.module.css */
|
|
604
594
|
|
|
605
595
|
.platform-limits-customers-combined-module__combined___OszDd {
|
|
@@ -610,3 +600,13 @@
|
|
|
610
600
|
.platform-limits-customers-status-module__status___3rXYM {
|
|
611
601
|
min-width: max-content;
|
|
612
602
|
}
|
|
603
|
+
/* imported from platform-limits-customer-groups-status.module.css */
|
|
604
|
+
|
|
605
|
+
.platform-limits-customer-groups-status-module__status___6099G {
|
|
606
|
+
min-width: max-content;
|
|
607
|
+
}
|
|
608
|
+
/* imported from platform-limits-customer-groups-combined.module.css */
|
|
609
|
+
|
|
610
|
+
.platform-limits-customer-groups-combined-module__combined___WjRoI {
|
|
611
|
+
margin-bottom: var(--spacing-s);
|
|
612
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/experimental-components",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/core": "^7.22.11",
|
|
27
27
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
28
|
-
"@commercetools-frontend/actions-global": "npm:@commercetools-frontend/actions-global@^23.
|
|
29
|
-
"@commercetools-frontend/application-components": "npm:@commercetools-frontend/application-components@^23.
|
|
30
|
-
"@commercetools-frontend/application-shell": "npm:@commercetools-frontend/application-shell@^23.
|
|
31
|
-
"@commercetools-frontend/application-shell-connectors": "npm:@commercetools-frontend/application-shell-connectors@^23.
|
|
32
|
-
"@commercetools-frontend/constants": "npm:@commercetools-frontend/constants@^23.
|
|
33
|
-
"@commercetools-frontend/l10n": "npm:@commercetools-frontend/l10n@^23.
|
|
34
|
-
"@commercetools-frontend/sdk": "npm:@commercetools-frontend/sdk@^23.
|
|
35
|
-
"@commercetools-frontend/sentry": "npm:@commercetools-frontend/sentry@^23.
|
|
28
|
+
"@commercetools-frontend/actions-global": "npm:@commercetools-frontend/actions-global@^23.2.2",
|
|
29
|
+
"@commercetools-frontend/application-components": "npm:@commercetools-frontend/application-components@^23.2.2",
|
|
30
|
+
"@commercetools-frontend/application-shell": "npm:@commercetools-frontend/application-shell@^23.2.2",
|
|
31
|
+
"@commercetools-frontend/application-shell-connectors": "npm:@commercetools-frontend/application-shell-connectors@^23.2.2",
|
|
32
|
+
"@commercetools-frontend/constants": "npm:@commercetools-frontend/constants@^23.2.2",
|
|
33
|
+
"@commercetools-frontend/l10n": "npm:@commercetools-frontend/l10n@^23.2.2",
|
|
34
|
+
"@commercetools-frontend/sdk": "npm:@commercetools-frontend/sdk@^23.2.2",
|
|
35
|
+
"@commercetools-frontend/sentry": "npm:@commercetools-frontend/sentry@^23.2.2",
|
|
36
36
|
"@commercetools-frontend/ui-kit": "npm:@commercetools-frontend/ui-kit@^19.22.7",
|
|
37
37
|
"@commercetools-uikit/design-system": "npm:@commercetools-uikit/design-system@^19.22.7",
|
|
38
38
|
"@commercetools-uikit/select-utils": "npm:@commercetools-uikit/select-utils@^19.22.7",
|
|
@@ -60,13 +60,14 @@
|
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@apollo/client": "3.7.10",
|
|
63
|
-
"@commercetools-test-data/channel": "10.
|
|
64
|
-
"@commercetools-test-data/commons": "10.
|
|
65
|
-
"@commercetools-test-data/core": "10.
|
|
66
|
-
"@commercetools-test-data/product-selection": "10.
|
|
67
|
-
"@commercetools-test-data/store": "10.
|
|
63
|
+
"@commercetools-test-data/channel": "10.14.2",
|
|
64
|
+
"@commercetools-test-data/commons": "10.14.2",
|
|
65
|
+
"@commercetools-test-data/core": "10.14.2",
|
|
66
|
+
"@commercetools-test-data/product-selection": "10.14.2",
|
|
67
|
+
"@commercetools-test-data/store": "10.14.2",
|
|
68
68
|
"@testing-library/react": "12.1.5",
|
|
69
69
|
"@testing-library/react-hooks": "8.0.1",
|
|
70
|
+
"@types/debounce-promise": "3.1.9",
|
|
70
71
|
"@types/react": "17.0.83",
|
|
71
72
|
"formik": "2.4.6",
|
|
72
73
|
"graphql": "16.10.0",
|