@pitcher/canvas-ui 2026.1.7-91220 → 2026.1.8-084615-beta
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/canvas-ui.js +13 -11
- package/canvas-ui.js.map +1 -1
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -88224,7 +88224,6 @@ async function crmQueryAdaptive(payload) {
|
|
|
88224
88224
|
const fields = extractFieldsFromSoql(query2);
|
|
88225
88225
|
const objectName = extractObjectFromSoql(query2);
|
|
88226
88226
|
const smartQuery = convertSoqlToSmartQuery(query2);
|
|
88227
|
-
console.log(`Smart Query: `, smartQuery);
|
|
88228
88227
|
const smartStoreResults = await crmSmartQuery({ query: smartQuery });
|
|
88229
88228
|
const records = transformSmartStoreResults(smartStoreResults, fields, objectName);
|
|
88230
88229
|
return {
|
|
@@ -131649,21 +131648,24 @@ const displayIntegerWithMunit = (number, decimals = 2) => {
|
|
|
131649
131648
|
return `${b.toFixed(decimals)}B`;
|
|
131650
131649
|
};
|
|
131651
131650
|
const convertSecondsToMinutes = (number) => {
|
|
131651
|
+
if (number <= 0) return "0 sec";
|
|
131652
|
+
if (number < 1) return "<1 sec";
|
|
131652
131653
|
const units = [
|
|
131653
|
-
[
|
|
131654
|
-
[60, "min"],
|
|
131654
|
+
[60 * 60 * 24, "day"],
|
|
131655
131655
|
[60 * 60, "h"],
|
|
131656
|
-
[60
|
|
131656
|
+
[60, "min"],
|
|
131657
|
+
[1, "sec"]
|
|
131657
131658
|
];
|
|
131658
|
-
|
|
131659
|
-
|
|
131660
|
-
|
|
131661
|
-
|
|
131659
|
+
const parts = [];
|
|
131660
|
+
let remaining = number;
|
|
131661
|
+
for (const [divisor, label] of units) {
|
|
131662
|
+
if (remaining >= divisor) {
|
|
131663
|
+
const val = Math.floor(remaining / divisor);
|
|
131664
|
+
parts.push(`${val} ${label}`);
|
|
131665
|
+
remaining = remaining % divisor;
|
|
131662
131666
|
}
|
|
131663
131667
|
}
|
|
131664
|
-
|
|
131665
|
-
const val = Math.floor(number / Number(divisor));
|
|
131666
|
-
return `${val} ${label}`;
|
|
131668
|
+
return parts.slice(0, 2).join(" ");
|
|
131667
131669
|
};
|
|
131668
131670
|
const getNumberWithRegex = (string) => {
|
|
131669
131671
|
return string?.replace(/\D+/g, "");
|