2026-10-13 12:43:34 +00:00
|
|
|
// Module ID: 18439
|
|
|
|
|
// Function ID: 18440
|
2026-09-10 05:38:07 +00:00
|
|
|
// Name: RoleConnectionRequirementUtils
|
2026-10-12 06:59:38 +00:00
|
|
|
// Dependencies: [6877, 2]
|
2026-07-28 08:39:19 +00:00
|
|
|
// Exports: displayedValueFor, minDisplayedValueFor, realizedOperatorFor, storedValueFor
|
|
|
|
|
|
2026-10-13 12:43:34 +00:00
|
|
|
// Module 18439 (RoleConnectionRequirementUtils)
|
2026-10-12 06:59:38 +00:00
|
|
|
import Constants from "Constants" /* 6877 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-07-28 08:39:19 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const OperatorTypes = Constants.OperatorTypes;
|
|
|
|
|
const result = size.fileFinishedImporting("modules/connections/RoleConnectionRequirementUtils.tsx");
|
2026-07-28 08:39:19 +00:00
|
|
|
|
|
|
|
|
export const realizedOperatorFor = function realizedOperatorFor(operator) {
|
|
|
|
|
let GREATER_THAN = operator;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (operator == null) {
|
2026-07-28 08:39:19 +00:00
|
|
|
GREATER_THAN = OperatorTypes.GREATER_THAN;
|
|
|
|
|
}
|
|
|
|
|
return GREATER_THAN;
|
|
|
|
|
};
|
|
|
|
|
export const displayedValueFor = function displayedValueFor(value, realizedOperatorForResult) {
|
2026-07-29 08:29:29 +00:00
|
|
|
let num = value;
|
2026-10-03 08:58:59 +00:00
|
|
|
const _Math = Math;
|
|
|
|
|
const _Number = Number;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (value == null) {
|
|
|
|
|
num = 0;
|
2026-07-28 08:39:19 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
const roundResult = round(_Number(num));
|
2026-07-28 08:39:19 +00:00
|
|
|
if (OperatorTypes.GREATER_THAN === realizedOperatorForResult) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const _Math3 = Math;
|
|
|
|
|
return Math.max(1, roundResult + 1);
|
2026-07-29 08:29:29 +00:00
|
|
|
} else if (tmp2.LESS_THAN === realizedOperatorForResult) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const _Math2 = Math;
|
|
|
|
|
return Math.max(0, roundResult - 1);
|
2026-07-28 08:39:19 +00:00
|
|
|
} else {
|
2026-10-03 08:58:59 +00:00
|
|
|
return roundResult;
|
2026-07-28 08:39:19 +00:00
|
|
|
}
|
|
|
|
|
};
|
2026-07-29 08:29:29 +00:00
|
|
|
export const storedValueFor = function storedValueFor(TableSwitchRow, c7) {
|
|
|
|
|
let num = TableSwitchRow;
|
2026-10-03 08:58:59 +00:00
|
|
|
const _Math = Math;
|
|
|
|
|
const _Number = Number;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (TableSwitchRow == null) {
|
|
|
|
|
num = 0;
|
2026-07-28 08:39:19 +00:00
|
|
|
}
|
2026-10-03 08:58:59 +00:00
|
|
|
const str = round(_Number(num));
|
2026-07-28 08:39:19 +00:00
|
|
|
if (OperatorTypes.GREATER_THAN === c7) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const _Math3 = Math;
|
|
|
|
|
const str3 = Math.max(0, str - 1);
|
|
|
|
|
return str3.toString();
|
2026-07-29 08:29:29 +00:00
|
|
|
} else if (tmp.LESS_THAN === c7) {
|
2026-10-03 08:58:59 +00:00
|
|
|
const _Math2 = Math;
|
|
|
|
|
const str2 = Math.max(1, str + 1);
|
|
|
|
|
return str2.toString();
|
2026-07-28 08:39:19 +00:00
|
|
|
} else {
|
|
|
|
|
return str.toString();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const minDisplayedValueFor = function minDisplayedValueFor(arg0) {
|
|
|
|
|
if (OperatorTypes.GREATER_THAN === arg0) {
|
|
|
|
|
return 1;
|
2026-07-29 08:29:29 +00:00
|
|
|
} else if (tmp.LESS_THAN === arg0) {
|
2026-07-28 08:39:19 +00:00
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
};
|