@orangelogic/design-system 2.224.0 → 2.225.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/library/components/types.js +9335 -9276
- package/library/package.json +1 -1
- package/library/packages/events/src/cx-content-builder-translatable-value-change.d.ts +2 -1
- package/library/packages/organisms/src/content-builder/blocks/image/image.d.ts +8 -2
- package/library/packages/organisms/src/content-builder/components/config-form/config-form-controller.d.ts +8 -0
- package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts +1 -1
- package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts +2 -2
- package/library/packages/organisms/src/content-builder/content-builder.d.ts +1 -1
- package/package.json +1 -1
package/library/package.json
CHANGED
|
@@ -3,7 +3,8 @@ export type CxContentBuilderTranslatableValueChangeEvent = CustomEvent<{
|
|
|
3
3
|
values: Array<{
|
|
4
4
|
attribute: string;
|
|
5
5
|
type: 'attribute';
|
|
6
|
-
|
|
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
|
-
/**
|
|
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
|
-
/**
|
|
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
|
/**
|
|
@@ -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
|
}
|
package/library/packages/organisms/src/content-builder/components/config-form/config-form.d.ts
CHANGED
|
@@ -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.
|
package/library/packages/organisms/src/content-builder/components/config-manager/config-manager.d.ts
CHANGED
|
@@ -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;
|