@commercetools-frontend/experimental-components 5.3.1 → 5.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1683,7 +1683,7 @@ function formatMoneyRangeValue(value, intl) {
1683
1683
  return '';
1684
1684
  }
1685
1685
  function formatMoneyValue(amount, currency, intl) {
1686
- return formatMoney$1(_objectSpread$1l({
1686
+ return formatMoney$2(_objectSpread$1l({
1687
1687
  centAmount: amount,
1688
1688
  fractionDigits: getFractionDigit(currency)
1689
1689
  }, currency ? {
@@ -1698,7 +1698,7 @@ function getFractionedAmount(moneyValue) {
1698
1698
  const amount = moneyValue.type === PRECISION_TYPES.highPrecision ? moneyValue.preciseAmount : moneyValue.centAmount;
1699
1699
  return amount / 10 ** fractionDigits;
1700
1700
  }
1701
- function formatMoney$1(moneyValue, intl, options) {
1701
+ function formatMoney$2(moneyValue, intl, options) {
1702
1702
  var _moneyValue$fractione;
1703
1703
  return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1l({
1704
1704
  style: 'currency',
@@ -1749,10 +1749,10 @@ const formatLtext = _ref3 => {
1749
1749
  locale: language
1750
1750
  });
1751
1751
  };
1752
- const formatMoney = _ref4 => {
1752
+ const formatMoney$1 = _ref4 => {
1753
1753
  let value = _ref4.value,
1754
1754
  intl = _ref4.intl;
1755
- return formatMoney$1(value, intl);
1755
+ return formatMoney$2(value, intl);
1756
1756
  };
1757
1757
  const formatReference = _ref5 => {
1758
1758
  let value = _ref5.value;
@@ -1842,7 +1842,7 @@ const doNotFormat = _ref13 => {
1842
1842
  let value = _ref13.value;
1843
1843
  return value;
1844
1844
  };
1845
- const getFormatter = type => isNil__default["default"](type) ? formatNilType : type.name === 'nested' ? formatNested : type.name === 'set' ? formatSet : type.name === 'enum' ? formatEnum : type.name === 'lenum' ? formatLenum : type.name === 'ltext' ? formatLtext : type.name === 'money' ? formatMoney : type.name === 'reference' ? formatReference : type.name === 'date' ? formatDate : type.name === 'time' ? doNotFormat : type.name === 'datetime' ? formatDateTime : type.name === 'boolean' ? formatBoolean : type.name === 'text' ? doNotFormat : type.name === 'number' ? doNotFormat : formatUnknown;
1845
+ const getFormatter = type => isNil__default["default"](type) ? formatNilType : type.name === 'nested' ? formatNested : type.name === 'set' ? formatSet : type.name === 'enum' ? formatEnum : type.name === 'lenum' ? formatLenum : type.name === 'ltext' ? formatLtext : type.name === 'money' ? formatMoney$1 : type.name === 'reference' ? formatReference : type.name === 'date' ? formatDate : type.name === 'time' ? doNotFormat : type.name === 'datetime' ? formatDateTime : type.name === 'boolean' ? formatBoolean : type.name === 'text' ? doNotFormat : type.name === 'number' ? doNotFormat : formatUnknown;
1846
1846
  function formatAttribute(_ref14) {
1847
1847
  let type = _ref14.type,
1848
1848
  value = _ref14.value,
@@ -4332,12 +4332,38 @@ const createAttributeTypeValue = attribute => {
4332
4332
  return attribute.type;
4333
4333
  }
4334
4334
  };
4335
+
4336
+ /*
4337
+ * Fixed price supports high precision. Action format is nested with the
4338
+ * the type of the money. Absolute discount only works with cent precision,
4339
+ * hence the action structure is flat.
4340
+ */
4341
+ const formatMoney = valueType => money => {
4342
+ if (valueType === 'fixed') {
4343
+ return {
4344
+ [money.type]: _objectSpread$10({
4345
+ centAmount: money.centAmount,
4346
+ currencyCode: money.currencyCode
4347
+ }, money.type === PRECISION_TYPES.highPrecision && {
4348
+ preciseAmount: money.preciseAmount,
4349
+ fractionDigits: money.fractionDigits
4350
+ })
4351
+ };
4352
+ } else if (valueType === 'absolute') {
4353
+ return {
4354
+ centAmount: money.centAmount,
4355
+ currencyCode: money.currencyCode
4356
+ };
4357
+ } else {
4358
+ throw new Error('Unexpected value type for money.');
4359
+ }
4360
+ };
4361
+
4335
4362
  /**
4336
4363
  * converts the `changeValue` action to GraphQL actions variable
4337
4364
  * @param {Object} actionPayload
4338
4365
  */
4339
4366
  const convertChangeValueAction = actionPayload => {
4340
- var _context2;
4341
4367
  const valueType = actionPayload.value.type;
4342
4368
  const possibleTypeKeys = {
4343
4369
  relative: ['permyriad'],
@@ -4346,7 +4372,11 @@ const convertChangeValueAction = actionPayload => {
4346
4372
  giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
4347
4373
  };
4348
4374
  const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
4349
- if (filteredValue.money) filteredValue.money = _mapInstanceProperty__default["default"](_context2 = filteredValue.money).call(_context2, valueItem => omit__default["default"](valueItem, '__typename'));
4375
+ if (filteredValue.money) {
4376
+ var _context2;
4377
+ const moneyFormatter = formatMoney(valueType);
4378
+ filteredValue.money = _mapInstanceProperty__default["default"](_context2 = filteredValue.money).call(_context2, moneyFormatter);
4379
+ }
4350
4380
  return {
4351
4381
  changeValue: {
4352
4382
  value: {
@@ -4355,6 +4385,7 @@ const convertChangeValueAction = actionPayload => {
4355
4385
  }
4356
4386
  };
4357
4387
  };
4388
+
4358
4389
  /**
4359
4390
  * This function changes any payload after the actions have been computed.
4360
4391
  * Currently we only need to change the `setCustomField` action payload
@@ -7208,6 +7239,13 @@ function CustomInputSet(props) {
7208
7239
  children: jsxRuntime.jsx(formik.Field, {
7209
7240
  name: props.name,
7210
7241
  validate: values => {
7242
+ // This validate function overrides the one found in CustomFieldInternal ,
7243
+ // so we need to check if the field is required here.
7244
+ if (props.fieldDefinition.required && isNil__default["default"](dropEmptyEntries(values))) {
7245
+ return {
7246
+ missing: true
7247
+ };
7248
+ }
7211
7249
  const errors = getDuplicateErrors(values);
7212
7250
  return errors.length > 0 ? errors : undefined;
7213
7251
  },
@@ -7585,10 +7623,12 @@ const CustomFieldsInternal = props => {
7585
7623
  return jsxRuntime.jsx(formik.FastField, {
7586
7624
  name: fieldName,
7587
7625
  validate: validate,
7588
- children: () => {
7589
- var _context3;
7590
- return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
7591
- scale: "xs",
7626
+ children: () => jsxRuntime.jsx(uiKit.Spacings.Stack, {
7627
+ scale: "xs",
7628
+ children: jsxRuntime.jsxs("div", {
7629
+ "aria-invalid": _Object$keys__default["default"](fieldErrors !== null && fieldErrors !== void 0 ? fieldErrors : {}).length > 0,
7630
+ "aria-errormessage": "".concat(fieldName, "-error"),
7631
+ id: "".concat(fieldName, "-error"),
7592
7632
  children: [jsxRuntime.jsx(CustomFieldsLabel, {
7593
7633
  name: fieldName,
7594
7634
  fieldDefinition: fieldDefinition
@@ -7603,26 +7643,22 @@ const CustomFieldsInternal = props => {
7603
7643
  isReadOnly: props.isReadOnly,
7604
7644
  onBlur: handleBlur,
7605
7645
  setFieldValue: props.setFieldValue
7606
- }) : jsxRuntime.jsx("div", {
7607
- "aria-invalid": _Object$keys__default["default"](fieldErrors !== null && fieldErrors !== void 0 ? fieldErrors : {}).length > 0,
7608
- "aria-errormessage": "".concat(fieldName, "-error"),
7609
- children: jsxRuntime.jsx(CustomFieldInput, {
7610
- name: fieldName,
7611
- value: value,
7612
- fieldDefinition: fieldDefinition,
7613
- isDisabled: props.isDisabled,
7614
- isReadOnly: props.isReadOnly,
7615
- onBlur: handleBlur,
7616
- setFieldValue: props.setFieldValue,
7617
- hasError: hasError
7618
- })
7619
- }, _concatInstanceProperty__default["default"](_context3 = "".concat(fieldName, "-")).call(_context3, index)), jsxRuntime.jsx(CustomFieldErrors, {
7646
+ }) : jsxRuntime.jsx(CustomFieldInput, {
7647
+ name: fieldName,
7648
+ value: value,
7649
+ fieldDefinition: fieldDefinition,
7650
+ isDisabled: props.isDisabled,
7651
+ isReadOnly: props.isReadOnly,
7652
+ onBlur: handleBlur,
7653
+ setFieldValue: props.setFieldValue,
7654
+ hasError: hasError
7655
+ }), jsxRuntime.jsx(CustomFieldErrors, {
7620
7656
  isTouched: isTouched,
7621
7657
  errors: fieldErrors
7622
7658
  })]
7623
7659
  })]
7624
- });
7625
- }
7660
+ })
7661
+ })
7626
7662
  }, _concatInstanceProperty__default["default"](_context2 = "".concat(fieldName, "-")).call(_context2, index));
7627
7663
  })
7628
7664
  });
@@ -8967,7 +9003,7 @@ function formatDiscount(discount, currencyCode, intl) {
8967
9003
  if (discount.type === 'relative') return "".concat(discount.permyriad / 100, "%");
8968
9004
  if (!discount.money) return null;
8969
9005
  const moneyForCurrencyCode = _findInstanceProperty__default["default"](_context = discount.money).call(_context, discountMoney => discountMoney.currencyCode === currencyCode);
8970
- return moneyForCurrencyCode ? formatMoney$1(moneyForCurrencyCode, intl) : null;
9006
+ return moneyForCurrencyCode ? formatMoney$2(moneyForCurrencyCode, intl) : null;
8971
9007
  }
8972
9008
 
8973
9009
  function formatPercentage(percentage) {
@@ -11296,6 +11332,10 @@ const ScrollToFieldError = () => {
11296
11332
  const formik$1 = formik.useFormikContext();
11297
11333
  const isValid = formik$1.isValid,
11298
11334
  submitCount = formik$1.submitCount;
11335
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
11336
+ dataLocale: applicationContext.dataLocale
11337
+ })),
11338
+ dataLocale = _useApplicationContex.dataLocale;
11299
11339
  React.useEffect(() => {
11300
11340
  // Do not run the effect if the form hasn't been submitted yet.
11301
11341
  if (submitCount === 0) return;
@@ -11303,17 +11343,23 @@ const ScrollToFieldError = () => {
11303
11343
  if (isValid) return;
11304
11344
  const firstErrorElement = document.querySelector('[aria-invalid="true"]');
11305
11345
  if (firstErrorElement) {
11306
- var _ref, _document$querySelect, _elementToScrollTo$sc;
11346
+ var _ref, _ref2, _document$querySelect, _elementToScrollTo$sc;
11307
11347
  // Get a reference to the label.
11308
- const id = firstErrorElement.getAttribute('id');
11348
+ const firstElementId = firstErrorElement.getAttribute('id');
11349
+ const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, ".".concat(dataLocale));
11350
+
11351
+ // check if locale is appended then remove it from id
11352
+ const id = localizedInputIndex > -1 ? firstElementId.replace(".".concat(dataLocale), '') : firstElementId;
11309
11353
 
11310
11354
  // Scroll to the label (if found), otherwise to the input element itself.
11311
- const elementToScrollTo = (_ref = (_document$querySelect = document.querySelector("label[for=\"".concat(id, "\"]"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("label#".concat(id))) !== null && _ref !== void 0 ? _ref : firstErrorElement;
11355
+
11356
+ const elementToScrollTo = // div is used only for custom fields
11357
+ (_ref = (_ref2 = (_document$querySelect = document.querySelector("div[aria-errormessage=\"".concat(firstElementId, "\"]"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("label[for=\"".concat(id, "\"]"))) !== null && _ref2 !== void 0 ? _ref2 : document.querySelector("label#".concat(id))) !== null && _ref !== void 0 ? _ref : firstErrorElement;
11312
11358
  (_elementToScrollTo$sc = elementToScrollTo.scrollIntoView) === null || _elementToScrollTo$sc === void 0 || _elementToScrollTo$sc.call(elementToScrollTo, {
11313
11359
  behavior: 'smooth'
11314
11360
  });
11315
11361
  }
11316
- }, [isValid, submitCount]);
11362
+ }, [dataLocale, isValid, submitCount]);
11317
11363
  return null;
11318
11364
  };
11319
11365
 
@@ -12607,7 +12653,7 @@ const computedProperties = {
12607
12653
  intl = _ref4.intl;
12608
12654
  const allVariants = _concatInstanceProperty__default["default"](_context2 = product.variants).call(_context2, product.masterVariant);
12609
12655
  const variantPrices = flatMap__default["default"](allVariants, variant => variant.prices);
12610
- return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$1(price, intl)).join(', ') || constants.NO_VALUE_FALLBACK;
12656
+ return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$2(price, intl)).join(', ') || constants.NO_VALUE_FALLBACK;
12611
12657
  },
12612
12658
  sku(_ref5) {
12613
12659
  var _context4, _context5;
@@ -12912,13 +12958,18 @@ var messages = reactIntl.defineMessages({
12912
12958
  id: 'CustomTypesSubform.typesPlaceholder',
12913
12959
  description: 'The placeholder for the types',
12914
12960
  defaultMessage: 'Select...'
12961
+ },
12962
+ noInputValues: {
12963
+ id: 'CustomTypesSubform.noInputValues',
12964
+ description: 'The label when there are no input values defined for the custom fields.',
12965
+ defaultMessage: 'There are no input values defined for the custom fields.'
12915
12966
  }
12916
12967
  });
12917
12968
 
12918
12969
  const FIELD_NAME = 'custom';
12919
12970
 
12920
12971
  function ownKeys$2(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
12921
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$2(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
12972
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$2(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$2(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
12922
12973
  const typeDefinitionsExist = typeDefinitions => {
12923
12974
  return typeDefinitions.length > 0;
12924
12975
  };
@@ -12929,9 +12980,18 @@ const typeDefinitionSelected = formValues => {
12929
12980
  const typeDefinitionContainsFieldDefinitions = formValues => {
12930
12981
  return formValues[FIELD_NAME].type.obj.key && formValues[FIELD_NAME].type.obj.fieldDefinitions.length > 0;
12931
12982
  };
12932
- const CustomFieldsInputWrapper = _ref => {
12933
- let typeDefinitions = _ref.typeDefinitions,
12934
- isReadOnly = _ref.isReadOnly;
12983
+ const fieldDefinitionsWithValues = formValues => {
12984
+ var _context;
12985
+ const fieldValues = formValues[FIELD_NAME].fields;
12986
+ return _filterInstanceProperty__default["default"](_context = formValues[FIELD_NAME].type.obj.fieldDefinitions).call(_context, _ref => {
12987
+ let name = _ref.name;
12988
+ return fieldValues[name] !== undefined;
12989
+ });
12990
+ };
12991
+ const CustomFieldsInputWrapper = _ref2 => {
12992
+ let typeDefinitions = _ref2.typeDefinitions,
12993
+ isReadOnly = _ref2.isReadOnly,
12994
+ hideEmptyFields = _ref2.hideEmptyFields;
12935
12995
  const _useFormikContext = formik.useFormikContext(),
12936
12996
  formValues = _valuesInstanceProperty__default["default"](_useFormikContext);
12937
12997
  if (!typeDefinitionsExist(typeDefinitions)) {
@@ -12943,12 +13003,15 @@ const CustomFieldsInputWrapper = _ref => {
12943
13003
  if (!typeDefinitionContainsFieldDefinitions(formValues)) {
12944
13004
  return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noCustomFields));
12945
13005
  }
13006
+ if (fieldDefinitionsWithValues(formValues).length === 0 && isReadOnly && hideEmptyFields) {
13007
+ return jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$2({}, messages.noInputValues));
13008
+ }
12946
13009
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
12947
13010
  max: "scale",
12948
13011
  children: jsxRuntime.jsx(CustomFields, {
12949
13012
  isReadOnly: isReadOnly,
12950
13013
  name: "".concat(FIELD_NAME, ".fields"),
12951
- fieldDefinitions: formValues[FIELD_NAME].type.obj.fieldDefinitions
13014
+ fieldDefinitions: isReadOnly && hideEmptyFields ? fieldDefinitionsWithValues(formValues) : formValues[FIELD_NAME].type.obj.fieldDefinitions
12952
13015
  })
12953
13016
  });
12954
13017
  };
@@ -12982,10 +13045,11 @@ const createFormStateFromTypeDefinition = selectedTypeDefinition => {
12982
13045
  };
12983
13046
  };
12984
13047
  const CustomTypeSubform = _ref => {
12985
- var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
13048
+ var _formValues$FIELD_NAM3, _formValues$FIELD_NAM4;
12986
13049
  let typeDefinitions = _ref.typeDefinitions,
12987
13050
  isReadOnly = _ref.isReadOnly,
12988
- isCondensed = _ref.isCondensed;
13051
+ isCondensed = _ref.isCondensed,
13052
+ hideEmptyFields = _ref.hideEmptyFields;
12989
13053
  const _useFormikContext = formik.useFormikContext(),
12990
13054
  formValues = _valuesInstanceProperty__default["default"](_useFormikContext),
12991
13055
  setFieldValue = _useFormikContext.setFieldValue,
@@ -13012,6 +13076,13 @@ const CustomTypeSubform = _ref => {
13012
13076
  });
13013
13077
  }
13014
13078
  }, [typeDefinitions, setFieldValue, validateForm]);
13079
+ const typeDefinitionSelected = formValues => {
13080
+ var _formValues$FIELD_NAM, _formValues$FIELD_NAM2;
13081
+ return ((_formValues$FIELD_NAM = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM === void 0 ? void 0 : _formValues$FIELD_NAM.type) && ((_formValues$FIELD_NAM2 = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM2 === void 0 || (_formValues$FIELD_NAM2 = _formValues$FIELD_NAM2.type) === null || _formValues$FIELD_NAM2 === void 0 ? void 0 : _formValues$FIELD_NAM2.obj);
13082
+ };
13083
+
13084
+ // if the user has read-only permissions, empty fields are hidden, and no type definition is selected, hide the component
13085
+ if (isReadOnly && hideEmptyFields && !typeDefinitionSelected(formValues)) return null;
13015
13086
  return jsxRuntime.jsx(uiKit.CollapsiblePanel, {
13016
13087
  header: jsxRuntime.jsx(uiKit.CollapsiblePanel.Header, {
13017
13088
  isCondensed: isCondensed,
@@ -13023,8 +13094,8 @@ const CustomTypeSubform = _ref => {
13023
13094
  isClearable: true,
13024
13095
  "data-testid": "custom-type-select",
13025
13096
  name: "".concat(FIELD_NAME, ".type.obj.key"),
13026
- options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, (_formValues$FIELD_NAM = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM === void 0 || (_formValues$FIELD_NAM = _formValues$FIELD_NAM.type) === null || _formValues$FIELD_NAM === void 0 ? void 0 : _formValues$FIELD_NAM.id),
13027
- value: (_formValues$FIELD_NAM2 = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM2 === void 0 || (_formValues$FIELD_NAM2 = _formValues$FIELD_NAM2.type) === null || _formValues$FIELD_NAM2 === void 0 || (_formValues$FIELD_NAM2 = _formValues$FIELD_NAM2.obj) === null || _formValues$FIELD_NAM2 === void 0 ? void 0 : _formValues$FIELD_NAM2.key,
13097
+ options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, (_formValues$FIELD_NAM3 = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM3 === void 0 || (_formValues$FIELD_NAM3 = _formValues$FIELD_NAM3.type) === null || _formValues$FIELD_NAM3 === void 0 ? void 0 : _formValues$FIELD_NAM3.id),
13098
+ value: (_formValues$FIELD_NAM4 = formValues[FIELD_NAME]) === null || _formValues$FIELD_NAM4 === void 0 || (_formValues$FIELD_NAM4 = _formValues$FIELD_NAM4.type) === null || _formValues$FIELD_NAM4 === void 0 || (_formValues$FIELD_NAM4 = _formValues$FIELD_NAM4.obj) === null || _formValues$FIELD_NAM4 === void 0 ? void 0 : _formValues$FIELD_NAM4.key,
13028
13099
  onChange: handleTypeDefinitionSelect,
13029
13100
  placeholder: formatMessage(messages.typesPlaceholder),
13030
13101
  isReadOnly: isReadOnly
@@ -13033,7 +13104,8 @@ const CustomTypeSubform = _ref => {
13033
13104
  headerControlsAlignment: "right",
13034
13105
  children: jsxRuntime.jsx(CustomFieldsInputWrapper, {
13035
13106
  typeDefinitions: typeDefinitions,
13036
- isReadOnly: isReadOnly
13107
+ isReadOnly: isReadOnly,
13108
+ hideEmptyFields: hideEmptyFields
13037
13109
  })
13038
13110
  });
13039
13111
  };
@@ -13129,7 +13201,8 @@ const createGraphQlDocFromFormState = formState => {
13129
13201
  const CustomFieldsFormField = _ref => {
13130
13202
  let resources = _ref.resources,
13131
13203
  isReadOnly = _ref.isReadOnly,
13132
- isCondensed = _ref.isCondensed;
13204
+ isCondensed = _ref.isCondensed,
13205
+ hideEmptyFields = _ref.hideEmptyFields;
13133
13206
  const projectKey = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.project.key);
13134
13207
  return jsxRuntime.jsx(CustomFieldTypeDefinitionsConnector$1, {
13135
13208
  resources: resources,
@@ -13146,7 +13219,8 @@ const CustomFieldsFormField = _ref => {
13146
13219
  return jsxRuntime.jsx(CustomTypeSubform, {
13147
13220
  typeDefinitions: typeDefinitions,
13148
13221
  isReadOnly: isReadOnly,
13149
- isCondensed: isCondensed
13222
+ isCondensed: isCondensed,
13223
+ hideEmptyFields: hideEmptyFields
13150
13224
  });
13151
13225
  }
13152
13226
  });
@@ -13233,7 +13307,7 @@ exports.formatCustomerName = formatCustomerName;
13233
13307
  exports.formatDateRangeValue = formatDateRangeValue;
13234
13308
  exports.formatDateTime = formatDateTime$1;
13235
13309
  exports.formatDiscount = formatDiscount;
13236
- exports.formatMoney = formatMoney$1;
13310
+ exports.formatMoney = formatMoney$2;
13237
13311
  exports.formatMoneyRangeValue = formatMoneyRangeValue;
13238
13312
  exports.formatMoneyValue = formatMoneyValue;
13239
13313
  exports.formatPercentage = formatPercentage;