@rulecms/widget-angular 0.1.0 → 0.3.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/README.md +17 -0
- package/fesm2022/rulecms-widget-angular.mjs +99 -14
- package/fesm2022/rulecms-widget-angular.mjs.map +1 -1
- package/lib/helpers/types.d.ts +8 -0
- package/lib/helpers/types.d.ts.map +1 -1
- package/lib/library-registry/ComponentLibraryRegistry.d.ts +0 -5
- package/lib/library-registry/ComponentLibraryRegistry.d.ts.map +1 -1
- package/lib/library-registry/types.d.ts +19 -1
- package/lib/library-registry/types.d.ts.map +1 -1
- package/lib/render/breakpoint-variant-render.component.d.ts +3 -2
- package/lib/render/breakpoint-variant-render.component.d.ts.map +1 -1
- package/lib/render/display-component.component.d.ts +3 -2
- package/lib/render/display-component.component.d.ts.map +1 -1
- package/lib/render/library-stylesheets.component.d.ts +14 -0
- package/lib/render/library-stylesheets.component.d.ts.map +1 -0
- package/lib/render/render-components-for-device.component.d.ts +3 -2
- package/lib/render/render-components-for-device.component.d.ts.map +1 -1
- package/lib/render/render-components-inner.component.d.ts +3 -2
- package/lib/render/render-components-inner.component.d.ts.map +1 -1
- package/lib/render/render-components.component.d.ts +3 -2
- package/lib/render/render-components.component.d.ts.map +1 -1
- package/lib/render/types.d.ts +2 -1
- package/lib/render/types.d.ts.map +1 -1
- package/lib/widget/rule-cms-widget.component.d.ts +8 -2
- package/lib/widget/rule-cms-widget.component.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -80,6 +80,23 @@ Pass extra props — a click handler, a callback — to one component instance b
|
|
|
80
80
|
|
|
81
81
|
`r-button` reads `onClick` from the bag. The renderer never inspects the contents. In development, a key that addresses no column in the widget is printed once so typos are visible while building.
|
|
82
82
|
|
|
83
|
+
## Host `mounts`
|
|
84
|
+
|
|
85
|
+
Register an Angular component from your app so a Custom (`r-mount`) slot in the composer can render it by name. The name is a map key, not a string that becomes code. A miss is a placeholder.
|
|
86
|
+
|
|
87
|
+
```html
|
|
88
|
+
<rulecms-widget
|
|
89
|
+
[publishedKey]="publishedKey"
|
|
90
|
+
[mounts]="mounts"
|
|
91
|
+
/>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
```ts
|
|
95
|
+
mounts = { 'booking-form': BookingFormComponent };
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Tell the marketer the exact name and the props the component reads. Event handlers still go through `componentProps` at that column's id — authored prop rows cannot become `onClick`. See `__docs__/CONTRACT_mounts.md` and [Mount Your Own Components](https://rulecms.com/docs/widget-mounts).
|
|
99
|
+
|
|
83
100
|
## Develop locally
|
|
84
101
|
|
|
85
102
|
```bash
|
|
@@ -70,6 +70,22 @@ function assertDefaultLibraryRegistered({ registrations, referenced }) {
|
|
|
70
70
|
* consumes. Default library entries keep bare keys; all other libraries are
|
|
71
71
|
* namespaced "libraryId/type" (see resolve-key.ts).
|
|
72
72
|
*/
|
|
73
|
+
function collectStylesheets(modules) {
|
|
74
|
+
const stylesheets = [];
|
|
75
|
+
const seen = new Set();
|
|
76
|
+
for (const module of modules.values()) {
|
|
77
|
+
if (typeof module.stylesheet !== 'string') {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const css = module.stylesheet.trim();
|
|
81
|
+
if (!css || seen.has(css)) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
seen.add(css);
|
|
85
|
+
stylesheets.push(css);
|
|
86
|
+
}
|
|
87
|
+
return stylesheets.length > 0 ? stylesheets : undefined;
|
|
88
|
+
}
|
|
73
89
|
function composeSourceComponentsPlugin(modules) {
|
|
74
90
|
const components = {};
|
|
75
91
|
for (const [libraryId, module] of modules) {
|
|
@@ -78,7 +94,8 @@ function composeSourceComponentsPlugin(modules) {
|
|
|
78
94
|
components[isDefault ? type : `${libraryId}/${type}`] = entry;
|
|
79
95
|
}
|
|
80
96
|
}
|
|
81
|
-
|
|
97
|
+
const stylesheets = collectStylesheets(modules);
|
|
98
|
+
return stylesheets ? { components, stylesheets } : { components };
|
|
82
99
|
}
|
|
83
100
|
/**
|
|
84
101
|
* Creates a per-provider/per-widget registry instance.
|
|
@@ -2488,10 +2505,11 @@ class DisplayComponentComponent {
|
|
|
2488
2505
|
styleProps: componentStyleProps,
|
|
2489
2506
|
className: cardClassName,
|
|
2490
2507
|
widgetInstanceProps: this.widgetInstanceProps,
|
|
2508
|
+
mounts: this.mounts,
|
|
2491
2509
|
};
|
|
2492
2510
|
}
|
|
2493
2511
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: DisplayComponentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2494
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: DisplayComponentComponent, isStandalone: true, selector: "rulecms-display-component", inputs: { componentType: "componentType", libraryId: "libraryId", componentAttributes: "componentAttributes", components: "components", styleProps: "styleProps", widgetInstanceProps: "widgetInstanceProps" }, host: { styleAttribute: "display: contents" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2512
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: DisplayComponentComponent, isStandalone: true, selector: "rulecms-display-component", inputs: { componentType: "componentType", libraryId: "libraryId", componentAttributes: "componentAttributes", components: "components", styleProps: "styleProps", widgetInstanceProps: "widgetInstanceProps", mounts: "mounts" }, host: { styleAttribute: "display: contents" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2495
2513
|
@if (card) {
|
|
2496
2514
|
@if (needsWrapper) {
|
|
2497
2515
|
<div [class]="wrapperClass || undefined" [ngStyle]="wrapperStyle">
|
|
@@ -2544,6 +2562,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2544
2562
|
type: Input
|
|
2545
2563
|
}], widgetInstanceProps: [{
|
|
2546
2564
|
type: Input
|
|
2565
|
+
}], mounts: [{
|
|
2566
|
+
type: Input
|
|
2547
2567
|
}] } });
|
|
2548
2568
|
|
|
2549
2569
|
class RenderComponentsInnerComponent {
|
|
@@ -2611,7 +2631,7 @@ class RenderComponentsInnerComponent {
|
|
|
2611
2631
|
});
|
|
2612
2632
|
}
|
|
2613
2633
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RenderComponentsInnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2614
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RenderComponentsInnerComponent, isStandalone: true, selector: "rulecms-render-inner", inputs: { displayItemList: "displayItemList", isComposeMode: "isComposeMode", isWithinCollection: "isWithinCollection", widgetCollections: "widgetCollections", showDropContainers: "showDropContainers", reduxDeviceDisplayType: "reduxDeviceDisplayType", plugins: "plugins", deviceDisplayType: "deviceDisplayType", componentProps: "componentProps", ancestorColumnIds: "ancestorColumnIds" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
2634
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RenderComponentsInnerComponent, isStandalone: true, selector: "rulecms-render-inner", inputs: { displayItemList: "displayItemList", isComposeMode: "isComposeMode", isWithinCollection: "isWithinCollection", widgetCollections: "widgetCollections", showDropContainers: "showDropContainers", reduxDeviceDisplayType: "reduxDeviceDisplayType", plugins: "plugins", deviceDisplayType: "deviceDisplayType", componentProps: "componentProps", mounts: "mounts", ancestorColumnIds: "ancestorColumnIds" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
2615
2635
|
<rulecms-embed-vertical
|
|
2616
2636
|
[displayItemList]="displayItemList"
|
|
2617
2637
|
[isComposeMode]="isComposeMode"
|
|
@@ -2640,6 +2660,7 @@ class RenderComponentsInnerComponent {
|
|
|
2640
2660
|
[plugins]="plugins"
|
|
2641
2661
|
[deviceDisplayType]="deviceDisplayType"
|
|
2642
2662
|
[componentProps]="componentProps"
|
|
2663
|
+
[mounts]="mounts"
|
|
2643
2664
|
[ancestorColumnIds]="childAncestorIds(col.id)"
|
|
2644
2665
|
/>
|
|
2645
2666
|
} @else {
|
|
@@ -2650,6 +2671,7 @@ class RenderComponentsInnerComponent {
|
|
|
2650
2671
|
[components]="components"
|
|
2651
2672
|
[styleProps]="columnView(col).styleProps"
|
|
2652
2673
|
[widgetInstanceProps]="instanceProps(col.id)"
|
|
2674
|
+
[mounts]="mounts"
|
|
2653
2675
|
/>
|
|
2654
2676
|
}
|
|
2655
2677
|
}
|
|
@@ -2657,7 +2679,7 @@ class RenderComponentsInnerComponent {
|
|
|
2657
2679
|
</rulecms-embed-row>
|
|
2658
2680
|
}
|
|
2659
2681
|
</rulecms-embed-vertical>
|
|
2660
|
-
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsInnerComponent, selector: "rulecms-render-inner", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "plugins", "deviceDisplayType", "componentProps", "ancestorColumnIds"] }, { kind: "component", type: EmbedInVerticalContainerComponent, selector: "rulecms-embed-vertical", inputs: ["displayItemList", "isComposeMode", "showDropContainers", "isWithinCollection", "deviceDisplayType"] }, { kind: "component", type: EmbedInRowComponent, selector: "rulecms-embed-row", inputs: ["row", "isComposeMode", "showDropContainers", "isWithinCollection", "deviceDisplayType"] }, { kind: "component", type: DisplayComponentComponent, selector: "rulecms-display-component", inputs: ["componentType", "libraryId", "componentAttributes", "components", "styleProps", "widgetInstanceProps"] }] }); }
|
|
2682
|
+
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsInnerComponent, selector: "rulecms-render-inner", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "plugins", "deviceDisplayType", "componentProps", "mounts", "ancestorColumnIds"] }, { kind: "component", type: EmbedInVerticalContainerComponent, selector: "rulecms-embed-vertical", inputs: ["displayItemList", "isComposeMode", "showDropContainers", "isWithinCollection", "deviceDisplayType"] }, { kind: "component", type: EmbedInRowComponent, selector: "rulecms-embed-row", inputs: ["row", "isComposeMode", "showDropContainers", "isWithinCollection", "deviceDisplayType"] }, { kind: "component", type: DisplayComponentComponent, selector: "rulecms-display-component", inputs: ["componentType", "libraryId", "componentAttributes", "components", "styleProps", "widgetInstanceProps", "mounts"] }] }); }
|
|
2661
2683
|
}
|
|
2662
2684
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RenderComponentsInnerComponent, decorators: [{
|
|
2663
2685
|
type: Component,
|
|
@@ -2694,6 +2716,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2694
2716
|
[plugins]="plugins"
|
|
2695
2717
|
[deviceDisplayType]="deviceDisplayType"
|
|
2696
2718
|
[componentProps]="componentProps"
|
|
2719
|
+
[mounts]="mounts"
|
|
2697
2720
|
[ancestorColumnIds]="childAncestorIds(col.id)"
|
|
2698
2721
|
/>
|
|
2699
2722
|
} @else {
|
|
@@ -2704,6 +2727,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2704
2727
|
[components]="components"
|
|
2705
2728
|
[styleProps]="columnView(col).styleProps"
|
|
2706
2729
|
[widgetInstanceProps]="instanceProps(col.id)"
|
|
2730
|
+
[mounts]="mounts"
|
|
2707
2731
|
/>
|
|
2708
2732
|
}
|
|
2709
2733
|
}
|
|
@@ -2736,6 +2760,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2736
2760
|
args: [{ required: true }]
|
|
2737
2761
|
}], componentProps: [{
|
|
2738
2762
|
type: Input
|
|
2763
|
+
}], mounts: [{
|
|
2764
|
+
type: Input
|
|
2739
2765
|
}], ancestorColumnIds: [{
|
|
2740
2766
|
type: Input
|
|
2741
2767
|
}] } });
|
|
@@ -2747,7 +2773,7 @@ class RenderComponentsForDeviceComponent {
|
|
|
2747
2773
|
this.showDropContainers = false;
|
|
2748
2774
|
}
|
|
2749
2775
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RenderComponentsForDeviceComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2750
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RenderComponentsForDeviceComponent, isStandalone: true, selector: "rulecms-render-for-device", inputs: { displayItemList: "displayItemList", isComposeMode: "isComposeMode", isWithinCollection: "isWithinCollection", widgetCollections: "widgetCollections", showDropContainers: "showDropContainers", reduxDeviceDisplayType: "reduxDeviceDisplayType", deviceDisplayType: "deviceDisplayType", plugins: "plugins", componentProps: "componentProps", ancestorColumnIds: "ancestorColumnIds" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
2776
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RenderComponentsForDeviceComponent, isStandalone: true, selector: "rulecms-render-for-device", inputs: { displayItemList: "displayItemList", isComposeMode: "isComposeMode", isWithinCollection: "isWithinCollection", widgetCollections: "widgetCollections", showDropContainers: "showDropContainers", reduxDeviceDisplayType: "reduxDeviceDisplayType", deviceDisplayType: "deviceDisplayType", plugins: "plugins", componentProps: "componentProps", mounts: "mounts", ancestorColumnIds: "ancestorColumnIds" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
2751
2777
|
@if (displayItemList?.rows?.length) {
|
|
2752
2778
|
<rulecms-render-inner
|
|
2753
2779
|
[displayItemList]="displayItemList"
|
|
@@ -2759,10 +2785,11 @@ class RenderComponentsForDeviceComponent {
|
|
|
2759
2785
|
[plugins]="plugins"
|
|
2760
2786
|
[deviceDisplayType]="deviceDisplayType"
|
|
2761
2787
|
[componentProps]="componentProps"
|
|
2788
|
+
[mounts]="mounts"
|
|
2762
2789
|
[ancestorColumnIds]="ancestorColumnIds"
|
|
2763
2790
|
/>
|
|
2764
2791
|
}
|
|
2765
|
-
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsInnerComponent, selector: "rulecms-render-inner", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "plugins", "deviceDisplayType", "componentProps", "ancestorColumnIds"] }] }); }
|
|
2792
|
+
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsInnerComponent, selector: "rulecms-render-inner", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "plugins", "deviceDisplayType", "componentProps", "mounts", "ancestorColumnIds"] }] }); }
|
|
2766
2793
|
}
|
|
2767
2794
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RenderComponentsForDeviceComponent, decorators: [{
|
|
2768
2795
|
type: Component,
|
|
@@ -2782,6 +2809,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2782
2809
|
[plugins]="plugins"
|
|
2783
2810
|
[deviceDisplayType]="deviceDisplayType"
|
|
2784
2811
|
[componentProps]="componentProps"
|
|
2812
|
+
[mounts]="mounts"
|
|
2785
2813
|
[ancestorColumnIds]="ancestorColumnIds"
|
|
2786
2814
|
/>
|
|
2787
2815
|
}
|
|
@@ -2810,10 +2838,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2810
2838
|
args: [{ required: true }]
|
|
2811
2839
|
}], componentProps: [{
|
|
2812
2840
|
type: Input
|
|
2841
|
+
}], mounts: [{
|
|
2842
|
+
type: Input
|
|
2813
2843
|
}], ancestorColumnIds: [{
|
|
2814
2844
|
type: Input
|
|
2815
2845
|
}] } });
|
|
2816
2846
|
|
|
2847
|
+
/**
|
|
2848
|
+
* Emits each library stylesheet once as an SSR `<style>` tag.
|
|
2849
|
+
*
|
|
2850
|
+
* Same delivery as `BreakpointVariantRenderComponent`'s breakpoint CSS: a
|
|
2851
|
+
* style element next to the markup, not a file the host has to link, and not
|
|
2852
|
+
* CSS-in-JS. Empty or missing lists render nothing.
|
|
2853
|
+
*/
|
|
2854
|
+
class LibraryStylesheetsComponent {
|
|
2855
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibraryStylesheetsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2856
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: LibraryStylesheetsComponent, isStandalone: true, selector: "rulecms-library-stylesheets", inputs: { stylesheets: "stylesheets" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
2857
|
+
@for (css of stylesheets ?? []; track css) {
|
|
2858
|
+
<style data-rulecms-library-stylesheet="" [innerText]="css"></style>
|
|
2859
|
+
}
|
|
2860
|
+
`, isInline: true }); }
|
|
2861
|
+
}
|
|
2862
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LibraryStylesheetsComponent, decorators: [{
|
|
2863
|
+
type: Component,
|
|
2864
|
+
args: [{
|
|
2865
|
+
selector: 'rulecms-library-stylesheets',
|
|
2866
|
+
standalone: true,
|
|
2867
|
+
template: `
|
|
2868
|
+
@for (css of stylesheets ?? []; track css) {
|
|
2869
|
+
<style data-rulecms-library-stylesheet="" [innerText]="css"></style>
|
|
2870
|
+
}
|
|
2871
|
+
`,
|
|
2872
|
+
host: { style: 'display: contents' },
|
|
2873
|
+
}]
|
|
2874
|
+
}], propDecorators: { stylesheets: [{
|
|
2875
|
+
type: Input
|
|
2876
|
+
}] } });
|
|
2877
|
+
|
|
2817
2878
|
const DEVICE_VARIANTS = ['Phone', 'Tablet', 'Desktop'];
|
|
2818
2879
|
let breakpointSeq = 0;
|
|
2819
2880
|
class BreakpointVariantRenderComponent {
|
|
@@ -2829,7 +2890,8 @@ class BreakpointVariantRenderComponent {
|
|
|
2829
2890
|
this.variantStyles = buildBreakpointVariantStyles(this.resolvedScopeId);
|
|
2830
2891
|
}
|
|
2831
2892
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: BreakpointVariantRenderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2832
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: BreakpointVariantRenderComponent, isStandalone: true, selector: "rulecms-breakpoint-variants", inputs: { displayItemList: "displayItemList", widgetCollections: "widgetCollections", plugins: "plugins", componentProps: "componentProps", scopeIdInput: "scopeIdInput" }, host: { styleAttribute: "display: contents" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2893
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: BreakpointVariantRenderComponent, isStandalone: true, selector: "rulecms-breakpoint-variants", inputs: { displayItemList: "displayItemList", widgetCollections: "widgetCollections", plugins: "plugins", componentProps: "componentProps", mounts: "mounts", scopeIdInput: "scopeIdInput" }, host: { styleAttribute: "display: contents" }, usesOnChanges: true, ngImport: i0, template: `
|
|
2894
|
+
<rulecms-library-stylesheets [stylesheets]="plugins.sourceComponents?.stylesheets" />
|
|
2833
2895
|
@if (!divergent) {
|
|
2834
2896
|
<rulecms-render-for-device
|
|
2835
2897
|
[displayItemList]="displayItemList"
|
|
@@ -2841,6 +2903,7 @@ class BreakpointVariantRenderComponent {
|
|
|
2841
2903
|
deviceDisplayType="Desktop"
|
|
2842
2904
|
[plugins]="plugins"
|
|
2843
2905
|
[componentProps]="componentProps"
|
|
2906
|
+
[mounts]="mounts"
|
|
2844
2907
|
/>
|
|
2845
2908
|
} @else {
|
|
2846
2909
|
<style [innerText]="variantStyles"></style>
|
|
@@ -2856,19 +2919,21 @@ class BreakpointVariantRenderComponent {
|
|
|
2856
2919
|
[deviceDisplayType]="device"
|
|
2857
2920
|
[plugins]="plugins"
|
|
2858
2921
|
[componentProps]="componentProps"
|
|
2922
|
+
[mounts]="mounts"
|
|
2859
2923
|
/>
|
|
2860
2924
|
</div>
|
|
2861
2925
|
}
|
|
2862
2926
|
}
|
|
2863
|
-
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsForDeviceComponent, selector: "rulecms-render-for-device", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "deviceDisplayType", "plugins", "componentProps", "ancestorColumnIds"] }] }); }
|
|
2927
|
+
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsForDeviceComponent, selector: "rulecms-render-for-device", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "deviceDisplayType", "plugins", "componentProps", "mounts", "ancestorColumnIds"] }, { kind: "component", type: LibraryStylesheetsComponent, selector: "rulecms-library-stylesheets", inputs: ["stylesheets"] }] }); }
|
|
2864
2928
|
}
|
|
2865
2929
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: BreakpointVariantRenderComponent, decorators: [{
|
|
2866
2930
|
type: Component,
|
|
2867
2931
|
args: [{
|
|
2868
2932
|
selector: 'rulecms-breakpoint-variants',
|
|
2869
2933
|
standalone: true,
|
|
2870
|
-
imports: [RenderComponentsForDeviceComponent],
|
|
2934
|
+
imports: [RenderComponentsForDeviceComponent, LibraryStylesheetsComponent],
|
|
2871
2935
|
template: `
|
|
2936
|
+
<rulecms-library-stylesheets [stylesheets]="plugins.sourceComponents?.stylesheets" />
|
|
2872
2937
|
@if (!divergent) {
|
|
2873
2938
|
<rulecms-render-for-device
|
|
2874
2939
|
[displayItemList]="displayItemList"
|
|
@@ -2880,6 +2945,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2880
2945
|
deviceDisplayType="Desktop"
|
|
2881
2946
|
[plugins]="plugins"
|
|
2882
2947
|
[componentProps]="componentProps"
|
|
2948
|
+
[mounts]="mounts"
|
|
2883
2949
|
/>
|
|
2884
2950
|
} @else {
|
|
2885
2951
|
<style [innerText]="variantStyles"></style>
|
|
@@ -2895,6 +2961,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2895
2961
|
[deviceDisplayType]="device"
|
|
2896
2962
|
[plugins]="plugins"
|
|
2897
2963
|
[componentProps]="componentProps"
|
|
2964
|
+
[mounts]="mounts"
|
|
2898
2965
|
/>
|
|
2899
2966
|
</div>
|
|
2900
2967
|
}
|
|
@@ -2913,6 +2980,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2913
2980
|
args: [{ required: true }]
|
|
2914
2981
|
}], componentProps: [{
|
|
2915
2982
|
type: Input
|
|
2983
|
+
}], mounts: [{
|
|
2984
|
+
type: Input
|
|
2916
2985
|
}], scopeIdInput: [{
|
|
2917
2986
|
type: Input
|
|
2918
2987
|
}] } });
|
|
@@ -2961,7 +3030,10 @@ class RenderComponentsComponent {
|
|
|
2961
3030
|
this.deviceDisplayType = resolveDisplayDeviceType(this.phoneQuery?.matches ?? false, this.tabletQuery?.matches ?? false, this.reduxDeviceDisplayType);
|
|
2962
3031
|
}
|
|
2963
3032
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RenderComponentsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2964
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3033
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RenderComponentsComponent, isStandalone: true, selector: "rulecms-render-components", inputs: { displayItemList: "displayItemList", isComposeMode: "isComposeMode", isWithinCollection: "isWithinCollection", widgetCollections: "widgetCollections", showDropContainers: "showDropContainers", reduxDeviceDisplayType: "reduxDeviceDisplayType", plugins: "plugins", componentProps: "componentProps", mounts: "mounts" }, host: { styleAttribute: "display: contents" }, ngImport: i0, template: `
|
|
3034
|
+
@if (!isWithinCollection) {
|
|
3035
|
+
<rulecms-library-stylesheets [stylesheets]="plugins.sourceComponents?.stylesheets" />
|
|
3036
|
+
}
|
|
2965
3037
|
<rulecms-render-for-device
|
|
2966
3038
|
[displayItemList]="displayItemList"
|
|
2967
3039
|
[isComposeMode]="isComposeMode"
|
|
@@ -2972,16 +3044,20 @@ class RenderComponentsComponent {
|
|
|
2972
3044
|
[deviceDisplayType]="deviceDisplayType"
|
|
2973
3045
|
[plugins]="plugins"
|
|
2974
3046
|
[componentProps]="componentProps"
|
|
3047
|
+
[mounts]="mounts"
|
|
2975
3048
|
/>
|
|
2976
|
-
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsForDeviceComponent, selector: "rulecms-render-for-device", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "deviceDisplayType", "plugins", "componentProps", "ancestorColumnIds"] }] }); }
|
|
3049
|
+
`, isInline: true, dependencies: [{ kind: "component", type: RenderComponentsForDeviceComponent, selector: "rulecms-render-for-device", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "deviceDisplayType", "plugins", "componentProps", "mounts", "ancestorColumnIds"] }, { kind: "component", type: LibraryStylesheetsComponent, selector: "rulecms-library-stylesheets", inputs: ["stylesheets"] }] }); }
|
|
2977
3050
|
}
|
|
2978
3051
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RenderComponentsComponent, decorators: [{
|
|
2979
3052
|
type: Component,
|
|
2980
3053
|
args: [{
|
|
2981
3054
|
selector: 'rulecms-render-components',
|
|
2982
3055
|
standalone: true,
|
|
2983
|
-
imports: [RenderComponentsForDeviceComponent],
|
|
3056
|
+
imports: [RenderComponentsForDeviceComponent, LibraryStylesheetsComponent],
|
|
2984
3057
|
template: `
|
|
3058
|
+
@if (!isWithinCollection) {
|
|
3059
|
+
<rulecms-library-stylesheets [stylesheets]="plugins.sourceComponents?.stylesheets" />
|
|
3060
|
+
}
|
|
2985
3061
|
<rulecms-render-for-device
|
|
2986
3062
|
[displayItemList]="displayItemList"
|
|
2987
3063
|
[isComposeMode]="isComposeMode"
|
|
@@ -2992,6 +3068,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
2992
3068
|
[deviceDisplayType]="deviceDisplayType"
|
|
2993
3069
|
[plugins]="plugins"
|
|
2994
3070
|
[componentProps]="componentProps"
|
|
3071
|
+
[mounts]="mounts"
|
|
2995
3072
|
/>
|
|
2996
3073
|
`,
|
|
2997
3074
|
host: { style: 'display: contents' },
|
|
@@ -3015,6 +3092,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3015
3092
|
args: [{ required: true }]
|
|
3016
3093
|
}], componentProps: [{
|
|
3017
3094
|
type: Input
|
|
3095
|
+
}], mounts: [{
|
|
3096
|
+
type: Input
|
|
3018
3097
|
}] } });
|
|
3019
3098
|
|
|
3020
3099
|
function transformChildCollections(childCollections) {
|
|
@@ -3290,7 +3369,7 @@ class RuleCMSWidgetComponent {
|
|
|
3290
3369
|
this.stylesInjected = true;
|
|
3291
3370
|
}
|
|
3292
3371
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RuleCMSWidgetComponent, deps: [{ token: RuleCMSWidgetContextService, optional: true }, { token: ErrorHandler, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3293
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RuleCMSWidgetComponent, isStandalone: true, selector: "rulecms-widget", inputs: { publishedKey: "publishedKey", token: "token", endpoint: "endpoint", mode: "mode", initialData: "initialData", libraries: "libraries", componentProps: "componentProps" }, host: { styleAttribute: "display: contents" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3372
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.25", type: RuleCMSWidgetComponent, isStandalone: true, selector: "rulecms-widget", inputs: { publishedKey: "publishedKey", token: "token", endpoint: "endpoint", mode: "mode", initialData: "initialData", libraries: "libraries", componentProps: "componentProps", mounts: "mounts" }, host: { styleAttribute: "display: contents" }, usesOnChanges: true, ngImport: i0, template: `
|
|
3294
3373
|
<span [attr.data-rulecms-published-key]="publishedKey" style="display: contents">
|
|
3295
3374
|
@if (mode !== 'pre-fetched' && loading) {
|
|
3296
3375
|
<div [ngStyle]="loadingContainerStyle">
|
|
@@ -3315,6 +3394,7 @@ class RuleCMSWidgetComponent {
|
|
|
3315
3394
|
[widgetCollections]="preparedData.widgetCollections"
|
|
3316
3395
|
[plugins]="plugins"
|
|
3317
3396
|
[componentProps]="componentProps"
|
|
3397
|
+
[mounts]="mounts"
|
|
3318
3398
|
/>
|
|
3319
3399
|
} @else {
|
|
3320
3400
|
<rulecms-render-components
|
|
@@ -3326,11 +3406,12 @@ class RuleCMSWidgetComponent {
|
|
|
3326
3406
|
reduxDeviceDisplayType="desktop"
|
|
3327
3407
|
[plugins]="plugins"
|
|
3328
3408
|
[componentProps]="componentProps"
|
|
3409
|
+
[mounts]="mounts"
|
|
3329
3410
|
/>
|
|
3330
3411
|
}
|
|
3331
3412
|
}
|
|
3332
3413
|
</span>
|
|
3333
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: BreakpointVariantRenderComponent, selector: "rulecms-breakpoint-variants", inputs: ["displayItemList", "widgetCollections", "plugins", "componentProps", "scopeIdInput"] }, { kind: "component", type: RenderComponentsComponent, selector: "rulecms-render-components", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "plugins", "componentProps"] }] }); }
|
|
3414
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: BreakpointVariantRenderComponent, selector: "rulecms-breakpoint-variants", inputs: ["displayItemList", "widgetCollections", "plugins", "componentProps", "mounts", "scopeIdInput"] }, { kind: "component", type: RenderComponentsComponent, selector: "rulecms-render-components", inputs: ["displayItemList", "isComposeMode", "isWithinCollection", "widgetCollections", "showDropContainers", "reduxDeviceDisplayType", "plugins", "componentProps", "mounts"] }] }); }
|
|
3334
3415
|
}
|
|
3335
3416
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: RuleCMSWidgetComponent, decorators: [{
|
|
3336
3417
|
type: Component,
|
|
@@ -3363,6 +3444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3363
3444
|
[widgetCollections]="preparedData.widgetCollections"
|
|
3364
3445
|
[plugins]="plugins"
|
|
3365
3446
|
[componentProps]="componentProps"
|
|
3447
|
+
[mounts]="mounts"
|
|
3366
3448
|
/>
|
|
3367
3449
|
} @else {
|
|
3368
3450
|
<rulecms-render-components
|
|
@@ -3374,6 +3456,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3374
3456
|
reduxDeviceDisplayType="desktop"
|
|
3375
3457
|
[plugins]="plugins"
|
|
3376
3458
|
[componentProps]="componentProps"
|
|
3459
|
+
[mounts]="mounts"
|
|
3377
3460
|
/>
|
|
3378
3461
|
}
|
|
3379
3462
|
}
|
|
@@ -3403,6 +3486,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
|
|
|
3403
3486
|
type: Input
|
|
3404
3487
|
}], componentProps: [{
|
|
3405
3488
|
type: Input
|
|
3489
|
+
}], mounts: [{
|
|
3490
|
+
type: Input
|
|
3406
3491
|
}] } });
|
|
3407
3492
|
|
|
3408
3493
|
class FetchRuleCMSWidgetError extends Error {
|