@uniformdev/canvas 20.86.1-alpha.3.sha-954b5d18f0 → 20.87.0

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.mjs CHANGED
@@ -225,7 +225,6 @@ var CANVAS_PERSONALIZE_TYPE = "$personalization";
225
225
  var CANVAS_TEST_TYPE = "$test";
226
226
  var CANVAS_LOCALIZATION_TYPE = "$localization";
227
227
  var CANVAS_SLOT_SECTION_TYPE = "$slotSection";
228
- var CANVAS_LOOP_TYPE = "$loop";
229
228
  var CANVAS_INTENT_TAG_PARAM = "intentTag";
230
229
  var CANVAS_LOCALE_TAG_PARAM = "locale";
231
230
  var CANVAS_BLOCK_PARAM_TYPE = "$block";
@@ -233,9 +232,6 @@ var CANVAS_PERSONALIZE_SLOT = "pz";
233
232
  var CANVAS_TEST_SLOT = "test";
234
233
  var CANVAS_LOCALIZATION_SLOT = "localized";
235
234
  var CANVAS_SLOT_SECTION_SLOT = "$slotSectionItems";
236
- var CANVAS_LOOP_SLOT = "body";
237
- var CANVAS_LOOP_DATA_TYPE = "sys-reserved-loop";
238
- var CANVAS_ALIAS_DATA_TYPE = "sys-reserved-alias";
239
235
  var CANVAS_SLOT_SECTION_NAME_PARAM = "name";
240
236
  var CANVAS_SLOT_SECTION_MIN_PARAM = "min";
241
237
  var CANVAS_SLOT_SECTION_MAX_PARAM = "max";
@@ -4063,236 +4059,11 @@ function handleRichTextNodeBinding(object, options) {
4063
4059
  return void 0;
4064
4060
  }
4065
4061
 
4066
- // src/utils/wellKnownSystemComponentParameters.ts
4067
- var wellKnownSystemComponentParameters = [
4068
- {
4069
- id: CANVAS_COMPONENT_DISPLAY_NAME_PARAM,
4070
- name: "Display Name",
4071
- type: "text"
4072
- },
4073
- {
4074
- id: CANVAS_INTENT_TAG_PARAM,
4075
- name: "Intent Tag",
4076
- type: "intentTag"
4077
- },
4078
- {
4079
- id: CANVAS_LOCALE_TAG_PARAM,
4080
- name: "Locale Visibility",
4081
- type: "localeSelect"
4082
- },
4083
- {
4084
- id: CANVAS_PERSONALIZATION_PARAM,
4085
- name: "Personalization Criteria",
4086
- type: CANVAS_PERSONALIZATION_PARAM
4087
- },
4088
- {
4089
- id: CANVAS_ENRICHMENT_TAG_PARAM,
4090
- name: "Enrichment Tags",
4091
- type: CANVAS_ENRICHMENT_TAG_PARAM,
4092
- helpText: "Seeing this component will increase a visitor's score in these enrichments."
4093
- },
4094
- {
4095
- id: CANVAS_TEST_VARIANT_PARAM,
4096
- name: "A/B Test",
4097
- type: "testVariant"
4098
- },
4099
- {
4100
- id: CANVAS_VIZ_CONTROL_PARAM,
4101
- name: "Visibility Control",
4102
- type: CANVAS_VIZ_CONTROL_PARAM
4103
- }
4104
- ];
4105
-
4106
- // src/utils/wellKnownSystemComponents.ts
4107
- var wellKnownSystemComponents = [
4108
- {
4109
- id: CANVAS_PERSONALIZE_TYPE,
4110
- name: "Personalization",
4111
- icon: "track",
4112
- titleParameter: CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
4113
- description: "Contains components that will be shown to visitors based on configurable personalization criteria.",
4114
- slots: [
4115
- {
4116
- id: CANVAS_PERSONALIZE_SLOT,
4117
- inheritAllowedComponents: true,
4118
- name: "Personalized Variations",
4119
- allowedComponents: []
4120
- }
4121
- ],
4122
- parameters: [
4123
- {
4124
- id: CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
4125
- name: "Analytics tracking name",
4126
- type: "text",
4127
- typeConfig: {
4128
- required: true,
4129
- caption: "Will be sent to your analytics tool. We recommend not changing this once the composition is published."
4130
- }
4131
- },
4132
- {
4133
- id: CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
4134
- name: "Selection method",
4135
- type: CANVAS_PERSONALIZATION_ALGORITHM_TYPE,
4136
- typeConfig: {
4137
- required: true
4138
- }
4139
- },
4140
- {
4141
- id: CANVAS_PERSONALIZATION_TAKE_PARAM,
4142
- name: "Number of variations to select",
4143
- type: "number",
4144
- typeConfig: {
4145
- regex: "^[0-9]+$",
4146
- regexMessage: "Please enter a whole number",
4147
- placeholder: "1"
4148
- }
4149
- },
4150
- {
4151
- id: CANVAS_HYPOTHESIS_PARAM,
4152
- name: "Hypothesis",
4153
- type: "richText",
4154
- typeConfig: {
4155
- formatting: {
4156
- builtIn: ["bold", "italic", "underline"]
4157
- },
4158
- elements: {
4159
- builtIn: ["unorderedList", "orderedList"]
4160
- }
4161
- },
4162
- helpText: "Document the hypothesis or reasoning behind this personalization strategy.",
4163
- guidance: "Document the hypothesis or reasoning behind this personalization strategy. Not localizable; do not pass a locale when editing."
4164
- }
4165
- ]
4166
- },
4167
- {
4168
- id: CANVAS_TEST_TYPE,
4169
- name: "A/B Test",
4170
- icon: "style",
4171
- titleParameter: "test",
4172
- description: "Contains components that will be shown to visitors randomly based on a configurable traffic split.",
4173
- slots: [
4174
- {
4175
- id: CANVAS_TEST_SLOT,
4176
- inheritAllowedComponents: true,
4177
- name: "Test Variations",
4178
- allowedComponents: []
4179
- }
4180
- ],
4181
- parameters: [
4182
- {
4183
- id: "test",
4184
- name: "Test name",
4185
- type: "testSelect"
4186
- },
4187
- {
4188
- id: CANVAS_HYPOTHESIS_PARAM,
4189
- name: "Hypothesis",
4190
- type: "richText",
4191
- typeConfig: {
4192
- formatting: {
4193
- builtIn: ["bold", "italic", "underline"]
4194
- },
4195
- elements: {
4196
- builtIn: ["unorderedList", "orderedList"]
4197
- }
4198
- },
4199
- helpText: "Document the hypothesis or expected outcome of this A/B test.",
4200
- guidance: "Document the hypothesis or expected outcome of this A/B test. Not localizable; do not pass a locale when editing."
4201
- }
4202
- ]
4203
- },
4204
- {
4205
- id: CANVAS_LOCALIZATION_TYPE,
4206
- name: "Localization",
4207
- icon: "globe-alt",
4208
- description: "Contains components that will be shown based on visitor locale.",
4209
- slots: [
4210
- {
4211
- id: CANVAS_LOCALIZATION_SLOT,
4212
- inheritAllowedComponents: true,
4213
- name: "Localized Variations",
4214
- allowedComponents: []
4215
- }
4216
- ]
4217
- },
4218
- {
4219
- id: CANVAS_LOOP_TYPE,
4220
- name: "Loop",
4221
- icon: "repeat",
4222
- description: "Contains components that will be repeated for each item in a list (array) selected from a data resource.",
4223
- slots: [
4224
- {
4225
- id: CANVAS_LOOP_SLOT,
4226
- inheritAllowedComponents: true,
4227
- name: "Body",
4228
- minComponents: 1,
4229
- allowedComponents: []
4230
- }
4231
- ]
4232
- },
4233
- {
4234
- id: CANVAS_SLOT_SECTION_TYPE,
4235
- name: "Slot Section",
4236
- icon: "copy-all",
4237
- titleParameter: CANVAS_SLOT_SECTION_NAME_PARAM,
4238
- description: "When using this pattern, new components may be added at the location where this component is inserted.",
4239
- slots: [
4240
- {
4241
- id: CANVAS_SLOT_SECTION_SLOT,
4242
- inheritAllowedComponents: true,
4243
- name: "Items",
4244
- allowedComponents: []
4245
- }
4246
- ],
4247
- parameters: [
4248
- {
4249
- id: CANVAS_SLOT_SECTION_NAME_PARAM,
4250
- name: "Name",
4251
- type: "text"
4252
- },
4253
- {
4254
- id: CANVAS_SLOT_SECTION_MIN_PARAM,
4255
- name: "Minimum",
4256
- type: "text"
4257
- },
4258
- {
4259
- id: CANVAS_SLOT_SECTION_MAX_PARAM,
4260
- name: "Maximum",
4261
- type: "text"
4262
- },
4263
- {
4264
- id: CANVAS_SLOT_SECTION_GROUP_TYPE_PARAM,
4265
- name: "Group Type",
4266
- type: "text"
4267
- },
4268
- {
4269
- id: CANVAS_SLOT_SECTION_SPECIFIC_PARAM,
4270
- name: "Specific",
4271
- type: "array"
4272
- }
4273
- ]
4274
- }
4275
- ];
4276
- var systemComponentsMetadata = {
4277
- $personalization: void 0,
4278
- $test: void 0,
4279
- $localization: void 0,
4280
- $loop: void 0,
4281
- $slotSection: {
4282
- isAutoAllowed: true,
4283
- isOnlyAllowedInPatternEditor: true
4284
- }
4285
- };
4286
- var getComponentMetadata = (type) => {
4287
- const metadata = systemComponentsMetadata[type];
4288
- return metadata;
4289
- };
4290
-
4291
4062
  // src/index.ts
4292
4063
  import { ApiClientError as ApiClientError5 } from "@uniformdev/context/api";
4293
4064
 
4294
4065
  // src/.version.ts
4295
- var version = "20.86.0";
4066
+ var version = "20.87.0";
4296
4067
 
4297
4068
  // src/WorkflowClient.ts
4298
4069
  import { ApiClient as ApiClient18 } from "@uniformdev/context/api";
@@ -4350,7 +4121,6 @@ export {
4350
4121
  ApiClientError5 as ApiClientError,
4351
4122
  BatchEntry,
4352
4123
  BlockFormatError,
4353
- CANVAS_ALIAS_DATA_TYPE,
4354
4124
  CANVAS_BLOCK_PARAM_TYPE,
4355
4125
  CANVAS_COMPONENT_DISPLAY_NAME_PARAM,
4356
4126
  CANVAS_CONTEXTUAL_EDITING_PARAM,
@@ -4363,9 +4133,6 @@ export {
4363
4133
  CANVAS_LOCALE_TAG_PARAM,
4364
4134
  CANVAS_LOCALIZATION_SLOT,
4365
4135
  CANVAS_LOCALIZATION_TYPE,
4366
- CANVAS_LOOP_DATA_TYPE,
4367
- CANVAS_LOOP_SLOT,
4368
- CANVAS_LOOP_TYPE,
4369
4136
  CANVAS_PERSONALIZATION_ALGORITHM_PARAM,
4370
4137
  CANVAS_PERSONALIZATION_ALGORITHM_TYPE,
4371
4138
  CANVAS_PERSONALIZATION_EVENT_NAME_PARAM,
@@ -4469,7 +4236,6 @@ export {
4469
4236
  generateHash,
4470
4237
  getBlockValue,
4471
4238
  getComponentJsonPointer,
4472
- getComponentMetadata,
4473
4239
  getComponentPath,
4474
4240
  getDataSourceVariantFromRouteGetParams,
4475
4241
  getEffectivePropertyValue,
@@ -4521,10 +4287,7 @@ export {
4521
4287
  parseVariableExpression,
4522
4288
  projectionToQuery,
4523
4289
  queryToProjection,
4524
- systemComponentsMetadata,
4525
4290
  version,
4526
4291
  walkNodeTree,
4527
- walkPropertyValues,
4528
- wellKnownSystemComponentParameters,
4529
- wellKnownSystemComponents
4292
+ walkPropertyValues
4530
4293
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "20.86.1-alpha.3.sha-954b5d18f0",
3
+ "version": "20.87.0",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -25,6 +25,7 @@
25
25
  "dev:ts": "tsup --watch",
26
26
  "clean": "rimraf dist",
27
27
  "test": "run-s create-version test:run",
28
+ "lint": "tsc7 --noEmit",
28
29
  "test:run": "vitest run",
29
30
  "format": "prettier --write \"src/**/*.{js,ts,tsx}\"",
30
31
  "update-openapi": "tsx ./scripts/update-openapi.cts",
@@ -33,12 +34,12 @@
33
34
  },
34
35
  "devDependencies": {
35
36
  "@types/retry": "0.12.5",
36
- "svix": "1.96.0"
37
+ "@uniformdev/tsc7": "20.87.0"
37
38
  },
38
39
  "dependencies": {
39
- "@uniformdev/assets": "20.86.1-alpha.3.sha-954b5d18f0",
40
- "@uniformdev/context": "20.86.1-alpha.3.sha-954b5d18f0",
41
- "@uniformdev/richtext": "20.86.1-alpha.3.sha-954b5d18f0",
40
+ "@uniformdev/assets": "20.87.0",
41
+ "@uniformdev/context": "20.87.0",
42
+ "@uniformdev/richtext": "20.87.0",
42
43
  "immer": "10.2.0",
43
44
  "p-limit": "6.2.0",
44
45
  "p-retry": "6.2.1",
@@ -50,5 +51,5 @@
50
51
  "publishConfig": {
51
52
  "access": "public"
52
53
  },
53
- "gitHead": "954b5d18f0235b18993830683b1fd861d6569bd0"
54
+ "gitHead": "7dd72324381089a6fdfd46fe0e99f5aeb5f22b18"
54
55
  }