@pitcher/canvas-ui 2025.12.16-082349-beta → 2025.12.16-082724-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.css CHANGED
@@ -820,7 +820,7 @@ button[data-v-338ca99c]:focus {
820
820
  .c-virtual-table__footer,
821
821
  .c-virtual-table__content {
822
822
  border-top: 1px solid var(--4cc1f1b0);
823
- }.c-search-filter__popover[data-v-14ceb850] {
823
+ }.c-search-filter__popover[data-v-06d0d22c] {
824
824
  box-shadow: 0px 7px 24px 0px rgba(0, 0, 0, 0.1);
825
825
  }.c-select-filter__popover[data-v-69bc4c9f] {
826
826
  box-shadow: 0px 7px 24px 0px rgba(0, 0, 0, 0.1);
package/canvas-ui.js CHANGED
@@ -80326,8 +80326,7 @@ function useMetadataSearch(options = {}) {
80326
80326
  threshold = void 0,
80327
80327
  // only used for fuzzy search
80328
80328
  fetchAllUnique = false,
80329
- contentType = void 0,
80330
- tagsNotIn = void 0
80329
+ contentType = void 0
80331
80330
  } = {}) {
80332
80331
  if (!metadataSearch || !searchTerm) {
80333
80332
  return [];
@@ -80347,8 +80346,7 @@ function useMetadataSearch(options = {}) {
80347
80346
  searchMode,
80348
80347
  threshold,
80349
80348
  fetch_all_unique: fetchAllUnique,
80350
- content_type: contentType,
80351
- tags_not_in: tagsNotIn?.length ? tagsNotIn.join(",") : void 0
80349
+ content_type: contentType
80352
80350
  });
80353
80351
  const autocompleteOptions = [];
80354
80352
  const addedValues = /* @__PURE__ */ new Set();
@@ -80398,8 +80396,7 @@ function useMetadataSearch(options = {}) {
80398
80396
  key = "search_data",
80399
80397
  ownerId = null,
80400
80398
  limit = 100,
80401
- and = [],
80402
- tagsNotIn = void 0
80399
+ and = []
80403
80400
  } = {}) {
80404
80401
  if (!entity) {
80405
80402
  return { popular: [], all: [] };
@@ -80419,8 +80416,7 @@ function useMetadataSearch(options = {}) {
80419
80416
  include_draft_values: includeDraftValues,
80420
80417
  owner_id: ownerId?.toString(),
80421
80418
  page_size: limit,
80422
- and,
80423
- tags__not_in: tagsNotIn?.length ? tagsNotIn.join(",") : void 0
80419
+ and
80424
80420
  });
80425
80421
  if (response?.results && Array.isArray(response.results)) {
80426
80422
  return {
@@ -87815,6 +87811,49 @@ function crmSmartDeleteObjects(payload) {
87815
87811
  }
87816
87812
  return highLevelApi.API.request("crm_smart_delete_objects", payload);
87817
87813
  }
87814
+ function crmCreate(payload) {
87815
+ if (!payload) {
87816
+ return Promise.reject(new Error("Payload is required"));
87817
+ }
87818
+ if (!payload.sobject || typeof payload.sobject !== "string" || payload.sobject.trim() === "") {
87819
+ return Promise.reject(new Error("sobject is required and must be a non-empty string"));
87820
+ }
87821
+ if (!payload.records || !Array.isArray(payload.records) || payload.records.length === 0) {
87822
+ return Promise.reject(new Error("records is required and must be a non-empty array"));
87823
+ }
87824
+ for (let i = 0; i < payload.records.length; i++) {
87825
+ const record = payload.records[i];
87826
+ if (!record || typeof record !== "object" || Array.isArray(record)) {
87827
+ return Promise.reject(
87828
+ new Error(`records contains invalid element at index ${i}. All records must be valid objects.`)
87829
+ );
87830
+ }
87831
+ }
87832
+ return highLevelApi.API.request("crm_create", payload);
87833
+ }
87834
+ function crmUpsert(payload) {
87835
+ if (!payload) {
87836
+ return Promise.reject(new Error("Payload is required"));
87837
+ }
87838
+ if (!payload.sobject || typeof payload.sobject !== "string" || payload.sobject.trim() === "") {
87839
+ return Promise.reject(new Error("sobject is required and must be a non-empty string"));
87840
+ }
87841
+ if (!payload.records || !Array.isArray(payload.records) || payload.records.length === 0) {
87842
+ return Promise.reject(new Error("records is required and must be a non-empty array"));
87843
+ }
87844
+ if (!payload.external_id_field || typeof payload.external_id_field !== "string" || payload.external_id_field.trim() === "") {
87845
+ return Promise.reject(new Error("external_id_field is required and must be a non-empty string"));
87846
+ }
87847
+ for (let i = 0; i < payload.records.length; i++) {
87848
+ const record = payload.records[i];
87849
+ if (!record || typeof record !== "object" || Array.isArray(record)) {
87850
+ return Promise.reject(
87851
+ new Error(`records contains invalid element at index ${i}. All records must be valid objects.`)
87852
+ );
87853
+ }
87854
+ }
87855
+ return highLevelApi.API.request("crm_upsert", payload);
87856
+ }
87818
87857
 
87819
87858
  function getFolders(payload) {
87820
87859
  return this.API.request("get_folders", payload);
@@ -87911,12 +87950,14 @@ const modules = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
87911
87950
  createFavorite,
87912
87951
  createFile,
87913
87952
  createFolder,
87953
+ crmCreate,
87914
87954
  crmQuery,
87915
87955
  crmSmartDeleteObjects,
87916
87956
  crmSmartObjectMetadata,
87917
87957
  crmSmartObjectValidationRules,
87918
87958
  crmSmartQuery,
87919
87959
  crmSmartUpsertObjects,
87960
+ crmUpsert,
87920
87961
  deleteCanvas,
87921
87962
  deleteEvent,
87922
87963
  deleteFavorite,
@@ -88505,6 +88546,15 @@ function getTopPitcherWindow(current = window) {
88505
88546
  }
88506
88547
 
88507
88548
  const TRUNCATE_LENGTH_TRIGGER = 10;
88549
+ const RAW_PAYLOAD_METHODS = [
88550
+ "crm_create",
88551
+ "crm_upsert",
88552
+ "crm_smart_query",
88553
+ "crm_smart_object_metadata",
88554
+ "crm_smart_object_validation_rules",
88555
+ "crm_smart_upsert_objects",
88556
+ "crm_smart_delete_objects"
88557
+ ];
88508
88558
  function updateOnlineHandlersEnv(env) {
88509
88559
  env && setEnv(env);
88510
88560
  }
@@ -88570,7 +88620,8 @@ class LowLevelApi extends EventEmitter {
88570
88620
  throw new Error("unsupported response status");
88571
88621
  }
88572
88622
  };
88573
- const payload = cloneDeep(snakeCaseKeys(body));
88623
+ const shouldSkipSnakeCase = RAW_PAYLOAD_METHODS.includes(type);
88624
+ const payload = shouldSkipSnakeCase ? cloneDeep(body) : cloneDeep(snakeCaseKeys(body));
88574
88625
  this.callbacks[id] = {
88575
88626
  dispatched_at: Date.now(),
88576
88627
  type,
@@ -100961,8 +101012,7 @@ function useFilterSuggestions(options = {}) {
100961
101012
  include_draft_values: options.includeDraftValues,
100962
101013
  owner_id: options.ownerId?.toString(),
100963
101014
  page_size: options.limit || 100,
100964
- and: constraints,
100965
- tags__not_in: options.tagsNotIn?.length ? options.tagsNotIn.join(",") : void 0
101015
+ and: constraints
100966
101016
  });
100967
101017
  const result = {
100968
101018
  suggestions: response.results?.map((item) => ({
@@ -101054,8 +101104,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
101054
101104
  limit: { default: 100 },
101055
101105
  externalFilters: { default: () => ({}) },
101056
101106
  isDependentField: { type: Boolean, default: false },
101057
- systemFilteredIds: { default: void 0 },
101058
- tagsNotIn: { default: () => [] }
101107
+ systemFilteredIds: { default: void 0 }
101059
101108
  },
101060
101109
  emits: ["update:modelValue", "clear"],
101061
101110
  setup(__props, { emit: __emit }) {
@@ -101081,8 +101130,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
101081
101130
  isSection: props.isSection,
101082
101131
  isTemplate: props.isTemplate,
101083
101132
  ownerId: props.ownerId,
101084
- limit: props.limit,
101085
- tagsNotIn: props.tagsNotIn
101133
+ limit: props.limit
101086
101134
  });
101087
101135
  const { isEnabled, debouncedFetch, cleanup, isLoading } = filterSuggestions;
101088
101136
  const { handleFetch } = useMetadataSearch({ includeSearchTermAsOption: true });
@@ -101160,8 +101208,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
101160
101208
  isTemplate: props.isTemplate,
101161
101209
  key: props.filterKey,
101162
101210
  ownerId: props.ownerId,
101163
- fetchAllUnique: true,
101164
- tagsNotIn: props.tagsNotIn
101211
+ fetchAllUnique: true
101165
101212
  });
101166
101213
  return searchResults;
101167
101214
  }
@@ -101397,7 +101444,7 @@ const _sfc_main$5j = /* @__PURE__ */ defineComponent({
101397
101444
  }
101398
101445
  });
101399
101446
 
101400
- const CSearchFilter = /* @__PURE__ */ _export_sfc(_sfc_main$5j, [["__scopeId", "data-v-14ceb850"]]);
101447
+ const CSearchFilter = /* @__PURE__ */ _export_sfc(_sfc_main$5j, [["__scopeId", "data-v-06d0d22c"]]);
101401
101448
 
101402
101449
  const _hoisted_1$4h = ["v-bind"];
101403
101450
  const _hoisted_2$38 = { class: "flex items-center gap-2 px-6 font-size-4" };
@@ -103177,8 +103224,7 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
103177
103224
  customFilterComponents: {},
103178
103225
  enableDependentFilters: { type: Boolean },
103179
103226
  dependentFiltersEntity: { default: "file" },
103180
- contentType: {},
103181
- tagsNotIn: { default: () => [] }
103227
+ contentType: {}
103182
103228
  },
103183
103229
  emits: ["update:filters", "update:search", "update:searchIn"],
103184
103230
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -103363,8 +103409,7 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
103363
103409
  searchMode: "fuzzy",
103364
103410
  threshold: 0.3,
103365
103411
  fetchAllUnique: true,
103366
- contentType: props.contentType,
103367
- tagsNotIn: props.tagsNotIn
103412
+ contentType: props.contentType
103368
103413
  });
103369
103414
  }
103370
103415
  function onUpdateModelValue(f, value) {
@@ -103598,9 +103643,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
103598
103643
  options: f.type === "checkbox" ? unref(getFilterOptions)(f.type, f.options, f.available_values) : unref(getFilterOptions)(f.type, f.options),
103599
103644
  "owner-id": _ctx.ownerId,
103600
103645
  "system-filtered-ids": systemFilteredIds.value,
103601
- "tags-not-in": _ctx.tagsNotIn,
103602
103646
  "onUpdate:modelValue": (v) => onUpdateDependentField(f, v)
103603
- }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-dependent-field", "is-section", "is-template", "modelValue", "multiple", "name", "numeric", "options", "owner-id", "system-filtered-ids", "tags-not-in", "onUpdate:modelValue"]);
103647
+ }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-dependent-field", "is-section", "is-template", "modelValue", "multiple", "name", "numeric", "options", "owner-id", "system-filtered-ids", "onUpdate:modelValue"]);
103604
103648
  }), 128)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
103605
103649
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedCustomFilterComponents.value, (cc) => {
103606
103650
  return openBlock(), createBlock(resolveDynamicComponent(componentMap[cc.componentName]), {
@@ -103621,9 +103665,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
103621
103665
  options: cc.options ?? unref(getFilterOptions)(cc.type, cc.options),
103622
103666
  "owner-id": _ctx.ownerId,
103623
103667
  "system-filtered-ids": systemFilteredIds.value,
103624
- "tags-not-in": _ctx.tagsNotIn,
103625
103668
  "onUpdate:modelValue": (v) => onUpdateModelValue(cc, v)
103626
- }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-custom", "is-dependent-field", "is-section", "is-template", "modelValue", "name", "numeric", "options", "owner-id", "system-filtered-ids", "tags-not-in", "onUpdate:modelValue"]);
103669
+ }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-custom", "is-dependent-field", "is-section", "is-template", "modelValue", "name", "numeric", "options", "owner-id", "system-filtered-ids", "onUpdate:modelValue"]);
103627
103670
  }), 128)),
103628
103671
  (openBlock(true), createElementBlock(Fragment, null, renderList(computedFilters.value, (f) => {
103629
103672
  return openBlock(), createBlock(resolveDynamicComponent(componentMap[f.componentName]), {
@@ -103644,9 +103687,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
103644
103687
  options: unref(getFilterOptions)(f.type, f.options),
103645
103688
  "owner-id": _ctx.ownerId,
103646
103689
  "system-filtered-ids": systemFilteredIds.value,
103647
- "tags-not-in": _ctx.tagsNotIn,
103648
103690
  "onUpdate:modelValue": (v) => onUpdateModelValue(f, v)
103649
- }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-dependent-field", "is-section", "is-template", "modelValue", "multiple", "name", "numeric", "options", "owner-id", "system-filtered-ids", "tags-not-in", "onUpdate:modelValue"]);
103691
+ }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-dependent-field", "is-section", "is-template", "modelValue", "multiple", "name", "numeric", "options", "owner-id", "system-filtered-ids", "onUpdate:modelValue"]);
103650
103692
  }), 128))
103651
103693
  ], 64))
103652
103694
  ], 64)) : createCommentVNode("", true),
@@ -103723,9 +103765,8 @@ const _sfc_main$59 = /* @__PURE__ */ defineComponent({
103723
103765
  options: f.type === "checkbox" ? unref(getFilterOptions)(f.type, f.options, f.available_values) : unref(getFilterOptions)(f.type, f.options),
103724
103766
  "owner-id": _ctx.ownerId,
103725
103767
  "system-filtered-ids": systemFilteredIds.value,
103726
- "tags-not-in": _ctx.tagsNotIn,
103727
103768
  "onUpdate:modelValue": (v) => section.are_fields_dependent ? onUpdateDependentField(f, v) : onUpdateModelValue(f, v)
103728
- }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-dependent-field", "is-section", "is-template", "modelValue", "multiple", "name", "numeric", "options", "owner-id", "system-filtered-ids", "tags-not-in", "onUpdate:modelValue"]);
103769
+ }, null, 8, ["allow-custom-date-range", "disabled", "entity", "external-filters", "filter-key", "include-draft-values", "is-dependent-field", "is-section", "is-template", "modelValue", "multiple", "name", "numeric", "options", "owner-id", "system-filtered-ids", "onUpdate:modelValue"]);
103729
103770
  }), 128))
103730
103771
  ]),
103731
103772
  _: 2
@@ -111942,10 +111983,7 @@ const _sfc_main$4M = /*@__PURE__*/defineComponent({
111942
111983
  order: 'asc'
111943
111984
  })
111944
111985
  },
111945
- viewMode: {},
111946
- excludedTags: {
111947
- default: () => []
111948
- }
111986
+ viewMode: {}
111949
111987
  },
111950
111988
  emits: ["search", "create:template", "create:folder", "convert", "update:filter-values", "breadcrumb:click", "move", "select", "restoreColumns", "sort-changed", "toggle-view-mode"],
111951
111989
  setup(__props, {
@@ -112209,12 +112247,11 @@ const _sfc_main$4M = /*@__PURE__*/defineComponent({
112209
112247
  "initial-search-value": _ctx.search,
112210
112248
  "is-section": _ctx.canvasType === 'section-template',
112211
112249
  "is-template": "",
112212
- placeholder: unref(t)('canvasUI.components.templates.CTemplateManagementToolbar.searchInNameOrTags'),
112213
- "tags-not-in": _ctx.excludedTags
112250
+ placeholder: unref(t)('canvasUI.components.templates.CTemplateManagementToolbar.searchInNameOrTags')
112214
112251
  }, popularityProps.value, {
112215
112252
  "onUpdate:filters": _cache[4] || (_cache[4] = $event => emit('update:filter-values', $event)),
112216
112253
  "onUpdate:search": _cache[5] || (_cache[5] = $event => emit('search', $event))
112217
- }), null, 16, ["customFilterComponents", "disabled", "filters", "hide-metadata-filters", "include-draft-values", "initial-search-value", "is-section", "placeholder", "tags-not-in"])]), createElementVNode("div", _hoisted_6$1m, [unref(launchDarkly).enable_template_folders && _ctx.canvasType !== 'section-template' ? withDirectives((openBlock(), createBlock(CButton, {
112254
+ }), null, 16, ["customFilterComponents", "disabled", "filters", "hide-metadata-filters", "include-draft-values", "initial-search-value", "is-section", "placeholder"])]), createElementVNode("div", _hoisted_6$1m, [unref(launchDarkly).enable_template_folders && _ctx.canvasType !== 'section-template' ? withDirectives((openBlock(), createBlock(CButton, {
112218
112255
  key: 0,
112219
112256
  circle: "",
112220
112257
  onClick: _cache[6] || (_cache[6] = $event => _ctx.$emit('toggle-view-mode'))
@@ -112273,12 +112310,11 @@ const _sfc_main$4M = /*@__PURE__*/defineComponent({
112273
112310
  "initial-search-value": _ctx.search,
112274
112311
  "is-section": _ctx.canvasType === 'section-template',
112275
112312
  "is-template": "",
112276
- placeholder: unref(t)('canvasUI.components.templates.CTemplateManagementToolbar.searchInNameOrTags'),
112277
- "tags-not-in": _ctx.excludedTags
112313
+ placeholder: unref(t)('canvasUI.components.templates.CTemplateManagementToolbar.searchInNameOrTags')
112278
112314
  }, popularityProps.value, {
112279
112315
  "onUpdate:filters": _cache[12] || (_cache[12] = $event => emit('update:filter-values', $event)),
112280
112316
  "onUpdate:search": _cache[13] || (_cache[13] = $event => emit('search', $event))
112281
- }), null, 16, ["customFilterComponents", "disabled", "filters", "hide-metadata-filters", "include-draft-values", "initial-search-value", "is-section", "placeholder", "tags-not-in"])]))], 2);
112317
+ }), null, 16, ["customFilterComponents", "disabled", "filters", "hide-metadata-filters", "include-draft-values", "initial-search-value", "is-section", "placeholder"])]))], 2);
112282
112318
  };
112283
112319
  }
112284
112320
  });
@@ -114411,7 +114447,6 @@ const _sfc_main$4G = /*@__PURE__*/defineComponent({
114411
114447
  }),
114412
114448
  currentSort: currentSort.value,
114413
114449
  "custom-filter-components": unref(dataFilterComponents),
114414
- "excluded-tags": _ctx.excludedTags,
114415
114450
  "hide-convert": isImpact.value || _ctx.hideConvert,
114416
114451
  "hide-create": isImpact.value,
114417
114452
  "hide-view": !unref(launchDarkly).allow_canvases_tables_columns_settings,
@@ -114433,7 +114468,7 @@ const _sfc_main$4G = /*@__PURE__*/defineComponent({
114433
114468
  onSortChanged: onSortChanged,
114434
114469
  onToggleViewMode: toggleViewMode,
114435
114470
  "onUpdate:filterValues": _cache[5] || (_cache[5] = $event => onTableChange('filterValuesChanged', $event))
114436
- }, null, 8, ["breadcrumbs", "canvas-type", "class", "currentSort", "custom-filter-components", "excluded-tags", "hide-convert", "hide-create", "hide-view", "is-loading-items", "is-template-folder-enabled", "metadata-filter-values", "recommended-ids", "search", "tableColumnsSettings", "viewMode", "onMove", "onRestoreColumns", "onSelect"]), [[vShow, !showBulkToolbar.value]]), (isFetchingData.value || isLoadingTable.value) && isTemplateFolderEnabled.value && unref(viewMode) === 'list' ? (openBlock(), createElementBlock("div", {
114471
+ }, null, 8, ["breadcrumbs", "canvas-type", "class", "currentSort", "custom-filter-components", "hide-convert", "hide-create", "hide-view", "is-loading-items", "is-template-folder-enabled", "metadata-filter-values", "recommended-ids", "search", "tableColumnsSettings", "viewMode", "onMove", "onRestoreColumns", "onSelect"]), [[vShow, !showBulkToolbar.value]]), (isFetchingData.value || isLoadingTable.value) && isTemplateFolderEnabled.value && unref(viewMode) === 'list' ? (openBlock(), createElementBlock("div", {
114437
114472
  key: 0,
114438
114473
  class: "flex bg-base rounded-2 mr-3",
114439
114474
  style: normalizeStyle({