@orangelogic/design-system 2.224.0 → 2.225.0-beta-42DA0Z

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.224.0",
4
+ "version": "2.225.0-beta-42DA0Z",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {
@@ -3,7 +3,8 @@ export type CxContentBuilderTranslatableValueChangeEvent = CustomEvent<{
3
3
  values: Array<{
4
4
  attribute: string;
5
5
  type: 'attribute';
6
- value: string;
6
+ /** Text controls send a string; `switch` controls send their boolean (or configured checked/unchecked) value. */
7
+ value: string | boolean;
7
8
  }>;
8
9
  }>;
9
10
  declare global {
@@ -108,9 +108,15 @@ export default class CxSbImage extends CxImage {
108
108
  * A description of the image used by assistive devices in dark mode.
109
109
  */
110
110
  altDarkMode: string;
111
- /** Whether to use authored alt text instead of asset metadata. */
111
+ /**
112
+ * Whether to use authored alt text instead of asset metadata.
113
+ * Translatable per language, so `"false"` is read as off (see `translatableBooleanConverter`).
114
+ */
112
115
  useCustomAlt: boolean;
113
- /** Whether to use authored alt text for the dark-mode image. */
116
+ /**
117
+ * Whether to use authored alt text for the dark-mode image.
118
+ * Translatable per language, so `"false"` is read as off (see `translatableBooleanConverter`).
119
+ */
114
120
  useCustomAltDarkMode: boolean;
115
121
  altSourceField: string;
116
122
  /**
@@ -312,6 +318,8 @@ export default class CxSbImage extends CxImage {
312
318
  * record whose extension never arrives does not block `srcset` indefinitely.
313
319
  */
314
320
  private applyExtensionFromAssetData;
321
+ /** Whether the URL is a backend asset link, the only kind that can carry a `/t/` segment. */
322
+ private static isAssetLinkUrl;
315
323
  /**
316
324
  * Uses the fetched proxy URL for Auto instead of trusting the proxy encoded in a
317
325
  * persisted `src`. Older blocks may still hold a valid TRX URL even though Auto now
@@ -37,5 +37,13 @@ export declare class ConfigFormController implements ReactiveController {
37
37
  private renderControl;
38
38
  private renderBasicControl;
39
39
  renderBasicControls(configs: PropertyConfig[], parent?: PropertyConfig, tab?: TabType): TemplateResult<1>;
40
+ /**
41
+ * The attributes a translation row resolves its values from: the block attributes for the
42
+ * default language, otherwise that language's translations falling back to the default
43
+ * language's translations and then the block attributes (same order as the row's value).
44
+ */
45
+ private getTranslationAttributes;
46
+ /** Whether a translatable control is shown for one language, given that language's attributes. */
47
+ private isTranslationControlVisible;
40
48
  renderTranslationControls(): TemplateResult<1>;
41
49
  }
@@ -186,7 +186,7 @@ export default class CxConfigForm extends CortexElement {
186
186
  * This is used to store the values of the translatable controls.
187
187
  * @default []
188
188
  */
189
- translatableControlValues: Record<string, Record<string, string>>;
189
+ translatableControlValues: Record<string, Record<string, string | boolean>>;
190
190
  /**
191
191
  * The default language of the translatable controls.
192
192
  * This is used to store the default language of the translatable controls.
@@ -13,7 +13,7 @@ export type CxContentBuilderConfigureEvent = CustomEvent<{
13
13
  attributes: Record<string, string>;
14
14
  properties?: Record<string, unknown>;
15
15
  styleProps: StyleProps;
16
- translations: Record<string, Record<string, string>>;
16
+ translations: Record<string, Record<string, string | boolean>>;
17
17
  };
18
18
  templateId: string;
19
19
  }>;
@@ -198,7 +198,7 @@ export default class CxConfigManager extends CortexElement {
198
198
  * This is used to store the values of the translatable controls.
199
199
  * @default {}
200
200
  */
201
- translatableControlValuesMap: Record<string, Record<string, string>>;
201
+ translatableControlValuesMap: Record<string, Record<string, string | boolean>>;
202
202
  /**
203
203
  * The list of input controls to render in the configuration form.
204
204
  * These are the input controls that will support multiple languages.
@@ -277,7 +277,7 @@ export default class CxContentBuilder extends CortexElement {
277
277
  private canBackfillDefaultLanguageTextRecord;
278
278
  private hasDefaultLanguageAttributeRecord;
279
279
  storeTranslatableText(id: string, data: string, options?: TranslatableTextRecordOptions): void;
280
- storeTranslatableAttribute(id: string, data: Record<string, Record<string, string>>): void;
280
+ storeTranslatableAttribute(id: string, data: Record<string, Record<string, string | boolean>>): void;
281
281
  private updateFrameSize;
282
282
  handleSupportedLanguagesChange(): void;
283
283
  handleDeviceChange(): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orangelogic/design-system",
3
3
  "type": "module",
4
- "version": "2.224.0",
4
+ "version": "2.225.0-beta-42DA0Z",
5
5
  "license": "UNLICENSED",
6
6
  "types": "library/types.d.ts",
7
7
  "scripts": {