@pitcher/canvas-ui 2026.1.14-135114 → 2026.1.15-101627-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 +15 -9
- package/canvas-ui.js.map +1 -1
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +0 -5
- package/lib/composables/useSmartStore.d.ts +1 -1
- package/lib/sdk/api/modules/query.d.ts +3 -3
- package/lib/types/instanceSettings.types.d.ts +0 -1
- package/lib/types/launchDarkly.types.d.ts +1 -1
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -88214,7 +88214,7 @@ async function crmQueryAdaptive(payload) {
|
|
|
88214
88214
|
try {
|
|
88215
88215
|
const env = await highLevelApi.API.request("get_env");
|
|
88216
88216
|
const isIos = env?.mode === "IOS";
|
|
88217
|
-
const isSfdcSyncEnabled = env?.
|
|
88217
|
+
const isSfdcSyncEnabled = env?.launch_darkly?.sfdc_offline_enabled === true;
|
|
88218
88218
|
useSmartStore = isIos && isSfdcSyncEnabled;
|
|
88219
88219
|
} catch {
|
|
88220
88220
|
useSmartStore = false;
|
|
@@ -181989,7 +181989,7 @@ function useSmartStore(env) {
|
|
|
181989
181989
|
return false;
|
|
181990
181990
|
}
|
|
181991
181991
|
const isIos = envValue?.mode === "IOS";
|
|
181992
|
-
const isSfdcSyncEnabled = envValue?.
|
|
181992
|
+
const isSfdcSyncEnabled = envValue?.launch_darkly?.sfdc_offline_enabled === true;
|
|
181993
181993
|
return isIos && isSfdcSyncEnabled;
|
|
181994
181994
|
} catch (error) {
|
|
181995
181995
|
console.error("[useSmartStore] Error checking SmartStore availability:", error);
|
|
@@ -183776,7 +183776,7 @@ function evaluateIsExecutedCondition(condition, event) {
|
|
|
183776
183776
|
});
|
|
183777
183777
|
jsCondition = jsCondition.replace(
|
|
183778
183778
|
/(["'])((?:[^"\\]|\\.)*)\1\s*(===|!==)\s*(["'])((?:[^"\\]|\\.)*)\4/g,
|
|
183779
|
-
(
|
|
183779
|
+
(_match, _leftQuote, leftValue, operator, _rightQuote, rightValue) => {
|
|
183780
183780
|
return `"${leftValue}".toLowerCase() ${operator} "${rightValue}".toLowerCase()`;
|
|
183781
183781
|
}
|
|
183782
183782
|
);
|
|
@@ -183811,7 +183811,7 @@ function evaluateIsExecutedForPascalCaseEvent(condition, event) {
|
|
|
183811
183811
|
});
|
|
183812
183812
|
jsCondition = jsCondition.replace(
|
|
183813
183813
|
/(["'])((?:[^"\\]|\\.)*)\1\s*(===|!==)\s*(["'])((?:[^"\\]|\\.)*)\4/g,
|
|
183814
|
-
(
|
|
183814
|
+
(_match, _leftQuote, leftValue, operator, _rightQuote, rightValue) => {
|
|
183815
183815
|
return `"${leftValue}".toLowerCase() ${operator} "${rightValue}".toLowerCase()`;
|
|
183816
183816
|
}
|
|
183817
183817
|
);
|
|
@@ -183825,7 +183825,9 @@ function evaluateIsExecutedForPascalCaseEvent(condition, event) {
|
|
|
183825
183825
|
}
|
|
183826
183826
|
}
|
|
183827
183827
|
function getEventColor(sfEvent) {
|
|
183828
|
-
if (!sfEvent.WhatCount && !sfEvent.WhoCount)
|
|
183828
|
+
if (!sfEvent.WhatCount && !sfEvent.WhoCount) {
|
|
183829
|
+
return SfEventColors.TIME_OFF_TERRITORY;
|
|
183830
|
+
}
|
|
183829
183831
|
let isSubmitted = false;
|
|
183830
183832
|
if (sfEvent.is_executed_condition) {
|
|
183831
183833
|
isSubmitted = evaluateIsExecutedCondition(sfEvent.is_executed_condition, sfEvent);
|
|
@@ -183833,14 +183835,18 @@ function getEventColor(sfEvent) {
|
|
|
183833
183835
|
isSubmitted = false;
|
|
183834
183836
|
}
|
|
183835
183837
|
const now = /* @__PURE__ */ new Date();
|
|
183836
|
-
if (isSubmitted)
|
|
183837
|
-
|
|
183838
|
+
if (isSubmitted) {
|
|
183839
|
+
return SfEventColors.SUBMITTED;
|
|
183840
|
+
} else if (sfEvent.IsAllDayEvent) {
|
|
183838
183841
|
const endDate = new Date(sfEvent.EndDateTime);
|
|
183839
183842
|
const todayStart = startOfDay(now);
|
|
183840
183843
|
const endDayStart = startOfDay(endDate);
|
|
183841
183844
|
return isAfter$1(todayStart, endDayStart) ? SfEventColors.PAST : SfEventColors.PLANNED;
|
|
183842
|
-
} else if (isAfter$1(now, new Date(sfEvent.EndDateTime)))
|
|
183843
|
-
|
|
183845
|
+
} else if (isAfter$1(now, new Date(sfEvent.EndDateTime))) {
|
|
183846
|
+
return SfEventColors.PAST;
|
|
183847
|
+
} else {
|
|
183848
|
+
return SfEventColors.PLANNED;
|
|
183849
|
+
}
|
|
183844
183850
|
}
|
|
183845
183851
|
const minFutureDate = (date = /* @__PURE__ */ new Date()) => add(date, { minutes: MIN_DIFFERENCE_IN_MINUTES });
|
|
183846
183852
|
const minPastDate = (date = /* @__PURE__ */ new Date()) => sub(date, { minutes: MIN_DIFFERENCE_IN_MINUTES });
|