fireberry-api-client 1.0.2-beta.2.3 → 1.0.2-beta.2.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.
@@ -447,6 +447,21 @@ var OBJECT_TYPE_OVERRIDES = {
447
447
  excludedIdFields: ["ownerid"]
448
448
  }
449
449
  };
450
+ function isLabelOnlyField(fieldName, allFieldNames, objectType) {
451
+ for (const otherField of allFieldNames) {
452
+ if (otherField === fieldName) continue;
453
+ const labelField = getLabelFieldForField(otherField, objectType);
454
+ if (labelField === fieldName) {
455
+ return true;
456
+ }
457
+ }
458
+ return false;
459
+ }
460
+ function filterLabelOnlyFields(fieldNames, objectType) {
461
+ return fieldNames.filter(
462
+ (fieldName) => !isLabelOnlyField(fieldName, fieldNames, objectType)
463
+ );
464
+ }
450
465
  function getLabelFieldForField(fieldName, objectType) {
451
466
  if (SPECIAL_LABEL_FIELD_MAPPINGS[fieldName]) {
452
467
  return SPECIAL_LABEL_FIELD_MAPPINGS[fieldName];
@@ -2142,6 +2157,7 @@ exports.deepClone = deepClone;
2142
2157
  exports.erdBuilder = erdBuilder;
2143
2158
  exports.escapeQueryValue = escapeQueryValue;
2144
2159
  exports.expandRelatedFields = expandRelatedFields;
2160
+ exports.filterLabelOnlyFields = filterLabelOnlyFields;
2145
2161
  exports.generateFireberryERD = generateFireberryERD;
2146
2162
  exports.generateSchema = generateSchema;
2147
2163
  exports.getCodeFieldFromLabel = getCodeFieldFromLabel;
@@ -2162,6 +2178,7 @@ exports.isDropdownField = isDropdownField;
2162
2178
  exports.isDropdownFieldByMetadata = isDropdownFieldByMetadata;
2163
2179
  exports.isDropdownOrLookupField = isDropdownOrLookupField;
2164
2180
  exports.isExcludedFromStarQuery = isExcludedFromStarQuery;
2181
+ exports.isLabelOnlyField = isLabelOnlyField;
2165
2182
  exports.isLookupField = isLookupField;
2166
2183
  exports.isNumericField = isNumericField;
2167
2184
  exports.isPlainObject = isPlainObject;