@nascentdigital/funnel-editor 8.0.3 → 8.1.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/dist/core/domain/Block.d.ts +1 -0
- package/dist/core/domain/Block.js +4 -1
- package/dist/core/domain/Page.js +2 -1
- package/dist/core/domain/Pages.js +1 -0
- package/dist/core/domain/SectionBlock.d.ts +1 -0
- package/dist/core/domain/SectionBlock.js +3 -0
- package/dist/explore/components/CreatePageDialog.js +1 -1
- package/dist/page/components/config/BlockConfigButton.js +0 -3
- package/dist/page/hooks/PageController.js +1 -1
- package/dist/styles/index.css +8 -8
- package/package.json +2 -2
|
@@ -24,6 +24,7 @@ export declare class Block<TBlock extends Block.SchemaType = Block.SchemaType> e
|
|
|
24
24
|
get state(): "undefined" | "invalid" | "valid";
|
|
25
25
|
get fieldChanged$(): import("rxjs").Observable<Field.Event>;
|
|
26
26
|
get configData(): Partial<Record<Schema.Block.Config.Variant, Block.ConfigVariantData>>;
|
|
27
|
+
get hasConfiguration(): boolean;
|
|
27
28
|
get configuration(): BlockConfiguration;
|
|
28
29
|
get value(): Schema.Block.Data;
|
|
29
30
|
get modified(): boolean;
|
|
@@ -51,11 +51,14 @@ class Block extends ItemBase_1.ItemBase {
|
|
|
51
51
|
var _a, _b;
|
|
52
52
|
return (_b = (_a = this._configuration) === null || _a === void 0 ? void 0 : _a.configData) !== null && _b !== void 0 ? _b : this._configData;
|
|
53
53
|
}
|
|
54
|
+
get hasConfiguration() {
|
|
55
|
+
return !!this._configuration;
|
|
56
|
+
}
|
|
54
57
|
get configuration() {
|
|
55
58
|
// throw if accessed too early
|
|
56
59
|
const { _configuration } = this;
|
|
57
60
|
if (!_configuration) {
|
|
58
|
-
throw new funnel_core_1.InvalidOperationError('Cannot
|
|
61
|
+
throw new funnel_core_1.InvalidOperationError('Cannot access Block configuration before being bound to parent. Please use hasConfiguration to check first.');
|
|
59
62
|
}
|
|
60
63
|
// return configuration
|
|
61
64
|
return _configuration;
|
package/dist/core/domain/Page.js
CHANGED
|
@@ -306,7 +306,8 @@ class Page {
|
|
|
306
306
|
const { id, groupId, template, brand, region, language, slug, url, name, tags, state, hasErrors, createdOn, updatedOn, publishedOn } = this;
|
|
307
307
|
return {
|
|
308
308
|
id, groupId, template,
|
|
309
|
-
|
|
309
|
+
// FIXME: pipe through actual meta value
|
|
310
|
+
brand, region, language, slug, url, name, meta: [], tags: Array.from(tags),
|
|
310
311
|
state, errors: hasErrors, createdOn, updatedOn, publishedOn
|
|
311
312
|
};
|
|
312
313
|
}
|
|
@@ -10,6 +10,7 @@ export declare class SectionBlock<TBlock extends Schema.Block = Schema.Block> ex
|
|
|
10
10
|
get schema(): TBlock;
|
|
11
11
|
get identifier(): string;
|
|
12
12
|
get name(): string;
|
|
13
|
+
get hasConfiguration(): boolean;
|
|
13
14
|
get configuration(): import("./BlockConfiguration").BlockConfiguration;
|
|
14
15
|
get fields(): ReadonlyArray<FieldModel>;
|
|
15
16
|
get nameField(): import("@nascentdigital/funnel-core").Field<Schema.TextField> | undefined;
|
|
@@ -125,7 +125,7 @@ exports.CreatePageDialog = (0, react_1.forwardRef)(function CreatePageDialog(_,
|
|
|
125
125
|
console.warn('[CreatePageDialog/onCreate] creating page', { name, slug });
|
|
126
126
|
// create page
|
|
127
127
|
const region = site.region.id;
|
|
128
|
-
const { page } = await repository.create({ template, region, language, name, slug, tags: [] });
|
|
128
|
+
const { page } = await repository.create({ template, region, language, name, slug, meta: [], tags: [] });
|
|
129
129
|
// complete
|
|
130
130
|
setResult(page);
|
|
131
131
|
}
|
|
@@ -272,9 +272,6 @@ function renderListLayoutItem(item) {
|
|
|
272
272
|
case 'brick':
|
|
273
273
|
content = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(panelClassName, panelPaddedX, 'grid grid-cols-2 gap-l3 pt-10'), children: [panel('h-12 row-start-1 col-span-full'), panel('h-12 row-start-2 col-start-1'), panel('h-12 row-start-2 col-start-2'), panel('h-12 row-start-3 col-span-full')] }));
|
|
274
274
|
break;
|
|
275
|
-
case 'brickFlipped':
|
|
276
|
-
content = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(panelClassName, panelPaddedX, 'grid grid-cols-2 gap-l3 pt-10'), children: [panel('h-12 row-start-1 col-start-1'), panel('h-12 row-start-1 col-start-2'), panel('h-12 row-start-2 col-span-full'), panel('h-12 row-start-3 col-start-1'), panel('h-12 row-start-3 col-start-2')] }));
|
|
277
|
-
break;
|
|
278
275
|
case 'carousel':
|
|
279
276
|
content = ((0, jsx_runtime_1.jsxs)("div", { className: (0, classnames_1.default)(panelClassName, 'flex flex-col gap-l2 pt-10 pb-l3'), children: [(0, jsx_runtime_1.jsxs)("div", { className: "flex-1 flex items-stretch gap-l3", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-8 bg-surface-placeholder rounded-r-[2px]" }), (0, jsx_runtime_1.jsx)("div", { className: "flex-1 bg-surface-placeholder-raised rounded-[2px]" }), (0, jsx_runtime_1.jsx)("div", { className: "w-8 bg-surface-placeholder rounded-l-[2px]" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "flex justify-center items-center gap-l1", children: [(0, jsx_runtime_1.jsx)("div", { className: "w-4 h-4 bg-surface-placeholder-raised rounded-full" }), (0, jsx_runtime_1.jsx)("div", { className: "w-4 h-4 bg-surface-placeholder-raised rounded-full" }), (0, jsx_runtime_1.jsx)("div", { className: "w-4 h-4 bg-surface-placeholder-raised rounded-full" })] })] }));
|
|
280
277
|
break;
|
|
@@ -218,7 +218,7 @@ class PageController {
|
|
|
218
218
|
}
|
|
219
219
|
// or create a new page
|
|
220
220
|
else {
|
|
221
|
-
result = await this.repository.create(Object.assign(Object.assign({}, target), { tags: [], eventBus }));
|
|
221
|
+
result = await this.repository.create(Object.assign(Object.assign({}, target), { meta: [], tags: [], eventBus }));
|
|
222
222
|
}
|
|
223
223
|
console.debug('[PageController] created', result);
|
|
224
224
|
// (re)bind data
|
package/dist/styles/index.css
CHANGED
|
@@ -501,10 +501,10 @@ video {
|
|
|
501
501
|
}
|
|
502
502
|
|
|
503
503
|
[popover]{
|
|
504
|
-
inset: var(--toolwind-toggle-
|
|
505
|
-
background-color: var(--toolwind-toggle-
|
|
506
|
-
color: var(--toolwind-toggle-
|
|
507
|
-
margin: var(--toolwind-toggle-
|
|
504
|
+
inset: var(--toolwind-toggle-AO5cnCDF5q, 0px);
|
|
505
|
+
background-color: var(--toolwind-toggle-jwN3XOBikt, canvas);
|
|
506
|
+
color: var(--toolwind-toggle-QUAZFczkuM, canvastext);
|
|
507
|
+
margin: var(--toolwind-toggle-hRiYpjN3JY, auto);
|
|
508
508
|
}
|
|
509
509
|
html, body, #__next, #root, .Editor-wrap{
|
|
510
510
|
position: relative;
|
|
@@ -6220,10 +6220,10 @@ img.nd-Visual-image {
|
|
|
6220
6220
|
.anchored\/\[--nd-popup-anchor\]:where(.anchored\/\[--nd-popup-anchor\]){
|
|
6221
6221
|
position: absolute;
|
|
6222
6222
|
view-transition-name: --tw-anchor-view-transition-2j1919322s193433343934192p322r2w33362l;
|
|
6223
|
-
--toolwind-toggle-
|
|
6224
|
-
--toolwind-toggle-
|
|
6225
|
-
--toolwind-toggle-
|
|
6226
|
-
--toolwind-toggle-
|
|
6223
|
+
--toolwind-toggle-AO5cnCDF5q: auto;
|
|
6224
|
+
--toolwind-toggle-jwN3XOBikt: transparent;
|
|
6225
|
+
--toolwind-toggle-QUAZFczkuM: inherit;
|
|
6226
|
+
--toolwind-toggle-hRiYpjN3JY: 0px;
|
|
6227
6227
|
}
|
|
6228
6228
|
.counter-l1{
|
|
6229
6229
|
counter-reset: l1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nascentdigital/funnel-editor",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"ts-jest": "^29",
|
|
93
93
|
"type-fest": "^4"
|
|
94
94
|
},
|
|
95
|
-
"gitHead": "
|
|
95
|
+
"gitHead": "fdf586ac394c06b0ed2f08377c605e3fa317788a"
|
|
96
96
|
}
|