@veloceapps/sdk 7.0.0-0 → 7.0.0-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/bundles/veloceapps-sdk-cms.umd.js +138 -20
- package/bundles/veloceapps-sdk-cms.umd.js.map +1 -1
- package/bundles/veloceapps-sdk.umd.js.map +1 -1
- package/cms/cms.actions.d.ts +10 -0
- package/cms/cms.elements.d.ts +1 -1
- package/cms/cms.layouts.d.ts +4 -0
- package/cms/components/preview/preview.component.d.ts +3 -2
- package/cms/plugins/region.plugin.d.ts +17 -0
- package/cms/types/common.types.d.ts +9 -2
- package/cms/types/index.d.ts +0 -1
- package/cms/types/layouts.types.d.ts +74 -0
- package/cms/utils/element.utils.d.ts +1 -1
- package/cms/vendor-map.d.ts +1 -0
- package/esm2015/cms/cms.actions.js +15 -1
- package/esm2015/cms/cms.elements.js +12 -1
- package/esm2015/cms/cms.layouts.js +179 -0
- package/esm2015/cms/components/preview/preview.component.js +23 -6
- package/esm2015/cms/plugins/region.plugin.js +58 -0
- package/esm2015/cms/types/common.types.js +1 -1
- package/esm2015/cms/types/index.js +1 -2
- package/esm2015/cms/types/layouts.types.js +2 -0
- package/esm2015/cms/utils/element.utils.js +10 -14
- package/esm2015/cms/utils/elements-resolver.js +8 -2
- package/esm2015/src/components/header/metrics/metrics.component.js +2 -2
- package/esm2015/src/types/index.js +2 -1
- package/esm2015/{cms → src}/types/metrics.types.js +1 -1
- package/fesm2015/veloceapps-sdk-cms.js +292 -21
- package/fesm2015/veloceapps-sdk-cms.js.map +1 -1
- package/fesm2015/veloceapps-sdk.js.map +1 -1
- package/package.json +2 -2
- package/src/components/header/metrics/metrics.component.d.ts +1 -1
- package/src/types/index.d.ts +1 -0
- /package/{cms → src}/types/metrics.types.d.ts +0 -0
@@ -1,10 +1,10 @@
|
|
1
1
|
import { __decorate, __param, __awaiter, __rest } from 'tslib';
|
2
2
|
import * as i0 from '@angular/core';
|
3
|
-
import { InjectionToken, Component, ChangeDetectionStrategy, Inject, Injector, Injectable, ViewContainerRef, SkipSelf, ViewChild, Input, ViewEncapsulation, NgModule, Directive } from '@angular/core';
|
3
|
+
import { InjectionToken, Component, ChangeDetectionStrategy, Inject, Injector, Injectable, ViewContainerRef, SkipSelf, ViewChild, Input, ViewEncapsulation, NgModule, Directive, ElementRef } from '@angular/core';
|
4
4
|
import * as rxjs from 'rxjs';
|
5
5
|
import { BehaviorSubject, Subject, of, map, tap, switchMap, startWith, distinctUntilChanged, filter, ReplaySubject, noop, take, Observable, takeUntil, forkJoin, catchError, combineLatest, from } from 'rxjs';
|
6
6
|
import * as lodash from 'lodash';
|
7
|
-
import { compact, isArray, pull, flatten, set, kebabCase, cloneDeep } from 'lodash';
|
7
|
+
import { compact, isArray, pull, merge, omit, flatten, set, kebabCase, cloneDeep } from 'lodash';
|
8
8
|
import { applyPatch } from 'rfc6902';
|
9
9
|
import * as i2 from '@veloceapps/sdk/core';
|
10
10
|
import { ConfigurationService, LineItemWorker, generateLineItem, getAttributeValue, QuoteDraftService, FlowConfigurationService, ProductImagesService, ContextService, lineItemUtils, SdkCoreModule, UI_DEFINITION_VERSION } from '@veloceapps/sdk/core';
|
@@ -66,6 +66,20 @@ const SwitchObjectAction = (payload) => ({
|
|
66
66
|
type: FlowAction.FLOW_SWITCH_OBJECT,
|
67
67
|
payload,
|
68
68
|
});
|
69
|
+
var CmsAction;
|
70
|
+
(function (CmsAction) {
|
71
|
+
CmsAction.GO_TO_PAGE = '[CMS]_GO_TO_PAGE';
|
72
|
+
/**
|
73
|
+
* Navigate UI definition to a specific page
|
74
|
+
*
|
75
|
+
* @param pageName name of the page
|
76
|
+
* @returns void
|
77
|
+
*/
|
78
|
+
CmsAction.GoToPage = (pageName) => ({
|
79
|
+
type: CmsAction.GO_TO_PAGE,
|
80
|
+
payload: { pageName },
|
81
|
+
});
|
82
|
+
})(CmsAction || (CmsAction = {}));
|
69
83
|
|
70
84
|
var cmsActions = /*#__PURE__*/Object.freeze({
|
71
85
|
__proto__: null,
|
@@ -78,7 +92,8 @@ var cmsActions = /*#__PURE__*/Object.freeze({
|
|
78
92
|
CloseDocGenAction: CloseDocGenAction,
|
79
93
|
RemoteApplyAction: RemoteApplyAction,
|
80
94
|
RemoteCancelAction: RemoteCancelAction,
|
81
|
-
SwitchObjectAction: SwitchObjectAction
|
95
|
+
SwitchObjectAction: SwitchObjectAction,
|
96
|
+
get CmsAction () { return CmsAction; }
|
82
97
|
});
|
83
98
|
|
84
99
|
const DEFAULT_PLUGINS_TOKEN = new InjectionToken('DEFAULT_PLUGINS_TOKEN');
|
@@ -692,9 +707,23 @@ class PreviewComponent {
|
|
692
707
|
this.integrationState = integrationState;
|
693
708
|
this.cdr = cdr;
|
694
709
|
this.state$ = new BehaviorSubject({ loading: true, failure: false });
|
695
|
-
this.elements = [];
|
696
710
|
this.destroy$ = new Subject();
|
697
711
|
this.runtimeService.updated$.pipe(takeUntil(this.destroy$)).subscribe(() => this.cdr.detectChanges());
|
712
|
+
this.elements$ = this.state$.pipe(switchMap(({ loading, failure }) => {
|
713
|
+
var _a, _b;
|
714
|
+
if (loading || failure) {
|
715
|
+
return of([]);
|
716
|
+
}
|
717
|
+
const elements = this.runtimeService.applicationTree;
|
718
|
+
// If UI definition contains pages, return page by SelectedPageName
|
719
|
+
if ((_b = (_a = this.uiDefinition) === null || _a === void 0 ? void 0 : _a.pages) === null || _b === void 0 ? void 0 : _b.length) {
|
720
|
+
return this.integrationState.listen$(CmsAction.GO_TO_PAGE).pipe(map(({ pageName }) => pageName), startWith(elements[0].name), distinctUntilChanged(), map(pageName => {
|
721
|
+
const page = elements.find(el => el.name === pageName);
|
722
|
+
return page ? [page] : elements.slice(0, 1);
|
723
|
+
}));
|
724
|
+
}
|
725
|
+
return of(elements);
|
726
|
+
}));
|
698
727
|
}
|
699
728
|
ngOnInit() {
|
700
729
|
var _a;
|
@@ -709,6 +738,9 @@ class PreviewComponent {
|
|
709
738
|
this.configurationService.reset();
|
710
739
|
this.runtimeService.clear();
|
711
740
|
}
|
741
|
+
trackBy(_, el) {
|
742
|
+
return el.path;
|
743
|
+
}
|
712
744
|
initializeConfiguration$() {
|
713
745
|
const isAlreadyInitialized = this.configurationRuntimeService.isInitialized;
|
714
746
|
if (!this.uiDefinition || this.uiDefinition.type !== 'CONFIGURATION' || isAlreadyInitialized) {
|
@@ -728,8 +760,7 @@ class PreviewComponent {
|
|
728
760
|
return;
|
729
761
|
}
|
730
762
|
forkJoin([this.runtimeService.initialize$(this.uiDefinition, this.config), this.initializeConfiguration$()])
|
731
|
-
.pipe(tap((
|
732
|
-
this.elements = elements;
|
763
|
+
.pipe(tap(() => {
|
733
764
|
this.state$.next({ loading: false, failure: false });
|
734
765
|
}), catchError(error => {
|
735
766
|
var _a, _b;
|
@@ -744,7 +775,7 @@ class PreviewComponent {
|
|
744
775
|
}
|
745
776
|
}
|
746
777
|
PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PreviewComponent, deps: [{ token: RuntimeService }, { token: i2.ConfigurationService }, { token: i3.MessageService }, { token: i2.ConfigurationRuntimeService }, { token: IntegrationState }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
747
|
-
PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition", config: "config" }, providers: [IOProviderService, TemplatesService], ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer
|
778
|
+
PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: PreviewComponent, selector: "vl-cms-preview", inputs: { modelId: "modelId", uiDefinition: "uiDefinition", config: "config" }, providers: [IOProviderService, TemplatesService], ngImport: i0, template: "<ng-container *ngIf=\"state$ | async as state\">\n <vl-loader *ngIf=\"state.loading; else content\" [label]=\"'Loading UI'\"></vl-loader>\n\n <ng-template #content>\n <ng-container *ngIf=\"!state.failure\">\n <vl-cms-element-renderer\n *ngFor=\"let el of elements$ | async; trackBy: trackBy\"\n [meta]=\"el\"\n ></vl-cms-element-renderer>\n </ng-container>\n </ng-template>\n</ng-container>\n", styles: [":host{flex-grow:1;display:flex;flex-direction:column;height:100%}\n"], components: [{ type: i1.LoaderComponent, selector: "vl-loader", inputs: ["label", "overlayVisible"] }, { type: ElementRendererComponent, selector: "vl-cms-element-renderer", inputs: ["meta"] }], directives: [{ type: i7.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], pipes: { "async": i7.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.ShadowDom });
|
748
779
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: PreviewComponent, decorators: [{
|
749
780
|
type: Component,
|
750
781
|
args: [{
|
@@ -962,6 +993,56 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
962
993
|
type: Directive
|
963
994
|
}], ctorParameters: function () { return [{ type: ElementComponent }]; } });
|
964
995
|
|
996
|
+
class RegionPlugin {
|
997
|
+
constructor(host) {
|
998
|
+
this.host = host;
|
999
|
+
this.destroy$ = new Subject();
|
1000
|
+
this.metadata = this.host.injector.get(ELEMENT_METADATA);
|
1001
|
+
this.document = this.host.injector.get(DOCUMENT);
|
1002
|
+
this.el = this.host.injector.get(ElementRef);
|
1003
|
+
const runtimeEditorService = this.host.injector.get(RuntimeEditorService);
|
1004
|
+
runtimeEditorService.editorMode$
|
1005
|
+
.pipe(tap(editMode => {
|
1006
|
+
var _a;
|
1007
|
+
this.el.nativeElement.style.outline = editMode ? 'solid 1px #dce5ef' : '';
|
1008
|
+
if (editMode && !this.metadata.children.length) {
|
1009
|
+
this.addRegionName();
|
1010
|
+
}
|
1011
|
+
else {
|
1012
|
+
(_a = this.regionNameEl) === null || _a === void 0 ? void 0 : _a.remove();
|
1013
|
+
}
|
1014
|
+
}), takeUntil(this.destroy$))
|
1015
|
+
.subscribe();
|
1016
|
+
}
|
1017
|
+
ngOnDestroy() {
|
1018
|
+
this.destroy$.next();
|
1019
|
+
this.destroy$.complete();
|
1020
|
+
}
|
1021
|
+
addRegionName() {
|
1022
|
+
if (this.regionNameEl) {
|
1023
|
+
this.regionNameEl.remove();
|
1024
|
+
}
|
1025
|
+
this.regionNameEl = this.document.createElement('div');
|
1026
|
+
this.regionNameEl.innerHTML = this.metadata.name;
|
1027
|
+
merge(this.regionNameEl.style, {
|
1028
|
+
width: '100%',
|
1029
|
+
height: '100%',
|
1030
|
+
display: 'flex',
|
1031
|
+
justifyContent: 'center',
|
1032
|
+
alignItems: 'center',
|
1033
|
+
color: '#AEB5BD',
|
1034
|
+
pointerEvents: 'none',
|
1035
|
+
userSelect: 'none',
|
1036
|
+
});
|
1037
|
+
this.el.nativeElement.append(this.regionNameEl);
|
1038
|
+
}
|
1039
|
+
}
|
1040
|
+
RegionPlugin.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RegionPlugin, deps: [{ token: ElementComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
1041
|
+
RegionPlugin.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: RegionPlugin, ngImport: i0 });
|
1042
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0, type: RegionPlugin, decorators: [{
|
1043
|
+
type: Directive
|
1044
|
+
}], ctorParameters: function () { return [{ type: ElementComponent }]; } });
|
1045
|
+
|
965
1046
|
class ScriptPlugin {
|
966
1047
|
constructor(host) {
|
967
1048
|
this.host = host;
|
@@ -1046,6 +1127,16 @@ const CONFIG = {
|
|
1046
1127
|
plugins: [IOPlugin, ScriptPlugin],
|
1047
1128
|
suppressTemplate: true,
|
1048
1129
|
},
|
1130
|
+
PAGE: {
|
1131
|
+
component: ElementComponent,
|
1132
|
+
defaultTemplate: '<element-children></element-children>',
|
1133
|
+
plugins: [IOPlugin, ScriptPlugin],
|
1134
|
+
},
|
1135
|
+
REGION: {
|
1136
|
+
component: ElementComponent,
|
1137
|
+
defaultTemplate: '<element-children></element-children>',
|
1138
|
+
plugins: [IOPlugin, ScriptPlugin, RegionPlugin],
|
1139
|
+
},
|
1049
1140
|
};
|
1050
1141
|
|
1051
1142
|
const EXPORTED_CLASS_REGEX = /export class (\S+)/;
|
@@ -1072,18 +1163,14 @@ const elementToMetadata = (el, parentPath) => {
|
|
1072
1163
|
styles, children: el.children.map(child => elementToMetadata(child, path)) });
|
1073
1164
|
};
|
1074
1165
|
const metadataToElement = (metadata, recursive = true) => {
|
1075
|
-
const
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
outputs: metadata.outputs,
|
1084
|
-
children: metadata.children.map(({ name }) => name),
|
1085
|
-
configuredStyles: metadata.configuredStyles,
|
1086
|
-
};
|
1166
|
+
const cleanMetadata = omit(metadata, [
|
1167
|
+
'path',
|
1168
|
+
'template',
|
1169
|
+
'styles',
|
1170
|
+
'script',
|
1171
|
+
'metadata',
|
1172
|
+
]);
|
1173
|
+
const elMetadata = Object.assign(Object.assign({}, cleanMetadata), { children: metadata.children.map(({ name }) => name) });
|
1087
1174
|
const normalizedElMetadata = normalizeElementMetadata(elMetadata);
|
1088
1175
|
if (!metadata.script || !EXPORTED_CLASS_REGEX.test(metadata.script)) {
|
1089
1176
|
throw new UiBuildError(`'${metadata.name}' component script is missing an exported class`, metadata);
|
@@ -1311,6 +1398,185 @@ const DEFAULT_PLUGINS = {
|
|
1311
1398
|
DEFAULT: [],
|
1312
1399
|
};
|
1313
1400
|
|
1401
|
+
const LAYOUT = {
|
1402
|
+
LAYOUT_1: {
|
1403
|
+
styles: `
|
1404
|
+
/* start of LAYOUT_1 styles */
|
1405
|
+
:host {
|
1406
|
+
height: 100%;
|
1407
|
+
display: grid;
|
1408
|
+
grid:
|
1409
|
+
"header" auto
|
1410
|
+
"main" 1fr
|
1411
|
+
"footer" auto
|
1412
|
+
/ 1fr;
|
1413
|
+
gap: 10px;
|
1414
|
+
padding: 10px;
|
1415
|
+
}
|
1416
|
+
|
1417
|
+
:host ::ng-deep element-children > vl-cms-element-renderer {
|
1418
|
+
&:nth-child(1) > vl-element {
|
1419
|
+
min-height: 80px;
|
1420
|
+
grid-area: header;
|
1421
|
+
}
|
1422
|
+
|
1423
|
+
&:nth-child(2) > vl-element {
|
1424
|
+
grid-area: main;
|
1425
|
+
}
|
1426
|
+
|
1427
|
+
&:nth-child(3) > vl-element {
|
1428
|
+
min-height: 80px;
|
1429
|
+
grid-area: footer;
|
1430
|
+
}
|
1431
|
+
}
|
1432
|
+
/* end of LAYOUT_1 styles */
|
1433
|
+
`,
|
1434
|
+
},
|
1435
|
+
LAYOUT_2: {
|
1436
|
+
styles: `
|
1437
|
+
/* start of LAYOUT_2 styles */
|
1438
|
+
:host {
|
1439
|
+
height: 100%;
|
1440
|
+
display: grid;
|
1441
|
+
grid:
|
1442
|
+
"header header" auto
|
1443
|
+
"left right" 1fr
|
1444
|
+
"footer footer" auto
|
1445
|
+
/ 1fr 1fr;
|
1446
|
+
gap: 10px;
|
1447
|
+
padding: 10px;
|
1448
|
+
}
|
1449
|
+
|
1450
|
+
:host ::ng-deep element-children > vl-cms-element-renderer {
|
1451
|
+
&:nth-child(1) > vl-element {
|
1452
|
+
min-height: 80px;
|
1453
|
+
grid-area: header;
|
1454
|
+
}
|
1455
|
+
|
1456
|
+
&:nth-child(2) > vl-element {
|
1457
|
+
grid-area: left;
|
1458
|
+
}
|
1459
|
+
|
1460
|
+
&:nth-child(3) > vl-element {
|
1461
|
+
grid-area: right;
|
1462
|
+
}
|
1463
|
+
|
1464
|
+
&:nth-child(4) > vl-element {
|
1465
|
+
min-height: 80px;
|
1466
|
+
grid-area: footer;
|
1467
|
+
}
|
1468
|
+
}
|
1469
|
+
/* end of LAYOUT_2 styles */
|
1470
|
+
`,
|
1471
|
+
},
|
1472
|
+
LAYOUT_3: {
|
1473
|
+
styles: `
|
1474
|
+
/* start of LAYOUT_3 styles */
|
1475
|
+
:host {
|
1476
|
+
height: 100%;
|
1477
|
+
display: grid;
|
1478
|
+
grid:
|
1479
|
+
"main" 1fr
|
1480
|
+
"footer" auto
|
1481
|
+
/ 1fr;
|
1482
|
+
gap: 10px;
|
1483
|
+
padding: 10px;
|
1484
|
+
}
|
1485
|
+
|
1486
|
+
:host ::ng-deep element-children > vl-cms-element-renderer {
|
1487
|
+
&:nth-child(1) > vl-element {
|
1488
|
+
grid-area: main;
|
1489
|
+
}
|
1490
|
+
|
1491
|
+
&:nth-child(2) > vl-element {
|
1492
|
+
min-height: 80px;
|
1493
|
+
grid-area: footer;
|
1494
|
+
}
|
1495
|
+
}
|
1496
|
+
/* end of LAYOUT_3 styles */
|
1497
|
+
`,
|
1498
|
+
},
|
1499
|
+
LAYOUT_4: {
|
1500
|
+
styles: `
|
1501
|
+
/* start of LAYOUT_4 styles */
|
1502
|
+
:host {
|
1503
|
+
height: 100%;
|
1504
|
+
display: grid;
|
1505
|
+
grid:
|
1506
|
+
"left right" 1fr
|
1507
|
+
"footer footer" auto
|
1508
|
+
/ auto auto;
|
1509
|
+
gap: 10px;
|
1510
|
+
padding: 10px;
|
1511
|
+
}
|
1512
|
+
|
1513
|
+
:host ::ng-deep element-children > vl-cms-element-renderer {
|
1514
|
+
&:nth-child(1) > vl-element {
|
1515
|
+
grid-area: left;
|
1516
|
+
}
|
1517
|
+
|
1518
|
+
&:nth-child(2) > vl-element {
|
1519
|
+
grid-area: right;
|
1520
|
+
}
|
1521
|
+
|
1522
|
+
&:nth-child(3) > vl-element {
|
1523
|
+
min-height: 80px;
|
1524
|
+
grid-area: footer;
|
1525
|
+
}
|
1526
|
+
}
|
1527
|
+
/* end of LAYOUT_4 styles */
|
1528
|
+
`,
|
1529
|
+
},
|
1530
|
+
LAYOUT_5: {
|
1531
|
+
styles: `
|
1532
|
+
/* start of LAYOUT_5 styles */
|
1533
|
+
:host {
|
1534
|
+
height: 100%;
|
1535
|
+
display: grid;
|
1536
|
+
grid:
|
1537
|
+
"header" auto
|
1538
|
+
"main" 1fr
|
1539
|
+
/ 1fr;
|
1540
|
+
gap: 10px;
|
1541
|
+
padding: 10px;
|
1542
|
+
}
|
1543
|
+
|
1544
|
+
:host ::ng-deep element-children > vl-cms-element-renderer {
|
1545
|
+
&:nth-child(1) > vl-element {
|
1546
|
+
min-height: 80px;
|
1547
|
+
grid-area: header;
|
1548
|
+
}
|
1549
|
+
|
1550
|
+
&:nth-child(2) > vl-element {
|
1551
|
+
grid-area: main;
|
1552
|
+
}
|
1553
|
+
}
|
1554
|
+
/* end of LAYOUT_5 styles */
|
1555
|
+
`,
|
1556
|
+
},
|
1557
|
+
LAYOUT_6: {
|
1558
|
+
styles: `
|
1559
|
+
/* start of LAYOUT_6 styles */
|
1560
|
+
:host {
|
1561
|
+
height: 100%;
|
1562
|
+
display: grid;
|
1563
|
+
grid:
|
1564
|
+
"main" 1fr
|
1565
|
+
/ 1fr;
|
1566
|
+
gap: 10px;
|
1567
|
+
padding: 10px;
|
1568
|
+
}
|
1569
|
+
|
1570
|
+
:host ::ng-deep element-children > vl-cms-element-renderer {
|
1571
|
+
&:nth-child(1) > vl-element {
|
1572
|
+
grid-area: main;
|
1573
|
+
}
|
1574
|
+
}
|
1575
|
+
/* end of LAYOUT_6 styles */
|
1576
|
+
`,
|
1577
|
+
},
|
1578
|
+
};
|
1579
|
+
|
1314
1580
|
const VELOCE_LIBS = {
|
1315
1581
|
'@veloceapps/core': {
|
1316
1582
|
isDefined,
|
@@ -1418,7 +1684,12 @@ class ElementsResolver {
|
|
1418
1684
|
resolveElementStyles(element) {
|
1419
1685
|
var _a;
|
1420
1686
|
const config = CONFIG[element.type];
|
1421
|
-
|
1687
|
+
let styles = !config.suppressStyles ? (_a = element.styles) !== null && _a !== void 0 ? _a : '' : '';
|
1688
|
+
const layout = element.layout && LAYOUT[element.layout];
|
1689
|
+
if (layout === null || layout === void 0 ? void 0 : layout.styles) {
|
1690
|
+
styles += layout.styles;
|
1691
|
+
}
|
1692
|
+
return styles;
|
1422
1693
|
}
|
1423
1694
|
processElementMetadata(sourceElement) {
|
1424
1695
|
var _a, _b;
|
@@ -1796,5 +2067,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImpo
|
|
1796
2067
|
* Generated bundle index. Do not edit.
|
1797
2068
|
*/
|
1798
2069
|
|
1799
|
-
export { ApplyProductConfigurationAction, CloseDocGenAction, ConfigureProductAction, DEFAULT_PLUGINS_TOKEN, ELEMENT_CONFIG, ELEMENT_METADATA, ElementComponent, ElementDefinition, ElementsResolver, FlowAction, IntegrationState, LauncherModule, MigrationsModule, MigrationsService, NavigateBackAction, NavigateToCatalogAction, OpenDocGenAction, PreviewComponent, PreviewModule, RemoteApplyAction, RemoteCancelAction, ResourcesService, RuntimeEditorService, RuntimeModule, SHARED_ELEMENT_METADATA, SwitchObjectAction, TemplatesService, UI_DEFINITION_METADATA, UiBuildError, VENDOR_MAP, doesElementSupportIO, elementToMetadata, extendElementMetadata, extractElementMetadata, findElementByModule, findElementByPath, flattenElements, getAbsolutePath, getElementConfig, getElementUniqueName, insertElement, isSharedElement, isValidScript, metadataToElement, normalizeElementMetadata, parseBoundPath, parsePath, removeElement, stringifyElementMetadata };
|
2070
|
+
export { ApplyProductConfigurationAction, CloseDocGenAction, CmsAction, ConfigureProductAction, DEFAULT_PLUGINS_TOKEN, ELEMENT_CONFIG, ELEMENT_METADATA, ElementComponent, ElementDefinition, ElementsResolver, FlowAction, IntegrationState, LauncherModule, MigrationsModule, MigrationsService, NavigateBackAction, NavigateToCatalogAction, OpenDocGenAction, PreviewComponent, PreviewModule, RemoteApplyAction, RemoteCancelAction, ResourcesService, RuntimeEditorService, RuntimeModule, SHARED_ELEMENT_METADATA, SwitchObjectAction, TemplatesService, UI_DEFINITION_METADATA, UiBuildError, VENDOR_MAP, doesElementSupportIO, elementToMetadata, extendElementMetadata, extractElementMetadata, findElementByModule, findElementByPath, flattenElements, getAbsolutePath, getElementConfig, getElementUniqueName, insertElement, isSharedElement, isValidScript, metadataToElement, normalizeElementMetadata, parseBoundPath, parsePath, removeElement, stringifyElementMetadata };
|
1800
2071
|
//# sourceMappingURL=veloceapps-sdk-cms.js.map
|