@umbraco-cms/backoffice 14.0.0--preview007-63654dfd → 14.0.0--preview007-b9566612
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-cms/css/umbraco-blockgridlayout-flexbox_css.txt +35 -0
- package/dist-cms/custom-elements.json +174 -10
- package/dist-cms/libs/observable-api/states/class-state.d.ts +10 -0
- package/dist-cms/libs/observable-api/states/class-state.js +11 -0
- package/dist-cms/libs/observable-api/states/deep-state.d.ts +7 -0
- package/dist-cms/libs/observable-api/states/deep-state.js +8 -1
- package/dist-cms/libs/observable-api/utils/combine-observables.function.d.ts +16 -0
- package/dist-cms/libs/observable-api/utils/combine-observables.function.js +14 -0
- package/dist-cms/libs/observable-api/utils/index.d.ts +1 -0
- package/dist-cms/libs/observable-api/utils/index.js +1 -0
- package/dist-cms/mocks/data/data-type/data-type.data.js +39 -0
- package/dist-cms/mocks/data/document/document.data.js +15 -3
- package/dist-cms/mocks/data/document/document.db.d.ts +2 -0
- package/dist-cms/mocks/data/document/document.db.js +3 -0
- package/dist-cms/mocks/handlers/document/domain.handlers.d.ts +1 -0
- package/dist-cms/mocks/handlers/document/domain.handlers.js +14 -0
- package/dist-cms/mocks/handlers/document/index.js +2 -0
- package/dist-cms/packages/block/block/conditions/block-entry-show-content-edit.condition.d.ts +10 -0
- package/dist-cms/packages/block/block/conditions/block-entry-show-content-edit.condition.js +36 -0
- package/dist-cms/packages/block/block/conditions/index.d.ts +2 -1
- package/dist-cms/packages/block/block/conditions/index.js +1 -1
- package/dist-cms/packages/block/block/conditions/manifests.d.ts +1 -0
- package/dist-cms/packages/block/block/conditions/manifests.js +3 -0
- package/dist-cms/packages/block/block/context/block-entries.context.d.ts +5 -2
- package/dist-cms/packages/block/block/context/block-entries.context.js +7 -1
- package/dist-cms/packages/block/block/context/block-entry.context.d.ts +23 -14
- package/dist-cms/packages/block/block/context/block-entry.context.js +75 -30
- package/dist-cms/packages/block/block/context/block-manager.context.d.ts +3 -2
- package/dist-cms/packages/block/block/context/block-manager.context.js +8 -10
- package/dist-cms/packages/block/block/manifests.js +2 -2
- package/dist-cms/packages/block/block/types.d.ts +12 -0
- package/dist-cms/packages/block/block/workspace/block-workspace.context.js +0 -1
- package/dist-cms/packages/block/block/workspace/manifests.js +4 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context-token.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context-token.js +2 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context.d.ts +21 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.context.js +112 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.element.d.ts +27 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.element.js +128 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/index.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/index.js +3 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/manifests.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/manifests.js +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace-editor.element.d.ts +15 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace-editor.element.js +66 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace.context.d.ts +33 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace.context.js +106 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace.element.d.ts +15 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace.element.js +91 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace.modal-token.d.ts +5 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace.modal-token.js +9 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/index.d.ts +2 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/index.js +2 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/manifests.d.ts +2 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/manifests.js +33 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/views/block-grid-area-type-workspace-view-settings.element.d.ts +12 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/views/block-grid-area-type-workspace-view-settings.element.js +71 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/views/manifests.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-area-config-entry/workspace/views/manifests.js +22 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-areas-container/block-grid-areas-container.element.d.ts +11 -7
- package/dist-cms/packages/block/block-grid/components/block-grid-areas-container/block-grid-areas-container.element.js +52 -12
- package/dist-cms/packages/block/block-grid/components/block-grid-block-view/block-grid-block-view.element.d.ts +19 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-block-view/block-grid-block-view.element.js +44 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-block-view/index.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-block-view/index.js +1 -0
- package/dist-cms/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.d.ts +6 -3
- package/dist-cms/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.js +150 -27
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.d.ts +16 -7
- package/dist-cms/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.js +170 -35
- package/dist-cms/packages/block/block-grid/components/block-scale-handler/block-scale-handler.element.d.ts +17 -0
- package/dist-cms/packages/block/block-grid/components/block-scale-handler/block-scale-handler.element.js +118 -0
- package/dist-cms/packages/block/block-grid/components/block-scale-handler/index.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/block-scale-handler/index.js +1 -0
- package/dist-cms/packages/block/block-grid/components/manifests.d.ts +1 -0
- package/dist-cms/packages/block/block-grid/components/manifests.js +1 -0
- package/dist-cms/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.d.ts +2 -6
- package/dist-cms/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.js +25 -24
- package/dist-cms/packages/block/block-grid/context/block-grid-entries.context.d.ts +6 -1
- package/dist-cms/packages/block/block-grid/context/block-grid-entries.context.js +45 -17
- package/dist-cms/packages/block/block-grid/context/block-grid-entry.context.d.ts +23 -3
- package/dist-cms/packages/block/block-grid/context/block-grid-entry.context.js +142 -3
- package/dist-cms/packages/block/block-grid/context/block-grid-manager.context.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-manager.context.js +6 -1
- package/dist-cms/packages/block/block-grid/context/block-grid-scale-manager/block-grid-scale-manager.controller.d.ts +25 -0
- package/dist-cms/packages/block/block-grid/context/block-grid-scale-manager/block-grid-scale-manager.controller.js +251 -0
- package/dist-cms/packages/block/block-grid/manifests.js +2 -1
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-area-type-permission/block-grid-area-type-permission.element.d.ts +18 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-area-type-permission/block-grid-area-type-permission.element.js +66 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-area-type-permission/manifests.d.ts +2 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-area-type-permission/manifests.js +11 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/block-grid-area-type-entries.context-token.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/block-grid-area-type-entries.context-token.js +2 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/block-grid-area-type-entries.context.d.ts +10 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/block-grid-area-type-entries.context.js +30 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/manifests.d.ts +2 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/manifests.js +11 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/property-editor-ui-block-grid-areas-config.element.d.ts +23 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-areas-config/property-editor-ui-block-grid-areas-config.element.js +151 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-column-span/property-editor-ui-block-grid-column-span.element.d.ts +2 -4
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/manifests.js +12 -0
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.d.ts +5 -3
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-editor/property-editor-ui-block-grid.element.js +20 -18
- package/dist-cms/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.js +0 -1
- package/dist-cms/packages/block/block-grid/property-editors/manifests.js +9 -5
- package/dist-cms/packages/block/block-grid/types.d.ts +20 -2
- package/dist-cms/packages/block/block-grid/workspace/views/block-grid-type-workspace-view-areas.element.d.ts +3 -0
- package/dist-cms/packages/block/block-grid/workspace/views/block-grid-type-workspace-view-areas.element.js +20 -4
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.d.ts +7 -4
- package/dist-cms/packages/block/block-list/components/block-list-entry/block-list-entry.element.js +47 -11
- package/dist-cms/packages/block/block-list/components/ref-list-block/ref-list-block.element.js +5 -3
- package/dist-cms/packages/block/block-list/context/block-list-entries.context.js +5 -7
- package/dist-cms/packages/block/block-list/context/block-list-entry.context.d.ts +3 -1
- package/dist-cms/packages/block/block-list/context/block-list-entry.context.js +5 -1
- package/dist-cms/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.d.ts +1 -1
- package/dist-cms/packages/block/block-list/property-editors/block-list-editor/property-editor-ui-block-list.element.js +29 -28
- package/dist-cms/packages/block/block-list/workspace/views/block-list-type-workspace-view.element.js +8 -2
- package/dist-cms/packages/block/block-type/types.d.ts +1 -2
- package/dist-cms/packages/block/block-type/workspace/block-type-workspace.context.js +0 -1
- package/dist-cms/packages/core/components/extension-slot/extension-slot.element.d.ts +1 -1
- package/dist-cms/packages/core/components/extension-slot/extension-slot.element.js +1 -1
- package/dist-cms/packages/core/event/index.d.ts +4 -4
- package/dist-cms/packages/core/event/index.js +4 -4
- package/dist-cms/packages/core/modal/common/property-settings/property-settings-modal.context.js +0 -1
- package/dist-cms/packages/core/property-editor/schemas/Umbraco.BlockGrid.js +0 -12
- package/dist-cms/packages/core/sorter/sorter.controller.d.ts +12 -11
- package/dist-cms/packages/core/sorter/sorter.controller.js +5 -2
- package/dist-cms/tsconfig.build.tsbuildinfo +1 -1
- package/dist-cms/vscode-html-custom-data.json +82 -15
- package/examples/sorter-with-nested-containers/sorter-item.ts +1 -0
- package/examples/sorter-with-two-containers/sorter-item.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** Example of how a grid layout stylehseet could be done with Flex box: */
|
|
2
|
+
|
|
3
|
+
.umb-block-grid__layout-container {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
gap: var(--umb-block-grid--row-gap, 0) var(--umb-block-grid--column-gap, 0);
|
|
8
|
+
}
|
|
9
|
+
.umb-block-grid__layout-item {
|
|
10
|
+
position: relative;
|
|
11
|
+
--umb-block-grid__layout-item-calc: calc(var(--umb-block-grid--item-column-span) / var(--umb-block-grid--grid-columns));
|
|
12
|
+
width: calc(var(--umb-block-grid__layout-item-calc) * 100% - (1 - var(--umb-block-grid__layout-item-calc)) * var(--umb-block-grid--column-gap, 0px));
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
.umb-block-grid__area-container, .umb-block-grid__block--view::part(area-container) {
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
width: 100%;
|
|
21
|
+
gap: var(--umb-block-grid--areas-row-gap, 0) var(--umb-block-grid--areas-column-gap, 0);
|
|
22
|
+
}
|
|
23
|
+
.umb-block-grid__area {
|
|
24
|
+
position: relative;
|
|
25
|
+
height: 100%;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
--umb-block-grid__area-calc: calc(var(--umb-block-grid--area-column-span) / var(--umb-block-grid--area-grid-columns, 1));
|
|
29
|
+
width: calc(var(--umb-block-grid__area-calc) * 100% - (1 - var(--umb-block-grid__area-calc)) * var(--umb-block-grid--areas-column-gap, 0px));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
.umb-block-grid__actions {
|
|
34
|
+
clear: both;
|
|
35
|
+
}
|
|
@@ -422,7 +422,80 @@
|
|
|
422
422
|
]
|
|
423
423
|
},
|
|
424
424
|
{
|
|
425
|
-
"name": "umb-block-
|
|
425
|
+
"name": "umb-block-area-config-entry",
|
|
426
|
+
"path": "./../src/packages/block/block-grid/components/block-grid-area-config-entry/block-grid-area-config-entry.element.ts",
|
|
427
|
+
"attributes": [
|
|
428
|
+
{
|
|
429
|
+
"name": "workspacePath",
|
|
430
|
+
"type": "string | undefined"
|
|
431
|
+
}
|
|
432
|
+
],
|
|
433
|
+
"properties": [
|
|
434
|
+
{
|
|
435
|
+
"name": "key",
|
|
436
|
+
"type": "string | undefined"
|
|
437
|
+
},
|
|
438
|
+
{
|
|
439
|
+
"name": "workspacePath",
|
|
440
|
+
"attribute": "workspacePath",
|
|
441
|
+
"type": "string | undefined"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
"name": "styles",
|
|
445
|
+
"type": "array",
|
|
446
|
+
"default": "[null]"
|
|
447
|
+
}
|
|
448
|
+
]
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"name": "umb-block-grid-area-type-workspace-editor",
|
|
452
|
+
"path": "./../src/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace-editor.element.ts",
|
|
453
|
+
"properties": [
|
|
454
|
+
{
|
|
455
|
+
"name": "workspaceAlias",
|
|
456
|
+
"type": "string | undefined"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"name": "styles",
|
|
460
|
+
"type": "array",
|
|
461
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
462
|
+
}
|
|
463
|
+
]
|
|
464
|
+
},
|
|
465
|
+
{
|
|
466
|
+
"name": "umb-block-grid-area-type-workspace",
|
|
467
|
+
"path": "./../src/packages/block/block-grid/components/block-grid-area-config-entry/workspace/block-grid-area-type-workspace.element.ts",
|
|
468
|
+
"properties": [
|
|
469
|
+
{
|
|
470
|
+
"name": "manifest",
|
|
471
|
+
"type": "ManifestWorkspace"
|
|
472
|
+
}
|
|
473
|
+
]
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
"name": "umb-block-grid-area-type-workspace-view",
|
|
477
|
+
"path": "./../src/packages/block/block-grid/components/block-grid-area-config-entry/workspace/views/block-grid-area-type-workspace-view-settings.element.ts",
|
|
478
|
+
"properties": [
|
|
479
|
+
{
|
|
480
|
+
"name": "styles",
|
|
481
|
+
"type": "array",
|
|
482
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
"name": "umb-block-grid-area-type-workspace-view-settings",
|
|
488
|
+
"path": "./../src/packages/block/block-grid/components/block-grid-area-config-entry/workspace/views/block-grid-area-type-workspace-view-settings.element.ts",
|
|
489
|
+
"properties": [
|
|
490
|
+
{
|
|
491
|
+
"name": "styles",
|
|
492
|
+
"type": "array",
|
|
493
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
494
|
+
}
|
|
495
|
+
]
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
"name": "umb-block-grid-areas-container",
|
|
426
499
|
"path": "./../src/packages/block/block-grid/components/block-grid-areas-container/block-grid-areas-container.element.ts",
|
|
427
500
|
"properties": [
|
|
428
501
|
{
|
|
@@ -432,13 +505,35 @@
|
|
|
432
505
|
}
|
|
433
506
|
]
|
|
434
507
|
},
|
|
508
|
+
{
|
|
509
|
+
"name": "umb-block-grid-block",
|
|
510
|
+
"path": "./../src/packages/block/block-grid/components/block-grid-block-view/block-grid-block-view.element.ts",
|
|
511
|
+
"properties": [
|
|
512
|
+
{
|
|
513
|
+
"name": "label",
|
|
514
|
+
"type": "string | undefined"
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
"name": "urls"
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
"name": "styles",
|
|
521
|
+
"type": "array",
|
|
522
|
+
"default": "[null]"
|
|
523
|
+
}
|
|
524
|
+
]
|
|
525
|
+
},
|
|
435
526
|
{
|
|
436
527
|
"name": "umb-block-grid-entries",
|
|
437
528
|
"path": "./../src/packages/block/block-grid/components/block-grid-entries/block-grid-entries.element.ts",
|
|
438
529
|
"properties": [
|
|
439
530
|
{
|
|
440
531
|
"name": "areaKey",
|
|
441
|
-
"type": "string | null"
|
|
532
|
+
"type": "string | null | undefined"
|
|
533
|
+
},
|
|
534
|
+
{
|
|
535
|
+
"name": "layoutColumns",
|
|
536
|
+
"type": "number | undefined"
|
|
442
537
|
},
|
|
443
538
|
{
|
|
444
539
|
"name": "styles",
|
|
@@ -450,7 +545,18 @@
|
|
|
450
545
|
{
|
|
451
546
|
"name": "umb-block-grid-entry",
|
|
452
547
|
"path": "./../src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts",
|
|
548
|
+
"attributes": [
|
|
549
|
+
{
|
|
550
|
+
"name": "index",
|
|
551
|
+
"type": "number | undefined"
|
|
552
|
+
}
|
|
553
|
+
],
|
|
453
554
|
"properties": [
|
|
555
|
+
{
|
|
556
|
+
"name": "index",
|
|
557
|
+
"attribute": "index",
|
|
558
|
+
"type": "number | undefined"
|
|
559
|
+
},
|
|
454
560
|
{
|
|
455
561
|
"name": "contentUdi",
|
|
456
562
|
"type": "string | undefined"
|
|
@@ -462,25 +568,72 @@
|
|
|
462
568
|
}
|
|
463
569
|
]
|
|
464
570
|
},
|
|
571
|
+
{
|
|
572
|
+
"name": "umb-block-scale-handler",
|
|
573
|
+
"path": "./../src/packages/block/block-grid/components/block-scale-handler/block-scale-handler.element.ts",
|
|
574
|
+
"properties": [
|
|
575
|
+
{
|
|
576
|
+
"name": "styles",
|
|
577
|
+
"type": "array",
|
|
578
|
+
"default": "[null]"
|
|
579
|
+
}
|
|
580
|
+
]
|
|
581
|
+
},
|
|
465
582
|
{
|
|
466
583
|
"name": "umb-ref-grid-block",
|
|
467
584
|
"path": "./../src/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.ts",
|
|
585
|
+
"properties": [
|
|
586
|
+
{
|
|
587
|
+
"name": "styles",
|
|
588
|
+
"type": "array",
|
|
589
|
+
"default": "[null,null]"
|
|
590
|
+
}
|
|
591
|
+
]
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"name": "umb-property-editor-ui-block-grid-area-type-permission",
|
|
595
|
+
"path": "./../src/packages/block/block-grid/property-editors/block-grid-area-type-permission/block-grid-area-type-permission.element.ts",
|
|
468
596
|
"attributes": [
|
|
469
597
|
{
|
|
470
|
-
"name": "
|
|
471
|
-
"type": "
|
|
598
|
+
"name": "value",
|
|
599
|
+
"type": "UmbBlockGridTypeAreaTypePermission[]"
|
|
472
600
|
}
|
|
473
601
|
],
|
|
474
602
|
"properties": [
|
|
475
603
|
{
|
|
476
|
-
"name": "
|
|
477
|
-
"attribute": "
|
|
478
|
-
"type": "
|
|
604
|
+
"name": "value",
|
|
605
|
+
"attribute": "value",
|
|
606
|
+
"type": "UmbBlockGridTypeAreaTypePermission[]"
|
|
479
607
|
},
|
|
480
608
|
{
|
|
481
609
|
"name": "styles",
|
|
482
610
|
"type": "array",
|
|
483
|
-
"default": "[null]"
|
|
611
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
612
|
+
}
|
|
613
|
+
]
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
"name": "umb-property-editor-ui-block-grid-areas-config",
|
|
617
|
+
"path": "./../src/packages/block/block-grid/property-editors/block-grid-areas-config/property-editor-ui-block-grid-areas-config.element.ts",
|
|
618
|
+
"attributes": [
|
|
619
|
+
{
|
|
620
|
+
"name": "value",
|
|
621
|
+
"type": "UmbBlockGridTypeAreaType[]"
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
"properties": [
|
|
625
|
+
{
|
|
626
|
+
"name": "value",
|
|
627
|
+
"attribute": "value",
|
|
628
|
+
"type": "UmbBlockGridTypeAreaType[]"
|
|
629
|
+
},
|
|
630
|
+
{
|
|
631
|
+
"name": "config"
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
"name": "styles",
|
|
635
|
+
"type": "array",
|
|
636
|
+
"default": "[\"UmbTextStyles\",null]"
|
|
484
637
|
}
|
|
485
638
|
]
|
|
486
639
|
},
|
|
@@ -490,7 +643,7 @@
|
|
|
490
643
|
"attributes": [
|
|
491
644
|
{
|
|
492
645
|
"name": "value",
|
|
493
|
-
"type": "
|
|
646
|
+
"type": "UmbBlockGridTypeColumnSpanOption[]",
|
|
494
647
|
"default": "[]"
|
|
495
648
|
}
|
|
496
649
|
],
|
|
@@ -498,7 +651,7 @@
|
|
|
498
651
|
{
|
|
499
652
|
"name": "value",
|
|
500
653
|
"attribute": "value",
|
|
501
|
-
"type": "
|
|
654
|
+
"type": "UmbBlockGridTypeColumnSpanOption[]",
|
|
502
655
|
"default": "[]"
|
|
503
656
|
},
|
|
504
657
|
{
|
|
@@ -659,7 +812,18 @@
|
|
|
659
812
|
{
|
|
660
813
|
"name": "umb-block-list-entry",
|
|
661
814
|
"path": "./../src/packages/block/block-list/components/block-list-entry/block-list-entry.element.ts",
|
|
815
|
+
"attributes": [
|
|
816
|
+
{
|
|
817
|
+
"name": "index",
|
|
818
|
+
"type": "number | undefined"
|
|
819
|
+
}
|
|
820
|
+
],
|
|
662
821
|
"properties": [
|
|
822
|
+
{
|
|
823
|
+
"name": "index",
|
|
824
|
+
"attribute": "index",
|
|
825
|
+
"type": "number | undefined"
|
|
826
|
+
},
|
|
663
827
|
{
|
|
664
828
|
"name": "contentUdi",
|
|
665
829
|
"type": "string | undefined"
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { MappingFunction } from '../types/mapping-function.type.js';
|
|
2
|
+
import type { MemoizationFunction } from '../types/memoization-function.type.js';
|
|
1
3
|
import { UmbBasicState } from './basic-state.js';
|
|
2
4
|
export interface UmbClassStateData {
|
|
3
5
|
equal(otherClass: this | undefined): boolean;
|
|
@@ -10,6 +12,14 @@ export interface UmbClassStateData {
|
|
|
10
12
|
*/
|
|
11
13
|
export declare class UmbClassState<T extends UmbClassStateData | undefined> extends UmbBasicState<T> {
|
|
12
14
|
constructor(initialData: T);
|
|
15
|
+
/**
|
|
16
|
+
* @export
|
|
17
|
+
* @method createObservablePart
|
|
18
|
+
* @param {(mappable: T) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
19
|
+
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
20
|
+
* @description - Creates an Observable from this State.
|
|
21
|
+
*/
|
|
22
|
+
asObservablePart<ReturnType>(mappingFunction: MappingFunction<T, ReturnType>, memoizationFunction?: MemoizationFunction<ReturnType>): import("rxjs").Observable<ReturnType>;
|
|
13
23
|
/**
|
|
14
24
|
* @method setValue
|
|
15
25
|
* @param {T} data - The next data for this state to hold.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createObservablePart } from '../utils/create-observable-part.function.js';
|
|
1
2
|
import { UmbBasicState } from './basic-state.js';
|
|
2
3
|
/**
|
|
3
4
|
* @export
|
|
@@ -9,6 +10,16 @@ export class UmbClassState extends UmbBasicState {
|
|
|
9
10
|
constructor(initialData) {
|
|
10
11
|
super(initialData);
|
|
11
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* @export
|
|
15
|
+
* @method createObservablePart
|
|
16
|
+
* @param {(mappable: T) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
17
|
+
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
18
|
+
* @description - Creates an Observable from this State.
|
|
19
|
+
*/
|
|
20
|
+
asObservablePart(mappingFunction, memoizationFunction) {
|
|
21
|
+
return createObservablePart(this._subject, mappingFunction, memoizationFunction);
|
|
22
|
+
}
|
|
12
23
|
/**
|
|
13
24
|
* @method setValue
|
|
14
25
|
* @param {T} data - The next data for this state to hold.
|
|
@@ -10,6 +10,13 @@ import { UmbBasicState } from './basic-state.js';
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class UmbDeepState<T> extends UmbBasicState<T> {
|
|
12
12
|
constructor(initialData: T);
|
|
13
|
+
/**
|
|
14
|
+
* @export
|
|
15
|
+
* @method createObservablePart
|
|
16
|
+
* @param {(mappable: T) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
17
|
+
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
18
|
+
* @description - Creates an Observable from this State.
|
|
19
|
+
*/
|
|
13
20
|
asObservablePart<ReturnType>(mappingFunction: MappingFunction<T, ReturnType>, memoizationFunction?: MemoizationFunction<ReturnType>): import("rxjs").Observable<ReturnType>;
|
|
14
21
|
/**
|
|
15
22
|
* @method setValue
|
|
@@ -13,8 +13,15 @@ export class UmbDeepState extends UmbBasicState {
|
|
|
13
13
|
constructor(initialData) {
|
|
14
14
|
super(deepFreeze(initialData));
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* @export
|
|
18
|
+
* @method createObservablePart
|
|
19
|
+
* @param {(mappable: T) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
20
|
+
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
21
|
+
* @description - Creates an Observable from this State.
|
|
22
|
+
*/
|
|
16
23
|
asObservablePart(mappingFunction, memoizationFunction) {
|
|
17
|
-
return createObservablePart(this._subject, mappingFunction, memoizationFunction);
|
|
24
|
+
return createObservablePart(this._subject, mappingFunction, memoizationFunction ?? naiveObjectComparison);
|
|
18
25
|
}
|
|
19
26
|
/**
|
|
20
27
|
* @method setValue
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { MemoizationFunction } from '../types/memoization-function.type.js';
|
|
2
|
+
import type { MappingFunction } from '../types/mapping-function.type.js';
|
|
3
|
+
import { type Observable } from '../../../external/rxjs/index.js';
|
|
4
|
+
type ArrayToObservableTypes<T extends Array<Observable<any>>> = {
|
|
5
|
+
[K in keyof T]: T[K] extends Observable<infer U> ? U : never;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* @export
|
|
9
|
+
* @method combineObservables
|
|
10
|
+
* @param {Array<Observable<T>>} sources - an Array of RxJS Subjects to use for this Observable.
|
|
11
|
+
* @param {(mappable: Array<T>) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
12
|
+
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
13
|
+
* @description - Creates a RxJS Observable from two other Observables.
|
|
14
|
+
*/
|
|
15
|
+
export declare function combineObservables<R, SourceTypes extends Array<Observable<unknown>>, SourceTypeArray = ArrayToObservableTypes<SourceTypes>>(sources: [...SourceTypes], mappingFunction: MappingFunction<SourceTypeArray, R>, memoizationFunction?: MemoizationFunction<R>): Observable<R>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { defaultMemoization } from './default-memoization.function.js';
|
|
2
|
+
import { combineLatest } from '../../../external/rxjs/index.js';
|
|
3
|
+
import { distinctUntilChanged, map, shareReplay } from '../../../external/rxjs/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* @export
|
|
6
|
+
* @method combineObservables
|
|
7
|
+
* @param {Array<Observable<T>>} sources - an Array of RxJS Subjects to use for this Observable.
|
|
8
|
+
* @param {(mappable: Array<T>) => R} mappingFunction - Method to return the part for this Observable to return.
|
|
9
|
+
* @param {(previousResult: R, currentResult: R) => boolean} [memoizationFunction] - Method to Compare if the data has changed. Should return true when data is different.
|
|
10
|
+
* @description - Creates a RxJS Observable from two other Observables.
|
|
11
|
+
*/
|
|
12
|
+
export function combineObservables(sources, mappingFunction, memoizationFunction) {
|
|
13
|
+
return combineLatest(sources).pipe(map(mappingFunction), distinctUntilChanged(memoizationFunction || defaultMemoization), shareReplay(1));
|
|
14
|
+
}
|
|
@@ -636,6 +636,45 @@ export const data = [
|
|
|
636
636
|
{
|
|
637
637
|
label: 'Mocked Block Type for Block Grid',
|
|
638
638
|
contentElementTypeKey: '4f68ba66-6fb2-4778-83b8-6ab4ca3a7c5c',
|
|
639
|
+
rowMinSpan: 1,
|
|
640
|
+
rowMaxSpan: 2,
|
|
641
|
+
columnSpanOptions: [
|
|
642
|
+
{
|
|
643
|
+
columnSpan: 1,
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
columnSpan: 2,
|
|
647
|
+
},
|
|
648
|
+
{
|
|
649
|
+
columnSpan: 3,
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
columnSpan: 6,
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
columnSpan: 12,
|
|
656
|
+
},
|
|
657
|
+
],
|
|
658
|
+
areas: [
|
|
659
|
+
{
|
|
660
|
+
key: 'area1_key',
|
|
661
|
+
alias: 'area1_alias',
|
|
662
|
+
columnSpan: 6,
|
|
663
|
+
rowSpan: 1,
|
|
664
|
+
minAllowed: 1,
|
|
665
|
+
maxAllowed: 2,
|
|
666
|
+
specifiedAllowance: [],
|
|
667
|
+
},
|
|
668
|
+
{
|
|
669
|
+
key: 'area2_key',
|
|
670
|
+
alias: 'area2_alias',
|
|
671
|
+
columnSpan: 6,
|
|
672
|
+
rowSpan: 1,
|
|
673
|
+
minAllowed: 1,
|
|
674
|
+
maxAllowed: 2,
|
|
675
|
+
specifiedAllowance: [],
|
|
676
|
+
},
|
|
677
|
+
],
|
|
639
678
|
},
|
|
640
679
|
{
|
|
641
680
|
label: 'Mocked Coffee Block',
|
|
@@ -323,23 +323,30 @@ export const data = [
|
|
|
323
323
|
{
|
|
324
324
|
contentUdi: '1234',
|
|
325
325
|
settingsUdi: '5678',
|
|
326
|
+
columnSpan: 12,
|
|
326
327
|
areas: [
|
|
327
328
|
{
|
|
328
|
-
key: '
|
|
329
|
+
key: 'area1_key',
|
|
329
330
|
items: [
|
|
330
331
|
{
|
|
331
332
|
contentUdi: 'a1234',
|
|
332
333
|
settingsUdi: 'a5678',
|
|
333
|
-
|
|
334
|
+
columnSpan: 3,
|
|
335
|
+
rowSpan: 2,
|
|
336
|
+
},
|
|
337
|
+
{
|
|
338
|
+
contentUdi: 'c1234',
|
|
339
|
+
columnSpan: 3,
|
|
334
340
|
},
|
|
335
341
|
],
|
|
336
342
|
},
|
|
337
343
|
{
|
|
338
|
-
key: '
|
|
344
|
+
key: 'area2_key',
|
|
339
345
|
items: [
|
|
340
346
|
{
|
|
341
347
|
contentUdi: 'b1234',
|
|
342
348
|
settingsUdi: 'b5678',
|
|
349
|
+
columnSpan: 6,
|
|
343
350
|
areas: [],
|
|
344
351
|
},
|
|
345
352
|
],
|
|
@@ -364,6 +371,11 @@ export const data = [
|
|
|
364
371
|
contentTypeKey: '4f68ba66-6fb2-4778-83b8-6ab4ca3a7c5c',
|
|
365
372
|
elementProperty: 'Hello world from area 2',
|
|
366
373
|
},
|
|
374
|
+
{
|
|
375
|
+
udi: 'c1234',
|
|
376
|
+
contentTypeKey: '4f68ba66-6fb2-4778-83b8-6ab4ca3a7c5c',
|
|
377
|
+
elementProperty: 'Hello CCC from area 1',
|
|
378
|
+
},
|
|
367
379
|
],
|
|
368
380
|
settingsData: [
|
|
369
381
|
{
|
|
@@ -5,6 +5,7 @@ import { UmbEntityMockDbBase } from '../utils/entity/entity-base.js';
|
|
|
5
5
|
import { UmbEntityRecycleBin } from '../utils/entity/entity-recycle-bin.js';
|
|
6
6
|
import type { UmbMockDocumentModel } from './document.data.js';
|
|
7
7
|
import { UmbMockDocumentPublishingManager } from './document-publishing.manager.js';
|
|
8
|
+
import { type DomainsResponseModel } from '../../../external/backend-api/index.js';
|
|
8
9
|
export declare class UmbDocumentMockDB extends UmbEntityMockDbBase<UmbMockDocumentModel> {
|
|
9
10
|
tree: UmbMockEntityTreeManager<UmbMockDocumentModel>;
|
|
10
11
|
item: UmbMockEntityItemManager<UmbMockDocumentModel>;
|
|
@@ -13,5 +14,6 @@ export declare class UmbDocumentMockDB extends UmbEntityMockDbBase<UmbMockDocume
|
|
|
13
14
|
publishing: UmbMockDocumentPublishingManager;
|
|
14
15
|
constructor(data: Array<UmbMockDocumentModel>);
|
|
15
16
|
getUserPermissionsForDocument(id: string): Array<any>;
|
|
17
|
+
getDomainsForDocument(id: string): DomainsResponseModel;
|
|
16
18
|
}
|
|
17
19
|
export declare const umbDocumentMockDb: UmbDocumentMockDB;
|
|
@@ -21,6 +21,9 @@ export class UmbDocumentMockDB extends UmbEntityMockDbBase {
|
|
|
21
21
|
getUserPermissionsForDocument(id) {
|
|
22
22
|
return [];
|
|
23
23
|
}
|
|
24
|
+
getDomainsForDocument(id) {
|
|
25
|
+
return { defaultIsoCode: 'en', domains: [] };
|
|
26
|
+
}
|
|
24
27
|
}
|
|
25
28
|
const treeItemMapper = (model) => {
|
|
26
29
|
const documentType = umbDocumentTypeMockDb.read(model.documentType.id);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const domainHandlers: import("msw").RestHandler<import("node_modules/msw/lib/glossary-de6278a9.js").M<import("node_modules/msw/lib/glossary-de6278a9.js").h>>[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const { rest } = window.MockServiceWorker;
|
|
2
|
+
import { umbDocumentMockDb } from '../../data/document/document.db.js';
|
|
3
|
+
import { UMB_SLUG } from './slug.js';
|
|
4
|
+
import { umbracoPath } from '../../../shared/utils/index.js';
|
|
5
|
+
// TODO: temp handlers until we have a real API
|
|
6
|
+
export const domainHandlers = [
|
|
7
|
+
rest.get(umbracoPath(`${UMB_SLUG}/:id/domains`), (req, res, ctx) => {
|
|
8
|
+
const id = req.params.id;
|
|
9
|
+
if (!id)
|
|
10
|
+
return;
|
|
11
|
+
const response = umbDocumentMockDb.getDomainsForDocument(id);
|
|
12
|
+
return res(ctx.status(200), ctx.json(response));
|
|
13
|
+
}),
|
|
14
|
+
];
|
|
@@ -4,6 +4,7 @@ import { itemHandlers } from './item.handlers.js';
|
|
|
4
4
|
import { permissionHandlers } from './permission.handlers.js';
|
|
5
5
|
import { publishingHandlers } from './publishing.handlers.js';
|
|
6
6
|
import { detailHandlers } from './detail.handlers.js';
|
|
7
|
+
import { domainHandlers } from './domain.handlers.js';
|
|
7
8
|
export const handlers = [
|
|
8
9
|
...recycleBinHandlers,
|
|
9
10
|
...permissionHandlers,
|
|
@@ -11,4 +12,5 @@ export const handlers = [
|
|
|
11
12
|
...itemHandlers,
|
|
12
13
|
...publishingHandlers,
|
|
13
14
|
...detailHandlers,
|
|
15
|
+
...domainHandlers,
|
|
14
16
|
];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { UmbBaseController } from '../../../../libs/class-api/index.js';
|
|
2
|
+
import type { ManifestCondition, UmbConditionConfigBase, UmbConditionControllerArguments, UmbExtensionCondition } from '../../../../libs/extension-api/index.js';
|
|
3
|
+
export declare class UmbBlockEntryShowContentEditCondition extends UmbBaseController implements UmbExtensionCondition {
|
|
4
|
+
#private;
|
|
5
|
+
config: BlockEntryShowContentEditConditionConfig;
|
|
6
|
+
permitted: boolean;
|
|
7
|
+
constructor(args: UmbConditionControllerArguments<BlockEntryShowContentEditConditionConfig>);
|
|
8
|
+
}
|
|
9
|
+
export type BlockEntryShowContentEditConditionConfig = UmbConditionConfigBase<'Umb.Condition.BlockEntryShowContentEdit'>;
|
|
10
|
+
export declare const manifest: ManifestCondition;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
2
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
5
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
8
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
9
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
10
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
|
+
};
|
|
12
|
+
var _UmbBlockEntryShowContentEditCondition_onChange;
|
|
13
|
+
import { UMB_BLOCK_ENTRY_CONTEXT } from '../../index.js';
|
|
14
|
+
import { UmbBaseController } from '../../../../libs/class-api/index.js';
|
|
15
|
+
export class UmbBlockEntryShowContentEditCondition extends UmbBaseController {
|
|
16
|
+
constructor(args) {
|
|
17
|
+
super(args.host);
|
|
18
|
+
this.permitted = false;
|
|
19
|
+
_UmbBlockEntryShowContentEditCondition_onChange.set(this, void 0);
|
|
20
|
+
this.config = args.config;
|
|
21
|
+
__classPrivateFieldSet(this, _UmbBlockEntryShowContentEditCondition_onChange, args.onChange, "f");
|
|
22
|
+
this.consumeContext(UMB_BLOCK_ENTRY_CONTEXT, (context) => {
|
|
23
|
+
this.observe(context.showContentEdit, (showContentEdit) => {
|
|
24
|
+
this.permitted = !!showContentEdit;
|
|
25
|
+
__classPrivateFieldGet(this, _UmbBlockEntryShowContentEditCondition_onChange, "f").call(this);
|
|
26
|
+
}, 'observeEntryShowContentEdit');
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_UmbBlockEntryShowContentEditCondition_onChange = new WeakMap();
|
|
31
|
+
export const manifest = {
|
|
32
|
+
type: 'condition',
|
|
33
|
+
name: 'Block Show Content Edit Condition',
|
|
34
|
+
alias: 'Umb.Condition.BlockEntryShowContentEdit',
|
|
35
|
+
api: UmbBlockEntryShowContentEditCondition,
|
|
36
|
+
};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type { BlockEntryShowContentEditConditionConfig } from './block-entry-show-content-edit.condition.js';
|
|
2
|
+
export type { BlockWorkspaceHasSettingsConditionConfig } from './block-workspace-has-settings.condition.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const manifests: import("../../../../libs/extension-api/index.js").ManifestCondition[];
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { manifest as blockEntryShowContentConditionManifest } from './block-entry-show-content-edit.condition.js';
|
|
2
|
+
import { manifest as blockWorkspaceHasSettingsConditionManifest } from './block-workspace-has-settings.condition.js';
|
|
3
|
+
export const manifests = [blockEntryShowContentConditionManifest, blockWorkspaceHasSettingsConditionManifest];
|