@uniformdev/canvas 19.32.1-alpha.4 → 19.33.1-alpha.10
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/dist/index.d.ts +1 -30
- package/dist/index.esm.js +0 -37
- package/dist/index.js +0 -44
- package/dist/index.mjs +0 -37
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
@@ -8263,35 +8263,6 @@ declare const createUniformApiEnhancer: ({ apiUrl }: {
|
|
8263
8263
|
} | undefined;
|
8264
8264
|
}>;
|
8265
8265
|
|
8266
|
-
declare const ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
8267
|
-
declare const ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
8268
|
-
declare const ATTRIBUTE_PARAMETER_VALUE = "data-uniform-parameter-value";
|
8269
|
-
declare const ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
|
8270
|
-
declare const ATTRIBUTE_PLACEHOLDER = "data-uniform-placeholder";
|
8271
|
-
declare const ATTRIBUTE_MULTILINE = "data-uniform-is-multiline";
|
8272
|
-
type GetParameterAttributesProps = {
|
8273
|
-
/** The public Id of the parameter */
|
8274
|
-
id: string;
|
8275
|
-
/** The component object where this parameter is used */
|
8276
|
-
component: ComponentInstance;
|
8277
|
-
/**
|
8278
|
-
* Sets the value to show in Canvas editor when the parameter value is empty.
|
8279
|
-
* @default undefined
|
8280
|
-
*/
|
8281
|
-
placeholder?: string;
|
8282
|
-
/**
|
8283
|
-
* When set to true, it adds `whiteSpace: 'pre-wrap'` to the styles of the root element to allow the rendering of line breaks.
|
8284
|
-
* @default false
|
8285
|
-
*/
|
8286
|
-
isMultiline?: boolean;
|
8287
|
-
};
|
8288
|
-
/**
|
8289
|
-
* Returns the attributes needed to annotate a Uniform parameter for inline editing.
|
8290
|
-
* Supports only text parameters at the moment.
|
8291
|
-
* @deprecated Unstable, and not ready for production usage.
|
8292
|
-
**/
|
8293
|
-
declare const getParameterAttributes: ({ id, component, placeholder, isMultiline, }: GetParameterAttributesProps) => Record<string, string | boolean | undefined>;
|
8294
|
-
|
8295
8266
|
declare const generateHash: ({ composition, secret, }: {
|
8296
8267
|
composition: RootComponentInstance;
|
8297
8268
|
secret: string | undefined;
|
@@ -8314,4 +8285,4 @@ declare function mapSlotToTestVariations(slot: ComponentInstance[] | undefined):
|
|
8314
8285
|
|
8315
8286
|
declare const CanvasClientError: typeof ApiClientError;
|
8316
8287
|
|
8317
|
-
export {
|
8288
|
+
export { AddComponentMessage, BatchEnhancer, BatchEntry, BatchInvalidationPayload, BindVariablesOptions, BindVariablesResult, BindVariablesToObjectOptions, CANVAS_DRAFT_STATE, CANVAS_ENRICHMENT_TAG_PARAM, CANVAS_INTENT_TAG_PARAM, CANVAS_LOCALE_TAG_PARAM, CANVAS_LOCALIZATION_SLOT, CANVAS_LOCALIZATION_TYPE, CANVAS_PERSONALIZATION_PARAM, CANVAS_PERSONALIZE_SLOT, CANVAS_PERSONALIZE_TYPE, CANVAS_PUBLISHED_STATE, CANVAS_TEST_SLOT, CANVAS_TEST_TYPE, CANVAS_TEST_VARIANT_PARAM, CanvasClient, CanvasClientError, CanvasDefinitions, Channel, ChannelMessage, ChannelSubscription, ChildEnhancerBuilder, ComponentDefinition, ComponentDefinitionDeleteParameters, ComponentDefinitionGetParameters, ComponentDefinitionGetResponse, ComponentDefinitionParameter, ComponentDefinitionPermission, ComponentDefinitionPutParameters, ComponentDefinitionSlot, ComponentDefinitionSlugSettings, ComponentDefinitionVariant, ComponentEnhancer, ComponentEnhancerFunction, ComponentEnhancerOptions, ComponentInstance, ComponentInstanceHistoryEntry, ComponentInstanceHistoryGetParameters, ComponentInstanceHistoryGetResponse, ComponentLocationReference, ComponentOverridability, ComponentOverride, ComponentOverrides, ComponentParameter, ComponentParameterContextualEditing, ComponentParameterEnhancer, ComponentParameterEnhancerFunction, ComponentParameterEnhancerOptions, CompositionDataDiagnostic, CompositionDeleteParameters, CompositionDiagnostics, CompositionGetByIdParameters, CompositionGetByNodeIdParameters, CompositionGetByNodePathParameters, CompositionGetBySlugParameters, CompositionGetListResponse, CompositionGetOrderBy, CompositionGetParameters, CompositionGetResponse, CompositionGetValidResponses, CompositionIssue, CompositionPatternIssue, CompositionPutParameters, CompositionRelationshipsClientOptions, CompositionRelationshipsDDefinitionGetResponse, CompositionRelationshipsDefinitionApi, CompositionRelationshipsDefinitionGetParameters, CompositionResolvedGetResponse, CompositionUIStatus, ContextualEditingComponentReference, DataElementBindingIssue, DataElementConnectionDefinition, DataResolutionConfigIssue, DataResolutionOption, DataResolutionOptionNegative, DataResolutionOptionPositive, DataResolutionParameters, DataResourceDefinition, DataResourceDefinitions, DataResourceIssue, DataResourceVariables, DataSource, DataSourceClient, DataSourceDeleteParameters, DataSourceGetParameters, DataSourceGetResponse, DataSourcePutParameters, DataSourcesGetParameters, DataSourcesGetResponse, DataType, DataTypeClient, DataTypeDeleteParameters, DataTypeGetParameters, DataTypeGetResponse, DataTypePutParameters, DataVariableDefinition, DismissPlaceholderMessage, DynamicInputIssue, EDGE_CACHE_DISABLED, EDGE_DEFAULT_CACHE_TTL, EDGE_DEFAULT_L2_CACHE_TTL_IN_HOURS, EDGE_MAX_CACHE_TTL, EDGE_MAX_L2_CACHE_TTL_IN_HOURS, EDGE_MIN_CACHE_TTL, EDGE_MIN_L2_CACHE_TTL_IN_HOURS, EMPTY_COMPOSITION, EnhancerBuilder, EnhancerContext, EnhancerError, EventNames, IN_CONTEXT_EDITOR_COMPONENT_END_ROLE, IN_CONTEXT_EDITOR_COMPONENT_START_ROLE, IN_CONTEXT_EDITOR_EMBED_SCRIPT_ID, IN_CONTEXT_EDITOR_QUERY_STRING_PARAM, IS_RENDERED_BY_UNIFORM_ATTRIBUTE, InvalidationPayload, InvalidationResult, LimitPolicy, LinkComponentParameterValue, LinkParamConfiguration, LinkParamValue, LinkParameterType, LinkTypeConfiguration, MessageHandler, MoveComponentMessage, NonProjectMapLinkParamValue, OverrideOptions, PLACEHOLDER_ID, PreviewEventBus, PreviewPanelSettings, ProjectMapLinkComponentParameterValue, ProjectMapLinkParamValue, ReadyMessage, ReportRenderedCompositionsMessage, ResolvedRouteGetResponse, RichTextBuiltInElement, RichTextBuiltInFormat, RichTextParamConfiguration, RichTextParamValue, RootComponentInstance, RouteClient, RouteDynamicInputs, RouteGetParameters, RouteGetResponse, RouteGetResponseComposition, RouteGetResponseEdgehancedComposition, RouteGetResponseNotFound, RouteGetResponseRedirect, SelectComponentMessage, SelectParameterMessage, SpecificProjectMap, SubscribeToCompositionOptions, TriggerCompositionActionMessage, UncachedCanvasClient, UniqueBatchEntries, UnsubscribeCallback, UpdateComponentParameterMessage, UpdateCompositionInternalMessage, UpdateCompositionMessage, UpdateContextualEditingStateInternalMessage, UpdatePreviewSettingsMessage, UsageTrackingApi, UsageTrackingGetParameters, UsageTrackingGetResponse, UsageTrackingPostParameters, UsageTrackingPostResponse, WalkComponentTreeActions, bindVariables, bindVariablesToObject, compose, createBatchEnhancer, createCanvasChannel, createEventBus, createLimitPolicy, createUniformApiEnhancer, enhance, extractLocales, generateHash, getChannelName, getComponentJsonPointer, getComponentPath, isAddComponentMessage, isDismissPlaceholderMessage, isMovingComponentMessage, isReadyMessage, isReportRenderedCompositionsMessage, isSelectComponentMessage, isSelectParameterMessage, isSystemComponentDefinition, isTriggerCompositionActionMessage, isUpdateComponentParameterMessage, isUpdateCompositionInternalMessage, isUpdateCompositionMessage, isUpdateContextualEditingStateInternalMessage, isUpdatePreviewSettingsMessage, localize, mapSlotToPersonalizedVariations, mapSlotToTestVariations, nullLimitPolicy, subscribeToComposition, unstable_CompositionRelationshipClient, walkComponentTree };
|
package/dist/index.esm.js
CHANGED
@@ -1695,36 +1695,6 @@ var createUniformApiEnhancer = ({ apiUrl }) => {
|
|
1695
1695
|
};
|
1696
1696
|
};
|
1697
1697
|
|
1698
|
-
// src/utils/getParameterAttributes.ts
|
1699
|
-
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
1700
|
-
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
1701
|
-
var ATTRIBUTE_PARAMETER_VALUE = "data-uniform-parameter-value";
|
1702
|
-
var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
|
1703
|
-
var ATTRIBUTE_PLACEHOLDER = "data-uniform-placeholder";
|
1704
|
-
var ATTRIBUTE_MULTILINE = "data-uniform-is-multiline";
|
1705
|
-
var getParameterAttributes = ({
|
1706
|
-
id,
|
1707
|
-
component,
|
1708
|
-
placeholder,
|
1709
|
-
isMultiline = false
|
1710
|
-
}) => {
|
1711
|
-
var _a, _b, _c;
|
1712
|
-
const componentId = component == null ? void 0 : component._id;
|
1713
|
-
const parameter = (_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[id];
|
1714
|
-
const value = parameter == null ? void 0 : parameter.value;
|
1715
|
-
const type = parameter == null ? void 0 : parameter.type;
|
1716
|
-
const isEditable = (_c = (_b = parameter == null ? void 0 : parameter._contextualEditing) == null ? void 0 : _b.isEditable) != null ? _c : false;
|
1717
|
-
return {
|
1718
|
-
[ATTRIBUTE_COMPONENT_ID]: componentId,
|
1719
|
-
[ATTRIBUTE_PARAMETER_ID]: id,
|
1720
|
-
[ATTRIBUTE_PARAMETER_VALUE]: String(value != null ? value : ""),
|
1721
|
-
[ATTRIBUTE_PARAMETER_TYPE]: type,
|
1722
|
-
[ATTRIBUTE_PLACEHOLDER]: placeholder,
|
1723
|
-
[ATTRIBUTE_MULTILINE]: isMultiline,
|
1724
|
-
contentEditable: isEditable
|
1725
|
-
};
|
1726
|
-
};
|
1727
|
-
|
1728
1698
|
// src/utils/isSystemComponentDefinition.ts
|
1729
1699
|
var isSystemComponentDefinition = (componentType) => {
|
1730
1700
|
return componentType.startsWith("$");
|
@@ -1766,12 +1736,6 @@ function mapSlotToTestVariations(slot) {
|
|
1766
1736
|
import { ApiClientError } from "@uniformdev/context/api";
|
1767
1737
|
var CanvasClientError = ApiClientError;
|
1768
1738
|
export {
|
1769
|
-
ATTRIBUTE_COMPONENT_ID,
|
1770
|
-
ATTRIBUTE_MULTILINE,
|
1771
|
-
ATTRIBUTE_PARAMETER_ID,
|
1772
|
-
ATTRIBUTE_PARAMETER_TYPE,
|
1773
|
-
ATTRIBUTE_PARAMETER_VALUE,
|
1774
|
-
ATTRIBUTE_PLACEHOLDER,
|
1775
1739
|
ApiClientError,
|
1776
1740
|
BatchEntry,
|
1777
1741
|
CANVAS_DRAFT_STATE,
|
@@ -1824,7 +1788,6 @@ export {
|
|
1824
1788
|
getChannelName,
|
1825
1789
|
getComponentJsonPointer,
|
1826
1790
|
getComponentPath,
|
1827
|
-
getParameterAttributes,
|
1828
1791
|
isAddComponentMessage,
|
1829
1792
|
isDismissPlaceholderMessage,
|
1830
1793
|
isMovingComponentMessage,
|
package/dist/index.js
CHANGED
@@ -277,12 +277,6 @@ var require_retry2 = __commonJS({
|
|
277
277
|
// src/index.ts
|
278
278
|
var src_exports = {};
|
279
279
|
__export(src_exports, {
|
280
|
-
ATTRIBUTE_COMPONENT_ID: () => ATTRIBUTE_COMPONENT_ID,
|
281
|
-
ATTRIBUTE_MULTILINE: () => ATTRIBUTE_MULTILINE,
|
282
|
-
ATTRIBUTE_PARAMETER_ID: () => ATTRIBUTE_PARAMETER_ID,
|
283
|
-
ATTRIBUTE_PARAMETER_TYPE: () => ATTRIBUTE_PARAMETER_TYPE,
|
284
|
-
ATTRIBUTE_PARAMETER_VALUE: () => ATTRIBUTE_PARAMETER_VALUE,
|
285
|
-
ATTRIBUTE_PLACEHOLDER: () => ATTRIBUTE_PLACEHOLDER,
|
286
280
|
ApiClientError: () => import_api6.ApiClientError,
|
287
281
|
BatchEntry: () => BatchEntry,
|
288
282
|
CANVAS_DRAFT_STATE: () => CANVAS_DRAFT_STATE,
|
@@ -335,7 +329,6 @@ __export(src_exports, {
|
|
335
329
|
getChannelName: () => getChannelName,
|
336
330
|
getComponentJsonPointer: () => getComponentJsonPointer,
|
337
331
|
getComponentPath: () => getComponentPath,
|
338
|
-
getParameterAttributes: () => getParameterAttributes,
|
339
332
|
isAddComponentMessage: () => isAddComponentMessage,
|
340
333
|
isDismissPlaceholderMessage: () => isDismissPlaceholderMessage,
|
341
334
|
isMovingComponentMessage: () => isMovingComponentMessage,
|
@@ -1787,36 +1780,6 @@ var createUniformApiEnhancer = ({ apiUrl }) => {
|
|
1787
1780
|
};
|
1788
1781
|
};
|
1789
1782
|
|
1790
|
-
// src/utils/getParameterAttributes.ts
|
1791
|
-
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
1792
|
-
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
1793
|
-
var ATTRIBUTE_PARAMETER_VALUE = "data-uniform-parameter-value";
|
1794
|
-
var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
|
1795
|
-
var ATTRIBUTE_PLACEHOLDER = "data-uniform-placeholder";
|
1796
|
-
var ATTRIBUTE_MULTILINE = "data-uniform-is-multiline";
|
1797
|
-
var getParameterAttributes = ({
|
1798
|
-
id,
|
1799
|
-
component,
|
1800
|
-
placeholder,
|
1801
|
-
isMultiline = false
|
1802
|
-
}) => {
|
1803
|
-
var _a, _b, _c;
|
1804
|
-
const componentId = component == null ? void 0 : component._id;
|
1805
|
-
const parameter = (_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[id];
|
1806
|
-
const value = parameter == null ? void 0 : parameter.value;
|
1807
|
-
const type = parameter == null ? void 0 : parameter.type;
|
1808
|
-
const isEditable = (_c = (_b = parameter == null ? void 0 : parameter._contextualEditing) == null ? void 0 : _b.isEditable) != null ? _c : false;
|
1809
|
-
return {
|
1810
|
-
[ATTRIBUTE_COMPONENT_ID]: componentId,
|
1811
|
-
[ATTRIBUTE_PARAMETER_ID]: id,
|
1812
|
-
[ATTRIBUTE_PARAMETER_VALUE]: String(value != null ? value : ""),
|
1813
|
-
[ATTRIBUTE_PARAMETER_TYPE]: type,
|
1814
|
-
[ATTRIBUTE_PLACEHOLDER]: placeholder,
|
1815
|
-
[ATTRIBUTE_MULTILINE]: isMultiline,
|
1816
|
-
contentEditable: isEditable
|
1817
|
-
};
|
1818
|
-
};
|
1819
|
-
|
1820
1783
|
// src/utils/isSystemComponentDefinition.ts
|
1821
1784
|
var isSystemComponentDefinition = (componentType) => {
|
1822
1785
|
return componentType.startsWith("$");
|
@@ -1859,12 +1822,6 @@ var import_api6 = require("@uniformdev/context/api");
|
|
1859
1822
|
var CanvasClientError = import_api6.ApiClientError;
|
1860
1823
|
// Annotate the CommonJS export names for ESM import in node:
|
1861
1824
|
0 && (module.exports = {
|
1862
|
-
ATTRIBUTE_COMPONENT_ID,
|
1863
|
-
ATTRIBUTE_MULTILINE,
|
1864
|
-
ATTRIBUTE_PARAMETER_ID,
|
1865
|
-
ATTRIBUTE_PARAMETER_TYPE,
|
1866
|
-
ATTRIBUTE_PARAMETER_VALUE,
|
1867
|
-
ATTRIBUTE_PLACEHOLDER,
|
1868
1825
|
ApiClientError,
|
1869
1826
|
BatchEntry,
|
1870
1827
|
CANVAS_DRAFT_STATE,
|
@@ -1917,7 +1874,6 @@ var CanvasClientError = import_api6.ApiClientError;
|
|
1917
1874
|
getChannelName,
|
1918
1875
|
getComponentJsonPointer,
|
1919
1876
|
getComponentPath,
|
1920
|
-
getParameterAttributes,
|
1921
1877
|
isAddComponentMessage,
|
1922
1878
|
isDismissPlaceholderMessage,
|
1923
1879
|
isMovingComponentMessage,
|
package/dist/index.mjs
CHANGED
@@ -1695,36 +1695,6 @@ var createUniformApiEnhancer = ({ apiUrl }) => {
|
|
1695
1695
|
};
|
1696
1696
|
};
|
1697
1697
|
|
1698
|
-
// src/utils/getParameterAttributes.ts
|
1699
|
-
var ATTRIBUTE_COMPONENT_ID = "data-uniform-component-id";
|
1700
|
-
var ATTRIBUTE_PARAMETER_ID = "data-uniform-parameter-id";
|
1701
|
-
var ATTRIBUTE_PARAMETER_VALUE = "data-uniform-parameter-value";
|
1702
|
-
var ATTRIBUTE_PARAMETER_TYPE = "data-uniform-parameter-type";
|
1703
|
-
var ATTRIBUTE_PLACEHOLDER = "data-uniform-placeholder";
|
1704
|
-
var ATTRIBUTE_MULTILINE = "data-uniform-is-multiline";
|
1705
|
-
var getParameterAttributes = ({
|
1706
|
-
id,
|
1707
|
-
component,
|
1708
|
-
placeholder,
|
1709
|
-
isMultiline = false
|
1710
|
-
}) => {
|
1711
|
-
var _a, _b, _c;
|
1712
|
-
const componentId = component == null ? void 0 : component._id;
|
1713
|
-
const parameter = (_a = component == null ? void 0 : component.parameters) == null ? void 0 : _a[id];
|
1714
|
-
const value = parameter == null ? void 0 : parameter.value;
|
1715
|
-
const type = parameter == null ? void 0 : parameter.type;
|
1716
|
-
const isEditable = (_c = (_b = parameter == null ? void 0 : parameter._contextualEditing) == null ? void 0 : _b.isEditable) != null ? _c : false;
|
1717
|
-
return {
|
1718
|
-
[ATTRIBUTE_COMPONENT_ID]: componentId,
|
1719
|
-
[ATTRIBUTE_PARAMETER_ID]: id,
|
1720
|
-
[ATTRIBUTE_PARAMETER_VALUE]: String(value != null ? value : ""),
|
1721
|
-
[ATTRIBUTE_PARAMETER_TYPE]: type,
|
1722
|
-
[ATTRIBUTE_PLACEHOLDER]: placeholder,
|
1723
|
-
[ATTRIBUTE_MULTILINE]: isMultiline,
|
1724
|
-
contentEditable: isEditable
|
1725
|
-
};
|
1726
|
-
};
|
1727
|
-
|
1728
1698
|
// src/utils/isSystemComponentDefinition.ts
|
1729
1699
|
var isSystemComponentDefinition = (componentType) => {
|
1730
1700
|
return componentType.startsWith("$");
|
@@ -1766,12 +1736,6 @@ function mapSlotToTestVariations(slot) {
|
|
1766
1736
|
import { ApiClientError } from "@uniformdev/context/api";
|
1767
1737
|
var CanvasClientError = ApiClientError;
|
1768
1738
|
export {
|
1769
|
-
ATTRIBUTE_COMPONENT_ID,
|
1770
|
-
ATTRIBUTE_MULTILINE,
|
1771
|
-
ATTRIBUTE_PARAMETER_ID,
|
1772
|
-
ATTRIBUTE_PARAMETER_TYPE,
|
1773
|
-
ATTRIBUTE_PARAMETER_VALUE,
|
1774
|
-
ATTRIBUTE_PLACEHOLDER,
|
1775
1739
|
ApiClientError,
|
1776
1740
|
BatchEntry,
|
1777
1741
|
CANVAS_DRAFT_STATE,
|
@@ -1824,7 +1788,6 @@ export {
|
|
1824
1788
|
getChannelName,
|
1825
1789
|
getComponentJsonPointer,
|
1826
1790
|
getComponentPath,
|
1827
|
-
getParameterAttributes,
|
1828
1791
|
isAddComponentMessage,
|
1829
1792
|
isDismissPlaceholderMessage,
|
1830
1793
|
isMovingComponentMessage,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.
|
3
|
+
"version": "19.33.1-alpha.10+468c89c72",
|
4
4
|
"description": "Common functionality and types for Uniform Canvas",
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
6
6
|
"main": "./dist/index.js",
|
@@ -38,7 +38,7 @@
|
|
38
38
|
"pusher-js": "8.2.0"
|
39
39
|
},
|
40
40
|
"dependencies": {
|
41
|
-
"@uniformdev/context": "19.
|
41
|
+
"@uniformdev/context": "19.33.1-alpha.10+468c89c72",
|
42
42
|
"immer": "9.0.21"
|
43
43
|
},
|
44
44
|
"files": [
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"publishConfig": {
|
48
48
|
"access": "public"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "468c89c7236b39c598fc7fcce5b318d23a1fbd55"
|
51
51
|
}
|