@vectoriox/iox-builder 1.6.9 → 1.6.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.
|
@@ -17,7 +17,7 @@ import { SelectModule } from 'primeng/select';
|
|
|
17
17
|
import { TooltipModule } from 'primeng/tooltip';
|
|
18
18
|
import { DialogModule } from 'primeng/dialog';
|
|
19
19
|
import * as i14 from '@vectoriox/iox-ui';
|
|
20
|
-
import { ComponentInstanceRegistryService, compileDeclarations, IS_PREVIEW, IoxPageModule } from '@vectoriox/iox-ui';
|
|
20
|
+
import { ComponentInstanceRegistryService, DEFAULT_WIDTH_BY_TYPE, compileDeclarations, IS_PREVIEW, IoxPageModule } from '@vectoriox/iox-ui';
|
|
21
21
|
export { ComponentInstanceRegistryService } from '@vectoriox/iox-ui';
|
|
22
22
|
import Lenis from 'lenis';
|
|
23
23
|
import { Subject, BehaviorSubject } from 'rxjs';
|
|
@@ -2086,6 +2086,12 @@ class ComponentConfig {
|
|
|
2086
2086
|
/** Override specific trait defaults after styleTraits are set.
|
|
2087
2087
|
* Call this at the end of each subclass constructor. */
|
|
2088
2088
|
applyStyleDefaults(defaults) {
|
|
2089
|
+
// Single source of truth for container-type width defaults: when a subclass does
|
|
2090
|
+
// not set width explicitly, fill it from the shared DEFAULT_WIDTH_BY_TYPE map — the
|
|
2091
|
+
// same map the SSR engine resolves from. See render-parity.md.
|
|
2092
|
+
if (defaults['width'] === undefined && DEFAULT_WIDTH_BY_TYPE[this.type] !== undefined) {
|
|
2093
|
+
defaults = { ...defaults, width: DEFAULT_WIDTH_BY_TYPE[this.type] };
|
|
2094
|
+
}
|
|
2089
2095
|
for (const group of this.styleTraits) {
|
|
2090
2096
|
for (const trait of group.traits) {
|
|
2091
2097
|
if (defaults[trait.name] !== undefined) {
|
|
@@ -7093,7 +7099,6 @@ class BuilderContainerComponentConfig extends ComponentConfig {
|
|
|
7093
7099
|
];
|
|
7094
7100
|
this.styleTraits = buildFullStyleTraits();
|
|
7095
7101
|
this.applyStyleDefaults({
|
|
7096
|
-
width: '100%',
|
|
7097
7102
|
height: 'auto',
|
|
7098
7103
|
minHeight: '200px',
|
|
7099
7104
|
display: 'block',
|
|
@@ -7108,7 +7113,6 @@ class BuilderDividerComponentConfig extends ComponentConfig {
|
|
|
7108
7113
|
this.traits = [];
|
|
7109
7114
|
this.styleTraits = buildFullStyleTraits();
|
|
7110
7115
|
this.applyStyleDefaults({
|
|
7111
|
-
width: '100%',
|
|
7112
7116
|
height: '1px',
|
|
7113
7117
|
backgroundColor: '#cccccc',
|
|
7114
7118
|
margin: '8px 0px 8px 0px',
|
|
@@ -7233,7 +7237,6 @@ class BuilderListItemComponentConfig extends ComponentConfig {
|
|
|
7233
7237
|
this.styleTraits = buildFullStyleTraits();
|
|
7234
7238
|
this.children = [];
|
|
7235
7239
|
this.applyStyleDefaults({
|
|
7236
|
-
width: '100%',
|
|
7237
7240
|
display: 'block',
|
|
7238
7241
|
backgroundColor: 'transparent',
|
|
7239
7242
|
});
|
|
@@ -7254,7 +7257,6 @@ class TextBlockComponentConfig extends ComponentConfig {
|
|
|
7254
7257
|
this.styleTraits = buildFullStyleTraits();
|
|
7255
7258
|
this.applyStyleDefaults({
|
|
7256
7259
|
display: 'block',
|
|
7257
|
-
width: '100%',
|
|
7258
7260
|
height: 'auto',
|
|
7259
7261
|
minHeight: '20px',
|
|
7260
7262
|
padding: '10px',
|
|
@@ -7287,7 +7289,6 @@ class BuilderListComponentConfig extends ComponentConfig {
|
|
|
7287
7289
|
this.makeListItem(),
|
|
7288
7290
|
];
|
|
7289
7291
|
this.applyStyleDefaults({
|
|
7290
|
-
width: '100%',
|
|
7291
7292
|
display: 'block',
|
|
7292
7293
|
backgroundColor: 'transparent',
|
|
7293
7294
|
padding: '0px 0px 0px 24px',
|
|
@@ -7325,7 +7326,6 @@ class RepeaterComponentConfig extends ComponentConfig {
|
|
|
7325
7326
|
];
|
|
7326
7327
|
this.styleTraits = buildFullStyleTraits();
|
|
7327
7328
|
this.applyStyleDefaults({
|
|
7328
|
-
width: '100%',
|
|
7329
7329
|
height: 'auto',
|
|
7330
7330
|
});
|
|
7331
7331
|
}
|
|
@@ -7494,9 +7494,7 @@ class SliderContainerConfig extends ComponentConfig {
|
|
|
7494
7494
|
new BackgroundGroupStyleConfig(),
|
|
7495
7495
|
new EffectsGroupStyleConfig(),
|
|
7496
7496
|
];
|
|
7497
|
-
this.applyStyleDefaults({
|
|
7498
|
-
width: '100%',
|
|
7499
|
-
});
|
|
7497
|
+
this.applyStyleDefaults({});
|
|
7500
7498
|
}
|
|
7501
7499
|
}
|
|
7502
7500
|
|
|
@@ -7506,7 +7504,6 @@ class BuilderSpacerComponentConfig extends ComponentConfig {
|
|
|
7506
7504
|
this.traits = [];
|
|
7507
7505
|
this.styleTraits = buildFullStyleTraits();
|
|
7508
7506
|
this.applyStyleDefaults({
|
|
7509
|
-
width: '100%',
|
|
7510
7507
|
height: '40px',
|
|
7511
7508
|
});
|
|
7512
7509
|
}
|